综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CmcProjectProgressMapper.xml 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. </select>
  29. <insert id="insertCmcProjectProgress" parameterType="CmcProjectProgress">
  30. insert into cmc_project_progress
  31. <trim prefix="(" suffix=")" suffixOverrides=",">
  32. <if test="progressId != null">progress_id,</if>
  33. <if test="projectId != null">project_id,</if>
  34. <if test="percentage != null">percentage,</if>
  35. <if test="date != null">date,</if>
  36. <if test="situation != null">situation,</if>
  37. </trim>
  38. <trim prefix="values (" suffix=")" suffixOverrides=",">
  39. <if test="progressId != null">#{progressId},</if>
  40. <if test="projectId != null">#{projectId},</if>
  41. <if test="percentage != null">#{percentage},</if>
  42. <if test="date != null">#{date},</if>
  43. <if test="situation != null">#{situation},</if>
  44. </trim>
  45. </insert>
  46. <update id="updateCmcProjectProgress" parameterType="CmcProjectProgress">
  47. update cmc_project_progress
  48. <trim prefix="SET" suffixOverrides=",">
  49. <if test="projectId != null">project_id = #{projectId},</if>
  50. <if test="percentage != null">percentage = #{percentage},</if>
  51. <if test="date != null">date = #{date},</if>
  52. <if test="situation != null">situation = #{situation},</if>
  53. </trim>
  54. where progress_id = #{progressId}
  55. </update>
  56. <delete id="deleteCmcProjectProgressByProjectId" parameterType="String">
  57. delete from cmc_project_progress where project_id = #{projectId}
  58. </delete>
  59. <delete id="deleteCmcProjectProgressByProjectIds" parameterType="String">
  60. delete from cmc_project_progress where project_id in
  61. <foreach item="projectId" collection="array" open="(" separator="," close=")">
  62. #{projectId}
  63. </foreach>
  64. </delete>
  65. </mapper>