浏览代码

用车审批添加审批人,日期

lamphua 1年前
父节点
当前提交
f2ac529e79

+ 9
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java 查看文件

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.web.controller.oa;
2 2
 
3 3
 import java.math.BigDecimal;
4
+import java.util.Date;
4 5
 import java.util.List;
5 6
 import javax.servlet.http.HttpServletResponse;
6 7
 
@@ -100,22 +101,27 @@ public class CmcCarApprovalController extends BaseController
100 101
         if (formDataJson.getString("deptComment") != null && formDataJson.getString("managerComment") == null) {
101 102
             cmcCarApproval.setDeptUserId(getLoginUser().getUserId());
102 103
             cmcCarApproval.setDeptComment(formDataJson.getString("deptComment"));
104
+            cmcCarApproval.setDeptTime(new Date());
103 105
         }
104
-        if (formDataJson.getString("managerComment") != null) {
106
+        if (formDataJson.getString("managerComment") != null && formDataJson.getString("dispatchComment") == null) {
105 107
             cmcCarApproval.setManagerUserId(getLoginUser().getUserId());
106 108
             cmcCarApproval.setManagerComment(formDataJson.getString("managerComment"));
109
+            cmcCarApproval.setManagerTime(new Date());
107 110
         }
108
-        if (formDataJson.getString("gmComment") != null) {
111
+        if (formDataJson.getString("gmComment") != null && formDataJson.getString("dispatchComment") == null) {
109 112
             cmcCarApproval.setGmUserId(getLoginUser().getUserId());
110 113
             cmcCarApproval.setGmComment(formDataJson.getString("gmComment"));
114
+            cmcCarApproval.setGmTime(new Date());
111 115
         }
112
-        if (formDataJson.getString("unionComment") != null) {
116
+        if (formDataJson.getString("unionComment") != null && formDataJson.getString("dispatchComment") == null) {
113 117
             cmcCarApproval.setUnionUserId(getLoginUser().getUserId());
114 118
             cmcCarApproval.setUnionComment(formDataJson.getString("unionComment"));
119
+            cmcCarApproval.setUnionTime(new Date());
115 120
         }
116 121
         if (formDataJson.getString("dispatchComment") != null) {
117 122
             cmcCarApproval.setDispatcher(getLoginUser().getUserId());
118 123
             cmcCarApproval.setDispatchComment(formDataJson.getString("dispatchComment"));
124
+            cmcCarApproval.setDispatchTime(new Date());
119 125
         }
120 126
         if (formDataJson.getJSONArray("cars").size() > 0 && formDataJson.getJSONArray("drivers").size() > 0) {
121 127
             cmcCarApproval.setDispatcher(getLoginUser().getUserId());

+ 22
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectCommentController.java 查看文件

@@ -1,7 +1,9 @@
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;
6
+import com.ruoyi.system.service.ISysUserService;
5 7
 import org.springframework.beans.factory.annotation.Autowired;
6 8
 import org.springframework.web.bind.annotation.GetMapping;
7 9
 import org.springframework.web.bind.annotation.PostMapping;
@@ -33,6 +35,9 @@ public class CmcProjectCommentController extends BaseController
33 35
     @Autowired
34 36
     private ICmcProjectCommentService cmcProjectCommentService;
35 37
 
38
+    @Autowired
39
+    private ISysUserService userService;
40
+
36 41
     /**
37 42
      * 查询cmc项目审批列表
38 43
      */
@@ -62,7 +67,15 @@ public class CmcProjectCommentController extends BaseController
62 67
     @GetMapping(value = "/{projectId}")
63 68
     public AjaxResult getInfo(@PathVariable("projectId") String projectId)
64 69
     {
65
-        return success(cmcProjectCommentService.selectCmcProjectCommentByProjectId(projectId));
70
+        CmcProjectComment cmcProjectComment = cmcProjectCommentService.selectCmcProjectCommentByProjectId(projectId);
71
+        String scApprove = cmcProjectComment.getScApprover();
72
+        StringBuilder scApproverName = new StringBuilder();
73
+        if (scApprove != null && !scApprove.equals("") && scApprove.split(",").length > 0) {
74
+            for (String user : scApprove.split(","))
75
+                scApproverName.append(userService.selectUserById(Long.parseLong(user)).getNickName()).append(",");
76
+            cmcProjectComment.setScApproverName(scApproverName.substring(0, scApproverName.length() - 1));
77
+        }
78
+        return success();
66 79
     }
67 80
 
68 81
     /**
@@ -72,6 +85,10 @@ public class CmcProjectCommentController extends BaseController
72 85
     @PostMapping
73 86
     public AjaxResult add(@RequestBody CmcProjectComment cmcProjectComment)
74 87
     {
88
+        if (cmcProjectComment.getJyComment() != null) {
89
+            cmcProjectComment.setJyApprover(getLoginUser().getUserId());
90
+            cmcProjectComment.setJyApprovalTime(new Date());
91
+        }
75 92
         return toAjax(cmcProjectCommentService.insertCmcProjectComment(cmcProjectComment));
76 93
     }
77 94
 
@@ -82,6 +99,10 @@ public class CmcProjectCommentController extends BaseController
82 99
     @PutMapping
83 100
     public AjaxResult edit(@RequestBody CmcProjectComment cmcProjectComment)
84 101
     {
102
+        if (cmcProjectComment.getManageComment() != null) {
103
+            cmcProjectComment.setManageApprover(getLoginUser().getUserId());
104
+            cmcProjectComment.setManageApprovalTime(new Date());
105
+        }
85 106
         return toAjax(cmcProjectCommentService.updateCmcProjectComment(cmcProjectComment));
86 107
     }
87 108
 

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetSettle.java 查看文件

@@ -35,7 +35,7 @@ public class CmcBudgetSettle extends BaseEntity
35 35
 
36 36
     /** 系数 */
37 37
     @Excel(name = "系数")
38
-    private Long coefficient;
38
+    private Double coefficient;
39 39
 
40 40
     /** 地类 */
41 41
     @Excel(name = "地类")
@@ -90,12 +90,12 @@ public class CmcBudgetSettle extends BaseEntity
90 90
     {
91 91
         return workload;
92 92
     }
93
-    public void setCoefficient(Long coefficient) 
93
+    public void setCoefficient(Double coefficient)
94 94
     {
95 95
         this.coefficient = coefficient;
96 96
     }
97 97
 
98
-    public Long getCoefficient() 
98
+    public Double getCoefficient()
99 99
     {
100 100
         return coefficient;
101 101
     }

+ 131
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCarApproval.java 查看文件

@@ -29,6 +29,16 @@ public class CmcCarApproval extends BaseEntity
29 29
 
30 30
     private SysUser applierUser;
31 31
 
32
+    private SysUser deptUser;
33
+
34
+    private SysUser managerUser;
35
+
36
+    private SysUser unionUser;
37
+
38
+    private SysUser gmUser;
39
+
40
+    private SysUser dispatchUser;
41
+
32 42
     /** 使用部门 */
33 43
     @Excel(name = "使用部门")
34 44
     private Long useDept;
@@ -132,6 +142,31 @@ public class CmcCarApproval extends BaseEntity
132 142
     @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
133 143
     private Date applyDate;
134 144
 
145
+    /** 部门审批时间 */
146
+    @JsonFormat(pattern = "yyyy-MM-dd")
147
+    @Excel(name = "部门审批时间", width = 30, dateFormat = "yyyy-MM-dd")
148
+    private Date deptTime;
149
+
150
+    /** 分管审批时间 */
151
+    @JsonFormat(pattern = "yyyy-MM-dd")
152
+    @Excel(name = "分管审批时间", width = 30, dateFormat = "yyyy-MM-dd")
153
+    private Date managerTime;
154
+
155
+    /** 工会审批时间 */
156
+    @JsonFormat(pattern = "yyyy-MM-dd")
157
+    @Excel(name = "工会审批时间", width = 30, dateFormat = "yyyy-MM-dd")
158
+    private Date unionTime;
159
+
160
+    /** 总经理审批时间 */
161
+    @JsonFormat(pattern = "yyyy-MM-dd")
162
+    @Excel(name = "总经理审批时间", width = 30, dateFormat = "yyyy-MM-dd")
163
+    private Date gmTime;
164
+
165
+    /** 派车审批时间 */
166
+    @JsonFormat(pattern = "yyyy-MM-dd")
167
+    @Excel(name = "派车审批时间", width = 30, dateFormat = "yyyy-MM-dd")
168
+    private Date dispatchTime;
169
+
135 170
     public void setCarApplyId(String carApplyId)
136 171
     {
137 172
         this.carApplyId = carApplyId;
@@ -159,6 +194,52 @@ public class CmcCarApproval extends BaseEntity
159 194
     {
160 195
         return applierUser;
161 196
     }
197
+    public void setDeptUser(SysUser deptUser)
198
+    {
199
+        this.deptUser = deptUser;
200
+    }
201
+
202
+    public SysUser getDeptUser()
203
+    {
204
+        return deptUser;
205
+    }
206
+    public void setManagerUser(SysUser managerUser)
207
+    {
208
+        this.managerUser = managerUser;
209
+    }
210
+
211
+    public SysUser getManagerUser()
212
+    {
213
+        return managerUser;
214
+    }
215
+    public void setUnionUser(SysUser unionUser)
216
+    {
217
+        this.unionUser = unionUser;
218
+    }
219
+
220
+    public SysUser getUnionUser()
221
+    {
222
+        return unionUser;
223
+    }
224
+    public void setGmUser(SysUser gmUser)
225
+    {
226
+        this.gmUser = gmUser;
227
+    }
228
+
229
+    public SysUser getGmUser()
230
+    {
231
+        return gmUser;
232
+    }
233
+    public void setDispatchUser(SysUser dispatchUser)
234
+    {
235
+        this.dispatchUser = dispatchUser;
236
+    }
237
+
238
+    public SysUser getDispatchUser()
239
+    {
240
+        return dispatchUser;
241
+    }
242
+
162 243
     public void setUseDept(Long useDept)
163 244
     {
164 245
         this.useDept = useDept;
@@ -394,6 +475,56 @@ public class CmcCarApproval extends BaseEntity
394 475
         return applyDate;
395 476
     }
396 477
 
478
+    public void setDeptTime(Date deptTime)
479
+    {
480
+        this.deptTime = deptTime;
481
+    }
482
+
483
+    public Date getDeptTime()
484
+    {
485
+        return deptTime;
486
+    }
487
+
488
+    public void setManagerTime(Date managerTime)
489
+    {
490
+        this.managerTime = managerTime;
491
+    }
492
+
493
+    public Date getManagerTime()
494
+    {
495
+        return managerTime;
496
+    }
497
+
498
+    public void setUnionTime(Date unionTime)
499
+    {
500
+        this.unionTime = unionTime;
501
+    }
502
+
503
+    public Date getUnionTime()
504
+    {
505
+        return unionTime;
506
+    }
507
+
508
+    public void setGmTime(Date gmTime)
509
+    {
510
+        this.gmTime = gmTime;
511
+    }
512
+
513
+    public Date getGmTime()
514
+    {
515
+        return gmTime;
516
+    }
517
+
518
+    public void setDispatchTime(Date dispatchTime)
519
+    {
520
+        this.dispatchTime = dispatchTime;
521
+    }
522
+
523
+    public Date getDispatchTime()
524
+    {
525
+        return dispatchTime;
526
+    }
527
+
397 528
     @Override
398 529
     public String toString() {
399 530
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 36
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProjectComment.java 查看文件

@@ -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;
@@ -28,6 +29,10 @@ public class CmcProjectComment extends BaseEntity
28 29
     @Excel(name = "经营审核人")
29 30
     private Long jyApprover;
30 31
 
32
+    private SysUser jyUser;
33
+
34
+    private SysUser managerUser;
35
+
31 36
     /** 经营审核时间 */
32 37
     @JsonFormat(pattern = "yyyy-MM-dd")
33 38
     @Excel(name = "经营审核时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -54,6 +59,10 @@ public class CmcProjectComment extends BaseEntity
54 59
     @Excel(name = "生产确认人")
55 60
     private String scApprover;
56 61
 
62
+    /** 生产确认人 */
63
+    @Excel(name = "生产确认人")
64
+    private String scApproverName;
65
+
57 66
     /** 生产确认时间 */
58 67
     @JsonFormat(pattern = "yyyy-MM-dd")
59 68
     @Excel(name = "生产确认时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -140,6 +149,15 @@ public class CmcProjectComment extends BaseEntity
140 149
     {
141 150
         return scApprover;
142 151
     }
152
+    public void setScApproverName(String scApproverName)
153
+    {
154
+        this.scApproverName = scApproverName;
155
+    }
156
+
157
+    public String getScApproverName()
158
+    {
159
+        return scApproverName;
160
+    }
143 161
     public void setScApprovalTime(Date scApprovalTime) 
144 162
     {
145 163
         this.scApprovalTime = scApprovalTime;
@@ -149,6 +167,24 @@ public class CmcProjectComment extends BaseEntity
149 167
     {
150 168
         return scApprovalTime;
151 169
     }
170
+    public void setJyUser(SysUser jyUser)
171
+    {
172
+        this.jyUser = jyUser;
173
+    }
174
+
175
+    public SysUser getJyUser()
176
+    {
177
+        return jyUser;
178
+    }
179
+    public void setManagerUser(SysUser managerUser)
180
+    {
181
+        this.managerUser = managerUser;
182
+    }
183
+
184
+    public SysUser getManagerUser()
185
+    {
186
+        return managerUser;
187
+    }
152 188
 
153 189
     @Override
154 190
     public String toString() {

+ 53
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml 查看文件

@@ -31,14 +31,49 @@
31 31
         <result property="dispatcher"    column="dispatcher"    />
32 32
         <result property="dispatchComment"    column="dispatch_comment"    />
33 33
         <result property="estimateCost"    column="estimate_cost"    />
34
-        <association property="applierUser"    javaType="SysUser"         resultMap="SysUserResult" />
34
+        <result property="deptTime"    column="dept_time"    />
35
+        <result property="managerTime"    column="manager_time"    />
36
+        <result property="unionTime"    column="union_time"    />
37
+        <result property="gmTime"    column="gm_time"    />
38
+        <result property="dispatchTime"    column="dispatch_time"    />
39
+        <association property="applierUser"    javaType="SysUser"         resultMap="ApplierUserResult" />
35 40
         <association property="dept"    javaType="SysDept"         resultMap="SysDeptResult" />
36 41
         <association property="project"    javaType="CmcProject"         resultMap="CmcProjectResult" />
42
+        <association property="deptUser"    javaType="SysUser"         resultMap="DeptUserResult" />
43
+        <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
44
+        <association property="unionUser"    javaType="SysUser"         resultMap="UnionUserResult" />
45
+        <association property="gmUser"    javaType="SysUser"         resultMap="GmUserResult" />
46
+        <association property="dispatchUser"    javaType="SysUser"         resultMap="DispatchUserResult" />
37 47
     </resultMap>
38 48
 
39
-    <resultMap type="SysUser" id="SysUserResult">
49
+    <resultMap type="SysUser" id="ApplierUserResult">
40 50
         <result property="userId"    column="user_id"    />
41
-        <result property="nickName"    column="nick_name"    />
51
+        <result property="nickName"    column="applier_nick_name"    />
52
+    </resultMap>
53
+
54
+    <resultMap type="SysUser" id="DeptUserResult">
55
+        <result property="userId"    column="user_id"    />
56
+        <result property="nickName"    column="dept_nick_name"    />
57
+    </resultMap>
58
+
59
+    <resultMap type="SysUser" id="ManagerUserResult">
60
+        <result property="userId"    column="user_id"    />
61
+        <result property="nickName"    column="manager_nick_name"    />
62
+    </resultMap>
63
+
64
+    <resultMap type="SysUser" id="UnionUserResult">
65
+        <result property="userId"    column="user_id"    />
66
+        <result property="nickName"    column="union_nick_name"    />
67
+    </resultMap>
68
+
69
+    <resultMap type="SysUser" id="GmUserResult">
70
+        <result property="userId"    column="user_id"    />
71
+        <result property="nickName"    column="gm_nick_name"    />
72
+    </resultMap>
73
+
74
+    <resultMap type="SysUser" id="DispatchUserResult">
75
+        <result property="userId"    column="user_id"    />
76
+        <result property="nickName"    column="dispatch_nick_name"    />
42 77
     </resultMap>
43 78
 
44 79
     <resultMap type="SysDept" id="SysDeptResult">
@@ -53,8 +88,17 @@
53 88
     </resultMap>
54 89
 
55 90
     <sql id="selectCmcCarApprovalVo">
56
-        select ca.car_apply_id, ca.applier, u.nick_name, ca.use_dept, d.dept_name, ca.cars, ca.drivers, ca.project_id, p.project_number, p.project_name, ca.apply_reason, ca.passengers, ca.apply_date, ca.begin_date, ca.begin_halfday, ca.end_date, ca.end_halfday, ca.days, ca.dept_user_id, ca.dept_comment, ca.manager_user_id, ca.manager_comment, ca.car_usage, ca.union_user_id, ca.union_comment, ca.gm_user_id, ca.gm_comment, ca.dispatcher, ca.dispatch_comment, ca.estimate_cost from cmc_car_approval as ca
91
+        select ca.car_apply_id, ca.applier, u.nick_name as applier_nick_name, ca.use_dept, d.dept_name, ca.cars, ca.drivers, ca.project_id, p.project_number, p.project_name,
92
+               ca.apply_reason, ca.passengers, ca.apply_date, ca.begin_date, ca.begin_halfday, ca.end_date, ca.end_halfday, ca.days, ca.dept_user_id,
93
+               u1.nick_name as dept_nick_name, ca.dept_comment, ca.manager_user_id, u2.nick_name as manager_nick_name, ca.manager_comment, ca.car_usage,
94
+               ca.union_user_id, u3.nick_name as union_nick_name, ca.union_comment, ca.gm_user_id, u4.nick_name as gm_nick_name, ca.gm_comment,
95
+               ca.dispatcher, u5.nick_name as dispatch_nick_name, ca.dispatch_comment, ca.estimate_cost, ca.dept_time, ca.manager_time, ca.union_time, ca.gm_time, ca.dispatch_time from cmc_car_approval as ca
57 96
             left join sys_user as u on u.user_id = ca.applier
97
+            left join sys_user as u1 on u1.user_id = ca.dept_user_id
98
+            left join sys_user as u2 on u2.user_id = ca.manager_user_id
99
+            left join sys_user as u3 on u3.user_id = ca.union_user_id
100
+            left join sys_user as u4 on u4.user_id = ca.gm_user_id
101
+            left join sys_user as u5 on u5.user_id = ca.dispatcher
58 102
             left join sys_dept as d on d.dept_id = ca.use_dept
59 103
             left join cmc_project as p on ca.project_id = p.project_id
60 104
     </sql>
@@ -183,6 +227,11 @@
183 227
             <if test="dispatcher != null">dispatcher = #{dispatcher},</if>
184 228
             <if test="dispatchComment != null">dispatch_comment = #{dispatchComment},</if>
185 229
             <if test="estimateCost != null">estimate_cost = #{estimateCost},</if>
230
+            <if test="deptTime != null ">dept_time = #{deptTime},</if>
231
+            <if test="managerTime != null ">manager_time = #{managerTime},</if>
232
+            <if test="unionTime != null ">union_time = #{unionTime},</if>
233
+            <if test="gmTime != null ">gm_time = #{gmTime},</if>
234
+            <if test="dispatchTime != null ">dispatch_time = #{dispatchTime}</if>
186 235
         </trim>
187 236
         where car_apply_id = #{carApplyId}
188 237
     </update>

+ 26
- 11
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectCommentMapper.xml 查看文件

@@ -15,30 +15,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
15 15
         <result property="scComment"    column="sc_comment"    />
16 16
         <result property="scApprover"    column="sc_approver"    />
17 17
         <result property="scApprovalTime"    column="sc_approval_time"    />
18
+        <association property="jyUser"    javaType="SysUser"         resultMap="JyUserResult" />
19
+        <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
20
+    </resultMap>
21
+
22
+    <resultMap type="SysUser" id="jyUserResult">
23
+        <result property="userId"    column="user_id"    />
24
+        <result property="nickName"    column="jy_nick_name"    />
25
+    </resultMap>
26
+
27
+    <resultMap type="SysUser" id="ManagerUserResult">
28
+        <result property="userId"    column="user_id"    />
29
+        <result property="nickName"    column="manager_nick_name"    />
18 30
     </resultMap>
19 31
 
20 32
     <sql id="selectCmcProjectCommentVo">
21
-        select project_id, jy_comment, jy_approver, jy_approval_time, manage_comment, manage_approver, manage_approval_time, sc_comment, sc_approver, sc_approval_time from cmc_project_comment
33
+        select pc.project_id, pc.jy_comment, pc.jy_approver, u.nick_name as jy_nick_name, pc.jy_approval_time, pc.manage_comment, pc.manage_approver,
34
+               u.nick_name as manager_nick_name, pc.manage_approval_time, pc.sc_comment, pc.sc_approver, pc.sc_approval_time from cmc_project_comment as pc
35
+        left join sys_user as u on u.user_id = pc.dept_user_id
36
+        left join sys_user as u1 on u1.user_id = pc.manager_user_id
22 37
     </sql>
23 38
 
24 39
     <select id="selectCmcProjectCommentList" parameterType="CmcProjectComment" resultMap="CmcProjectCommentResult">
25 40
         <include refid="selectCmcProjectCommentVo"/>
26 41
         <where>  
27
-            <if test="jyComment != null  and jyComment != ''"> and jy_comment = #{jyComment}</if>
28
-            <if test="jyApprover != null "> and jy_approver = #{jyApprover}</if>
29
-            <if test="jyApprovalTime != null "> and jy_approval_time = #{jyApprovalTime}</if>
30
-            <if test="manageComment != null  and manageComment != ''"> and manage_comment = #{manageComment}</if>
31
-            <if test="manageApprover != null "> and manage_approver = #{manageApprover}</if>
32
-            <if test="manageApprovalTime != null "> and manage_approval_time = #{manageApprovalTime}</if>
33
-            <if test="scComment != null  and scComment != ''"> and sc_comment = #{scComment}</if>
34
-            <if test="scApprover != null  and scApprover != ''"> and sc_approver = #{scApprover}</if>
35
-            <if test="scApprovalTime != null "> and sc_approval_time = #{scApprovalTime}</if>
42
+            <if test="jyComment != null  and jyComment != ''"> and pc.jy_comment = #{jyComment}</if>
43
+            <if test="jyApprover != null "> and pc.jy_approver = #{jyApprover}</if>
44
+            <if test="jyApprovalTime != null "> and pc.jy_approval_time = #{jyApprovalTime}</if>
45
+            <if test="manageComment != null  and manageComment != ''"> and pc.manage_comment = #{manageComment}</if>
46
+            <if test="manageApprover != null "> and pc.manage_approver = #{manageApprover}</if>
47
+            <if test="manageApprovalTime != null "> and pc.manage_approval_time = #{manageApprovalTime}</if>
48
+            <if test="scComment != null  and scComment != ''"> and pc.sc_comment = #{scComment}</if>
49
+            <if test="scApprover != null  and scApprover != ''"> and pc.sc_approver = #{scApprover}</if>
50
+            <if test="scApprovalTime != null "> and pc.sc_approval_time = #{scApprovalTime}</if>
36 51
         </where>
37 52
     </select>
38 53
     
39 54
     <select id="selectCmcProjectCommentByProjectId" parameterType="String" resultMap="CmcProjectCommentResult">
40 55
         <include refid="selectCmcProjectCommentVo"/>
41
-        where project_id = #{projectId}
56
+        where pc.project_id = #{projectId}
42 57
     </select>
43 58
         
44 59
     <insert id="insertCmcProjectComment" parameterType="CmcProjectComment">

+ 8
- 3
oa-back/sql/sql.sql 查看文件

@@ -1600,14 +1600,19 @@ create table `cmc_car_approval`  (
1600 1600
   `days`				float			default null 	comment '天数',
1601 1601
   `dept_user_id`		bigint			default null 	comment '部门审批人',
1602 1602
   `dept_comment`		varchar(255)	default null 	comment '部门审批意见',
1603
+  `dept_time`			date			default null 	comment '部门审批时间',
1603 1604
   `manager_user_id`		bigint			default null 	comment '分管审批人',
1604 1605
   `manager_comment`		varchar(255)	default null 	comment '分管审批意见',
1606
+  `manager_time`		date			default null 	comment '分管审批时间',
1605 1607
   `union_user_id`		bigint			default null 	comment '工会审批人',
1606 1608
   `union_comment`		varchar(255)	default null 	comment '工会审批意见',
1609
+  `union_time`			date			default null 	comment '工会审批时间',
1607 1610
   `gm_user_id`			bigint			default null 	comment '总经理审批人',
1608 1611
   `gm_comment`			varchar(255)	default null 	comment '总经理审批意见',
1609
-  `dispatcher`			bigint			default null	comment '调度员',
1610
-  `dispatch_comment`	varchar(255)	default null 	comment '调度审批意见',
1612
+  `gm_time`				date			default null 	comment '总经理审批时间',
1613
+  `dispatcher`			bigint			default null	comment '派车人',
1614
+  `dispatch_comment`	varchar(255)	default null 	comment '派车审批意见',
1615
+  `dispatch_time`		date			default null 	comment '派车审批时间',
1611 1616
   `estimate_cost`		decimal(10,2)	default null	comment '预计用车成本',
1612 1617
   `apply_date`			date			default null 	comment '申请日期',
1613 1618
   primary key (`car_apply_id`)
@@ -3659,7 +3664,7 @@ create table `cmc_project_comment`  (
3659 3664
   `manage_approver` 	bigint			default null comment '分管审核人',
3660 3665
   `manage_approval_time` datetime		default null comment '分管审核时间',
3661 3666
   `sc_comment` 			varchar(255)	default null comment '生产确认意见',
3662
-  `sc_approver` 		varchar(20)		default null comment '生产确认人',
3667
+  `sc_approver` 		varchar(50)		default null comment '生产确认人',
3663 3668
   `sc_approval_time` 	datetime		default null comment '生产确认时间',
3664 3669
   primary key (`project_id`)
3665 3670
 ) engine = innodb comment = 'cmc项目审批表';

+ 103
- 10
oa-ui/src/views/flowable/form/carForm.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-04-10 17:14:03
5
+ * @LastEditTime: 2024-04-11 14:52:03
6 6
 -->
7 7
 
8 8
 <template>
@@ -14,6 +14,7 @@
14 14
           <div>
15 15
             <el-form ref="carForm" :model="form" label-width="100px" :rules="rules">
16 16
               <!-- 申请人填写 -->
17
+              <el-divider></el-divider>
17 18
               <el-row :gutter="20">
18 19
                 <el-col :span="6" :xs="24">
19 20
                   <el-form-item label="申请人:" prop="user.nickName">
@@ -29,7 +30,7 @@
29 30
                 </el-col>
30 31
                 <el-col :span="6" :xs="24">
31 32
                   <el-form-item label="申请时间:" prop="date">
32
-                    <el-date-picker style="width:140px;" v-model="form.applyDate" value-format="yyyy-MM-dd" type="date"
33
+                    <el-date-picker style="width:175px;" v-model="form.applyDate" value-format="yyyy-MM-dd" type="date"
33 34
                       placeholder="选择日期" :disabled="taskName != '用车申请'">
34 35
                     </el-date-picker>
35 36
                   </el-form-item>
@@ -46,7 +47,7 @@
46 47
               </el-row>
47 48
               <el-form-item label="项目编号:" prop="projectId">
48 49
                 <el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
49
-                  :disabled="taskName != '用车申请'" clearable>
50
+                  :disabled="taskName != '用车申请' || form.carUsage == '1'" clearable>
50 51
                   <el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber"
51 52
                     :value="item.projectId">
52 53
                   </el-option>
@@ -79,14 +80,14 @@
79 80
                 </el-col>
80 81
                 <el-col :span="6" :xs="24">
81 82
                   <el-form-item label="开始日期:" prop="beginDate">
82
-                    <el-date-picker style="width:140px;" v-model="form.beginDate" value-format="yyyy-MM-dd" type="date"
83
+                    <el-date-picker style="width:175px;" v-model="form.beginDate" value-format="yyyy-MM-dd" type="date"
83 84
                       placeholder="选择日期" @change="calculateDay" :disabled="taskName != '用车申请'">
84 85
                     </el-date-picker>
85 86
                   </el-form-item>
86 87
                 </el-col>
87 88
                 <el-col :span="6" :xs="24">
88 89
                   <el-form-item label="结束日期:" prop="endDate">
89
-                    <el-date-picker style="width:140px;" v-model="form.endDate" value-format="yyyy-MM-dd" type="date"
90
+                    <el-date-picker style="width:175px;" v-model="form.endDate" value-format="yyyy-MM-dd" type="date"
90 91
                       placeholder="选择日期" @change="calculateDay" :disabled="taskName != '用车申请'">
91 92
                     </el-date-picker>
92 93
                   </el-form-item>
@@ -104,30 +105,102 @@
104 105
                   :disabled="taskName != '部门审核'">
105 106
                 </el-input>
106 107
               </el-form-item>
108
+              <el-row>
109
+                <el-col :span="6" :xs="24" :offset="12">
110
+                  <el-form-item label="签名:" label-width="120px" v-if="showFormItem('部门审核')">
111
+                    <span class="auditor"> {{ form.deptUser ? form.deptUser.nickName : deptUser }} </span>
112
+                  </el-form-item>
113
+                </el-col>
114
+                <el-col :span="6">
115
+                  <el-form-item label="日期:" prop="deptTime" label-width="120px" v-if="showFormItem('部门审核')">
116
+                    <el-date-picker style="width:175px;" v-model="form.deptTime" value-format="yyyy-MM-dd" type="date"
117
+                      :disabled="true">
118
+                    </el-date-picker>
119
+                  </el-form-item>
120
+                </el-col>
121
+              </el-row>
107 122
               <!-- 分管审核意见 -->
108 123
               <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px" v-if="showFormItem('分管审核')">
109 124
                 <el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment"
110 125
                   :disabled="taskName != '分管审核'">
111 126
                 </el-input>
112 127
               </el-form-item>
128
+              <el-row>
129
+                <el-col :span="6" :xs="24" :offset="12">
130
+                  <el-form-item label="签名:" label-width="120px" v-if="showFormItem('分管审核')">
131
+                    <span class="auditor"> {{ form.managerUser ? form.managerUser.nickName : managerUser }} </span>
132
+                  </el-form-item>
133
+                </el-col>
134
+                <el-col :span="6">
135
+                  <el-form-item label="日期:" prop="managerTime" label-width="120px" v-if="showFormItem('分管审核')">
136
+                    <el-date-picker style="width:175px;" v-model="form.managerTime" value-format="yyyy-MM-dd" type="date"
137
+                      :disabled="true">
138
+                    </el-date-picker>
139
+                  </el-form-item>
140
+                </el-col>
141
+              </el-row>
113 142
               <!-- 工会审核意见 -->
114 143
               <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="showFormItem('工会审核')">
115 144
                 <el-input type="textarea" :rows="2" placeholder="请输入工会审核意见" v-model="form.unionComment"
116 145
                   :disabled="taskName != '工会审核'">
117 146
                 </el-input>
118 147
               </el-form-item>
148
+              <el-row>
149
+                <el-col :span="6" :xs="24" :offset="12">
150
+                  <el-form-item label="签名:" label-width="120px" v-if="showFormItem('工会审核')">
151
+                    <span class="auditor"> {{ form.unionUser ? form.unionUser.nickName : unionUser }} </span>
152
+                  </el-form-item>
153
+                </el-col>
154
+                <el-col :span="6">
155
+                  <el-form-item label="日期:" prop="unionTime" label-width="120px" v-if="showFormItem('工会审核')">
156
+                    <el-date-picker style="width:175px;" v-model="form.unionTime" value-format="yyyy-MM-dd" type="date"
157
+                      :disabled="true">
158
+                    </el-date-picker>
159
+                  </el-form-item>
160
+                </el-col>
161
+              </el-row>
119 162
               <!-- 总经理审核意见 -->
120 163
               <el-form-item label="总经理审核意见" prop="gmComment" label-width="120px" v-if="showFormItem('总经理审核')">
121 164
                 <el-input type="textarea" :rows="2" placeholder="请输入总经理审核意见" v-model="form.gmComment"
122 165
                   :disabled="taskName != '总经理审核'">
123 166
                 </el-input>
124 167
               </el-form-item>
168
+              <el-row>
169
+                <el-col :span="6" :xs="24" :offset="12">
170
+                  <el-form-item label="签名:" label-width="120px" v-if="showFormItem('总经理审核')">
171
+                    <span class="auditor"> {{ form.gmUser ? form.gmUser.nickName : gmUser }} </span>
172
+                  </el-form-item>
173
+                </el-col>
174
+                <el-col :span="6">
175
+                  <el-form-item label="日期:" prop="gmTime" label-width="120px" v-if="showFormItem('总经理审核')">
176
+                    <el-date-picker style="width:175px;" v-model="form.gmTime" value-format="yyyy-MM-dd" type="date"
177
+                      :disabled="true">
178
+                    </el-date-picker>
179
+                  </el-form-item>
180
+                </el-col>
181
+              </el-row>
182
+              <el-divider></el-divider>
125 183
               <!-- 安排用车意见 -->
126 184
               <el-form-item label="安排用车意见:" prop="dispatchComment" label-width="120px">
127 185
                 <el-input type="textarea" :rows="2" placeholder="请输入安排用车意见" v-model="form.dispatchComment"
128 186
                   :disabled="taskName != '安排用车'">
129 187
                 </el-input>
130 188
               </el-form-item>
189
+              <el-row>
190
+                <el-col :span="6" :xs="24" :offset="12">
191
+                  <el-form-item label="签名:" label-width="120px" v-if="taskName == '安排用车' || taskName == '申请确认'">
192
+                    <span class="auditor"> {{ form.dispatchUser ? form.dispatchUser.nickName : dispatchUser }} </span>
193
+                  </el-form-item>
194
+                </el-col>
195
+                <el-col :span="6">
196
+                  <el-form-item label="日期:" prop="dispatchTime" label-width="120px"
197
+                    v-if="taskName == '安排用车' || taskName == '申请确认'">
198
+                    <el-date-picker style="width:175px;" v-model="form.dispatchTime" value-format="yyyy-MM-dd" type="date"
199
+                      :disabled="true">
200
+                    </el-date-picker>
201
+                  </el-form-item>
202
+                </el-col>
203
+              </el-row>
131 204
               <!-- 综合事务部管理人员填写 -->
132 205
               <el-form-item label="车牌号:">
133 206
                 <el-checkbox-group v-model="form.cars" :disabled="taskName != '安排用车'">
@@ -193,6 +266,16 @@ export default {
193 266
     }
194 267
   },
195 268
   created() {
269
+    if (this.taskName == '部门审核')
270
+      this.deptUser = this.$store.getters.name;
271
+    if (this.taskName == '分管审核')
272
+      this.managerUser = this.$store.getters.name;
273
+    if (this.taskName == '工会审核')
274
+      this.unionUser = this.$store.getters.name;
275
+    if (this.taskName == '总经理审核')
276
+      this.gmUser = this.$store.getters.name;
277
+    if (this.taskName == '安排用车')
278
+      this.dispatchUser = this.$store.getters.name;
196 279
     this.dept = this.$store.getters.deptId;
197 280
     this.getProjectList();
198 281
     this.getCarList();
@@ -203,6 +286,11 @@ export default {
203 286
   },
204 287
   data() {
205 288
     return {
289
+      deptUser: '',
290
+      managerUser: '',
291
+      unionUser: '',
292
+      gmUser: '',
293
+      dispatchUser: '',
206 294
       form: {
207 295
         carUsage: '0',
208 296
         days: '',
@@ -438,15 +526,15 @@ export default {
438 526
       else
439 527
         this.dept = this.$store.getters.deptId;
440 528
     },
441
-    showFormItem(taskName) {
529
+    showFormItem(name) {
442 530
       let isShow = false;
443
-      if (taskName == '部门审核')
531
+      if (name == '部门审核')
444 532
         isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.deptUserId != null);
445
-      else if (taskName == '分管审核')
533
+      else if (name == '分管审核')
446 534
         isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.managerUserId != null);
447
-      else if (taskName == '工会审核')
535
+      else if (name == '工会审核')
448 536
         isShow = (this.dept == 0 && this.taskName == '用车申请') || this.taskName == '工会审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
449
-      else if (taskName == '总经理审核')
537
+      else if (name == '总经理审核')
450 538
         isShow = (this.dept == 102 && this.taskName == '用车申请') || this.taskName == '总经理审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.gmUserId != null);
451 539
       return isShow;
452 540
     },
@@ -457,6 +545,11 @@ export default {
457 545
 <style lang="scss" scoped></style>
458 546
 
459 547
 <style>
548
+.auditor {
549
+  font-family: '华文行楷';
550
+  font-size: 20px;
551
+}
552
+
460 553
 .my-label {
461 554
   width: 100px;
462 555
   background: #E1F3D8;

+ 31
- 21
oa-ui/src/views/flowable/form/deviceForm.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-07 13:44:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-03-29 10:23:41
5
+ * @LastEditTime: 2024-04-11 15:31:07
6 6
 -->
7 7
 
8 8
 <template>
@@ -14,6 +14,7 @@
14 14
           <div>
15 15
             <el-form ref="deviceForm" :model="form" label-width="100px" :rules="rules">
16 16
               <!-- 申请人填写 -->
17
+              <el-divider></el-divider>
17 18
               <el-row :gutter="20">
18 19
                 <el-col :span="6" :xs="24">
19 20
                   <el-form-item label="申请人:" prop="user.nickName">
@@ -44,16 +45,17 @@
44 45
                 </el-select>
45 46
                 <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
46 47
                   <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
47
-                    }}</el-descriptions-item>
48
+                  }}</el-descriptions-item>
48 49
                   <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
49
-                    }}</el-descriptions-item>
50
-                  <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ? chooseProject.projectLeaderUser.nickName : ''
51
-                    }}</el-descriptions-item>
50
+                  }}</el-descriptions-item>
51
+                  <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
52
+                    chooseProject.projectLeaderUser.nickName : ''
53
+                  }}</el-descriptions-item>
52 54
                   <el-descriptions-item label="承担部门" label-class-name="my-label">
53 55
                     <el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
54 56
                   </el-descriptions-item>
55 57
                   <el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
56
-                    }}</el-descriptions-item>
58
+                  }}</el-descriptions-item>
57 59
                 </el-descriptions>
58 60
               </el-form-item>
59 61
               <el-form-item label="申领事由:" prop="applyReason">
@@ -86,38 +88,50 @@
86 88
 
87 89
               <!-- 部门审核意见 -->
88 90
               <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px">
89
-                <el-input type="textarea" :rows="2" placeholder="请输入部门审核意见" v-model="form.deptComment" :disabled="taskName != '部门审核'">
91
+                <el-input type="textarea" :rows="2" placeholder="请输入部门审核意见" v-model="form.deptComment"
92
+                  :disabled="taskName != '部门审核'">
90 93
                 </el-input>
91 94
               </el-form-item>
92 95
               <!-- 分管审核意见 -->
93 96
               <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px">
94
-                <el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment" :disabled="taskName != '分管审核'">
97
+                <el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment"
98
+                  :disabled="taskName != '分管审核'">
95 99
                 </el-input>
96 100
               </el-form-item>
97 101
               <!-- 安排设备意见 -->
102
+              <el-divider></el-divider>
98 103
               <el-form-item label="安排设备意见:" prop="dispatchComment" label-width="120px">
99
-                <el-input type="textarea" :rows="2" placeholder="请输入安排设备意见" v-model="form.dispatchComment" :disabled="taskName != '安排设备'">
104
+                <el-input type="textarea" :rows="2" placeholder="请输入安排设备意见" v-model="form.dispatchComment"
105
+                  :disabled="taskName != '安排设备'">
100 106
                 </el-input>
101 107
               </el-form-item>
102 108
               <!-- 设备安排 -->
103 109
               <el-form-item label-width="120px" label="设备选择:">
104
-                <el-select v-model="form.devices" filterable multiple placeholder="请选择" @change="handleSelectDevice" clearable :disabled="taskName != '安排设备'">
105
-                  <el-option v-for="item in deviceList" :key="item.deviceId" :label="item.brand + item.series + item.name + item.code" :value="item.deviceId">
110
+                <el-select v-model="form.devices" filterable multiple placeholder="请选择" @change="handleSelectDevice"
111
+                  clearable :disabled="taskName != '安排设备'">
112
+                  <el-option v-for="item in deviceList" :key="item.deviceId"
113
+                    :label="item.brand + item.series + item.name + item.code" :value="item.deviceId">
106 114
                   </el-option>
107 115
                 </el-select>
108 116
                 <el-descriptions border v-if="isDeviceSelect" style="margin-top: 10px;" :column="1">
109 117
                   <el-descriptions-item label="出厂编号" label-class-name="my-label">{{ chooseDevice.code
110
-                    }}</el-descriptions-item>
118
+                  }}</el-descriptions-item>
111 119
                   <el-descriptions-item label="设备名称" label-class-name="my-label">{{ chooseDevice.name
112
-                    }}</el-descriptions-item>
120
+                  }}</el-descriptions-item>
113 121
                   <el-descriptions-item label="设备品牌" label-class-name="my-label">{{ chooseDevice.brand
114
-                    }}</el-descriptions-item>
122
+                  }}</el-descriptions-item>
115 123
                   <el-descriptions-item label="规格型号" label-class-name="my-label">{{ chooseDevice.series
116
-                    }}</el-descriptions-item>
124
+                  }}</el-descriptions-item>
117 125
                   <el-descriptions-item label="存放地点" label-class-name="my-label">{{ chooseDevice.place
118
-                    }}</el-descriptions-item>
126
+                  }}</el-descriptions-item>
119 127
                 </el-descriptions>
120 128
               </el-form-item>
129
+              <el-divider></el-divider>
130
+              <el-form-item label="归还日期:" prop="returnDate">
131
+                <el-date-picker style="width:140px;" v-model="form.returnDate" value-format="yyyy-MM-dd" type="date"
132
+                  placeholder="选择日期" :disabled="taskName != '归还确认'">
133
+                </el-date-picker>
134
+              </el-form-item>
121 135
             </el-form>
122 136
             <el-row style="text-align: center;" v-if="taskName == '设备申请'">
123 137
               <el-button type="primary" @click="submit">提交申请</el-button>
@@ -194,9 +208,6 @@ export default {
194 208
       flowData: {},
195 209
       isSelect: false,
196 210
       rules: {
197
-        projectId: [
198
-          { required: true, message: '请选择项目编号', trigger: 'change' },
199
-        ],
200 211
         passengers: [
201 212
           { required: true, message: '请选择输入乘车人数', trigger: 'change' },
202 213
         ],
@@ -401,5 +412,4 @@ export default {
401 412
 
402 413
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
403 414
   color: #121212 !important;
404
-}
405
-</style>
415
+}</style>

正在加载...
取消
保存