|  |  | @ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.bean.ResiImportCategoryData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.bean.ResiImportResiCategoryChangedCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.bean.ResiImportChangedData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.AppClientConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.ServiceConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.StrConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.ThreadLocalConstant; | 
			
		
	
	
		
			
				
					|  |  | @ -23,7 +24,6 @@ import com.epmet.commons.tools.feign.ResultDataResolver; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.RedisKeys; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.RedisUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.user.LoginUserUtil; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constants.ImportTaskConstants; | 
			
		
	
	
		
			
				
					|  |  | @ -103,10 +103,6 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     Cache<String, Map<String, Map<String, String>>> itemIdAndOptionsCache = CacheBuilder.newBuilder().maximumSize(500).build(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private LoginUserUtil loginUserUtil; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private EpmetUserOpenFeignClient epmetUserOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -217,22 +213,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public void importIcResiInfoFromExcel(String importTaskId, List<FormItemResult> formItemList, String excelPathName, HttpServletResponse response, Path importTempPath) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp = loginUserUtil.getLoginUserApp(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = loginUserUtil.getLoginUserClient(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("importIcResiInfoFromExcel:: userId:{}, app:{}, client:{}, customerId:{}", loginUserId, loginUserApp, loginUserClient, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  |         String app =  ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.APP); | 
			
		
	
		
			
				
					|  |  |  |         String client = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CLIENT); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //        LoginUserDetailsFormDTO userForm = new LoginUserDetailsFormDTO();
 | 
			
		
	
		
			
				
					|  |  |  | //        userForm.setApp(loginUserApp);
 | 
			
		
	
		
			
				
					|  |  |  | //        userForm.setClient(loginUserClient);
 | 
			
		
	
		
			
				
					|  |  |  | //        userForm.setUserId(loginUserId);
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String currUserAgencyId = userService.getLoginUserDetails( | 
			
		
	
		
			
				
					|  |  |  |                 loginUserApp, | 
			
		
	
		
			
				
					|  |  |  |                 loginUserClient, | 
			
		
	
		
			
				
					|  |  |  |                 loginUserId).getAgencyId(); | 
			
		
	
		
			
				
					|  |  |  |         String currUserAgencyId = userService.getLoginUserDetails(app, client, loginUserId).getAgencyId(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("importIcResiInfoFromExcel:: currUserAgencyId:{}", currUserAgencyId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -331,7 +316,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     private void initImportThreadLocal(String customerId) { | 
			
		
	
		
			
				
					|  |  |  |         // 生成importTag,用于标记唯一一次导入操作,导入完成之后,用来删除redis里面临时的key
 | 
			
		
	
		
			
				
					|  |  |  |         String operatorId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String operatorId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String importTag = operatorId + System.currentTimeMillis(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         // 错误信息
 | 
			
		
	
	
		
			
				
					|  |  | @ -371,10 +356,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |     private void importIcResiBaseInfoFromExcel(List<FormItemResult> formItemList, String excelPathName, int sheetNo, int headRowNumber, String currUserAgencyId, String currUserAgencyPids, String currentUserId, | 
			
		
	
		
			
				
					|  |  |  |                                                  String tableName, String customerId) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp = loginUserUtil.getLoginUserApp(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = loginUserUtil.getLoginUserClient(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp =  ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.APP); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CLIENT); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("importIcResiBaseInfoFromExcel:: userId:{}, app:{}, client:{}, customerId:{}", loginUserId, loginUserApp, loginUserClient, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -430,10 +415,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |                                        String currUserAgencyId, Map<Integer, String> checkBoxOptionColumnIdxAndLabel, | 
			
		
	
		
			
				
					|  |  |  |                                        String currUserAgencyPids, String currentUserId, String tableName) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp = loginUserUtil.getLoginUserApp(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = loginUserUtil.getLoginUserClient(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp =  ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.APP); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CLIENT); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("persistIcResiBaseInfo:: userId:{}, app:{}, client:{}, customerId:{}", loginUserId, loginUserApp, loginUserClient, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -562,10 +547,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         LinkedHashMap<String, String> columnAndValues = new LinkedHashMap<>(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp = loginUserUtil.getLoginUserApp(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = loginUserUtil.getLoginUserClient(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp =  ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.APP); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CLIENT); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("persistIcResiExtraInfo:: userId:{}, app:{}, client:{}, customerId:{}", loginUserId, loginUserApp, loginUserClient, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1297,7 +1282,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         Date now = new Date(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(loginUserUtil.getLoginUserCustomerId(), loginUserUtil.getLoginUserId()); | 
			
		
	
		
			
				
					|  |  |  |         String customerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String userId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(customerId, userId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         for (Map.Entry<String, ResiImportChangedData> entry : categoryChangedResis.entrySet()) { | 
			
		
	
		
			
				
					|  |  |  |             String resiId = entry.getKey(); | 
			
		
	
	
		
			
				
					|  |  | @ -1326,7 +1314,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             // 生成changeRecord并存入
 | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity changeRecord = fillChangeRecord(loginUserUtil.getLoginUserCustomerId(), resiId, resiInfoMap.get("NAME"), null, loginUserUtil.getLoginUserId(), | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity changeRecord = fillChangeRecord(customerId, resiId, resiInfoMap.get("NAME"), null, userId, | 
			
		
	
		
			
				
					|  |  |  |                     operator.getRealName() , descBefore, descAfter, "category", "类别", "", now); | 
			
		
	
		
			
				
					|  |  |  |             icUserChangeRecordDao.insert(changeRecord); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1346,7 +1334,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |                 String unitId = newData.getUnitId(); | 
			
		
	
		
			
				
					|  |  |  |                 String homeId = newData.getHomeId(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeDetailedEntity newDetail = fillChangeDetail(loginUserUtil.getLoginUserCustomerId(), resiId, changeRecord.getId(), agencyId, | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeDetailedEntity newDetail = fillChangeDetail(customerId, resiId, changeRecord.getId(), agencyId, | 
			
		
	
		
			
				
					|  |  |  |                         gridId, villageId, buildId, unitId, | 
			
		
	
		
			
				
					|  |  |  |                         homeId, "category", "类别", columnEntry.getKey(), 1, resiInfoMap.get("PIDS")); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1391,7 +1379,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         Set<String> newResiKeys = redisUtils.keys(RedisKeys.icResiImportTypeKey(newlyOrChangedResi.get().getImportTag(), "add").concat("*")); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(loginUserUtil.getLoginUserCustomerId(), loginUserUtil.getLoginUserId()); | 
			
		
	
		
			
				
					|  |  |  |         String customerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String userId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(customerId, userId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         for (String resiKey : newResiKeys) { | 
			
		
	
		
			
				
					|  |  |  |             Map<String, Object> newResiInfoMap = redisUtils.hGetAll(resiKey); | 
			
		
	
	
		
			
				
					|  |  | @ -1400,14 +1391,14 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             IcResiUserEntity resiInfo = icResiUserDao.selectById(newResiInfoObj.getResiId()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             // 插入changeRecord
 | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity changeRecord = fillChangeRecord(loginUserUtil.getLoginUserCustomerId(), newResiInfoObj.getResiId(), resiInfo.getName(), null, | 
			
		
	
		
			
				
					|  |  |  |                     loginUserUtil.getLoginUserId(), operator.getRealName(), "-", "-", | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity changeRecord = fillChangeRecord(customerId, newResiInfoObj.getResiId(), resiInfo.getName(), null, | 
			
		
	
		
			
				
					|  |  |  |                     userId, operator.getRealName(), "-", "-", | 
			
		
	
		
			
				
					|  |  |  |                     "add", "新增", "", now); | 
			
		
	
		
			
				
					|  |  |  |             icUserChangeRecordDao.insert(changeRecord); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             // 插入changeDetail
 | 
			
		
	
		
			
				
					|  |  |  |             for (Map.Entry<String, String> mainTableColumn : newResiInfoObj.getCategories().entrySet()) { | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeDetailedEntity changedetail = fillChangeDetail(loginUserUtil.getLoginUserCustomerId(), newResiInfoObj.getResiId(), changeRecord.getId(), newResiInfoObj.getAgencyId(), | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeDetailedEntity changedetail = fillChangeDetail(customerId, newResiInfoObj.getResiId(), changeRecord.getId(), newResiInfoObj.getAgencyId(), | 
			
		
	
		
			
				
					|  |  |  |                         newResiInfoObj.getGridId(), newResiInfoObj.getVillageId(), newResiInfoObj.getBuildId(), newResiInfoObj.getUnitId(), | 
			
		
	
		
			
				
					|  |  |  |                         newResiInfoObj.getHomeId(), "add", "新增", mainTableColumn.getKey(), 1, resiInfo.getPids()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1426,8 +1417,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     public void saveTransferedResiRecord(Map<String, ResiImportChangedData> transferedResis) { | 
			
		
	
		
			
				
					|  |  |  |         Date now = new Date(); | 
			
		
	
		
			
				
					|  |  |  |         String customerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(customerId, loginUserUtil.getLoginUserId()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult operator = CustomerStaffRedis.getStaffInfo(loginUserCustomerId, loginUserId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         for (Map.Entry<String, ResiImportChangedData> resi : transferedResis.entrySet()) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1460,7 +1452,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             String newHomeId = newData.getHomeId(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             IcResiUserOrgMsgFormDTO oldOrgFormDTO = new IcResiUserOrgMsgFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |             oldOrgFormDTO.setCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |             oldOrgFormDTO.setCustomerId(loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  |             oldOrgFormDTO.setAgencyId(oldAgencyId); | 
			
		
	
		
			
				
					|  |  |  |             oldOrgFormDTO.setGridId(oldGridId); | 
			
		
	
		
			
				
					|  |  |  |             oldOrgFormDTO.setNeighborHoodId(oldvillageId); | 
			
		
	
	
		
			
				
					|  |  | @ -1470,7 +1462,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             Result<IcResiUserOrgMsgResultDTO> oldOrgInfoRst = govOrgOpenFeignClient.icResiUserOrgMsg(oldOrgFormDTO); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             IcResiUserOrgMsgFormDTO newOrgInfo = new IcResiUserOrgMsgFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |             newOrgInfo.setCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |             newOrgInfo.setCustomerId(loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  |             newOrgInfo.setAgencyId(newAgencyId); | 
			
		
	
		
			
				
					|  |  |  |             newOrgInfo.setGridId(newGridId); | 
			
		
	
		
			
				
					|  |  |  |             newOrgInfo.setNeighborHoodId(newvillageId); | 
			
		
	
	
		
			
				
					|  |  | @ -1540,13 +1532,13 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             // 保存 transferRecord
 | 
			
		
	
		
			
				
					|  |  |  |             IcUserTransferRecordEntity transferRecord = fillTransferRecord(resiId, resiName, operator, customerId, | 
			
		
	
		
			
				
					|  |  |  |                     oldAgencyId, oldGridId, oldvillageId, oldBuildId, oldUnitId, oldHomeId, customerId, | 
			
		
	
		
			
				
					|  |  |  |             IcUserTransferRecordEntity transferRecord = fillTransferRecord(resiId, resiName, operator, loginUserCustomerId, | 
			
		
	
		
			
				
					|  |  |  |                     oldAgencyId, oldGridId, oldvillageId, oldBuildId, oldUnitId, oldHomeId, loginUserCustomerId, | 
			
		
	
		
			
				
					|  |  |  |                     newAgencyId, newGridId, newvillageId, newBuildId, newUnitId, newHomeId, oldOrg, newOrg); | 
			
		
	
		
			
				
					|  |  |  |             icUserTransferRecordDao.insert(transferRecord); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             // 保存 调动changeRecord
 | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity transferChangeRecord = fillChangeRecord(customerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), | 
			
		
	
		
			
				
					|  |  |  |             IcUserChangeRecordEntity transferChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), | 
			
		
	
		
			
				
					|  |  |  |                     operator.getRealName(), sbBefore.toString(), sbAfter.toString(), "transfer", "调动", "", now); | 
			
		
	
		
			
				
					|  |  |  |             icUserChangeRecordDao.insert(transferChangeRecord); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -1580,7 +1572,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |             String categoryDescAfter = sbAfter.toString(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             if (!StringUtils.isAllBlank(categoryDescBefore, categoryDescAfter)) { | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeRecordEntity categoryChangeRecord = fillChangeRecord(customerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), | 
			
		
	
		
			
				
					|  |  |  |                 IcUserChangeRecordEntity categoryChangeRecord = fillChangeRecord(loginUserCustomerId, resiId, resiName, transferRecord.getId(), operator.getStaffId(), | 
			
		
	
		
			
				
					|  |  |  |                         operator.getRealName(), categoryDescBefore, categoryDescAfter , "category", "类别", "", now); | 
			
		
	
		
			
				
					|  |  |  |                 icUserChangeRecordDao.insert(categoryChangeRecord); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
	
		
			
				
					|  |  | @ -1593,7 +1585,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |                 // 之前是这个类型,那这个类型需要-1
 | 
			
		
	
		
			
				
					|  |  |  |                 String oldValue = oldCategories.getValue(); | 
			
		
	
		
			
				
					|  |  |  |                 if ("1".equals(oldValue)) { | 
			
		
	
		
			
				
					|  |  |  |                     IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, transferChangeRecord.getId(), oldAgencyId, | 
			
		
	
		
			
				
					|  |  |  |                     IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId, | 
			
		
	
		
			
				
					|  |  |  |                             oldGridId, oldvillageId, oldBuildId, oldUnitId, | 
			
		
	
		
			
				
					|  |  |  |                             oldHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, -1, pids); | 
			
		
	
		
			
				
					|  |  |  |                     icUserChangeDetailedDao.insert(changeDetail); | 
			
		
	
	
		
			
				
					|  |  | @ -1607,7 +1599,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                 // 现在是这个类型,这个类型要+1
 | 
			
		
	
		
			
				
					|  |  |  |                 if ("1".equals(newValue)) { | 
			
		
	
		
			
				
					|  |  |  |                     IcUserChangeDetailedEntity changeDetail = fillChangeDetail(customerId, resiId, transferChangeRecord.getId(), newAgencyId, | 
			
		
	
		
			
				
					|  |  |  |                     IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId, | 
			
		
	
		
			
				
					|  |  |  |                             newGridId, newvillageId, newBuildId, newUnitId, | 
			
		
	
		
			
				
					|  |  |  |                             newHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, 1, pids); | 
			
		
	
		
			
				
					|  |  |  |                     icUserChangeDetailedDao.insert(changeDetail); | 
			
		
	
	
		
			
				
					|  |  | @ -1840,11 +1832,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     public void printLog(String positionPrefix) { | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = loginUserUtil.getLoginUserId(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserApp = loginUserUtil.getLoginUserApp(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserClient = loginUserUtil.getLoginUserClient(); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         String app =  ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.APP); | 
			
		
	
		
			
				
					|  |  |  |         String client = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CLIENT); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.USER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  |         String loginUserCustomerId = ThreadLocalConstant.inheritableAdditionalHeaders.get().get(AppClientConstant.CUSTOMER_ID.toLowerCase()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         log.info("{}:: userId:{}, app:{}, client:{}, customerId:{}", positionPrefix, loginUserId, loginUserApp, loginUserClient, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  |         log.info("{}:: userId:{}, app:{}, client:{}, customerId:{}", positionPrefix, loginUserId, app, client, loginUserCustomerId); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |