|
@ -38,7 +38,6 @@ public class SignDataFilter {
|
|
|
public static String level2Health="5";//健康服务分布
|
|
|
|
|
|
public static String level3Disease="1";//疾病分组
|
|
|
public static int size=0;
|
|
|
private StringBuffer errorContent =new StringBuffer();//错误信息
|
|
|
|
|
|
@Autowired
|
|
@ -49,6 +48,8 @@ public class SignDataFilter {
|
|
|
private DoctorAdminTeamDao doctorAdminTeamDao;
|
|
|
@Autowired
|
|
|
private SignPatientLabelInfoDao signPatientLabelInfoDao;
|
|
|
|
|
|
private int count=0;
|
|
|
/**
|
|
|
* 过滤数据
|
|
|
* @param signFamilies 签约列表
|
|
@ -117,8 +118,13 @@ public class SignDataFilter {
|
|
|
Long adminCount = new Long(0L);//统计到所有团队的数目
|
|
|
Long errorCount=new Long(0L);//脏数据
|
|
|
Boolean isAll=true;//是否统计失败
|
|
|
int a1=0;
|
|
|
int a2=0;
|
|
|
for (int i=0;i<signFamilies.size();i++){
|
|
|
SignFamily signFamily=signFamilies.get(i);
|
|
|
if("1".equals(signFamily.getExpensesStatus())){
|
|
|
a1++;
|
|
|
}
|
|
|
String orgCode = signFamily.getHospital();
|
|
|
if(StringUtils.isEmpty(orgCode)) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的hospital数据为空");
|
|
@ -148,42 +154,44 @@ public class SignDataFilter {
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
Long adminId=signFamily.getAdminTeamCode();
|
|
|
if(adminId == null||adminId<=0) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的Admin_Team_Id数据为空");
|
|
|
String town =hospital.getTown();
|
|
|
if(StringUtils.isEmpty(town)) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",机构表的中的town为空");
|
|
|
isAll=false;
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
AdminTeam adminTeam=adminTeamMap.get(signFamily.getAdminTeamCode()+"");
|
|
|
if(adminTeam == null) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的Admin_Team_Id数据不存在");
|
|
|
Town townObj =townsMap.get(town);
|
|
|
if(townObj==null) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",机构表的中的town不存在");
|
|
|
isAll=false;
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
String idCard=signFamily.getIdcard();
|
|
|
if(idCard == null||((idCard.length()!=18&&idCard.length()!=15))) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的idCard数据异常");
|
|
|
Long adminId=signFamily.getAdminTeamCode();
|
|
|
if(adminId == null||adminId<=0) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的Admin_Team_Id数据为空");
|
|
|
isAll=false;
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
String town =hospital.getTown();
|
|
|
if(StringUtils.isEmpty(town)) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",机构表的中的town为空");
|
|
|
AdminTeam adminTeam=adminTeamMap.get(adminId+"");
|
|
|
if(adminTeam == null) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的Admin_Team_Id数据不存在");
|
|
|
isAll=false;
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
Town townObj =townsMap.get(town);
|
|
|
if(townObj==null) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",机构表的中的town不存在");
|
|
|
String idCard=signFamily.getIdcard();
|
|
|
if(idCard == null||((idCard.length()!=18&&idCard.length()!=15))) {
|
|
|
errorContent.append("签约code:"+signFamily.getCode()+",签约表中(wlyy_sign_family)中的idCard数据异常");
|
|
|
isAll=false;
|
|
|
errorCount++;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
if("1".equals(signFamilies.get(i).getExpensesStatus())){
|
|
|
a2++;
|
|
|
}
|
|
|
//设置二级维度的Key
|
|
|
String returnLevel2Key=getLevel2Key(level2Key,signFamily);
|
|
|
String returnLevel3Key=getLevel3Key(level3Key,signFamily);
|
|
@ -267,29 +275,28 @@ public class SignDataFilter {
|
|
|
//性别
|
|
|
case "1" :{
|
|
|
returnLevel2Key = getSex(signFamily);
|
|
|
break;
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
//年龄
|
|
|
case "2" :{
|
|
|
returnLevel2Key = getAge(signFamily);
|
|
|
break;
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
//分组
|
|
|
case "3" :{
|
|
|
//得到患者的分组标签
|
|
|
returnLevel2Key = getGroup(signFamily);
|
|
|
break;
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
//费用
|
|
|
case "4" :{
|
|
|
returnLevel2Key = getExpenses(signFamily);
|
|
|
break;
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
//健康服务分布
|
|
|
case "5" :{
|
|
|
returnLevel2Key = getHealth(signFamily);
|
|
|
break;
|
|
|
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -306,7 +313,16 @@ public class SignDataFilter {
|
|
|
}
|
|
|
|
|
|
private String getExpenses(SignFamily signFamily) {
|
|
|
String returnLevel2Key= StringUtils.isEmpty(signFamily.getExpensesStatus())?"0":signFamily.getExpensesStatus();
|
|
|
if("1".equals(signFamily.getExpensesStatus())){
|
|
|
count++;
|
|
|
}
|
|
|
String returnLevel2Key= signFamily.getExpensesStatus();
|
|
|
if(returnLevel2Key==null){
|
|
|
returnLevel2Key="0";
|
|
|
}
|
|
|
if("".equals(returnLevel2Key.trim())){
|
|
|
returnLevel2Key="0";
|
|
|
}
|
|
|
return returnLevel2Key;
|
|
|
}
|
|
|
|