|
@ -14,6 +14,7 @@ import com.yihu.wlyy.repository.organization.HospitalDao;
|
|
|
import com.yihu.wlyy.repository.statistics.PopulationBaseDao;
|
|
|
import com.yihu.wlyy.repository.statistics.WlyyQuotaResultDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
import com.yihu.wlyy.service.system.SystemDictService;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
@ -52,6 +53,8 @@ public class StatisticsAllService extends BaseService {
|
|
|
private StringRedisTemplate redisTemplate;
|
|
|
@Autowired
|
|
|
private WlyyQuotaResultDao wlyyQuotaResultDao;
|
|
|
@Autowired
|
|
|
private SystemDictService systemDictService;
|
|
|
|
|
|
/**
|
|
|
* 获取时间戳
|
|
@ -562,7 +565,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if ((level == 4 && "1".equals(lowLevel)) || (level == 2)||(level == 3 && "1".equals(lowLevel))) {
|
|
|
if ((level == 4 && "1".equals(lowLevel)) || (level == 2) || (level == 3 && "1".equals(lowLevel))) {
|
|
|
translateTeamLeaderName(resultList);
|
|
|
}
|
|
|
|
|
@ -615,12 +618,16 @@ public class StatisticsAllService extends BaseService {
|
|
|
if (resultList == null || resultList.size() < 1) {
|
|
|
resultList = getLowLevelMapKey(level, low_level, area);
|
|
|
}
|
|
|
|
|
|
//获取目标量和团队的调控量
|
|
|
String signTaskNum = systemDictService.getDictValueNoRedis("SIGN_TASKNUM", year);//目标量
|
|
|
String signRegulationNum = systemDictService.getDictValueNoRedis("SIGN_TEAM_REGULATION_NUM", year);//调控量
|
|
|
if (resultList != null) {
|
|
|
DecimalFormat df = new DecimalFormat("0.0000");
|
|
|
for (int i = 0; i < resultList.size(); i++) {
|
|
|
Map<String, Object> map = resultList.get(i);
|
|
|
map.put("amount", map.get("amount") != null ? Long.valueOf(map.get("amount").toString()) : 0L);
|
|
|
map.put("signTaskNum",signTaskNum);//目标量
|
|
|
map.put("signRegulationNum",signRegulationNum);//调控量
|
|
|
|
|
|
if (!low_level.equals("1")) {
|
|
|
String code = map.get("code").toString();
|
|
@ -2524,7 +2531,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
if (rs != null && rs.size() > 0) {
|
|
|
for (Map<String, Object> r : rs) {
|
|
|
String id = (String) r.get("code");
|
|
|
String name = getTeamLeaderNameByTeamCode(leaders, Integer.parseInt(id));
|
|
|
String name = getTeamLeaderNameByTeamCode(leaders, Integer.parseInt(id));
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(name)) {
|
|
|
r.put("name", name);
|
|
|
}
|
|
@ -2734,11 +2741,11 @@ public class StatisticsAllService extends BaseService {
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Long.valueOf(map.get("amount").toString()) : 0L);
|
|
|
//获取去年签约的人数 默认是上个年度的最后一天
|
|
|
WlyyQuotaResult one=resultMap.get(map.get("code").toString());
|
|
|
WlyyQuotaResult one = resultMap.get(map.get("code").toString());
|
|
|
int signNum = 0;
|
|
|
int renewNum = renewMap.get(map.get("code").toString());
|
|
|
if(one!=null){
|
|
|
signNum=Integer.valueOf(one.getResult());
|
|
|
if (one != null) {
|
|
|
signNum = Integer.valueOf(one.getResult());
|
|
|
}
|
|
|
map.put("rate", getRange(renewNum, signNum, 2));//续签率是 续签量/去年的签约数
|
|
|
map.put("signNum", signNum);
|