|
@@ -426,6 +426,12 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ //重复数据去重
|
|
|
+ dataList = dataList.stream().distinct().collect(Collectors.toList());
|
|
|
+ if (ListUtil.isEmpty(dataList)) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
//标准词匹配
|
|
|
List<String> nameList = dataList.stream()
|
|
|
.filter(i -> StringUtil.isBlank(i.getHisDetailName()))
|
|
@@ -667,7 +673,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
* @param hospitalId
|
|
|
* @param type
|
|
|
*/
|
|
|
- public void importExcel(MultipartFile file, Long hospitalId, Integer type, String userId) {
|
|
|
+ public Boolean importExcel(MultipartFile file, Long hospitalId, Integer type, String userId) {
|
|
|
if (hospitalId == null) {
|
|
|
hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
|
|
|
}
|
|
@@ -681,7 +687,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
if (ListUtil.isEmpty(originList)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
|
|
|
}
|
|
|
- importDataProcess(originList, hospitalId, type, userId);
|
|
|
+ Boolean data = importDataProcess(originList, hospitalId, type, userId);
|
|
|
+ return data;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -691,7 +698,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
* @param hospitalId
|
|
|
* @param type
|
|
|
*/
|
|
|
- public boolean importDataProcess(List<MappingConfigWrapper> originList, Long hospitalId, Integer type, String userId) {
|
|
|
+ public Boolean importDataProcess(List<MappingConfigWrapper> originList, Long hospitalId, Integer type, String userId) {
|
|
|
List<MappingConfigWrapper> tempList = Lists.newLinkedList();
|
|
|
|
|
|
Date now = DateUtil.now();
|
|
@@ -743,6 +750,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
} else {
|
|
|
item.setCode("");
|
|
|
}
|
|
|
+ rowId++;
|
|
|
}
|
|
|
|
|
|
//医院术语名称不允许为空
|