PsmJobV3Mapper.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.ruoyi.predict.mapper.PsmJobV3Mapper">
  6. <resultMap type="PsmJobV3" id="PsmJobV3Result">
  7. <result property="rtuNo" column="rtu_no"/>
  8. <result property="jobType" column="job_type"/>
  9. <result property="jobKey1" column="job_key1"/>
  10. <result property="jobName" column="job_name"/>
  11. <result property="beginTime" column="begin_time"/>
  12. <result property="endTime" column="end_time"/>
  13. <result property="execInterval" column="exec_interval"/>
  14. <result property="nextExecTime" column="next_exec_time"/>
  15. <result property="procName" column="proc_name"/>
  16. <result property="procFlag" column="proc_flag"/>
  17. <result property="directory" column="directory"/>
  18. </resultMap>
  19. <sql id="selectPsmJobV3Vo">
  20. select rtu_no, job_type, job_key1, job_name, begin_time, end_time, exec_interval, next_exec_time, proc_name, proc_flag, directory from psm_job_v3
  21. </sql>
  22. <select id="selectPsmJobV3List" parameterType="PsmJobV3" resultMap="PsmJobV3Result">
  23. select
  24. pjv.*,
  25. w.name as "windplantName",
  26. emi.item_name as "procFlagName"
  27. from
  28. psm_job_v3 pjv
  29. left join windplant w on w.windplant_no = pjv.rtu_no
  30. left join enum_menu_item emi on emi.item_val = pjv.proc_flag and emi.menu_no = 10
  31. <where>
  32. <if test="rtuNo != null ">and pjv.rtu_no = #{rtuNo}</if>
  33. <if test="jobType != null ">and pjv.job_type = #{jobType}</if>
  34. <if test="jobKey1 != null ">and pjv.job_key1 = #{jobKey1}</if>
  35. <if test="jobName != null and jobName != ''">and pjv.job_name like concat(concat('%', #{jobName}), '%')</if>
  36. <if test="beginTime != null ">and pjv.begin_time = #{beginTime}</if>
  37. <if test="endTime != null ">and pjv.end_time = #{endTime}</if>
  38. <if test="execInterval != null ">and pjv.exec_interval = #{execInterval}</if>
  39. <if test="nextExecTime != null ">and pjv.next_exec_time = #{nextExecTime}</if>
  40. <if test="procName != null and procName != ''">and pjv.proc_name like concat(concat('%', #{procName}), '%')
  41. </if>
  42. <if test="procFlag != null ">and pjv.proc_flag = #{procFlag}</if>
  43. <if test="directory != null and directory != ''">and pjv.directory = #{directory}</if>
  44. <if test="windplantName != null and windplantName != ''">and w.name like concat(concat('%',
  45. #{windplantName}), '%')
  46. </if>
  47. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  48. and begin_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  49. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  50. </if>
  51. </where>
  52. order by pjv.rtu_no asc
  53. </select>
  54. <select id="selectPsmJobV3ById" parameterType="Long" resultMap="PsmJobV3Result">
  55. <include refid="selectPsmJobV3Vo"/>
  56. where rtu_no = #{rtuNo}
  57. </select>
  58. <select id="selectPsmJobV3ByJobKey1" parameterType="Long" resultMap="PsmJobV3Result">
  59. <include refid="selectPsmJobV3Vo"/>
  60. where job_key1 = #{jobKey1}
  61. </select>
  62. </mapper>