1、禅道bug#1517、#1521修复;2、新增 创建组织自动复制默认标签模板能力;

This commit is contained in:
gaoqr
2026-05-15 09:03:55 +08:00
parent bd67db98e4
commit 9b1a85afb5
11 changed files with 212 additions and 86 deletions
@@ -90,4 +90,77 @@
</select>
<select id="selectPageWithProductExpire"
resultType="com.cf.imes.module.system.dal.dataobject.organ.OrganizationDO">
SELECT o.*
FROM system_organization o
<where>
o.deleted = false
<if test="reqVO.contactName != null and reqVO.contactName != ''">
AND o.contact_name LIKE CONCAT('%', #{reqVO.contactName}, '%')
</if>
<if test="reqVO.contactMobile != null and reqVO.contactMobile != ''">
AND o.contact_mobile LIKE CONCAT('%', #{reqVO.contactMobile}, '%')
</if>
<if test="reqVO.status != null">
AND o.status = #{reqVO.status}
</if>
<if test="reqVO.exactName != null and reqVO.exactName != ''">
AND o.name = #{reqVO.exactName}
</if>
<if test="reqVO.province != null and reqVO.province != ''">
AND o.province = #{reqVO.province}
</if>
<if test="reqVO.city != null and reqVO.city != ''">
AND o.city = #{reqVO.city}
</if>
<if test="reqVO.county != null and reqVO.county != ''">
AND o.county = #{reqVO.county}
</if>
<if test="reqVO.expireTime != null and reqVO.expireTime.length == 2">
AND o.expire_time BETWEEN #{reqVO.expireTime[0]} AND #{reqVO.expireTime[1]}
</if>
<if test="reqVO.remark != null and reqVO.remark != ''">
AND o.remark LIKE CONCAT('%', #{reqVO.remark}, '%')
</if>
<if test="reqVO.name != null and reqVO.name != ''">
AND (
o.name LIKE CONCAT('%', #{reqVO.name}, '%')
<if test="reqVO.pyAll != null and reqVO.pyAll != ''">
OR o.pinyin_full LIKE CONCAT('%', #{reqVO.pyAll}, '%')
</if>
<if test="reqVO.pyFirstChar != null and reqVO.pyFirstChar != ''">
OR o.pinyin_initial LIKE CONCAT('%', #{reqVO.pyFirstChar}, '%')
</if>
)
</if>
AND o.id IN (
SELECT pr.organ_id
FROM purchase_record pr
LEFT JOIN (
SELECT purchase_id, MAX(delay_time) as max_delay_time
FROM product_delay_record
WHERE deleted = false
GROUP BY purchase_id
) pdr ON pr.id = pdr.purchase_id
WHERE pr.initial = true
AND pr.deleted = false
AND pr.status = 1
<if test="reqVO.endTime != null">
AND COALESCE(pdr.max_delay_time, pr.end_time) >= #{reqVO.endTime[0]}
</if>
<if test="reqVO.endTime != null">
AND COALESCE(pdr.max_delay_time, pr.end_time) &lt;= #{reqVO.endTime[1]}
</if>
<if test="reqVO.productName != null and reqVO.productName != ''">
AND pr.product_name LIKE CONCAT('%', #{reqVO.productName}, '%')
</if>
<if test="reqVO.price != null">
AND pr.total_amount = #{reqVO.price}
</if>
)
</where>
ORDER BY o.id DESC
</select>
</mapper>