master
xhj 2 years ago
parent 239c33d727
commit f1f76d0ecf

@ -198,6 +198,12 @@ public class DmBom implements Serializable {
private String yidd;
private String bzry;
private String bzrq;
private BigDecimal xcgs;
private BigDecimal xcshms;

@ -1296,7 +1296,7 @@ public class BomUploadServiceImpl {
}
}
System.out.println(" = " + "tlt over");
if (type.equals("01")) {
// if (type.equals("01")) {
List<DmWlqd> ljbList = wlqdService.getLJQDList(querMap);
for (int i = 0; i < ljbList.size(); ) {
if (i == adds.size()) {
@ -1316,7 +1316,7 @@ public class BomUploadServiceImpl {
}
}
}
}
// }
// tltList.forEach(e->{
// if(StringUtils.isNotBlank(e.getWpggZ())){
//
@ -1443,19 +1443,25 @@ public class BomUploadServiceImpl {
dmBom.setLqlb(hxlx);
// 领取表找打 fds
if (e.getHxfl().equals("B")) {
List<BomVO> collect11 = list.stream().filter(fst -> fst.getBclq().getWpgg().equals(e.getWpgg()) &&
fst.getBclq().getWpxh().equals(e.getWpxh())
dmBom.setType("B");
List<BomVO> collect11 = list.stream().filter(fst -> null!= fst.getBclq() &&fst.getBclq().getWpgg().equals(e.getWpgg()) &&
fst.getBclq().getWpxh().equals(e.getWpxh()) && fst.getBclq().getDcPlZ().equals(e.getDcPl())
).collect(Collectors.toList());
if (collect11.size() > 0) {
dmBom.setFds(collect11.get(0).getBclq().getDcFdZ());
}
} else {
List<BomVO> collect11 = list.stream().filter(fst -> fst.getBclq().getWpxh().equals(e.getWpgg()) &&
fst.getBclq().getWpgg().equals(e.getWpxh())
BigDecimal cd=e.getXccd().divide(new BigDecimal("1000"));
List<BomVO> collect11 = list.stream().filter(fst -> null!= fst.getBclq() && fst.getBclq().getWpxh().equals(e.getWpgg()) &&
fst.getBclq().getWpgg().equals(e.getWpxh()) && fst.getBclq().getDcPlZ().equals(e.getDcPl()) && fst.getBclq().getYlzd11().compareTo(cd)==0
).collect(Collectors.toList());
if (collect11.size() > 0) {
dmBom.setFds(collect11.get(0).getBclq().getDcFdZ());
dmBom.setXcgs(collect11.get(0).getBclq().getSl());
dmBom.setXcshms(collect11.get(0).getBclq().getShms());
}
dmBom.setType("X");
}
adds.add(dmBom);
}
@ -1500,6 +1506,29 @@ public class BomUploadServiceImpl {
dmBom.setKw(zzcj);
dmBom.setLqlb(hxlx);
dmBom.setLqbs("Y");
if(tzbh.substring(4, 5).equals("X")){ // 型材
// 先去 统计表中查找
// List<BomVO> collect11 = list.stream().filter(fst -> null!= fst.getTjb() && fst.getTjb().getWpxh().equals(e.getWpxhZ()) &&
// fst.getTjb().getWpgg().equals(e.getWpggZ()) && fst.getTjb().getDcPl().equals(e.getDcPlZ())
// ).collect(Collectors.toList());
List<BomVO> collect11 = list.stream().filter(fst -> null!= fst.getTjb() && tzbh.equals(fst.getTjb().getTzbh())
).collect(Collectors.toList());
// 找到长度
BigDecimal cd=collect11.get(0).getTjb().getXccd().divide(new BigDecimal("1000"));
List<BomVO> collect111 = list.stream().filter(fst -> null!= fst.getBclq() && fst.getBclq().getWpgg().equals(e.getWpxhZ()) &&
fst.getBclq().getWpxh().equals(e.getWpggZ()) && fst.getBclq().getDcPlZ().equals(e.getDcPlZ()) && fst.getBclq().getYlzd11().compareTo(cd)==0
).collect(Collectors.toList());
if (collect111.size() > 0) {
// dmBom.setFds(collect11.get(0).getBclq().getDcFdZ());
dmBom.setXcgs(collect111.get(0).getBclq().getSl());
dmBom.setXcshms(collect111.get(0).getBclq().getShms());
}
dmBom.setType("X");
}else {
dmBom.setType("B");
}
adds.add(dmBom);
}
});

@ -100,6 +100,10 @@
<if test=" hxfl!=null and hxfl!=''">
and dm_bchxylp.HXFL=#{hxfl}
</if>
<if test=" tzbh!=null and tzbh!=''">
and dm_bchxylp.tzbh like'%'+#{tzbh}+'%'
</if>
</select>
</mapper>

Loading…
Cancel
Save