|  | @ -27,6 +27,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.utils.Result; |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.IcResiUserDao; |  |  | import com.epmet.dao.IcResiUserDao; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.IcUserTransferRecordDao; |  |  | import com.epmet.dao.IcUserTransferRecordDao; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.IcResiCategoryStatsConfigDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.IcResiCategoryWarnConfigDTO; |  |  | import com.epmet.dto.IcResiCategoryWarnConfigDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.IcResiUserDTO; |  |  | import com.epmet.dto.IcResiUserDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.IcResiUserOrgMsgFormDTO; |  |  | import com.epmet.dto.form.IcResiUserOrgMsgFormDTO; | 
			
		
	
	
		
		
			
				
					|  | @ -51,6 +52,7 @@ import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
		
			
				
					|  |  | import java.util.ArrayList; |  |  | import java.util.ArrayList; | 
			
		
	
		
		
			
				
					|  |  | import java.util.List; |  |  | import java.util.List; | 
			
		
	
		
		
			
				
					|  |  | import java.util.Map; |  |  | import java.util.Map; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | /** |  |  | /** | 
			
		
	
		
		
			
				
					|  |  |  * 居民调动记录表 |  |  |  * 居民调动记录表 | 
			
		
	
	
		
		
			
				
					|  | @ -173,12 +175,15 @@ public class IcUserTransferRecordServiceImpl extends BaseServiceImpl<IcUserTrans | 
			
		
	
		
		
			
				
					|  |  |         changeRecordEntity.setRemark(formDTO.getRemark()); |  |  |         changeRecordEntity.setRemark(formDTO.getRemark()); | 
			
		
	
		
		
			
				
					|  |  |         icUserChangeRecordService.insert(changeRecordEntity); |  |  |         icUserChangeRecordService.insert(changeRecordEntity); | 
			
		
	
		
		
			
				
					|  |  |         //6-2.变更明细【类别明细迁出组织的-1,迁入组织的1】
 |  |  |         //6-2.变更明细【类别明细迁出组织的-1,迁入组织的1】
 | 
			
		
	
		
		
			
				
					
					|  |  |         Result<List<IcResiCategoryWarnConfigDTO>> resultList = operCustomizeOpenFeignClient.categoryWarnConfigList(formDTO.getCustomerId()); |  |  |         IcResiCategoryStatsConfigDTO dto = new IcResiCategoryStatsConfigDTO(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         if (!resultList.success()) { |  |  |         dto.setCustomerId(formDTO.getCustomerId()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             throw new RuntimeException("人员调动,获取客户居民类别预警配置表数据失败"); |  |  |         Result<List<IcResiCategoryStatsConfigDTO>> categoryListResult = operCustomizeOpenFeignClient.getCategoryList(dto); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         if (!categoryListResult.success()){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             throw new RenException("人员调动,获取客户居民类别预警配置表数据失败"); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |         Map<String, String> map = icResiUserDao.getCategoryListMap(formDTO.getIcUserId()); |  |  |         List<String> columns = categoryListResult.getData().stream().map(IcResiCategoryStatsConfigDTO::getColumnName).collect(Collectors.toList()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         List<IcUserChangeDetailedEntity> changeDetailedEntityList = saveChangeDetailed(resultList.getData(), map, changeRecordEntity.getId(), formDTO, resiUserDTO); |  |  |         Map<String, String> map = icResiUserDao.getCategoryListMap(columns, formDTO.getIcUserId()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         List<IcUserChangeDetailedEntity> changeDetailedEntityList = saveChangeDetailed(categoryListResult.getData(), map, changeRecordEntity.getId(), formDTO, resiUserDTO); | 
			
		
	
		
		
			
				
					|  |  |         icUserChangeDetailedService.insertBatch(changeDetailedEntityList); |  |  |         icUserChangeDetailedService.insertBatch(changeDetailedEntityList); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | @ -231,7 +236,7 @@ public class IcUserTransferRecordServiceImpl extends BaseServiceImpl<IcUserTrans | 
			
		
	
		
		
			
				
					|  |  |      * @Author sun |  |  |      * @Author sun | 
			
		
	
		
		
			
				
					|  |  |      * @Description 变更明细 |  |  |      * @Description 变更明细 | 
			
		
	
		
		
			
				
					|  |  |      **/ |  |  |      **/ | 
			
		
	
		
		
			
				
					
					|  |  |     private List<IcUserChangeDetailedEntity> saveChangeDetailed(List<IcResiCategoryWarnConfigDTO> configList, Map<String, String> map, String icUserChangeRecordId, IcResiUserTransferFormDTO formDTO, IcResiUserDTO resiUserDTO) { |  |  |     private List<IcUserChangeDetailedEntity> saveChangeDetailed(List<IcResiCategoryStatsConfigDTO> configList, Map<String, String> map, String icUserChangeRecordId, IcResiUserTransferFormDTO formDTO, IcResiUserDTO resiUserDTO) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         List<IcUserChangeDetailedEntity> list = new ArrayList<>(); |  |  |         List<IcUserChangeDetailedEntity> list = new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |         IcUserChangeDetailedEntity outEntity = null; |  |  |         IcUserChangeDetailedEntity outEntity = null; | 
			
		
	
		
		
			
				
					|  |  |         IcUserChangeDetailedEntity inEntity = null; |  |  |         IcUserChangeDetailedEntity inEntity = null; | 
			
		
	
	
		
		
			
				
					|  | @ -246,7 +251,7 @@ public class IcUserTransferRecordServiceImpl extends BaseServiceImpl<IcUserTrans | 
			
		
	
		
		
			
				
					|  |  |                 throw new EpmetException(String.format("查询组织信息失败%s", formDTO.getNewAgencyId())); |  |  |                 throw new EpmetException(String.format("查询组织信息失败%s", formDTO.getNewAgencyId())); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |         for (IcResiCategoryWarnConfigDTO cf : configList) { |  |  |         for (IcResiCategoryStatsConfigDTO cf : configList) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |             if ("1".equals(map.get(cf.getColumnName()))) { |  |  |             if ("1".equals(map.get(cf.getColumnName()))) { | 
			
		
	
		
		
			
				
					|  |  |                 //迁出
 |  |  |                 //迁出
 | 
			
		
	
		
		
			
				
					|  |  |                 outEntity = new IcUserChangeDetailedEntity(); |  |  |                 outEntity = new IcUserChangeDetailedEntity(); | 
			
		
	
	
		
		
			
				
					|  | 
 |