|
|
|
@ -329,6 +329,15 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public List<wmsReportWork> getReportList(wmsReportWork mesReportWork) {
|
|
|
|
|
List<wmsReportWork> rlist = wmsProductPutMapper.getReportList(mesReportWork);
|
|
|
|
|
for (wmsReportWork wmsReportWork:
|
|
|
|
|
rlist ) {
|
|
|
|
|
if (wmsReportWork.getBatch().length()>=23){
|
|
|
|
|
String batchsk = InterceptionRules(wmsReportWork.getBatch());
|
|
|
|
|
wmsReportWork.setBatchSK(batchsk);
|
|
|
|
|
}else {
|
|
|
|
|
wmsReportWork.setBatchSK(wmsReportWork.getBatch());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return rlist;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -365,6 +374,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
|
|
|
|
|
// wmsProductPutk.setSapStatus("2");//过账失败的
|
|
|
|
|
List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
|
|
|
|
|
|
|
|
|
|
if (wmsProductPutList.size() > 0) {
|
|
|
|
|
String id = wmsProductPutList.get(0).getId();
|
|
|
|
|
mesReportWork.setId(id);
|
|
|
|
@ -393,6 +403,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsReportWorkListagain.add(mesReportWork);//
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
//已经插入且插入失败的
|
|
|
|
|
for (wmsReportWork mesReportWork :
|
|
|
|
|
wmsReportWorkList) {
|
|
|
|
|
WmsProductPut wmsProductPutk = new WmsProductPut();
|
|
|
|
@ -408,6 +419,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
|
|
|
|
|
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
|
|
|
|
|
wmsProductPutk.setSapStatus("2");
|
|
|
|
|
|
|
|
|
|
List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
|
|
|
|
|
if (wmsProductPutList.size() > 0) {//已经插入且失败的
|
|
|
|
|
wmsReportWorkListTWO.add(mesReportWork);//
|
|
|
|
@ -415,7 +427,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//先屏蔽起来
|
|
|
|
|
//第一次
|
|
|
|
|
for (wmsReportWork mesReportWork :
|
|
|
|
|
wmsReportWorkListRk) {
|
|
|
|
|
WmsProductPut wmsProductPutk = new WmsProductPut();
|
|
|
|
@ -433,12 +445,12 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsProductPutk.setStatus("1");
|
|
|
|
|
wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
|
|
|
|
|
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
|
|
|
|
|
wmsProductPutk.setAttr4(mesReportWork.getBatchSK());
|
|
|
|
|
//List<WmsProductPut> wmsProductPutList= wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
|
|
|
|
|
|
|
|
|
|
// wmsProductPutk.setBatchSK(mesReportWork.getBatchSK());//入库批次
|
|
|
|
|
wmsProductPutk.setAttr3(formattedDate);//
|
|
|
|
|
wmsProductPutk.setCreateBy(SecurityUtils.getUsername());
|
|
|
|
|
wmsProductPutk.setCreateTime(new Date());
|
|
|
|
|
|
|
|
|
|
wmsProductPutk.setProductDate(mesReportWork.getProductDate());
|
|
|
|
|
wmsProductPutk.setId(mesReportWork.getId());
|
|
|
|
|
wmsProductPutk.setSapStatus("0");
|
|
|
|
@ -492,13 +504,14 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
map.put("LGORT", mesReportWork.getWhCode());
|
|
|
|
|
map.put("QUANTITY", mesReportWork.getQuantityQualified());
|
|
|
|
|
map.put("ERFME", mesReportWork.getUnit());
|
|
|
|
|
if (mesReportWork.getBatch().length()>12){
|
|
|
|
|
//String batch = mesReportWork.getBatch().substring(12);
|
|
|
|
|
String batch = InterceptionRules(mesReportWork.getBatch());
|
|
|
|
|
map.put("BATCH", batch);
|
|
|
|
|
}else {
|
|
|
|
|
map.put("BATCH", mesReportWork.getBatch());
|
|
|
|
|
}
|
|
|
|
|
map.put("BATCH", mesReportWork.getBatchSK());
|
|
|
|
|
// if (mesReportWork.getBatch().length()>12){
|
|
|
|
|
// //String batch = mesReportWork.getBatch().substring(12);
|
|
|
|
|
// String batch = InterceptionRules(mesReportWork.getBatch());
|
|
|
|
|
//
|
|
|
|
|
// }else {
|
|
|
|
|
// map.put("BATCH", mesReportWork.getBatch());
|
|
|
|
|
// }
|
|
|
|
|
String formattedsDate = mesReportWork.getProductDate().replace("-", "");
|
|
|
|
|
map.put("HSDAT", formattedsDate);
|
|
|
|
|
mapList.add(map);
|
|
|
|
@ -532,12 +545,13 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
map.put("LGORT", mesReportWork.getWhCode());
|
|
|
|
|
map.put("QUANTITY", mesReportWork.getQuantityQualified());
|
|
|
|
|
map.put("ERFME", mesReportWork.getUnit());
|
|
|
|
|
if (mesReportWork.getBatch().length()>12){
|
|
|
|
|
String batch = InterceptionRules(mesReportWork.getBatch());
|
|
|
|
|
map.put("BATCH", batch);
|
|
|
|
|
}else {
|
|
|
|
|
map.put("BATCH", mesReportWork.getBatch());
|
|
|
|
|
}
|
|
|
|
|
map.put("BATCH", mesReportWork.getBatchSK());
|
|
|
|
|
// if (mesReportWork.getBatch().length()>12){
|
|
|
|
|
// String batch = InterceptionRules(mesReportWork.getBatch());
|
|
|
|
|
// map.put("BATCH", batch);
|
|
|
|
|
// }else {
|
|
|
|
|
// map.put("BATCH", mesReportWork.getBatch());
|
|
|
|
|
// }
|
|
|
|
|
String formattedsDate = mesReportWork.getProductDate().replace("-", "");
|
|
|
|
|
map.put("HSDAT", formattedsDate);
|
|
|
|
|
mapList.add(map);
|
|
|
|
|