数据清洗字段修改

dev_drug_dm
yewj 3 weeks ago
parent 67e6fdacae
commit 3069528df8

@ -127,5 +127,15 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String payFeeCode; private String payFeeCode;
private String keyWords; private String keyWords;
/**
* 01567
*/
private Integer notCodeType;
/**
* 01
*/
private Integer manuReview;
} }

@ -285,39 +285,33 @@ public class UdiRelevanceResponse {
public int getBhzxxsbzsl() { public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) { if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1; return 1;
} else } else return bhzxxsbzsl;
return bhzxxsbzsl;
} }
public Boolean getAllowNoBatch() { public Boolean getAllowNoBatch() {
if (allowNoBatch == null) if (allowNoBatch == null) return false;
return false;
return allowNoBatch; return allowNoBatch;
} }
public Boolean getAllowNoExpire() { public Boolean getAllowNoExpire() {
if (allowNoExpire == null) if (allowNoExpire == null) return false;
return false;
return allowNoExpire; return allowNoExpire;
} }
public Boolean getAllowNoProduct() { public Boolean getAllowNoProduct() {
if (allowNoProduct == null) if (allowNoProduct == null) return false;
return false;
return allowNoProduct; return allowNoProduct;
} }
public Boolean getAllowNoSerial() { public Boolean getAllowNoSerial() {
if (allowNoSerial == null) if (allowNoSerial == null) return true;
return true;
return allowNoSerial; return allowNoSerial;
} }
public Boolean getUseDy() { public Boolean getUseDy() {
if (isUseDy == null) if (isUseDy == null) return false;
return false;
return isUseDy; return isUseDy;
} }
@ -337,4 +331,14 @@ public class UdiRelevanceResponse {
private String zczbhhzbapzbhSys; private String zczbhhzbapzbhSys;
/**
* 01567
*/
private Integer notCodeType;
/**
* 01
*/
private Integer manuReview;
} }

@ -411,10 +411,10 @@
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest" <select id="filterUdiGp" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.UdiRelevanceResponse"> resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
select select IF((COUNT(DISTINCT IF(basic_products.bhltcjsl = 1, basic_products.bhsycjsl, 0)) - 1) > 1, '多种包装规格',
IF ( (COUNT(DISTINCT IF(basic_products.bhltcjsl = 1,basic_products.bhsycjsl,0))-1) > 1,'多种包装规格',basic_products.bzgg) AS bzgg, basic_products.bzgg) AS bzgg,
basic_udirel.*, basic_udirel.*,
bht.name classifyName, bht.name classifyName,
basic_products.originUuid, basic_products.originUuid,
basic_products.nameCode, basic_products.nameCode,
basic_products.deviceRecordKey, basic_products.deviceRecordKey,
@ -474,7 +474,7 @@
basic_products.sfwwjbz, basic_products.sfwwjbz,
basic_products.syqsfxyjxmj, basic_products.syqsfxyjxmj,
basic_products.mjfs, basic_products.mjfs,
basic_products.id as productId, basic_products.id as productId,
basic_products.categoryName, basic_products.categoryName,
basic_products.catalogname1, basic_products.catalogname1,
basic_products.catalogname2, basic_products.catalogname2,
@ -495,7 +495,7 @@
basic_products.workPlaceCount, basic_products.workPlaceCount,
basic_products.bhltcjsl, basic_products.bhltcjsl,
basic_products.bhsycjsl, basic_products.bhsycjsl,
th.hsmc hslbName th.hsmc hslbName
FROM basic_products FROM basic_products
inner JOIN basic_udirel inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
@ -520,27 +520,27 @@
</if> </if>
<if test="keyWords != '' and keyWords != null"> <if test="keyWords != '' and keyWords != null">
AND ( AND (
nameCode LIKE concat('%', #{keyWords}, '%') nameCode LIKE concat('%', #{keyWords}, '%')
or ybbm LIKE concat('%', #{keyWords}, '%') or ybbm LIKE concat('%', #{keyWords}, '%')
or sptm LIKE concat('%', #{keyWords}, '%') or sptm LIKE concat('%', #{keyWords}, '%')
or basic_udirel.mainId LIKE concat('%', #{keyWords}, '%') or basic_udirel.mainId LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId1 LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId1 LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId2 LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId2 LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId3 LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId3 LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%') or basic_udirel.thirdId4 LIKE concat('%', #{keyWords}, '%')
or basic_products.cpmctymc LIKE concat('%', #{keyWords}, '%') or basic_products.cpmctymc LIKE concat('%', #{keyWords}, '%')
or basic_products.ggxh LIKE concat('%', #{keyWords}, '%') or basic_products.ggxh LIKE concat('%', #{keyWords}, '%')
or basic_products.zczbhhzbapzbh LIKE concat('%', #{keyWords}, '%') or basic_products.zczbhhzbapzbh LIKE concat('%', #{keyWords}, '%')
or basic_products.manufactory LIKE concat('%', #{keyWords}, '%') or basic_products.manufactory LIKE concat('%', #{keyWords}, '%')
or basic_products.ybbm LIKE concat(#{keyWords}, '%') or basic_products.ybbm LIKE concat(#{keyWords}, '%')
or basic_products.bzgg LIKE concat('%', #{keyWords}, '%') or basic_products.bzgg LIKE concat('%', #{keyWords}, '%')
or basic_products.prepnSpec LIKE concat('%', #{keyWords}, '%')) or basic_products.prepnSpec LIKE concat('%', #{keyWords}, '%'))
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND ( AND (
nameCode LIKE concat('%', #{nameCode}, '%') nameCode LIKE concat('%', #{nameCode}, '%')
or ybbm LIKE concat('%', #{nameCode}, '%') or ybbm LIKE concat('%', #{nameCode}, '%')
or sptm LIKE concat('%', #{nameCode}, '%') or sptm LIKE concat('%', #{nameCode}, '%')
or basic_udirel.mainId LIKE concat('%', #{nameCode}, '%') or basic_udirel.mainId LIKE concat('%', #{nameCode}, '%')
@ -561,7 +561,7 @@
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
and ( and (
nameCode LIKE concat('%', #{unionCode}, '%') nameCode LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE concat('%', #{unionCode}, '%') or ybbm LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%')) or sptm LIKE concat('%', #{unionCode}, '%'))
</if> </if>
@ -578,12 +578,16 @@
or thirdId3 LIKE concat('%', #{thrPiId}, '%') or thirdId3 LIKE concat('%', #{thrPiId}, '%')
or thirdId4 LIKE concat('%', #{thrPiId}, '%')) or thirdId4 LIKE concat('%', #{thrPiId}, '%'))
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="notCodeType != '' and notCodeType != null">
AND basic_udirel.uuid = #{uuid} AND basic_udirel.notCodeType = #{notCodeType}
</if>
<if test="manuReview != '' and thirdId != null">
AND manuReview = #{manuReview}
</if> </if>
<if test="thirdId != '' and thirdId != null"> <if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId} AND thirdId = #{thirdId}
</if> </if>
<if test="udplatCode != '' and udplatCode != null"> <if test="udplatCode != '' and udplatCode != null">
AND udplatCode = #{udplatCode} AND udplatCode = #{udplatCode}
</if> </if>
@ -595,25 +599,26 @@
</if> </if>
<if test="filterType != null and filterType == 1 and productsType == 1"> <if test="filterType != null and filterType == 1 and productsType == 1">
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '') thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
and basic_products.originUuid <![CDATA[<>]]> '' and basic_products.originUuid <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 1 and productsType == 2"> <if test="filterType != null and filterType == 1 and productsType == 2">
AND (thirdId is not null or thirdId1 is not null) AND (thirdId is not null or thirdId1 is not null)
</if> </if>
<if test="filterType != null and filterType == 1 and productsType == 2"> <if test="filterType != null and filterType == 1 and productsType == 2">
AND basic_products.nameCode is not null AND basic_products.nameCode is not null
</if> </if>
<if test="filterType != null and filterType == 2 and productsType == 1"> <if test="filterType != null and filterType == 2 and productsType == 1">
AND basic_products.originUuid is NULL AND basic_products.originUuid is NULL
</if> </if>
<if test="filterType != null and filterType == 2 and productsType == 2"> <if test="filterType != null and filterType == 2 and productsType == 2">
AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null) AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null)
) )
</if> </if>
<if test="filterType != null and filterType == 2 and productsType == 2"> <if test="filterType != null and filterType == 2 and productsType == 2">
AND ( (mainId = '' or mainId is null) or (basic_products.nameCode = '' or basic_products.nameCode is null) AND ((mainId = '' or mainId is null) or
) (basic_products.nameCode = '' or basic_products.nameCode is null)
)
</if> </if>
<if test="filterType != null and filterType == 3"> <if test="filterType != null and filterType == 3">
AND (mainId is NULL or mainId = '') AND (mainId is NULL or mainId = '')
@ -778,7 +783,7 @@
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
and ( and (
nameCode LIKE concat('%', #{unionCode}, '%') nameCode LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE concat('%', #{unionCode}, '%') or ybbm LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%')) or sptm LIKE concat('%', #{unionCode}, '%'))
</if> </if>
@ -854,7 +859,7 @@
AND basic_products.tyshxydm = #{tyshxydm} AND basic_products.tyshxydm = #{tyshxydm}
</if> </if>
</where> </where>
GROUP BY cpmctymc, manufactory,zczbhhzbapzbh GROUP BY cpmctymc, manufactory, zczbhhzbapzbh
</select> </select>
@ -983,7 +988,6 @@
</select> </select>
<select id="selectByThirdId" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest" <select id="selectByThirdId" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.entity.basic.UdiRelevanceEntity"> resultType="com.glxp.api.entity.basic.UdiRelevanceEntity">
select * select *
@ -1061,7 +1065,7 @@
groupBuy, needCert, isStack, groupBuy, needCert, isStack,
distributeLevelCount, useLevel, distributeLevelCount, useLevel,
distributeLevel, distributeLevel,
splitEnable, autoCode, distributeMaxLevel, useMaxLevel,unpackUseTime,detailSort) splitEnable, autoCode, distributeMaxLevel, useMaxLevel, unpackUseTime, detailSort)
values (#{id}, values (#{id},
#{uuid}, #{uuid},
#{mainId}, #{mainId},
@ -1097,7 +1101,7 @@
#{useLevel}, #{useLevel},
#{distributeLevel}, #{distributeLevel},
#{splitEnable}, #{splitEnable},
#{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime},#{detailSort}) #{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime}, #{detailSort})
</insert> </insert>

Loading…
Cancel
Save