|
@@ -527,11 +527,6 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
List<MappingConfigWrapper> historyList = Lists.newLinkedList();
|
|
|
List<MappingConfigWrapper> drugList = Lists.newLinkedList();
|
|
|
|
|
|
- //去除空行
|
|
|
- /*originList = originList.stream()
|
|
|
- .filter(MappingConfigWrapper::nonNull)
|
|
|
- .collect(Collectors.toList());*/
|
|
|
-
|
|
|
//数据完整性校验
|
|
|
List<Integer> emptyNumList = Lists.newLinkedList();
|
|
|
Integer rowId = 1;
|
|
@@ -568,19 +563,25 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
}
|
|
|
|
|
|
if (StringUtil.isNotBlank(item.getHisName())) {
|
|
|
- item.setHisName(item.getHisName().trim());
|
|
|
+ item.setHisName(pattern.matcher(item.getHisName()).replaceAll(""));
|
|
|
+ if (item.getHisName().length() > 255) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "医院术语字符数超出最大数量,请修改后再试");
|
|
|
+ }
|
|
|
if (StringUtil.isNotBlank(item.getHisDetailName())) {
|
|
|
- item.setHisDetailName(item.getHisDetailName().trim());
|
|
|
+ item.setHisDetailName(pattern.matcher(item.getHisDetailName()).replaceAll(""));
|
|
|
+ if (item.getHisDetailName().trim().length() > 255) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "医院术语字符数超出最大数量,请修改后再试");
|
|
|
+ }
|
|
|
} else {
|
|
|
item.setHisDetailName("");
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(item.getCode())) {
|
|
|
- item.setCode(item.getCode().trim());
|
|
|
+ item.setCode(pattern.matcher(item.getCode()).replaceAll(""));
|
|
|
} else {
|
|
|
item.setCode("");
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(item.getApproval())) {
|
|
|
- item.setApproval(item.getApproval().trim());
|
|
|
+ item.setApproval(pattern.matcher(item.getApproval()).replaceAll(""));
|
|
|
} else {
|
|
|
item.setApproval("");
|
|
|
}
|
|
@@ -984,15 +985,17 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
if (StringUtils.isNotBlank(item.getApproval()) && approvalMap.containsKey(item.getApproval())) {
|
|
|
List<IndexBatchDTO> dtoList = approvalMap.get(item.getApproval());
|
|
|
for (IndexBatchDTO indexBatchDTO : dtoList) {
|
|
|
- item.setUniqueName(indexBatchDTO.getName());
|
|
|
- item.setConceptId(indexBatchDTO.getId());
|
|
|
+ MappingConfigWrapper addItem = new MappingConfigWrapper();
|
|
|
+ BeanUtils.copyProperties(item, addItem);
|
|
|
+ addItem.setUniqueName(indexBatchDTO.getName());
|
|
|
+ addItem.setConceptId(indexBatchDTO.getId());
|
|
|
if (indexBatchDTO.getFormConceptId() != null) {
|
|
|
- item.setForm(indexBatchDTO.getForm());
|
|
|
- item.setFormConceptId(indexBatchDTO.getFormConceptId());
|
|
|
+ addItem.setForm(indexBatchDTO.getForm());
|
|
|
+ addItem.setFormConceptId(indexBatchDTO.getFormConceptId());
|
|
|
}
|
|
|
- item.setSource(MatchSourceEnum.Approval.getKey());
|
|
|
- item.setIsMatch(1);
|
|
|
- retList.add(item);
|
|
|
+ addItem.setSource(MatchSourceEnum.Approval.getKey());
|
|
|
+ addItem.setIsMatch(1);
|
|
|
+ retList.add(addItem);
|
|
|
}
|
|
|
} else {
|
|
|
item.setIsMatch(0);
|
|
@@ -1346,6 +1349,9 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
}
|
|
|
} else {
|
|
|
item.setHisName(pattern.matcher(item.getHisName()).replaceAll(""));
|
|
|
+ if (item.getHisName().length() > 255) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "医院术语字符数超出最大数量,请修改后再试");
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(item.getHisCode())) {
|
|
|
item.setHisCode(pattern.matcher(item.getHisCode()).replaceAll(""));
|
|
@@ -1354,6 +1360,9 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(item.getHisDetailName())) {
|
|
|
item.setHisDetailName(pattern.matcher(item.getHisDetailName()).replaceAll(""));
|
|
|
+ if (item.getHisDetailName().length() > 255) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "医院术语字符数超出最大数量,请修改后再试");
|
|
|
+ }
|
|
|
} else {
|
|
|
item.setHisDetailName("");
|
|
|
}
|