|
@ -2321,7 +2321,7 @@ public class DailyReportUploadService {
|
|
/**
|
|
/**
|
|
* 管理员获取所有日报项目
|
|
* 管理员获取所有日报项目
|
|
*/
|
|
*/
|
|
public List<BaseDailyReportItemDO> findReportItemListAdmin(String user,String projectCode,String title,String content,Integer state,String begin_time,String end_time,String createUser,String createUserName) throws Exception {
|
|
|
|
|
|
public List<BaseDailyReportItemDO> findReportItemListAdmin(String user,String projectCode,String title,String content,Integer state,String begin_time,String end_time,String createUser,String createUserName,String dept) throws Exception {
|
|
String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
|
|
String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
|
|
List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
|
|
List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
|
|
if (userRoles.size()==0){
|
|
if (userRoles.size()==0){
|
|
@ -2353,6 +2353,9 @@ public class DailyReportUploadService {
|
|
if (StringUtils.isNotBlank(createUserName)){
|
|
if (StringUtils.isNotBlank(createUserName)){
|
|
sql += " and i.create_user_name like '%"+createUserName+"%' ";
|
|
sql += " and i.create_user_name like '%"+createUserName+"%' ";
|
|
}
|
|
}
|
|
|
|
if (StringUtils.isNotBlank(dept)){
|
|
|
|
sql += " and i.dept='"+dept+"' ";
|
|
|
|
}
|
|
itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
|
|
itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
|
|
for (BaseDailyReportItemDO tmp:itemDOS){
|
|
for (BaseDailyReportItemDO tmp:itemDOS){
|
|
List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
|
|
List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
|
|
@ -3423,7 +3426,7 @@ public class DailyReportUploadService {
|
|
startDateTmp = DateUtil.strToDate(startResult.get(0));
|
|
startDateTmp = DateUtil.strToDate(startResult.get(0));
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
sql = " select min(begin_time) from base_daily_report_item where begin_time is not null ";
|
|
|
|
|
|
sql = " select min(begin_time) from base_daily_report_item where begin_time is not null and del=1 ";
|
|
if (StringUtils.isNotBlank(projectCode)){
|
|
if (StringUtils.isNotBlank(projectCode)){
|
|
sql += " and project_code='"+projectCode+"' ";
|
|
sql += " and project_code='"+projectCode+"' ";
|
|
}
|
|
}
|
|
@ -3483,7 +3486,7 @@ public class DailyReportUploadService {
|
|
" INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
" 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 " +
|
|
"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_detail rd on up.id = rd.report_id " +
|
|
"inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
|
|
|
|
"LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
"and DATE_FORMAT(up.report_date,'%w') BETWEEN 1 and 5 "+sqlWhere;
|
|
"and DATE_FORMAT(up.report_date,'%w') BETWEEN 1 and 5 "+sqlWhere;
|
|
//只计算出周一到周五上传的数量去求未上传
|
|
//只计算出周一到周五上传的数量去求未上传
|
|
|
|
|
|
@ -3514,7 +3517,7 @@ public class DailyReportUploadService {
|
|
"INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
"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 " +
|
|
"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_detail rd on up.id = rd.report_id " +
|
|
" inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
|
|
|
|
" LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
" "+sqlWhere;
|
|
" "+sqlWhere;
|
|
acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
|
|
acWorkHours = jdbcTemplate.queryForObject(acWorkHoursSql,Double.class);
|
|
|
|
|
|
@ -3523,7 +3526,7 @@ public class DailyReportUploadService {
|
|
"INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
"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 " +
|
|
"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_detail rd on up.id = rd.report_id " +
|
|
"inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
|
|
|
|
"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";
|
|
" "+sqlWhere+" and rd.doubt_type is not null group by rd.doubt_type";
|
|
List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
|
|
List<Map<String,Object>> doubtTypeList = jdbcTemplate.queryForList(doubtTypeSql);
|
|
for (Map<String,Object>tmp:doubtTypeList){
|
|
for (Map<String,Object>tmp:doubtTypeList){
|
|
@ -3558,7 +3561,7 @@ public class DailyReportUploadService {
|
|
"INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
"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 " +
|
|
"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_detail rd on up.id = rd.report_id " +
|
|
"inner join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
|
|
|
|
"LEFT join base_daily_report_item i on i.id = rd.report_item_id and i.del=1 where 1=1 " +
|
|
" "+sqlWhere+" group by doctor_duty_code ";
|
|
" "+sqlWhere+" group by doctor_duty_code ";
|
|
|
|
|
|
List<Map<String,Object>> doctorTypeHourList = jdbcTemplate.queryForList(doctorTypeSql);
|
|
List<Map<String,Object>> doctorTypeHourList = jdbcTemplate.queryForList(doctorTypeSql);
|
|
@ -3794,7 +3797,7 @@ public class DailyReportUploadService {
|
|
"DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
|
|
"DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
|
|
" CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt', " +
|
|
" CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt', " +
|
|
" rd.doubt_type doubtType, rd.remark " +
|
|
" rd.doubt_type doubtType, rd.remark " +
|
|
"from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
|
|
|
|
"from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id " +
|
|
"INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN " +
|
|
"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 " +
|
|
"base_daily_report_detail rd on up.id = rd.report_id " +
|
|
"LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
|
|
"LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
|
|
@ -3853,7 +3856,7 @@ public class DailyReportUploadService {
|
|
"DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
|
|
"DATE_FORMAT(rd.create_time,'%Y-%m-%d %H:%i:%S') create_time,DATE_FORMAT(rd.verification_time,'%Y-%m-%d %H:%i:%S') verification_time," +
|
|
" CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt'," +
|
|
" CASE rd.state WHEN 1 THEN '已核实' ELSE '未核实' END as 'verification_state',rd.verification_user_name,CASE rd.doubt WHEN 1 THEN '存疑' ELSE '无存疑' END as 'doubt'," +
|
|
" rd.doubt_type doubtType, rd.remark " +
|
|
" rd.doubt_type doubtType, rd.remark " +
|
|
"from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
|
|
|
|
|
|
"from base_doctor_daily_report_upload up INNER JOIN base_doctor doc on up.doctor_id = doc.id " +
|
|
"INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1 LEFT JOIN " +
|
|
"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 " +
|
|
"base_daily_report_detail rd on up.id = rd.report_id " +
|
|
"LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
|
|
"LEFT JOIN base_daily_report_item it on rd.report_item_id = it.id " +
|
|
@ -4023,7 +4026,75 @@ public class DailyReportUploadService {
|
|
JSONObject tmp = JSONObject.parseObject(dictValues.get(0));
|
|
JSONObject tmp = JSONObject.parseObject(dictValues.get(0));
|
|
doubtTypeObj = tmp.getJSONObject("dailyReportDoubtTypeName");
|
|
doubtTypeObj = tmp.getJSONObject("dailyReportDoubtTypeName");
|
|
}
|
|
}
|
|
|
|
Set<String> resultTimeList = new HashSet<>();
|
|
|
|
Date startDateTmp = DateUtil.strToDate(startDate);
|
|
|
|
Date endDateTmp = DateUtil.strToDate(endDate);
|
|
|
|
|
|
|
|
for (;!startDateTmp.after(endDateTmp);){
|
|
|
|
resultTimeList.add(DateUtil.dateToStr(startDateTmp,DateUtil.YYYY_MM_DD));
|
|
|
|
startDateTmp = DateUtil.getNextDay1(startDateTmp,1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(userCompleteList.size()>0){
|
|
|
|
String doctorTmp = null;
|
|
|
|
String doctorNameTmp = null;
|
|
|
|
String deptNameTmp = null;
|
|
|
|
String jobTitleNameTmp = null;
|
|
|
|
Set searchTimeList = new HashSet();
|
|
|
|
List<Map<String,Object>> notReportList = new ArrayList<>();
|
|
|
|
|
|
|
|
for(Map<String,Object>tmp:userCompleteList){
|
|
|
|
String doctorId = null==tmp.get("doctor_id")?"":tmp.get("doctor_id").toString();
|
|
|
|
String reportDate = null==tmp.get("report_date")?"":tmp.get("report_date").toString();
|
|
|
|
String doctorName = null==tmp.get("doctor_name")?"":tmp.get("doctor_name").toString();
|
|
|
|
String deptName = null==tmp.get("dept_name")?"":tmp.get("dept_name").toString();
|
|
|
|
String jobTitleName = null==tmp.get("job_title_name")?"":tmp.get("job_title_name").toString();
|
|
|
|
if(StringUtils.isBlank(doctorTmp)){
|
|
|
|
doctorTmp = doctorId;
|
|
|
|
doctorNameTmp = doctorName;
|
|
|
|
deptNameTmp = deptName;
|
|
|
|
jobTitleNameTmp = jobTitleName;
|
|
|
|
}
|
|
|
|
if (!doctorTmp.equals(doctorId)){
|
|
|
|
for (String tmpTime:resultTimeList){
|
|
|
|
if (!searchTimeList.contains(tmpTime)){
|
|
|
|
Map<String,Object> notReportObj = new HashMap<>();
|
|
|
|
notReportObj.put("doctor_id",doctorTmp);
|
|
|
|
notReportObj.put("report_date",tmpTime);
|
|
|
|
notReportObj.put("doctor_name",doctorNameTmp);
|
|
|
|
notReportObj.put("dept_name",deptNameTmp);
|
|
|
|
notReportObj.put("job_title_name",jobTitleNameTmp);
|
|
|
|
notReportObj.put("week_name",DateUtil.getWeekStr(tmpTime));
|
|
|
|
notReportList.add(notReportObj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
searchTimeList = new HashSet();
|
|
|
|
searchTimeList.add(reportDate);
|
|
|
|
doctorTmp = doctorId;
|
|
|
|
doctorNameTmp = doctorName;
|
|
|
|
deptNameTmp = deptName;
|
|
|
|
jobTitleNameTmp = jobTitleName;
|
|
|
|
}else {
|
|
|
|
searchTimeList.add(reportDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (String tmpTime:resultTimeList){
|
|
|
|
if (!searchTimeList.contains(tmpTime)){
|
|
|
|
Map<String,Object> notReportObj = new HashMap<>();
|
|
|
|
notReportObj.put("doctor_id",doctorTmp);
|
|
|
|
notReportObj.put("report_date",tmpTime);
|
|
|
|
notReportObj.put("doctor_name",doctorNameTmp);
|
|
|
|
notReportObj.put("dept_name",deptNameTmp);
|
|
|
|
notReportObj.put("job_title_name",jobTitleNameTmp);
|
|
|
|
notReportObj.put("week_name",DateUtil.getWeekStr(tmpTime));
|
|
|
|
notReportList.add(notReportObj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userCompleteList.addAll(notReportList);
|
|
|
|
}
|
|
|
|
|
|
|
|
userCompleteList.sort(Comparator.comparing(e->((Map<String,Object>)e).get("dept_name").toString()).reversed().thenComparing(e->((Map<String,Object>)e).get("doctor_id").toString()).thenComparing(e->((Map<String,Object>)e).get("report_date").toString()));
|
|
WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
|
|
WritableWorkbook wwb = jxl.Workbook.createWorkbook(os);
|
|
WritableSheet sheet = wwb.createSheet("sheet", 1);
|
|
WritableSheet sheet = wwb.createSheet("sheet", 1);
|
|
String[] header = {"员工完成情况("+startDate+"至"+endDate+")","","","","","","","","","","","","","","","","","",""};//
|
|
String[] header = {"员工完成情况("+startDate+"至"+endDate+")","","","","","","","","","","","","","","","","","",""};//
|