|  | @ -786,6 +786,21 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public List<BaseDailyUrgingRecordDO> getUrgingList(String user,String dept,String code,String doctor,String reportId,String createUser,String startTime,String endTime){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String condition = "";
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(user)){
 | 
	
		
			
				|  |  |             List<BaseDoctorRoleDO> baseDoctorRoleDOS= doctorRoleDao.findByDoctorCode(user);
 | 
	
		
			
				|  |  |             boolean flag = true;
 | 
	
		
			
				|  |  |             for (BaseDoctorRoleDO roleDO:baseDoctorRoleDOS){
 | 
	
		
			
				|  |  |                 if (roleDO.getRoleCode().equalsIgnoreCase("admin")||roleDO.getRoleCode().equalsIgnoreCase("deptAdmin")){
 | 
	
		
			
				|  |  |                     flag = false;
 | 
	
		
			
				|  |  |                     break;
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (flag){
 | 
	
		
			
				|  |  |                 condition = " and ur.receive_doctor='"+user+"' ";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String sql = " select dict_value from wlyy_hospital_sys_dict where dict_name='BOOS_ADMIN_SENDER'  ";
 | 
	
		
			
				|  |  |         String sqlCondition = " ";
 | 
	
		
			
				|  |  |         String boosID = "";
 | 
	
	
		
			
				|  | @ -816,7 +831,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         sql = " select ur.* from base_daily_urging_record ur where 1=1 "+sqlCondition+"";
 | 
	
		
			
				|  |  |         sql = " select ur.* from base_daily_urging_record ur where 1=1 "+condition+sqlCondition+"";
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(user)){
 | 
	
		
			
				|  |  |             if (StringUtils.isNotBlank(user)&&!boosID.equals(user)){
 | 
	
		
			
				|  |  |                 sql +="UNION " +
 | 
	
	
		
			
				|  | @ -1497,15 +1512,36 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |         if (null!=readState){
 | 
	
		
			
				|  |  |             sqlCondition += " and de.doubt_read='"+readState+"' ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         sql = " select doc.name,dh.dept_code,dh.dept_name,d1.id,doc.job_title_name as jobTitleName,doc.photo,report_date reportDate,d1.state,total_hour,IF(SUM(de.doubt)>0,1,0) as doubt,de.doubt_read " +
 | 
	
		
			
				|  |  |         String condition = "";
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(user)){
 | 
	
		
			
				|  |  |             List<BaseDoctorRoleDO> baseDoctorRoleDOS= doctorRoleDao.findByDoctorCode(user);
 | 
	
		
			
				|  |  |             boolean flag = true;
 | 
	
		
			
				|  |  |             for (BaseDoctorRoleDO roleDO:baseDoctorRoleDOS){
 | 
	
		
			
				|  |  |                 if (roleDO.getRoleCode().equalsIgnoreCase("admin")||roleDO.getRoleCode().equalsIgnoreCase("deptAdmin")){
 | 
	
		
			
				|  |  |                     flag = false;
 | 
	
		
			
				|  |  |                     break;
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (flag){
 | 
	
		
			
				|  |  |                 condition = " and doc.id='"+user+"' ";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         sql = " select doc.name,dh.dept_code,dh.dept_name,d1.id,doc.job_title_name as jobTitleName,doc.photo,report_date reportDate,d1.state,total_hour," +
 | 
	
		
			
				|  |  |                 "\tdoubt_type AS doubtType,\n" +
 | 
	
		
			
				|  |  |                 "\tdoubt_state AS doubtState,\n" +
 | 
	
		
			
				|  |  |                 "\tdoubt_remark AS doubtRemark,\n" +
 | 
	
		
			
				|  |  |                 "\tremark,completion_schedule as completionSchedule,actual_completion_hour as actualCompletionHour,IF(SUM(de.doubt)>0,1,0) as doubt,de.doubt_read " +
 | 
	
		
			
				|  |  |                 "from base_doctor_daily_report_upload d1 INNER JOIN base_doctor doc on d1.doctor_id = doc.id " +
 | 
	
		
			
				|  |  |                 "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1  " +
 | 
	
		
			
				|  |  |                 "LEFT JOIN base_daily_report_detail de on d1.id = de.report_id " +
 | 
	
		
			
				|  |  |                 "where doc.del=1 and doc.identity=0 "+sqlCondition+" GROUP BY d1.id ";
 | 
	
		
			
				|  |  |                 "where doc.del=1 and doc.identity=0 "+sqlCondition+condition+" GROUP BY d1.id ";
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(user)&&!boosID.equals(user)){
 | 
	
		
			
				|  |  |             sql +=" UNION " +
 | 
	
		
			
				|  |  |                     "select doc.name,dh.dept_code,dh.dept_name,d1.id,doc.job_title_name as jobTitleName,doc.photo,report_date reportDate,d1.state,total_hour,IF(SUM(de.doubt)>0,1,0) as doubt,de.doubt_read " +
 | 
	
		
			
				|  |  |                     "select doc.name,dh.dept_code,dh.dept_name,d1.id,doc.job_title_name as jobTitleName,doc.photo,report_date reportDate,d1.state,total_hour," +
 | 
	
		
			
				|  |  |                     "\tdoubt_type AS doubtType,\n" +
 | 
	
		
			
				|  |  |                     "\tdoubt_state AS doubtState,\n" +
 | 
	
		
			
				|  |  |                     "\tdoubt_remark AS doubtRemark,\n" +
 | 
	
		
			
				|  |  |                     "\tremark,completion_schedule as completionSchedule,actual_completion_hour as actualCompletionHour,IF(SUM(de.doubt)>0,1,0) as doubt,de.doubt_read " +
 | 
	
		
			
				|  |  |                     "from base_doctor_daily_report_upload d1 INNER JOIN base_doctor doc on d1.doctor_id = doc.id " +
 | 
	
		
			
				|  |  |                     "INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1  " +
 | 
	
		
			
				|  |  |                     "LEFT JOIN base_daily_report_detail de on d1.id = de.report_id " +
 | 
	
	
		
			
				|  | @ -3993,7 +4029,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |             workDays = DateUtil.getWorkDays(startDate, endDate);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String shangchuanSql = " select distinct up.report_date from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |        /* String shangchuanSql = " select distinct up.report_date from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |                 " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                 "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                 "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
	
		
			
				|  | @ -4006,6 +4042,20 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |             if (!DateUtil.isHoliday(DateUtil.strToDate(tmp))){
 | 
	
		
			
				|  |  |                 shangchuanTotal++;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }*/
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String shangchuanSql = " select COUNT(DISTINCT up.id) as total from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |                 " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                 "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                 "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
		
			
				|  |  |                 "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
 | 
	
		
			
				|  |  |                 " "+sqlWhere;
 | 
	
		
			
				|  |  |         //只计算出工作日上传的数量去求未上传
 | 
	
		
			
				|  |  |         Map<String,Object> map= jdbcTemplate.queryForMap(shangchuanSql);
 | 
	
		
			
				|  |  |         Long shangchuanTotal = 0l;
 | 
	
		
			
				|  |  |         if (map!=null){
 | 
	
		
			
				|  |  |             String total = map.get("total").toString();
 | 
	
		
			
				|  |  |             shangchuanTotal = Long.parseLong(total);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Double acWorkHours = 0d;
 | 
	
	
		
			
				|  | @ -4036,37 +4086,61 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                 " "+sqlWhere;
 | 
	
		
			
				|  |  |         acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String doubtTypeSql = " select count(distinct rd.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |         String doubtTypeSql = " select count(distinct up.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |                 " from base_doctor_daily_report_upload up  " +
 | 
	
		
			
				|  |  |                 "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                 "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                 "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
		
			
				|  |  |                 "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
 | 
	
		
			
				|  |  |                 " "+sqlWhere+" and rd.doubt_type is not null group by rd.doubt_type";
 | 
	
		
			
				|  |  |                 "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 and up.state=1 where 1=1 " +
 | 
	
		
			
				|  |  |                 " "+sqlWhere+"  group by rd.doubt_type";
 | 
	
		
			
				|  |  |         List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
 | 
	
		
			
				|  |  |         String count = "";
 | 
	
		
			
				|  |  |         List<Map<String,Object>> doubtTypeList1 = new ArrayList<>();
 | 
	
		
			
				|  |  |         for (Map<String,Object>tmp:doubtTypeList){
 | 
	
		
			
				|  |  |             String doubtType = tmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |             if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                 tmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |             if (tmp.get("doubt_type")==null){
 | 
	
		
			
				|  |  |                 count = tmp.get("total").toString();
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 tmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                 String doubtType = tmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                 if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                     tmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     tmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 doubtTypeList1.add(tmp);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(count)){
 | 
	
		
			
				|  |  |             for (Map<String,Object>tmp:doubtTypeList1){
 | 
	
		
			
				|  |  |                 if (tmp.get("doubt_type")!=null){
 | 
	
		
			
				|  |  |                     String doubtType = tmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                     if (doubtType.equalsIgnoreCase("0")){
 | 
	
		
			
				|  |  |                         Integer count1 = Integer.parseInt(tmp.get("total").toString());
 | 
	
		
			
				|  |  |                         Integer count2 = Integer.parseInt(count);
 | 
	
		
			
				|  |  |                         tmp.put("total",count2+count1);
 | 
	
		
			
				|  |  |                         if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                             tmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             tmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<String> doubtListStr = doubtTypeList.stream().map(e -> e.get("doubt_type").toString()).collect(Collectors.toList());
 | 
	
		
			
				|  |  |         List<String> doubtListStr = doubtTypeList1.stream().map(e -> e.get("doubt_type").toString()).collect(Collectors.toList());
 | 
	
		
			
				|  |  |         for (String key:doubtTypeObj.keySet()){
 | 
	
		
			
				|  |  |             if (!doubtListStr.contains(key)){
 | 
	
		
			
				|  |  |                 Map<String,Object>tmp = new HashMap<>();
 | 
	
		
			
				|  |  |                 tmp.put("doubt_type",key);
 | 
	
		
			
				|  |  |                 tmp.put("doubtTypeName",doubtTypeObj.get(key));
 | 
	
		
			
				|  |  |                 tmp.put("total",0);
 | 
	
		
			
				|  |  |                 doubtTypeList.add(tmp);
 | 
	
		
			
				|  |  |                 doubtTypeList1.add(tmp);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         doubtTypeList.sort(Comparator.comparing(e->e.get("doubt_type").toString()));
 | 
	
		
			
				|  |  |         doubtTypeList1.sort(Comparator.comparing(e->e.get("doubt_type").toString()));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //员工离职or中途加入到项目中的会导致统计出来的数据发生变化
 | 
	
		
			
				|  |  |         result.put("weishangbao",((workDays*members-shangchuanTotal))<0?0:(workDays*members-shangchuanTotal));//未上报 工作日次数-总上报次数
 | 
	
		
			
				|  |  |         result.put("doubtList",doubtTypeList);
 | 
	
		
			
				|  |  |         result.put("doubtList",doubtTypeList1);
 | 
	
		
			
				|  |  |         result.put("urgingTotal",urgingTotal);//项目催促
 | 
	
		
			
				|  |  |         result.put("acWorkHours",acWorkHours);//实际工作时长
 | 
	
		
			
				|  |  |         result.put("needWorkHours",needWorkHours);//应工作时长
 | 
	
	
		
			
				|  | @ -4166,7 +4240,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //部门效能
 | 
	
		
			
				|  |  |         String deptListSql = " select distinct code,name from dict_hospital_dept ";
 | 
	
		
			
				|  |  |         String deptListSql = " select distinct code,name from dict_hospital_dept where 1=1 ";
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(dept)){
 | 
	
		
			
				|  |  |             deptListSql+=" and code='"+dept+"' ";
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -4195,7 +4269,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                 workDays = DateUtil.getWorkDays(startDate, endDate);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             String shangchuanSql = " select distinct up.report_date from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |             /*String shangchuanSql = " select distinct up.report_date from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |                     " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                     "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                     "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
	
		
			
				|  | @ -4208,6 +4282,19 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                 if (!DateUtil.isHoliday(DateUtil.strToDate(tmp))){
 | 
	
		
			
				|  |  |                     shangchuanTotal++;
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }*/
 | 
	
		
			
				|  |  |             String shangchuanSql = " select COUNT(DISTINCT up.id) as total from base_doctor_daily_report_upload up " +
 | 
	
		
			
				|  |  |                     " INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                     "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                     "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
		
			
				|  |  |                     "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
 | 
	
		
			
				|  |  |                     " "+sqlWhere;
 | 
	
		
			
				|  |  |             //只计算出工作日上传的数量去求未上传
 | 
	
		
			
				|  |  |             Map<String,Object> map= jdbcTemplate.queryForMap(shangchuanSql);
 | 
	
		
			
				|  |  |             Long shangchuanTotal = 0l;
 | 
	
		
			
				|  |  |             if (map!=null){
 | 
	
		
			
				|  |  |                 String total = map.get("total").toString();
 | 
	
		
			
				|  |  |                 shangchuanTotal = Long.parseLong(total);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             Double acWorkHours = 0d;
 | 
	
	
		
			
				|  | @ -4238,36 +4325,60 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                     " "+sqlWhere;
 | 
	
		
			
				|  |  |             acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             String doubtTypeSql = " select count(distinct rd.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |             String doubtTypeSql = " select count(distinct up.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |                     " from base_doctor_daily_report_upload up  " +
 | 
	
		
			
				|  |  |                     "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                     "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                     "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
		
			
				|  |  |                     "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
 | 
	
		
			
				|  |  |                     " "+sqlWhere+" and rd.doubt_type is not null group by rd.doubt_type";
 | 
	
		
			
				|  |  |                     "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 AND up.state = 1 where 1=1 " +
 | 
	
		
			
				|  |  |                     " "+sqlWhere+"  group by rd.doubt_type";
 | 
	
		
			
				|  |  |             List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
 | 
	
		
			
				|  |  |             for (Map<String,Object>tmp:doubtTypeList){
 | 
	
		
			
				|  |  |                 String doubtType = tmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                 if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                     tmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |             String count = "";
 | 
	
		
			
				|  |  |             List<Map<String,Object>> doubtTypeList1 = new ArrayList<>();
 | 
	
		
			
				|  |  |             for (Map<String,Object> doubtTmp:doubtTypeList){
 | 
	
		
			
				|  |  |                 if (doubtTmp.get("doubt_type")==null){
 | 
	
		
			
				|  |  |                     count = doubtTmp.get("total").toString();
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     tmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                     String doubtType = doubtTmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                     if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                         doubtTmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                     }else {
 | 
	
		
			
				|  |  |                         doubtTmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     doubtTypeList1.add(doubtTmp);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (StringUtils.isNoneBlank(count)){
 | 
	
		
			
				|  |  |                 for (Map<String,Object>doubtTmp:doubtTypeList1){
 | 
	
		
			
				|  |  |                     if (doubtTmp.get("doubt_type")!=null){
 | 
	
		
			
				|  |  |                         String doubtType = doubtTmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                         if (doubtType.equalsIgnoreCase("0")){
 | 
	
		
			
				|  |  |                             Integer count1 = Integer.parseInt(doubtTmp.get("total").toString());
 | 
	
		
			
				|  |  |                             Integer count2 = Integer.parseInt(count);
 | 
	
		
			
				|  |  |                             doubtTmp.put("total",count2+count1);
 | 
	
		
			
				|  |  |                             if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                                 doubtTmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                             }else {
 | 
	
		
			
				|  |  |                                 doubtTmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             List<String> doubtListStr = doubtTypeList.stream().map(e -> e.get("doubt_type").toString()).collect(Collectors.toList());
 | 
	
		
			
				|  |  |             List<String> doubtListStr = doubtTypeList1.stream().map(e -> e.get("doubt_type").toString()).collect(Collectors.toList());
 | 
	
		
			
				|  |  |             for (String key:doubtTypeObj.keySet()){
 | 
	
		
			
				|  |  |                 if (!doubtListStr.contains(key)){
 | 
	
		
			
				|  |  |                     Map<String,Object>tmp = new HashMap<>();
 | 
	
		
			
				|  |  |                     tmp.put("doubt_type",key);
 | 
	
		
			
				|  |  |                     tmp.put("doubtTypeName",doubtTypeObj.get(key));
 | 
	
		
			
				|  |  |                     tmp.put("total",0);
 | 
	
		
			
				|  |  |                     doubtTypeList.add(tmp);
 | 
	
		
			
				|  |  |                     doubtTypeList1.add(tmp);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             doubtTypeList.sort(Comparator.comparing(e->e.get("doubt_type").toString()));
 | 
	
		
			
				|  |  |             doubtTypeList1.sort(Comparator.comparing(e->e.get("doubt_type").toString()));
 | 
	
		
			
				|  |  |             //员工离职or中途加入到项目中的会导致统计出来的数据发生变化
 | 
	
		
			
				|  |  |             deptTmp.put("weishangbao",((workDays*members-shangchuanTotal))<0?0:(workDays*members-shangchuanTotal));//未上报 工作日次数-总上报次数
 | 
	
		
			
				|  |  |             deptTmp.put("doubtList",doubtTypeList);
 | 
	
		
			
				|  |  |             deptTmp.put("doubtList",doubtTypeList1);
 | 
	
		
			
				|  |  |             deptTmp.put("urgingTotal",urgingTotal);//项目催促
 | 
	
		
			
				|  |  |             result.put("acWorkHours",acWorkHours);//实际工作时长
 | 
	
		
			
				|  |  |             result.put("needWorkHours",needWorkHours);//应工作时长
 | 
	
	
		
			
				|  | @ -4303,7 +4414,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                 projectTmpSqlCondition += "  and dh.dept_code='"+dept+"' ";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             String projectItemSql = " select i.id,i.dept,i.dept_name deptName,i.project_code,CAST((sum(cast(IFNULL(de.actual_completion_hour,IFNULL(de.completion_hour,'0')) as decimal(18,2)))) as char ) as completionHour, " +
 | 
	
		
			
				|  |  |             String projectItemSql = " select i.id,i.dept,i.dept_name deptName,i.project_code,i.project_name,CAST((sum(cast(IFNULL(de.actual_completion_hour,IFNULL(de.completion_hour,'0')) as decimal(18,2)))) as char ) as completionHour, " +
 | 
	
		
			
				|  |  |                     " count(distinct up.doctor_id) as doctorTotal,i.begin_time,i.end_time,i.ac_begin_time, DATE_FORMAT(i.completion_time,'%Y-%m-%d %H:%i:%S') completion_time from base_daily_report_item i LEFT JOIN base_daily_report_detail de on i.id = de.report_item_id " +
 | 
	
		
			
				|  |  |                     " INNER JOIN base_doctor_daily_report_upload up on up.id = de.report_id INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                     "  INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1  where i.del=1 and i.project_code='"+projectCodeTmp+"'  "+projectTmpSqlCondition+" GROUP BY i.id  ";
 | 
	
	
		
			
				|  | @ -4322,21 +4433,53 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                 if (StringUtils.isNotBlank(dept)){//查询指定部门
 | 
	
		
			
				|  |  |                     itemTmpSqlCondition += "  and dh.dept_code='"+dept+"' ";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 String doubtTypeSql = " select count(distinct rd.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |                 String doubtTypeSql = " select count(distinct up.id) as total,rd.doubt_type " +
 | 
	
		
			
				|  |  |                         " from base_doctor_daily_report_upload up  " +
 | 
	
		
			
				|  |  |                         "INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
 | 
	
		
			
				|  |  |                         "Inner JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 " +
 | 
	
		
			
				|  |  |                         "LEFT JOIN base_daily_report_detail rd on up.id = rd.report_id " +
 | 
	
		
			
				|  |  |                         "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where i.id='"+projectItemCode+"' " +
 | 
	
		
			
				|  |  |                         " "+itemTmpSqlCondition+" and rd.doubt_type is not null group by rd.doubt_type";
 | 
	
		
			
				|  |  |                         "LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 AND up.state = 1 where i.id='"+projectItemCode+"' " +
 | 
	
		
			
				|  |  |                         " "+itemTmpSqlCondition+"  group by rd.doubt_type";
 | 
	
		
			
				|  |  |                 List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
 | 
	
		
			
				|  |  |                 for (Map<String,Object>doubtTmp:doubtTypeList){
 | 
	
		
			
				|  |  |                 /*for (Map<String,Object>doubtTmp:doubtTypeList){
 | 
	
		
			
				|  |  |                     String doubtType = doubtTmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                     if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                         doubtTmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                     }else {
 | 
	
		
			
				|  |  |                         doubtTmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }*/
 | 
	
		
			
				|  |  |                 String count = "";
 | 
	
		
			
				|  |  |                 List<Map<String,Object>> doubtTypeList1 = new ArrayList<>();
 | 
	
		
			
				|  |  |                 for (Map<String,Object> doubtTmp:doubtTypeList){
 | 
	
		
			
				|  |  |                     if (doubtTmp.get("doubt_type")==null){
 | 
	
		
			
				|  |  |                         count = doubtTmp.get("total").toString();
 | 
	
		
			
				|  |  |                     }else {
 | 
	
		
			
				|  |  |                         String doubtType = doubtTmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                         if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                             doubtTmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             doubtTmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         doubtTypeList1.add(doubtTmp);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (StringUtils.isNoneBlank(count)){
 | 
	
		
			
				|  |  |                     for (Map<String,Object>doubtTmp:doubtTypeList1){
 | 
	
		
			
				|  |  |                         if (doubtTmp.get("doubt_type")!=null){
 | 
	
		
			
				|  |  |                             String doubtType = doubtTmp.get("doubt_type").toString();
 | 
	
		
			
				|  |  |                             if (doubtType.equalsIgnoreCase("0")){
 | 
	
		
			
				|  |  |                                 Integer count1 = Integer.parseInt(doubtTmp.get("total").toString());
 | 
	
		
			
				|  |  |                                 Integer count2 = Integer.parseInt(count);
 | 
	
		
			
				|  |  |                                 doubtTmp.put("total",count2+count1);
 | 
	
		
			
				|  |  |                                 if(doubtTypeObj.containsKey(doubtType)){
 | 
	
		
			
				|  |  |                                     doubtTmp.put("doubtTypeName",doubtTypeObj.get(doubtType));
 | 
	
		
			
				|  |  |                                 }else {
 | 
	
		
			
				|  |  |                                     doubtTmp.put("doubtTypeName","其他");
 | 
	
		
			
				|  |  |                                 }
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 String urgingSql = " select count(id) from base_daily_urging_record where create_time>='"+startDate+"' and create_time<='"+startDate+"' " +
 | 
	
		
			
				|  |  |                         " and project_code='"+projectCodeTmp+"' and report_item_id='"+projectItemCode+"' ";
 | 
	
	
		
			
				|  | @ -4344,7 +4487,7 @@ public class DailyReportUploadService {
 | 
	
		
			
				|  |  |                     urgingSql +=" and dept='"+dept+"' ";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 Long urgingTotal = jdbcTemplate.queryForObject(urgingSql,Long.class);
 | 
	
		
			
				|  |  |                 itemTmp.put("doubtList",doubtTypeList);//各存疑类型
 | 
	
		
			
				|  |  |                 itemTmp.put("doubtList",doubtTypeList1);//各存疑类型
 | 
	
		
			
				|  |  |                 itemTmp.put("urgingTotal",urgingTotal);//项目催促
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             tmp.put("projectItemList",projectItemList);
 |