Browse Source

Merge branch 'develop' into innerDevelop

gaodm 4 years ago
parent
commit
37181da963
32 changed files with 1595 additions and 23 deletions
  1. 32 1
      src/main/java/com/diagbot/aggregate/AssemblePushAggregate.java
  2. 11 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  3. 14 3
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  4. 18 0
      src/main/java/com/diagbot/dto/NurseInfoDTO.java
  5. 2 0
      src/main/java/com/diagbot/dto/PushDTO.java
  6. 4 0
      src/main/java/com/diagbot/dto/RetrievalDTO.java
  7. 198 0
      src/main/java/com/diagbot/entity/NurseConfig.java
  8. 4 2
      src/main/java/com/diagbot/entity/OperationConfig.java
  9. 2 1
      src/main/java/com/diagbot/enums/ConceptTypeEnum.java
  10. 11 1
      src/main/java/com/diagbot/facade/ConceptInfoFacade.java
  11. 37 0
      src/main/java/com/diagbot/facade/MrFacade.java
  12. 491 0
      src/main/java/com/diagbot/facade/NurseConfigFacade.java
  13. 1 1
      src/main/java/com/diagbot/facade/PlanDetailFacade.java
  14. 28 0
      src/main/java/com/diagbot/facade/PushFacade.java
  15. 5 0
      src/main/java/com/diagbot/facade/RetrievalFacade.java
  16. 37 0
      src/main/java/com/diagbot/mapper/NurseConfigMapper.java
  17. 36 0
      src/main/java/com/diagbot/service/NurseConfigService.java
  18. 46 0
      src/main/java/com/diagbot/service/impl/NurseConfigServiceImpl.java
  19. 280 0
      src/main/java/com/diagbot/util/RedisUtil.java
  20. 18 0
      src/main/java/com/diagbot/vo/NurseConfigListVO.java
  21. 36 0
      src/main/java/com/diagbot/vo/NurseConfigPageVO.java
  22. 8 8
      src/main/java/com/diagbot/web/ConceptInfoController.java
  23. 9 0
      src/main/java/com/diagbot/web/MrController.java
  24. 171 0
      src/main/java/com/diagbot/web/NurseConfigController.java
  25. 7 0
      src/main/java/com/diagbot/web/PushController.java
  26. 1 1
      src/main/java/com/diagbot/web/RetrievalController.java
  27. 1 1
      src/main/resources/application-dev.yml
  28. 1 1
      src/main/resources/application-local.yml
  29. 1 1
      src/main/resources/application-pre.yml
  30. 1 1
      src/main/resources/application-pro.yml
  31. 1 1
      src/main/resources/application-test.yml
  32. 83 0
      src/main/resources/mapper/NurseConfigMapper.xml

+ 32 - 1
src/main/java/com/diagbot/aggregate/AssemblePushAggregate.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.PushDTO;
 import com.diagbot.facade.DiseaseConfigFacade;
 import com.diagbot.facade.DrugConfigFacade;
 import com.diagbot.facade.LisConfigFacade;
+import com.diagbot.facade.NurseConfigFacade;
 import com.diagbot.facade.OperationConfigFacade;
 import com.diagbot.facade.PacsConfigFacade;
 import com.diagbot.facade.ScaleConfigFacade;
@@ -43,6 +44,8 @@ public class AssemblePushAggregate {
     private OperationConfigFacade operationConfigFacade;
     @Autowired
     private ScaleConfigFacade scaleConfigFacade;
+    @Autowired
+    private NurseConfigFacade nurseConfigFacade;
 
     @DataProvider("assemblePushAll")
     public PushDTO assemblePushAll(
@@ -53,7 +56,8 @@ public class AssemblePushAggregate {
             @DataConsumer("retDiagMap") Map<String, List<PushBaseDTO>> retDiagMap,
             @DataConsumer("retOperation") List<PushBaseDTO> retOperation,
             @DataConsumer("retDrug") List<PushBaseDTO> retDrug,
-            @DataConsumer("retScale") List<PushBaseDTO> retScale) {
+            @DataConsumer("retScale") List<PushBaseDTO> retScale,
+            @DataConsumer("retNurse") List<PushBaseDTO> retNurse) {
         //检验
         if (ListUtil.isNotEmpty(retLis)) {
             data.setLis(retLis);
@@ -78,6 +82,10 @@ public class AssemblePushAggregate {
         if (ListUtil.isNotEmpty(retScale)) {
             data.setScale(retScale);
         }
+        //护理
+        if (ListUtil.isNotEmpty(retNurse)) {
+            data.setNurse(retNurse);
+        }
         return data;
     }
 
@@ -227,4 +235,27 @@ public class AssemblePushAggregate {
         }
         return retScale;
     }
+
+    @DataProvider("retNurse")
+    public List<PushBaseDTO> retNurse(@InvokeParameter("pushDTO") PushDTO data,
+                                      @InvokeParameter("hospitalId") Long hospitalId) {
+        //量表
+        List<PushBaseDTO> retNurse = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getNurse())) {
+            retNurse = data.getNurse();
+            List<String> uniqueNameList = retNurse.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Long>> uniqueNameMap
+                    = nurseConfigFacade.getUniqueNameConfigMap(hospitalId, null, uniqueNameList);
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retNurse.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(new ArrayList<>(uniqueNameMap.get(item.getName()).keySet()));
+                    }
+                });
+            }
+        }
+        return retNurse;
+    }
 }

+ 11 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -115,6 +115,15 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 //.antMatchers("/tran/scaleConfig/importExcel").permitAll()
                 //.antMatchers("/tran/scaleConfig/exportExcel").permitAll()
                 .antMatchers("/tran/scaleConfig/exportExcelModule").permitAll()
+                //.antMatchers("/tran/nurseConfig/isExistRecord").permitAll()
+                //.antMatchers("/tran/nurseConfig/saveOrUpdateRecord").permitAll()
+                //.antMatchers("/tran/nurseConfig/saveOrUpdateRecords").permitAll()
+                //.antMatchers("/tran/nurseConfig/deleteRecord").permitAll()
+                //.antMatchers("/tran/nurseConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/nurseConfig/getPage").permitAll()
+                //.antMatchers("/tran/nurseConfig/importExcel").permitAll()
+                //.antMatchers("/tran/nurseConfig/exportExcel").permitAll()
+                .antMatchers("/tran/nurseConfig/exportExcelModule").permitAll()
                 //.antMatchers("/tran/hospitalInfo/saveRecord").permitAll()
                 .antMatchers("/tran/hospitalInfo/getHospitalInfo").permitAll()
                 .antMatchers("/tran/hospitalInfo/getAllHospitalInfo").permitAll()
@@ -124,6 +133,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/disclaimerInfo/getDisclaimerInfo").permitAll()
                 .antMatchers("/sys/mr/createMr").permitAll()
                 .antMatchers("/sys/mr/getMr").permitAll()
+                .antMatchers("/sys/mr/getIndicationMr").permitAll()
                 .antMatchers("/sys/plan/getSysPlanInfoDatas").permitAll()
                 .antMatchers("/sys/mrqc/analyze_run").permitAll()
                 .antMatchers("/sys/tokenPermission/delPermission").permitAll()
@@ -131,6 +141,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/push/push").permitAll()
                 .antMatchers("/sys/push/pushApi").permitAll()
                 .antMatchers("/sys/push/indicationPush").permitAll()
+                .antMatchers("/sys/push/indicationExtPush").permitAll()
                 .antMatchers("/sys/push/pushPlan").permitAll()
                 .antMatchers("/demo/templateInfo/updateByIdUsNames").permitAll()
                 .antMatchers("/demo/templateInfo/saveTemplateInfo").permitAll()

+ 14 - 3
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -35,7 +35,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
         if (matchPermitAllUrl(request)) {
             return;
         }
-        if ("anonymousUser" .equals(authentication.getPrincipal())) {
+        if ("anonymousUser".equals(authentication.getPrincipal())) {
             throw new AccessDeniedException("no right");
         } else {
             String tokenStr = HttpUtils.getHeaders(request).get("Authorization");
@@ -51,7 +51,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 url = authority[0];
                 method = authority[1];
                 if (matchers(url, request)) {
-                    if (method.equals(request.getMethod()) || "ALL" .equals(method)) {
+                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
                         return;
                     }
                 }
@@ -158,6 +158,15 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 // || matchers("/tran/scaleConfig/importExcel", request)
                 // || matchers("/tran/scaleConfig/exportExcel", request)
                 || matchers("/tran/scaleConfig/exportExcelModule", request)
+                //|| matchers("/tran/nurseConfig/isExistRecord", request)
+                //|| matchers("/tran/nurseConfig/saveOrUpdateRecord", request)
+                //|| matchers("/tran/nurseConfig/saveOrUpdateRecords", request)
+                // || matchers("/tran/nurseConfig/deleteRecord", request)
+                //|| matchers("/tran/nurseConfig/deleteRecords", request)
+                || matchers("/tran/nurseConfig/getPage", request)
+                // || matchers("/tran/nurseConfig/importExcel", request)
+                // || matchers("/tran/nurseConfig/exportExcel", request)
+                || matchers("/tran/nurseConfig/exportExcelModule", request)
                 //|| matchers("/tran/hospitalInfo/saveRecord", request)
                 || matchers("/tran/hospitalInfo/getHospitalInfo", request)
                 || matchers("/tran/hospitalInfo/getAllHospitalInfo", request)
@@ -167,6 +176,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/disclaimerInfo/getDisclaimerInfo", request)
                 || matchers("/sys/mr/createMr", request)
                 || matchers("/sys/mr/getMr", request)
+                || matchers("/sys/mr/getIndicationMr", request)
                 || matchers("/sys/plan/getSysPlanInfoDatas", request)
                 || matchers("/sys/mrqc/analyze_run", request)
                 || matchers("/sys/tokenPermission/delPermission", request)
@@ -174,6 +184,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/push/push", request)
                 || matchers("/sys/push/pushApi", request)
                 || matchers("/sys/push/indicationPush", request)
+                || matchers("/sys/push/indicationExtPush", request)
                 || matchers("/sys/push/pushPlan", request)
                 || matchers("/demo/templateInfo/updateByIdUsNames", request)
                 || matchers("/demo/templateInfo/saveTemplateInfo", request)
@@ -236,4 +247,4 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
         }
         return false;
     }
-}
+}

+ 18 - 0
src/main/java/com/diagbot/dto/NurseInfoDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/23 10:55
+ */
+@Getter
+@Setter
+public class NurseInfoDTO {
+    /**
+     * 护理名称
+     */
+    private String name;
+}

+ 2 - 0
src/main/java/com/diagbot/dto/PushDTO.java

@@ -31,6 +31,8 @@ public class PushDTO {
     private List<PushBaseDTO> medicines = new ArrayList<>();
     // 并发症
     private List<PushBaseDTO> complications = new ArrayList<>();
+    // 护理
+    private List<PushBaseDTO> nurse = Lists.newArrayList();
     //诊断
     private Map<String, List<PushBaseDTO>> dis;
     //一般治疗

+ 4 - 0
src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -49,4 +49,8 @@ public class RetrievalDTO {
      * 量表
      */
     private List<ScaleInfoDTO> scalenames;
+    /**
+     * 护理
+     */
+    private List<NurseInfoDTO> nursenames;
 }

+ 198 - 0
src/main/java/com/diagbot/entity/NurseConfig.java

@@ -0,0 +1,198 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * <p>
+ * 护理映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2021-04-26
+ */
+@TableName("tran_nurse_config")
+public class NurseConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+
+    /**
+     * 医院项目名称
+     */
+    @Excel(name = "医院护理名称", width = 40, orderNum = "1", isImportField = "true")
+    @NotBlank(message = "请输入医院护理名称")
+    private String hisName;
+
+    /**
+     * 标准名称
+     */
+    @Excel(name = "标准护理名称", width = 40, orderNum = "3", isImportField = "true")
+    @NotBlank(message = "请输入标准护理名称")
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "NurseConfig{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", hospitalId=" + hospitalId +
+                ", hisName=" + hisName +
+                ", uniqueName=" + uniqueName +
+                ", uniqueCode=" + uniqueCode +
+                "}";
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        NurseConfig nurseConfig = (NurseConfig) o;
+        return Objects.equals(id, nurseConfig.id)
+                && Objects.equals(isDeleted, nurseConfig.isDeleted)
+                && Objects.equals(hospitalId, nurseConfig.hospitalId)
+                && Objects.equals(hisName, nurseConfig.hisName)
+                && Objects.equals(uniqueName, nurseConfig.uniqueName)
+                && Objects.equals(uniqueCode, nurseConfig.uniqueCode);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, isDeleted, hospitalId, hisName, uniqueName, uniqueCode);
+    }
+}

+ 4 - 2
src/main/java/com/diagbot/entity/OperationConfig.java

@@ -177,10 +177,12 @@ public class OperationConfig implements Serializable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (o == null || getClass() != o.getClass())
+        }
+        if (o == null || getClass() != o.getClass()) {
             return false;
+        }
         OperationConfig operationConfig = (OperationConfig) o;
         return Objects.equals(id, operationConfig.id)
                 && Objects.equals(isDeleted, operationConfig.isDeleted)

+ 2 - 1
src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -21,7 +21,8 @@ public enum ConceptTypeEnum implements KeyedNamed {
     Dept(7, "科室"),
     Transfusion(8, "输血"),
     PacsSubName(9, "检查子项"),
-    Scale(10, "量表");
+    Scale(10, "量表"),
+    Nurse(11, "护理");
 
     @Setter
     private int key;

+ 11 - 1
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -80,6 +80,8 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
     private OperationConfigFacade operationConfigFacade;
     @Autowired
     private ScaleConfigFacade scaleConfigFacade;
+    @Autowired
+    private NurseConfigFacade nurseConfigFacade;
 
     /**
      * 返回带静态知识的检索结果
@@ -670,7 +672,6 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                 }
                 break;
             case 8:
-                //todo
                 Map<String, Map<String, Long>> scaleConfigMap
                         = scaleConfigFacade.getConfigMap(hospitalId,
                         ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
@@ -679,6 +680,15 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                     nameList = new ArrayList<>(scaleConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
                 }
                 break;
+            case 9:
+                Map<String, Map<String, Long>> nurseConfigMap
+                        = nurseConfigFacade.getConfigMap(hospitalId,
+                        ListUtil.arrayToList(new String[] { staticKnowledgeHISVO.getHisName() }), null);
+                if (nurseConfigMap != null &&
+                        nurseConfigMap.get(staticKnowledgeHISVO.getHisName()) != null) {
+                    nameList = new ArrayList<>(nurseConfigMap.get(staticKnowledgeHISVO.getHisName()).keySet());
+                }
+                break;
             default:
                 break;
 

+ 37 - 0
src/main/java/com/diagbot/facade/MrFacade.java

@@ -1,8 +1,15 @@
 package com.diagbot.facade;
 
+import com.diagbot.dto.IndicationDTO;
+import com.diagbot.idc.VisibleIdCreater;
 import com.diagbot.service.impl.MrServiceImpl;
+import com.diagbot.util.RedisUtil;
+import com.diagbot.vo.MrVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.concurrent.TimeUnit;
+
 /**
  * @Description: 病历保存到redis装饰层
  * @author: gaodm
@@ -10,4 +17,34 @@ import org.springframework.stereotype.Component;
  */
 @Component
 public class MrFacade extends MrServiceImpl {
+
+    @Autowired
+    RedisUtil redisUtil;
+    @Autowired
+    VisibleIdCreater visibleIdCreater;
+
+    private static final String MSGMR = "msgMr::";
+
+    /**
+     * 创建提醒类结果
+     *
+     * @param indicationDTO
+     * @return
+     */
+    public String createIndicationMr(IndicationDTO indicationDTO) {
+        String mrId = visibleIdCreater.getNextId(9).toString();
+        redisUtil.setEx(MSGMR + mrId, indicationDTO, 15, TimeUnit.MINUTES);
+        return mrId;
+    }
+
+    /**
+     * 获取提醒类结果
+     *
+     * @param mrVO
+     * @return
+     */
+    public IndicationDTO getIndicationMr(MrVO mrVO) {
+        String mrId = MSGMR + mrVO.getMrId();
+        return redisUtil.get(mrId);
+    }
 }

+ 491 - 0
src/main/java/com/diagbot/facade/NurseConfigFacade.java

@@ -0,0 +1,491 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.NurseInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.NurseConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.ConceptVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.NurseConfigListVO;
+import com.diagbot.vo.NurseConfigPageVO;
+import com.diagbot.vo.RetrievalVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/26 10:31
+ */
+@Component
+public class NurseConfigFacade {
+    @Autowired
+    private NurseConfigService nurseConfigService;
+    @Autowired
+    private CdssCoreClient cdssCoreClient;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param nurseConfig
+     * @return
+     */
+    public Boolean isExistRecord(NurseConfig nurseConfig) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", Long.valueOf(hospitalId))
+                .eq("his_name", nurseConfig.getHisName())
+                .eq("unique_name", nurseConfig.getUniqueName());
+        NurseConfig oldRecord = nurseConfigService.getOne(queryWrapper, false);
+        if (nurseConfig.getId() == null
+                && oldRecord != null) {
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "该条关联已存在,无法保存");
+        }
+        if (nurseConfig.getId() != null
+                && oldRecord != null
+                && !nurseConfig.getId().equals(oldRecord.getId())) {
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "该条关联已存在,无法保存");
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param nurseConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(NurseConfig nurseConfig) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        nurseConfig.setHospitalId(Long.valueOf(hospitalId));
+        nurseConfig.setModifier(userId);
+        nurseConfig.setGmtModified(now);
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", Long.valueOf(hospitalId))
+                .eq("his_name", nurseConfig.getHisName())
+                .eq("unique_name", nurseConfig.getUniqueName());
+        NurseConfig oldRecord = nurseConfigService.getOne(queryWrapper, false);
+        if (nurseConfig.getId() == null
+                && oldRecord != null) {
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "该条关联已存在,无法保存");
+        }
+        if (nurseConfig.getId() != null
+                && oldRecord != null
+                && !nurseConfig.getId().equals(oldRecord.getId())) {
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "该条关联已存在,无法保存");
+        }
+        //新增数据
+        if (nurseConfig.getId() == null) {
+            nurseConfig.setCreator(userId);
+            nurseConfig.setGmtCreate(now);
+        }
+        if (nurseConfig.getIsDeleted() == null) {
+            nurseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        nurseConfigService.saveOrUpdate(nurseConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param nurseConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(NurseConfigListVO nurseConfigListVO) {
+        if (ListUtil.isEmpty(nurseConfigListVO.getNurseConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(nurseConfigListVO.getNurseConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param nurseConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<NurseConfig> nurseConfigList) {
+        if (ListUtil.isEmpty(nurseConfigList)) {
+            return false;
+        }
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        nurseConfigList = nurseConfigList
+                .stream()
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, List<Long>>> configMap
+                = getConfigMapWithIds(Long.valueOf(hospitalId), null, null);
+        nurseConfigList.forEach(nurseConfig -> {
+            nurseConfig.setHospitalId(Long.valueOf(hospitalId));
+            nurseConfig.setModifier(userId);
+            nurseConfig.setGmtModified(now);
+            if (nurseConfig.getId() == null) {
+                if (configMap.containsKey(nurseConfig.getHisName())
+                        &&ListUtil.isNotEmpty(configMap.get(nurseConfig.getHisName()).get(nurseConfig.getUniqueName()))) {
+                    deleteIds.addAll(configMap.get(nurseConfig.getHisName()).get(nurseConfig.getUniqueName()));
+                }
+                nurseConfig.setCreator(userId);
+                nurseConfig.setGmtCreate(now);
+            }
+            if (nurseConfig.getIsDeleted() == null) {
+                nurseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        nurseConfigService.saveOrUpdateBatch(nurseConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<NurseConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        nurseConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<NurseConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        nurseConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param nurseConfigPageVO
+     * @return
+     */
+    public IPage<NurseConfig> getPage(NurseConfigPageVO nurseConfigPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        nurseConfigPageVO.setHospitalId(Long.valueOf(hospitalId));
+        return nurseConfigService.getPage(nurseConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     */
+    public void importExcel(MultipartFile file) {
+        List<NurseConfig> nurseConfigList = ExcelUtils.importExcel(file, 0, 1, NurseConfig.class);
+        if (ListUtil.isNotEmpty(nurseConfigList)) {
+            importExcelRecords(nurseConfigList);
+        } else {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
+        }
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param nurseConfigList
+     * @return
+     */
+    public Boolean importExcelRecords(List<NurseConfig> nurseConfigList) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //1、数据完整性校验
+        //2、去除前后空格
+        //过滤空数据,保留重复数据,方便计行
+        nurseConfigList = nurseConfigList.stream()
+                .filter(i -> StringUtil.isNotBlank(i.getHisName())
+                        || StringUtil.isNotBlank(i.getUniqueCode())
+                        || StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(nurseConfigList)) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "校验失败,导入数据不能为空");
+        }
+        List<String> emptyNumList = Lists.newLinkedList();
+        for (int i = 0; i < nurseConfigList.size(); i++) {
+            if (StringUtil.isBlank(nurseConfigList.get(i).getHisName())
+                    || StringUtil.isBlank(nurseConfigList.get(i).getUniqueName())) {
+                emptyNumList.add(String.valueOf(i + 2));
+            }
+            if (StringUtil.isNotBlank(nurseConfigList.get(i).getHisName())) {
+                nurseConfigList.get(i).setHisName(nurseConfigList.get(i).getHisName().trim());
+            }
+            if (StringUtil.isNotBlank(nurseConfigList.get(i).getUniqueName())) {
+                nurseConfigList.get(i).setUniqueName(nurseConfigList.get(i).getUniqueName().trim());
+            }
+            if (StringUtil.isNotBlank(nurseConfigList.get(i).getUniqueCode())) {
+                nurseConfigList.get(i).setUniqueCode(nurseConfigList.get(i).getUniqueCode().trim());
+            } else {
+                nurseConfigList.get(i).setUniqueCode(null);
+            }
+        }
+
+        if (ListUtil.isNotEmpty(emptyNumList)) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "以下行数(不计入空行)存在不完整数据:"
+                    + emptyNumList.stream().collect(Collectors.joining("、"))
+                    + "。导入取消,请修改后再试。\n");
+        }
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, List<Long>>> configMap
+                = getConfigMapWithIds(Long.valueOf(hospitalId), null, null);
+        nurseConfigList.forEach(nurseConfig -> {
+            nurseConfig.setHospitalId(Long.valueOf(hospitalId));
+            nurseConfig.setModifier(userId);
+            nurseConfig.setGmtModified(now);
+            if (nurseConfig.getId() == null) {
+                if (configMap.containsKey(nurseConfig.getHisName())
+                        && ListUtil.isNotEmpty(configMap.get(nurseConfig.getHisName()).get(nurseConfig.getUniqueName()))) {
+                    deleteIds.addAll(configMap.get(nurseConfig.getHisName()).get(nurseConfig.getUniqueName()));
+                }
+                nurseConfig.setCreator(userId);
+                nurseConfig.setGmtCreate(now);
+            }
+            if (nurseConfig.getIsDeleted() == null) {
+                nurseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+
+        //标准术语校验
+        List<String> errorNumList = Lists.newLinkedList();
+        List<String> uniqueNames = nurseConfigList.stream()
+                .map(i -> i.getUniqueName())
+                .distinct()
+                .collect(Collectors.toList());
+        ConceptVO conceptVO = new ConceptVO();
+        conceptVO.setNames(uniqueNames);
+        conceptVO.setType(ConceptTypeEnum.Nurse.getKey());
+        RespDTO<List<String>> respDTO = cdssCoreClient.getConceptNames(conceptVO);
+        RespDTOUtil.respNGDealCover(respDTO, "标准术语校验失败");
+        List<String> names = respDTO.data;
+        for (int i = 0; i < nurseConfigList.size(); i++) {
+            if (!names.contains(nurseConfigList.get(i).getUniqueName())) {
+                errorNumList.add(String.valueOf(i + 2));
+            }
+        }
+        if (ListUtil.isNotEmpty(errorNumList)) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
+                    "以下行数(不计空行)标准术语在数据库中不存在:"
+                            + errorNumList.stream().collect(Collectors.joining("、"))
+                            + "。导入取消,请修改后再试。");
+        }
+
+        //重复数据过滤
+        nurseConfigList = nurseConfigList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        nurseConfigService.saveOrUpdateBatch(nurseConfigList);
+        return true;
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<NurseConfig> records = nurseConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<NurseConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<NurseConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, List<Long>>> getConfigMapWithIds(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, List<Long>>> retMap = new HashMap<>();
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<NurseConfig> records = nurseConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<NurseConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<NurseConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                Map<String, List<NurseConfig>> subMap = EntityUtil.makeEntityListMap(entry.getValue(), "uniqueName");
+                Map<String, List<Long>> subIdMap = new HashMap<>();
+                for (Map.Entry<String, List<NurseConfig>> subEntry : subMap.entrySet()) {
+                    subIdMap.put(subEntry.getKey(), subEntry.getValue().stream().map(i -> i.getId()).distinct().collect(Collectors.toList()));
+                }
+                retMap.put(entry.getKey(), subIdMap);
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 获取映射关系
+     * Map<uniqueName,Map<hisName,id>>
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getUniqueNameConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<NurseConfig> records = nurseConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+
+        Map<String, List<NurseConfig>> uniqueNameMap = EntityUtil.makeEntityListMap(records, "uniqueName");
+        for (Map.Entry<String, List<NurseConfig>> entry : uniqueNameMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "hisName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     */
+    public void exportExcel(HttpServletResponse response) {
+        QueryWrapper<NurseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", SysUserUtils.getCurrentHospitalID())
+                .orderByDesc("gmt_modified");
+        List<NurseConfig> records = nurseConfigService.list(queryWrapper);
+        String fileName = "护理映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", NurseConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 数据导入模板导出
+     *
+     * @param response
+     */
+    public void exportExcelModule(HttpServletResponse response) {
+        String fileName = "护理映射模板.xls";
+        ExcelUtils.exportExcel(new ArrayList<>(), null, "sheet1", NurseConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 手术搜索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    public List<NurseInfoDTO> getNurses(RetrievalVO retrievalVO) {
+        List<NurseInfoDTO> nurseNames = new ArrayList<>();
+        List<NurseConfig> nurseConfigList = nurseConfigService.getNursesIndex(retrievalVO);
+        for (NurseConfig nurseConfig: nurseConfigList){
+            NurseInfoDTO nurseInfoDTO = new NurseInfoDTO();
+            nurseInfoDTO.setName(nurseConfig.getHisName());
+            nurseNames.add(nurseInfoDTO);
+        }
+        return nurseNames;
+    }
+}

+ 1 - 1
src/main/java/com/diagbot/facade/PlanDetailFacade.java

@@ -49,7 +49,7 @@ public class PlanDetailFacade extends PlanDetailServiceImpl {
                 .eq("hospital_id", hospitalSetVO.getHospitalId())
                 .eq(StringUtil.isNotBlank(hospitalSetVO.getCode()), "code", hospitalSetVO.getCode())
                 .in("plan_id", hospitalSetVO.getPlanId())
-                .orderByAsc("plan_id", "order_no");
+                .orderByAsc("plan_id", "order_no","id");
         List<PlanDetail> sysSetData = list(sysSetInfo);
         List<PlanDetailDTO> sysSetInfoData = BeanUtil.listCopyTo(sysSetData, PlanDetailDTO.class);
         List<PlanDetailDTO> planDetailParent = new ArrayList<>();//父级数据

+ 28 - 0
src/main/java/com/diagbot/facade/PushFacade.java

@@ -21,6 +21,7 @@ import com.diagbot.vo.PushPlanVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.SearchData;
 import com.google.common.collect.Lists;
+import org.apache.commons.collections4.ListUtils;
 import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -47,6 +48,8 @@ public class PushFacade {
     private ConceptInfoFacade conceptInfoFacade;
     @Autowired
     private DictionaryFacade dictionaryFacade;
+    @Autowired
+    MrFacade mrFacade;
 
     /**
      * 基础推理-症状、查体、化验、辅检、诊断
@@ -101,6 +104,21 @@ public class PushFacade {
         return indicationDTO;
     }
 
+    /**
+     * 提示信息相关推理-危急值、开单合理项、药品禁忌等
+     *
+     * @param indicationPushVO
+     */
+    public String indicationExtPush(IndicationPushVO indicationPushVO) {
+        IndicationDTO indicationDTO = indicationPush(indicationPushVO);
+        if (indicationDTO != null) {
+            if (ListUtil.isNotEmpty(indicationDTO.getBillMsgList()) || ListUtil.isNotEmpty(indicationDTO.getHighRiskList())
+                    || ListUtil.isNotEmpty(indicationDTO.getCriticalValList()) || ListUtil.isNotEmpty(indicationDTO.getOtherList()))
+            return mrFacade.createIndicationMr(indicationDTO);
+        }
+        return "";
+    }
+
     /**
      * 推理持续检验检查计划
      *
@@ -155,6 +173,9 @@ public class PushFacade {
         if (ListUtil.isNotEmpty(pushDTO.getScale())) {
             conceptBaseList.addAll(pushDTO.getScale());
         }
+        if (ListUtil.isNotEmpty(pushDTO.getNurse())) {
+            conceptBaseList.addAll(pushDTO.getNurse());
+        }
         if (ListUtil.isNotEmpty(conceptBaseList)) {
             conceptNameList = conceptBaseList.stream()
                     .map(i -> i.getName())
@@ -214,6 +235,13 @@ public class PushFacade {
                     }
                 });
             }
+            if (ListUtil.isNotEmpty(pushDTO.getNurse())) {
+                pushDTO.getNurse().forEach(item -> {
+                    if (conceptDetailMap.containsKey(item.getName() + "_" + dicStaticTypeValNameMap.get("9"))) {
+                        item.setHasInfo(1);
+                    }
+                });
+            }
         }
         return pushDTO;
     }

+ 5 - 0
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -39,6 +39,8 @@ public class RetrievalFacade {
     private TransfusionConfigFacade transfusionConfigFacade;
     @Autowired
     private ScaleConfigFacade scaleConfigFacade;
+    @Autowired
+    private NurseConfigFacade nurseConfigFacade;
 
     /**
      * 检索
@@ -93,6 +95,9 @@ public class RetrievalFacade {
                     case 10:
                         retrievalDTO.setScalenames(scaleConfigFacade.getScales(retrievalVO));
                         break;
+                    case 11:
+                        retrievalDTO.setNursenames(nurseConfigFacade.getNurses(retrievalVO));
+                        break;
                 }
             }
         }

+ 37 - 0
src/main/java/com/diagbot/mapper/NurseConfigMapper.java

@@ -0,0 +1,37 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.vo.NurseConfigPageVO;
+import com.diagbot.vo.RetrievalVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 护理映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2021-04-26
+ */
+public interface NurseConfigMapper extends BaseMapper<NurseConfig> {
+    /**
+     * 分页查询
+     *
+     * @param nurseConfigPageVO
+     * @return
+     */
+    IPage<NurseConfig> getPage(@Param("nurseConfigPageVO") NurseConfigPageVO nurseConfigPageVO);
+
+    /**
+     * 护理搜索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<NurseConfig> getNursesIndex(RetrievalVO retrievalVO);
+
+}

+ 36 - 0
src/main/java/com/diagbot/service/NurseConfigService.java

@@ -0,0 +1,36 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.vo.NurseConfigPageVO;
+import com.diagbot.vo.RetrievalVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 护理映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2021-04-26
+ */
+public interface NurseConfigService extends IService<NurseConfig> {
+    /**
+     * 分页查询
+     *
+     * @param nurseConfigPageVO
+     * @return
+     */
+    IPage<NurseConfig> getPage(@Param("nurseConfigPageVO") NurseConfigPageVO nurseConfigPageVO);
+
+    /**
+     * 护理搜索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<NurseConfig> getNursesIndex(RetrievalVO retrievalVO);
+}

+ 46 - 0
src/main/java/com/diagbot/service/impl/NurseConfigServiceImpl.java

@@ -0,0 +1,46 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.mapper.NurseConfigMapper;
+import com.diagbot.service.NurseConfigService;
+import com.diagbot.vo.NurseConfigPageVO;
+import com.diagbot.vo.RetrievalVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 护理映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2021-04-26
+ */
+@Service
+public class NurseConfigServiceImpl extends ServiceImpl<NurseConfigMapper, NurseConfig> implements NurseConfigService {
+    /**
+     * 分页查询
+     *
+     * @param nurseConfigPageVO
+     * @return
+     */
+    @Override
+    public IPage<NurseConfig> getPage(@Param("nurseConfigPageVO") NurseConfigPageVO nurseConfigPageVO) {
+        return baseMapper.getPage(nurseConfigPageVO);
+    }
+
+    /**
+     * 护理搜索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @Override
+    public List<NurseConfig> getNursesIndex(RetrievalVO retrievalVO) {
+        return baseMapper.getNursesIndex(retrievalVO);
+    }
+}

+ 280 - 0
src/main/java/com/diagbot/util/RedisUtil.java

@@ -0,0 +1,280 @@
+package com.diagbot.util;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @description: redis工具类
+ * @author: zhoutg
+ * @time: 2020/8/11 19:52
+ */
+@Component
+public class RedisUtil {
+
+    @Autowired
+    @Qualifier("redisTemplateForMr")
+    RedisTemplate redisTemplate;
+
+    /**
+     * 根据指定key获取value
+     *
+     * @param key 键
+     */
+    public <T> T get(String key) {
+        return (T) redisTemplate.opsForValue().get(key);
+    }
+
+    /**
+     * 根据指定key设置obj
+     *
+     * @param key
+     * @param obj
+     */
+    public void set(String key, Object obj) {
+        redisTemplate.opsForValue().set(key, obj);
+    }
+
+    /**
+     * 批量获取
+     *
+     * @param keys
+     * @return
+     */
+    public <T> List<T> multiGet(Collection<String> keys) {
+        return redisTemplate.opsForValue().multiGet(keys);
+    }
+
+    /**
+     * 批量设置
+     *
+     * @param map
+     * @return
+     */
+    public void multiSet(Map<String, Object> map) {
+        redisTemplate.opsForValue().multiSet(map);
+    }
+
+    /**
+     * 更新指定的数据
+     *
+     * @param key
+     * @param str
+     */
+    public void updateValue(String key, String str) {
+        redisTemplate.opsForValue().set(key, str);
+    }
+
+    /**
+     * 删除key
+     *
+     * @param key
+     */
+    public void delete(String key) {
+        redisTemplate.delete(key);
+    }
+
+    /**
+     * 批量删除key
+     *
+     * @param keys
+     */
+    public void delete(Collection<String> keys) {
+        redisTemplate.delete(keys);
+    }
+
+    /**
+     * 根据前缀删除key
+     *
+     * @param prex
+     */
+    public void deleteByPrex(String prex) {
+        prex = prex + "**";
+        Set<String> keys = getKeyList(prex);
+        if (CollectionUtils.isNotEmpty(keys)) {
+            redisTemplate.delete(keys);
+        }
+    }
+
+    /**
+     * 根据正则key获取value列表
+     *
+     * @param pattern 键
+     */
+    public <T> List<T> getByRegex(String pattern) {
+        Set<String> keys = getKeyList(pattern);
+        return multiGet(keys);
+    }
+
+    /**
+     * 查找匹配的key
+     *
+     * @param pattern
+     * @return
+     */
+    public Set<String> getKeyList(String pattern) {
+        return redisTemplate.keys(pattern);
+    }
+
+    /**
+     * 序列化key
+     *
+     * @param key
+     * @return
+     */
+    public byte[] dump(String key) {
+        return redisTemplate.dump(key);
+    }
+
+    /**
+     * 是否存在key
+     *
+     * @param key
+     * @return
+     */
+    public Boolean hasKey(String key) {
+        return redisTemplate.hasKey(key);
+    }
+
+    /**
+     * 设置过期时间
+     *
+     * @param key
+     * @param timeout
+     * @param unit
+     * @return
+     */
+    public Boolean expire(String key, long timeout, TimeUnit unit) {
+        return redisTemplate.expire(key, timeout, unit);
+    }
+
+    /**
+     * 设置过期时间
+     *
+     * @param key
+     * @param date
+     * @return
+     */
+    public Boolean expireAt(String key, Date date) {
+        return redisTemplate.expireAt(key, date);
+    }
+
+    /**
+     * 移除 key 的过期时间,key 将持久保持
+     *
+     * @param key
+     * @return
+     */
+    public Boolean persist(String key) {
+        return redisTemplate.persist(key);
+    }
+
+    /**
+     * 返回 key 的剩余的过期时间
+     *
+     * @param key
+     * @param unit
+     * @return
+     */
+    public Long getExpire(String key, TimeUnit unit) {
+        return redisTemplate.getExpire(key, unit);
+    }
+
+    /**
+     * 返回 key 的剩余的过期时间
+     *
+     * @param key
+     * @return
+     */
+    public Long getExpire(String key) {
+        return redisTemplate.getExpire(key);
+    }
+
+    /**
+     * 修改 key 的名称
+     *
+     * @param oldKey
+     * @param newKey
+     */
+    public void rename(String oldKey, String newKey) {
+        redisTemplate.rename(oldKey, newKey);
+    }
+
+    /**
+     * 仅当 newkey 不存在时,将 oldKey 改名为 newkey
+     *
+     * @param oldKey
+     * @param newKey
+     * @return
+     */
+    public Boolean renameIfAbsent(String oldKey, String newKey) {
+        return redisTemplate.renameIfAbsent(oldKey, newKey);
+    }
+
+    /**
+     * 设置指定 key 的值
+     *
+     * @param key
+     * @param value
+     */
+    public void set(String key, String value) {
+        redisTemplate.opsForValue().set(key, value);
+    }
+
+    /**
+     * 将值 value 关联到 key ,并将 key 的过期时间设为 timeout
+     *
+     * @param key
+     * @param value
+     * @param timeout 过期时间
+     * @param unit    时间单位, 天:TimeUnit.DAYS 小时:TimeUnit.HOURS 分钟:TimeUnit.MINUTES
+     *                秒:TimeUnit.SECONDS 毫秒:TimeUnit.MILLISECONDS
+     */
+    public void setEx(String key, Object value, long timeout, TimeUnit unit) {
+        redisTemplate.opsForValue().set(key, value, timeout, unit);
+    }
+
+    /**
+     * 只有在 key 不存在时设置 key 的值
+     *
+     * @param key
+     * @param value
+     * @return 之前已经存在返回false, 不存在返回true
+     */
+    public boolean setIfAbsent(String key, String value) {
+        return redisTemplate.opsForValue().setIfAbsent(key, value);
+    }
+
+    /**
+     * map集合的形式添加键值对
+     *
+     * @param key
+     * @param map
+     */
+    public void putHashMap(String key, Map<String, Object> map) {
+        if (MapUtils.isNotEmpty(map)) {
+            redisTemplate.opsForHash().putAll(key, map);
+        }
+    }
+
+    /**
+     * 获取集合中指定field的内容
+     * @param key
+     * @param field
+     * @param <T>
+     * @return
+     */
+    public <T> T getByKeyAndField(String key, String field) {
+        return (T)redisTemplate.opsForHash().get(key, field);
+    }
+}

+ 18 - 0
src/main/java/com/diagbot/vo/NurseConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.NurseConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/26 10:26
+ */
+@Getter
+@Setter
+public class NurseConfigListVO {
+    private List<NurseConfig> nurseConfigList;
+}

+ 36 - 0
src/main/java/com/diagbot/vo/NurseConfigPageVO.java

@@ -0,0 +1,36 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/26 10:24
+ */
+@Getter
+@Setter
+public class NurseConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 医院术语名称
+     */
+    private String hisName;
+
+    /**
+     * 医学标准术语名称
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 8 - 8
src/main/java/com/diagbot/web/ConceptInfoController.java

@@ -53,7 +53,7 @@ public class ConceptInfoController {
     private KlConceptStaticFacade klConceptStaticFacade;
 
     @ApiOperation(value = "医学知识(静态知识)检索[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表 <br>" +
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理 <br>" +
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticKnowledgeIndex")
     @SysLogger("staticKnowledgeIndex")
@@ -64,7 +64,7 @@ public class ConceptInfoController {
     }
 
     @ApiOperation(value = "医学术语检索-新增静态知识[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表 <br>" +
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理 <br>" +
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticKnowledgeIndexWithoutInfo")
     @SysLogger("staticKnowledgeIndexWithoutInfo")
@@ -76,7 +76,7 @@ public class ConceptInfoController {
     }
 
     @ApiOperation(value = "页面获取静态知识[zhaops]",
-            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表 <br>" +
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理 <br>" +
                     "contentTypes: 内容类型(多选):1-静态信息、2-注意事项、3-临床路径、4-治疗方案<br>" +
                     "name: 标准术语名称<br>")
     @PostMapping("/getStaticKnowledge")
@@ -87,7 +87,7 @@ public class ConceptInfoController {
     }
 
     @ApiOperation(value = "对接获取静态知识[zhaops]",
-            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、7-手术和操作、8-量表 <br>" +
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、7-手术和操作、8-量表、9-护理 <br>" +
                     "contentTypes: 内容类型(多选):1-静态信息、2-注意事项、3-临床路径、4-治疗方案 <br>" +
                     "hisName: HIS大项名称<br>" +
                     "hisDetailName: HIS小项名称<br>")
@@ -99,7 +99,7 @@ public class ConceptInfoController {
     }
 
     @ApiOperation(value = "获取静态知识列表[zhaops]",
-            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表 <br>" +
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理 <br>" +
                     "name: 术语名称<br>" +
                     "isDeleted: 启用状态:N-启用中、Y-已删除<br>")
     @PostMapping("/getPage")
@@ -111,7 +111,7 @@ public class ConceptInfoController {
     }
 
     @ApiOperation(value = "静态知识检索(分页返回)[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表 <br>" +
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理 <br>" +
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticIndexPage")
     @SysLogger("staticIndexPage")
@@ -124,7 +124,7 @@ public class ConceptInfoController {
     @ApiOperation(value = "保存静态知识-新增或修改[zhaops]",
             notes = "id: id <br>" +
                     "name: 术语名称 <br>" +
-                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表 <br>" +
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理 <br>" +
                     "clinicalPathwayName: 临床路径名称<br>" +
                     "noticeName: 注意事项名称<br>" +
                     "details: 明细<br>")
@@ -149,7 +149,7 @@ public class ConceptInfoController {
 
     @ApiOperation(value = "静态知识是否存在[zhaops]",
             notes = "name: 术语名称 <br>" +
-                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表 <br>")
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理 <br>")
     @PostMapping("/isExist")
     @SysLogger("isExist")
     public RespDTO<Boolean> isExist(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO) {

+ 9 - 0
src/main/java/com/diagbot/web/MrController.java

@@ -1,6 +1,7 @@
 package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.MrFacade;
 import com.diagbot.vo.MrVO;
@@ -44,4 +45,12 @@ public class MrController {
 	public RespDTO<PushJoinVO> getMr(@RequestBody @Valid MrVO mrVO) {
 		return RespDTO.onSuc(mrFacade.getMr(mrVO.getMrId()));
 	}
+
+	@ApiOperation(value = "获取提醒类结果 :[by:zhoutg]",
+			notes = "mrId: 病历编号,必填<br>")
+	@PostMapping("/getIndicationMr")
+	@SysLogger("getIndicationMr")
+	public RespDTO<IndicationDTO> getIndicationMr(@RequestBody @Valid MrVO mrVO) {
+		return RespDTO.onSuc(mrFacade.getIndicationMr(mrVO));
+	}
 }

+ 171 - 0
src/main/java/com/diagbot/web/NurseConfigController.java

@@ -0,0 +1,171 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.NurseConfig;
+import com.diagbot.facade.NurseConfigFacade;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.NurseConfigListVO;
+import com.diagbot.vo.NurseConfigPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 护理映射表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2021-04-26
+ */
+@RestController
+@RequestMapping("/tran/nurseConfig")
+@Api(value = "护理公表映射API", tags = { "护理公表映射API" })
+@SuppressWarnings("unchecked")
+public class NurseConfigController {
+    @Autowired
+    private NurseConfigFacade nurseConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param nurseConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid NurseConfig nurseConfig) {
+        Boolean data = nurseConfigFacade.isExistRecord(nurseConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param nurseConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    @Transactional
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid NurseConfig nurseConfig) {
+        Boolean data = nurseConfigFacade.saveOrUpdateRecord(nurseConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param nurseConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    @Transactional
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid NurseConfigListVO nurseConfigListVO) {
+        Boolean data = nurseConfigFacade.saveOrUpdateRecords(nurseConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    @Transactional
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = nurseConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    @Transactional
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = nurseConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param nurseConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<NurseConfig> getPage(@RequestBody @Valid NurseConfigPageVO nurseConfigPageVO) {
+        IPage<NurseConfig> data = nurseConfigFacade.getPage(nurseConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 公表数据导入
+     *
+     * @param file
+     * @return
+     */
+    @ApiOperation(value = "公表数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    @Transactional
+    public void importExcel(@RequestParam("file") MultipartFile file) {
+        nurseConfigFacade.importExcel(file);
+    }
+
+    /**
+     * 数据导出
+     *
+     * @return
+     */
+    @ApiOperation(value = "数据导出[by:gaodm]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response) {
+        nurseConfigFacade.exportExcel(response);
+    }
+
+    /**
+     * 数据导入模板导出
+     *
+     * @return
+     */
+    @ApiOperation(value = "数据导入模板导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcelModule")
+    @SysLogger("exportExcelModule")
+    public void exportExcelModule(HttpServletResponse response) {
+        nurseConfigFacade.exportExcelModule(response);
+    }
+}

+ 7 - 0
src/main/java/com/diagbot/web/PushController.java

@@ -68,6 +68,13 @@ public class PushController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "开单合理项推理扩展接口[by:zhoutg]", notes = "ruleType(1:危急值提醒,2:开单合理项,3:高危药品、手术,4:其他提醒)")
+    @PostMapping("/indicationExtPush")
+    @SysLogger("indicationExtPush")
+    @TokenAuth
+    public RespDTO<String> indicationExtPush(@RequestBody @Valid IndicationPushVO indicationPushVO) {
+        return RespDTO.onSuc(pushFacade.indicationExtPush(indicationPushVO));
+    }
 
     @ApiOperation(value = "推送持续检验检查计划API[zhaops]", notes = "operationName:随访手术")
     @PostMapping("/pushPlan")

+ 1 - 1
src/main/java/com/diagbot/web/RetrievalController.java

@@ -28,7 +28,7 @@ public class RetrievalController {
     private RetrievalFacade retrievalFacade;
 
     @ApiOperation(value = "术语检索[zhaops]",
-            notes = "type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血 <br>" +
+            notes = "type: 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状、10-量表、11-护理 <br>" +
                     "inputStr: 检索内容<br>" +
                     "sex: 性别:1-男、2-女、3-通用 <br>" +
                     "age: 年龄<br>")

+ 1 - 1
src/main/resources/application-dev.yml

@@ -158,7 +158,7 @@ mybatis-plus:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 200
 
 myhost: localhost
 oath.self.address: http://${myhost}:${server.port}

+ 1 - 1
src/main/resources/application-local.yml

@@ -158,7 +158,7 @@ mybatis-plus:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 200
 
 myhost: localhost
 oath.self.address: http://${myhost}:${server.port}

+ 1 - 1
src/main/resources/application-pre.yml

@@ -158,7 +158,7 @@ mybatis-plus:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 200
 
 myhost: localhost
 oath.self.address: http://${myhost}:${server.port}

+ 1 - 1
src/main/resources/application-pro.yml

@@ -158,7 +158,7 @@ mybatis-plus:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 200
 
 myhost: localhost
 oath.self.address: http://${myhost}:${server.port}

+ 1 - 1
src/main/resources/application-test.yml

@@ -158,7 +158,7 @@ mybatis-plus:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 200
 
 myhost: localhost
 oath.self.address: http://${myhost}:${server.port}

+ 83 - 0
src/main/resources/mapper/NurseConfigMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.NurseConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.NurseConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.NurseConfig">
+        select a.*
+        from tran_nurse_config a
+        where a.is_deleted='N'
+        <if test="nurseConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{nurseConfigPageVO.hospitalId}
+        </if>
+        <if test="nurseConfigPageVO.hisName!=null and nurseConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{nurseConfigPageVO.hisName},"%")
+        </if>
+        <if test="nurseConfigPageVO.uniqueName!=null and nurseConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{nurseConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="nurseConfigPageVO.uniqueCode!=null and nurseConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{nurseConfigPageVO.uniqueCode},"%")
+        </if>
+        order by a.gmt_modified desc
+    </select>
+
+    <select id="getNursesIndex" resultType="com.diagbot.entity.NurseConfig"
+            parameterType="com.diagbot.vo.RetrievalVO">
+        SELECT DISTINCT u.his_name
+        FROM(
+        SELECT
+        DISTINCT his_name
+        FROM
+        `tran_nurse_config`
+        WHERE
+        is_deleted = "N"
+        <if test="hospitalId!=null">
+            and hospital_id=#{hospitalId}
+        </if>
+        <if test="inputStr!=null and inputStr!=''">
+            and his_name = #{inputStr}
+        </if>
+        UNION
+        SELECT
+        DISTINCT his_name
+        FROM
+        `tran_nurse_config`
+        WHERE
+        is_deleted = "N"
+        <if test="hospitalId!=null">
+            and hospital_id=#{hospitalId}
+        </if>
+        <if test="inputStr!=null and inputStr!=''">
+            and his_name like concat(#{inputStr},"%")
+        </if>
+        UNION
+        SELECT
+        DISTINCT his_name
+        FROM
+        `tran_nurse_config`
+        WHERE
+        is_deleted = "N"
+        <if test="hospitalId!=null">
+            and hospital_id=#{hospitalId}
+        </if>
+        <if test="inputStr!=null and inputStr!=''">
+            and his_name like concat("%",#{inputStr},"%")
+        </if>
+        ) u LIMIT 100
+    </select>
+</mapper>