Przeglądaj źródła

技术交底流程

lamphua 1 rok temu
rodzic
commit
bf4cfdeb24

+ 10
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcTechnicalController.java Wyświetl plik

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.util.Date;
3
 import java.util.List;
4
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
5
 import javax.servlet.http.HttpServletResponse;
5
 import org.springframework.beans.factory.annotation.Autowired;
6
 import org.springframework.beans.factory.annotation.Autowired;
82
     @PutMapping
83
     @PutMapping
83
     public AjaxResult edit(@RequestBody CmcTechnical cmcTechnical)
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
         return toAjax(cmcTechnicalService.updateCmcTechnical(cmcTechnical));
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 Wyświetl plik

2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
 import com.fasterxml.jackson.annotation.JsonFormat;
4
 import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5
 import org.apache.commons.lang3.builder.ToStringBuilder;
6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6
 import org.apache.commons.lang3.builder.ToStringStyle;
7
 import org.apache.commons.lang3.builder.ToStringStyle;
7
 import com.ruoyi.common.annotation.Excel;
8
 import com.ruoyi.common.annotation.Excel;
36
     @Excel(name = "技术安排人")
37
     @Excel(name = "技术安排人")
37
     private Long technicalPlanner;
38
     private Long technicalPlanner;
38
 
39
 
40
+    private SysUser planUser;
41
+
42
+    private SysUser designUser;
43
+
44
+    private SysUser managerUser;
45
+
39
     /** 技术安排意见 */
46
     /** 技术安排意见 */
40
     @Excel(name = "技术安排意见")
47
     @Excel(name = "技术安排意见")
41
     private String planComment;
48
     private String planComment;
125
     {
132
     {
126
         return technicalPlanner;
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
     public void setPlanComment(String planComment)
153
     public void setPlanComment(String planComment)
129
     {
154
     {
130
         this.planComment = planComment;
155
         this.planComment = planComment;

+ 32
- 16
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTechnicalMapper.xml Wyświetl plik

20
         <result property="technicalUploadTime"    column="technical_upload_time"    />
20
         <result property="technicalUploadTime"    column="technical_upload_time"    />
21
         <result property="techApprovalTime"    column="tech_approval_time"    />
21
         <result property="techApprovalTime"    column="tech_approval_time"    />
22
         <result property="manageApprovalTime"    column="manage_approval_time"    />
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
     </resultMap>
35
     </resultMap>
24
 
36
 
25
     <sql id="selectCmcTechnicalVo">
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
     </sql>
43
     </sql>
28
 
44
 
29
     <select id="selectCmcTechnicalList" parameterType="CmcTechnical" resultMap="CmcTechnicalResult">
45
     <select id="selectCmcTechnicalList" parameterType="CmcTechnical" resultMap="CmcTechnicalResult">
30
         <include refid="selectCmcTechnicalVo"/>
46
         <include refid="selectCmcTechnicalVo"/>
31
         <where>
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
         </where>
62
         </where>
47
     </select>
63
     </select>
48
 
64
 
49
     <select id="selectCmcTechnicalByTechnicalId" parameterType="String" resultMap="CmcTechnicalResult">
65
     <select id="selectCmcTechnicalByTechnicalId" parameterType="String" resultMap="CmcTechnicalResult">
50
         <include refid="selectCmcTechnicalVo"/>
66
         <include refid="selectCmcTechnicalVo"/>
51
-        where technical_id = #{technicalId}
67
+        where t.technical_id = #{technicalId}
52
     </select>
68
     </select>
53
 
69
 
54
     <insert id="insertCmcTechnical" parameterType="CmcTechnical">
70
     <insert id="insertCmcTechnical" parameterType="CmcTechnical">

+ 11
- 6
oa-ui/src/views/flowable/form/technicalForm.vue Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz