|
|
@@ -161,6 +161,10 @@ public class RepeatTaskGenerator {
|
|
|
.eq(Task::getTitle, template.getTitle())
|
|
|
.eq(Task::getChildId, template.getChildId())
|
|
|
.eq(Task::getFamilyId, template.getFamilyId())
|
|
|
+ // 必须排除模板行本身:模板的 createdAt 落在当天窗口内,
|
|
|
+ // 若不排除,新建模板当天会被自身判重命中,导致首个实例永不生成
|
|
|
+ // ("采购完成即激活服务任务"在方案批准当天失效,次日才自愈)
|
|
|
+ .eq(Task::getIsTemplate, 0)
|
|
|
.ge(Task::getCreatedAt, date)
|
|
|
.lt(Task::getCreatedAt, windowEnd)
|
|
|
);
|