Merge remote-tracking branch 'origin/master'

cert
1178634255 2 years ago
commit 899240dbc1

@ -162,6 +162,7 @@ public class UdiTraceService {
List<String> certNums = toCorpCreditNums.stream().distinct().collect(Collectors.toList()); List<String> certNums = toCorpCreditNums.stream().distinct().collect(Collectors.toList());
for (String certNum : certNums) { for (String certNum : certNums) {
UserCompanyEntity userCompanyEntity = userCompanyService.getOne(new QueryWrapper<UserCompanyEntity>().eq("creditNum", certNum.trim())); UserCompanyEntity userCompanyEntity = userCompanyService.getOne(new QueryWrapper<UserCompanyEntity>().eq("creditNum", certNum.trim()));
if (userCompanyEntity != null) {
TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.findTask(2, traceProductDetailEntity.getId(), userCompanyEntity.getId()); TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.findTask(2, traceProductDetailEntity.getId(), userCompanyEntity.getId());
if (taskNoticeEntity == null) { if (taskNoticeEntity == null) {
taskNoticeEntity = createTraceNotice(2, traceProductDetailEntity, userCompanyEntity.getId()); taskNoticeEntity = createTraceNotice(2, traceProductDetailEntity, userCompanyEntity.getId());
@ -172,6 +173,8 @@ public class UdiTraceService {
pushMq(taskNoticeEntity, userCompanyEntity.getId()); pushMq(taskNoticeEntity, userCompanyEntity.getId());
} }
} }
}
} }
} }

@ -93,11 +93,21 @@
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
AND nameCode LIKE concat(#{unionCode}, '%') AND nameCode LIKE concat(#{unionCode}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null">
AND nameCode = #{nameCode}
</if>
<if test="unionFilterStr != '' and unionFilterStr != null"> <if test="unionFilterStr != '' and unionFilterStr != null">
or p.cpmctymc LIKE concat('%', #{unionFilterStr}, '%') or p.cpmctymc LIKE concat('%', #{unionFilterStr}
or p.ylqxzcrbarmc LIKE concat('%', #{unionFilterStr}, '%') , '%')
or p.ggxh LIKE concat('%', #{unionFilterStr}, '%') or p.ylqxzcrbarmc LIKE concat('%'
or p.zczbhhzbapzbh LIKE concat('%', #{unionFilterStr}, '%') , #{unionFilterStr}
, '%')
or p.ggxh LIKE concat('%'
, #{unionFilterStr}
, '%')
or p.zczbhhzbapzbh LIKE concat('%'
, #{unionFilterStr}
, '%')
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
AND nameCode = #{unionCode} AND nameCode = #{unionCode}
@ -108,7 +118,9 @@
<select id="filterBasicList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest" <select id="filterBasicList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.BasicUdiRelResponse"> resultType="com.glxp.api.res.basic.BasicUdiRelResponse">
select bur.*,sm.*,sc.*, select bur.*,
sm.*,
sc.*,
uc.companyName, uc.companyName,
nameCode, nameCode,
packRatio, packRatio,
@ -175,10 +187,22 @@
<select id="filterCompanyList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest" <select id="filterCompanyList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.BasicUdiRelResponse"> resultType="com.glxp.api.res.basic.BasicUdiRelResponse">
SELECT sup_manufacturer.* ,user_company.companyName as supName SELECT sup_manufacturer.*,
user_company.companyName as supName
<if test="productStatus != null"> <if test="productStatus != null">
,(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as failCout, ,
(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as passCout (SELECT count(*)
FROM sup_product
WHERE sup_manufacturer.customerId = sup_product.customerId
AND sup_product.auditStatus != 0
AND sup_product.auditStatus != 1
AND sup_product.auditStatus != 4
AND sup_manufacturer.manufacturerId = sup_product.manufacturerIdFk) as failCout,
(SELECT count(*)
FROM sup_product
WHERE sup_manufacturer.customerId = sup_product.customerId
AND (sup_product.auditStatus = 1 OR sup_product.auditStatus = 4)
AND sup_manufacturer.manufacturerId = sup_product.manufacturerIdFk) as passCout
</if> </if>
FROM sup_manufacturer FROM sup_manufacturer
inner join user_company on sup_manufacturer.customerId = user_company.customerId inner join user_company on sup_manufacturer.customerId = user_company.customerId
@ -211,14 +235,18 @@
sup_manufacturer.auditStatus = 2) sup_manufacturer.auditStatus = 2)
</if> </if>
<if test="auditStatus == 21"> <if test="auditStatus == 21">
and <![CDATA[ sup_manufacturer.auditStatus <> 0 ]]> and <![CDATA[ sup_manufacturer.auditStatus <> 0
]]>
</if> </if>
<if test="auditStatus == 22"> <if test="auditStatus == 22">
and (sup_manufacturer.auditStatus = 1 or sup_manufacturer.auditStatus = 4) and (sup_manufacturer.auditStatus = 1 or sup_manufacturer.auditStatus = 4)
</if> </if>
<if test="lastUpdateTime != null and lastUpdateTime != ''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ and DATE_FORMAT(sup_manufacturer.updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and DATE_FORMAT(sup_manufacturer.updateTime, '%Y-%m-%d %H:%i:%S') >=
DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
<if test="type != null"> <if test="type != null">
and id != #{id} and id != #{id}

Loading…
Cancel
Save