Просмотр исходного кода

Merge branch 'dev/icss' into debug

zhoutg 6 лет назад
Родитель
Сommit
b738ea60a9

+ 2 - 0
icss-service/src/main/java/com/diagbot/dto/QuestionDTO.java

@@ -36,6 +36,8 @@ public class QuestionDTO {
     private Integer exclusionType; //互斥类型
     private String judgeType; //判断类型(0:本身异常;1:本身正常;2:数字范围;3:计算公式;9:无需判断)
     private String copyType;//是否复制
+    private Integer showInfo; //是否显示i
+    private String joint;     //标签后的连接符
     private List<QuestionDetail> questionDetailList = new ArrayList<>(); //标签明细表
     private List<QuestionDTO> questionMapping = new ArrayList<>();     //下级标签
     private String remark;//备注

+ 10 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionInfo.java

@@ -116,6 +116,16 @@ public class QuestionInfo implements Serializable {
      */
     private Integer showAdd;
 
+    /**
+     * 是否显示 i
+     */
+    private Integer showInfo;
+
+    /**
+     * 标签后的连接符
+     */
+    private String joint;
+
     /**
      * 备注
      */

+ 3 - 0
icss-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -21,6 +21,9 @@
         <result column="max_value" property="maxValue" />
         <result column="judge_type" property="judgeType" />
         <result column="copy_type" property="copyType" />
+        <result column="show_add" property="showAdd" />
+        <result column="show_info" property="showInfo" />
+        <result column="joint" property="joint" />
         <result column="remark" property="remark" />
     </resultMap>
 

+ 10 - 0
icssman-service/src/main/java/com/diagbot/entity/QuestionInfo.java

@@ -145,6 +145,16 @@ public class QuestionInfo implements Serializable {
      */
     private Integer showAdd;
 
+    /**
+     * 是否显示 i
+     */
+    private Integer showInfo;
+
+    /**
+     * 标签后的连接符
+     */
+    private String joint;
+
     /**
      * 备注
      */

+ 24 - 3
icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -1,14 +1,19 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.entity.DeptInfo;
 import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.DeptInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.AddDeptInfoVO;
+import com.diagbot.vo.GetDeptInfoDetialsVO;
 import com.diagbot.vo.GetDeptInfoVO;
 import com.diagbot.vo.UpdateDeptInfoVO;
 import org.springframework.stereotype.Component;
@@ -30,14 +35,20 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
      * @return
      */
     public Boolean addDeptInfo(AddDeptInfoVO addDeptInfoVO) {
-        DeptInfo deptInfo =new DeptInfo();
+        QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
+        queryWrapper.eq("name",addDeptInfoVO.getName());
+        List<DeptInfo> deptInfoList = this.list(queryWrapper);
+        if(ListUtil.isNotEmpty(deptInfoList)){
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "添加失败,科室已存在");
+        }
+        DeptInfo deptInfo = new DeptInfo();
         BeanUtil.copyProperties(addDeptInfoVO,deptInfo);
         Date now = DateUtil.now();
         String userId = UserUtils.getCurrentPrincipleID();
         deptInfo.setCreator(userId);
         deptInfo.setGmtCreate(now);
         deptInfo.setModifier(userId);
-        deptInfo.setGmtModified(now);
         this.save(deptInfo);
         return true;
     }
@@ -48,7 +59,7 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
      * @return
      */
     public Boolean updateDeptInfo(UpdateDeptInfoVO updateDeptInfoVO) {
-        DeptInfo deptInfo =new DeptInfo();
+        DeptInfo deptInfo =this.getById(updateDeptInfoVO.getId());
         BeanUtil.copyProperties(updateDeptInfoVO,deptInfo);
         deptInfo.setModifier(UserUtils.getCurrentPrincipleID());
         deptInfo.setGmtModified(DateUtil.now());
@@ -90,4 +101,14 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
         List<DeptInfoDTO> deptInfoList = this.getDeptName();
         return deptInfoList;
     }
+
+    /**
+     * 科室维护详情
+     * @param getDeptInfoDetialsVO
+     * @return
+     */
+    public DeptInfo getDeptInfoDetials(GetDeptInfoDetialsVO getDeptInfoDetialsVO){
+        DeptInfo deptInfo = this.getById(getDeptInfoDetialsVO.getId());
+        return deptInfo;
+    }
 }

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

@@ -193,7 +193,7 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
      * @return
      */
     public IPage<DeptVitalDTO> getDeptVitalPage(DeptVitalPageVO deptVitalPageVO) {
-        QueryWrapper<DeptVital> deptVitalQueryWrapper = new QueryWrapper<>();
+        /*QueryWrapper<DeptVital> deptVitalQueryWrapper = new QueryWrapper<>();
         deptVitalQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
                 select("dept_id", "gmt_create", "creator", "gmt_modified", "modifier").
                 groupBy("dept_id", "gmt_create", "creator", "gmt_modified", "modifier");
@@ -233,7 +233,8 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
             }
         }
         page.setRecords(deptVitalDTOListRet);
-        return page;
+        return page;*/
+        return null;
     }
 
     /**

+ 6 - 0
icssman-service/src/main/java/com/diagbot/vo/AddDeptInfoVO.java

@@ -15,4 +15,10 @@ import javax.validation.constraints.NotNull;
 public class AddDeptInfoVO {
     @NotNull(message = "请输入科室名称")
     private String name;
+
+    /**
+     * 备注,介绍说明
+     */
+    private String remark;
+
 }

+ 18 - 0
icssman-service/src/main/java/com/diagbot/vo/GetDeptInfoDetialsVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2018/12/14 9:57
+ */
+@Getter
+@Setter
+public class GetDeptInfoDetialsVO {
+    @NotNull(message = "请输入科室id")
+    private String id;
+}

+ 8 - 2
icssman-service/src/main/java/com/diagbot/vo/UpdateDeptInfoVO.java

@@ -14,7 +14,13 @@ import javax.validation.constraints.NotBlank;
 @Setter
 public class UpdateDeptInfoVO {
     @NotBlank(message = "请输入id")
-    private Long id;
-    @NotBlank(message = "请输入科室名称")
+    private String id;
+    /**
+     * 科室名称
+     */
     private String name;
+    /**
+     * 备注,介绍说明
+     */
+    private String remark;
 }

+ 16 - 5
icssman-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -7,6 +7,7 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.DeptInfo;
 import com.diagbot.facade.DeptInfoFacade;
 import com.diagbot.vo.AddDeptInfoVO;
+import com.diagbot.vo.GetDeptInfoDetialsVO;
 import com.diagbot.vo.GetDeptInfoVO;
 import com.diagbot.vo.UpdateDeptInfoVO;
 import io.swagger.annotations.Api;
@@ -18,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.validation.Valid;
+
 /**
  * <p>
  * 科室信息表 前端控制器
@@ -40,7 +43,7 @@ public class DeptInfoController {
     @PostMapping("/addDeptInfo")
     @SysLogger("addDeptInfo")
     @Transactional
-    public RespDTO<Boolean> addDeptInfo(@RequestBody AddDeptInfoVO addDeptInfoVO) {
+    public RespDTO<Boolean> addDeptInfo(@Valid @RequestBody AddDeptInfoVO addDeptInfoVO) {
         Boolean data = deptInfoFacade.addDeptInfo(addDeptInfoVO);
         return RespDTO.onSuc(data);
     }
@@ -51,7 +54,7 @@ public class DeptInfoController {
     @PostMapping("/updateDeptInfo")
     @SysLogger("updateDeptInfo")
     @Transactional
-    public RespDTO<Boolean> updateDeptInfo(@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
+    public RespDTO<Boolean> updateDeptInfo(@Valid @RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
         Boolean data = deptInfoFacade.updateDeptInfo(updateDeptInfoVO);
         return RespDTO.onSuc(data);
     }
@@ -61,7 +64,7 @@ public class DeptInfoController {
     @PostMapping("/deleteDeptInfo")
     @SysLogger("deleteDeptInfo")
     @Transactional
-    public RespDTO<Boolean> deleteDeptInfo(@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
+    public RespDTO<Boolean> deleteDeptInfo(@Valid@RequestBody UpdateDeptInfoVO updateDeptInfoVO) {
         Boolean data = deptInfoFacade.deleteDeptInfo(updateDeptInfoVO);
         return RespDTO.onSuc(data);
     }
@@ -70,9 +73,17 @@ public class DeptInfoController {
             notes = "name: 科室名称 <br>")
     @PostMapping("/getDeptInfo")
     @SysLogger("getDeptInfo")
-    @Transactional
-    public RespDTO<IPage<DeptInfo>> getDeptInfo(@RequestBody GetDeptInfoVO getDeptInfoVO) {
+    public RespDTO<IPage<DeptInfo>> getDeptInfo(@Valid @RequestBody GetDeptInfoVO getDeptInfoVO) {
         IPage<DeptInfo> data = deptInfoFacade.getDeptInfo(getDeptInfoVO);
         return RespDTO.onSuc(data);
     }
+
+    @ApiOperation(value = "科室维护——详情[by:wangyu]",
+            notes = "deptId: 科室id <br>")
+    @PostMapping("/getDeptInfoDetials")
+    @SysLogger("getDeptInfoDetials")
+    public RespDTO<DeptInfo> getDeptInfoDetials(@Valid @RequestBody GetDeptInfoDetialsVO getDeptInfoDetialsVO) {
+        DeptInfo data = deptInfoFacade.getDeptInfoDetials(getDeptInfoDetialsVO);
+        return RespDTO.onSuc(data);
+    }
 }

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

@@ -27,6 +27,8 @@
         <result column="text_generate" property="textGenerate" />
         <result column="copy_type" property="copyType" />
         <result column="show_add" property="showAdd" />
+        <result column="show_info" property="showInfo" />
+        <result column="joint" property="joint" />
         <result column="remark" property="remark" />
     </resultMap>