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 createTimeEnd;
private String feedbackTimeStart; private String feedbackTimeStart;
private String feedbackTimeEnd; private String feedbackTimeEnd;
private String batch; private String batch;//生产批次
private String batchSK;//RK批次
private String endReport; private String endReport;
private String whCode; private String whCode;
public String getBatchSK() {
return batchSK;
}
public void setBatchSK(String batchSK) {
this.batchSK = batchSK;
}
public String getWhCode() { public String getWhCode() {
return whCode; return whCode;
} }

@ -47,6 +47,15 @@ public class WmsProductPut extends BaseEntity {
*/ */
@Excel(name = "仓库编码") @Excel(name = "仓库编码")
private String whCode; 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 + '\'' + ", attr10='" + attr10 + '\'' +
'}'; '}';
} }
} }

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

Loading…
Cancel
Save