|
@ -2743,6 +2743,73 @@ public class StatisticsESService {
|
|
|
return new JSONArray(totalList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 团队报告--长处方
|
|
|
* @param startDate
|
|
|
* @param endDate
|
|
|
* @param adminTeamId
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Map<String,Object> getPrescriptionTotalCount(String startDate, String endDate, Integer adminTeamId)throws Exception{
|
|
|
//格式化时间
|
|
|
startDate = startDate +" 00:00:00";
|
|
|
endDate = endDate +" 23:59:59";
|
|
|
String index ="58";
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
//总数
|
|
|
List<SaveModel> totalList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2",null);
|
|
|
//进行中
|
|
|
List<SaveModel> processingList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2","1");
|
|
|
//已完成
|
|
|
List<SaveModel> finishedList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2","2");
|
|
|
//已经取消
|
|
|
List<SaveModel> canceledList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2","3");
|
|
|
//审核不通过
|
|
|
List<SaveModel> unPassList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2","4");
|
|
|
//其他原因取消
|
|
|
List<SaveModel> otherList = elasticsearchUtil.findListDateQuotaLevel0(startDate,endDate,String.valueOf(adminTeamId),Integer.valueOf(SaveModel.teamLevel),index,"2","5");
|
|
|
|
|
|
//总数
|
|
|
if(totalList!=null && totalList.size()>0){
|
|
|
rs.put("total",totalList.get(0).getResult2());
|
|
|
}else{
|
|
|
rs.put("total",0);
|
|
|
}
|
|
|
|
|
|
//进行中
|
|
|
if(processingList!=null && processingList.size()>0){
|
|
|
rs.put("processingCount",processingList.get(0).getResult2());
|
|
|
}else {
|
|
|
rs.put("processingCount", 0);
|
|
|
}
|
|
|
//已完成
|
|
|
if(finishedList!=null && finishedList.size()>0){
|
|
|
rs.put("finishCount",finishedList.get(0).getResult2());
|
|
|
}else {
|
|
|
rs.put("finishCount", 0);
|
|
|
}
|
|
|
//已取消
|
|
|
if(canceledList!=null && canceledList.size()>0){
|
|
|
rs.put("patientCancelCount",canceledList.get(0).getResult2());
|
|
|
}else {
|
|
|
rs.put("patientCancelCount", 0);
|
|
|
}
|
|
|
//审核不通过
|
|
|
if(unPassList!=null && unPassList.size()>0){
|
|
|
rs.put("noReviewedCount",unPassList.get(0).getResult2());
|
|
|
}else {
|
|
|
rs.put("noReviewedCount", 0);
|
|
|
}
|
|
|
//其他原因取消
|
|
|
if(otherList!=null && otherList.size()>0){
|
|
|
rs.put("payOuttimeCount",otherList.get(0).getResult2());
|
|
|
}else {
|
|
|
rs.put("payOuttimeCount", 0);
|
|
|
}
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getPrescriptionCount(int level,String area,String disease) throws Exception{
|
|
|
String index ="58";
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
@ -2762,31 +2829,31 @@ public class StatisticsESService {
|
|
|
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);
|
|
|
processingList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,"1");
|
|
|
}
|
|
|
//已完成
|
|
|
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);
|
|
|
finishedList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,"2");
|
|
|
}
|
|
|
//已经取消
|
|
|
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);
|
|
|
canceledList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,"3");
|
|
|
}
|
|
|
//审核不通过
|
|
|
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);
|
|
|
unPassList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,"4");
|
|
|
}
|
|
|
//其他原因取消
|
|
|
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);
|
|
|
otherList = elasticsearchUtil.findListDateQuotaLevel1(null,area,level,index,"2",null,"5");
|
|
|
}
|
|
|
|
|
|
//总数
|