feat: 阿里药品加批准文号

v3
chenhc 5 months ago
parent 4c06fcb809
commit a06e48f759

@ -37,7 +37,8 @@ public class CodeRelController {
return ResultVOUtils.error(ResultEnum.DATA_ERROR,"参数错误");
}
List<CodeRel> list = codeRelService.list(new LambdaQueryWrapper<CodeRel>()
.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);
}

@ -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;
}

@ -88,6 +88,9 @@
<if test="fromType != null">
fromType,
</if>
<if test="approvalNum != null">
approvalNum,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="diNameCode != null">
@ -126,6 +129,9 @@
<if test="fromType != null">
#{fromType,jdbcType=TINYINT},
</if>
<if test="approvalNum != null">
#{approvalNum,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.udidl.admin.entity.chs.CodeRel">
@ -225,6 +231,9 @@
<if test="fromType != null">
fromType = #{fromType,jdbcType=TINYINT},
</if>
<if test="approvalNum != null">
approvalNum = #{approvalNum,jdbcType=TINYINT},
</if>
</set>
<where>
<if test="diNameCode != null">

@ -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;
) 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;
Loading…
Cancel
Save