feat: 医保编码增加catalogCode相关字段

dev_test1.0
chenhc 1 year ago
parent b9d5f590cf
commit ad5a1458b1

@ -362,6 +362,7 @@ public class UdiRelevanceController extends BaseController {
udiProductEntity.setBasicPrductRemak7(udiRelevanceSaveRequest.getBasicPrductRemak7());
udiProductEntity.setBasicPrductRemak8(udiRelevanceSaveRequest.getBasicPrductRemak8());
udiProductEntity.setCatalogcode(udiRelevanceSaveRequest.getCatalogcode());
udiProductEntity.setCatalogname1(udiRelevanceSaveRequest.getCatalogname1());
udiProductEntity.setCatalogname2(udiRelevanceSaveRequest.getCatalogname2());
udiProductEntity.setCatalogname3(udiRelevanceSaveRequest.getCatalogname3());

@ -373,6 +373,27 @@ public class BasicProductsEntity {
@ApiModelProperty(value="三级分类名称(部位、功能、品种)")
private String catalogname3;
/**
* (
*/
@TableField(value = "catalogcode1")
@ApiModelProperty(value="一级分类名称(学科,品名)")
private Integer catalogcode1;
/**
* (
*/
@TableField(value = "catalogcode2")
@ApiModelProperty(value="二级分类名称(用途、品目)")
private Integer catalogcode2;
/**
* (
*/
@TableField(value = "catalogcode3")
@ApiModelProperty(value="三级分类名称(部位、功能、品种)")
private Integer catalogcode3;
/**
*
*/

@ -136,4 +136,26 @@ public class UdiProductEntity {
private String matrial;
private String remark;
private String catalogcode;
/**
* (
*/
@TableField(value = "catalogCode1")
@ApiModelProperty(value="一级分类名称(学科,品名)")
private Integer catalogCode1;
/**
* (
*/
@TableField(value = "catalogCode2")
@ApiModelProperty(value="二级分类名称(用途、品目)")
private Integer catalogCode2;
/**
* (
*/
@TableField(value = "catalogCode3")
@ApiModelProperty(value="三级分类名称(部位、功能、品种)")
private Integer catalogCode3;
}

@ -362,4 +362,24 @@ public class ThrProductsAddDiEntity {
private String matrial;
/**
* (
*/
@TableField(value = "catalogCode1")
@ApiModelProperty(value = "一级分类名称(学科,品名)")
private Integer catalogCode1;
/**
* (
*/
@TableField(value = "catalogCode2")
@ApiModelProperty(value = "二级分类名称(用途、品目)")
private Integer catalogCode2;
/**
* (
*/
@TableField(value = "catalogCode3")
@ApiModelProperty(value = "三级分类名称(部位、功能、品种)")
private Integer catalogCode3;
}

@ -62,4 +62,6 @@ public class SupplementRequest {
@TableField(value = "matrial")
@ApiModelProperty(value="耗材材质")
private String matrial;
private String catalogcode;
}

@ -120,6 +120,8 @@ public class UdiInfoRequest {
@ApiModelProperty(value="耗材材质")
private String matrial;
private String catalogcode;
public void setCheck(Boolean check) {
isCheck = check;
}

@ -142,4 +142,6 @@ public class UdiRelevanceSaveRequest {
@TableField(value = "matrial")
@ApiModelProperty(value="耗材材质")
private String matrial;
private String catalogcode;
}

@ -92,5 +92,6 @@ public class AddThrDiProductsRequest {
@ApiModelProperty(value="耗材材质")
private String matrial;
private String catalogcode;
}

@ -115,6 +115,18 @@ public class UdiProductServiceImpl implements UdiProductService {
if (udiProductEntity.getId() == null) {
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
}
//医保编码解析
String catalogcode = udiProductEntity.getCatalogcode();
if (catalogcode.length() >= 7){
Integer catalogcode1 = Integer.valueOf(catalogcode.substring(1, 3));
Integer catalogcode2 = Integer.valueOf(catalogcode1 + catalogcode.substring(3, 5));
Integer catalogcode3 = Integer.valueOf(catalogcode2 + catalogcode.substring(5, 7));
udiProductEntity.setCatalogCode1(catalogcode1);
udiProductEntity.setCatalogCode2(catalogcode2);
udiProductEntity.setCatalogCode3(catalogcode3);
}
return udiProductDao.insertUdiInfo(udiProductEntity);
}
@ -136,12 +148,33 @@ public class UdiProductServiceImpl implements UdiProductService {
if (StrUtil.isEmpty(udiProductEntity.getUuid()))
return false;
udiProductEntity.setUpdateTime(new Date());
//医保编码解析
String catalogcode = udiProductEntity.getCatalogcode();
if (catalogcode.length() >= 7){
Integer catalogcode1 = Integer.valueOf(catalogcode.substring(1, 3));
Integer catalogcode2 = Integer.valueOf(catalogcode1 + catalogcode.substring(3, 5));
Integer catalogcode3 = Integer.valueOf(catalogcode2 + catalogcode.substring(5, 7));
udiProductEntity.setCatalogCode1(catalogcode1);
udiProductEntity.setCatalogCode2(catalogcode2);
udiProductEntity.setCatalogCode3(catalogcode3);
}
return udiProductDao.updateUdiInfoByUuid(udiProductEntity);
}
@Override
public boolean updateUdiInfoById(UdiProductEntity udiProductEntity) {
udiProductEntity.setUpdateTime(new Date());
//医保编码解析
String catalogcode = udiProductEntity.getCatalogcode();
if (catalogcode.length() >= 7){
Integer catalogcode1 = Integer.valueOf(catalogcode.substring(1, 3));
Integer catalogcode2 = Integer.valueOf(catalogcode1 + catalogcode.substring(3, 5));
Integer catalogcode3 = Integer.valueOf(catalogcode2 + catalogcode.substring(5, 7));
udiProductEntity.setCatalogCode1(catalogcode1);
udiProductEntity.setCatalogCode2(catalogcode2);
udiProductEntity.setCatalogCode3(catalogcode3);
}
return udiProductDao.updateUdiInfoById(udiProductEntity);
}

@ -138,6 +138,17 @@ public class ThrProductsAddDiService extends ServiceImpl<ThrProductsAddDiDao, Th
thrProductsAddDiEntity.setUpdateTime(new Date());
thrProductsAddDiEntity.setStatus(1); //..
thrProductsAddDiEntity.setSelectThridSysStr(JSONUtil.toJsonStr(thrDiProductsRequest.getSelectThirdSys()));
//医保编码解析
String catalogcode = thrDiProductsRequest.getCatalogcode();
if (catalogcode.length() >= 7){
Integer catalogcode1 = Integer.valueOf(catalogcode.substring(1, 3));
Integer catalogcode2 = Integer.valueOf(catalogcode1 + catalogcode.substring(3, 5));
Integer catalogcode3 = Integer.valueOf(catalogcode2 + catalogcode.substring(5, 7));
thrProductsAddDiEntity.setCatalogCode1(catalogcode1);
thrProductsAddDiEntity.setCatalogCode2(catalogcode2);
thrProductsAddDiEntity.setCatalogCode3(catalogcode3);
}
list.add(thrProductsAddDiEntity);
}
return thrProductsAddDiDao.insertThrDiProducts(list);

@ -194,7 +194,10 @@
catalogname1,
catalogname2,
catalogname3,
matrial)
matrial,
catalogCode1,
catalogCode2,
catalogCode3)
values (#{id}, #{uuid},
#{originUuid},
#{nameCode},
@ -251,7 +254,10 @@
#{catalogname1},
#{catalogname2},
#{catalogname3},
#{matrial})
#{matrial},
#{catalogCode1},
#{catalogCode2},
#{catalogCode3})
</insert>
<insert id="insertUdiInfos" parameterType="java.util.List">
@ -724,6 +730,15 @@
<if test="catalogname3 != null">
catalogname3=#{catalogname3},
</if>
<if test="catalogCode1 != null">
catalogCode1=#{catalogCode1},
</if>
<if test="catalogCode2 != null">
catalogCode2=#{catalogCode2},
</if>
<if test="catalogCode3 != null">
catalogCode3=#{catalogCode3},
</if>
<if test="matrial != null">
matrial=#{matrial},
</if>
@ -932,6 +947,15 @@
<if test="matrial != null">
matrial=#{matrial},
</if>
<if test="catalogCode1 != null">
catalogCode1=#{catalogCode1},
</if>
<if test="catalogCode2 != null">
catalogCode2=#{catalogCode2},
</if>
<if test="catalogCode3 != null">
catalogCode3=#{catalogCode3},
</if>
</trim>
where id = #{id}

@ -21,6 +21,9 @@
catalogname1,
catalogname2,
catalogname3,
catalogCode1,
catalogCode2,
catalogCode3,
matrial)
values
<foreach collection="list" index="index" item="item" separator=",">
@ -51,6 +54,9 @@
#{item.catalogname1},
#{item.catalogname2},
#{item.catalogname3},
#{item.catalogCode1},
#{item.catalogCode2},
#{item.catalogCode3},
#{item.matrial})
</foreach>
</insert>

@ -756,6 +756,19 @@ CALL Pro_Temp_ColumnWork('basic_products', 'catalogname3',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''三级分类名称(部位、功能、品种)''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'catalogCode1',
' bigint DEFAULT NULL COMMENT ''一级分类名称(学科,品名)''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'catalogCode2',
' bigint DEFAULT NULL COMMENT ''二级分类名称(用途、品目)''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'catalogCode3',
' bigint DEFAULT NULL COMMENT''三级分类名称(部位、功能、品种)''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'matrial',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''耗材材质''',
1);
@ -772,6 +785,18 @@ CALL Pro_Temp_ColumnWork('thr_products_add_di', 'catalogname3',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''三级分类名称(部位、功能、品种)''',
1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'catalogCode1',
' bigint DEFAULT NULL COMMENT ''一级分类名称(学科,品名)''',
1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'catalogCode2',
' bigint DEFAULT NULL COMMENT ''二级分类名称(用途、品目)''',
1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'catalogCode3',
' bigint DEFAULT NULL COMMENT''三级分类名称(部位、功能、品种)''',
1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'matrial',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''耗材材质''',
1);

Loading…
Cancel
Save