|
@@ -896,8 +896,8 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
@Override
|
|
|
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
|
|
|
public AjaxResult statistic() {
|
|
|
- List<JSONObject> result = new ArrayList<>(17);
|
|
|
List<SysDept> allTowns = remoteDeptService.getByParentId(1L);
|
|
|
+ List<JSONObject> result = new ArrayList<>(allTowns.size());
|
|
|
List<String> townNameList = ObjectUtils.map(allTowns, SysDept::getDeptName);
|
|
|
|
|
|
LOGGER.info("开始查询");
|
|
@@ -905,7 +905,7 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
List<VaccineInfoOperation> infoList = vaccineInfoMapper.listByTotalTaskCnt();
|
|
|
LOGGER.info("查询用时: {} s", (System.currentTimeMillis() - l) / 1000);
|
|
|
// 暂且如此
|
|
|
- standardlyMapper.updateAll();
|
|
|
+ standardlyMapper.updateAll(SecurityUtils.getUsername());
|
|
|
Date todayStart = DateUtils.getTodayStart(), todayEnd = DateUtils.getTodayEnd();
|
|
|
for (String townName : townNameList) {
|
|
|
int zrws = 0, zjzs = 0, drrws = 0, drjzs = 0, dez = 0, dsz = 0;
|
|
@@ -941,7 +941,7 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
// 接种时间和接种疫苗种类判断 当日任务数
|
|
|
if (null != vaccinationTime) {
|
|
|
String vaccineName = info.getVaccineName();
|
|
|
- judgeTodayTask(vaccineName, vaccinationTime, drrws, todayStart, todayEnd);
|
|
|
+ drrws = judgeTodayTask(vaccineName, vaccinationTime, drrws, todayStart, todayEnd);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -969,15 +969,17 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
return AjaxResult.success("成功", result);
|
|
|
}
|
|
|
|
|
|
- private void judgeTodayTask(String vaccineName, Date vaccinationTime, int drrws, Date todayStart, Date todayEnd) {
|
|
|
+ private int judgeTodayTask(String vaccineName, Date vaccinationTime, int drrws, Date todayStart, Date todayEnd) {
|
|
|
Date nextTime = VaccineUtils.getNextTime(vaccineName, vaccinationTime);
|
|
|
if (nextTime == null) {
|
|
|
- return;
|
|
|
+ return drrws;
|
|
|
}
|
|
|
|
|
|
if (nextTime.before(todayEnd) && nextTime.after(todayStart)) {
|
|
|
drrws++;
|
|
|
}
|
|
|
+
|
|
|
+ return drrws;
|
|
|
}
|
|
|
|
|
|
@Override
|