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

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.xujie.sys.modules.part.mapper.PartProductGroupInformationMapper">
  4. <!-- 单位信息列表 -->
  5. <select id="productGroupInformationSearch" parameterType="com.xujie.sys.modules.part.vo.PartProductGroupInformationVo" resultType="com.xujie.sys.modules.part.vo.PartProductGroupInformationVo">
  6. SELECT
  7. site,
  8. bu_no,
  9. dbo.get_bu_desc(site, bu_no) as buDesc,
  10. product_group_id,
  11. product_group_name,
  12. active,
  13. case when active = 'Y' then '是' when active = 'N' then '否' else '' end as activeDesc,
  14. type,
  15. create_by,
  16. create_date,
  17. dbo.getOperatorDesc(site, create_by) as createByDesc,
  18. update_date,
  19. update_by,
  20. dbo.getOperatorDesc(site, update_by) as updateByDesc,
  21. yield_rate
  22. FROM part_product_group
  23. <where>
  24. site in (select site from eam_access_site where username = #{query.userName})
  25. and (site + '-' + bu_no) in (select * from dbo.query_bu(#{query.userName}))
  26. <if test="query.buDesc != null and query.buDesc != ''">
  27. AND dbo.get_bu_desc (site, bu_no) = #{query.buDesc}
  28. </if>
  29. <if test = "query.productGroupId != null and query.productGroupId != ''">
  30. AND product_group_id like '%' + #{query.productGroupId} + '%'
  31. </if>
  32. <if test = "query.productGroupName != null and query.productGroupName != ''">
  33. AND product_group_name like '%' + #{query.productGroupName} + '%'
  34. </if>
  35. <if test = "query.active != null and query.active != ''">
  36. AND active = #{query.active}
  37. </if>
  38. <if test = "query.type != null and query.type != ''">
  39. AND type = #{query.type}
  40. </if>
  41. </where>
  42. </select>
  43. </mapper>