You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
4.3 KiB
XML
102 lines
4.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.glxp.api.dao.purchase.SupCertRemindMsgDao">
|
|
<select id="selectSupRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
|
|
select m.*,
|
|
c.companyName `name`,
|
|
(select `name` from sup_cert s where s.code = m.code and s.CustomerId = m.idFk limit 1) certName
|
|
from sup_cert_remind_msg m
|
|
left join sup_company c on m.idFk = c.customerId
|
|
left join sup_cert bc on bc.code = m.code
|
|
|
|
<where>
|
|
<if test="supId != null and supId != ''">
|
|
AND m.idFk = #{supId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND c.companyName like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="status != null">
|
|
AND m.status = #{status}
|
|
</if>
|
|
<if test="ignoreStatus != null">
|
|
AND m.ignoreStatus = #{ignoreStatus}
|
|
</if>
|
|
<if test="type != null">
|
|
AND m.type = #{type}
|
|
</if>
|
|
<if test="certName != null and certName != ''">
|
|
AND bc.name like concat('%', #{certName}, '%')
|
|
</if>
|
|
</where>
|
|
order by m.updateTime desc
|
|
</select>
|
|
|
|
<select id="selectManufactureRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
|
|
select m.*,
|
|
c.companyName `name`,
|
|
(select `name` from sup_cert s where s.code = m.code and s.manufacturerIdFk = m.idFk limit 1) certName
|
|
,
|
|
(select name from basic_corp where erpId = c.customerId) supName
|
|
from sup_cert_remind_msg m
|
|
left join sup_manufacturer c on m.idFk = c.manufacturerId
|
|
left join sup_cert bc on bc.code = m.code
|
|
<where>
|
|
<if test="supId != null and supId != ''">
|
|
AND c.customerId = #{supId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND c.companyName like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="status != null">
|
|
AND m.status = #{status}
|
|
</if>
|
|
<if test="ignoreStatus != null">
|
|
AND m.ignoreStatus = #{ignoreStatus}
|
|
</if>
|
|
<if test="type != null">
|
|
AND m.type = #{type}
|
|
</if>
|
|
<if test="certName != null and certName != ''">
|
|
AND bc.name like concat('%', #{certName}, '%')
|
|
</if>
|
|
</where>
|
|
order by m.updateTime desc
|
|
</select>
|
|
|
|
<select id="selectProductRemindMsgList" resultType="com.glxp.api.res.purchase.SupCertRemindMsgResponse">
|
|
select m.*,
|
|
c.recordProductName `name`,
|
|
(select `name` from sup_cert s where s.code = m.code and s.productIdFk = m.idFk limit 1) certName
|
|
,
|
|
(select name from basic_corp where erpId = c.customerId) supName
|
|
|
|
|
|
from sup_cert_remind_msg m
|
|
left join sup_product c on m.idFk = c.productId
|
|
left join sup_cert bc on bc.code = m.code
|
|
|
|
<where>
|
|
<if test="supId != null and supId != ''">
|
|
AND c.customerId = #{supId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND c.recordProductName like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="status != null">
|
|
AND m.status = #{status}
|
|
</if>
|
|
<if test="ignoreStatus != null">
|
|
AND m.ignoreStatus = #{ignoreStatus}
|
|
</if>
|
|
<if test="type != null">
|
|
AND m.type = #{type}
|
|
</if>
|
|
<if test="certName != null and certName != ''">
|
|
AND bc.name like concat('%', #{certName}, '%')
|
|
</if>
|
|
</where>
|
|
order by m.updateTime desc
|
|
</select>
|
|
</mapper>
|