|
|
|
@ -41,6 +41,7 @@ import java.io.IOException;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -2050,7 +2051,10 @@ public class BomUploadServiceImpl {
|
|
|
|
|
}else{
|
|
|
|
|
dmYdjh.setLx("B");
|
|
|
|
|
}
|
|
|
|
|
dmYdjh.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
|
if(null!=bchxmxp){
|
|
|
|
|
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())){ // 说明已经上料 需要修正数据
|
|
|
|
@ -2137,8 +2141,9 @@ public class BomUploadServiceImpl {
|
|
|
|
|
}else{
|
|
|
|
|
dmYdjh.setLx("B");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dmYdjh.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
|
if(null!=bchxmxp) {
|
|
|
|
|
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())){ // 说明已经上料 需要修正数据
|
|
|
|
@ -2283,6 +2288,16 @@ public class BomUploadServiceImpl {
|
|
|
|
|
.eq("DC_PL_z", dcpl)
|
|
|
|
|
);
|
|
|
|
|
List<DmBchxylp> tjListOld = bchxylpService.list(new QueryWrapper<DmBchxylp>().eq("dc_ch", dcch).eq("dc_pl", dcpl));
|
|
|
|
|
/// 去掉重复数据
|
|
|
|
|
tjListOld = tjListOld.stream()
|
|
|
|
|
.collect(Collectors.collectingAndThen(
|
|
|
|
|
Collectors.toMap(
|
|
|
|
|
DmBchxylp::getTzbh, // 以 tzbh 作为键
|
|
|
|
|
Function.identity(), // 保留原对象
|
|
|
|
|
(existing, replacement) -> existing // 遇到重复时保留第一个
|
|
|
|
|
),
|
|
|
|
|
map -> new ArrayList<>(map.values()) // 将 Map 的值转为 List
|
|
|
|
|
));
|
|
|
|
|
List<DmYdjh> ydjhs = dmYdjhService.list(new QueryWrapper<DmYdjh>().eq("dc_ch", dcch )
|
|
|
|
|
.eq("dc_pl",dcpl)
|
|
|
|
|
);
|
|
|
|
@ -2328,8 +2343,11 @@ public class BomUploadServiceImpl {
|
|
|
|
|
.filter(fst -> StringUtils.isNotBlank(fst.getWpgg())
|
|
|
|
|
&& StringUtils.isNotBlank(fst.getWpxh())
|
|
|
|
|
&& fst.getWpgg().equalsIgnoreCase(dmBchxylp1.getWpgg())
|
|
|
|
|
&& (fst.getWpxh().equalsIgnoreCase(dmBchxylp1.getWpxh())
|
|
|
|
|
|| (cjs1 + fst.getWpxh()).equalsIgnoreCase(dmBchxylp1.getWpxh()) || ( fst.getWpxh()).equalsIgnoreCase(cjs1 +dmBchxylp1.getWpxh()))
|
|
|
|
|
&& (
|
|
|
|
|
fst.getWpxh().equalsIgnoreCase(dmBchxylp1.getWpxh())
|
|
|
|
|
|| (cjs1 + fst.getWpxh()).equalsIgnoreCase(dmBchxylp1.getWpxh())
|
|
|
|
|
|| ( fst.getWpxh()).equalsIgnoreCase(cjs1 +dmBchxylp1.getWpxh())
|
|
|
|
|
)
|
|
|
|
|
&& fst.getTzbh().equalsIgnoreCase(dmBchxylp1.getTzbh())
|
|
|
|
|
)
|
|
|
|
|
.findFirst()
|
|
|
|
|