YUJT 3 years ago
parent
commit
f886de36fe
  1. 22
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

22
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -1383,35 +1383,41 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
} }
List<OptionResultDTO> options = null; List<OptionResultDTO> options = null;
String optionTypeName = null;
switch (pureUri) { switch (pureUri) {
case "/gov/org/customergrid/gridoption": case "/gov/org/customergrid/gridoption":
optionTypeName = "网格";
GridOptionFormDTO form = new GridOptionFormDTO(); GridOptionFormDTO form = new GridOptionFormDTO();
form.setAgencyId(currUserAgencyId); form.setAgencyId(currUserAgencyId);
form.setPurpose(purpose); form.setPurpose(purpose);
options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/gov/org/customerpartybranch/branchoption": case "/gov/org/customerpartybranch/branchoption":
optionTypeName = "所属支部";
CustomerPartyBranchDTO bform = new CustomerPartyBranchDTO(); CustomerPartyBranchDTO bform = new CustomerPartyBranchDTO();
bform.setGridId(cascadeItemColumnWrapper.getColValue()); bform.setGridId(cascadeItemColumnWrapper.getColValue());
options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/gov/org/icbuilding/buildingoption": case "/gov/org/icbuilding/buildingoption":
optionTypeName = "楼栋";
IcBuildingDTO buildingform = new IcBuildingDTO(); IcBuildingDTO buildingform = new IcBuildingDTO();
buildingform.setNeighborHoodId(cascadeItemColumnWrapper.getColValue()); buildingform.setNeighborHoodId(cascadeItemColumnWrapper.getColValue());
options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/gov/org/icbuildingunit/unitoption": case "/gov/org/icbuildingunit/unitoption":
optionTypeName = "单元";
IcBuildingUnitDTO buForm = new IcBuildingUnitDTO(); IcBuildingUnitDTO buForm = new IcBuildingUnitDTO();
buForm.setBuildingId(cascadeItemColumnWrapper.getColValue()); buForm.setBuildingId(cascadeItemColumnWrapper.getColValue());
options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/gov/org/ichouse/houseoption": case "/gov/org/ichouse/houseoption":
optionTypeName = "房屋";
HouseFormDTO hform = new HouseFormDTO(); HouseFormDTO hform = new HouseFormDTO();
hform.setUnitId(cascadeItemColumnWrapper.getColValue()); hform.setUnitId(cascadeItemColumnWrapper.getColValue());
options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/gov/org/icneighborhood/neighborhoodoption": case "/gov/org/icneighborhood/neighborhoodoption":
optionTypeName = "所属小区";
IcNeighborHoodDTO nform = new IcNeighborHoodDTO(); IcNeighborHoodDTO nform = new IcNeighborHoodDTO();
String gridId = cascadeItemColumnWrapper.getColValue(); String gridId = cascadeItemColumnWrapper.getColValue();
if (StringUtils.isBlank(gridId)){ 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); options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/sys/dict/data/education": case "/sys/dict/data/education":
optionTypeName = "文化程度";
options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/sys/dict/data/house": case "/sys/dict/data/house":
optionTypeName = "住房性质";
options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/sys/dict/data/nation": case "/sys/dict/data/nation":
optionTypeName = "民族";
options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/sys/dict/data/ninesmallplaces": case "/sys/dict/data/ninesmallplaces":
optionTypeName = "九小场所";
options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/sys/dict/data/relationship": case "/sys/dict/data/relationship":
optionTypeName = "人员关系";
options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
break; break;
case "/resi/partymember/icPartyOrg/branchlist": case "/resi/partymember/icPartyOrg/branchlist":
optionTypeName = "所属支部";
options = this.listBranchOptions(); options = this.listBranchOptions();
break; break;
default: default:
@ -1451,9 +1463,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
return options.stream().collect(Collectors.toMap(OptionResultDTO::getLabel, OptionResultDTO::getValue)); return options.stream().collect(Collectors.toMap(OptionResultDTO::getLabel, OptionResultDTO::getValue));
} catch (Exception e) { } catch (Exception e) {
String erroMsg = ExceptionUtils.getErrorStackTrace(e); String erroMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("【居民信息导入】转化Options为map失败,url:{}, cascadeItemId:{}, currUserAgencyId:{},错误信息:{}", log.error("【居民信息导入】{}转化Options为map失败,url:{}, cascadeItemId:{}, currUserAgencyId:{},错误信息:{}",
pureUri, cascadeItemId, currUserAgencyId, erroMsg); optionTypeName, pureUri, cascadeItemId, currUserAgencyId, erroMsg);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "解析内容失败,请确保所填写内容准确。");
String hintMsg = optionTypeName + "解析失败";
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), hintMsg, hintMsg);
} }
// 通用api调用,无法实现 // 通用api调用,无法实现

Loading…
Cancel
Save