master
xhj 5 months ago
parent c35fd3e4b4
commit bcdf4d8d1c

@ -218,6 +218,11 @@ public class DmBomController {
dmYdjhadd.setId(IdWorker.get32UUID()); dmYdjhadd.setId(IdWorker.get32UUID());
dmYdjhadd.setBmbzrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm")); dmYdjhadd.setBmbzrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm"));
dmYdjhadd.setBmbzry("xhj"); dmYdjhadd.setBmbzry("xhj");
// dmYdjhadd.setBcylzl(null==collect11.get(0).getYlzl()? null:collect11.get(0).getYlzl().doubleValue());
// dmYdjhadd.setBclqzl(null==collect11.get(0).getLqzl()? null:collect11.get(0).getLqzl().doubleValue());
// dmYdjhadd.setBcshzl(null==collect11.get(0).getShzl()? null:collect11.get(0).getShzl().doubleValue());
// dmYdjhadd.setBcljtlzl(null==collect11.get(0).getLjzl()? null:collect11.get(0).getLjzl().doubleValue());
// dmYdjhadd.setBcqpyld(null==collect11.get(0).getQpyld()? null:collect11.get(0).getQpyld().doubleValue());
// 新增数据得时候 应该看 是不是有排产数据 有排产数据 给上日期 // 新增数据得时候 应该看 是不是有排产数据 有排产数据 给上日期
// dmYdjhadd // dmYdjhadd
adds.add(dmYdjhadd); adds.add(dmYdjhadd);

@ -10,6 +10,7 @@ import com.dsic.gj_erp.bean.jcsj.*;
import com.dsic.gj_erp.bean.jcsj.vo.BomVO; import com.dsic.gj_erp.bean.jcsj.vo.BomVO;
import com.dsic.gj_erp.bean.jhgk.DmTzjh; import com.dsic.gj_erp.bean.jhgk.DmTzjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjh; import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.bean.sy.Dm_zhbmp; import com.dsic.gj_erp.bean.sy.Dm_zhbmp;
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository; import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
import com.dsic.gj_erp.exception.CustomException; import com.dsic.gj_erp.exception.CustomException;
@ -19,6 +20,7 @@ import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
import com.dsic.gj_erp.service.jcsj.*; import com.dsic.gj_erp.service.jcsj.*;
import com.dsic.gj_erp.service.jhgk.DmTzjhService; import com.dsic.gj_erp.service.jhgk.DmTzjhService;
import com.dsic.gj_erp.service.jhgk.DmYdjhService; import com.dsic.gj_erp.service.jhgk.DmYdjhService;
import com.dsic.gj_erp.service.pgd.PgdTzjhService;
import com.dsic.gj_erp.service.sy.SYService; import com.dsic.gj_erp.service.sy.SYService;
import com.dsic.gj_erp.util.MyFileUtil; import com.dsic.gj_erp.util.MyFileUtil;
import com.dsic.gj_erp.util.ObjConvertUtils; import com.dsic.gj_erp.util.ObjConvertUtils;
@ -74,6 +76,9 @@ public class BomUploadServiceImpl {
DmCzplpNewService dmCzplpNewService; DmCzplpNewService dmCzplpNewService;
@Autowired @Autowired
DmTzjhService dmTzjhService; DmTzjhService dmTzjhService;
@Autowired
PgdTzjhService pgdTzjhService;
@Autowired @Autowired
DmBomService dmBomService; DmBomService dmBomService;
@Autowired @Autowired
@ -456,14 +461,23 @@ public class BomUploadServiceImpl {
qw.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); qw.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw.eq("dc_ch", e.getDcChZ()); qw.eq("dc_ch", e.getDcChZ());
qw.eq("dc_pl", e.getDcPlZ()); qw.eq("dc_pl", e.getDcPlZ());
// qw.eq("dc_fd", fd); qw.eq("dc_fd", fd);
dmCzplpNewService.update(qw); dmCzplpNewService.update(qw);
UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>(); // UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>();
qw1.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); // qw1.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw1.eq("dc_ch", e.getDcChZ()); // qw1.eq("dc_ch", e.getDcChZ());
qw1.eq("dc_pl", e.getDcPlZ()); // qw1.eq("dc_pl", e.getDcPlZ());
// qw1.eq("dc_fd", fd);
// dmTzjhService.update(qw1);
UpdateWrapper<PgdTzjh> qw1 = new UpdateWrapper<>();
qw1.set("lqbjsrq", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw1.eq("czbh", e.getDcChZ());
qw1.eq("pl", e.getDcPlZ());
// qw1.eq("dc_fd", fd); // qw1.eq("dc_fd", fd);
dmTzjhService.update(qw1); pgdTzjhService.update(qw1);
} }
}); });
bclqjbpService.save(bclqjbp); bclqjbpService.save(bclqjbp);
@ -1131,12 +1145,20 @@ public class BomUploadServiceImpl {
qw.eq("dc_pl", e.getDcPlZ()); qw.eq("dc_pl", e.getDcPlZ());
qw.eq("dc_fd", StringUtils.isBlank(e.getWph()) ? "" : e.getWph().substring(0, 4)); qw.eq("dc_fd", StringUtils.isBlank(e.getWph()) ? "" : e.getWph().substring(0, 4));
dmCzplpNewService.update(qw); dmCzplpNewService.update(qw);
UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>(); // UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>();
qw1.set("jsq_tlt", DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); // qw1.set("jsq_tlt", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw1.eq("dc_ch", e.getDcChZ()); // qw1.eq("dc_ch", e.getDcChZ());
qw1.eq("dc_pl", e.getDcPlZ()); // qw1.eq("dc_pl", e.getDcPlZ());
qw1.eq("dc_fd", StringUtils.isBlank(e.getWph()) ? "" : e.getWph().substring(0, 4)); // qw1.eq("dc_fd", StringUtils.isBlank(e.getWph()) ? "" : e.getWph().substring(0, 4));
dmTzjhService.update(qw1); // dmTzjhService.update(qw1);
UpdateWrapper<PgdTzjh> qw1 = new UpdateWrapper<>();
qw1.set("tltjsrq", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw1.eq("czbh", e.getDcChZ());
qw1.eq("pl", e.getDcPlZ());
// qw1.eq("dc_fd", fd);
pgdTzjhService.update(qw1);
}); });
return map; return map;
} }
@ -1258,12 +1280,12 @@ public class BomUploadServiceImpl {
qw.eq("dc_pl", e.getDcPl()); qw.eq("dc_pl", e.getDcPl());
qw.eq("dc_fd", e.getDcFd()); qw.eq("dc_fd", e.getDcFd());
dmCzplpNewService.update(qw); dmCzplpNewService.update(qw);
UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>(); // UpdateWrapper<DmTzjh> qw1 = new UpdateWrapper<>();
qw1.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); // qw1.set("jsq_lqb", DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
qw1.eq("dc_ch", e.getDcCh()); // qw1.eq("dc_ch", e.getDcCh());
qw1.eq("dc_pl", e.getDcPl()); // qw1.eq("dc_pl", e.getDcPl());
qw1.eq("dc_fd", e.getDcFd()); // qw1.eq("dc_fd", e.getDcFd());
dmTzjhService.update(qw1); // dmTzjhService.update(qw1);
}); });
// 根据文件名字得到第二个- 进行拆分 // 根据文件名字得到第二个- 进行拆分
return map; return map;
@ -1796,6 +1818,11 @@ public class BomUploadServiceImpl {
String dcpl=dmBchxjbps.get(0).getDcPl(); String dcpl=dmBchxjbps.get(0).getDcPl();
Map rMap = new HashMap(); Map rMap = new HashMap();
List<DmBchxylp> tjListOld = bchxylpService.list(new QueryWrapper<DmBchxylp>().eq("dc_ch", dcch).eq("dc_pl", dcpl)); List<DmBchxylp> tjListOld = bchxylpService.list(new QueryWrapper<DmBchxylp>().eq("dc_ch", dcch).eq("dc_pl", dcpl));
List<DmBclqmxp> bclqmxpList = bclqmxpService.list(new QueryWrapper<DmBclqmxp>().eq("DC_CH_z", dcch)
.eq("DC_PL_z", dcpl)
);
List<DmYdjh> ydjhs = dmYdjhService.list(new QueryWrapper<DmYdjh>().eq("dc_ch", dcch ) List<DmYdjh> ydjhs = dmYdjhService.list(new QueryWrapper<DmYdjh>().eq("dc_ch", dcch )
.eq("dc_pl",dcpl) .eq("dc_pl",dcpl)
); );
@ -1824,6 +1851,11 @@ public class BomUploadServiceImpl {
//wpgg ,wpxh //wpgg ,wpxh
// DmBchxjbp dmBchxjbp = (DmBchxjbp) ObjConvertUtils.checkNullNew(dmBchxjbp1); // DmBchxjbp dmBchxjbp = (DmBchxjbp) ObjConvertUtils.checkNullNew(dmBchxjbp1);
DmBchxjbp dmBchxjbp = (DmBchxjbp) ObjConvertUtils.checkNullNew(dmBchxjbp1); DmBchxjbp dmBchxjbp = (DmBchxjbp) ObjConvertUtils.checkNullNew(dmBchxjbp1);
// 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());
List<DmBclqmxp> collect11 = bclqmxpList.stream().filter(fst -> fst.getWpgg().equals(dmBchxjbp1.getWpgg()) && fst.getWpxh().equals(dmBchxjbp1.getWpxh())).collect(Collectors.toList());
DmBchxmxp bchxmxp = mxs.stream().filter(fst -> fst.getHxbh().equals(dmBchxjbp.getHxbh())).findFirst().orElse(null); DmBchxmxp bchxmxp = mxs.stream().filter(fst -> fst.getHxbh().equals(dmBchxjbp.getHxbh())).findFirst().orElse(null);
DmBchxylp bchxylp = tjListOld.stream().filter(fst -> fst.getTzbh().equals(dmBchxjbp.getTzbh()) DmBchxylp bchxylp = tjListOld.stream().filter(fst -> fst.getTzbh().equals(dmBchxjbp.getTzbh())
&& fst.getWpgg().equalsIgnoreCase(dmBchxjbp.getWpgg()) && fst.getWpxh().equalsIgnoreCase(dmBchxjbp.getWpxh()) && fst.getWpgg().equalsIgnoreCase(dmBchxjbp.getWpgg()) && fst.getWpxh().equalsIgnoreCase(dmBchxjbp.getWpxh())
@ -1888,6 +1920,14 @@ public class BomUploadServiceImpl {
dmYdjh.setWpgg(dmBchxjbp.getWpgg()); dmYdjh.setWpgg(dmBchxjbp.getWpgg());
dmYdjh.setWpxh(dmBchxjbp.getWpxh()); dmYdjh.setWpxh(dmBchxjbp.getWpxh());
} }
if(collect11.size()>0){
dmYdjh.setBcylzl(null==collect11.get(0).getYlzl()? null:collect11.get(0).getYlzl().doubleValue());
dmYdjh.setBclqzl(null==collect11.get(0).getLqzl()? null:collect11.get(0).getLqzl().doubleValue());
dmYdjh.setBcshzl(null==collect11.get(0).getShzl()? null:collect11.get(0).getShzl().doubleValue());
dmYdjh.setBcljtlzl(null==collect11.get(0).getLjzl()? null:collect11.get(0).getLjzl().doubleValue());
dmYdjh.setBcqpyld(null==collect11.get(0).getQpyld()? null:collect11.get(0).getQpyld().doubleValue());
}
ups.add(dmYdjh); ups.add(dmYdjh);
ydjhs.remove(dmYdjh); // 从列表中移除找到的元素 ydjhs.remove(dmYdjh); // 从列表中移除找到的元素
@ -1909,7 +1949,13 @@ public class BomUploadServiceImpl {
} else if (tzbh.substring(4, 5).equals("N")) { } else if (tzbh.substring(4, 5).equals("N")) {
hxlx = "1020"; hxlx = "1020";
} }
if(collect11.size()>0) {
dmYdjh.setBcylzl(null == collect11.get(0).getYlzl() ? null : collect11.get(0).getYlzl().doubleValue());
dmYdjh.setBclqzl(null == collect11.get(0).getLqzl() ? null : collect11.get(0).getLqzl().doubleValue());
dmYdjh.setBcshzl(null == collect11.get(0).getShzl() ? null : collect11.get(0).getShzl().doubleValue());
dmYdjh.setBcljtlzl(null == collect11.get(0).getLjzl() ? null : collect11.get(0).getLjzl().doubleValue());
dmYdjh.setBcqpyld(null == collect11.get(0).getQpyld() ? null : collect11.get(0).getQpyld().doubleValue());
}
dmYdjh.setLqlb(hxlx); dmYdjh.setLqlb(hxlx);
dmYdjh.setTzbh(tzbh); dmYdjh.setTzbh(tzbh);
dmYdjh.setHxcd(dmBchxjbp.getHxcd().doubleValue()); dmYdjh.setHxcd(dmBchxjbp.getHxcd().doubleValue());
@ -1930,6 +1976,7 @@ public class BomUploadServiceImpl {
}else{ }else{
dmYdjh.setLx("B"); dmYdjh.setLx("B");
} }
dmYdjh.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4)); dmYdjh.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
dmYdjh.setBmxgrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm")); dmYdjh.setBmxgrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm"));
dmYdjh.setBmxgry((String) req.getAttribute("yhms")); dmYdjh.setBmxgry((String) req.getAttribute("yhms"));
@ -1967,7 +2014,13 @@ public class BomUploadServiceImpl {
if(null!=bchxylp){ if(null!=bchxylp){
dmYdjhadd.setYlbs( null==bchxylp.getSfyl()?"":bchxylp.getSfyl()); dmYdjhadd.setYlbs( null==bchxylp.getSfyl()?"":bchxylp.getSfyl());
} }
if(collect11.size()>0) {
dmYdjhadd.setBcylzl(null == collect11.get(0).getYlzl() ? null : collect11.get(0).getYlzl().doubleValue());
dmYdjhadd.setBclqzl(null == collect11.get(0).getLqzl() ? null : collect11.get(0).getLqzl().doubleValue());
dmYdjhadd.setBcshzl(null == collect11.get(0).getShzl() ? null : collect11.get(0).getShzl().doubleValue());
dmYdjhadd.setBcljtlzl(null == collect11.get(0).getLjzl() ? null : collect11.get(0).getLjzl().doubleValue());
dmYdjhadd.setBcqpyld(null == collect11.get(0).getQpyld() ? null : collect11.get(0).getQpyld().doubleValue());
}
dmYdjhadd.setLqlb(hxlx); dmYdjhadd.setLqlb(hxlx);
dmYdjhadd.setTzbh(tzbh); dmYdjhadd.setTzbh(tzbh);
dmYdjhadd.setHxcd(dmBchxjbp.getHxcd().doubleValue()); dmYdjhadd.setHxcd(dmBchxjbp.getHxcd().doubleValue());

Loading…
Cancel
Save