diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index c566599fa7..ffeaea8246 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -401,7 +401,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res * @return */ private void importIcResiBaseInfoFromExcel(List formItemList, String excelPathName, IcResiUserTableEnum sheetTableEnum, String currUserAgencyId, String currUserAgencyPids, String currentUserId, - String customerId) { + String customerId) { IcResiImportDynamicExcelListener readListener = new IcResiImportDynamicExcelListener(this, customerId, currentUserId, currUserAgencyId, currUserAgencyPids, true, formItemList, sheetTableEnum); @@ -456,8 +456,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res * @param checkBoxOptionColumnIdxAndLabel 复选框的列号&label中文 */ public void persistIcResiBaseInfo(Map itemIdAndColumnWrapper, List> dataRows, - String currUserAgencyId, Map checkBoxOptionColumnIdxAndLabel, - String currUserAgencyPids, String currentUserId, String tableName) { + String currUserAgencyId, Map checkBoxOptionColumnIdxAndLabel, + String currUserAgencyPids, String currentUserId, String tableName) { String loginUserCustomerId = EpmetRequestHolder.getLoginUserCustomerId(); // 遍历每一行,将行内容转化为 for (Map row : dataRows) { @@ -691,8 +691,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res * @param targetTableName 要插入到哪一个表 */ public List persistIcResiExtraInfo(Map headerColumnWrapper, List> dataRows, - String currUserAgencyId, Map checkBoxOptionColumnIdxAndLabel, - String currentUserId, String targetTableName, String customerId) { + String currUserAgencyId, Map checkBoxOptionColumnIdxAndLabel, + String currentUserId, String targetTableName, String customerId) { LinkedHashMap columnAndValues = new LinkedHashMap<>(); @@ -1383,35 +1383,41 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res } List options = null; + String optionTypeName = null; switch (pureUri) { case "/gov/org/customergrid/gridoption": + optionTypeName = "网格"; GridOptionFormDTO form = new GridOptionFormDTO(); form.setAgencyId(currUserAgencyId); form.setPurpose(purpose); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/customerpartybranch/branchoption": - + optionTypeName = "所属支部"; CustomerPartyBranchDTO bform = new CustomerPartyBranchDTO(); bform.setGridId(cascadeItemColumnWrapper.getColValue()); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuilding/buildingoption": + optionTypeName = "楼栋"; IcBuildingDTO buildingform = new IcBuildingDTO(); buildingform.setNeighborHoodId(cascadeItemColumnWrapper.getColValue()); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuildingunit/unitoption": + optionTypeName = "单元"; IcBuildingUnitDTO buForm = new IcBuildingUnitDTO(); buForm.setBuildingId(cascadeItemColumnWrapper.getColValue()); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/ichouse/houseoption": + optionTypeName = "房屋"; HouseFormDTO hform = new HouseFormDTO(); hform.setUnitId(cascadeItemColumnWrapper.getColValue()); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icneighborhood/neighborhoodoption": + optionTypeName = "所属小区"; IcNeighborHoodDTO nform = new IcNeighborHoodDTO(); String gridId = cascadeItemColumnWrapper.getColValue(); if (StringUtils.isBlank(gridId)){ @@ -1422,21 +1428,27 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/education": + optionTypeName = "文化程度"; options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/house": + optionTypeName = "住房性质"; options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/nation": + optionTypeName = "民族"; options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/ninesmallplaces": + optionTypeName = "九小场所"; options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/relationship": + optionTypeName = "人员关系"; options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/resi/partymember/icPartyOrg/branchlist": + optionTypeName = "所属支部"; options = this.listBranchOptions(); break; default: @@ -1451,9 +1463,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res return options.stream().collect(Collectors.toMap(OptionResultDTO::getLabel, OptionResultDTO::getValue)); } catch (Exception e) { String erroMsg = ExceptionUtils.getErrorStackTrace(e); - log.error("【居民信息导入】转化Options为map失败,url:{}, cascadeItemId:{}, currUserAgencyId:{},错误信息:{}", - pureUri, cascadeItemId, currUserAgencyId, erroMsg); - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "解析内容失败,请确保所填写内容准确。"); + log.error("【居民信息导入】{}转化Options为map失败,url:{}, cascadeItemId:{}, currUserAgencyId:{},错误信息:{}", + optionTypeName, pureUri, cascadeItemId, currUserAgencyId, erroMsg); + + String hintMsg = optionTypeName + "解析失败"; + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), hintMsg, hintMsg); } // 通用api调用,无法实现 @@ -2042,7 +2056,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res // 保存 changeDetail for (Map.Entry newCategories : newData.getCategories().entrySet()) { String key = newCategories.getKey(); - String newValue = newCategories.getValue(); + String newValue = newCategories.getValue(); // 现在是这个类型,这个类型要+1 if ("1".equals(newValue)) {