|
|
|
@ -1063,6 +1063,17 @@ public class BomUploadServiceImpl {
|
|
|
|
|
Map bomxzjh = bomxzjh(adds, kwxxMap, qgKwMap, req,addmxs);
|
|
|
|
|
List<DmYdjh> adds1 = (List<DmYdjh>) bomxzjh.get("adds");
|
|
|
|
|
List<DmYdjh> ups = (List<DmYdjh>) bomxzjh.get("ups");
|
|
|
|
|
List<DmYdjh> yds = (List<DmYdjh>) bomxzjh.get("ydjhs");
|
|
|
|
|
if(yds.size()>0){
|
|
|
|
|
for(DmYdjh dmYdjh:yds){
|
|
|
|
|
DmYdjh dmYdjh1 =new DmYdjh();
|
|
|
|
|
dmYdjh1.setZt("99");
|
|
|
|
|
dmYdjh1.setId(dmYdjh.getId());
|
|
|
|
|
dmYdjhService.updateById(dmYdjh1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dmYdjhService.saveBatch(adds1);
|
|
|
|
|
dmYdjhService.updateBatchById(ups);
|
|
|
|
|
// 修正 生产计划。
|
|
|
|
@ -1501,6 +1512,7 @@ public class BomUploadServiceImpl {
|
|
|
|
|
dmBom.setSjch(e.getDcCh());
|
|
|
|
|
dmBom.setWpcz(e.getWpxh());
|
|
|
|
|
dmBom.setWpgg(e.getWpgg());
|
|
|
|
|
dmBom.setYlbs(e.getSfyl());
|
|
|
|
|
System.out.println("e.getWpggZ().split(\"\\\\*\")[0] = " + e.getWpgg().split("\\*")[0]);
|
|
|
|
|
System.out.println("e.getWpggZ().split(\"\\\\*\")[0] = " + e.getWpgg());
|
|
|
|
|
dmBom.setBh(new BigDecimal(e.getWpgg().split("\\*")[0]));
|
|
|
|
@ -1778,6 +1790,7 @@ public class BomUploadServiceImpl {
|
|
|
|
|
&& fst.getWpgg().equalsIgnoreCase(dmBchxjbp.getWpgg())
|
|
|
|
|
&& (fst.getWpxh().equalsIgnoreCase(dmBchxjbp.getWpxh())
|
|
|
|
|
|| (cjs1 + fst.getWpxh()).equalsIgnoreCase(dmBchxjbp.getWpxh()))
|
|
|
|
|
&& fst.getTzbh().equalsIgnoreCase(dmBchxjbp.getTzbh())
|
|
|
|
|
)
|
|
|
|
|
.findFirst()
|
|
|
|
|
.orElse(null);
|
|
|
|
@ -1818,10 +1831,60 @@ public class BomUploadServiceImpl {
|
|
|
|
|
dmYdjh.setWpgg(dmBchxjbp.getWpgg());
|
|
|
|
|
dmYdjh.setWpxh(dmBchxjbp.getWpxh());
|
|
|
|
|
}
|
|
|
|
|
ydjhs.remove(dmYdjh); // 从列表中移除找到的元素
|
|
|
|
|
ups.add(dmYdjh);
|
|
|
|
|
ydjhs.remove(dmYdjh); // 从列表中移除找到的元素
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
dmYdjh = ydjhs.stream()
|
|
|
|
|
.filter(fst -> StringUtils.isNotBlank(fst.getWpgg())
|
|
|
|
|
&& StringUtils.isNotBlank(fst.getWpxh())
|
|
|
|
|
&& fst.getWpgg().equalsIgnoreCase(dmBchxjbp.getWpgg())
|
|
|
|
|
&& (fst.getWpxh().equalsIgnoreCase(dmBchxjbp.getWpxh())
|
|
|
|
|
|| (cjs1 + fst.getWpxh()).equalsIgnoreCase(dmBchxjbp.getWpxh()))
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
.findFirst()
|
|
|
|
|
.orElse(null);
|
|
|
|
|
if(dmYdjh!=null){
|
|
|
|
|
String hxlx="";
|
|
|
|
|
if (tzbh.substring(4, 5).equals("S")) {
|
|
|
|
|
hxlx = "1010";
|
|
|
|
|
} else if (tzbh.substring(4, 5).equals("N")) {
|
|
|
|
|
hxlx = "1020";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dmYdjh.setLqlb(hxlx);
|
|
|
|
|
dmYdjh.setTzbh(tzbh);
|
|
|
|
|
dmYdjh.setHxcd(dmBchxjbp.getHxcd().doubleValue());
|
|
|
|
|
dmYdjh.setQgcd(dmBchxjbp.getYlzd4().doubleValue());
|
|
|
|
|
dmYdjh.setLjsl(dmBchxjbp.getLjsl().doubleValue());
|
|
|
|
|
dmYdjh.setZl(dmBchxjbp.getDcZl());
|
|
|
|
|
String s = (String) kwxxMap.get(tzbh.substring(4, 7));
|
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
|
|
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
|
// dmYdjh.setDcFd(dmBchxjbp.getDcFd());
|
|
|
|
|
|
|
|
|
|
if(tzbh.substring(4, 5).equals("X")){
|
|
|
|
|
dmYdjh.setLx("X");
|
|
|
|
|
}else{
|
|
|
|
|
dmYdjh.setLx("B");
|
|
|
|
|
}
|
|
|
|
|
dmYdjh.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
|
dmYdjh.setBmxgrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm"));
|
|
|
|
|
dmYdjh.setBmxgry((String) req.getAttribute("yhms"));
|
|
|
|
|
if(StringUtils.isNotBlank(dmYdjh.getSlxhth())){ // 说明已经上料 需要修正数据
|
|
|
|
|
// 修正
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
// 没上料 规格材质
|
|
|
|
|
dmYdjh.setWpgg(dmBchxjbp.getWpgg());
|
|
|
|
|
dmYdjh.setWpxh(dmBchxjbp.getWpxh());
|
|
|
|
|
}
|
|
|
|
|
ups.add(dmYdjh);
|
|
|
|
|
ydjhs.remove(dmYdjh); // 从列表中移除找到的元素
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
DmYdjh dmYdjhadd =new DmYdjh();
|
|
|
|
|
String hxlx="";
|
|
|
|
|
if (tzbh.substring(4, 5).equals("S")) {
|
|
|
|
@ -1888,6 +1951,10 @@ public class BomUploadServiceImpl {
|
|
|
|
|
}
|
|
|
|
|
// dmYdjhadd
|
|
|
|
|
adds.add(dmYdjhadd);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1899,6 +1966,7 @@ public class BomUploadServiceImpl {
|
|
|
|
|
Map rMap = new HashMap();
|
|
|
|
|
rMap.put("adds",adds);
|
|
|
|
|
rMap.put("ups",ups);
|
|
|
|
|
rMap.put("ydjhs",ydjhs);
|
|
|
|
|
return rMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|