소스 검색

河南郸城调度计划 是否触发保存条件传递逻辑优化

1037015548@qq.com 11 달 전
부모
커밋
ad37a8412f
1개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 8 6
      src/main/java/com/shkpr/service/aimodelpower/dbdao/services/WODispatchPlanDBServiceImpl.java

+ 8 - 6
src/main/java/com/shkpr/service/aimodelpower/dbdao/services/WODispatchPlanDBServiceImpl.java

@@ -262,12 +262,14 @@ public class WODispatchPlanDBServiceImpl implements WODispatchPlanDBService,WODi
         woDispatchPlanMapper.updateWiths(upMap,andWhereUp,new HashMap<>(),"");
 
         //TODO 先删除所有关联再添加
-        Map<String,Object> andWhereRuls = new HashMap<>();
-        andWhereRuls.put("plan_id",model.getPlanId());
-        woDispatchPlanRulsMapper.deleteWiths(andWhereRuls,new HashMap<>(),"");
-        Map<String,Object> andWherePlanTags = new HashMap<>();
-        andWherePlanTags.put("plan_id",model.getPlanId());
-        woDispatchPlanTagsMapper.deleteWiths(andWherePlanTags,new HashMap<>(),"");
+        if(model.getChufaRulsFlag()!=-1) {
+            Map<String, Object> andWhereRuls = new HashMap<>();
+            andWhereRuls.put("plan_id", model.getPlanId());
+            woDispatchPlanRulsMapper.deleteWiths(andWhereRuls, new HashMap<>(), "");
+            Map<String, Object> andWherePlanTags = new HashMap<>();
+            andWherePlanTags.put("plan_id", model.getPlanId());
+            woDispatchPlanTagsMapper.deleteWiths(andWherePlanTags, new HashMap<>(), "");
+        }
         //删除排班
         Map<String,Object> andWheresItems = new HashMap<>();
         andWheresItems.put("plan_id",model.getPlanId());