综合办公系统
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

CmcProjectProgressMapper.xml 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.oa.mapper.CmcProjectProgressMapper">
  6. <resultMap type="CmcProjectProgress" id="CmcProjectProgressResult">
  7. <result property="progressId" column="progress_id" />
  8. <result property="projectId" column="project_id" />
  9. <result property="percentage" column="percentage" />
  10. <result property="date" column="date" />
  11. <result property="situation" column="situation" />
  12. </resultMap>
  13. <sql id="selectCmcProjectProgressVo">
  14. select progress_id, project_id, percentage, date, situation from cmc_project_progress
  15. </sql>
  16. <select id="selectCmcProjectProgressList" parameterType="CmcProjectProgress" resultMap="CmcProjectProgressResult">
  17. <include refid="selectCmcProjectProgressVo"/>
  18. <where>
  19. <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
  20. <if test="percentage != null and percentage != ''"> and percentage = #{percentage}</if>
  21. <if test="date != null "> and date = #{date}</if>
  22. <if test="situation != null and situation != ''"> and situation = #{situation}</if>
  23. </where>
  24. </select>
  25. <select id="selectCmcProjectProgressByProjectId" parameterType="String" resultMap="CmcProjectProgressResult">
  26. <include refid="selectCmcProjectProgressVo"/>
  27. where project_id = #{projectId}
  28. order by date asc
  29. </select>
  30. <insert id="insertCmcProjectProgress" parameterType="CmcProjectProgress">
  31. insert into cmc_project_progress
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="progressId != null">progress_id,</if>
  34. <if test="projectId != null">project_id,</if>
  35. <if test="percentage != null">percentage,</if>
  36. <if test="date != null">date,</if>
  37. <if test="situation != null">situation,</if>
  38. </trim>
  39. <trim prefix="values (" suffix=")" suffixOverrides=",">
  40. <if test="progressId != null">#{progressId},</if>
  41. <if test="projectId != null">#{projectId},</if>
  42. <if test="percentage != null">#{percentage},</if>
  43. <if test="date != null">#{date},</if>
  44. <if test="situation != null">#{situation},</if>
  45. </trim>
  46. </insert>
  47. <update id="updateCmcProjectProgress" parameterType="CmcProjectProgress">
  48. update cmc_project_progress
  49. <trim prefix="SET" suffixOverrides=",">
  50. <if test="projectId != null">project_id = #{projectId},</if>
  51. <if test="percentage != null">percentage = #{percentage},</if>
  52. <if test="date != null">date = #{date},</if>
  53. <if test="situation != null">situation = #{situation},</if>
  54. </trim>
  55. where progress_id = #{progressId}
  56. </update>
  57. <delete id="deleteCmcProjectProgressByProjectId" parameterType="String">
  58. delete from cmc_project_progress where project_id = #{projectId}
  59. </delete>
  60. <delete id="deleteCmcProjectProgressByProjectIds" parameterType="String">
  61. delete from cmc_project_progress where project_id in
  62. <foreach item="projectId" collection="array" open="(" separator="," close=")">
  63. #{projectId}
  64. </foreach>
  65. </delete>
  66. </mapper>