You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
2.0 KiB

<?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.xujie.sys.modules.part.mapper.PartProductGroupInformationMapper">
<!-- 单位信息列表 -->
<select id="productGroupInformationSearch" parameterType="com.xujie.sys.modules.part.vo.PartProductGroupInformationVo" resultType="com.xujie.sys.modules.part.vo.PartProductGroupInformationVo">
SELECT
site,
bu_no,
dbo.get_bu_desc(site, bu_no) as buDesc,
product_group_id,
product_group_name,
active,
case when active = 'Y' then '是' when active = 'N' then '否' else '' end as activeDesc,
type,
create_by,
create_date,
dbo.getOperatorDesc(site, create_by) as createByDesc,
update_date,
update_by,
dbo.getOperatorDesc(site, update_by) as updateByDesc,
yield_rate
FROM part_product_group
<where>
site in (select site from eam_access_site where username = #{query.userName})
and (site + '-' + bu_no) in (select * from dbo.query_bu(#{query.userName}))
<if test="query.buDesc != null and query.buDesc != ''">
AND dbo.get_bu_desc (site, bu_no) = #{query.buDesc}
</if>
<if test = "query.productGroupId != null and query.productGroupId != ''">
AND product_group_id like '%' + #{query.productGroupId} + '%'
</if>
<if test = "query.productGroupName != null and query.productGroupName != ''">
AND product_group_name like '%' + #{query.productGroupName} + '%'
</if>
<if test = "query.active != null and query.active != ''">
AND active = #{query.active}
</if>
<if test = "query.type != null and query.type != ''">
AND type = #{query.type}
</if>
</where>
</select>
</mapper>