|
@ -30,6 +30,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
@ -2651,18 +2652,48 @@ public class StatisticsESService {
|
|
|
public Map<String,Object> getPrescriptionCount(int level,String area,String disease) throws Exception{
|
|
|
String index ="58";
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
List<SaveModel> totalList = null;
|
|
|
List<SaveModel> processingList = null;
|
|
|
List<SaveModel> finishedList = null;
|
|
|
List<SaveModel> canceledList = null;
|
|
|
List<SaveModel> unPassList = null;
|
|
|
List<SaveModel> otherList = null;
|
|
|
//总数
|
|
|
List<SaveModel> totalList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
totalList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}else{
|
|
|
totalList = elasticsearchUtil.findListDateQuotaLevel0(null,area,level,index,"2",null);
|
|
|
}
|
|
|
//进行中
|
|
|
List<SaveModel> processingList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"1");
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
processingList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"1");
|
|
|
}else{
|
|
|
processingList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}
|
|
|
//已完成
|
|
|
List<SaveModel> finishedList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"2");
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
finishedList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"2");
|
|
|
}else{
|
|
|
finishedList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}
|
|
|
//已经取消
|
|
|
List<SaveModel> canceledList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"3");
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
canceledList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"3");
|
|
|
}else{
|
|
|
canceledList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}
|
|
|
//审核不通过
|
|
|
List<SaveModel> unPassList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"4");
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
unPassList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"4");
|
|
|
}else{
|
|
|
unPassList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}
|
|
|
//其他原因取消
|
|
|
List<SaveModel> otherList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"5");
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
otherList = elasticsearchUtil.findListDateQuotaLevel2(null,area,level,index,"2",null,disease,"5");
|
|
|
}else{
|
|
|
otherList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,disease);
|
|
|
}
|
|
|
|
|
|
//总数
|
|
|
if(totalList!=null && totalList.size()>0){
|
|
@ -2738,9 +2769,153 @@ public class StatisticsESService {
|
|
|
startDate = elasticsearchUtil.changeTime(startDate + " 00:00:00");
|
|
|
endDate = elasticsearchUtil.changeTime(endDate + " 23:59:59");
|
|
|
Integer interval = Integer.parseInt(type)+2;
|
|
|
|
|
|
//签入统计
|
|
|
List<SaveModel> inData = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.parseInt(SaveModel.teamLevel),"34","2",interval+"");
|
|
|
Map<String, Object> map = null;
|
|
|
List<Map<String, Object>> inList = new ArrayList<>();
|
|
|
for(SaveModel one:inData){
|
|
|
map = new HashMap<>();
|
|
|
if ("0".equals(type)) {
|
|
|
map.put("dateNo",dateFormat.format(one.getQuotaDate()));
|
|
|
}else{
|
|
|
map.put("weekOfMonth",DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
|
|
|
}
|
|
|
map.put("inCount",one.getResult2().longValue());
|
|
|
inList.add(map);
|
|
|
}
|
|
|
|
|
|
//签出统计
|
|
|
List<SaveModel> outData = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.parseInt(SaveModel.teamLevel),"35","2",interval+"");
|
|
|
return null;
|
|
|
List<Map<String, Object>> outList = new ArrayList<>();
|
|
|
for(SaveModel one:outData){
|
|
|
map = new HashMap<>();
|
|
|
if ("0".equals(type)) {
|
|
|
map.put("dateNo",dateFormat.format(one.getQuotaDate()));
|
|
|
}else{
|
|
|
map.put("weekOfMonth",DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
|
|
|
}
|
|
|
map.put("outCount",one.getResult2().longValue());
|
|
|
outList.add(map);
|
|
|
}
|
|
|
JSONObject rs = new JSONObject();
|
|
|
rs.put("inLine", inList);
|
|
|
rs.put("outLine", outList);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
public List<Map<String,Object>> getPrescriptionAgeLowLevel(String level,String lowlevel,String area,String disease) throws Exception{
|
|
|
|
|
|
String quotaDate = elasticsearchUtil.getQuotaTime();
|
|
|
List<SaveModel> list = elasticsearchUtil.findListDateQuotaLevel1(quotaDate,area,Integer.parseInt(level),"58","2",lowlevel,disease);
|
|
|
Map<String, Object> map = null;
|
|
|
List<Map<String, Object>> rs = new ArrayList<>();
|
|
|
if(list.size()>0){
|
|
|
for(SaveModel one:list){
|
|
|
map = new HashMap<>();
|
|
|
if(Integer.parseInt(lowlevel)>=Integer.parseInt(level)){
|
|
|
lowlevel = String.valueOf(Integer.parseInt(level)+1);
|
|
|
}
|
|
|
if(SaveModel.townLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getTown());
|
|
|
map.put("name",one.getTownName());
|
|
|
}else if(SaveModel.OrgLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getHospital());
|
|
|
map.put("name",one.getHospitalName());
|
|
|
}else if(SaveModel.teamLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getTeam());
|
|
|
map.put("name",one.getTeamName());
|
|
|
}
|
|
|
map.put("val",one.getResult2().longValue());
|
|
|
}
|
|
|
}else{
|
|
|
|
|
|
//统计数据为空时,自建结果集
|
|
|
List<Town> townList = null;
|
|
|
List<Hospital> hospitalList = null;
|
|
|
List<AdminTeam> adminTeams = null;
|
|
|
if(SaveModel.cityLevel.equals(level)){
|
|
|
townList = townDao.findByCityCode(area);
|
|
|
hospitalList = hospitalDao.findByCity(area);
|
|
|
adminTeams = findAllTeam();
|
|
|
}else if(SaveModel.townLevel.equals(level)){
|
|
|
hospitalList = hospitalDao.findByTownCode(area);
|
|
|
// adminTeams = adminTeamDao.findByTownCode(area);
|
|
|
adminTeams = findAllTeam();
|
|
|
}else if(SaveModel.OrgLevel.equals(level)){
|
|
|
adminTeams = adminTeamDao.findByOrgCode(area);
|
|
|
}
|
|
|
if(SaveModel.townLevel.equals(lowlevel)){
|
|
|
for(Town one : townList){
|
|
|
map.put("code",one.getCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}else if(SaveModel.OrgLevel.equals(lowlevel)){
|
|
|
for(Hospital one : hospitalList){
|
|
|
map.put("code",one.getCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}else if(SaveModel.teamLevel.equals(lowlevel)){
|
|
|
for(AdminTeam one : adminTeams){
|
|
|
map.put("code",one.getLeaderCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
rs.add(map);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 得到全部团队
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
private List<AdminTeam> findAllTeam() {
|
|
|
String sql = "SELECT " +
|
|
|
" wat.id id, " +
|
|
|
" wat.name name, " +
|
|
|
" h.`code` org_code, " +
|
|
|
" h.`name` org_name, " +
|
|
|
" h.town town_code, " +
|
|
|
" h.town_name town_name " +
|
|
|
"FROM " +
|
|
|
" dm_hospital h, " +
|
|
|
" wlyy_admin_team wat " +
|
|
|
"WHERE " +
|
|
|
" h.`code` = wat.org_code " +
|
|
|
"AND wat.available = 1";
|
|
|
List<AdminTeam> adminTeams = jdbcTemplate.query(sql, new BeanPropertyRowMapper(AdminTeam.class));
|
|
|
return adminTeams;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getPrescriptionAgeHistogram(String level,String area,String disease) throws Exception{
|
|
|
|
|
|
String quotaDate = elasticsearchUtil.getQuotaTime();
|
|
|
//统计年龄分布
|
|
|
List<SaveModel> list = elasticsearchUtil.findOneDateQuotaLevel2(quotaDate,area,Integer.parseInt(level),"60","2",disease);
|
|
|
//获取总人数
|
|
|
String sql = " SELECT COUNT(1) AS num FROM ( SELECT DISTINCT p.patient FROM wlyy_prescription p ) a ";
|
|
|
Map<String, Object> count = jdbcTemplate.queryForMap(sql);
|
|
|
Long num = (Long)count.get("num");
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
DecimalFormat decimalFormat=new DecimalFormat("0.00");//构造方法的字符格式这里如果小数不足2位,会以0补足.
|
|
|
Double ageRate = list.get(0).getResult2()/num;
|
|
|
map.put("0ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(1).getResult2()/num;
|
|
|
map.put("7ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(2).getResult2()/num;
|
|
|
map.put("19ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(3).getResult2()/num;
|
|
|
map.put("31ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(4).getResult2()/num;
|
|
|
map.put("51ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(5).getResult2()/num;
|
|
|
map.put("65ageRate",decimalFormat.format(ageRate));
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -2748,11 +2923,11 @@ public class StatisticsESService {
|
|
|
* @param level 等级
|
|
|
* @param area 等级编码
|
|
|
* @param disease 疾病编码
|
|
|
* @param type 类型1.总量,2.已完成,3.居民取消,4.审核不通过,5.进行中,6.其他原因取消
|
|
|
* @param type 类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> getPrescriptionTotalHistogram(int level,String area,String disease,String type) throws Exception{
|
|
|
String index ="60";
|
|
|
String index ="58";
|
|
|
List<Map<String,Object>> rs =new ArrayList<>();
|
|
|
|
|
|
Calendar dd = Calendar.getInstance();//定义日期实例
|
|
@ -2771,25 +2946,12 @@ public class StatisticsESService {
|
|
|
String startTime = DateUtil.dateToStr(dd.getTime(),"YYYY-MM-dd HH:mm:ss");
|
|
|
String endTime = DateUtil.dateToStr(new Date(),"YYYY-MM-dd HH:mm:ss");
|
|
|
List<SaveModel> resultList = new ArrayList<>();
|
|
|
//类型1.总量,2.已完成,3.居民取消,4.审核不通过,5.进行中,6.其他原因取消
|
|
|
//类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
|
|
|
if("1".equals(type)){
|
|
|
//总数
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel1(null,null,area,level,index,"2","3",disease);
|
|
|
}else if("2".equals(type)){
|
|
|
//进行中
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,"1");
|
|
|
}else if("3".equals(type)){
|
|
|
//已完成
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,"2");
|
|
|
}else if("4".equals(type)){
|
|
|
//已经取消
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,"3");
|
|
|
}else if("5".equals(type)){
|
|
|
//审核不通过
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,"4");
|
|
|
}else if("6".equals(type)){
|
|
|
//其他原因取消
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,"5");
|
|
|
}else{
|
|
|
resultList = elasticsearchUtil.findLineChartDateQuotaLevel2(null,null,area,level,index,"2","3",disease,type);
|
|
|
}
|
|
|
|
|
|
for(Map<String,Object> m:rs){
|
|
@ -2805,4 +2967,200 @@ public class StatisticsESService {
|
|
|
}
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* @param level 等级 1 省 2 市 3 区县 4 机构 5团队
|
|
|
* @param lowlevel 等级 1 省 2 市 3 区县 4 机构 5团队
|
|
|
* @param area
|
|
|
* @param disease
|
|
|
* @param type 0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> getPrescriptionTotalLowLevel(int level,String lowlevel,String area,String disease,String type)throws Exception{
|
|
|
String quotaDate = elasticsearchUtil.getQuotaTime();
|
|
|
String index = "58";
|
|
|
List<SaveModel> saveModels = new ArrayList<>();
|
|
|
List<Map<String, Object>> rs = new ArrayList<>();
|
|
|
//一级维度
|
|
|
if (StringUtils.isNotBlank(disease)){
|
|
|
//类型 0.总量,1.已完成,2.居民取消,3.审核不通过,4.进行中,5.其他原因取消
|
|
|
if("1".equals(type)){
|
|
|
saveModels = elasticsearchUtil.findListDateQuotaLevel0(quotaDate,area,level,index,"2",lowlevel);
|
|
|
}else {
|
|
|
saveModels = elasticsearchUtil.findListDateQuotaLevel1(quotaDate,area,level,index,"2",lowlevel,type);
|
|
|
}
|
|
|
}else{
|
|
|
//类型0.总量,1.进行中,2.已完成,3.居民取消,4.审核不通过,5.其他原因取消
|
|
|
if("1".equals(type)){
|
|
|
saveModels = elasticsearchUtil.findListDateQuotaLevel1(quotaDate,area,level,index,"2",lowlevel,disease);
|
|
|
}else {
|
|
|
saveModels = elasticsearchUtil.findListDateQuotaLevel2(quotaDate,area,level,index,"2",lowlevel,disease,type);
|
|
|
}
|
|
|
}
|
|
|
if ("5".equals(lowlevel)){
|
|
|
translateTeamLeaderName2(saveModels);
|
|
|
}
|
|
|
Map<String, Object> map = null;
|
|
|
if(saveModels.size()>0){
|
|
|
for(SaveModel one:saveModels){
|
|
|
map = new HashMap<>();
|
|
|
if(Integer.parseInt(lowlevel)>=level){
|
|
|
lowlevel = String.valueOf(level+1);
|
|
|
}
|
|
|
if(SaveModel.townLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getTown());
|
|
|
map.put("name",one.getTownName());
|
|
|
}else if(SaveModel.OrgLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getHospital());
|
|
|
map.put("name",one.getHospitalName());
|
|
|
}else if(SaveModel.teamLevel.equals(lowlevel)){
|
|
|
map.put("code",one.getTeam());
|
|
|
map.put("name",one.getTeamName());
|
|
|
}
|
|
|
map.put("val",one.getResult2().longValue());
|
|
|
}
|
|
|
}else{
|
|
|
|
|
|
//统计数据为空时,自建结果集
|
|
|
// List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
// resultList = getLowLevelMapKey(level, lowlevel, area);
|
|
|
List<Town> townList = null;
|
|
|
List<Hospital> hospitalList = null;
|
|
|
List<AdminTeam> adminTeams = null;
|
|
|
if(SaveModel.cityLevel.equals(level)){
|
|
|
townList = townDao.findByCityCode(area);
|
|
|
hospitalList = hospitalDao.findByCity(area);
|
|
|
adminTeams = findAllTeam();
|
|
|
}else if(SaveModel.townLevel.equals(level)){
|
|
|
hospitalList = hospitalDao.findByTownCode(area);
|
|
|
adminTeams = adminTeamDao.findByTownCode(area);
|
|
|
}else if(SaveModel.OrgLevel.equals(level)){
|
|
|
adminTeams = adminTeamDao.findByOrgCode(area);
|
|
|
}
|
|
|
if(SaveModel.townLevel.equals(lowlevel)){
|
|
|
for(Town one : townList){
|
|
|
map.put("code",one.getCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}else if(SaveModel.OrgLevel.equals(lowlevel)){
|
|
|
for(Hospital one : hospitalList){
|
|
|
map.put("code",one.getCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}else if(SaveModel.teamLevel.equals(lowlevel)){
|
|
|
for(AdminTeam one : adminTeams){
|
|
|
map.put("code",one.getLeaderCode());
|
|
|
map.put("name",one.getName());
|
|
|
map.put("val",0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
rs.add(map);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
public List<SaveModel> translateTeamLeaderName2(List<SaveModel> rs) {
|
|
|
Map<Integer, Map<String, Object>> leaders = getAllTeamLeaders();
|
|
|
if (rs != null && rs.size() > 0) {
|
|
|
for (SaveModel saveModel : rs) {
|
|
|
Integer id = Integer.valueOf(saveModel.getTeam());
|
|
|
String name = getTeamLeaderNameByTeamCode(leaders, id);
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(name)) {
|
|
|
saveModel.setTeamName(name);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*各个年龄段的总数
|
|
|
* @param level
|
|
|
* @param area
|
|
|
* @param disease
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String,Object> getPrescriptionAgeTotal(String level,String area,String disease) throws Exception{
|
|
|
|
|
|
String quotaDate = elasticsearchUtil.getQuotaTime();
|
|
|
//统计年龄分布
|
|
|
List<SaveModel> list = elasticsearchUtil.findOneDateQuotaLevel2(quotaDate,area,Integer.parseInt(level),"60","2",disease);
|
|
|
|
|
|
//总数量
|
|
|
SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(quotaDate,area,Integer.parseInt(level),"60","2");
|
|
|
|
|
|
Double num = saveModel.getResult2();
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
DecimalFormat decimalFormat=new DecimalFormat("0.00");//构造方法的字符格式这里如果小数不足2位,会以0补足.
|
|
|
Double ageRate = list.get(0).getResult2()/num;
|
|
|
map.put("0ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(1).getResult2()/num;
|
|
|
map.put("7ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(2).getResult2()/num;
|
|
|
map.put("19ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(3).getResult2()/num;
|
|
|
map.put("31ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(4).getResult2()/num;
|
|
|
map.put("51ageRate",decimalFormat.format(ageRate));
|
|
|
ageRate = list.get(5).getResult2()/num;
|
|
|
map.put("65ageRate",decimalFormat.format(ageRate));
|
|
|
|
|
|
map.put("0age",list.get(0).getResult2().longValue());
|
|
|
map.put("7age",list.get(1).getResult2().longValue());
|
|
|
map.put("19age",list.get(2).getResult2().longValue());
|
|
|
map.put("31age",list.get(3).getResult2().longValue());
|
|
|
map.put("51age",list.get(4).getResult2().longValue());
|
|
|
map.put("65age",list.get(5).getResult2().longValue());
|
|
|
map.put("total",saveModel.getResult2().longValue());
|
|
|
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getPrescriptionDispatchingTotal(int level,String area,String disease)throws Exception{
|
|
|
List<SaveModel> seltList = null;//自取集合
|
|
|
List<SaveModel> deliveryList = null;//物流配送集合
|
|
|
List<SaveModel> healthDoctorList = null;//健管师配送集合
|
|
|
|
|
|
if(StringUtils.isNotBlank(disease)){
|
|
|
//自取
|
|
|
seltList = elasticsearchUtil.findListDateQuotaLevel2("",area,level,"62","2","","1",disease);
|
|
|
//物流配送
|
|
|
deliveryList = elasticsearchUtil.findListDateQuotaLevel2("",area,level,"62","2","","2",disease);
|
|
|
//健管师配送
|
|
|
healthDoctorList = elasticsearchUtil.findListDateQuotaLevel2("",area,level,"62","2","","2",disease);
|
|
|
}else{
|
|
|
//自取
|
|
|
seltList = elasticsearchUtil.findListDateQuotaLevel1("",area,level,"62","2","","1");
|
|
|
//物流配送
|
|
|
deliveryList = elasticsearchUtil.findListDateQuotaLevel1("",area,level,"62","2","","2");
|
|
|
//健管师配送
|
|
|
healthDoctorList = elasticsearchUtil.findListDateQuotaLevel1("",area,level,"62","2","","2");
|
|
|
}
|
|
|
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
//自取数目
|
|
|
if(seltList!=null && seltList.size()>0){
|
|
|
rs.put("seltTotal",seltList.get(0).getResult2());
|
|
|
}else{
|
|
|
rs.put("seltTotal",0);
|
|
|
}
|
|
|
|
|
|
//快递配送
|
|
|
if(deliveryList!=null && deliveryList.size()>0){
|
|
|
rs.put("deliveryTotal",deliveryList.get(0).getResult2());
|
|
|
}else{
|
|
|
rs.put("deliveryTotal",0);
|
|
|
}
|
|
|
|
|
|
//健管师配送
|
|
|
if(healthDoctorList!=null && healthDoctorList.size()>0){
|
|
|
rs.put("doctorTotal",healthDoctorList.get(0).getResult2());
|
|
|
}else{
|
|
|
rs.put("doctorTotal",0);
|
|
|
}
|
|
|
return rs;
|
|
|
}
|
|
|
}
|