|
@@ -17,12 +17,15 @@ import com.boman.system.api.RemoteDeptService;
|
|
import com.boman.system.api.RemoteDictDataService;
|
|
import com.boman.system.api.RemoteDictDataService;
|
|
import com.boman.web.core.domain.VaccineInfoOperation;
|
|
import com.boman.web.core.domain.VaccineInfoOperation;
|
|
import com.boman.web.core.domain.VaccineInfoUser;
|
|
import com.boman.web.core.domain.VaccineInfoUser;
|
|
|
|
+import com.boman.web.core.mapper.StandardlyMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoOperationMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoOperationMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoUserMapper;
|
|
import com.boman.web.core.mapper.VaccineInfoUserMapper;
|
|
|
|
+import com.boman.web.core.service.save.IBaseSaveService;
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoUserService;
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoUserService;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
|
|
+import com.boman.web.core.utils.IdUtils;
|
|
import com.boman.web.core.utils.VaccineUtils;
|
|
import com.boman.web.core.utils.VaccineUtils;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -34,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.Size;
|
|
import javax.validation.constraints.Size;
|
|
|
|
+import java.sql.Timestamp;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -67,6 +71,10 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
private RemoteDictDataService remoteDictDataService;
|
|
private RemoteDictDataService remoteDictDataService;
|
|
@Resource
|
|
@Resource
|
|
private RemoteDeptService remoteDeptService;
|
|
private RemoteDeptService remoteDeptService;
|
|
|
|
+ @Resource
|
|
|
|
+ private IBaseSaveService saveService;
|
|
|
|
+ @Resource
|
|
|
|
+ private StandardlyMapper standardlyMapper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询疫苗信息
|
|
* 查询疫苗信息
|
|
@@ -406,7 +414,7 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
* @param jici
|
|
* @param jici
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- private String getIsSuccess(String vaccineName, String jici) {
|
|
|
|
|
|
+ public static String getIsSuccess(String vaccineName, String jici) {
|
|
if ("北京科兴中维".equals(vaccineName)) {
|
|
if ("北京科兴中维".equals(vaccineName)) {
|
|
if ("2".equals(jici)) {
|
|
if ("2".equals(jici)) {
|
|
return "是";
|
|
return "是";
|
|
@@ -884,6 +892,7 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
|
|
+ @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
|
|
public AjaxResult statistic() {
|
|
public AjaxResult statistic() {
|
|
List<JSONObject> result = new ArrayList<>(17);
|
|
List<JSONObject> result = new ArrayList<>(17);
|
|
List<SysDept> allTowns = remoteDeptService.getByParentId(1L);
|
|
List<SysDept> allTowns = remoteDeptService.getByParentId(1L);
|
|
@@ -893,7 +902,8 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
long l = System.currentTimeMillis();
|
|
long l = System.currentTimeMillis();
|
|
List<VaccineInfoOperation> infoList = vaccineInfoMapper.listByTotalTaskCnt();
|
|
List<VaccineInfoOperation> infoList = vaccineInfoMapper.listByTotalTaskCnt();
|
|
LOGGER.info("查询用时: {} s", (System.currentTimeMillis() - l) / 1000);
|
|
LOGGER.info("查询用时: {} s", (System.currentTimeMillis() - l) / 1000);
|
|
-
|
|
|
|
|
|
+ // 暂且如此
|
|
|
|
+ standardlyMapper.updateAll();
|
|
Date todayStart = DateUtils.getTodayStart(), todayEnd = DateUtils.getTodayEnd();
|
|
Date todayStart = DateUtils.getTodayStart(), todayEnd = DateUtils.getTodayEnd();
|
|
for (String townName : townNameList) {
|
|
for (String townName : townNameList) {
|
|
int zrws = 0, zjzs = 0, drrws = 0, drjzs = 0, dez = 0, dsz = 0;
|
|
int zrws = 0, zjzs = 0, drrws = 0, drjzs = 0, dez = 0, dsz = 0;
|
|
@@ -946,6 +956,12 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
jsonObject.put("wcl2", NumberUtils.percent(dez + dsz, drjzs));
|
|
jsonObject.put("wcl2", NumberUtils.percent(dez + dsz, drjzs));
|
|
LOGGER.info("疫苗接种统计数据为: {}", JSON.toJSONString(jsonObject));
|
|
LOGGER.info("疫苗接种统计数据为: {}", JSON.toJSONString(jsonObject));
|
|
result.add(jsonObject);
|
|
result.add(jsonObject);
|
|
|
|
+ jsonObject.put("create_time", new Timestamp(System.currentTimeMillis()));
|
|
|
|
+ jsonObject.put("update_time", new Timestamp(System.currentTimeMillis()));
|
|
|
|
+ jsonObject.put("update_by", SecurityUtils.getUsername());
|
|
|
|
+ Long maxId = IdUtils.getMaxId("vaccination_statistic", "id");
|
|
|
|
+ jsonObject.put("id", maxId);
|
|
|
|
+ saveService.insertRow("vaccination_statistic", jsonObject);
|
|
}
|
|
}
|
|
|
|
|
|
return AjaxResult.success("成功", result);
|
|
return AjaxResult.success("成功", result);
|
|
@@ -962,4 +978,13 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<JSONObject> list() {
|
|
|
|
+ String deptName = AuthUtils.getLoginUser().getSysUser().getDept().getDeptName();
|
|
|
|
+ if("潜山市".equals(deptName)){
|
|
|
|
+ return standardlyMapper.list();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return standardlyMapper.list1(deptName);
|
|
|
|
+ }
|
|
}
|
|
}
|