FillGatherTaskDetailMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.platform.dao.mapper.fill.FillGatherTaskDetailMapper">
  4. <sql id="Base_Column_List">
  5. fill.id,
  6. fill.task_id,
  7. fill.sb_id,
  8. fill.created_time,
  9. fill.update_time,
  10. fill.created_user_id,
  11. fill.created_user_name,
  12. fill.update_user_id,
  13. fill.update_user_name,
  14. fill.content,
  15. fill.status
  16. </sql>
  17. <sql id="Ref_Column_List">
  18. fill.task_id,
  19. fill.sb_id,
  20. fill.content,
  21. fill.status
  22. </sql>
  23. <sql id="List_Condition">
  24. <if test="id != null and id != ''">
  25. and fill.id = #{id}
  26. </if>
  27. <if test="taskId != null and taskId != ''">
  28. and fill.task_id = #{taskId}
  29. </if>
  30. <if test="sbId != null and sbId != ''">
  31. and fill.sb_id = #{sbId}
  32. </if>
  33. <if test="createdTimeStart != null">
  34. and fill.created_time <![CDATA[>=]]>; #{createdTimeStart}
  35. </if>
  36. <if test="createdTimeEnd != null">
  37. and fill.created_time <![CDATA[<=]]> #{createdTimeEnd}
  38. </if>
  39. <if test="createdTime != null">
  40. and fill.created_time = #{createdTime}
  41. </if>
  42. <if test="updateTimeStart != null">
  43. and fill.update_time <![CDATA[>=]]>; #{updateTimeStart}
  44. </if>
  45. <if test="updateTimeEnd != null">
  46. and fill.update_time <![CDATA[<=]]> #{updateTimeEnd}
  47. </if>
  48. <if test="updateTime != null">
  49. and fill.update_time = #{updateTime}
  50. </if>
  51. <if test="createdUserId != null and createdUserId != ''">
  52. and fill.created_user_id = #{createdUserId}
  53. </if>
  54. <if test="createdUserName != null and createdUserName != ''">
  55. and fill.created_user_name = #{createdUserName}
  56. </if>
  57. <if test="updateUserId != null and updateUserId != ''">
  58. and fill.update_user_id = #{updateUserId}
  59. </if>
  60. <if test="updateUserName != null and updateUserName != ''">
  61. and fill.update_user_name = #{updateUserName}
  62. </if>
  63. <if test="content != null">
  64. and fill.content = #{content}
  65. </if>
  66. <if test="status != null">
  67. and fill.status = #{status}
  68. </if>
  69. <if test="keyword != null and keyword != ''">
  70. and fill.id like concat(concat('%',#{keyword}),'%')
  71. </if>
  72. </sql>
  73. <select id="selectList" parameterType="com.platform.dao.dto.fill.FillGatherTaskDetailDTO"
  74. resultType="com.platform.dao.vo.query.fill.FillGatherTaskDetailVO">
  75. select fill.*
  76. from t_fill_gather_task_detail as fill
  77. <where>
  78. <include refid="List_Condition"/>
  79. </where>
  80. </select>
  81. <select id="selectVOByTaskId" parameterType="java.lang.String" resultType="com.platform.dao.vo.query.fill.FillGatherTaskDetailVO">
  82. select fill.*,sb.name as sbName,sp.name as positionName,sb.no as sbNo from t_fill_gather_task_detail as fill
  83. join t_sb_info sb on fill.sb_id = sb.id join t_sb_position sp on sb.position_id = sp.id
  84. where fill.task_id = #{taskId}
  85. </select>
  86. </mapper>