wmsSap收货过账字段生产时间的修改

master
mengjiao 4 months ago
parent ded3c3ec2c
commit 8fa1a90af5

@ -517,15 +517,15 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
map.put("QUANTITY", mesReportWork.getQuantityQualified());
map.put("ERFME", mesReportWork.getUnit());
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);
if (mesReportWork.getBatch().length()>12&&mesReportWork.getBatch().length()<30){
//String batch = mesReportWork.getBatch().substring(12);
String HSDAT = InterceptionSJRules(mesReportWork.getBatch());
map.put("HSDAT", HSDAT);
}else {
String formattedsDate = mesReportWork.getProductDate().replace("-", "");
map.put("HSDAT", formattedsDate);
}
mapList.add(map);
}
//过账
@ -565,8 +565,14 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
// }else {
// map.put("BATCH", mesReportWork.getBatch());
// }
String formattedsDate = mesReportWork.getProductDate().replace("-", "");
map.put("HSDAT", formattedsDate);
if (mesReportWork.getBatch().length()>12&&mesReportWork.getBatch().length()<30){
//String batch = mesReportWork.getBatch().substring(12);
String HSDAT = InterceptionSJRules(mesReportWork.getBatch());
map.put("HSDAT", HSDAT);
}else {
String formattedsDate = mesReportWork.getProductDate().replace("-", "");
map.put("HSDAT", formattedsDate);
}
mapList.add(map);
}
//过账
@ -1485,6 +1491,15 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
//去除空格截取规则例子20270106LJ20240107CBCD0J——》240107CBCD
public String InterceptionRules(String batchString){
boolean containsSpace = batchString.contains(" ");
if (containsSpace) {//去除空格
batchString = batchString.replace(" ", "");
}
batchString =batchString.substring(12,22);
return batchString;
}
//去除空格截取规则例子20270106LJ20240107CBCD0J——》240107CBCD
public String InterceptionSJRules(String batchString){
boolean containsSpace = batchString.contains(" ");
if (containsSpace) {//去除空格
batchString = batchString.replace(" ", "");

Loading…
Cancel
Save