|
@ -83,13 +83,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; |
|
|
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<IcResiUserDTO> page(Map<String, Object> params) { |
|
|
public PageData<IcResiUserDTO> page(Map<String, Object> params) { |
|
|
IPage<IcResiUserEntity> page = baseDao.selectPage( |
|
|
IPage<IcResiUserEntity> page = baseDao.selectPage( |
|
@ -328,8 +328,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
if (map.containsKey(UserConstant.GRID_ID) && null != map.get(UserConstant.GRID_ID) && StringUtils.isNotBlank(map.get(UserConstant.GRID_ID).toString())) { |
|
|
if (map.containsKey(UserConstant.GRID_ID) && null != map.get(UserConstant.GRID_ID) && StringUtils.isNotBlank(map.get(UserConstant.GRID_ID).toString())) { |
|
|
gridIds.add(map.get(UserConstant.GRID_ID).toString()); |
|
|
gridIds.add(map.get(UserConstant.GRID_ID).toString()); |
|
|
} |
|
|
} |
|
|
if (map.containsKey("HOME_ID") && null != map.get("HOME_ID") && StringUtils.isNotBlank(map.get("HOME_ID").toString())) { |
|
|
if (map.containsKey(UserConstant.HOME_ID) && null != map.get(UserConstant.HOME_ID) && StringUtils.isNotBlank(map.get(UserConstant.HOME_ID).toString())) { |
|
|
houseIds.add(map.get("HOME_ID").toString()); |
|
|
houseIds.add(map.get(UserConstant.HOME_ID).toString()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); |
|
|
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); |
|
@ -348,7 +348,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
resultMap.put(UserConstant.GRID_ID, gridInfoMap.get(gridIdValue).getGridName()); |
|
|
resultMap.put(UserConstant.GRID_ID, gridInfoMap.get(gridIdValue).getGridName()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
String homeId = null != resultMap.get("HOME_ID") ? resultMap.get("HOME_ID").toString() : StrConstant.EPMETY_STR; |
|
|
String homeId = null != resultMap.get(UserConstant.HOME_ID) ? resultMap.get(UserConstant.HOME_ID).toString() : StrConstant.EPMETY_STR; |
|
|
resultMap.put("HOME_ID_VALUE", homeId); |
|
|
resultMap.put("HOME_ID_VALUE", homeId); |
|
|
if (null != houseInfoMap && houseInfoMap.containsKey(homeId) && null != houseInfoMap.get(homeId)) { |
|
|
if (null != houseInfoMap && houseInfoMap.containsKey(homeId) && null != houseInfoMap.get(homeId)) { |
|
|
HouseInfoDTO houseInfoDTO = houseInfoMap.get(homeId); |
|
|
HouseInfoDTO houseInfoDTO = houseInfoMap.get(homeId); |
|
@ -375,7 +375,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
resultMap.put(UserConstant.HOUSE_TYPE_KEY, HouseTypeEnum.BIESHU.getName()); |
|
|
resultMap.put(UserConstant.HOUSE_TYPE_KEY, HouseTypeEnum.BIESHU.getName()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
resultMap.put("HOME_ID", neighBorName.concat(buildName).concat(unitName).concat(doorName)); |
|
|
resultMap.put(UserConstant.HOME_ID, neighBorName.concat(buildName).concat(unitName).concat(doorName)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (resultMap.containsKey(UserConstant.GENDER)) { |
|
|
if (resultMap.containsKey(UserConstant.GENDER)) { |
|
@ -506,21 +506,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|| "datepicker".equals(columnWrapper.getItemType()) |
|
|
|| "datepicker".equals(columnWrapper.getItemType()) |
|
|
|| "timerange".equals(columnWrapper.getItemType()) |
|
|
|| "timerange".equals(columnWrapper.getItemType()) |
|
|
) { |
|
|
) { |
|
|
|
|
|
|
|
|
String cellContent = row.get(columnWrapper.getColIndexs().get(0)); |
|
|
String cellContent = row.get(columnWrapper.getColIndexs().get(0)); |
|
|
columnWrapper.setCellContent(cellContent); |
|
|
columnWrapper.setCellContent(cellContent); |
|
|
columnWrapper.setColValue(cellContent); |
|
|
columnWrapper.setColValue(cellContent); |
|
|
|
|
|
|
|
|
} else if ("select".equals(columnWrapper.getItemType()) |
|
|
} else if ("select".equals(columnWrapper.getItemType()) |
|
|
|| "radio".equals(columnWrapper.getItemType())){ |
|
|
|| "radio".equals(columnWrapper.getItemType())){ |
|
|
|
|
|
|
|
|
String optionSourceType = columnWrapper.getOptionSourceType(); |
|
|
String optionSourceType = columnWrapper.getOptionSourceType(); |
|
|
// 取单元格的内容
|
|
|
// 取单元格的内容
|
|
|
String cellContent = row.get(columnWrapper.getColIndexs().get(0)); |
|
|
String cellContent = row.get(columnWrapper.getColIndexs().get(0)); |
|
|
columnWrapper.setCellContent(cellContent); |
|
|
columnWrapper.setCellContent(cellContent); |
|
|
if (columnWrapper.combinedLabel.equals("家庭信息:与户主关系")) { |
|
|
|
|
|
System.out.println(6); |
|
|
|
|
|
} |
|
|
|
|
|
if ("local".equals(optionSourceType)) { |
|
|
if ("local".equals(optionSourceType)) { |
|
|
// 根据单元格内容,取到指定的option
|
|
|
// 根据单元格内容,取到指定的option
|
|
|
Map<String, String> options = columnWrapper.getOptions(); |
|
|
Map<String, String> options = columnWrapper.getOptions(); |
|
@ -538,6 +536,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
columnWrapper.setColValue(checkBoxColValue); |
|
|
columnWrapper.setColValue(checkBoxColValue); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
columnNames.add(columnWrapper.getColumnName()); |
|
|
columnNames.add(columnWrapper.getColumnName()); |
|
|
columnValues.add(columnWrapper.getColValue()); |
|
|
columnValues.add(columnWrapper.getColValue()); |
|
|
} |
|
|
} |
|
@ -691,7 +693,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<OptionResultDTO> options = null; |
|
|
List<OptionResultDTO> options = null; |
|
|
|
|
|
|
|
|
switch (pureUri) { |
|
|
switch (pureUri) { |
|
|
case "/epmetuser/icresidemanddict/demandoption": |
|
|
case "/epmetuser/icresidemanddict/demandoption": |
|
|
options = getResultDataOrThrowsException(epmetUserOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, |
|
|
options = getResultDataOrThrowsException(epmetUserOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, |
|
@ -746,9 +748,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (options == null) return null; |
|
|
if (options == null) return null; |
|
|
|
|
|
|
|
|
return options.stream().collect(Collectors.toMap(OptionResultDTO::getLabel, OptionResultDTO::getValue)); |
|
|
return options.stream().collect(Collectors.toMap(OptionResultDTO::getLabel, OptionResultDTO::getValue)); |
|
|
|
|
|
|
|
|
// 通用api调用,无法实现
|
|
|
// 通用api调用,无法实现
|
|
@ -887,6 +889,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
*/ |
|
|
*/ |
|
|
private String optionSourceValue; |
|
|
private String optionSourceValue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* desc:动态查询 某表的所有字段值 |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param formCode |
|
|
|
|
|
* @param resultTableName |
|
|
|
|
|
* @param conditions |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
public List<Map<String,Object>> dynamicQuery(String customerId, |
|
|
public List<Map<String,Object>> dynamicQuery(String customerId, |
|
|
String formCode, |
|
|
String formCode, |
|
|
String resultTableName, |
|
|
String resultTableName, |
|
@ -901,4 +913,42 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
} |
|
|
} |
|
|
return baseDao.dynamicQuery(customerId,resultTableName,conditions,subTables); |
|
|
return baseDao.dynamicQuery(customerId,resultTableName,conditions,subTables); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* desc:条件导出 |
|
|
|
|
|
* |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param formCode |
|
|
|
|
|
* @param baseTableName |
|
|
|
|
|
* @param conditions |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<Map<String, Object>> getDataForExport(String customerId, String formCode, String baseTableName, List<ResiUserQueryValueDTO> conditions) { |
|
|
|
|
|
List<Map<String, Object>> mapList = this.dynamicQuery(customerId, formCode, baseTableName, conditions); |
|
|
|
|
|
mapList.parallelStream().forEach(map -> { |
|
|
|
|
|
Object gridId = map.get(UserConstant.GRID_ID); |
|
|
|
|
|
if (gridId != null) { |
|
|
|
|
|
CustomerGridFormDTO formDTO = new CustomerGridFormDTO(); |
|
|
|
|
|
formDTO.setGridId(gridId.toString()); |
|
|
|
|
|
Result<CustomerGridDTO> gridInfoRes = govOrgOpenFeignClient.getGridBaseInfoByGridId(formDTO); |
|
|
|
|
|
if (gridInfoRes != null && gridInfoRes.success() && gridInfoRes.getData() != null) { |
|
|
|
|
|
map.put(UserConstant.GRID_ID, gridInfoRes.getData().getGridName()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Object homeId = map.get(UserConstant.HOME_ID); |
|
|
|
|
|
if (homeId != null) { |
|
|
|
|
|
HashSet<String> houseIds = new HashSet<>(); |
|
|
|
|
|
houseIds.add(homeId.toString()); |
|
|
|
|
|
Result<List<HouseInfoDTO>> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds); |
|
|
|
|
|
if (houseInfoRes != null && houseInfoRes.success() && CollectionUtils.isNotEmpty(houseInfoRes.getData())){ |
|
|
|
|
|
HouseInfoDTO houseInfoDTO = houseInfoRes.getData().get(NumConstant.ZERO); |
|
|
|
|
|
map.put("VILLAGE_NAME", houseInfoDTO.getNeighborHoodName()); |
|
|
|
|
|
map.put("BUILD_NAME", houseInfoDTO.getBuildingName()); |
|
|
|
|
|
map.put("HOME_ID", houseInfoDTO.getDoorName()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
return mapList; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|