综合办公系统
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

CmcProjectMapper.xml 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.CmcProjectMapper">
  6. <resultMap type="CmcProject" id="CmcProjectResult">
  7. <result property="projectId" column="project_id" />
  8. <result property="projectNumber" column="project_number" />
  9. <result property="projectName" column="project_name" />
  10. <result property="projectLeader" column="project_leader" />
  11. <result property="isFinished" column="is_finished" />
  12. <result property="projectSource" column="project_source" />
  13. <result property="partyA" column="party_a" />
  14. <result property="contactPerson" column="contact_person" />
  15. <result property="telephone" column="telephone" />
  16. <result property="contractId" column="contract_id" />
  17. <result property="projectType" column="project_type" />
  18. <result property="projectLevel" column="project_level" />
  19. <result property="projectRegistrant" column="project_registrant" />
  20. <result property="undertakingDept" column="undertaking_dept" />
  21. <result property="projectPlanner" column="project_planner" />
  22. <result property="siteLeader" column="site_leader" />
  23. <result property="createTime" column="create_time" />
  24. <result property="planTime" column="plan_time" />
  25. <result property="entryTime" column="entry_time" />
  26. <result property="exitTime" column="exit_time" />
  27. <result property="remark" column="remark" />
  28. <result property="budgetId" column="budget_id" />
  29. <result property="technicalId" column="technical_id" />
  30. </resultMap>
  31. <sql id="selectCmcProjectVo">
  32. select project_id, project_number, project_name, project_leader, is_finished, project_source, party_a, contact_person, telephone, contract_id, project_type, project_level, project_registrant, undertaking_dept, project_planner, site_leader, create_time, plan_time, entry_time, exit_time, remark, budget_id, technical_id from cmc_project
  33. </sql>
  34. <select id="selectCmcProjectList" parameterType="CmcProject" resultMap="CmcProjectResult">
  35. <include refid="selectCmcProjectVo"/>
  36. <where>
  37. <if test="projectNumber != null and projectNumber != ''"> and project_number = #{projectNumber}</if>
  38. <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
  39. <if test="projectLeader != null "> and project_leader = #{projectLeader}</if>
  40. <if test="isFinished != null and isFinished != ''"> and is_finished = #{isFinished}</if>
  41. <if test="projectSource != null and projectSource != ''"> and project_source = #{projectSource}</if>
  42. <if test="partyA != null and partyA != ''"> and party_a = #{partyA}</if>
  43. <if test="contactPerson != null and contactPerson != ''"> and contact_person = #{contactPerson}</if>
  44. <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
  45. <if test="contractId != null and contractId != ''"> and contract_id = #{contractId}</if>
  46. <if test="projectType != null and projectType != ''"> and project_type = #{projectType}</if>
  47. <if test="projectLevel != null and projectLevel != ''"> and project_level = #{projectLevel}</if>
  48. <if test="projectRegistrant != null "> and project_registrant = #{projectRegistrant}</if>
  49. <if test="undertakingDept != null and undertakingDept != ''"> and undertaking_dept = #{undertakingDept}</if>
  50. <if test="projectPlanner != null "> and project_planner = #{projectPlanner}</if>
  51. <if test="siteLeader != null "> and site_leader = #{siteLeader}</if>
  52. <if test="planTime != null "> and plan_time = #{planTime}</if>
  53. <if test="entryTime != null "> and entry_time = #{entryTime}</if>
  54. <if test="exitTime != null "> and exit_time = #{exitTime}</if>
  55. <if test="budgetId != null and budgetId != ''"> and budget_id = #{budgetId}</if>
  56. <if test="technicalId != null and technicalId != ''"> and technical_id = #{technicalId}</if>
  57. </where>
  58. </select>
  59. <select id="selectCmcProjectByProjectId" parameterType="String" resultMap="CmcProjectResult">
  60. <include refid="selectCmcProjectVo"/>
  61. where project_id = #{projectId}
  62. </select>
  63. <insert id="insertCmcProject" parameterType="CmcProject">
  64. insert into cmc_project
  65. <trim prefix="(" suffix=")" suffixOverrides=",">
  66. <if test="projectId != null">project_id,</if>
  67. <if test="projectNumber != null">project_number,</if>
  68. <if test="projectName != null">project_name,</if>
  69. <if test="projectLeader != null">project_leader,</if>
  70. <if test="isFinished != null">is_finished,</if>
  71. <if test="projectSource != null">project_source,</if>
  72. <if test="partyA != null">party_a,</if>
  73. <if test="contactPerson != null">contact_person,</if>
  74. <if test="telephone != null">telephone,</if>
  75. <if test="contractId != null">contract_id,</if>
  76. <if test="projectType != null">project_type,</if>
  77. <if test="projectLevel != null">project_level,</if>
  78. <if test="projectRegistrant != null">project_registrant,</if>
  79. <if test="undertakingDept != null">undertaking_dept,</if>
  80. <if test="projectPlanner != null">project_planner,</if>
  81. <if test="siteLeader != null">site_leader,</if>
  82. <if test="createTime != null">create_time,</if>
  83. <if test="planTime != null">plan_time,</if>
  84. <if test="entryTime != null">entry_time,</if>
  85. <if test="exitTime != null">exit_time,</if>
  86. <if test="remark != null">remark,</if>
  87. <if test="budgetId != null">budget_id,</if>
  88. <if test="technicalId != null">technical_id,</if>
  89. </trim>
  90. <trim prefix="values (" suffix=")" suffixOverrides=",">
  91. <if test="projectId != null">#{projectId},</if>
  92. <if test="projectNumber != null">#{projectNumber},</if>
  93. <if test="projectName != null">#{projectName},</if>
  94. <if test="projectLeader != null">#{projectLeader},</if>
  95. <if test="isFinished != null">#{isFinished},</if>
  96. <if test="projectSource != null">#{projectSource},</if>
  97. <if test="partyA != null">#{partyA},</if>
  98. <if test="contactPerson != null">#{contactPerson},</if>
  99. <if test="telephone != null">#{telephone},</if>
  100. <if test="contractId != null">#{contractId},</if>
  101. <if test="projectType != null">#{projectType},</if>
  102. <if test="projectLevel != null">#{projectLevel},</if>
  103. <if test="projectRegistrant != null">#{projectRegistrant},</if>
  104. <if test="undertakingDept != null">#{undertakingDept},</if>
  105. <if test="projectPlanner != null">#{projectPlanner},</if>
  106. <if test="siteLeader != null">#{siteLeader},</if>
  107. <if test="createTime != null">#{createTime},</if>
  108. <if test="planTime != null">#{planTime},</if>
  109. <if test="entryTime != null">#{entryTime},</if>
  110. <if test="exitTime != null">#{exitTime},</if>
  111. <if test="remark != null">#{remark},</if>
  112. <if test="budgetId != null">#{budgetId},</if>
  113. <if test="technicalId != null">#{technicalId},</if>
  114. </trim>
  115. </insert>
  116. <update id="updateCmcProject" parameterType="CmcProject">
  117. update cmc_project
  118. <trim prefix="SET" suffixOverrides=",">
  119. <if test="projectNumber != null">project_number = #{projectNumber},</if>
  120. <if test="projectName != null">project_name = #{projectName},</if>
  121. <if test="projectLeader != null">project_leader = #{projectLeader},</if>
  122. <if test="isFinished != null">is_finished = #{isFinished},</if>
  123. <if test="projectSource != null">project_source = #{projectSource},</if>
  124. <if test="partyA != null">party_a = #{partyA},</if>
  125. <if test="contactPerson != null">contact_person = #{contactPerson},</if>
  126. <if test="telephone != null">telephone = #{telephone},</if>
  127. <if test="contractId != null">contract_id = #{contractId},</if>
  128. <if test="projectType != null">project_type = #{projectType},</if>
  129. <if test="projectLevel != null">project_level = #{projectLevel},</if>
  130. <if test="projectRegistrant != null">project_registrant = #{projectRegistrant},</if>
  131. <if test="undertakingDept != null">undertaking_dept = #{undertakingDept},</if>
  132. <if test="projectPlanner != null">project_planner = #{projectPlanner},</if>
  133. <if test="siteLeader != null">site_leader = #{siteLeader},</if>
  134. <if test="createTime != null">create_time = #{createTime},</if>
  135. <if test="planTime != null">plan_time = #{planTime},</if>
  136. <if test="entryTime != null">entry_time = #{entryTime},</if>
  137. <if test="exitTime != null">exit_time = #{exitTime},</if>
  138. <if test="remark != null">remark = #{remark},</if>
  139. <if test="budgetId != null">budget_id = #{budgetId},</if>
  140. <if test="technicalId != null">technical_id = #{technicalId},</if>
  141. </trim>
  142. where project_id = #{projectId}
  143. </update>
  144. <delete id="deleteCmcProjectByProjectId" parameterType="String">
  145. delete from cmc_project where project_id = #{projectId}
  146. </delete>
  147. <delete id="deleteCmcProjectByProjectIds" parameterType="String">
  148. delete from cmc_project where project_id in
  149. <foreach item="projectId" collection="array" open="(" separator="," close=")">
  150. #{projectId}
  151. </foreach>
  152. </delete>
  153. </mapper>