|
|
|
@ -92,10 +92,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcResiUserDTO> page(Map<String, Object> params) { |
|
|
|
IPage<IcResiUserEntity> page = baseDao.selectPage( |
|
|
|
@ -534,11 +534,11 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
* @param currUserAgencyId 当前用户的组织id |
|
|
|
* @param checkBoxOptionColumnIdxAndLabel 复选框的列号&label中文 |
|
|
|
*/ |
|
|
|
private void persist(Map<String, ColumnWrapper> headerColumnWrapper, List<Map<Integer, String>> dataRows, |
|
|
|
private void persist(Map<String, ColumnWrapper> headerColumnWrapper, List<Map<Integer, String>> dataRows, |
|
|
|
String currUserAgencyId, Map<Integer, String> checkBoxOptionColumnIdxAndLabel, String tableName, |
|
|
|
String currUserAgencyPids, String currentUserId) { |
|
|
|
for (Map<Integer, String> row : dataRows) { |
|
|
|
|
|
|
|
|
|
|
|
// 当前行的列们
|
|
|
|
// List<ColumnWrapper> columnsOfCurrRow = new ArrayList<>();
|
|
|
|
|
|
|
|
@ -594,7 +594,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
columnAndValues.put("IS_UNITED_FRONT", "0"); |
|
|
|
columnAndValues.put("IS_VETERANS", "0"); |
|
|
|
columnAndValues.put("IS_VOLUNTEER", "0"); |
|
|
|
|
|
|
|
|
|
|
|
columnAndValues.put("AGENCY_ID", currUserAgencyId); |
|
|
|
columnAndValues.put("PIDS", currUserAgencyPids); |
|
|
|
columnAndValues.put("CUSTOMER_ID", loginUserUtil.getCurrentCustomerId()); |
|
|
|
@ -607,7 +607,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
// });
|
|
|
|
|
|
|
|
// System.out.println("-------------------");
|
|
|
|
|
|
|
|
|
|
|
|
baseDao.add(tableName, columnAndValues); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -745,7 +745,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
cascadeItemId = uriParts[1]; |
|
|
|
|
|
|
|
// 根据uri上的id,找到关联的itemid,从而找到关联的item的值
|
|
|
|
cascadeItemColumnWrapper = columnWrappers.get(cascadeItemId); |
|
|
|
if (columnWrappers != null){ |
|
|
|
cascadeItemColumnWrapper = columnWrappers.get(cascadeItemId); |
|
|
|
} |
|
|
|
} else { |
|
|
|
pureUri = fullUri; |
|
|
|
} |
|
|
|
@ -1037,24 +1039,45 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
Map<String, Map<String, Object>> result = new LinkedHashMap<>(); |
|
|
|
mapList.stream().filter(Objects::nonNull).forEach(map -> { |
|
|
|
String resiId = (String) map.getOrDefault(UserConstant.IC_RESI_USER, ""); |
|
|
|
formItemMap.forEach((k, v)->{ |
|
|
|
for (Map.Entry<String, FormItem> e : formItemMap.entrySet()) { |
|
|
|
String k = e.getKey(); |
|
|
|
FormItem v = e.getValue(); |
|
|
|
Object temp = map.get(k); |
|
|
|
if (temp != null) { |
|
|
|
if (v.getOptionSourceType().equals("remote")) { |
|
|
|
//todo 获取 options
|
|
|
|
} |
|
|
|
if (v.getItemType().equals("checkbox")) { |
|
|
|
v.getOptions().forEach(optionDTO -> { |
|
|
|
map.put(optionDTO.getValue(), temp.toString().contains(optionDTO.getValue()) ? "是" : "否"); |
|
|
|
}); |
|
|
|
} else if (v.getItemType().equals("select")) { |
|
|
|
v.getOptions().forEach(optionDTO -> { |
|
|
|
map.put(optionDTO.getValue(), temp.toString().equals(optionDTO.getValue()) ? optionDTO.getLabel() : ""); |
|
|
|
}); |
|
|
|
try { |
|
|
|
//todo 获取 options
|
|
|
|
Map<String, String> stringMap = listRemoteOptions(new HashMap<>(), v.getOptionSourceValue(), null); |
|
|
|
System.out.println("======remote:"+v.getLabel()+" "+JSON.toJSONString(stringMap)); |
|
|
|
if ("checkbox".equals(v.getItemType())) { |
|
|
|
stringMap.forEach((label, value) -> map.put(value, temp.toString().contains(value) ? "是" : "否")); |
|
|
|
} else if ("select".equals(v.getItemType())) { |
|
|
|
|
|
|
|
stringMap.forEach((label,value)->{ |
|
|
|
if (temp.toString().equals(value)){ |
|
|
|
map.put(k, label); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|
log.warn("listRemoteOptions url:{}",v.getOptionSourceValue()); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if ("checkbox".equals(v.getItemType())) { |
|
|
|
v.getOptions().forEach(optionDTO -> { |
|
|
|
map.put(optionDTO.getValue(), temp.toString().contains(optionDTO.getValue()) ? "是" : "否"); |
|
|
|
}); |
|
|
|
} else if ("select".equals(v.getItemType())) { |
|
|
|
v.getOptions().forEach(optionDTO -> { |
|
|
|
if (optionDTO.getLabel().equals(temp.toString())){ |
|
|
|
map.put(k, optionDTO.getLabel()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if ("ic_resi_user".equals(baseTableName)) { |
|
|
|
resiId = (String) map.get("ID"); |
|
|
|
} |
|
|
|
@ -1085,6 +1108,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
map.put("VILLAGE_NAME", houseInfoDTO.getNeighborHoodName()); |
|
|
|
map.put("BUILD_NAME", houseInfoDTO.getBuildingName()); |
|
|
|
map.put("HOME_ID", houseInfoDTO.getDoorName()); |
|
|
|
map.put("UNIT_ID", houseInfoDTO.getUnitName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|