|
|
@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.IcExportTemplateSaveFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
|
|
|
import com.epmet.commons.tools.enums.FormItemTypeEnum; |
|
|
|
import com.epmet.commons.tools.enums.IcFormCodeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
@ -267,20 +268,35 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
} else { |
|
|
|
String[] parts = icResiUserImportService.splitOptionSourceUrl(e.getOptionSourceValue()); |
|
|
|
|
|
|
|
//todo 不支持多个itemId
|
|
|
|
Map<String, String> remoteOptions = icResiUserImportService.listRemoteOptions(parts[0], parts[1], columnWrappers, currentStaffAgencyId, "query"); |
|
|
|
log.info("========putRemoteValue:条件:{}", JSON.toJSONString(columnWrappers)); |
|
|
|
log.info("========putRemoteValue:结果:{}", JSON.toJSONString(remoteOptions)); |
|
|
|
if (FormItemTypeEnum.CHECKBOX.getCode().equals(e.getItemType())) { |
|
|
|
remoteOptions.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? StrConstant.YES : StrConstant.NO)); |
|
|
|
} else if (FormItemTypeEnum.SELECT.getCode().equals(e.getItemType())) { |
|
|
|
remoteOptions.forEach((label, value) -> { |
|
|
|
if (FormItemTypeEnum.CASCADER.getCode().equals(e.getItemType())) { |
|
|
|
Map<String, OptionResultDTO> remoteOptions = icResiUserImportService.listRemoteCascadeOptions(parts[0], parts[1], columnWrappers, currentStaffAgencyId, "query"); |
|
|
|
List<String> listOptions = new ArrayList<>(); |
|
|
|
remoteOptions.forEach((value,label) -> { |
|
|
|
if (vauleStr.equals(value)) { |
|
|
|
map.put(columnName, label); |
|
|
|
listOptions.add(label.getLabel()); |
|
|
|
} |
|
|
|
cache.put(value,label); |
|
|
|
}); |
|
|
|
String join = Joiner.on("-").join(listOptions); |
|
|
|
cache.put(vauleStr,join); |
|
|
|
map.put(columnName, join); |
|
|
|
}else { |
|
|
|
|
|
|
|
//todo 不支持多个itemId
|
|
|
|
Map<String, String> remoteOptions = icResiUserImportService.listRemoteOptions(parts[0], parts[1], columnWrappers, currentStaffAgencyId, "query"); |
|
|
|
log.info("========putRemoteValue:条件:{}", JSON.toJSONString(columnWrappers)); |
|
|
|
log.info("========putRemoteValue:结果:{}", JSON.toJSONString(remoteOptions)); |
|
|
|
if (FormItemTypeEnum.CHECKBOX.getCode().equals(e.getItemType())) { |
|
|
|
remoteOptions.forEach((label, value) -> map.put(value, vauleStr.contains(value) ? StrConstant.YES : StrConstant.NO)); |
|
|
|
} else if (FormItemTypeEnum.SELECT.getCode().equals(e.getItemType())) { |
|
|
|
remoteOptions.forEach((label, value) -> { |
|
|
|
if (vauleStr.equals(value)) { |
|
|
|
map.put(columnName, label); |
|
|
|
} |
|
|
|
cache.put(value,label); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|
log.error("listRemoteOptions url", ex); |
|
|
|