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.

50 lines
2.0 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  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.fanuc.dao.FanncGroupMapper">
  4. <select id="queryWorkCenterProdline" resultType="com.xujie.sys.modules.fanuc.entity.FanucGroupEntity">
  5. SELECT wcp.id,
  6. wcp.site,
  7. wcp.prod_line_no,
  8. wcp.prod_line_desc,
  9. wcp.bu_no,
  10. wcp.active,
  11. wcp.create_by,
  12. wcp.create_date,
  13. wcp.update_by,
  14. wcp.update_date,
  15. wcp.remake,
  16. wcp.status,
  17. bu.id as buId,
  18. bu.bu_desc
  19. FROM work_center_prodline wcp
  20. left join BU bu on wcp.site = bu.site and wcp.bu_no = bu.bu_no
  21. <where>
  22. <if test="fanucGroup.buId != null">
  23. and bu.id = #{fanucGroup.buId}
  24. </if>
  25. <if test="fanucGroup.site != null and fanucGroup.site != ''">
  26. and wcp.site = #{fanucGroup.site}
  27. </if>
  28. <if test="fanucGroup.prodLineNo != null and fanucGroup.prodLineNo != ''">
  29. and wcp.prod_line_no like #{fanucGroup.prodLineNo}
  30. </if>
  31. <if test="fanucGroup.prodLineDesc != null and fanucGroup.prodLineDesc != ''">
  32. and wcp.prod_line_desc like #{fanucGroup.prodLineDesc}
  33. </if>
  34. <if test="fanucGroup.buNo != null and fanucGroup.buNo != ''">
  35. and wcp.bu_no like #{fanucGroup.buNo}
  36. </if>
  37. <if test="fanucGroup.status != null and fanucGroup.status != ''">
  38. and wcp.status = #{fanucGroup.status}
  39. </if>
  40. </where>
  41. </select>
  42. <select id="queryBuById" resultType="com.xujie.sys.modules.base.entity.Bu">
  43. select id, site, bu_no, bu_desc, remark, active
  44. from BU
  45. where id = #{id}
  46. </select>
  47. </mapper>