Browse Source

sys_regular_config 从cdss移到med_2021

gaodm 4 years ago
parent
commit
a2782ce4fd

+ 1 - 0
doc/004.20210225知识库迁移到Mysql/cdss-core_init.sql

@@ -3,6 +3,7 @@ use `cdss`;
 DROP TABLE IF EXISTS `graph_concept_detail`;
 DROP TABLE IF EXISTS `graph_concept_info`;
 DROP TABLE IF EXISTS `graph_disease_corresponding`;
+DROP TABLE IF EXISTS `sys_regular_config`;
 
 UPDATE `sys_menu` SET `id`='14', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `name`='开单合理性规则维护', `parent_id`='13', `code`='GZWH-KDHLXGZWH', `order_no`='1', `remark`='规则维护-开单合理性规则维护' WHERE (`id`='14');
 

+ 1 - 1
src/main/java/com/diagbot/entity/SysRegularConfig.java

@@ -14,7 +14,7 @@ import java.util.Date;
  * @author wangfeng
  * @since 2020-12-08
  */
-public class SysRegularConfig implements Serializable {
+public class KlRegularConfig implements Serializable {
 
     private static final long serialVersionUID = 1L;
 

+ 2 - 2
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -40,7 +40,7 @@ public class IndicationFacade {
     @Autowired
     CommonRule commonRule;
     @Autowired
-    SysRegularConfigFacade sysRegularConfigFacade;
+    KlRegularConfigFacade klRegularConfigFacade;
 
     private static final Map<String, List<String>> methodMap;
 
@@ -97,7 +97,7 @@ public class IndicationFacade {
         }
         CoreUtil.getDebugStr(standStart, "标准词转换耗时", debug);
         //正则匹配开始
-        wordCrfDTO = sysRegularConfigFacade.getRegularConfigs(wordCrfDTO,indicationPushVO);
+        wordCrfDTO = klRegularConfigFacade.getRegularConfigs(wordCrfDTO,indicationPushVO);
         //正则匹配结束
         // 合并【数据来源】
         wordCrfDTO.setDiagSource(commonRule.getDiseaseSource(wordCrfDTO));

+ 8 - 8
src/main/java/com/diagbot/facade/SysRegularConfigFacade.java

@@ -5,14 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.dto.RegularValueDTO;
 import com.diagbot.dto.WordCrfDTO;
-import com.diagbot.entity.SysRegularConfig;
+import com.diagbot.entity.KlRegularConfig;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.RegularConfigEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.model.entity.AllergyMedicine;
 import com.diagbot.model.label.PastLabel;
-import com.diagbot.service.impl.SysRegularConfigServiceImpl;
+import com.diagbot.service.impl.KlRegularConfigServiceImpl;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.RegularConfigDataVO;
@@ -30,17 +30,17 @@ import java.util.regex.Pattern;
  * @date 2020-11-30 16:10
  */
 @Component
-public class SysRegularConfigFacade extends SysRegularConfigServiceImpl {
+public class KlRegularConfigFacade extends KlRegularConfigServiceImpl {
 
     public List<RegularValueDTO> getRegularConfigDatas(RegularConfigDataVO regularConfigDataVO) {
         List<RegularValueDTO> listData = new ArrayList<>();
-        QueryWrapper<SysRegularConfig> regularQuery = new QueryWrapper<>();
+        QueryWrapper<KlRegularConfig> regularQuery = new QueryWrapper<>();
         regularQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq(regularConfigDataVO.getRulesCode() != null, "rules_code", regularConfigDataVO.getRulesCode())
                 .eq(regularConfigDataVO.getRulesTepy() != null, "rules_tepy", regularConfigDataVO.getRulesTepy());
-        List<SysRegularConfig> regularConfigs = list(regularQuery);
+        List<KlRegularConfig> regularConfigs = list(regularQuery);
         if (ListUtil.isNotEmpty(regularConfigs)) {
-            for (SysRegularConfig data : regularConfigs) {
+            for (KlRegularConfig data : regularConfigs) {
                 String pattern = "";
                 String patternMax = "";
                 if (data.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
@@ -169,7 +169,7 @@ public class SysRegularConfigFacade extends SysRegularConfigServiceImpl {
 
             List<String> name = regularConfigSaveVO.getName();
             for (String str : name) {
-                int countTow = this.count(new QueryWrapper<SysRegularConfig>()
+                int countTow = this.count(new QueryWrapper<KlRegularConfig>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
                         .eq(str != null, "rules_name", str)
                         .eq(regularConfigSaveVO.getStandardName() != null, "stand_name", str)
@@ -177,7 +177,7 @@ public class SysRegularConfigFacade extends SysRegularConfigServiceImpl {
                 if (countTow > 0) {
                     throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, str + "该方案编码已存在");
                 } else {
-                    SysRegularConfig regularConfig = new SysRegularConfig();
+                    KlRegularConfig regularConfig = new KlRegularConfig();
                     regularConfig.setStandName(regularConfigSaveVO.getStandardName());
                     regularConfig.setRulesName(str);
                     regularConfig.setRulesTepy(regularConfigSaveVO.getRulesTepy());

+ 2 - 2
src/main/java/com/diagbot/mapper/SysRegularConfigMapper.java

@@ -1,6 +1,6 @@
 package com.diagbot.mapper;
 
-import com.diagbot.entity.SysRegularConfig;
+import com.diagbot.entity.KlRegularConfig;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @author zhoutg
  * @since 2020-11-30
  */
-public interface SysRegularConfigMapper extends BaseMapper<SysRegularConfig> {
+public interface KlRegularConfigMapper extends BaseMapper<KlRegularConfig> {
 
 }

+ 2 - 2
src/main/java/com/diagbot/service/SysRegularConfigService.java

@@ -1,7 +1,7 @@
 package com.diagbot.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.entity.SysRegularConfig;
+import com.diagbot.entity.KlRegularConfig;
 
 /**
  * <p>
@@ -11,6 +11,6 @@ import com.diagbot.entity.SysRegularConfig;
  * @author zhoutg
  * @since 2020-11-30
  */
-public interface SysRegularConfigService extends IService<SysRegularConfig> {
+public interface KlRegularConfigService extends IService<KlRegularConfig> {
 
 }

+ 4 - 5
src/main/java/com/diagbot/service/impl/SysRegularConfigServiceImpl.java

@@ -1,9 +1,9 @@
 package com.diagbot.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
-import com.diagbot.entity.SysRegularConfig;
-import com.diagbot.mapper.SysRegularConfigMapper;
-import com.diagbot.service.SysRegularConfigService;
+import com.diagbot.entity.KlRegularConfig;
+import com.diagbot.mapper.KlRegularConfigMapper;
+import com.diagbot.service.KlRegularConfigService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
@@ -16,7 +16,6 @@ import org.springframework.stereotype.Service;
  * @since 2020-11-30
  */
 @Service
-@DS("cdss")
-public class SysRegularConfigServiceImpl extends ServiceImpl<SysRegularConfigMapper, SysRegularConfig> implements SysRegularConfigService {
+public class KlRegularConfigServiceImpl extends ServiceImpl<KlRegularConfigMapper, KlRegularConfig> implements KlRegularConfigService {
 
 }

+ 5 - 6
src/main/java/com/diagbot/web/SysRegularConfigController.java

@@ -3,7 +3,7 @@ package com.diagbot.web;
 
 import com.diagbot.dto.RegularValueDTO;
 import com.diagbot.dto.RespDTO;
-import com.diagbot.facade.SysRegularConfigFacade;
+import com.diagbot.facade.KlRegularConfigFacade;
 import com.diagbot.vo.RegularConfigDataVO;
 import com.diagbot.vo.RegularConfigSaveVO;
 import io.swagger.annotations.Api;
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
 import java.util.List;
-import java.util.Map;
 
 /**
  * <p>
@@ -31,16 +30,16 @@ import java.util.Map;
 @RequestMapping("/sysRegularConfig")
 @Api(value = "正则匹配相关API", tags = { "正则匹配相关API" })
 @SuppressWarnings("unchecked")
-public class SysRegularConfigController {
+public class KlRegularConfigController {
 
     @Autowired
-    SysRegularConfigFacade sysRegularConfigFacade;
+    KlRegularConfigFacade klRegularConfigFacade;
 
     @ApiOperation(value = "从文本中取出化验相应正则数据",
             notes = "从文本中取出化验相应正则数据")
     @PostMapping("/getRegularConfigData")
     public RespDTO<List<RegularValueDTO>> getRegularConfigData(@Valid @RequestBody RegularConfigDataVO regularConfigDataVO) {
-        List<RegularValueDTO> data = sysRegularConfigFacade.getRegularConfigDatas(regularConfigDataVO);
+        List<RegularValueDTO> data = klRegularConfigFacade.getRegularConfigDatas(regularConfigDataVO);
         return RespDTO.onSuc(data);
     }
 
@@ -49,7 +48,7 @@ public class SysRegularConfigController {
     @PostMapping("/saverRegularConfigData")
     @Transactional
     public RespDTO<Boolean> saverRegularConfigData(@Valid @RequestBody List<RegularConfigSaveVO> regularConfigSaveVO) {
-        boolean res = sysRegularConfigFacade.saverRegularConfigDatas(regularConfigSaveVO);
+        boolean res = klRegularConfigFacade.saverRegularConfigDatas(regularConfigSaveVO);
         return RespDTO.onSuc(res);
     }
 

+ 2 - 2
src/main/resources/mapper/SysRegularConfigMapper.xml

@@ -1,9 +1,9 @@
 <?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.SysRegularConfigMapper">
+<mapper namespace="com.diagbot.mapper.KlRegularConfigMapper">
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.SysRegularConfig">
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.KlRegularConfig">
         <id column="id" property="id" />
         <result column="is_deleted" property="isDeleted" />
         <result column="gmt_create" property="gmtCreate" />