|
@ -227,6 +227,51 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getTeamRenewOut(){
|
|
|
try{
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
Map<String,Object> map = new HashedMap();
|
|
|
map.put("signFamilies",signFamilies);
|
|
|
map.put("sql",sql);
|
|
|
return map;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getOrgRenewOut(){
|
|
|
try{
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
Map<String,Object> map = new HashedMap();
|
|
|
map.put("signFamilies",signFamilies);
|
|
|
map.put("sql",sql);
|
|
|
return map;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getTownRenewOut(){
|
|
|
try{
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6) and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
Map<String,Object> map = new HashedMap();
|
|
|
map.put("signFamilies",signFamilies);
|
|
|
map.put("sql",sql);
|
|
|
return map;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
//统计
|
|
|
private void computequota() throws Exception {
|
|
|
|
|
@ -251,59 +296,64 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
|
|
|
//抽取數據
|
|
|
List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extractByPage(SignFamily.class, sql, sqlCount, true);
|
|
|
//抽取數據市级签约
|
|
|
//抽取數據签约数
|
|
|
Map<String,Object> citySignFamilies =getCityRenewTotals();
|
|
|
Map<String,Object> townSignFamilies =getTowmRenewTotals();
|
|
|
Map<String,Object> orgSignFamilies =getOrgRenewTotals();
|
|
|
Map<String,Object> teamSignFamilies =getTeamRenewTotals();
|
|
|
|
|
|
|
|
|
computequota_1(sql, signFamilies, null); //统计今天的签约
|
|
|
computequota_2(); //统计今天的解约
|
|
|
computequota_3(); //统计今天的健康咨询量
|
|
|
computequota_4(); //统计今天的随访量
|
|
|
computequota_5(); //统计今天的健康指导
|
|
|
computequota_6(sql, signFamilies, null); //统计今天的签约患者性别
|
|
|
computequota_7(sql, signFamilies, null);//统计今天的签约患者分组
|
|
|
computequota_8(sql, signFamilies, null);//统计今天的签约患者年龄
|
|
|
computequota_9();//统计今天的待签约
|
|
|
computequota_10();//统计今天的改签
|
|
|
computequota_12(sql, signFamilies, null);//统计今天的签约下按年龄分组后再
|
|
|
computequota_13(sql, signFamilies, null);//统计今天的签约量
|
|
|
computequota_16_1(sql, signFamilies, null);//统计今天的签约数的扣费钱
|
|
|
computequota_15(sql, signFamilies, null);//统计今天的健康分布统计
|
|
|
computequota_17(sql, signFamilies, null);//统计今天的年龄疾病
|
|
|
computequota_20();//统计今天的已经签约患者绑定设备
|
|
|
computequota_21();//统计今天的已经签约微信关注人数
|
|
|
computequota_49();//统计今天的已经签约未扣费微信关注人数
|
|
|
computequota_50();//统计今天的已经签约已扣费微信关注人数
|
|
|
computequota_22();//未回复的咨询量
|
|
|
computequota_23();//及时回复的咨询量
|
|
|
computequota_24();//及时回复的咨询量时间分布
|
|
|
computequota_25();//统计质询量总数
|
|
|
computequota_26();//统计未缴费签约总数
|
|
|
computequota_27();//统计代预约量
|
|
|
computequota_28();//统计平均值
|
|
|
computequota_31(); //统计续签夸团队
|
|
|
computequota_32(); //统计续签夸社区
|
|
|
computequota_33(); //统计续签夸区
|
|
|
computequota_34(); //续签团队签入
|
|
|
computequota_35(); //统计团队签出
|
|
|
computequota_36(sql, signFamilies, null); //签约服务类型
|
|
|
//computequota_37(); //统计团队转签 没用指标
|
|
|
computequota_38(); //续签机构签入
|
|
|
computequota_39(); //统计机构签出
|
|
|
computequota_40(); //续签区签入
|
|
|
computequota_41(); //统计区签出
|
|
|
computequota_42(teamSignFamilies); //统计团队续签
|
|
|
computequota_43(townSignFamilies); //统计社区续签
|
|
|
computequota_44(orgSignFamilies); //统计区续签
|
|
|
computequota_29(citySignFamilies); //统计市级续签
|
|
|
//computequota_45(); //统计社区转签 没用指标
|
|
|
//computequota_46(); //统计区转签 没用指标
|
|
|
computequota_30(); //统计团队续签原因
|
|
|
// computequota_47(); //统计社区续签原因 没用指标
|
|
|
// computequota_48(); //统计区续签原因 没用指标
|
|
|
//数据抽取迁出率
|
|
|
Map<String,Object> townSignOutFamilies =getTowmRenewTotals();
|
|
|
Map<String,Object> orgSignOutFamilies =getOrgRenewTotals();
|
|
|
Map<String,Object> teamSignOutFamilies =getTeamRenewTotals();
|
|
|
|
|
|
|
|
|
|
|
|
// computequota_1(sql, signFamilies, null); //统计今天的签约
|
|
|
// computequota_2(); //统计今天的解约
|
|
|
// computequota_3(); //统计今天的健康咨询量
|
|
|
// computequota_4(); //统计今天的随访量
|
|
|
// computequota_5(); //统计今天的健康指导
|
|
|
// computequota_6(sql, signFamilies, null); //统计今天的签约患者性别
|
|
|
// computequota_7(sql, signFamilies, null);//统计今天的签约患者分组
|
|
|
// computequota_8(sql, signFamilies, null);//统计今天的签约患者年龄
|
|
|
// computequota_9();//统计今天的待签约
|
|
|
// computequota_10();//统计今天的改签
|
|
|
// computequota_12(sql, signFamilies, null);//统计今天的签约下按年龄分组后再
|
|
|
// computequota_13(sql, signFamilies, null);//统计今天的签约量
|
|
|
// computequota_16_1(sql, signFamilies, null);//统计今天的签约数的扣费钱
|
|
|
// computequota_15(sql, signFamilies, null);//统计今天的健康分布统计
|
|
|
// computequota_17(sql, signFamilies, null);//统计今天的年龄疾病
|
|
|
// computequota_20();//统计今天的已经签约患者绑定设备
|
|
|
// computequota_21();//统计今天的已经签约微信关注人数
|
|
|
// computequota_49();//统计今天的已经签约未扣费微信关注人数
|
|
|
// computequota_50();//统计今天的已经签约已扣费微信关注人数
|
|
|
// computequota_22();//未回复的咨询量
|
|
|
// computequota_23();//及时回复的咨询量
|
|
|
// computequota_24();//及时回复的咨询量时间分布
|
|
|
// computequota_25();//统计质询量总数
|
|
|
// computequota_26();//统计未缴费签约总数
|
|
|
// computequota_27();//统计代预约量
|
|
|
// computequota_28();//统计平均值
|
|
|
// computequota_31(); //统计续签夸团队
|
|
|
// computequota_32(); //统计续签夸社区
|
|
|
// computequota_33(); //统计续签夸区
|
|
|
// computequota_34(); //续签团队签入
|
|
|
// computequota_35(teamSignOutFamilies); //统计团队签出
|
|
|
// computequota_36(sql, signFamilies, null); //签约服务类型
|
|
|
// //computequota_37(); //统计团队转签 没用指标
|
|
|
// computequota_38(); //续签机构签入
|
|
|
// computequota_39(orgSignOutFamilies); //统计机构签出
|
|
|
// computequota_40(); //续签区签入
|
|
|
// computequota_41(townSignOutFamilies); //统计区签出
|
|
|
// computequota_42(teamSignFamilies); //统计团队续签
|
|
|
// computequota_43(townSignFamilies); //统计社区续签
|
|
|
// computequota_44(orgSignFamilies); //统计区续签
|
|
|
// computequota_29(citySignFamilies); //统计市级续签
|
|
|
// //computequota_45(); //统计社区转签 没用指标
|
|
|
// //computequota_46(); //统计区转签 没用指标
|
|
|
// computequota_30(); //统计团队续签原因
|
|
|
//// computequota_47(); //统计社区续签原因 没用指标
|
|
|
//// computequota_48(); //统计区续签原因 没用指标
|
|
|
|
|
|
//1.3.8需求开发
|
|
|
computequota_51(citySignFamilies);//统计市级续签服务类型维度
|
|
@ -311,6 +361,10 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
computequota_53(orgSignFamilies);//统计社区续签人数服务类型维度
|
|
|
computequota_54(townSignFamilies);//统计区续签人数服务类型维度
|
|
|
|
|
|
computequota_55(teamSignOutFamilies);//统计团队续签迁出人数服务类型维度
|
|
|
computequota_56(orgSignOutFamilies);//统计社区续签迁出人数服务类型维度
|
|
|
computequota_57(townSignOutFamilies);//统计区续签迁出人数服务类型维度
|
|
|
|
|
|
|
|
|
quartzJobLog.setJobContent(allContent.toString());
|
|
|
quartzJobLog.setJobName("实时统计");
|
|
@ -1544,12 +1598,14 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
allContent.append("-----------34----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_35() {
|
|
|
private void computequota_35(Map<String,Object> sign) {
|
|
|
String quotaId = "35";
|
|
|
try {
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
// String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies, sql, "now");
|
|
|
//统计数据
|
|
@ -1563,6 +1619,28 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
allContent.append("-----------35----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_55(Map<String,Object> sign) {
|
|
|
String quotaId = "55";
|
|
|
try {
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies,"2",null ,sql, "now");
|
|
|
//统计数据
|
|
|
List<Map<String, List<ETLModel>>> returnDatas = SpringUtil.getBean(Level1Role.class).elt(etlModels.getEtlModelList());
|
|
|
//保存数据
|
|
|
SpringUtil.getBean(RedisStorage.class).saveByLevel1(returnDatas, null, quotaId);
|
|
|
allContent.append(JsonUtil.objToStr(etlModels.getLogModel()));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
allContent.append("统计失败:" + e.getMessage());
|
|
|
}
|
|
|
allContent.append("-----------55----------");
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void computequota_38() {
|
|
|
String quotaId = "38";
|
|
|
try {
|
|
@ -1583,12 +1661,17 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
allContent.append("-----------38----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_39() {
|
|
|
|
|
|
|
|
|
private void computequota_39(Map<String,Object> sign) {
|
|
|
String quotaId = "39";
|
|
|
try {
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
// String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies, sql, "now");
|
|
|
//统计数据
|
|
@ -1602,6 +1685,29 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
}
|
|
|
allContent.append("-----------39----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_56(Map<String,Object> sign) {
|
|
|
String quotaId = "56";
|
|
|
try {
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
// String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies,"2",null,sql, "now");
|
|
|
//统计数据
|
|
|
List<Map<String, List<ETLModel>>> returnDatas = SpringUtil.getBean(Level1Role.class).elt(etlModels.getEtlModelList());
|
|
|
//保存数据
|
|
|
SpringUtil.getBean(RedisStorage.class).saveByLevel1(returnDatas, null, quotaId);
|
|
|
allContent.append(JsonUtil.objToStr(etlModels.getLogModel()));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
allContent.append("统计失败:" + e.getMessage());
|
|
|
}
|
|
|
allContent.append("-----------56----------");
|
|
|
}
|
|
|
|
|
|
public List<Map<String, Object>> getCityTowms() {
|
|
|
List<Map<String, Object>> map = jdbcTemplate.queryForList(getAvgSqlByCode("city_town_SQL"));
|
|
|
return map;
|
|
@ -1627,12 +1733,14 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
allContent.append("-----------40----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_41() {
|
|
|
private void computequota_41(Map<String,Object> sign) {
|
|
|
String quotaId = "41";
|
|
|
try {
|
|
|
String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6) and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
// String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6) and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies, sql, "now");
|
|
|
//统计数据
|
|
@ -1647,6 +1755,28 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
allContent.append("-----------41----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_57(Map<String,Object> sign) {
|
|
|
String quotaId = "57";
|
|
|
try {
|
|
|
List<SignFamilyRenew> signFamilies = (List<SignFamilyRenew>)sign.get("signFamilies");
|
|
|
String sql = (String)sign.get("sql");
|
|
|
// String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+ tomorrow+"' and fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6) and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies,"2",null, sql, "now");
|
|
|
//统计数据
|
|
|
List<Map<String, List<ETLModel>>> returnDatas = SpringUtil.getBean(Level1Role.class).elt(etlModels.getEtlModelList());
|
|
|
//保存数据
|
|
|
SpringUtil.getBean(RedisStorage.class).saveByLevel1(returnDatas, null, quotaId);
|
|
|
allContent.append(JsonUtil.objToStr(etlModels.getLogModel()));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
allContent.append("统计失败:" + e.getMessage());
|
|
|
}
|
|
|
allContent.append("-----------57----------");
|
|
|
}
|
|
|
|
|
|
private void computequota_42(Map<String,Object> sign) {
|
|
|
String quotaId = "42";
|
|
|
try {
|