Min 10 月之前
父節點
當前提交
f642cf1cc9

+ 2 - 2
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -632,11 +632,11 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                         if(one!=null){
                         if(one!=null){
                             plan.setId(one.getId());
                             plan.setId(one.getId());
                         }
                         }
-                        Optional<Plan> first = needInsertList.stream().filter(nl -> nl.getProductSchedulingNum().equals(productSchedulingNumCell.getStringCellValue())).findFirst();
+                        Optional<Plan> first = needInsertList.stream().filter(nl -> nl.getProductSchedulingNum().equals(productSchedulingNumCell.getStringCellValue())&&nl.getProductOrderNum().equals(productOrderNumCell.getStringCellValue())).findFirst();
                         if(first.isPresent()){
                         if(first.isPresent()){
                             throw new Exception("重复的排产工单号"+productSchedulingNumCell.getStringCellValue());
                             throw new Exception("重复的排产工单号"+productSchedulingNumCell.getStringCellValue());
                         }
                         }
-                        Integer count = planMapper.selectCount(new LambdaQueryWrapper<Plan>().eq(Plan::getProductSchedulingNum, productSchedulingNumCell.getStringCellValue()));
+                        Integer count = planMapper.selectCount(new LambdaQueryWrapper<Plan>().eq(Plan::getProductSchedulingNum, productSchedulingNumCell.getStringCellValue()).eq(Plan::getProductOrderNum,productOrderNumCell.getStringCellValue()));
                         if(count>0){
                         if(count>0){
                             throw new Exception("已存在的排产工单号"+productSchedulingNumCell.getStringCellValue());
                             throw new Exception("已存在的排产工单号"+productSchedulingNumCell.getStringCellValue());
                         }
                         }