feat: 内包间不套轴业务

This commit is contained in:
2024-06-23 14:50:50 +08:00
parent 74db7e79e0
commit c86ee18d3a

View File

@@ -117,9 +117,17 @@ public class SlitterServiceImpl implements SlitterService {
throw new BadRequestException("设备:{ " + deviceCode + " }对应的气胀轴尺寸不批对" +
",需要气胀轴尺寸:{ " + point.getQzz_size() + " },实际尺寸:{ " + size + " }");
}
List<String> tubes = Stream.of(point.getTube_code1(), point.getTube_code2())
.filter(ObjectUtil::isNotEmpty)
.collect(Collectors.toList());
// 判断是否存在纸管
List<MdPbPapervehicle> list = papervehicleService.list(new LambdaQueryWrapper<MdPbPapervehicle>()
.in(MdPbPapervehicle::getMaterial_code, tubes)
.gt(MdPbPapervehicle::getQty, 0));
// point.getTube_code1() 编码 getTube_name1() 纸制筒管|纸管|6英寸|1300 or 纸制筒管|纸管|3英寸|12|650
res.put("device_code", deviceCode);
res.put("data", con);
con.put("is_bushing", list.size() > 0 ? SlitterConstant.SLITTER_YES : SlitterConstant.SLITTER_NO);
con.put("left", point.getTube_code1());
con.put("leftSize", ObjectUtil.isNotEmpty(point.getTube_name1())
? point.getTube_name1().split("\\|")[2].charAt(0) : "");