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

代码调整;修改药品新增bug;新增病区医疗组关联表

songxinlu 3 лет назад
Родитель
Сommit
fda22c7e26

+ 3 - 1
daqe-center/src/main/java/com/lantone/daqe/dto/UpBlockLossByIdVO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 
 /**
@@ -19,7 +20,8 @@ public class UpBlockLossByIdVO implements Serializable {
 
     private static final long serialVersionUID = 2135752709548682595L;
 
-    @ApiModelProperty(value = "编号")
+    @ApiModelProperty(value = "编号", required = true)
+    @NotNull(message = "编号不能为空")
     private Long id;
 
     @ApiModelProperty(value = "丢失原因")

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

@@ -87,7 +87,7 @@ public class BlockLossManagementFacade {
     public Boolean upBlockLossById(UpBlockLossByIdVO upBlockLossByIdVO) {
         BlocklossResult blocklossResult = new BlocklossResult();
         BeanUtils.copyProperties(upBlockLossByIdVO, blocklossResult);
-        blocklossResult.setModifier(SysUserUtils.getCurrentPrinciple());
+        blocklossResult.setModifier(SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple());
         blocklossResult.setGmtModified(DateUtil.now());
         return blocklossResultFacade.updateById(blocklossResult);
     }

+ 8 - 8
daqe-center/src/main/java/com/lantone/daqe/facade/RegularManagementFacade.java

@@ -47,7 +47,7 @@ public class RegularManagementFacade {
      * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.lantone.daqe.dto.GetRegularPageDTO>
      */
     public IPage<GetRegularPageDTO> getRegularPage(GetRegularPageVO getRegularPageVO) {
-        return  regularInfoFacade.getBaseMapper().getRegularPage(getRegularPageVO);
+        return regularInfoFacade.getBaseMapper().getRegularPage(getRegularPageVO);
     }
 
     /**
@@ -62,7 +62,7 @@ public class RegularManagementFacade {
         if (regularInfoFacade.isExist(regularInfo)) {
             Asserts.fail("该正则式已存在!");
         }
-        regularInfo.setCreator(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setCreator(SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple());
         regularInfo.setGmtCreate(DateUtil.now());
         return regularInfoFacade.save(regularInfo);
     }
@@ -80,7 +80,7 @@ public class RegularManagementFacade {
         //修改正则式
         RegularInfo regularInfo = new RegularInfo();
         BeanUtil.copyProperties(upRegularByIdVO, regularInfo);
-        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple());
         regularInfo.setGmtModified(DateUtil.now());
         //修改表字段的正则式校验结果表中的正则式
         if (regularInfoFacade.updateById(regularInfo)) {
@@ -90,7 +90,7 @@ public class RegularManagementFacade {
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .set("regular_name", upRegularByIdVO.getName())
                     .set("regular_val", upRegularByIdVO.getVal())
-                    .set("modifier", SysUserUtils.getCurrentPrinciple())
+                    .set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
                     .set("gmt_modified", DateUtil.now())
                     .set("regular_des", upRegularByIdVO.getDescription()));
         }
@@ -112,7 +112,7 @@ public class RegularManagementFacade {
     }
 
     /**
-     *通过id删除正则式
+     * 通过id删除正则式
      *
      * @param id
      * @param hospitalId
@@ -125,7 +125,7 @@ public class RegularManagementFacade {
         }
         RegularInfo regularInfo = new RegularInfo();
         regularInfo.setId(id);
-        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple());
         regularInfo.setGmtModified(DateUtil.now());
         regularInfo.setIsDeleted(IsDeleteEnum.Y.getKey());
         if (regularInfoFacade.updateById(regularInfo)) {
@@ -133,7 +133,7 @@ public class RegularManagementFacade {
             if (regularMappingFacade.update(new UpdateWrapper<RegularMapping>()
                     .eq("regular_id", id)
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .set("modifier", SysUserUtils.getCurrentPrinciple())
+                    .set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
                     .set("gmt_modified", DateUtil.now())
                     .set("is_deleted", IsDeleteEnum.Y.getKey()))) {
                 //删除表字段的正则式校验结果表中的正则式
@@ -141,7 +141,7 @@ public class RegularManagementFacade {
                         .eq(hospitalId != null, "hospital_id", hospitalId)
                         .eq("regular_id", id)
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .set("modifier", SysUserUtils.getCurrentPrinciple())
+                        .set("modifier", SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple())
                         .set("gmt_modified", DateUtil.now())
                         .set("is_deleted", IsDeleteEnum.Y.getKey()));
             }

+ 1 - 1
daqe-center/src/main/java/com/lantone/daqe/facade/base/DrugInfoFacade.java

@@ -25,7 +25,7 @@ public class DrugInfoFacade extends DrugInfoServiceImpl {
      * @return true-存在冲突,false-无冲突
      */
     public boolean isExist(DrugInfo drugInfo) {
-        if (drugInfo.getHospitalId() == null
+        if (drugInfo.getHospitalId() != null
                 || StringUtil.isBlank(drugInfo.getCode())
                 || StringUtil.isBlank(drugInfo.getName())) {
             Asserts.fail("判断即将新增/修改的药品是否与已存在的其他药品存在冲突时,hospitalId、code、name不能为空!");

+ 3 - 1
daqe-center/src/main/java/com/lantone/daqe/facade/base/RegularInfoFacade.java

@@ -14,7 +14,9 @@ import org.springframework.stereotype.Component;
 public class RegularInfoFacade extends RegularInfoServiceImpl {
     public boolean isExist(RegularInfo regularInfo) {
         boolean flag = false;
-        RegularInfo regular = this.getOne(new QueryWrapper<RegularInfo>().eq("name", regularInfo.getName()));
+        RegularInfo regular = this.getOne(new QueryWrapper<RegularInfo>()
+                .eq("val", regularInfo.getVal())
+                .eq("name", regularInfo.getName()));
         if (regular != null) {
             flag = true;
         }

+ 1 - 1
daqe-center/src/main/java/com/lantone/daqe/vo/GetMatchingOperationVO.java

@@ -26,7 +26,7 @@ public class GetMatchingOperationVO extends Page implements Serializable {
     @ApiModelProperty(value = "医院手术/操作名称ID")
     private Long id;
 
-    @ApiModelProperty(name = "医院手术/操作名称")
+    @ApiModelProperty(value = "医院手术/操作名称")
     private String name;
 
 

+ 2 - 1
dblayer-mbg/src/test/java/com/lantone/dblayermbg/CodeAutoGenerator.java

@@ -71,7 +71,8 @@ public class CodeAutoGenerator {
                 "sys_user_role",
                 "sys_dept_user",
                 "sys_notice",
-                "sys_notice_user"
+                "sys_notice_user",
+                "sys_region_medoup"
         };
         //生成的实体类忽略表前缀: 不需要则置空
         String[] ENTITY_IGNORE_PREFIX = { "sys_" };

+ 77 - 0
security-center/src/main/java/com/lantone/security/entity/RegionMedoup.java

@@ -0,0 +1,77 @@
+package com.lantone.security.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病区与医疗组关联表 实体类
+ * </p>
+ */
+@Data
+@TableName("sys_region_medoup")
+public class RegionMedoup implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 病区ID
+     */
+    @TableField("region_id")
+    private Long regionId;
+
+    /**
+     * 医疗组ID
+     */
+    @TableField("medoup_id")
+    private Long medoupId;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    @TableField("is_deleted")
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    @TableField("gmt_modified")
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    @TableField("creator")
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    @TableField("modifier")
+    private String modifier;
+
+    /**
+     * 备注
+     */
+    @TableField("remark")
+    private String remark;
+
+}

+ 14 - 0
security-center/src/main/java/com/lantone/security/facade/base/RegionMedoupFacade.java

@@ -0,0 +1,14 @@
+package com.lantone.security.facade.base;
+
+import com.lantone.security.service.impl.RegionMedoupServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * <p>
+ * 表名:sys_region_medoup 业务类
+ * </p>
+ */
+@Component
+public class RegionMedoupFacade extends RegionMedoupServiceImpl {
+
+}

+ 13 - 0
security-center/src/main/java/com/lantone/security/mapper/RegionMedoupMapper.java

@@ -0,0 +1,13 @@
+package com.lantone.security.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.lantone.security.entity.RegionMedoup;
+
+/**
+ * <p>
+ * 表名:sys_region_medoup Mapper接口
+ * </p>
+ */
+public interface RegionMedoupMapper extends BaseMapper<RegionMedoup> {
+
+}

+ 13 - 0
security-center/src/main/java/com/lantone/security/service/RegionMedoupService.java

@@ -0,0 +1,13 @@
+package com.lantone.security.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.lantone.security.entity.RegionMedoup;
+
+/**
+ * <p>
+ * 病区与医疗组关联表 Service类
+ * </p>
+ */
+public interface RegionMedoupService extends IService<RegionMedoup> {
+
+}

+ 17 - 0
security-center/src/main/java/com/lantone/security/service/impl/RegionMedoupServiceImpl.java

@@ -0,0 +1,17 @@
+package com.lantone.security.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.lantone.security.entity.RegionMedoup;
+import com.lantone.security.mapper.RegionMedoupMapper;
+import com.lantone.security.service.RegionMedoupService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病区与医疗组关联表 Service实现类
+ * </p>
+ */
+@Service
+public class RegionMedoupServiceImpl extends ServiceImpl<RegionMedoupMapper, RegionMedoup> implements RegionMedoupService {
+
+}

+ 5 - 0
security-center/src/main/resources/mapper/RegionMedoupMapper.xml

@@ -0,0 +1,5 @@
+<?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.lantone.security.mapper.RegionMedoupMapper">
+
+</mapper>

+ 18 - 0
security-center/src/main/resources/mapper/base/BaseRegionMedoupMapper.xml

@@ -0,0 +1,18 @@
+<?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.lantone.security.mapper.RegionMedoupMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.lantone.security.entity.RegionMedoup">
+        <id column="id" property="id"/>
+        <result column="region_id" property="regionId"/>
+        <result column="medoup_id" property="medoupId"/>
+        <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="remark" property="remark"/>
+    </resultMap>
+
+</mapper>