|
@@ -20,35 +20,51 @@
|
20
|
20
|
<result property="technicalUploadTime" column="technical_upload_time" />
|
21
|
21
|
<result property="techApprovalTime" column="tech_approval_time" />
|
22
|
22
|
<result property="manageApprovalTime" column="manage_approval_time" />
|
|
23
|
+ <association property="planUser" javaType="SysUser" resultMap="PlanUserResult" />
|
|
24
|
+ <association property="designUser" javaType="SysUser" resultMap="DesignUserResult" />
|
|
25
|
+ </resultMap>
|
|
26
|
+
|
|
27
|
+ <resultMap type="SysUser" id="PlanUserResult">
|
|
28
|
+ <result property="userId" column="user_id" />
|
|
29
|
+ <result property="nickName" column="plan_nick_name" />
|
|
30
|
+ </resultMap>
|
|
31
|
+
|
|
32
|
+ <resultMap type="SysUser" id="DesignUserResult">
|
|
33
|
+ <result property="userId" column="user_id" />
|
|
34
|
+ <result property="nickName" column="design_nick_name" />
|
23
|
35
|
</resultMap>
|
24
|
36
|
|
25
|
37
|
<sql id="selectCmcTechnicalVo">
|
26
|
|
- select technical_id, project_id, technical_director, technical_designer, technical_planner, plan_comment, quality_inspector, technical_time, technical_document, design_description, technical_comment, manage_comment, technical_upload_time, tech_approval_time, manage_approval_time from cmc_technical
|
|
38
|
+ 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,
|
|
39
|
+ 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,
|
|
40
|
+ t.tech_approval_time, t.manage_approval_time from cmc_technical as t
|
|
41
|
+ left join sys_user as u on u.user_id = t.technical_designer
|
|
42
|
+ left join sys_user as u1 on u1.user_id = t.technical_planner
|
27
|
43
|
</sql>
|
28
|
44
|
|
29
|
45
|
<select id="selectCmcTechnicalList" parameterType="CmcTechnical" resultMap="CmcTechnicalResult">
|
30
|
46
|
<include refid="selectCmcTechnicalVo"/>
|
31
|
47
|
<where>
|
32
|
|
- <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
|
33
|
|
- <if test="technicalDirector != null "> and technical_director = #{technicalDirector}</if>
|
34
|
|
- <if test="technicalDesigner != null "> and technical_designer = #{technicalDesigner}</if>
|
35
|
|
- <if test="technicalPlanner != null "> and technical_planner = #{technicalPlanner}</if>
|
36
|
|
- <if test="planComment != null and planComment != ''"> and plan_comment = #{planComment}</if>
|
37
|
|
- <if test="qualityInspector != null and qualityInspector != ''"> and quality_inspector = #{qualityInspector}</if>
|
38
|
|
- <if test="technicalTime != null "> and technical_time = #{technicalTime}</if>
|
39
|
|
- <if test="technicalDocument != null and technicalDocument != ''"> and technical_document = #{technicalDocument}</if>
|
40
|
|
- <if test="designDescription != null and designDescription != ''"> and design_description = #{designDescription}</if>
|
41
|
|
- <if test="technicalComment != null and technicalComment != ''"> and technical_comment = #{technicalComment}</if>
|
42
|
|
- <if test="manageComment != null and manageComment != ''"> and manage_comment = #{manageComment}</if>
|
43
|
|
- <if test="technicalUploadTime != null "> and technical_upload_time = #{technicalUploadTime}</if>
|
44
|
|
- <if test="techApprovalTime != null "> and tech_approval_time = #{techApprovalTime}</if>
|
45
|
|
- <if test="manageApprovalTime != null "> and manage_approval_time = #{manageApprovalTime}</if>
|
|
48
|
+ <if test="projectId != null and projectId != ''"> and t.project_id = #{projectId}</if>
|
|
49
|
+ <if test="technicalDirector != null "> and t.technical_director = #{technicalDirector}</if>
|
|
50
|
+ <if test="technicalDesigner != null "> and t.technical_designer = #{technicalDesigner}</if>
|
|
51
|
+ <if test="technicalPlanner != null "> and t.technical_planner = #{technicalPlanner}</if>
|
|
52
|
+ <if test="planComment != null and planComment != ''"> and t.plan_comment = #{planComment}</if>
|
|
53
|
+ <if test="qualityInspector != null and qualityInspector != ''"> and t.quality_inspector = #{qualityInspector}</if>
|
|
54
|
+ <if test="technicalTime != null "> and t.technical_time = #{technicalTime}</if>
|
|
55
|
+ <if test="technicalDocument != null and technicalDocument != ''"> and t.technical_document = #{technicalDocument}</if>
|
|
56
|
+ <if test="designDescription != null and designDescription != ''"> and t.design_description = #{designDescription}</if>
|
|
57
|
+ <if test="technicalComment != null and technicalComment != ''"> and t.technical_comment = #{technicalComment}</if>
|
|
58
|
+ <if test="manageComment != null and manageComment != ''"> and t.manage_comment = #{manageComment}</if>
|
|
59
|
+ <if test="technicalUploadTime != null "> and t.technical_upload_time = #{technicalUploadTime}</if>
|
|
60
|
+ <if test="techApprovalTime != null "> and t.tech_approval_time = #{techApprovalTime}</if>
|
|
61
|
+ <if test="manageApprovalTime != null "> and t.manage_approval_time = #{manageApprovalTime}</if>
|
46
|
62
|
</where>
|
47
|
63
|
</select>
|
48
|
64
|
|
49
|
65
|
<select id="selectCmcTechnicalByTechnicalId" parameterType="String" resultMap="CmcTechnicalResult">
|
50
|
66
|
<include refid="selectCmcTechnicalVo"/>
|
51
|
|
- where technical_id = #{technicalId}
|
|
67
|
+ where t.technical_id = #{technicalId}
|
52
|
68
|
</select>
|
53
|
69
|
|
54
|
70
|
<insert id="insertCmcTechnical" parameterType="CmcTechnical">
|