|
@ -148,8 +148,8 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
quartzJobLog.setJobStartTime(new Date());
|
|
|
allContent = new StringBuffer();
|
|
|
//找出今天的签约信息 yesterday,now
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status,patient,server_type from wlyy_sign_family a where a.type =2 and status in (1,2) and a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+"' and a.expenses_status=1 ";
|
|
|
String sqlCount = " select count(id) from wlyy_sign_family a where a.type =2 and status in (1,2) and a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+"' and a.expenses_status=1 ";
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status,patient,server_type from wlyy_sign_family a where a.type =2 and status in (1,2) and a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' and a.expenses_status=1 ";
|
|
|
String sqlCount = " select count(id) from wlyy_sign_family a where a.type =2 and status in (1,2) and a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' and a.expenses_status=1 ";
|
|
|
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extractByPage(SignFamily.class, sql, sqlCount, true);
|
|
@ -282,7 +282,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
if ((1 + 1) % 100 == 0) {
|
|
|
//每隔100统计一次
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "' and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -290,7 +290,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
} else {
|
|
|
//判断是不是最后的一段
|
|
|
if (consultIdMaps.size() == (i + 1)) {
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -299,9 +299,9 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
String sql = "";
|
|
|
if (consultIdMaps.size() > 0) {
|
|
|
sql = " select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'and a.consult in (" + sb.toString() + ")";
|
|
|
sql = " select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'and a.consult in (" + sb.toString() + ")";
|
|
|
} else {
|
|
|
sql = " select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'and a.consult ='noRey' ";
|
|
|
sql = " select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'and a.consult ='noRey' ";
|
|
|
}
|
|
|
|
|
|
System.out.println("consultTeams num:" + consultTeams.size());
|
|
@ -334,7 +334,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
if ((1 + 1) % 100 == 0) {
|
|
|
//每隔100统计一次
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "' and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -342,7 +342,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
} else {
|
|
|
//判断是不是最后的一段
|
|
|
if (consultIdMaps.size() == (i + 1)) {
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) +Constant.quota_date_last+ "' and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -396,7 +396,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
if ((1 + 1) % 100 == 0) {
|
|
|
//每隔100统计一次
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "' and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -404,7 +404,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
} else {
|
|
|
//判断是不是最后的一段
|
|
|
if (consultIdMaps.size() == (i + 1)) {
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'and a.consult in (" + sb.toString() + ")";
|
|
|
String sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'and a.consult in (" + sb.toString() + ")";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeamsTemp = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
consultTeams.addAll(consultTeamsTemp);
|
|
@ -414,9 +414,9 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
String sql = "";
|
|
|
//找出今天的咨询信息
|
|
|
if (consultIdMaps.size() > 0) {
|
|
|
sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'and a.consult in (" + sb.toString() + ")";
|
|
|
sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'and a.consult in (" + sb.toString() + ")";
|
|
|
} else {
|
|
|
sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.consult ='Rey' ";
|
|
|
sql = "select admin_team_code,id,consult from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "' and a.consult ='Rey' ";
|
|
|
} //抽取數據
|
|
|
|
|
|
List<ConsultTeamDto> consultTeamDtos = getConsultTeams(ims, consultTeams);
|
|
@ -827,7 +827,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
String quotaId = "2";
|
|
|
try {
|
|
|
//找出今天的解约信息
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where a.type =2 and a.status in(-3,-4) and a.apply_unsign_date< '" + tomorrow + "' and a.apply_unsign_date >'"+Constant.getStartTimeByDate(tomorrow)+"' ";
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where a.type =2 and a.status in(-3,-4) and a.apply_unsign_date< '" + tomorrow + "' and a.apply_unsign_date >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' ";
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamily.class, sql);
|
|
|
//清洗數據
|
|
@ -979,7 +979,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
private void computequota_9() throws ParseException {
|
|
|
String quotaId = "9";
|
|
|
//找出今天的待签约信息
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,doctor,doctor_health from wlyy_sign_family a where a.type =2 and a.status=0 and a.patient_apply_date< '" + tomorrow + "' and a.patient_apply_date >'"+Constant.getStartTimeByDate(tomorrow)+"' ";
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code,doctor,doctor_health from wlyy_sign_family a where a.type =2 and a.status=0 and a.patient_apply_date< '" + tomorrow + "' and a.patient_apply_date >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' ";
|
|
|
try {
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamily.class, sql);
|
|
@ -1001,7 +1001,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
String quotaId = "10";
|
|
|
try {
|
|
|
//找出今天的已改簽信息
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code from wlyy_sign_family a where a.type =2 and a.status =100 and a.patient_apply_date< '" + tomorrow + "' and a.patient_apply_date >'"+Constant.getStartTimeByDate(tomorrow)+"' and a.expenses_status=1 ";
|
|
|
String sql = " select id,code,idcard,hospital,admin_team_code from wlyy_sign_family a where a.type =2 and a.status =100 and a.patient_apply_date< '" + tomorrow + "' and a.patient_apply_date >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' and a.expenses_status=1 ";
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamily.class, sql);
|
|
|
//清洗數據
|
|
@ -1022,7 +1022,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
String quotaId = "25";
|
|
|
try {
|
|
|
//找出总的咨询信息
|
|
|
String sql = " select * from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow) + "'";
|
|
|
String sql = " select * from wlyy_consult_team a where a.czrq< '" + tomorrow + "' and a.czrq> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "'";
|
|
|
//抽取數據
|
|
|
List<ConsultTeam> consultTeams = SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class, sql);
|
|
|
//過濾數據
|
|
@ -1043,7 +1043,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
String quotaId = "26";
|
|
|
try {
|
|
|
//找出今天统计未缴费签约总数
|
|
|
String sql = "select code,idcard,hospital,admin_team_code from wlyy_sign_family a where a.type =2 and a.status>0 and a.apply_date< '" + tomorrow + "' and a.apply_date> '" + Constant.getStartTimeByDate(tomorrow) + "' and a.expenses_status=0 ";
|
|
|
String sql = "select code,idcard,hospital,admin_team_code from wlyy_sign_family a where a.type =2 and a.status>0 and a.apply_date< '" + tomorrow + "' and a.apply_date> '" + Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last + "' and a.expenses_status=0 ";
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamily.class, sql);
|
|
|
//清洗數據
|