BdglWorkTaskPlanDetailMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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.supervision.workingArrangements.mapper.BdglWorkTaskPlanDetailMapper">
  6. <resultMap type="BdglWorkTaskPlanDetail" id="BdglWorkTaskPlanDetailResult">
  7. <result property="id" column="id" />
  8. <result property="unitId" column="unit_id" />
  9. <result property="peopleId" column="people_id" />
  10. <result property="taskDescription" column="task_description" />
  11. <result property="taskStatus" column="task_status" />
  12. <result property="taskPlanId" column="task_plan_id" />
  13. <result property="feedbackTime" column="feedback_time" />
  14. <result property="feedbackDescription" column="feedback_description" />
  15. <result property="rejectContent" column="reject_content" />
  16. <result property="createTime" column="create_time" />
  17. </resultMap>
  18. <sql id="selectBdglWorkTaskPlanDetailVo">
  19. select id, unit_id, people_id, task_description, task_status, task_plan_id, feedback_time, feedback_description,create_time,reject_content from bdgl_work_task_plan_detail
  20. </sql>
  21. <select id="selectBdglWorkTaskPlanDetailList" parameterType="BdglWorkTaskPlanDetail" resultMap="BdglWorkTaskPlanDetailResult">
  22. <include refid="selectBdglWorkTaskPlanDetailVo"/>
  23. <where>
  24. <if test="unitId != null "> and unit_id = #{unitId}</if>
  25. <if test="peopleId != null and peopleId != ''"> and people_id = #{peopleId}</if>
  26. <if test="taskDescription != null and taskDescription != ''"> and task_description = #{taskDescription}</if>
  27. <if test="taskStatus != null "> and task_status = #{taskStatus}</if>
  28. <if test="taskPlanId != null "> and task_plan_id = #{taskPlanId}</if>
  29. <if test="feedbackTime != null "> and feedback_time = #{feedbackTime}</if>
  30. <if test="feedbackDescription != null and feedbackDescription != ''"> and feedback_description = #{feedbackDescription}</if>
  31. </where>
  32. </select>
  33. <select id="selectBdglWorkTaskPlanDetailById" parameterType="Long" resultMap="BdglWorkTaskPlanDetailResult">
  34. <include refid="selectBdglWorkTaskPlanDetailVo"/>
  35. where id = #{id}
  36. </select>
  37. <select id="selectWorkTaskPlanDetailListByTaskPlanId" parameterType="Long" resultMap="BdglWorkTaskPlanDetailResult">
  38. <include refid="selectBdglWorkTaskPlanDetailVo"/>
  39. where task_plan_id = #{taskPlanId}
  40. </select>
  41. <select id="selectWorkTaskPlanDetailListByUserId" parameterType="Long" resultMap="BdglWorkTaskPlanDetailResult">
  42. <include refid="selectBdglWorkTaskPlanDetailVo"/>
  43. where people_id = #{peopleId}
  44. </select>
  45. <insert id="insertBdglWorkTaskPlanDetail" parameterType="BdglWorkTaskPlanDetail" useGeneratedKeys="true" keyProperty="id">
  46. insert into bdgl_work_task_plan_detail
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="unitId != null">unit_id,</if>
  49. <if test="peopleId != null and peopleId != ''">people_id,</if>
  50. <if test="taskDescription != null and taskDescription != ''">task_description,</if>
  51. <if test="taskStatus != null">task_status,</if>
  52. <if test="taskPlanId != null">task_plan_id,</if>
  53. <if test="feedbackTime != null">feedback_time,</if>
  54. <if test="feedbackDescription != null">feedback_description,</if>
  55. <if test="createTime != null">create_time,</if>
  56. </trim>
  57. <trim prefix="values (" suffix=")" suffixOverrides=",">
  58. <if test="unitId != null">#{unitId},</if>
  59. <if test="peopleId != null and peopleId != ''">#{peopleId},</if>
  60. <if test="taskDescription != null and taskDescription != ''">#{taskDescription},</if>
  61. <if test="taskStatus != null">#{taskStatus},</if>
  62. <if test="taskPlanId != null">#{taskPlanId},</if>
  63. <if test="feedbackTime != null">#{feedbackTime},</if>
  64. <if test="feedbackDescription != null">#{feedbackDescription},</if>
  65. <if test="createTime != null">#{createTime},</if>
  66. </trim>
  67. </insert>
  68. <update id="updateBdglWorkTaskPlanDetail" parameterType="BdglWorkTaskPlanDetail">
  69. update bdgl_work_task_plan_detail
  70. <trim prefix="SET" suffixOverrides=",">
  71. <if test="unitId != null">unit_id = #{unitId},</if>
  72. <if test="peopleId != null and peopleId != ''">people_id = #{peopleId},</if>
  73. <if test="taskDescription != null and taskDescription != ''">task_description = #{taskDescription},</if>
  74. <if test="taskStatus != null">task_status = #{taskStatus},</if>
  75. <if test="taskPlanId != null">task_plan_id = #{taskPlanId},</if>
  76. <if test="feedbackTime != null">feedback_time = #{feedbackTime},</if>
  77. <if test="feedbackDescription != null">feedback_description = #{feedbackDescription},</if>
  78. <if test="rejectContent != null">reject_content = #{rejectContent},</if>
  79. </trim>
  80. where id = #{id}
  81. </update>
  82. <delete id="deleteBdglWorkTaskPlanDetailById" parameterType="Long">
  83. delete from bdgl_work_task_plan_detail where id = #{id}
  84. </delete>
  85. <delete id="deleteBdglWorkTaskPlanDetailByIds" parameterType="String">
  86. delete from bdgl_work_task_plan_detail where id in
  87. <foreach item="id" collection="array" open="(" separator="," close=")">
  88. #{id}
  89. </foreach>
  90. </delete>
  91. <!--根据任务ID批量删除任务详情-->
  92. <delete id="deletePlanDetailByTaskPlanId" parameterType="Long">
  93. delete from bdgl_work_task_plan_detail where task_plan_id = #{taskPlanId}
  94. </delete>
  95. </mapper>