wms,sap收货生产批次, 后面加一个入库批次字段。显示上面截取的值或者修改后的值,过账用入库批次

master
mengjiao 6 months ago
parent cad9c6aab4
commit 14fcf17a5a

@ -193,10 +193,19 @@ public class wmsReportWork extends BaseEntity {
private String createTimeEnd;
private String feedbackTimeStart;
private String feedbackTimeEnd;
private String batch;
private String batch;//生产批次
private String batchSK;//RK批次
private String endReport;
private String whCode;
public String getBatchSK() {
return batchSK;
}
public void setBatchSK(String batchSK) {
this.batchSK = batchSK;
}
public String getWhCode() {
return whCode;
}

@ -47,6 +47,15 @@ public class WmsProductPut extends BaseEntity {
*/
@Excel(name = "仓库编码")
private String whCode;
private String batchSK;//生产批次
public String getBatchSK() {
return batchSK;
}
public void setBatchSK(String batchSK) {
this.batchSK = batchSK;
}
/**
*
@ -490,4 +499,6 @@ public class WmsProductPut extends BaseEntity {
", attr10='" + attr10 + '\'' +
'}';
}
}

@ -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);

Loading…
Cancel
Save