|
@ -1405,14 +1405,34 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
* 支部列表选项 |
|
|
* 支部列表选项 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<OptionResultDTO> listBranchOptions() { |
|
|
public List<OptionResultDTO> listBranchOptions() { |
|
|
String msg = "查询支部列表失败"; |
|
|
String msg = "查询支部列表失败"; |
|
|
List<OptionResultDTO> branchList = getResultDataOrThrowsException(partyMemberOpenFeignClient.branchlist(), |
|
|
List<OptionResultDTO> branchList = getResultDataOrThrowsException(partyMemberOpenFeignClient.branchlist(), |
|
|
ServiceConstant.RESI_PARTYMEMBER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); |
|
|
ServiceConstant.RESI_PARTYMEMBER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); |
|
|
//结果平铺展开
|
|
|
//结果平铺展开
|
|
|
Map<String, OptionResultDTO> resultMap = new HashMap<>(); |
|
|
ArrayList<OptionResultDTO> optionResultDTOS = new ArrayList<>(); |
|
|
branchList.forEach(option-> option.getCurrenNodeAllChild(option,resultMap)); |
|
|
convertCascader2OptionResultList4Import(branchList, optionResultDTOS); |
|
|
return branchList; |
|
|
return optionResultDTOS; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 居民信息导入专用:递归将cascader控件结果集,转化为列表结果集 |
|
|
|
|
|
* @param sourceData 从哪个对象中取数据 |
|
|
|
|
|
* @param targetData 将数据存储到这个对象中 |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private void convertCascader2OptionResultList4Import(List<OptionResultDTO> sourceData,List<OptionResultDTO> targetData) { |
|
|
|
|
|
if (CollectionUtils.isEmpty(sourceData)) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
for (OptionResultDTO item : sourceData) { |
|
|
|
|
|
OptionResultDTO option = new OptionResultDTO(); |
|
|
|
|
|
option.setLabel(item.getLabel()); |
|
|
|
|
|
option.setValue(item.getValue()); |
|
|
|
|
|
targetData.add(option); |
|
|
|
|
|
convertCascader2OptionResultList4Import(item.getChildren(), targetData); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|