Browse Source

技术交底流程

lamphua 1 year ago
parent
commit
bf4cfdeb24

+ 10
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcTechnicalController.java View File

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.controller.oa;
2 2
 
3
+import java.util.Date;
3 4
 import java.util.List;
4 5
 import javax.servlet.http.HttpServletResponse;
5 6
 import org.springframework.beans.factory.annotation.Autowired;
@@ -82,6 +83,15 @@ public class CmcTechnicalController extends BaseController
82 83
     @PutMapping
83 84
     public AjaxResult edit(@RequestBody CmcTechnical cmcTechnical)
84 85
     {
86
+        if (cmcTechnical.getDesignDescription() != null) {
87
+            cmcTechnical.setTechnicalUploadTime(new Date());
88
+        }
89
+        if (cmcTechnical.getTechnicalComment() != null) {
90
+            cmcTechnical.setTechApprovalTime(new Date());
91
+        }
92
+        if (cmcTechnical.getManageComment() != null) {
93
+            cmcTechnical.setManageApprovalTime(new Date());
94
+        }
85 95
         return toAjax(cmcTechnicalService.updateCmcTechnical(cmcTechnical));
86 96
     }
87 97
 

+ 25
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTechnical.java View File

@@ -2,6 +2,7 @@ package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.util.Date;
4 4
 import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6 7
 import org.apache.commons.lang3.builder.ToStringStyle;
7 8
 import com.ruoyi.common.annotation.Excel;
@@ -36,6 +37,12 @@ public class CmcTechnical extends BaseEntity
36 37
     @Excel(name = "技术安排人")
37 38
     private Long technicalPlanner;
38 39
 
40
+    private SysUser planUser;
41
+
42
+    private SysUser designUser;
43
+
44
+    private SysUser managerUser;
45
+
39 46
     /** 技术安排意见 */
40 47
     @Excel(name = "技术安排意见")
41 48
     private String planComment;
@@ -125,6 +132,24 @@ public class CmcTechnical extends BaseEntity
125 132
     {
126 133
         return technicalPlanner;
127 134
     }
135
+    public void setPlanUser(SysUser planUser)
136
+    {
137
+        this.planUser = planUser;
138
+    }
139
+
140
+    public SysUser getPlanUser()
141
+    {
142
+        return planUser;
143
+    }
144
+    public void setDesignUser(SysUser designUser)
145
+    {
146
+        this.designUser = designUser;
147
+    }
148
+
149
+    public SysUser getDesignUser()
150
+    {
151
+        return designUser;
152
+    }
128 153
     public void setPlanComment(String planComment)
129 154
     {
130 155
         this.planComment = planComment;

+ 32
- 16
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTechnicalMapper.xml View File

@@ -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">

+ 11
- 6
oa-ui/src/views/flowable/form/technicalForm.vue View File

@@ -53,7 +53,7 @@
53 53
             </el-col>
54 54
           </el-row>
55 55
           <el-form-item label="技术安排意见" prop="planComment">
56
-            <el-input type="textarea" v-model="form.planComment" placeholder="请输入技术安排意见" />
56
+            <el-input type="textarea" v-model="form.planComment" placeholder="请输入技术安排意见" :disabled="taskName != '技术安排'" />
57 57
           </el-form-item>
58 58
           <el-row>
59 59
             <el-col :span="6" :xs="24" :offset="12">
@@ -64,7 +64,7 @@
64 64
             <el-col :span="6">
65 65
               <el-form-item label="日期" prop="technicalTime" v-if="showFormItem('技术安排')">
66 66
                 <el-date-picker style="width:170px;" clearable v-model="form.technicalTime" type="date"
67
-                  value-format="yyyy-MM-dd" placeholder="请选择技术安排时间">
67
+                  value-format="yyyy-MM-dd" placeholder="请选择技术安排时间" :disabled="taskName != '技术安排'">
68 68
                 </el-date-picker>
69 69
               </el-form-item>
70 70
             </el-col>
@@ -117,7 +117,7 @@
117 117
           <el-row>
118 118
             <el-col :span="6" :xs="24" :offset="12">
119 119
               <el-form-item label="签名" prop="manager" v-if="showFormItem('总工审核')">
120
-                <span class="auditor"> {{ form.managerUser ? form.managerUser.nickName : managerUser }} </span>
120
+                <span class="auditor"> {{ managerUser }} </span>
121 121
               </el-form-item>
122 122
             </el-col>
123 123
             <el-col :span="6">
@@ -153,7 +153,7 @@ import { listUser } from '@/api/system/user';
153 153
 import flow from '@/views/flowable/task/todo/detail/flow';
154 154
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
155 155
 import { flowXmlAndNode } from "@/api/flowable/definition";
156
-import { getUsersDeptLeaderByDept } from '@/api/system/post'
156
+import { getUsersManageLeaderByDept } from '@/api/system/post'
157 157
 
158 158
 export default {
159 159
   components: {
@@ -257,7 +257,7 @@ export default {
257 257
         }
258 258
         else {
259 259
           this.formTotal = 1;
260
-          this.form = res.data;
260
+          let data = res.data;
261 261
           if (res.data.qualityInspector == null || res.data.qualityInspector == undefined || res.data.qualityInspector == "") {
262 262
             data.qualityInspector = []
263 263
           } else {
@@ -268,6 +268,8 @@ export default {
268 268
             }
269 269
             data.qualityInspector = arr
270 270
           }
271
+          this.form = data;
272
+          console.log(this.form);
271 273
         }
272 274
       })
273 275
     },
@@ -364,6 +366,8 @@ export default {
364 366
       this.$refs["form"].validate(valid => {
365 367
         if (valid) {
366 368
           if (this.formTotal != 0) {
369
+            this.form.qualityInspector = this.form.qualityInspector.join(',');
370
+            console.log(this.form);
367 371
             updateTechnical(this.form).then(response => {
368 372
               this.$modal.msgSuccess("修改成功");
369 373
               this.open = false;
@@ -379,7 +383,7 @@ export default {
379 383
                 });
380 384
               }
381 385
               else if (this.taskName == '技术审核') {
382
-                getUsersDeptLeaderByDept({ deptId: 110 }).then(res => {
386
+                getUsersManageLeaderByDept({ deptId: 110 }).then(res => {
383 387
                   let userId = res.data.userId;
384 388
                   this.$set(this.taskForm.variables, "approval", userId);
385 389
                   complete(this.taskForm).then(response => {
@@ -397,6 +401,7 @@ export default {
397 401
             })
398 402
           } else {
399 403
             this.form.qualityInspector = '';
404
+            this.form.technicalId = this.taskForm.formId;
400 405
             addTechnical(this.form).then(response => {
401 406
               this.$modal.msgSuccess("新增成功");
402 407
               this.open = false;

Loading…
Cancel
Save