| 
					
				 | 
			
			
				@ -140,7 +140,8 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //统计有签约的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (SignFamily signFamily : signFamilys) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String idcard = signFamily.getIdcard();//得到签约中患者的身份证号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Hospital hospital = hospitalsMap.get(signFamily.getHospital());//得到患者签约的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orgCodeTemp=getOrg(signFamily.getHospital()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到患者签约的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String town = hospital.getTown();//得到患者签约的机构的区号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String hospitalCode = hospital.getCode();//得到患者签约的机构号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String sex = IdCardUtil.getSexForIdcard(idcard);//根据身份证得到性别 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -153,7 +154,7 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orgCode=hospital.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //统计站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    compute_level2_1(orgSexMap,orgCodeTemp, sex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //统计社区 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -893,7 +894,9 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String, Map<String, Long>> orgAgeMap = new HashMap<String, Map<String, Long>>();//key是机构代码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //统计有签约的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           for (SignFamily signFamily : signFamilys) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Hospital hospital = hospitalsMap.get(signFamily.getHospital());//得到患者签约的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               String orgCodeTemp=getOrg(signFamily.getHospital()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到患者签约的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String town = hospital.getTown(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                int age = IdCardUtil.getAgeForIdcard(signFamily.getIdcard());//根据card解析年龄 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String ageCode = getAgeCode(age);//得到年龄的code 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -922,7 +925,7 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orgCode=hospital.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //统计站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //统计机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (orgAgeMap.containsKey(orgCodeTemp)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        Map<String, Long> groupMapTemp = orgAgeMap.get(orgCodeTemp); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1373,6 +1376,7 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String, Long> tjQkdoctorMap = new HashMap<String, Long>();//团队级的统计map 目前没有团队 先用全科医生统一  key doctorCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Long cityCount = 0L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //统计有签约的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String orgCodeTemp=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (SignFamily signFamily : signFamilys) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String doctorCode = signFamily.getDoctor();//得到签约中全科医生的code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //统计团队 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1387,14 +1391,15 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //统计站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //统计站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                compute_level1(tjOrgMap, orgCodeTemp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //统计社区 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                compute_level1(tjOrgMap, orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orgCodeTemp=orgCode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Hospital hospital=hospitalsMap.get(doctor.getHospital()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Hospital hospital=hospitalsMap.get(orgCodeTemp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String townCode = hospital.getTown(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //统计区 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            compute_level1(tjTownMap, townCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1405,13 +1410,18 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //保存全科医生的签约统计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Map.Entry<String, Doctor> entry : doctorsMap.entrySet()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Doctor doctor = doctorsMap.get(entry.getKey());//得到全科医生 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Hospital hospital = hospitalsMap.get(doctor.getHospital());//得到全科医生的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            orgCodeTemp=getOrg(doctor.getHospital()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到全科医生的机构 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String city=Constant.city; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String cityName=Constant.cityName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String town=hospital.getTown(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String townName=hospital.getTownName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String org=doctor.getHospital(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String orgName=doctor.getHosptialName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String org=hospital.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(!"00".equals(hospital.getCode().substring(hospital.getCode().length()-2,hospital.getCode().length()))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //统计站 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                org=hospital.getCode().substring(0,hospital.getCode().length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String orgName=hospital.getName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String doctorCode=doctor.getCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String doctorName=doctor.getName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String doctorJob=doctor.getJob(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1557,7 +1567,13 @@ public class SignJob implements Job { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String dateString = formatter.format(date); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return dateString; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private String getOrg(String org){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!"00".equals(org.substring(org.length()-2,org.length()))){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return org.substring(0,org.length()-2)+"00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return org; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public static void main(String[] args) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        getDayString(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 |