|
@@ -188,10 +188,16 @@ public class SpringBeanTaskDemo {
|
|
}
|
|
}
|
|
|
|
|
|
List<String> params = StrUtil.split(para.trim(), StrUtil.COMMA);
|
|
List<String> params = StrUtil.split(para.trim(), StrUtil.COMMA);
|
|
|
|
+
|
|
|
|
+ if (params.size() != 2){
|
|
|
|
+ log.error("参数错误");
|
|
|
|
+ return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
|
|
|
|
+ }
|
|
|
|
+
|
|
int period = Integer.parseInt(params.get(0));
|
|
int period = Integer.parseInt(params.get(0));
|
|
BigDecimal limit = new BigDecimal(params.get(1));
|
|
BigDecimal limit = new BigDecimal(params.get(1));
|
|
|
|
|
|
- if (period < 2) {
|
|
|
|
|
|
+ if (period < 1 || limit.doubleValue() < 0.01) {
|
|
log.error("参数错误");
|
|
log.error("参数错误");
|
|
return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
|
|
return HnqzQuartzEnum.JOB_LOG_STATUS_FAIL.getType();
|
|
}
|
|
}
|
|
@@ -201,26 +207,27 @@ public class SpringBeanTaskDemo {
|
|
LocalDateTime startTime = LocalDateTime.of(now.minusMonths(period), LocalTime.MIN);
|
|
LocalDateTime startTime = LocalDateTime.of(now.minusMonths(period), LocalTime.MIN);
|
|
LocalDateTime endTime = LocalDateTime.of(now, LocalTime.MIN).minusSeconds(1);
|
|
LocalDateTime endTime = LocalDateTime.of(now, LocalTime.MIN).minusSeconds(1);
|
|
|
|
|
|
- log.info("singleMemberSettleSameAmountInSeveralMonths开始于:{},输入参数{}", LocalDateTime.now(), para);
|
|
|
|
-
|
|
|
|
- List<SingleMemberSettleSameAmountInSeveralMonths> result = scorePackageSettleNoteService.singleMemberSettleSameAmountInSeveralMonths(startTime, endTime);
|
|
|
|
-
|
|
|
|
- if (CollUtil.isNotEmpty(result)) {
|
|
|
|
- List<SingleMemberSettleSameAmountInSeveralMonths> history = singleMemberSettleSameAmountInSeveralMonthsMapper.selectList(Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery().between(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIN), LocalDateTime.of(LocalDate.now(), LocalTime.MAX)));
|
|
|
|
- // 删除历史记录
|
|
|
|
- log.warn("删除当期的历史记录:{}", history);
|
|
|
|
- if (CollUtil.isNotEmpty(history)) {
|
|
|
|
- List<Integer> ids = history.stream().mapToInt(SingleMemberSettleSameAmountInSeveralMonths::getRecordId).boxed().collect(Collectors.toList());
|
|
|
|
- singleMemberSettleSameAmountInSeveralMonthsMapper.deleteBatchIds(ids);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- result.forEach(e -> {
|
|
|
|
- e.setPeriod(period);
|
|
|
|
- singleMemberSettleSameAmountInSeveralMonthsMapper.insert(e);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ log.info("singleMemberSettleAmountOverrunInSeveralMonths开始于:{},输入参数{}", LocalDateTime.now(), para);
|
|
|
|
+ //
|
|
|
|
+ // List<SingleMemberSettleSameAmountInSeveralMonths> result = scorePackageSettleNoteService.singleMemberSettleAmountOverrunInSeveralMonths(startTime, endTime, limit);
|
|
|
|
+ //
|
|
|
|
+ // if (CollUtil.isNotEmpty(result)) {
|
|
|
|
+ // List<SingleMemberSettleSameAmountInSeveralMonths> history = singleMemberSettleSameAmountInSeveralMonthsMapper.selectList(Wrappers.<SingleMemberSettleSameAmountInSeveralMonths>lambdaQuery().between(SingleMemberSettleSameAmountInSeveralMonths::getCreateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIN), LocalDateTime.of(LocalDate.now(), LocalTime.MAX)));
|
|
|
|
+ // // 删除历史记录
|
|
|
|
+ // log.warn("删除当期的历史记录:{}", history);
|
|
|
|
+ // if (CollUtil.isNotEmpty(history)) {
|
|
|
|
+ // List<Integer> ids = history.stream().mapToInt(SingleMemberSettleSameAmountInSeveralMonths::getRecordId).boxed().collect(Collectors.toList());
|
|
|
|
+ // singleMemberSettleSameAmountInSeveralMonthsMapper.deleteBatchIds(ids);
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // result.forEach(e -> {
|
|
|
|
+ // e.setPeriod(period);
|
|
|
|
+ // singleMemberSettleSameAmountInSeveralMonthsMapper.insert(e);
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
return HnqzQuartzEnum.JOB_LOG_STATUS_SUCCESS.getType();
|
|
return HnqzQuartzEnum.JOB_LOG_STATUS_SUCCESS.getType();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|