|  | @ -92,9 +92,38 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |      * @param day
 | 
	
		
			
				|  |  |      * @param wlyyQuota
 | 
	
		
			
				|  |  |      * @param foreachNum 标识二级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param type 1 性别 2 年龄 3 用户分组
 | 
	
		
			
				|  |  |      * @param type 1 性别 2 年龄 3 用户分组 4.签约费用
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void saveByLevel2(List<Map<String, Map<String, List<ETLModel>>>> data, String day, WlyyQuotaVO wlyyQuota,Integer foreachNum,Integer type) {
 | 
	
		
			
				|  |  |     public void saveByLevel2(List<Map<String, Map<String, List<ETLModel>>>> data, String day, WlyyQuotaVO wlyyQuota,Integer foreachNum,Integer type) throws Exception{
 | 
	
		
			
				|  |  |         Integer start=1;
 | 
	
		
			
				|  |  |         this.wlyyQuota=wlyyQuota;
 | 
	
		
			
				|  |  |         level2Public(data, day, foreachNum, type, start);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 保存二级维度
 | 
	
		
			
				|  |  |      * @param data
 | 
	
		
			
				|  |  |      * @param day
 | 
	
		
			
				|  |  |      * @param wlyyQuota
 | 
	
		
			
				|  |  |      * @param foreachNum 如果start是默认的 标识二级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param type 1 性别 2 年龄 3 用户分组 4.签约费用
 | 
	
		
			
				|  |  |      * @param start 起始位置 默认是1
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void saveByLevel2(List<Map<String, Map<String, List<ETLModel>>>> data, String day, WlyyQuotaVO wlyyQuota,Integer foreachNum,Integer type,Integer start)throws Exception {
 | 
	
		
			
				|  |  |         this.wlyyQuota=wlyyQuota;
 | 
	
		
			
				|  |  |         level2Public(data, day, foreachNum, type, start);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 保存三级维度
 | 
	
		
			
				|  |  |      * @param data
 | 
	
		
			
				|  |  |      * @param day
 | 
	
		
			
				|  |  |      * @param wlyyQuota
 | 
	
		
			
				|  |  |      * @param foreachNum2 标识二级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param foreachNum3 标识三级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param type 1 性别 2 年龄 3 用户分组 4.签约费用
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void saveByLevel3(List<Map<String, Map<String, Map<String, List<ETLModel>>>>> data, String day, WlyyQuotaVO wlyyQuota,Integer foreachNum2,Integer foreachNum3,Integer type) throws Exception{
 | 
	
		
			
				|  |  |         Integer start2=1;
 | 
	
		
			
				|  |  |         Integer start3=1;
 | 
	
		
			
				|  |  |         this.wlyyQuota=wlyyQuota;
 | 
	
		
			
				|  |  |         List<AdminTeam> adminTeams=doctorAdminTeamDao.findAllTeam();
 | 
	
		
			
				|  |  |         for (AdminTeam adminTeam : adminTeams) {
 | 
	
	
		
			
				|  | @ -117,19 +146,251 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |         Map<String, City> cityMap = new HashMap<String, City>();
 | 
	
		
			
				|  |  |         cityMap.put(Constant.city,city);
 | 
	
		
			
				|  |  |         //保存团队
 | 
	
		
			
				|  |  |         saveAdminTeamDataLevel2(data.get(0),day,adminTeamMap,foreachNum,type);
 | 
	
		
			
				|  |  |         saveAdminTeamDataLevel3(data.get(0),day,adminTeamMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存机构
 | 
	
		
			
				|  |  |         saveHospitalTeamDataLevel2(data.get(1),day,hospitalsMap,foreachNum,type);
 | 
	
		
			
				|  |  |         saveHospitalTeamDataLevel3(data.get(1),day,hospitalsMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存区
 | 
	
		
			
				|  |  |         saveTownTeamDataLevel2(data.get(2),day,townsMap,foreachNum,type);
 | 
	
		
			
				|  |  |         saveTownTeamDataLevel3(data.get(2),day,townsMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存市
 | 
	
		
			
				|  |  |         saveCityTeamDataLevel2(data.get(3),day,cityMap,foreachNum,type);
 | 
	
		
			
				|  |  |         saveCityTeamDataLevel3(data.get(3),day,cityMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveCityTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, City> citysMap ,Integer foreachNum,Integer type) {
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 保存三级维度
 | 
	
		
			
				|  |  |      * @param data
 | 
	
		
			
				|  |  |      * @param day
 | 
	
		
			
				|  |  |      * @param wlyyQuota
 | 
	
		
			
				|  |  |      * @param foreachNum2 标识二级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param foreachNum3 标识三级维度循环的次数  例如 年龄就传6  性别就传3
 | 
	
		
			
				|  |  |      * @param type 1 性别 2 年龄 3 用户分组 4.签约费用
 | 
	
		
			
				|  |  |      * @param start2 耳機維度起始位置 默认是1
 | 
	
		
			
				|  |  |      * @param start3 耳機維度起始位置 默认是1
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void saveByLevel3(List<Map<String, Map<String, Map<String, List<ETLModel>>>>> data, String day, WlyyQuotaVO wlyyQuota,Integer foreachNum2,Integer foreachNum3,Integer type,Integer start2,Integer start3) throws Exception{
 | 
	
		
			
				|  |  |         if(start2==null){
 | 
	
		
			
				|  |  |             start2=1;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(start3==null){
 | 
	
		
			
				|  |  |             start2=3;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         this.wlyyQuota=wlyyQuota;
 | 
	
		
			
				|  |  |         List<AdminTeam> adminTeams=doctorAdminTeamDao.findAllTeam();
 | 
	
		
			
				|  |  |         for (AdminTeam adminTeam : adminTeams) {
 | 
	
		
			
				|  |  |             adminTeamMap.put(adminTeam.getId()+"", adminTeam);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //查找出系统全部的机构
 | 
	
		
			
				|  |  |         List<Hospital> hospitals = hospitalDao.findHospitalzxFWZ();
 | 
	
		
			
				|  |  |         for (Hospital hospital : hospitals) {
 | 
	
		
			
				|  |  |             hospitalsMap.put(hospital.getCode(), hospital);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //查找出厦门市全部的区
 | 
	
		
			
				|  |  |         List<Town> towns = townDao.findByCityCode(Constant.city);
 | 
	
		
			
				|  |  |         for (Town town : towns) {
 | 
	
		
			
				|  |  |             townsMap.put(town.getCode(), town);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //全部的市
 | 
	
		
			
				|  |  |         City city=new City();
 | 
	
		
			
				|  |  |         city.setCode(Constant.city);
 | 
	
		
			
				|  |  |         city.setName(Constant.cityName);
 | 
	
		
			
				|  |  |         Map<String, City> cityMap = new HashMap<String, City>();
 | 
	
		
			
				|  |  |         cityMap.put(Constant.city,city);
 | 
	
		
			
				|  |  |         //保存团队
 | 
	
		
			
				|  |  |         saveAdminTeamDataLevel3(data.get(0),day,adminTeamMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存机构
 | 
	
		
			
				|  |  |         saveHospitalTeamDataLevel3(data.get(1),day,hospitalsMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存区
 | 
	
		
			
				|  |  |         saveTownTeamDataLevel3(data.get(2),day,townsMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |         //保存市
 | 
	
		
			
				|  |  |         saveCityTeamDataLevel3(data.get(3),day,cityMap,foreachNum2,foreachNum3,type,start2,start3);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveAdminTeamDataLevel3(Map<String, Map<String, Map<String, List<ETLModel>>>> etlModelMap, String day, Map<String, AdminTeam> adminTeamMap, Integer foreachNum2, Integer foreachNum3, Integer type, Integer start2, Integer start3) {
 | 
	
		
			
				|  |  |         //遍历团队的Map
 | 
	
		
			
				|  |  |         for(Map.Entry<String,AdminTeam> oneAdminTeam:adminTeamMap.entrySet()){
 | 
	
		
			
				|  |  |             //得到每个团队的2级维度
 | 
	
		
			
				|  |  |             Map<String, Map<String, List<ETLModel>>> twoETLMap= etlModelMap.get(oneAdminTeam.getKey());
 | 
	
		
			
				|  |  |             for(int i=start2;i<=foreachNum2;i++){
 | 
	
		
			
				|  |  |                  //得到每个团队的三级维度
 | 
	
		
			
				|  |  |                  Map<String, List<ETLModel>> threeETLMap= new HashMap<String, List<ETLModel>>();
 | 
	
		
			
				|  |  |                  if(twoETLMap!=null){
 | 
	
		
			
				|  |  |                      threeETLMap=twoETLMap.get(i);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  for(int j=start3;j<=foreachNum3;j++){
 | 
	
		
			
				|  |  |                      int num=0;
 | 
	
		
			
				|  |  |                      List<ETLModel> etlModelList= threeETLMap.get(i);
 | 
	
		
			
				|  |  |                      if(etlModelList!=null&&etlModelList.size()>0){
 | 
	
		
			
				|  |  |                          num=etlModelList.size();
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      AdminTeam adminTeamObj = adminTeamMap.get(oneAdminTeam.getKey());//团队
 | 
	
		
			
				|  |  |                      if(adminTeamObj==null)continue;
 | 
	
		
			
				|  |  |                      String orgCodeTemp=getOrg(adminTeamObj.getOrgCode());
 | 
	
		
			
				|  |  |                      Hospital hospital = hospitalsMap.get(orgCodeTemp);
 | 
	
		
			
				|  |  |                      if(hospital==null)continue;
 | 
	
		
			
				|  |  |                      String city=Constant.city;
 | 
	
		
			
				|  |  |                      String cityName=Constant.cityName;
 | 
	
		
			
				|  |  |                      String town=hospital.getTown();
 | 
	
		
			
				|  |  |                      String townName=hospital.getTownName();
 | 
	
		
			
				|  |  |                      String org=hospital.getCode();
 | 
	
		
			
				|  |  |                      String orgName=hospital.getName();
 | 
	
		
			
				|  |  |                      String doctorCode=adminTeamObj.getId()+"";
 | 
	
		
			
				|  |  |                      String doctorName=adminTeamObj.getName();
 | 
	
		
			
				|  |  |                      String doctorJob="";
 | 
	
		
			
				|  |  |                      String level="1";
 | 
	
		
			
				|  |  |                      String level2=i+"";
 | 
	
		
			
				|  |  |                      String level3=j+"";
 | 
	
		
			
				|  |  |                      String level3Name=getLevel3Name(level3,type);
 | 
	
		
			
				|  |  |                      save(num, city, cityName, town, townName, org, orgName, doctorCode, doctorName, doctorJob, level,level2,null,level3,level3Name,day);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     private void saveHospitalTeamDataLevel3(Map<String, Map<String, Map<String, List<ETLModel>>>> etlModelMap, String day, Map<String, Hospital> hospitalsMap, Integer foreachNum2, Integer foreachNum3, Integer type, Integer start2, Integer start3) {
 | 
	
		
			
				|  |  |         //遍历团队的Map
 | 
	
		
			
				|  |  |         for(Map.Entry<String,Hospital> oneHospital:hospitalsMap.entrySet()){
 | 
	
		
			
				|  |  |             //得到每个团队的2级维度
 | 
	
		
			
				|  |  |             Map<String, Map<String, List<ETLModel>>> twoETLMap= etlModelMap.get(oneHospital.getKey());
 | 
	
		
			
				|  |  |             for(int i=start2;i<=foreachNum2;i++){
 | 
	
		
			
				|  |  |                 //得到每个团队的三级维度
 | 
	
		
			
				|  |  |                 Map<String, List<ETLModel>> threeETLMap= new HashMap<String, List<ETLModel>>();
 | 
	
		
			
				|  |  |                 if(twoETLMap!=null){
 | 
	
		
			
				|  |  |                     threeETLMap=twoETLMap.get(i);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for(int j=start3;j<=foreachNum3;j++){
 | 
	
		
			
				|  |  |                     int num=0;
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModelList= threeETLMap.get(i);
 | 
	
		
			
				|  |  |                     if(etlModelList!=null&&etlModelList.size()>0){
 | 
	
		
			
				|  |  |                         num=etlModelList.size();
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     Hospital hospital = hospitalsMap.get(oneHospital.getKey());
 | 
	
		
			
				|  |  |                     if(hospital==null)continue;
 | 
	
		
			
				|  |  |                     String city=Constant.city;
 | 
	
		
			
				|  |  |                     String cityName=Constant.cityName;
 | 
	
		
			
				|  |  |                     String town=hospital.getTown();
 | 
	
		
			
				|  |  |                     String townName=hospital.getTownName();
 | 
	
		
			
				|  |  |                     String org=hospital.getCode();
 | 
	
		
			
				|  |  |                     String orgName=hospital.getName();
 | 
	
		
			
				|  |  |                     String doctorCode="";
 | 
	
		
			
				|  |  |                     String doctorName="";
 | 
	
		
			
				|  |  |                     String doctorJob="";
 | 
	
		
			
				|  |  |                     String level="1";
 | 
	
		
			
				|  |  |                     String level2=i+"";
 | 
	
		
			
				|  |  |                     String level3=j+"";
 | 
	
		
			
				|  |  |                     String level3Name=getLevel3Name(level3,type);
 | 
	
		
			
				|  |  |                     save(num, city, cityName, town, townName, org, orgName, doctorCode, doctorName, doctorJob, level,level2,null,level3,level3Name,day);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     private void saveTownTeamDataLevel3(Map<String, Map<String, Map<String, List<ETLModel>>>> etlModelMap, String day, Map<String, Town> townsMap, Integer foreachNum2, Integer foreachNum3, Integer type, Integer start2, Integer start3) {
 | 
	
		
			
				|  |  |         //遍历团队的Map
 | 
	
		
			
				|  |  |         for(Map.Entry<String,Town> oneTownTeam:townsMap.entrySet()){
 | 
	
		
			
				|  |  |             //得到每个团队的2级维度
 | 
	
		
			
				|  |  |             Map<String, Map<String, List<ETLModel>>> twoETLMap= etlModelMap.get(oneTownTeam.getKey());
 | 
	
		
			
				|  |  |             for(int i=start2;i<=foreachNum2;i++){
 | 
	
		
			
				|  |  |                 //得到每个团队的三级维度
 | 
	
		
			
				|  |  |                 Map<String, List<ETLModel>> threeETLMap= new HashMap<String, List<ETLModel>>();
 | 
	
		
			
				|  |  |                 if(twoETLMap!=null){
 | 
	
		
			
				|  |  |                     threeETLMap=twoETLMap.get(i);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for(int j=start3;j<=foreachNum3;j++){
 | 
	
		
			
				|  |  |                     int num=0;
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModelList= threeETLMap.get(i);
 | 
	
		
			
				|  |  |                     if(etlModelList!=null&&etlModelList.size()>0){
 | 
	
		
			
				|  |  |                         num=etlModelList.size();
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     Town townObj=townsMap.get(oneTownTeam.getKey());
 | 
	
		
			
				|  |  |                     if(townObj==null)continue;
 | 
	
		
			
				|  |  |                     String city=Constant.city;
 | 
	
		
			
				|  |  |                     String cityName=Constant.cityName;
 | 
	
		
			
				|  |  |                     String town=townObj.getCode();
 | 
	
		
			
				|  |  |                     String townName=townObj.getName();
 | 
	
		
			
				|  |  |                     String org="";
 | 
	
		
			
				|  |  |                     String orgName="";
 | 
	
		
			
				|  |  |                     String doctorCode="";
 | 
	
		
			
				|  |  |                     String doctorName="";
 | 
	
		
			
				|  |  |                     String doctorJob="";
 | 
	
		
			
				|  |  |                     String level="1";
 | 
	
		
			
				|  |  |                     String level2=i+"";
 | 
	
		
			
				|  |  |                     String level3=j+"";
 | 
	
		
			
				|  |  |                     String level3Name=getLevel3Name(level3,type);
 | 
	
		
			
				|  |  |                     save(num, city, cityName, town, townName, org, orgName, doctorCode, doctorName, doctorJob, level,level2,null,level3,level3Name,day);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     private void saveCityTeamDataLevel3(Map<String, Map<String, Map<String, List<ETLModel>>>> etlModelMap, String day, Map<String, City> cityMap, Integer foreachNum2, Integer foreachNum3, Integer type, Integer start2, Integer start3) {
 | 
	
		
			
				|  |  |         //遍历团队的Map
 | 
	
		
			
				|  |  |         for(Map.Entry<String,City> oneCityTeam:cityMap.entrySet()){
 | 
	
		
			
				|  |  |             //得到每个团队的2级维度
 | 
	
		
			
				|  |  |             Map<String, Map<String, List<ETLModel>>> twoETLMap= etlModelMap.get(oneCityTeam.getKey());
 | 
	
		
			
				|  |  |             for(int i=start2;i<=foreachNum2;i++){
 | 
	
		
			
				|  |  |                 //得到每个团队的三级维度
 | 
	
		
			
				|  |  |                 Map<String, List<ETLModel>> threeETLMap= new HashMap<String, List<ETLModel>>();
 | 
	
		
			
				|  |  |                 if(twoETLMap!=null){
 | 
	
		
			
				|  |  |                     threeETLMap=twoETLMap.get(i);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 for(int j=start3;j<=foreachNum3;j++){
 | 
	
		
			
				|  |  |                     int num=0;
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModelList= threeETLMap.get(i);
 | 
	
		
			
				|  |  |                     if(etlModelList!=null&&etlModelList.size()>0){
 | 
	
		
			
				|  |  |                         num=etlModelList.size();
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     String city=Constant.city;
 | 
	
		
			
				|  |  |                     String cityName=Constant.cityName;
 | 
	
		
			
				|  |  |                     String town="";
 | 
	
		
			
				|  |  |                     String townName="";
 | 
	
		
			
				|  |  |                     String org="";
 | 
	
		
			
				|  |  |                     String orgName="";
 | 
	
		
			
				|  |  |                     String doctorCode="";
 | 
	
		
			
				|  |  |                     String doctorName="";
 | 
	
		
			
				|  |  |                     String doctorJob="";
 | 
	
		
			
				|  |  |                     String level="1";
 | 
	
		
			
				|  |  |                     String level2=i+"";
 | 
	
		
			
				|  |  |                     String level3=j+"";
 | 
	
		
			
				|  |  |                     String level3Name=getLevel3Name(level3,type);
 | 
	
		
			
				|  |  |                     save(num, city, cityName, town, townName, org, orgName, doctorCode, doctorName, doctorJob, level,level2,null,level3,level3Name,day);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void level2Public(List<Map<String, Map<String, List<ETLModel>>>> data, String day, Integer foreachNum, Integer type, Integer start)throws Exception {
 | 
	
		
			
				|  |  |         List<AdminTeam> adminTeams=doctorAdminTeamDao.findAllTeam();
 | 
	
		
			
				|  |  |         for (AdminTeam adminTeam : adminTeams) {
 | 
	
		
			
				|  |  |             adminTeamMap.put(adminTeam.getId()+"", adminTeam);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //查找出系统全部的机构
 | 
	
		
			
				|  |  |         List<Hospital> hospitals = hospitalDao.findHospitalzxFWZ();
 | 
	
		
			
				|  |  |         for (Hospital hospital : hospitals) {
 | 
	
		
			
				|  |  |             hospitalsMap.put(hospital.getCode(), hospital);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //查找出厦门市全部的区
 | 
	
		
			
				|  |  |         List<Town> towns = townDao.findByCityCode(Constant.city);
 | 
	
		
			
				|  |  |         for (Town town : towns) {
 | 
	
		
			
				|  |  |             townsMap.put(town.getCode(), town);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //全部的市
 | 
	
		
			
				|  |  |         City city=new City();
 | 
	
		
			
				|  |  |         city.setCode(Constant.city);
 | 
	
		
			
				|  |  |         city.setName(Constant.cityName);
 | 
	
		
			
				|  |  |         Map<String, City> cityMap = new HashMap<String, City>();
 | 
	
		
			
				|  |  |         cityMap.put(Constant.city,city);
 | 
	
		
			
				|  |  |         //保存团队
 | 
	
		
			
				|  |  |         saveAdminTeamDataLevel2(data.get(0),day,adminTeamMap,foreachNum,type,start);
 | 
	
		
			
				|  |  |         //保存机构
 | 
	
		
			
				|  |  |         saveHospitalTeamDataLevel2(data.get(1),day,hospitalsMap,foreachNum,type,start);
 | 
	
		
			
				|  |  |         //保存区
 | 
	
		
			
				|  |  |         saveTownTeamDataLevel2(data.get(2),day,townsMap,foreachNum,type,start);
 | 
	
		
			
				|  |  |         //保存市
 | 
	
		
			
				|  |  |         saveCityTeamDataLevel2(data.get(3),day,cityMap,foreachNum,type,start);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveCityTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, City> citysMap ,Integer foreachNum,Integer type,Integer start) {
 | 
	
		
			
				|  |  |          for(Map.Entry<String,City> oneCity:citysMap.entrySet()){
 | 
	
		
			
				|  |  |              Map<String, List<ETLModel>> oneELTMap= etlModelMap.get(oneCity.getKey());
 | 
	
		
			
				|  |  |              for(int i=1;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |              for(int i=start;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |                  int num=0;
 | 
	
		
			
				|  |  |                  if(oneELTMap!=null){
 | 
	
		
			
				|  |  |                      List<ETLModel> etlModel= oneELTMap.get(i+"");
 | 
	
	
		
			
				|  | @ -155,10 +416,10 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveTownTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, Town> townsMap ,Integer foreachNum,Integer type) {
 | 
	
		
			
				|  |  |     private void saveTownTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, Town> townsMap ,Integer foreachNum,Integer type,Integer start) {
 | 
	
		
			
				|  |  |         for(Map.Entry<String,Town> oneTown:townsMap.entrySet()){
 | 
	
		
			
				|  |  |             Map<String, List<ETLModel>> oneELTMap= etlModelMap.get(oneTown.getKey());
 | 
	
		
			
				|  |  |             for(int i=1;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |             for(int i=start;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |                 int num=0;
 | 
	
		
			
				|  |  |                 if(oneELTMap!=null){
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModel= oneELTMap.get(i+"");
 | 
	
	
		
			
				|  | @ -184,10 +445,10 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveHospitalTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, Hospital> hospitalsMap,Integer foreachNum,Integer type) {
 | 
	
		
			
				|  |  |     private void saveHospitalTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, Hospital> hospitalsMap,Integer foreachNum,Integer type,Integer start) {
 | 
	
		
			
				|  |  |         for(Map.Entry<String,Hospital> oneHospital:hospitalsMap.entrySet()){
 | 
	
		
			
				|  |  |             Map<String, List<ETLModel>> oneELTMap= etlModelMap.get(oneHospital.getKey());
 | 
	
		
			
				|  |  |             for(int i=1;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |             for(int i=start;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |                 int num=0;
 | 
	
		
			
				|  |  |                 if(oneELTMap!=null){
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModel= oneELTMap.get(i+"");
 | 
	
	
		
			
				|  | @ -214,10 +475,10 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private void saveAdminTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, AdminTeam> adminTeamMap,Integer foreachNum,Integer type) {
 | 
	
		
			
				|  |  |     private void saveAdminTeamDataLevel2(Map<String, Map<String, List<ETLModel>>> etlModelMap, String day, Map<String, AdminTeam> adminTeamMap,Integer foreachNum,Integer type,Integer start) {
 | 
	
		
			
				|  |  |         for(Map.Entry<String,AdminTeam> adminTeam:adminTeamMap.entrySet()){
 | 
	
		
			
				|  |  |             Map<String, List<ETLModel>> oneELTMap= etlModelMap.get(adminTeam.getKey());
 | 
	
		
			
				|  |  |             for(int i=1;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |             for(int i=start;i<=foreachNum;i++){
 | 
	
		
			
				|  |  |                 int num=0;
 | 
	
		
			
				|  |  |                 if(oneELTMap!=null){
 | 
	
		
			
				|  |  |                     List<ETLModel> etlModel= oneELTMap.get(i+"");
 | 
	
	
		
			
				|  | @ -401,11 +662,25 @@ public class DBStorage   {
 | 
	
		
			
				|  |  |                 //用户分组
 | 
	
		
			
				|  |  |                 return Constant.getLevelGroupName(i);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             case  4:{
 | 
	
		
			
				|  |  |                 //费用类别
 | 
	
		
			
				|  |  |                 return Constant.getLevelExpenseName(i);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             default:{
 | 
	
		
			
				|  |  |                 return "";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private String getLevel3Name(String j, Integer type) {
 | 
	
		
			
				|  |  |         switch (type){
 | 
	
		
			
				|  |  |             case  1:{
 | 
	
		
			
				|  |  |                 //签约费用
 | 
	
		
			
				|  |  |                 return Constant.getLevelExpenseName(j);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             default:{
 | 
	
		
			
				|  |  |                 return "";
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |