Merge pull request 'demand: tms-运输管理-组批次规则维护-查询组批次规则支持根据多个供应商查询' (#324) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/324
This commit is contained in:
commit
2da4b460e2
@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisTransPlanRuleMapper">
|
||||
|
||||
|
||||
<resultMap type="EmisTransPlanRule" id="EmisTransPlanRuleResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="lineCode" column="line_code" />
|
||||
@ -30,13 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
r.manager, r.supplier_code, r.start_date, r.end_date, r.remark,
|
||||
r.del_flag, r.create_by, r.create_time, r.update_by, r.update_time, r.create_site, r.update_site,
|
||||
l.line_name,l.trans_manager, l.from_country, l.country,
|
||||
(SELECT GROUP_CONCAT(s.name ORDER BY FIND_IN_SET(s.code, r.supplier_code))
|
||||
FROM emis_supplier s
|
||||
WHERE FIND_IN_SET(s.code, r.supplier_code)
|
||||
(SELECT GROUP_CONCAT(s.name ORDER BY FIND_IN_SET(s.code, r.supplier_code))
|
||||
FROM emis_supplier s
|
||||
WHERE FIND_IN_SET(s.code, r.supplier_code)
|
||||
AND s.del_flag = '0') as supplier_name,
|
||||
(SELECT GROUP_CONCAT(p.prod_name ORDER BY FIND_IN_SET(p.prod_code, r.product_type))
|
||||
FROM emis_trans_product p
|
||||
WHERE FIND_IN_SET(p.prod_code, r.product_type)
|
||||
(SELECT GROUP_CONCAT(p.prod_name ORDER BY FIND_IN_SET(p.prod_code, r.product_type))
|
||||
FROM emis_trans_product p
|
||||
WHERE FIND_IN_SET(p.prod_code, r.product_type)
|
||||
AND p.del_flag = '0') as product_type_name
|
||||
from emis_trans_plan_rule r
|
||||
left join emis_site s1 on r.start_site_code = s1.site_code and s1.del_flag='0'
|
||||
@ -58,7 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND l.trans_manager like concat('%', #{transManager}, '%')
|
||||
</if>
|
||||
<if test="productType != null and productType != ''"> and ( FIND_IN_SET(#{productType},r.product_type) )</if>
|
||||
<if test="supplierCode != null and supplierCode != ''"> and ( FIND_IN_SET(#{supplierCode},r.supplier_code) )</if>
|
||||
<if test="supplierCode != null and supplierCode != ''">
|
||||
and CONCAT(',', r.supplier_code, ',')
|
||||
REGEXP CONCAT(',(', REPLACE(#{supplierCode}, ',', '|'), '),')
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
@ -181,14 +184,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisTransPlanRuleById" parameterType="Long" resultMap="EmisTransPlanRuleResult">
|
||||
<include refid="selectEmisTransPlanRuleVo"/>
|
||||
where r.id = #{id} and r.del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSupplierNamesByCodes" parameterType="String" resultType="String">
|
||||
SELECT GROUP_CONCAT(s.name ORDER BY FIND_IN_SET(s.code, #{supplierCodes}))
|
||||
SELECT GROUP_CONCAT(s.name ORDER BY FIND_IN_SET(s.code, #{supplierCodes}))
|
||||
FROM emis_supplier s
|
||||
WHERE FIND_IN_SET(s.code, #{supplierCodes}) AND s.del_flag = 0
|
||||
</select>
|
||||
@ -261,9 +264,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteEmisTransPlanRuleByIds" parameterType="String">
|
||||
update emis_trans_plan_rule set del_flag = '1' where id in
|
||||
update emis_trans_plan_rule set del_flag = '1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@ -383,4 +386,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user