综合办公系统
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

CmcTechnicalMapper.xml 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.CmcTechnicalMapper">
  6. <resultMap type="CmcTechnical" id="CmcTechnicalResult">
  7. <result property="technicalId" column="technical_id" />
  8. <result property="projectId" column="project_id" />
  9. <result property="technicalDirector" column="technical_director" />
  10. <result property="technicalDesigner" column="technical_designer" />
  11. <result property="technicalPlanner" column="technical_planner" />
  12. <result property="planComment" column="plan_comment" />
  13. <result property="qualityInspector" column="quality_inspector" />
  14. <result property="technicalTime" column="technical_time" />
  15. <result property="technicalDocument" column="technical_document" />
  16. <result property="designDescription" column="design_description" />
  17. <result property="technicalComment" column="technical_comment" />
  18. <result property="manageComment" column="manage_comment" />
  19. <result property="technicalUploadTime" column="technical_upload_time" />
  20. <result property="techApprovalTime" column="tech_approval_time" />
  21. <result property="manageApprovalTime" column="manage_approval_time" />
  22. <association property="planUser" javaType="SysUser" resultMap="PlanUserResult" />
  23. <association property="designUser" javaType="SysUser" resultMap="DesignUserResult" />
  24. </resultMap>
  25. <resultMap type="SysUser" id="PlanUserResult">
  26. <result property="userId" column="user_id" />
  27. <result property="nickName" column="plan_nick_name" />
  28. </resultMap>
  29. <resultMap type="SysUser" id="DesignUserResult">
  30. <result property="userId" column="user_id" />
  31. <result property="nickName" column="design_nick_name" />
  32. </resultMap>
  33. <sql id="selectCmcTechnicalVo">
  34. select t.technical_id, t.project_id, t.technical_director, t.technical_designer, u.nick_name as design_nick_name, t.technical_planner, u1.nick_name as plan_nick_name,
  35. t.plan_comment, t.quality_inspector, t.technical_time, t.technical_document, t.design_description, t.technical_comment, t.manage_comment, t.technical_upload_time,
  36. t.tech_approval_time, t.manage_approval_time from cmc_technical as t
  37. left join sys_user as u on u.user_id = t.technical_designer
  38. left join sys_user as u1 on u1.user_id = t.technical_planner
  39. </sql>
  40. <select id="selectCmcTechnicalList" parameterType="CmcTechnical" resultMap="CmcTechnicalResult">
  41. <include refid="selectCmcTechnicalVo"/>
  42. <where>
  43. <if test="projectId != null and projectId != ''"> and t.project_id = #{projectId}</if>
  44. <if test="technicalDirector != null "> and t.technical_director = #{technicalDirector}</if>
  45. <if test="technicalDesigner != null "> and t.technical_designer = #{technicalDesigner}</if>
  46. <if test="technicalPlanner != null "> and t.technical_planner = #{technicalPlanner}</if>
  47. <if test="planComment != null and planComment != ''"> and t.plan_comment = #{planComment}</if>
  48. <if test="qualityInspector != null and qualityInspector != ''"> and t.quality_inspector = #{qualityInspector}</if>
  49. <if test="technicalTime != null "> and t.technical_time = #{technicalTime}</if>
  50. <if test="technicalDocument != null and technicalDocument != ''"> and t.technical_document = #{technicalDocument}</if>
  51. <if test="designDescription != null and designDescription != ''"> and t.design_description = #{designDescription}</if>
  52. <if test="technicalComment != null and technicalComment != ''"> and t.technical_comment = #{technicalComment}</if>
  53. <if test="manageComment != null and manageComment != ''"> and t.manage_comment = #{manageComment}</if>
  54. <if test="technicalUploadTime != null "> and t.technical_upload_time = #{technicalUploadTime}</if>
  55. <if test="techApprovalTime != null "> and t.tech_approval_time = #{techApprovalTime}</if>
  56. <if test="manageApprovalTime != null "> and t.manage_approval_time = #{manageApprovalTime}</if>
  57. </where>
  58. </select>
  59. <select id="selectCmcTechnicalByTechnicalId" parameterType="String" resultMap="CmcTechnicalResult">
  60. <include refid="selectCmcTechnicalVo"/>
  61. where t.technical_id = #{technicalId}
  62. </select>
  63. <insert id="insertCmcTechnical" parameterType="CmcTechnical">
  64. insert into cmc_technical
  65. <trim prefix="(" suffix=")" suffixOverrides=",">
  66. <if test="technicalId != null">technical_id,</if>
  67. <if test="projectId != null">project_id,</if>
  68. <if test="technicalDirector != null">technical_director,</if>
  69. <if test="technicalDesigner != null">technical_designer,</if>
  70. <if test="technicalPlanner != null">technical_planner,</if>
  71. <if test="planComment != null">plan_comment,</if>
  72. <if test="qualityInspector != null">quality_inspector,</if>
  73. <if test="technicalTime != null">technical_time,</if>
  74. <if test="technicalDocument != null">technical_document,</if>
  75. <if test="designDescription != null">design_description,</if>
  76. <if test="technicalComment != null">technical_comment,</if>
  77. <if test="manageComment != null">manage_comment,</if>
  78. <if test="technicalUploadTime != null">technical_upload_time,</if>
  79. <if test="techApprovalTime != null">tech_approval_time,</if>
  80. <if test="manageApprovalTime != null">manage_approval_time,</if>
  81. </trim>
  82. <trim prefix="values (" suffix=")" suffixOverrides=",">
  83. <if test="technicalId != null">#{technicalId},</if>
  84. <if test="projectId != null">#{projectId},</if>
  85. <if test="technicalDirector != null">#{technicalDirector},</if>
  86. <if test="technicalDesigner != null">#{technicalDesigner},</if>
  87. <if test="technicalPlanner != null">#{technicalPlanner},</if>
  88. <if test="planComment != null">#{planComment},</if>
  89. <if test="qualityInspector != null">#{qualityInspector},</if>
  90. <if test="technicalTime != null">#{technicalTime},</if>
  91. <if test="technicalDocument != null">#{technicalDocument},</if>
  92. <if test="designDescription != null">#{designDescription},</if>
  93. <if test="technicalComment != null">#{technicalComment},</if>
  94. <if test="manageComment != null">#{manageComment},</if>
  95. <if test="technicalUploadTime != null">#{technicalUploadTime},</if>
  96. <if test="techApprovalTime != null">#{techApprovalTime},</if>
  97. <if test="manageApprovalTime != null">#{manageApprovalTime},</if>
  98. </trim>
  99. </insert>
  100. <update id="updateCmcTechnical" parameterType="CmcTechnical">
  101. update cmc_technical
  102. <trim prefix="SET" suffixOverrides=",">
  103. <if test="projectId != null">project_id = #{projectId},</if>
  104. <if test="technicalDirector != null">technical_director = #{technicalDirector},</if>
  105. <if test="technicalDesigner != null">technical_designer = #{technicalDesigner},</if>
  106. <if test="technicalPlanner != null">technical_planner = #{technicalPlanner},</if>
  107. <if test="planComment != null">plan_comment = #{planComment},</if>
  108. <if test="qualityInspector != null">quality_inspector = #{qualityInspector},</if>
  109. <if test="technicalTime != null">technical_time = #{technicalTime},</if>
  110. <if test="technicalDocument != null">technical_document = #{technicalDocument},</if>
  111. <if test="designDescription != null">design_description = #{designDescription},</if>
  112. <if test="technicalComment != null">technical_comment = #{technicalComment},</if>
  113. <if test="manageComment != null">manage_comment = #{manageComment},</if>
  114. <if test="technicalUploadTime != null">technical_upload_time = #{technicalUploadTime},</if>
  115. <if test="techApprovalTime != null">tech_approval_time = #{techApprovalTime},</if>
  116. <if test="manageApprovalTime != null">manage_approval_time = #{manageApprovalTime},</if>
  117. </trim>
  118. where technical_id = #{technicalId}
  119. </update>
  120. <delete id="deleteCmcTechnicalByTechnicalId" parameterType="String">
  121. delete from cmc_technical where technical_id = #{technicalId}
  122. </delete>
  123. <delete id="deleteCmcTechnicalByTechnicalIds" parameterType="String">
  124. delete from cmc_technical where technical_id in
  125. <foreach item="technicalId" collection="array" open="(" separator="," close=")">
  126. #{technicalId}
  127. </foreach>
  128. </delete>
  129. </mapper>