|
|
|
|
@ -15,6 +15,8 @@ import org.springframework.jdbc.core.simple.SimpleJdbcCall; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.sql.Types; |
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -31,6 +33,8 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
|
|
|
|
|
|
private final JdbcTemplate jdbcTemplate; |
|
|
|
|
|
|
|
|
|
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<QueryBatchVO> queryBatch(String partCode) { |
|
|
|
|
return erpDataProduceMapper.queryBatch(partCode); |
|
|
|
|
@ -401,7 +405,7 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public ErpReturnDataVO proRbtransferlev(String hrCode, String ypCode, String woCode, String cardNo, String partCode, String batchNo, String createMan, Date createTime, String handoverUnit, Integer handoverQty, String recDept, String roamNo, String deliverKey, Integer testQty, Integer lossQty, Integer scrapQty) { |
|
|
|
|
public ErpReturnDataVO proRbtransferlev(String hrCode, String ypCode, String woCode, String cardNo, String partCode, String batchNo, String createMan, String createTime, String handoverUnit, Integer handoverQty, String recDept, String roamNo, String deliverKey, Integer testQty, Integer lossQty, Integer scrapQty){ |
|
|
|
|
ErpReturnDataVO erpReturnDataVO = new ErpReturnDataVO(); |
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
@ -430,6 +434,12 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
|
new SqlOutParameter("v_excflag", Types.VARCHAR) |
|
|
|
|
); |
|
|
|
|
// 2. 封装输入参数
|
|
|
|
|
Date date = new Date(); |
|
|
|
|
try { |
|
|
|
|
date = sdf.parse(createTime); |
|
|
|
|
} catch (ParseException e) { |
|
|
|
|
log.error("时间转换错误", e); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> inParams = new HashMap<>(); |
|
|
|
|
inParams.put("v_hr_code", hrCode); |
|
|
|
|
inParams.put("v_po_code", ypCode); |
|
|
|
|
@ -438,7 +448,7 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
|
inParams.put("v_part_code", partCode); |
|
|
|
|
inParams.put("v_batch_no", batchNo); |
|
|
|
|
inParams.put("v_create_man", createMan); |
|
|
|
|
inParams.put("v_create_time", createTime); |
|
|
|
|
inParams.put("v_create_time", date); |
|
|
|
|
inParams.put("v_handover_unit", handoverUnit); |
|
|
|
|
inParams.put("v_handover_qty", handoverQty); |
|
|
|
|
inParams.put("v_rec_dept", recDept); |
|
|
|
|
|