Ver Fonte

调整计划

luojun há 2 anos atrás
pai
commit
e945ee04ce

+ 4 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -159,11 +159,13 @@ public class ApiPlanController {
             AppPlan plan = null;
             plan = appPlanService.getById(info.getId());
             Long planOfOrgType = null;
-            planOfOrgType = plan.getPlanOfOrgType();
+            if(info.getId()!=null) {
+                planOfOrgType = plan.getPlanOfOrgType();
+            }
             //判断是否是编辑并且计划所属任务不存在已完成或者逾期,需要删除所有任务重新生成
             boolean isEditAll = info.getHasEdit() == null && info.getId() != null;
             //如果计划所属机构类型为行社并且勾选立即执行,新增的时候立即生成任务
-            if ((info.getId() == null && planOfOrgType == 3 && info.getBuildTaskNow() == 1) || isEditAll) {
+            if ((info.getId() == null &&planOfOrgType!=null&& planOfOrgType == 3 && info.getBuildTaskNow() == 1) || isEditAll) {
 //                    DateTime datetime = new DateTime();
 //                    datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
 //                    //当有周期存在时保持原有接口不变(doTask),否则按照新的接口创建