ソースを参照

Merge branch 'dev/icssNCD' into dev/KLBstand

gaodm 6 年 前
コミット
2580655963

+ 7 - 218
aipt-service/src/main/java/com/diagbot/client/bean/SearchData.java

@@ -3,6 +3,8 @@ package com.diagbot.client.bean;
 import com.diagbot.client.AlgorithmClassify;
 import com.diagbot.client.Feature;
 import com.diagbot.dto.LisResult;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -12,6 +14,8 @@ import java.util.Map;
 /**
  * Created by fyeman on 2018/1/31.
  */
+@Getter
+@Setter
 public class SearchData {
     private int length = 10;
     private int age_start = 0;
@@ -29,7 +33,9 @@ public class SearchData {
     private String past = "";
     private String other = "";
     private List<LisResult> lisArr;
-
+    private Integer disType; //0-普通病(默认不填),1-慢病,2-急诊
+    private String scaleName;
+    private String indications;
 
     //特征类别
     private String featureType;
@@ -53,221 +59,4 @@ public class SearchData {
     private List<Feature> pacsFeatureList = new ArrayList<>();
     private List<Feature> diagFeatureList = new ArrayList<>();
     private List<Feature> symptompropertyFeatureList = new ArrayList<>();
-
-    public int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public int getAge_start() {
-        return age_start;
-    }
-
-    public void setAge_start(int age_start) {
-        this.age_start = age_start;
-    }
-
-    public int getAge_end() {
-        return age_end;
-    }
-
-    public void setAge_end(int age_end) {
-        this.age_end = age_end;
-    }
-
-    public int getAge() {
-        return age;
-    }
-
-    public void setAge(int age) {
-        this.age = age;
-    }
-
-    public String getSex() {
-        return sex;
-    }
-
-    public void setSex(String sex) {
-        this.sex = sex;
-    }
-
-    public String getSymptom() {
-        return symptom;
-    }
-
-    public void setSymptom(String symptom) {
-        this.symptom = symptom;
-    }
-
-    public String getVital() {
-        return vital;
-    }
-
-    public void setVital(String vital) {
-        this.vital = vital;
-    }
-
-    public String getLis() {
-        return lis;
-    }
-
-    public void setLis(String lis) {
-        this.lis = lis;
-    }
-
-    public String getPacs() {
-        return pacs;
-    }
-
-    public void setPacs(String pacs) {
-        this.pacs = pacs;
-    }
-
-    public String getDiag() {
-        return diag;
-    }
-
-    public void setDiag(String diag) {
-        this.diag = diag;
-    }
-
-    public String getPast() {
-        return past;
-    }
-
-    public void setPast(String past) {
-        this.past = past;
-    }
-
-    public String getOther() {
-        return other;
-    }
-
-    public void setOther(String other) {
-        this.other = other;
-    }
-
-    public String getFeatureType() {
-        return featureType;
-    }
-
-    public void setFeatureType(String featureType) {
-        this.featureType = featureType;
-    }
-
-    public String[] getFeatureTypes() {
-        return featureTypes;
-    }
-
-    public void setFeatureTypes(String[] featureTypes) {
-        this.featureTypes = featureTypes;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getSysCode() {
-        return sysCode;
-    }
-
-    public void setSysCode(String sysCode) {
-        this.sysCode = sysCode;
-    }
-
-    public void setThreshold(String threshold) {
-        this.threshold = threshold;
-    }
-
-    public float getThreshold() {
-        return Float.parseFloat(threshold);
-    }
-
-    public List<Feature> getSymptomFeatureList() {
-        return symptomFeatureList;
-    }
-
-    public void setSymptomFeatureList(List<Feature> symptomFeatureList) {
-        this.symptomFeatureList = symptomFeatureList;
-    }
-
-    public List<Feature> getVitalFeatureList() {
-        return vitalFeatureList;
-    }
-
-    public void setVitalFeatureList(List<Feature> vitalFeatureList) {
-        this.vitalFeatureList = vitalFeatureList;
-    }
-
-    public List<Feature> getLisFeatureList() {
-        return lisFeatureList;
-    }
-
-    public void setLisFeatureList(List<Feature> lisFeatureList) {
-        this.lisFeatureList = lisFeatureList;
-    }
-
-    public List<Feature> getPacsFeatureList() {
-        return pacsFeatureList;
-    }
-
-    public void setPacsFeatureList(List<Feature> pacsFeatureList) {
-        this.pacsFeatureList = pacsFeatureList;
-    }
-
-
-    public List<Feature> getSymptompropertyFeatureList() {
-        return symptompropertyFeatureList;
-    }
-
-    public void setSymptompropertyFeatureList(List<Feature> symptompropertyFeatureList) {
-        this.symptompropertyFeatureList = symptompropertyFeatureList;
-    }
-
-    public List<Feature> getDiagFeatureList() {
-        return diagFeatureList;
-    }
-
-    public void setDiagFeatureList(List<Feature> diagFeatureList) {
-        this.diagFeatureList = diagFeatureList;
-    }
-
-    public Map<String, Map<String, String>> getInputs() {
-        return inputs;
-    }
-
-    public void setInputs(Map<String, Map<String, String>> inputs) {
-        this.inputs = inputs;
-    }
-
-    public AlgorithmClassify[] getAlgorithmClassify() {
-        return algorithmClassify;
-    }
-
-    public void setAlgorithmClassify(AlgorithmClassify[] algorithmClassify) {
-        this.algorithmClassify = algorithmClassify;
-    }
-
-    public String getAlgorithmClassifyValue() {
-        return algorithmClassifyValue;
-    }
-
-    public void setAlgorithmClassifyValue(String algorithmClassifyValue) {
-        this.algorithmClassifyValue = algorithmClassifyValue;
-    }
-
-    public List<LisResult> getLisArr() {
-        return lisArr;
-    }
-
-    public void setLisArr(List<LisResult> lisArr) {
-        this.lisArr = lisArr;
-    }
 }

+ 1 - 1
aipt-service/src/main/java/com/diagbot/vo/SearchVo.java

@@ -63,5 +63,5 @@ public class SearchVo {
     private Map<String, Map<String, String>> inputs;
 
     private String scaleName;
-
+    private String indications;
 }

+ 2 - 1
docs/006.20190304慢病基于icss增量脚本/init_icss_NCD.sql

@@ -60,7 +60,7 @@ INSERT INTO `icss_dictionary_info` VALUES ('41', 'N', '1970-01-01 12:00:00', '19
 INSERT INTO `icss_dictionary_info` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '单选含自由填写项', '11', '1', '70', '单标签组件类型');
 INSERT INTO `icss_dictionary_info` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '量表', '21', '1', '90', '标签归属');
 INSERT INTO `icss_dictionary_info` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '核心指标', '22', '1', '100', '标签归属');
-INSERT INTO `icss_dictionary_info` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '诊断', '7', '1', '70', '模板类型归属');
+INSERT INTO `icss_dictionary_info` VALUES ('45', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '诊断', '7', '1', '70', '模板类型归属');
 INSERT INTO `icss_dictionary_info` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '普通病', '0', '1', '10', '诊断类型');
 INSERT INTO `icss_dictionary_info` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '慢病', '1', '1', '20', '诊断类型');
 INSERT INTO `icss_dictionary_info` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '急诊', '2', '1', '30', '诊断类型');
@@ -273,6 +273,7 @@ UPDATE `icss_module_info` SET `module_type`='0',`relation_id`='0' WHERE (`id`='4
 UPDATE `icss_module_info` SET `type` = '22',`module_type`='0',`relation_id`='0' WHERE (`id`='5');
 UPDATE `icss_module_info` SET `type` = '31',`module_type`='0',`relation_id`='0' WHERE (`id`='6');
 
+
 -- 赵佩诗
 -- 提示信息显示位置修改
 ALTER TABLE icss_introduce_detail MODIFY COLUMN `position` VARCHAR (11) DEFAULT '2' COMMENT '显示位置(多选):1-推送展示,2-更多展示,3-一般治疗展示,4-手术治疗展示,5-药品说明书,6-不良反应';

+ 1 - 1
icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -31,7 +31,7 @@ public interface AiptServiceClient {
     @PostMapping(value = "/nlpService/symptomFeature")
     Response<List<Map<String, Object>>> symptomFeaturePageData(@RequestParam("text") String text);
 
-    @PostMapping("/clinicaldata/highRish")
+    @PostMapping("/clinicaldata/highRisk")
     Response<GdbResponse> highRisk(@RequestBody SearchData searchData);
 
     @PostMapping(value = "/clinicaldata/scaleCalc")

+ 5 - 251
icss-service/src/main/java/com/diagbot/client/bean/SearchData.java

@@ -1,6 +1,8 @@
 package com.diagbot.client.bean;
 
 import com.diagbot.vo.LisResult;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -10,6 +12,8 @@ import java.util.Map;
 /**
  * Created by fyeman on 2018/1/31.
  */
+@Getter
+@Setter
 public class SearchData {
     private int length = 10;
     private int age_start = 0;
@@ -30,7 +34,7 @@ public class SearchData {
     private Integer disType; //0-普通病(默认不填),1-慢病,2-急诊
     private String scaleName;
     private List<AdverseReaction> adverseEvent;
-    private List<IndicationResult> indications;
+    private String indications;
 
     //特征类别
     private String featureType;
@@ -47,260 +51,10 @@ public class SearchData {
 
     private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.8f);
 
-
     private List<Feature> symptomFeatureList = new ArrayList<>();
     private List<Feature> vitalFeatureList = new ArrayList<>();
     private List<Feature> lisFeatureList = new ArrayList<>();
     private List<Feature> pacsFeatureList = new ArrayList<>();
     private List<Feature> diagFeatureList = new ArrayList<>();
     private List<Feature> symptompropertyFeatureList = new ArrayList<>();
-
-    public int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public int getAge_start() {
-        return age_start;
-    }
-
-    public void setAge_start(int age_start) {
-        this.age_start = age_start;
-    }
-
-    public int getAge_end() {
-        return age_end;
-    }
-
-    public void setAge_end(int age_end) {
-        this.age_end = age_end;
-    }
-
-    public int getAge() {
-        return age;
-    }
-
-    public void setAge(int age) {
-        this.age = age;
-    }
-
-    public String getSex() {
-        return sex;
-    }
-
-    public void setSex(String sex) {
-        this.sex = sex;
-    }
-
-    public String getSymptom() {
-        return symptom;
-    }
-
-    public void setSymptom(String symptom) {
-        this.symptom = symptom;
-    }
-
-    public String getVital() {
-        return vital;
-    }
-
-    public void setVital(String vital) {
-        this.vital = vital;
-    }
-
-    public String getLis() {
-        return lis;
-    }
-
-    public void setLis(String lis) {
-        this.lis = lis;
-    }
-
-    public String getPacs() {
-        return pacs;
-    }
-
-    public void setPacs(String pacs) {
-        this.pacs = pacs;
-    }
-
-    public String getDiag() {
-        return diag;
-    }
-
-    public void setDiag(String diag) {
-        this.diag = diag;
-    }
-
-    public String getPast() {
-        return past;
-    }
-
-    public void setPast(String past) {
-        this.past = past;
-    }
-
-    public String getOther() {
-        return other;
-    }
-
-    public void setOther(String other) {
-        this.other = other;
-    }
-
-    public String getFeatureType() {
-        return featureType;
-    }
-
-    public void setFeatureType(String featureType) {
-        this.featureType = featureType;
-    }
-
-    public String[] getFeatureTypes() {
-        return featureTypes;
-    }
-
-    public void setFeatureTypes(String[] featureTypes) {
-        this.featureTypes = featureTypes;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getSysCode() {
-        return sysCode;
-    }
-
-    public void setSysCode(String sysCode) {
-        this.sysCode = sysCode;
-    }
-
-    public void setThreshold(String threshold) {
-        this.threshold = threshold;
-    }
-
-    public float getThreshold() {
-        return Float.parseFloat(threshold);
-    }
-
-    public List<Feature> getSymptomFeatureList() {
-        return symptomFeatureList;
-    }
-
-    public void setSymptomFeatureList(List<Feature> symptomFeatureList) {
-        this.symptomFeatureList = symptomFeatureList;
-    }
-
-    public List<Feature> getVitalFeatureList() {
-        return vitalFeatureList;
-    }
-
-    public void setVitalFeatureList(List<Feature> vitalFeatureList) {
-        this.vitalFeatureList = vitalFeatureList;
-    }
-
-    public List<Feature> getLisFeatureList() {
-        return lisFeatureList;
-    }
-
-    public void setLisFeatureList(List<Feature> lisFeatureList) {
-        this.lisFeatureList = lisFeatureList;
-    }
-
-    public List<Feature> getPacsFeatureList() {
-        return pacsFeatureList;
-    }
-
-    public void setPacsFeatureList(List<Feature> pacsFeatureList) {
-        this.pacsFeatureList = pacsFeatureList;
-    }
-
-
-    public List<Feature> getSymptompropertyFeatureList() {
-        return symptompropertyFeatureList;
-    }
-
-    public void setSymptompropertyFeatureList(List<Feature> symptompropertyFeatureList) {
-        this.symptompropertyFeatureList = symptompropertyFeatureList;
-    }
-
-    public List<Feature> getDiagFeatureList() {
-        return diagFeatureList;
-    }
-
-    public void setDiagFeatureList(List<Feature> diagFeatureList) {
-        this.diagFeatureList = diagFeatureList;
-    }
-
-    public Map<String, Map<String, String>> getInputs() {
-        return inputs;
-    }
-
-    public void setInputs(Map<String, Map<String, String>> inputs) {
-        this.inputs = inputs;
-    }
-
-    public AlgorithmClassify[] getAlgorithmClassify() {
-        return algorithmClassify;
-    }
-
-    public void setAlgorithmClassify(AlgorithmClassify[] algorithmClassify) {
-        this.algorithmClassify = algorithmClassify;
-    }
-
-    public String getAlgorithmClassifyValue() {
-        return algorithmClassifyValue;
-    }
-
-    public void setAlgorithmClassifyValue(String algorithmClassifyValue) {
-        this.algorithmClassifyValue = algorithmClassifyValue;
-    }
-
-    public List<LisResult> getLisArr() {
-        return lisArr;
-    }
-
-    public void setLisArr(List<LisResult> lisArr) {
-        this.lisArr = lisArr;
-    }
-
-    public Integer getDisType() {
-        return disType;
-    }
-
-    public void setDisType(Integer disType) {
-        this.disType = disType;
-    }
-
-    public String getScaleName() {
-        return scaleName;
-    }
-
-    public void setScaleName(String scaleName) {
-        this.scaleName = scaleName;
-    }
-
-    public List<AdverseReaction> getAdverseEvent() {
-        return adverseEvent;
-    }
-
-    public void setAdverseEvent(List<AdverseReaction> adverseEvent) {
-        this.adverseEvent = adverseEvent;
-    }
-
-    public List<IndicationResult> getIndications() {
-        return indications;
-    }
-
-    public void setIndications(List<IndicationResult> indications) {
-        this.indications = indications;
-    }
 }

ファイルの差分が大きいため隠しています
+ 7 - 7
icss-service/src/main/java/com/diagbot/facade/PushFacade.java


+ 2 - 2
icss-service/src/main/java/com/diagbot/vo/PushVO.java

@@ -14,12 +14,12 @@ import java.util.List;
  */
 @Getter
 @Setter
-public class PushVO  extends PushBaseVO{
+public class PushVO  extends PushBaseVO {
     private Long diseaseId;
     private Long patientId;   //病人id
     private String scaleName; //量表名称
     private Long scaleId;     //量表id
     private Integer disType;  //0-普通病(默认不填),1-慢病,2-急诊
     private List<AdverseReaction> adverseReactions; //不良反应
-    private List<IndicationResult> medicalIndications;   //推理指标
+    private String indications;   //推理指标
 }

+ 1 - 1
icss-service/src/main/java/com/diagbot/web/IndexDataController.java

@@ -38,7 +38,7 @@ public class IndexDataController {
     @Autowired
     IndexDataFacade indexDataFacade;
 
-    @ApiOperation(value = "2期-根据疾病Id获取指标配置[by:wangfeng]", notes = "diseaseId:疾病Id 必填<br> patientId:患者id ,必填<br> startTime:开始时间 ,必填<br> endTime:结束时间 ,必填<br> ")
+    @ApiOperation(value = "2期-根据疾病Id获取指标数据[by:wangfeng]", notes = "diseaseId:疾病Id 必填<br> patientId:患者id ,必填<br> startTime:开始时间 ,必填<br> endTime:结束时间 ,必填<br> ")
     @PostMapping("/getIndexDatas")
     @SysLogger("getIndexDatas")
     public RespDTO<IndexConfigAndDataDTO> getIndexDatas(@Valid @RequestBody IndexDataFindVO indexDataFindVO) {

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/PushController.java

@@ -63,6 +63,7 @@ public class PushController {
                     "scaleId:量表id,Long<br>" +
                     "patientId:病人id,Long<br>" +
                     "disType:诊断类型,1-慢病,2-急诊,普通病不填,Integer<br>" +
+                    "indications:指标结果,String<br>" +
                     "adverseReactions:不良反应,List<不良反应明细><br>")
     @PostMapping("/pushInner")
     @SysLogger("pushInner")

+ 3 - 3
icssman-service/src/main/java/com/diagbot/dto/GetDisScaleAllInfoDTO.java

@@ -18,9 +18,9 @@ public class GetDisScaleAllInfoDTO{
     //记录修改时间,如果时间是1970年则表示纪录未修改
     private Date gmtModified;
     //诊断id
-    private Long disId;
-    //量表id
-    private Long scaleId;
+    private String disId;
+    //删除id
+    private String delId;
     //修改人
     private String modifier;
     //诊断名称

+ 32 - 0
icssman-service/src/main/java/com/diagbot/dto/GetDisScaleByDisIdDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/4/25 16:16
+ */
+@Getter
+@Setter
+public class GetDisScaleByDisIdDTO {
+    //id
+    private Long id;
+    //记录修改时间,如果时间是1970年则表示纪录未修改
+    private Date gmtModified;
+    //诊断id
+    private Long disId;
+    //删除id
+    private Long scaleId;
+    //修改人
+    private String modifier;
+    //诊断名称
+    private String disName;
+    //量表名称
+    private String scaleName;
+    //操作人名称
+    private String userName;
+}

+ 10 - 7
icssman-service/src/main/java/com/diagbot/facade/DisScaleFacade.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.client.UserServiceClient;
 import com.diagbot.dto.GetDisScaleAllInfoDTO;
+import com.diagbot.dto.GetDisScaleByDisIdDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.DisScale;
 import com.diagbot.entity.QuestionInfo;
@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -126,7 +128,7 @@ public class DisScaleFacade extends DisScaleServiceImpl {
      * @param getDisScaleByDisIdVO
      * @return
      */
-    public List<GetDisScaleAllInfoDTO> getDisScaleByDisId(GetDisScaleByDisIdVO getDisScaleByDisIdVO) {
+    public List<GetDisScaleByDisIdDTO> getDisScaleByDisId(GetDisScaleByDisIdVO getDisScaleByDisIdVO) {
         //查询诊断量表关联信息
         QueryWrapper<DisScale> disScaleQueryWrapper = new QueryWrapper<>();
         disScaleQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -138,7 +140,7 @@ public class DisScaleFacade extends DisScaleServiceImpl {
                     "关联信息系不存在,请添加关联");
         }
         List<Long> questionIds = new ArrayList<>();
-        List<GetDisScaleAllInfoDTO> getDisScaleAllInfoDTOS = BeanUtil.listCopyTo(disScales, GetDisScaleAllInfoDTO.class);
+        List<GetDisScaleByDisIdDTO> getDisScaleAllInfoDTOS = BeanUtil.listCopyTo(disScales, GetDisScaleByDisIdDTO.class);
         for (DisScale disScale : disScales) {
             questionIds.add(disScale.getDisId());
             questionIds.add(disScale.getScaleId());
@@ -151,9 +153,9 @@ public class DisScaleFacade extends DisScaleServiceImpl {
         Map<Long, QuestionInfo> questionInfoMap
                 = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId, questionInfo -> questionInfo));
         //将标签名称放入出参
-        for (GetDisScaleAllInfoDTO getDisScaleAllInfoDTO : getDisScaleAllInfoDTOS) {
-            getDisScaleAllInfoDTO.setDisName(questionInfoMap.get(getDisScaleAllInfoDTO.getDisId()).getName());
-            getDisScaleAllInfoDTO.setScaleName(questionInfoMap.get(getDisScaleAllInfoDTO.getScaleId()).getName());
+        for (GetDisScaleByDisIdDTO getDisScaleByDisIdDTO : getDisScaleAllInfoDTOS) {
+            getDisScaleByDisIdDTO.setDisName(questionInfoMap.get(getDisScaleByDisIdDTO.getDisId()).getName());
+            getDisScaleByDisIdDTO.setScaleName(questionInfoMap.get(getDisScaleByDisIdDTO.getScaleId()).getName());
         }
         return getDisScaleAllInfoDTOS;
     }
@@ -166,8 +168,9 @@ public class DisScaleFacade extends DisScaleServiceImpl {
      */
     public Boolean delDisScaleInfo(DelDisScaleInfoVO delDisScaleInfoVO){
         //判断关联信息是否已经被删除
+        List<String> delIds = Arrays.asList(delDisScaleInfoVO.getDelId().split(","));
         QueryWrapper<DisScale> disScaleQueryWrapper = new QueryWrapper<>();
-        disScaleQueryWrapper.eq("id",delDisScaleInfoVO.getId())
+        disScaleQueryWrapper.in("id",delIds)
                 .eq("is_deleted",IsDeleteEnum.Y.getKey());
         if(this.count(disScaleQueryWrapper) > 0){
             throw new CommonException(CommonErrorCode.IS_EXISTS,
@@ -175,7 +178,7 @@ public class DisScaleFacade extends DisScaleServiceImpl {
         }
         //如果没有则执行删除
         UpdateWrapper<DisScale> disScaleUpdateWrapper = new UpdateWrapper<>();
-        disScaleUpdateWrapper.eq("id",delDisScaleInfoVO.getId())
+        disScaleUpdateWrapper.in("id",delIds)
                 .set("is_deleted",IsDeleteEnum.Y.getKey())
                 .set("modifier",UserUtils.getCurrentPrincipleID())
                 .set("gmt_modified",DateUtil.now());

+ 37 - 3
icssman-service/src/main/java/com/diagbot/facade/ModuleInfoFacade.java

@@ -23,6 +23,7 @@ import com.diagbot.entity.ModuleInfo;
 import com.diagbot.entity.QuestionInfo;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.ModuleInfoTypeEnum;
+import com.diagbot.enums.TagTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ModuleInfoServiceImpl;
@@ -80,14 +81,34 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
      * @return
      */
     public Boolean deleteByIdsFac(String ids) {
+        //如果是子模板,删除该子模板与其他模板的关联
+        QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
+        moduleInfoQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
+                .eq("id",ids);
+        ModuleInfo moduleInfo = this.getOne(moduleInfoQueryWrapper);
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date date = DateUtil.now();
+        if(null != moduleInfo){
+            if("31".equals(moduleInfo.getType())
+                    || "32".equals(moduleInfo.getType())
+                    || "322".equals(moduleInfo.getType())){
+                UpdateWrapper<ModuleDetail> moduleDetailUpdateWrapper = new UpdateWrapper<>();
+                moduleDetailUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("relation_module", moduleInfo.getId())
+                        .set("is_deleted", IsDeleteEnum.Y.getKey())
+                        .set("modifier", userId)
+                        .set("gmt_modified",date );
+                moduleDetailFacade.update(new ModuleDetail(),moduleDetailUpdateWrapper);
+            }
+        }
         if (StringUtil.isEmpty(ids)) {
             return true;
         }
         Map paramMap = new HashMap<>();
         paramMap.put("delete", IsDeleteEnum.Y.getKey());
         paramMap.put("ids", Arrays.asList(ids.split(",")));
-        paramMap.put("gmtModified", DateUtil.now());
-        paramMap.put("modifier", UserUtils.getCurrentPrincipleID());
+        paramMap.put("gmtModified", date);
+        paramMap.put("modifier", userId);
 
         //删除模板
         this.deleteByIds(paramMap);
@@ -514,8 +535,21 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
                 errMsg.append("该标签已关联").append("【" + mouduleName + "】").append("<br/>");
             }
         }
+        StringBuffer titalMsg = new StringBuffer();
+        StringBuffer questionMsg = new StringBuffer();
+        List<QuestionInfo> info = questionFacade.getParentQuestion(getQuestiongAndModuleRelationsVO.getQuestionId());
+        for (QuestionInfo bean : info) {
+            if (bean.getTagType() != null && bean.getTagType() == TagTypeEnum.T10.getKey()) {
+                List<QuestionInfo> info2 = questionFacade.getParentQuestion(bean.getId());
+                List<String> msg = info2.stream().map(row -> "【" + row.getTagName() + "】").collect(Collectors.toList());
+                questionMsg.append(String.join("", msg));
+            } else {
+                questionMsg.append("【"+bean.getTagName()+"】");
+            }
+        }
+        titalMsg.append("该标签已关联父级:").append(questionMsg).append("<br/>").append(errMsg);
         GetQuestiongAndModuleRelationsDTO getQuestiongAndModuleRelationsDTO = new GetQuestiongAndModuleRelationsDTO();
-        getQuestiongAndModuleRelationsDTO.setRelationInfos(errMsg.append("是否删除?"));
+        getQuestiongAndModuleRelationsDTO.setRelationInfos(titalMsg.append("是否删除?"));
         return getQuestiongAndModuleRelationsDTO;
     }
 

+ 2 - 2
icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -457,7 +457,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
         String person = UserUtils.getCurrentPrincipleID();
         for (String id : idList) {
             // 查询映射关系中是否存在父级
-            List<QuestionInfo> info = this.getParentQuestion(Long.parseLong(id));
+           /* List<QuestionInfo> info = this.getParentQuestion(Long.parseLong(id));
             for (QuestionInfo bean : info) {
                 if (bean.getTagType() != null && bean.getTagType() == TagTypeEnum.T10.getKey()) {
                     List<QuestionInfo> info2 = this.getParentQuestion(bean.getId());
@@ -469,7 +469,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
             }
             if (StringUtil.isNotEmpty(errMsg.toString())) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请先删除标签的关联:" + errMsg);
-            }
+            }*/
 
             // 查询模板中是否存在
             /*List<ModuleDetail> moduleDetails = moduleDetailFacade.list(new QueryWrapper<ModuleDetail>()

+ 1 - 1
icssman-service/src/main/java/com/diagbot/vo/DelDisScaleInfoVO.java

@@ -12,5 +12,5 @@ import lombok.Setter;
 @Setter
 public class DelDisScaleInfoVO {
     //诊断关联id
-    private Long id;
+    private String delId;
 }

+ 3 - 2
icssman-service/src/main/java/com/diagbot/web/DisScaleController.java

@@ -4,6 +4,7 @@ package com.diagbot.web;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetDisScaleAllInfoDTO;
+import com.diagbot.dto.GetDisScaleByDisIdDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.DisScaleFacade;
 import com.diagbot.vo.AddDisScaleInfoVO;
@@ -64,8 +65,8 @@ public class DisScaleController {
             notes = "disId: 诊断id,必填<br>")
     @PostMapping("/getDisScaleByDisId")
     @SysLogger("getDisScaleByDisId")
-    public RespDTO<List<GetDisScaleAllInfoDTO>> getDisScaleByDisId(@Valid @RequestBody GetDisScaleByDisIdVO getDisScaleByDisIdVO) {
-        List<GetDisScaleAllInfoDTO> data = disScaleFacade.getDisScaleByDisId(getDisScaleByDisIdVO);
+    public RespDTO<List<GetDisScaleByDisIdDTO>> getDisScaleByDisId(@Valid @RequestBody GetDisScaleByDisIdVO getDisScaleByDisIdVO) {
+        List<GetDisScaleByDisIdDTO> data = disScaleFacade.getDisScaleByDisId(getDisScaleByDisIdVO);
         return RespDTO.onSuc(data);
     }
 

+ 1 - 1
icssman-service/src/main/java/com/diagbot/web/ModuleInfoController.java

@@ -163,7 +163,7 @@ public class ModuleInfoController {
             notes = "")
     @PostMapping("/getAllDeptAndDisInfo")
     @SysLogger("getAllDeptAndDisInfo")
-    public RespDTO<GetAllDeptAndDisInfoDTO> getAllDeptAndDisInfo(GetAllDeptAndDisInfoVO getAllDeptAndDisInfoVO) {
+    public RespDTO<GetAllDeptAndDisInfoDTO> getAllDeptAndDisInfo(@RequestBody GetAllDeptAndDisInfoVO getAllDeptAndDisInfoVO) {
         GetAllDeptAndDisInfoDTO date = moduleInfoFacade.getAllDeptAndDisInfo(getAllDeptAndDisInfoVO);
         return RespDTO.onSuc(date);
     }

+ 2 - 2
icssman-service/src/main/resources/mapper/DisScaleMapper.xml

@@ -22,9 +22,9 @@
         t.modifier,
         t.gmt_modified,
         t.dis_id,
-        t.scale_id,
         t.dis_name,
-        GROUP_CONCAT(t.scale_name) scale_name
+        GROUP_CONCAT(t.scale_name) scale_name,
+        GROUP_CONCAT(t.id) del_id
         FROM
         (
         SELECT