|
@ -2725,7 +2725,7 @@ public class DailyReportUploadService {
|
|
|
throw new Exception("导出失败,请检查传入参数");
|
|
|
}
|
|
|
//项目耗时情况
|
|
|
sql = " select CONCAT(it.title,'(',i.dept_name,')') title,it.content,sum(IFNULL(pd.actual_completion_hour,IFNULL(pd.completion_hour,0))) 'completion_hour' ," +
|
|
|
sql = " select CONCAT(it.title,'(',it.dept_name,')') title,it.content,sum(IFNULL(pd.actual_completion_hour,IFNULL(pd.completion_hour,0))) 'completion_hour' ," +
|
|
|
" CASE it.state WHEN 1 THEN '已完成' ELSE '未完成' END as 'state',DATE_FORMAT(it.create_time,'%Y-%m-%d %H:%i:%S') create_time,it.create_user_name " +
|
|
|
"from base_daily_report_item it LEFT JOIN base_daily_report_detail pd " +
|
|
|
"on it.id = pd.report_item_id " +
|
|
@ -2746,7 +2746,7 @@ public class DailyReportUploadService {
|
|
|
"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 it on rd.report_item_id = it.id " +
|
|
|
"where 1=1 and rd.create_time>='"+startTime+"' and rd.create_time<='"+endTime+"' " ;
|
|
|
"where 1=1 and up.create_time>='"+startTime+"' and up.create_time<='"+endTime+"' " ;
|
|
|
if (!adminFlag){
|
|
|
sql +=" and up.doctor_id in ( select distinct dh2.doctor_code from base_doctor_hospital dh " +
|
|
|
"INNER JOIN base_doctor_hospital dh2 on dh.dept_code = dh2.dept_code " +
|
|
@ -2805,7 +2805,7 @@ public class DailyReportUploadService {
|
|
|
"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 it on rd.report_item_id = it.id " +
|
|
|
"where 1=1 and rd.create_time>='"+startTime+"' and rd.create_time<='"+endTime+"' " ;
|
|
|
"where 1=1 and up.create_time>='"+startTime+"' and up.create_time<='"+endTime+"' " ;
|
|
|
if (!adminFlag){
|
|
|
sql +=" and up.doctor_id in ( select distinct dh2.doctor_code from base_doctor_hospital dh " +
|
|
|
"INNER JOIN base_doctor_hospital dh2 on dh.dept_code = dh2.dept_code " +
|