浏览代码

无周期设置默认值

luojun 2 年之前
父节点
当前提交
64118324a2

+ 5 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java

@@ -119,7 +119,12 @@ public class CoreSafecheckPlanController extends BaseController {
     @Log(title = "常规安全检查计划", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody CoreSafecheckPlan coreSafecheckPlan) throws Exception {
+
         Long planId = coreSafecheckPlan.getId();
+        //处理无周期
+        if(coreSafecheckPlan.getPlanCycle()==6){
+            coreSafecheckPlan.setBuildTaskNow(true);
+        }
         Long returnId = coreSafecheckPlanService.insertCoreSafecheckPlan(coreSafecheckPlan);
         //判断是否是编辑并且计划所属任务不存在已完成或者逾期,需要删除所有任务重新生成
         boolean isEditAll = coreSafecheckPlan.getHasEdit() == null && planId != null&&coreSafecheckPlan.isBuildTaskNow();