From 3ffada811331d0f6b0133888f3d2cb69d850334b Mon Sep 17 00:00:00 2001 From: qiuyt Date: Thu, 13 Mar 2025 12:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BC=98=E5=8C=96sql?= =?UTF-8?q?=E8=B7=91=E4=B8=8D=E8=B5=B7=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E5=8A=A0=E4=B8=8A=E6=97=A0=E7=A0=81=E8=A1=A8=20=E5=92=8C?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/dao/basic/YbNotCodeMapper.java | 9 ++++++ .../com/glxp/api/entity/basic/YbNotCode.java | 32 +++++++++++++++++++ .../api/service/basic/YbNotCodeService.java | 8 +++++ .../basic/impl/YbNotCodeServiceImpl.java | 12 +++++++ .../mybatis/mapper/basic/YbNotCodeMapper.xml | 15 +++++++++ .../mybatis/mapper/purchase/SupProductDao.xml | 16 ++++++---- src/main/resources/schemas/schema_v2.4.sql | 23 +++++++++++++ 7 files changed, 109 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java create mode 100644 src/main/java/com/glxp/api/entity/basic/YbNotCode.java create mode 100644 src/main/java/com/glxp/api/service/basic/YbNotCodeService.java create mode 100644 src/main/java/com/glxp/api/service/basic/impl/YbNotCodeServiceImpl.java create mode 100644 src/main/resources/mybatis/mapper/basic/YbNotCodeMapper.xml diff --git a/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java b/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java new file mode 100644 index 00000000..1c126843 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.YbNotCode; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface YbNotCodeMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/basic/YbNotCode.java b/src/main/java/com/glxp/api/entity/basic/YbNotCode.java new file mode 100644 index 00000000..46141473 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/YbNotCode.java @@ -0,0 +1,32 @@ +package com.glxp.api.entity.basic; + +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; + +/** + * 医保无码信息表 + */ +@Data +@TableName(value = "yb_not_code") +public class YbNotCode { + /** + * 国家医保目录编码 + */ + @TableId(value = "ybbm", type = IdType.INPUT) + private String ybbm; + + /** + * 机构编码 + */ + @TableField(value = "organizationCode") + private String organizationcode; + + /** + * 无码类型 1、部分早期未赋予追溯码 5、最小包装无追溯码 6、无追溯码 7、其他原因 0、默认不是无码类型 + */ + @TableField(value = "notCodeType") + private Integer notcodetype; +} diff --git a/src/main/java/com/glxp/api/service/basic/YbNotCodeService.java b/src/main/java/com/glxp/api/service/basic/YbNotCodeService.java new file mode 100644 index 00000000..561e5333 --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/YbNotCodeService.java @@ -0,0 +1,8 @@ +package com.glxp.api.service.basic; + +import com.glxp.api.entity.basic.YbNotCode; +import com.baomidou.mybatisplus.extension.service.IService; +public interface YbNotCodeService extends IService{ + + +} diff --git a/src/main/java/com/glxp/api/service/basic/impl/YbNotCodeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/YbNotCodeServiceImpl.java new file mode 100644 index 00000000..a2c1c22b --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/impl/YbNotCodeServiceImpl.java @@ -0,0 +1,12 @@ +package com.glxp.api.service.basic.impl; + +import com.glxp.api.service.basic.YbNotCodeService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.basic.YbNotCode; +import com.glxp.api.dao.basic.YbNotCodeMapper; + +@Service +public class YbNotCodeServiceImpl extends ServiceImpl implements YbNotCodeService { + +} diff --git a/src/main/resources/mybatis/mapper/basic/YbNotCodeMapper.xml b/src/main/resources/mybatis/mapper/basic/YbNotCodeMapper.xml new file mode 100644 index 00000000..890f5984 --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/YbNotCodeMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + ybbm, organizationCode, notCodeType + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml b/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml index 5b426df1..44b9973e 100644 --- a/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml +++ b/src/main/resources/mybatis/mapper/purchase/SupProductDao.xml @@ -262,12 +262,16 @@ resultType="java.lang.Integer"> SELECT count(*) FROM sup_product - inner join sup_companyon sup_product.customerId = sup_company.customerId - INNER JOIN sup_manufactureron sup_manufacturer.manufacturerId =sup_product.manufacturerIdFk - WHERE sup_manufacturer.companyName = (SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk} limit 1) - and recordCode = #{recordCode} - and recordProductName = #{recordProductName} - and sup_product.customerId = #{customerId} + inner join sup_company + on sup_product.customerId = sup_company.customerId + INNER JOIN sup_manufacturer + on sup_manufacturer.manufacturerId = + sup_product.manufacturerIdFk + WHERE sup_manufacturer.companyName = + (SELECT companyName FROM sup_manufacturer WHERE manufacturerId = #{manufacturerIdFk}) + and recordCode = #{recordCode} + and recordProductName = #{recordProductName} + and sup_product.customerId = #{customerId} DELETE diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 0ec8db02..ba6d8b5d 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -1318,3 +1318,26 @@ CALL Modify_index('rel_code_detail', 'curCode', 'rel_code_detail_parentCode', 'B CALL Modify_index('rel_code_batch', 'productCode', 'rel_code_batch_productCode', 'BTREE'); CALL Modify_index('rel_code_batch', 'curCode', 'rel_code_batch_curCode', 'BTREE'); CALL Modify_index('rel_code_batch', 'packageSpec', 'rel_code_batch_packageSpec', 'BTREE'); + + +CALL Pro_Temp_ColumnWork('basic_udirel', 'notCodeType', + ' tinyint NULL DEFAULT b''0''COMMENT ''无码类型''', + 1); +CALL Pro_Temp_ColumnWork('basic_udirel', 'drugSellingPrice', + ' decimal(10, 2) DEFAULT NULL COMMENT ''药品售价''', + 1); + +CALL Pro_Temp_ColumnWork('basic_udirel', 'drugSellingPriceTime', + ' datetime DEFAULT NULL COMMENT ''药品售价''', + 1); +CALL Pro_Temp_ColumnWork('basic_udirel', 'hangingNetType', + ' tinyint DEFAULT NULL COMMENT ''是否挂网''', + 1); + + +CREATE TABLE IF NOT EXISTS `yb_not_code` ( + `ybbm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '国家医保目录编码', + `organizationCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机构编码', + `notCodeType` tinyint DEFAULT NULL COMMENT '无码类型 1、部分早期未赋予追溯码 5、最小包装无追溯码 6、无追溯码 7、其他原因 0、默认不是无码类型', + PRIMARY KEY (`ybbm`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='医保无码信息表';