ソースを参照

质控类型维护

gaodm 5 年 前
コミット
05565f4777

+ 15 - 1
src/main/java/com/diagbot/entity/QcType.java

@@ -12,7 +12,7 @@ import java.util.Date;
  * </p>
  *
  * @author gaodm
- * @since 2020-04-13
+ * @since 2020-05-27
  */
 public class QcType implements Serializable {
 
@@ -24,6 +24,11 @@ public class QcType implements Serializable {
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
     /**
      * 质控类型名称
      */
@@ -67,6 +72,14 @@ public class QcType implements Serializable {
         this.id = id;
     }
 
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
     public String getName() {
         return name;
     }
@@ -127,6 +140,7 @@ public class QcType implements Serializable {
     public String toString() {
         return "QcType{" +
                 "id=" + id +
+                ", hospitalId=" + hospitalId +
                 ", name=" + name +
                 ", remark=" + remark +
                 ", isDeleted=" + isDeleted +

+ 1 - 1
src/main/java/com/diagbot/facade/QcTypeFacade.java

@@ -233,7 +233,7 @@ public class QcTypeFacade extends QcTypeServiceImpl {
                         .set("modifier", person)
                 );
 
-        if (!res) {
+        if (!res){
             throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
         }
         // 删除明细表

+ 1 - 0
src/main/resources/mapper/QcTypeMapper.xml

@@ -5,6 +5,7 @@
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.QcType">
         <id column="id" property="id" />
+        <result column="hospital_id" property="hospitalId" />
         <result column="name" property="name" />
         <result column="remark" property="remark" />
         <result column="is_deleted" property="isDeleted" />

+ 2 - 2
src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("gaodm");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "qc_model_hospital"}); // 需要生成的表
+        strategy.setInclude(new String[] { "qc_type"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);