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.

67 lines
2.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years 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.FanncMapper">
  4. <select id="queryWorkCenterList" resultType="com.xujie.sys.modules.fanuc.entity.FanucEntity">
  5. SELECT
  6. wc.id,
  7. wc.workshop_id,
  8. wc.work_center_no,
  9. wc.work_center_desc,
  10. wc.work_center_type_db,
  11. wc.work_center_type,
  12. wc.average_capacity,
  13. wc.efficiency,
  14. wc.utilization,
  15. wc.capacity_type_db,
  16. wc.capacity_type,
  17. wc.umid,
  18. wc.active,
  19. wc.proline_no,
  20. wc.need_setup_flag,
  21. wc.created_by,
  22. wc.created_date,
  23. wc.remark,
  24. wc.update_by,
  25. wc.updated_date,
  26. wc.delflag,
  27. wc.version,
  28. wc.site,
  29. wc.bu_no,
  30. bu.id as bu_id,
  31. bu.bu_desc
  32. FROM
  33. work_center wc
  34. left join BU bu on wc.bu_no = bu.bu_no and wc.site = bu.site
  35. <where>
  36. <if test="fanuc.buId != null">
  37. and bu.id = #{fanuc.buId}
  38. </if>
  39. <if test="fanuc.site != null and fanuc.site != ''">
  40. and wc.site = #{fanuc.site}
  41. </if>
  42. <if test="fanuc.workCenterNo != null and fanuc.workCenterNo != ''">
  43. and wc.work_center_no like #{fanuc.workCenterNo}
  44. </if>
  45. <if test="fanuc.workCenterDesc != null and fanuc.workCenterDesc != ''">
  46. and wc.work_center_desc like #{fanuc.workCenterDesc}
  47. </if>
  48. <if test="fanuc.buNo != null and fanuc.buNo != ''">
  49. and wc.bu_no like #{fanuc.buNo}
  50. </if>
  51. <if test="fanuc.active != null and fanuc.active != ''">
  52. and wc.active = #{fanuc.active}
  53. </if>
  54. </where>
  55. </select>
  56. <select id="queryWorkCenterResource" resultType="java.lang.Integer">
  57. SELECT dbo.get_work_center_resource_num(#{site}, #{workCenterNo}) AS resourceCount
  58. </select>
  59. <select id="queryResourceInfo" resultType="com.xujie.sys.modules.resource.data.ResourceEntity">
  60. SELECT
  61. *
  62. FROM
  63. resource
  64. where site = #{site} and work_center_no = #{workCenterNo}
  65. </select>
  66. </mapper>