|
|
@@ -6,7 +6,7 @@ import com.xjrsoft.module.student.dto.EnrollmentStatisticsCalendarInfoDto;
|
|
|
import com.xjrsoft.module.student.dto.EnrollmentStatisticsGraduationInfoDto;
|
|
|
import com.xjrsoft.module.student.dto.EnrollmentStatisticsInfoDto;
|
|
|
import com.xjrsoft.module.student.entity.EnrollmentStatisticsInfo;
|
|
|
-import com.xjrsoft.module.student.mapper.EnrollmentStatisticsInfoMapper;
|
|
|
+import com.xjrsoft.module.student.service.IEnrollmentStatisticsInfoService;
|
|
|
import com.xjrsoft.module.student.service.IPbCseFeeobjupdateService;
|
|
|
import com.xjrsoft.module.student.vo.EnrollmentStatisticsCalendarInfoVo;
|
|
|
import com.xjrsoft.module.student.vo.EnrollmentStatisticsGraduationInfoVo;
|
|
|
@@ -39,15 +39,15 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
private IPbCseFeeobjupdateService pbCseFeeobjupdateService;
|
|
|
|
|
|
@Autowired
|
|
|
- private EnrollmentStatisticsInfoMapper enrollmentStatisticsInfoMapper;
|
|
|
+ private IEnrollmentStatisticsInfoService enrollmentStatisticsInfoService;
|
|
|
|
|
|
- @Async
|
|
|
- @Scheduled(cron = "00 0/20 * * * ?")
|
|
|
- public void execute() {
|
|
|
- doExecute();
|
|
|
- }
|
|
|
+// @Async
|
|
|
+// @Scheduled(cron = "00 0/20 * * * ?")
|
|
|
+// public void execute() {
|
|
|
+// doExecute(pbCseFeeobjupdateService, enrollmentStatisticsInfoService);
|
|
|
+// }
|
|
|
|
|
|
- void doExecute() {
|
|
|
+ public void doExecute(IPbCseFeeobjupdateService pbCseFeeobjupdateService, IEnrollmentStatisticsInfoService enrollmentStatisticsInfoService) {
|
|
|
LocalDate now = LocalDate.now();
|
|
|
String dataDate = now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
EnrollmentStatisticsInfoDto dto = new EnrollmentStatisticsInfoDto();
|
|
|
@@ -55,7 +55,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
dto.setYear(now.getYear() + "");
|
|
|
EnrollmentStatisticsInfoVo info = pbCseFeeobjupdateService.getEnrollmentStatisticsInfo(dto);
|
|
|
if(info != null){
|
|
|
- enrollmentStatisticsInfoMapper.deleteDataByDate(dataDate);
|
|
|
+ enrollmentStatisticsInfoService.deleteDataByDate(dataDate);
|
|
|
EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
|
|
|
infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
|
|
|
infoData.setDeleteMark(DeleteMark.NODELETE.getCode());
|
|
|
@@ -64,7 +64,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
infoData.setDataJson(JsonUtil.toJsonString(info));
|
|
|
infoData.setDataType(1);
|
|
|
infoData.setDataDay(now);
|
|
|
- enrollmentStatisticsInfoMapper.insert(infoData);
|
|
|
+ enrollmentStatisticsInfoService.save(infoData);
|
|
|
}
|
|
|
|
|
|
EnrollmentStatisticsGraduationInfoDto graduationInfoDto = new EnrollmentStatisticsGraduationInfoDto();
|
|
|
@@ -72,7 +72,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
EnrollmentStatisticsGraduationInfoVo graduationInfo = pbCseFeeobjupdateService.getEnrollmentStatisticsGraduationInfo(graduationInfoDto);
|
|
|
|
|
|
if(graduationInfo != null){
|
|
|
- enrollmentStatisticsInfoMapper.deleteGraduationDataByDate(dataDate);
|
|
|
+ enrollmentStatisticsInfoService.deleteGraduationDataByDate(dataDate);
|
|
|
|
|
|
EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
|
|
|
infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
|
|
|
@@ -82,7 +82,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
infoData.setDataJson(JsonUtil.toJsonString(graduationInfo));
|
|
|
infoData.setDataType(2);
|
|
|
infoData.setDataDay(now);
|
|
|
- enrollmentStatisticsInfoMapper.insert(infoData);
|
|
|
+ enrollmentStatisticsInfoService.save(infoData);
|
|
|
}
|
|
|
|
|
|
LocalDate thisSaturday = now.with(TemporalAdjusters.nextOrSame(DayOfWeek.SATURDAY));
|
|
|
@@ -98,7 +98,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
EnrollmentStatisticsCalendarInfoVo calendarInfoVo = pbCseFeeobjupdateService.getEnrollmentStatisticsCalendarInfo(calendarInfoDto);
|
|
|
|
|
|
if(calendarInfoVo != null){
|
|
|
- enrollmentStatisticsInfoMapper.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
|
|
|
+ enrollmentStatisticsInfoService.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
|
|
|
|
|
|
EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
|
|
|
infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
|
|
|
@@ -110,7 +110,7 @@ public class EnrollmentStatisticsInfoTask {
|
|
|
infoData.setDataStartDay(lastSunday);
|
|
|
infoData.setDataEndDay(thisSaturday);
|
|
|
infoData.setDataDay(now);
|
|
|
- enrollmentStatisticsInfoMapper.insert(infoData);
|
|
|
+ enrollmentStatisticsInfoService.save(infoData);
|
|
|
}
|
|
|
}
|
|
|
}
|