|
|
@@ -186,7 +186,7 @@ public class ResumptionTaskBusiness extends TaskCreatingServiceImplBase<Resumpti
|
|
|
CycleCommonEnum cycle = CycleCommonEnum.getEnum(plan.getPlanCycle());
|
|
|
DateRange range = DateUtils.getStartAndEnd(workDate, cycle);
|
|
|
|
|
|
- List<Resumption> resumptionList = queryTask(range.getStartTime(), cycle, null, appPlans.stream().map(AppPlan::getId).collect(Collectors.toList()));
|
|
|
+ List<Resumption> resumptionList = queryTask(range.getStartTime(),range.getEndTime(), cycle, null, appPlans.stream().map(AppPlan::getId).collect(Collectors.toList()));
|
|
|
List<Long> deleteIds = resumptionList.stream()
|
|
|
.filter(r -> (ObjectUtil.equal(r.getStatus(), 1) || ObjectUtil.equal(r.getStatus(), 2)))
|
|
|
.map(Resumption::getId).collect(Collectors.toList());
|
|
|
@@ -290,7 +290,7 @@ public class ResumptionTaskBusiness extends TaskCreatingServiceImplBase<Resumpti
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void rebuildTask(List<Long> orgIds, Date startDate, Date endDate, CycleCommonEnum cycle, SysWorkTime workTime) {
|
|
|
- List<Resumption> resumptionList = queryTask(startDate, cycle, orgIds, null);
|
|
|
+ List<Resumption> resumptionList = queryTask(startDate,endDate, cycle, orgIds, null);
|
|
|
List<Long> deleteIds = resumptionList.stream()
|
|
|
.filter(r -> (ObjectUtil.equal(r.getStatus(), 1) || ObjectUtil.equal(r.getStatus(), 2)))
|
|
|
.map(Resumption::getId).collect(Collectors.toList());
|
|
|
@@ -447,9 +447,12 @@ public class ResumptionTaskBusiness extends TaskCreatingServiceImplBase<Resumpti
|
|
|
return resumptionList;
|
|
|
}
|
|
|
|
|
|
- private List<Resumption> queryTask(Date ymdDate, CycleCommonEnum cycle, List<Long> orgIds, List<Long> planIds) {
|
|
|
+ private List<Resumption> queryTask(Date startDate,Date endDate, CycleCommonEnum cycle, List<Long> orgIds, List<Long> planIds) {
|
|
|
QueryWrapper<Resumption> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.lambda().eq(Resumption::getYmdDate, ymdDate);
|
|
|
+ Date start=DateUtil.beginOfDay(startDate);
|
|
|
+ Date end=DateUtil.endOfDay(endDate);
|
|
|
+ queryWrapper.lambda().le(Resumption::getYmdDate, end);
|
|
|
+ queryWrapper.lambda().ge(Resumption::getYmdDate, start);
|
|
|
if (CollectionUtils.isNotEmpty(orgIds)) {
|
|
|
queryWrapper.lambda().in(Resumption::getOrgId, orgIds);
|
|
|
}
|