GxtMisInfoMapper.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ygtx.gxt.mapper.source.GxtMisInfoMapper">
  6. <resultMap type="com.ygtx.gxt.domain.GxtMisInfo" id="GxtMisInfoResult">
  7. <!-- <result property="misNo" column="work_order_project_no" />-->
  8. <!-- <result property="workOrderStatus" column="work_order_status" />-->
  9. <!-- <result property="pcsStationName" column="pcs_stati_name" />-->
  10. <!-- <result property="planStartTime" column="plan_start_time" />-->
  11. <!-- <result property="planEndTime" column="plan_end_time" />-->
  12. <!-- <result property="realStartTime" column="real_start_time" />-->
  13. <!-- <result property="realEndTime" column="real_end_time" />-->
  14. <!-- <result property="content" column="work_content" />-->
  15. <!-- <result property="issuerName" column="issuer_name" />-->
  16. <!-- <result property="permitterName" column="permitter_name" />-->
  17. <!-- <result property="createTime" column="create_time" />-->
  18. <!-- <result property="updateTime" column="update_time" />-->
  19. <!-- <result property="remark" column="remark" />-->
  20. <result property="misNo" column="work_order_project_code" />
  21. <result property="workOrderStatus" column="work_order_status" />
  22. <result property="pcsStationName" column="pcs_station_name" />
  23. <result property="pcsDeviceName" column="work_order_device" />
  24. <result property="realStartTime" column="real_start_time" />
  25. <result property="realEndTime" column="real_end_time" />
  26. <result property="content" column="work_content" />
  27. <result property="createTime" column="create_time" />
  28. <result property="updateTime" column="update_time" />
  29. <result property="remark" column="remark" />
  30. <result property="workPermitNum" column="work_ticket_no" />
  31. </resultMap>
  32. <resultMap type="com.ygtx.gxt.domain.GxtWorkOrderPerson" id="GxtWorkOrderPersonResult">
  33. <result property="nickName" column="person_name" />
  34. <result property="misNo" column="work_order_project_code" />
  35. <result property="userName" column="person_id" />
  36. <result property="createTime" column="create_time" />
  37. <result property="updateTime" column="update_time" />
  38. <result property="isLeader" column="is_charge_user" />
  39. </resultMap>
  40. <sql id="selectGxtMisInfoVo">
  41. select work_order_project_code, work_order_status, pcs_station_name,
  42. work_order_device, real_start_time, real_end_time,
  43. work_content, create_time, update_time, remark, work_ticket_no
  44. from fujian_wo_new_work_item t
  45. </sql>
  46. <sql id="selectGxtWorkOrderPersonVo">
  47. select person_name, work_order_project_code, person_id, create_time, update_time, is_charge_user
  48. from fujian_wo_new_internal_team_members
  49. </sql>
  50. <select id="selectGxtMisInfoList" parameterType="com.ygtx.gxt.domain.GxtMisInfo" resultMap="GxtMisInfoResult">
  51. <include refid="selectGxtMisInfoVo"/>
  52. <where>
  53. work_order_device is not null
  54. <if test="misNo != null and misNo != ''"> and work_order_project_code like concat('%', #{misNo}, '%')</if>
  55. <if test="pcsStationName != null and pcsStationName != ''"> and pcs_station_name like concat('%', #{pcsStationName}, '%')</if>
  56. <if test="pcsDeviceName != null and pcsDeviceName != ''"> and work_order_device like concat('%', #{pcsDeviceName}, '%')</if>
  57. <if test="workOrderStatus != null and workOrderStatus != ''"> and work_order_status in
  58. <foreach collection="workOrderStatus.split(',')" item="status" open="(" separator="," close=")">
  59. #{status}
  60. </foreach>
  61. </if>
  62. <if test="beginRealEndTime != null and beginRealEndTime != ''"> and date_format(real_end_time,'%y%m%d') &gt;= date_format(#{beginRealEndTime},'%y%m%d')</if>
  63. <if test="endRealEndTime != null and endRealEndTime != ''"> and date_format(real_end_time,'%y%m%d') &lt;= date_format(#{endRealEndTime},'%y%m%d')</if>
  64. <if test="pauseTime != null"> and real_start_time &gt;= #{pauseTime}</if>
  65. <if test="restartTime != null"> and real_start_time &lt; #{restartTime}</if>
  66. </where>
  67. order by create_time desc
  68. </select>
  69. <select id="selectAutoGxtMisInfoList" parameterType="com.ygtx.gxt.domain.GxtMisInfo" resultMap="GxtMisInfoResult">
  70. <include refid="selectGxtMisInfoVo"/>
  71. WHERE t.work_order_device IS NOT NULL
  72. AND t.pcs_station_name = #{pcsStationName}
  73. AND t.work_order_device = #{pcsDeviceName}
  74. AND t.real_start_time &gt;= #{pauseTime}
  75. AND t.real_start_time &lt; #{restartTime}
  76. <if test="misNo != null and misNo != ''"> and work_order_project_code like concat('%', #{misNo}, '%')</if>
  77. <if test="workOrderStatus != null and workOrderStatus != ''"> and work_order_status in
  78. <foreach collection="workOrderStatus.split(',')" item="status" open="(" separator="," close=")">
  79. #{status}
  80. </foreach>
  81. </if>
  82. order by create_time desc
  83. </select>
  84. <select id="selectGxtWorkOrderPersonList" parameterType="com.ygtx.gxt.domain.GxtWorkOrderPerson" resultMap="GxtWorkOrderPersonResult">
  85. <include refid="selectGxtWorkOrderPersonVo"/>
  86. <where>
  87. <if test="nickName != null and nickName != ''"> and person_name = #{nickName}</if>
  88. <if test="misNo != null and misNo != ''"> and work_order_project_code = #{misNo}</if>
  89. <if test="userName != null and userName != ''"> and person_id = #{userName}</if>
  90. <if test="isLeader != null and isLeader != ''"> and is_charge_user = #{isLeader}</if>
  91. </where>
  92. order by create_time desc
  93. </select>
  94. </mapper>