|
@@ -614,6 +614,9 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
if (StringUtil.isBlank(userId)) {
|
|
|
userId = SysUserUtils.getCurrentPrincipleID();
|
|
|
}
|
|
|
+ if (StringUtil.isBlank(userId)) {
|
|
|
+ userId = "0";
|
|
|
+ }
|
|
|
List<MappingConfigWrapper> originList = readImportData(file, type);
|
|
|
if (ListUtil.isEmpty(originList)) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
|
|
@@ -896,6 +899,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
for (MappingConfigWrapper item : tempList) {
|
|
|
+ item.setHospitalId(hospitalId);
|
|
|
+ item.setType(type);
|
|
|
item.setCreator(userId);
|
|
|
item.setGmtCreate(now);
|
|
|
item.setModifier(userId);
|
|
@@ -960,6 +965,38 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
return retList.get(0);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询已关联关系
|
|
|
+ *
|
|
|
+ * @param mappingConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<MappingConfigWrapper> getRelatedMapping(MappingConfigVO mappingConfigVO) {
|
|
|
+ List<MappingConfigWrapper> retList = Lists.newLinkedList();
|
|
|
+ if (mappingConfigVO.getHospitalId() == null) {
|
|
|
+ mappingConfigVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
|
|
|
+ }
|
|
|
+ QueryWrapper<MappingConfig> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", mappingConfigVO.getHospitalId())
|
|
|
+ .eq("type", mappingConfigVO.getType())
|
|
|
+ .eq("his_name", mappingConfigVO.getHisName());
|
|
|
+ if (StringUtil.isNotBlank(mappingConfigVO.getHisDetailName())) {
|
|
|
+ queryWrapper.eq("his_detail_name", mappingConfigVO.getHisDetailName());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<MappingConfig> list = this.list(queryWrapper);
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ retList = BeanUtil.listCopyTo(list, MappingConfigWrapper.class);
|
|
|
+
|
|
|
+ addNames(retList);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 判断是否已存在
|
|
|
*
|
|
@@ -1020,6 +1057,9 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
if (StringUtil.isBlank(mappingConfig.getModifier())) {
|
|
|
userId = SysUserUtils.getCurrentPrincipleID();
|
|
|
}
|
|
|
+ if (StringUtil.isBlank(userId)) {
|
|
|
+ userId = "0";
|
|
|
+ }
|
|
|
Date now = DateUtil.now();
|
|
|
mappingConfig.setModifier(userId);
|
|
|
mappingConfig.setGmtModified(now);
|
|
@@ -1071,6 +1111,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
}
|
|
|
this.remove(qwUnMaptch);
|
|
|
|
|
|
+ mappingConfig.setIsMatch(1);
|
|
|
this.saveOrUpdate(mappingConfig);
|
|
|
return true;
|
|
|
}
|