add:一楼管制增加包装关系校验
This commit is contained in:
@@ -18,6 +18,8 @@ import org.nl.b_lms.pda.service.PrintTableTwoService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinfoService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
|
||||
import org.nl.b_lms.sch.point.dto.BstIvtPackageinfoivtVO;
|
||||
@@ -83,6 +85,8 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
private PrintTableTwoService printTableTwoService;
|
||||
@Autowired
|
||||
private IPdmBiSlittingproductionplanService iPdmBiSlittingproductionplanService;
|
||||
@Autowired
|
||||
private IpdmBiSubpackagerelationService subpackagerelationService;
|
||||
|
||||
|
||||
|
||||
@@ -1001,6 +1005,13 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl<BstIvtPackagein
|
||||
result.put("message", "质检结果只能为合格品或管制品!");
|
||||
return result;
|
||||
}
|
||||
if (whereJson.getString("ivt_status").equals(PackageInfoIvtEnum.IVT_STATUS.code("管制品"))) {
|
||||
PdmBiSubpackagerelation one = subpackagerelationService.getOne(new QueryWrapper<PdmBiSubpackagerelation>()
|
||||
.eq("container_name", whereJson.getString("container_name")));
|
||||
if (one!=null){
|
||||
throw new BadRequestException("包装关系存在,请先解绑包装关系");
|
||||
}
|
||||
}
|
||||
dtoList = bstIvtPackageinfoivtMapper.selectList(new LambdaQueryWrapper<BstIvtPackageinfoivt>().eq(BstIvtPackageinfoivt::getContainer_name, whereJson.getString("container_name")));
|
||||
if (ObjectUtils.isEmpty(dtoList)) {
|
||||
throw new BadRequestException("子卷号或点位信息有误,请核对是否存在!");
|
||||
|
||||
Reference in New Issue
Block a user