|
|
@@ -154,31 +154,8 @@ public class ApiPlanController {
|
|
|
//判断是否是编辑并且计划所属任务不存在已完成或者逾期,需要删除所有任务重新生成
|
|
|
boolean isEditAll = info.getHasEdit() == null && info.getId() != null;
|
|
|
//如果计划所属机构类型为行社并且勾选立即执行,新增的时候立即生成任务
|
|
|
- if ((info.getId() == null &&planOfOrgType!=null&& planOfOrgType == 3 && info.getBuildTaskNow() == 1) || isEditAll) {
|
|
|
-// DateTime datetime = new DateTime();
|
|
|
-// datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
-// //当有周期存在时保持原有接口不变(doTask),否则按照新的接口创建
|
|
|
-// Integer plancycle = info.getPlanCycle();
|
|
|
-// if (plancycle != null) {
|
|
|
-// if (plancycle == 2) {
|
|
|
-// taskBusiness.syncDay(datetime, plancycle);
|
|
|
-// }
|
|
|
-// if (plancycle == 3) {
|
|
|
-// taskBusiness.syncWeek(datetime, plancycle);
|
|
|
-// }
|
|
|
-// if (plancycle == 4) {
|
|
|
-// taskBusiness.syncMonth(datetime, plancycle);
|
|
|
-// }
|
|
|
-// if (plancycle == 5) {
|
|
|
-// taskBusiness.syncQuarter(datetime, plancycle);
|
|
|
-// }
|
|
|
-// if (plancycle == 6) {
|
|
|
-// taskBusiness.syncHalfYear(datetime, plancycle);
|
|
|
-// }
|
|
|
-// if (plancycle == 7) {
|
|
|
-// taskBusiness.syncYear(datetime, plancycle);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if ( isEditAll) {
|
|
|
+
|
|
|
//如果编辑
|
|
|
List<AppPlan> list = appPlanService.list(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()).eq(AppPlan::getDeleted, 0));
|
|
|
list.add(plan);
|