From a06e48f75961e9353a11444f12e36b08456e65c2 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Tue, 12 Nov 2024 15:56:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=98=BF=E9=87=8C=E8=8D=AF=E5=93=81?= =?UTF-8?q?=E5=8A=A0=E6=89=B9=E5=87=86=E6=96=87=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/udchs/CodeRelController.java | 3 ++- .../glxp/udidl/admin/entity/chs/CodeRel.java | 7 +++++++ .../mybatis/mapper/udchs/CodeRelMapper.xml | 9 ++++++++ src/main/resources/schemas/schema_v2.1.sql | 21 ++++++++++++++++++- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/udidl/admin/controller/udchs/CodeRelController.java b/src/main/java/com/glxp/udidl/admin/controller/udchs/CodeRelController.java index 07b2a65..04e5b66 100644 --- a/src/main/java/com/glxp/udidl/admin/controller/udchs/CodeRelController.java +++ b/src/main/java/com/glxp/udidl/admin/controller/udchs/CodeRelController.java @@ -37,7 +37,8 @@ public class CodeRelController { return ResultVOUtils.error(ResultEnum.DATA_ERROR,"参数错误"); } List list = codeRelService.list(new LambdaQueryWrapper() - .eq(CodeRel::getDiNameCode,param.getDiNameCode()).or().eq(CodeRel::getDrugCode,param.getDrugCode())); + .eq(CodeRel::getDiNameCode,param.getDiNameCode()).or().eq(CodeRel::getDrugCode,param.getDrugCode()) + .or(StrUtil.isNotBlank(param.getApprovalNum())).eq(StrUtil.isNotBlank(param.getApprovalNum()),CodeRel::getApprovalNum,param.getApprovalNum())); return ResultVOUtils.success(list); } diff --git a/src/main/java/com/glxp/udidl/admin/entity/chs/CodeRel.java b/src/main/java/com/glxp/udidl/admin/entity/chs/CodeRel.java index 60a6953..7898825 100644 --- a/src/main/java/com/glxp/udidl/admin/entity/chs/CodeRel.java +++ b/src/main/java/com/glxp/udidl/admin/entity/chs/CodeRel.java @@ -4,6 +4,7 @@ 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 io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; @@ -77,4 +78,10 @@ public class CodeRel { public Integer fromType; + /** + * 批准文号 + */ + @TableField(value = "approvalNum") + @ApiModelProperty(value="批准文号") + private String approvalNum; } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/udchs/CodeRelMapper.xml b/src/main/resources/mybatis/mapper/udchs/CodeRelMapper.xml index 9e4ec63..797b8e5 100644 --- a/src/main/resources/mybatis/mapper/udchs/CodeRelMapper.xml +++ b/src/main/resources/mybatis/mapper/udchs/CodeRelMapper.xml @@ -88,6 +88,9 @@ fromType, + + approvalNum, + @@ -126,6 +129,9 @@ #{fromType,jdbcType=TINYINT}, + + #{approvalNum,jdbcType=VARCHAR}, + @@ -225,6 +231,9 @@ fromType = #{fromType,jdbcType=TINYINT}, + + approvalNum = #{approvalNum,jdbcType=TINYINT}, + diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 70411d7..fc3ebed 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -246,4 +246,23 @@ CREATE TABLE IF NOT EXISTS `rel_code_detail` ( `flag` tinyint DEFAULT NULL COMMENT '状态', `batchIdFk` int DEFAULT NULL COMMENT '产品批次ID外键', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=708 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=708 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +CREATE TABLE IF NOT EXISTS `code_rel` ( + `id` int NOT NULL AUTO_INCREMENT, + `diNameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '器械最小销售产品标识', + `drugCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '阿里药品标识码', + `ybbm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '医保编码', + `ycCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '阳光采购平台编码', + `sptm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '商品条码', + `ypbwm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '药品本位码', + `tyshxyh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '统一社会信用号', + `gjbm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '国家编码9码', + `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `updateTime` datetime DEFAULT NULL, + `createTime` datetime DEFAULT NULL, + `fromType` tinyint DEFAULT NULL, + `approvalNum` varchar(255) DEFAULT NULL COMMENT '批准文号', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `unique_idx_diNameCode_ybbm` (`diNameCode`,`ybbm`) +) ENGINE=InnoDB AUTO_INCREMENT=110586 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; \ No newline at end of file