浏览代码

Merge remote-tracking branch 'origin/debug' into debug

songxinlu 3 年之前
父节点
当前提交
589b797de1

+ 2 - 2
daqe-center/src/main/java/com/lantone/daqe/dto/GetColumnVerifyPageDTO.java

@@ -34,8 +34,8 @@ public class GetColumnVerifyPageDTO implements Serializable {
     @ApiModelProperty(value = "字段名称(英文)")
     private String columnEname;
 
-    @ApiModelProperty(value = "是否必填")
-    private String nonnull;
+    @ApiModelProperty(value = "是否必填,0:否,1:是")
+    private String isRequired;
 
     @ApiModelProperty(value = "标准值")
     private String standardvalue;

+ 2 - 5
daqe-center/src/main/java/com/lantone/daqe/facade/DiseaseManagementFacade.java

@@ -113,10 +113,7 @@ public class DiseaseManagementFacade {
      * @return 是否删除成功
      */
     public Boolean delDiseaseById(DelDiseaseByIdVO delDiseaseByIdVO) {
-        if (diseaseInfoFacade.getById(delDiseaseByIdVO.getId()) == null) {
-            Asserts.fail("该诊断不存在!");
-        }
-        return diseaseInfoFacade.removeById(delDiseaseByIdVO.getId());
+        return diseaseInfoFacade.removeByIds(delDiseaseByIdVO.getIds());
     }
 
     /**
@@ -175,7 +172,7 @@ public class DiseaseManagementFacade {
      * 数据校验
      *
      * @param diagnoseExcelVOS 导入数据
-     * @param errExports 导出异常
+     * @param errExports       导出异常
      * @Return java.lang.Boolean
      */
     private Boolean checkData(List<ImportDiseaseVO> diagnoseExcelVOS, List<ExportImportDiseaseErrDTO> errExports) {

+ 7 - 11
daqe-center/src/main/java/com/lantone/daqe/facade/DrugManagementFacade.java

@@ -13,7 +13,6 @@ import com.lantone.daqe.dto.ExportImportDrugErrDTO;
 import com.lantone.daqe.dto.GetDrugPageDTO;
 import com.lantone.daqe.dto.GetMatchingDrugPageDTO;
 import com.lantone.daqe.entity.DrugInfo;
-import com.lantone.daqe.entity.OperationInfo;
 import com.lantone.daqe.facade.base.DrugInfoFacade;
 import com.lantone.daqe.service.impl.DrugInfoServiceImpl;
 import com.lantone.daqe.util.ExcelUtils;
@@ -117,10 +116,7 @@ public class DrugManagementFacade {
      * @return 是否删除成功
      */
     public Boolean delDrugById(DelDrugByIdVO delDrugByIdVO) {
-        if (drugInfoFacade.getById(delDrugByIdVO.getId()) == null) {
-            Asserts.fail("该药品不存在!");
-        }
-        return drugInfoFacade.removeById(delDrugByIdVO.getId());
+        return drugInfoFacade.removeByIds(delDrugByIdVO.getIds());
     }
 
     /**
@@ -138,7 +134,7 @@ public class DrugManagementFacade {
     }
 
     /**
-     *药品匹配信息导入
+     * 药品匹配信息导入
      *
      * @param response
      * @param file
@@ -162,8 +158,8 @@ public class DrugManagementFacade {
             //导入数据转换
             temp.stream().forEach(importDrugVO -> {
                 DrugInfo drugInfo = new DrugInfo();
-                BeanUtils.copyProperties(importDrugVO,drugInfo);
-                drugInfo.setStandard(importDrugVO.getStandard()+"_"+importDrugVO.getForm());
+                BeanUtils.copyProperties(importDrugVO, drugInfo);
+                drugInfo.setStandard(importDrugVO.getStandard() + "_" + importDrugVO.getForm());
             });
             boolean out = drugInfoServiceImpl.saveBatch(insert);
             CommonResult<String> outMsg = null;
@@ -187,7 +183,7 @@ public class DrugManagementFacade {
      * 数据校验
      *
      * @param importDrugVOS 导入数据
-     * @param errExports 导出异常i
+     * @param errExports    导出异常i
      * @Return java.lang.Boolean
      */
     private Boolean checkData(List<ImportDrugVO> importDrugVOS, List<ExportImportDrugErrDTO> errExports) {
@@ -226,7 +222,7 @@ public class DrugManagementFacade {
     }
 
     /**
-     *获取药品匹配分页列表
+     * 获取药品匹配分页列表
      *
      * @param getMatchingDrugPageVO
      * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.lantone.daqe.dto.GetMatchingDrugPageDTO>
@@ -236,7 +232,7 @@ public class DrugManagementFacade {
         List<GetMatchingDrugPageDTO> getMatchingDrugPageDTOList = new ArrayList<>();
         //数据整理组装
         IPage<GetMatchingDrugPageDTO> drugPages = drugInfoServiceImpl.getBaseMapper().getMatchingDrugPage(getMatchingDrugPageVO);
-        for(GetMatchingDrugPageDTO drug:drugPages.getRecords()){
+        for (GetMatchingDrugPageDTO drug : drugPages.getRecords()) {
             //目前先按照_切割
             drug.setForm(drug.getStandard().split("_")[1]);
             getMatchingDrugPageDTOList.add(drug);

+ 1 - 4
daqe-center/src/main/java/com/lantone/daqe/facade/OperationManagementFacade.java

@@ -114,10 +114,7 @@ public class OperationManagementFacade {
      * @return 是否删除成功
      */
     public Boolean delOperationById(DelOperationByIdVO delOperationByIdVO) {
-        if (operationInfoFacade.getById(delOperationByIdVO.getId()) == null) {
-            Asserts.fail("该药品不存在!");
-        }
-        return operationInfoFacade.removeById(delOperationByIdVO.getId());
+        return operationInfoFacade.removeByIds(delOperationByIdVO.getIds());
     }
 
     /**

+ 11 - 0
daqe-center/src/main/java/com/lantone/daqe/vo/AddColumnVerifyVO.java

@@ -1,10 +1,14 @@
 package com.lantone.daqe.vo;
 
+import com.lantone.daqe.entity.ColumnInfo;
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @Description: 新增字段校验规则-接口入参
@@ -18,4 +22,11 @@ public class AddColumnVerifyVO implements Serializable {
     private static final long serialVersionUID = -7833991160014144645L;
 
 
+    @ApiModelProperty(value = "表字段信息", required = true )
+    @NotNull(message = "表信息不能为空")
+    List<ColumnInfo> columnList;
+
+    @ApiModelProperty(value = "是否必填,0:否,1:是")
+    String isRequired;
+
 }

+ 5 - 4
daqe-center/src/main/java/com/lantone/daqe/vo/DelDiseaseByIdVO.java

@@ -5,8 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.NotEmpty;
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @Description: 通过id删除诊断-接口入参
@@ -20,8 +21,8 @@ public class DelDiseaseByIdVO implements Serializable {
 
     private static final long serialVersionUID = 5262000808815034181L;
 
-    @ApiModelProperty(value = "主键", required = true)
-    @NotNull(message = "主键不能为空")
-    private Long id;
+    @ApiModelProperty(value = "主键集合", required = true)
+    @NotEmpty(message = "主键集合不能为空")
+    private List<Long> ids;
 
 }

+ 5 - 4
daqe-center/src/main/java/com/lantone/daqe/vo/DelDrugByIdVO.java

@@ -5,8 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.NotEmpty;
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @Description: 通过id删除药品-接口入参
@@ -20,8 +21,8 @@ public class DelDrugByIdVO implements Serializable {
 
     private static final long serialVersionUID = 5262000808815034181L;
 
-    @ApiModelProperty(value = "主键", required = true)
-    @NotNull(message = "主键不能为空")
-    private Long id;
+    @ApiModelProperty(value = "主键集合", required = true)
+    @NotEmpty(message = "主键集合不能为空")
+    private List<Long> ids;
 
 }

+ 5 - 4
daqe-center/src/main/java/com/lantone/daqe/vo/DelOperationByIdVO.java

@@ -5,8 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.NotEmpty;
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @Description: 通过id删除手术-接口入参
@@ -20,8 +21,8 @@ public class DelOperationByIdVO implements Serializable {
 
     private static final long serialVersionUID = 5262000808815034181L;
 
-    @ApiModelProperty(value = "主键", required = true)
-    @NotNull(message = "主键不能为空")
-    private Long id;
+    @ApiModelProperty(value = "主键集合", required = true)
+    @NotEmpty(message = "主键集合不能为空")
+    private List<Long> ids;
 
 }

+ 2 - 2
daqe-center/src/main/java/com/lantone/daqe/vo/GetColumnVerifyPageVO.java

@@ -32,8 +32,8 @@ public class GetColumnVerifyPageVO extends Page {
     @ApiModelProperty(value = "字段名称(英文)")
     private String columnEname;
 
-    @ApiModelProperty(value = "是否必填")
-    private String nonnull;
+    @ApiModelProperty(value = "是否必填,0:否,1:是")
+    private String isRequired;
 
     @ApiModelProperty(value = "标准值")
     private String standardValue;

+ 8 - 5
daqe-center/src/main/resources/mapper/ColumnVerifyMapper.xml

@@ -3,13 +3,14 @@
 <mapper namespace="com.lantone.daqe.mapper.ColumnVerifyMapper">
 
     <select id="getColumnVerifyPage" resultType="com.lantone.daqe.dto.GetColumnVerifyPageDTO">
+        SELECT * from(
         SELECT
         a.column_id,
         a.table_cname,
         a.table_ename,
         a.column_cname,
         a.column_ename,
-        GROUP_CONCAT(a.nonnull SEPARATOR ';') nonnull,
+        GROUP_CONCAT(a.isRequired SEPARATOR ';') isRequired,
         GROUP_CONCAT(a.standardvalue SEPARATOR ';') standardvalue,
         GROUP_CONCAT(a.regular SEPARATOR ';') regular,
         a.description
@@ -23,7 +24,7 @@
         dcv.column_ename,
         dcv.type,
         dcv.description,
-        CASE dcv.type WHEN 1 THEN dcv.verify_val ELSE NULL END nonnull,
+        CASE dcv.type WHEN 1 THEN dcv.verify_val ELSE NULL END isRequired,
         CASE dcv.type WHEN 2 THEN dcv.verify_val ELSE NULL END standardvalue,
         CASE dcv.type WHEN 3 THEN dcv.verify_val ELSE NULL END regular
         FROM
@@ -43,9 +44,13 @@
             AND dcv.column_ename= #{getColumnVerifyPageVO.columnEname}
         </if>
         ) a
+
+        GROUP BY
+        a.column_id
+        )a
         where
         1=1
-        <if test="getColumnVerifyPageVO.nonnull != null and getColumnVerifyPageVO.nonnull != ''">
+        <if test="getColumnVerifyPageVO.isRequired != null and getColumnVerifyPageVO.isRequired != ''">
             AND a.column_ename = #{getColumnVerifyPageVO.columnEname}
         </if>
         <if test="getColumnVerifyPageVO.regularName != null and getColumnVerifyPageVO.regularName != ''">
@@ -54,8 +59,6 @@
         <if test="getColumnVerifyPageVO.standardValue != null and getColumnVerifyPageVO.standardValue != ''">
             AND a.standardvalue LIKE CONCAT('%',#{getColumnVerifyPageVO.regularName},'%')
         </if>
-        GROUP BY
-        a.column_id
     </select>
 
 </mapper>