|
@ -2483,7 +2483,7 @@ public class StatisticsService extends BaseService {
|
|
|
String sql;
|
|
|
String totalSql;
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
if ("0".equals(type)) {
|
|
|
//按周统计
|
|
|
sql = "SELECT " +
|
|
@ -2592,7 +2592,7 @@ public class StatisticsService extends BaseService {
|
|
|
String sql;
|
|
|
String totalSql;
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
if ("0".equals(type)) {
|
|
|
//按周统计
|
|
|
sql = "SELECT " +
|
|
@ -2702,7 +2702,7 @@ public class StatisticsService extends BaseService {
|
|
|
public JSONArray getMemberConsultList(String teamCode, String startDate, String endDate, String sort, String sortType) {
|
|
|
String imDataBaseName = im_dataBase_name;
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
// 未回复咨询总量
|
|
|
String onReySQL = "SELECT " +
|
|
|
" IFNULL(c.total,0) AS noRely, " +
|
|
@ -2916,7 +2916,7 @@ public class StatisticsService extends BaseService {
|
|
|
public JSONObject getDoctorConsultTitle(String doctor, String teamCode, String startDate, String endDate) {
|
|
|
String imDataBaseName = im_dataBase_name;
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
//获取咨询总数
|
|
|
String couTotalSQL = "SELECT " +
|
|
|
" COUNT(1) total " +
|
|
@ -3045,7 +3045,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getTeamDoctorFollowupLine(String teamCode, String startDate, String endDate, String type, String doctor) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSQL;
|
|
|
String planSQL;
|
|
|
if ("0".equals(type)) {
|
|
@ -3110,7 +3110,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getTeamFollowupLine(String teamCode, String startDate, String endDate, String type) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSQL;
|
|
|
String planSQL;
|
|
|
if ("0".equals(type)) {
|
|
@ -3171,7 +3171,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getDoctorTeamFolList(String startDate, String endDate, String teamCode, String sort, String sortType) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSQL = "SELECT " +
|
|
|
" IFNULL(c.followupCount,0) AS followupCount, " +
|
|
|
" d.`code` AS doctorCode, " +
|
|
@ -3378,7 +3378,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getTeamDoctorFolTitle(String teamCode, String doctor, String startDate, String endDate) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql = "SELECT " +
|
|
|
" COUNT(1) AS followupCount " +
|
|
|
" FROM " +
|
|
@ -3431,7 +3431,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamResLine(String teamCode, String startDate, String endDate, String type) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql;
|
|
|
if ("0".equals(type)) {
|
|
|
//查周
|
|
@ -3465,7 +3465,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamDoctorResLine(String teamCode, String startDate, String endDate, String type, String doctor) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql;
|
|
|
if ("0".equals(type)) {
|
|
|
//查周
|
|
@ -3501,7 +3501,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamDoctorResList(String teamCode, String startDate, String endDate, String sort, String sortType) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql = "SELECT " +
|
|
|
" IFNULL(c.reservationCount,0) AS reservationCount, " +
|
|
|
" d.`code` AS doctorCode, " +
|
|
@ -3611,7 +3611,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getTeamDoctorResTitle(String teamCode, String doctor, String startDate, String endDate) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSQL = "SELECT " +
|
|
|
" COUNT(1) AS reservationCount " +
|
|
|
" FROM " +
|
|
@ -3652,8 +3652,8 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamGuidLine(String teamCode, String startDate, String endDate, String type) {
|
|
|
|
|
|
startDate = startDate + " 17:00:00";
|
|
|
endDate = endDate + " 17:00:00";
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String SQL;
|
|
|
if ("0".equals(type)) {
|
|
|
//按周统计
|
|
@ -3664,22 +3664,22 @@ public class StatisticsService extends BaseService {
|
|
|
" wlyy_patient_health_guidance w " +
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code = " + teamCode +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "' " +
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "' " +
|
|
|
" GROUP BY dateNo";
|
|
|
} else {
|
|
|
//按月统计
|
|
|
SQL = "SELECT " +
|
|
|
" ( " +
|
|
|
" DATE_FORMAT(w.czrq, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1 " +
|
|
|
" DATE_FORMAT(w.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1 " +
|
|
|
" ) AS weekOfMonth, " +
|
|
|
" COUNT(1) AS guidanceCount " +
|
|
|
" FROM " +
|
|
|
" wlyy_patient_health_guidance w " +
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code =" + teamCode +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "' " +
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "' " +
|
|
|
" GROUP BY weekOfMonth";
|
|
|
}
|
|
|
List<Map<String, Object>> totalList = jdbcTemplate.queryForList(SQL);
|
|
@ -3688,8 +3688,8 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamDoctorGuidLine(String teamCode, String startDate, String endDate, String type, String doctor) {
|
|
|
|
|
|
startDate = startDate + " 17:00:00";
|
|
|
endDate = endDate + " 17:00:00";
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String SQL;
|
|
|
if ("0".equals(type)) {
|
|
|
//按周统计
|
|
@ -3701,14 +3701,14 @@ public class StatisticsService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code = " + teamCode +
|
|
|
" AND w.doctor ='" + doctor + "'" +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "' " +
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "' " +
|
|
|
" GROUP BY dateNo";
|
|
|
} else {
|
|
|
//按月统计
|
|
|
SQL = "SELECT " +
|
|
|
" ( " +
|
|
|
" DATE_FORMAT(w.czrq, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1 " +
|
|
|
" DATE_FORMAT(w.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1 " +
|
|
|
" ) AS weekOfMonth, " +
|
|
|
" COUNT(1) AS guidanceCount " +
|
|
|
" FROM " +
|
|
@ -3716,8 +3716,8 @@ public class StatisticsService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code =" + teamCode +
|
|
|
" AND w.doctor ='" + doctor + "'" +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "' " +
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "' " +
|
|
|
" GROUP BY weekOfMonth";
|
|
|
}
|
|
|
List<Map<String, Object>> totalList = jdbcTemplate.queryForList(SQL);
|
|
@ -3725,8 +3725,8 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
|
|
|
public JSONArray getTeamGuidList(String teamCode, String startDate, String endDate, String sort, String sortType) {
|
|
|
startDate = startDate + " 17:00:00";
|
|
|
endDate = endDate + " 17:00:00";
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql = "SELECT " +
|
|
|
" IFNULL(c.guidanceCount,0) AS guidanceCount, " +
|
|
|
" d.`code` AS doctorCode, " +
|
|
@ -3770,8 +3770,8 @@ public class StatisticsService extends BaseService {
|
|
|
" wlyy_patient_health_guidance w " +
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code = " + teamCode +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "' " +
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "' " +
|
|
|
" GROUP BY w.doctor " +
|
|
|
" ) c ON c.doctor = m.doctor_code, " +
|
|
|
" wlyy_doctor d " +
|
|
@ -3835,8 +3835,8 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
|
|
|
public JSONObject getTeamDoctorGuiTitle(String teamCode, String doctor, String startDate, String endDate) {
|
|
|
startDate = startDate + " 17:00:00";
|
|
|
endDate = endDate + " 17:00:00";
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSQL = "SELECT " +
|
|
|
" COUNT(1) AS guidanceCount " +
|
|
|
" FROM " +
|
|
@ -3844,7 +3844,7 @@ public class StatisticsService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code = " + teamCode +
|
|
|
" AND w.doctor ='" + doctor + "'" +
|
|
|
" AND w.czrq <= '" + endDate + "'";
|
|
|
" AND w.create_time <= '" + endDate + "'";
|
|
|
|
|
|
String addSQL = "SELECT " +
|
|
|
" COUNT(1) AS addCount " +
|
|
@ -3853,8 +3853,8 @@ public class StatisticsService extends BaseService {
|
|
|
" WHERE " +
|
|
|
" w.admin_team_code = " + teamCode +
|
|
|
" AND w.doctor ='" + doctor + "'" +
|
|
|
" AND w.czrq <= '" + endDate + "' " +
|
|
|
" AND w.czrq >= '" + startDate + "'";
|
|
|
" AND w.create_time <= '" + endDate + "' " +
|
|
|
" AND w.create_time >= '" + startDate + "'";
|
|
|
JSONObject rs = new JSONObject();
|
|
|
Long guidanceCount = 0L;
|
|
|
Long addCount = 0L;
|
|
@ -3877,7 +3877,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamEduLine(String teamCode, String startDate, String endDate, String type) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String sql;
|
|
|
|
|
|
if ("0".equals(type)) {
|
|
@ -3910,7 +3910,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamDoctorEduLine(String teamCode, String startDate, String endDate, String type, String doctor) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String sql;
|
|
|
|
|
|
if ("0".equals(type)) {
|
|
@ -3945,7 +3945,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONArray getTeamEduList(String teamCode, String startDate, String endDate, String sort, String sortType) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql = "SELECT " +
|
|
|
" IFNULL(c.articleCount,0) AS articleCount, " +
|
|
|
" IFNULL(c.batchno,0) AS batchno, " +
|
|
@ -4082,7 +4082,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getTeamDoctorEduTitle(String teamCode, String startDate, String endDate, String doctor) {
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
String totalSql = "SELECT " +
|
|
|
" COUNT(1) AS articleCount, " +
|
|
|
" COUNT(DISTINCT w.batch_no) batchno " +
|
|
@ -6723,7 +6723,7 @@ public class StatisticsService extends BaseService {
|
|
|
String imDataBaseName = im_dataBase_name;
|
|
|
String totalSql;
|
|
|
startDate = startDate + " 00:00:00";
|
|
|
endDate = endDate + " 23:59:59";
|
|
|
endDate = endDate + " 00:00:00";
|
|
|
if ("0".equals(type)) {
|
|
|
//按周统计
|
|
|
totalSql = "SELECT " +
|