ソースを参照

部门负责人借款列表

lamphua 9ヶ月前
コミット
0b063fb397

+ 18
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowController.java ファイルの表示

@@ -2,9 +2,9 @@ package com.ruoyi.web.controller.oa;
2 2
 
3 3
 import java.util.Date;
4 4
 import java.util.List;
5
+import java.util.stream.Collectors;
5 6
 import javax.servlet.http.HttpServletResponse;
6 7
 
7
-import com.ruoyi.oa.domain.CmcProject;
8 8
 import com.ruoyi.oa.service.ICmcProjectService;
9 9
 import org.springframework.beans.factory.annotation.Autowired;
10 10
 import org.springframework.web.bind.annotation.GetMapping;
@@ -37,9 +37,6 @@ public class CmcBorrowController extends BaseController
37 37
     @Autowired
38 38
     private ICmcBorrowService cmcBorrowService;
39 39
 
40
-    @Autowired
41
-    private ICmcProjectService cmcProjectService;
42
-
43 40
     /**
44 41
      * 查询cmc借款申请列表
45 42
      */
@@ -51,6 +48,23 @@ public class CmcBorrowController extends BaseController
51 48
         return getDataTable(list);
52 49
     }
53 50
 
51
+    /**
52
+     * 部门负责人查询cmc借款申请列表
53
+     */
54
+    @GetMapping("/listDeptQuery")
55
+    public TableDataInfo listDeptQuery()
56
+    {
57
+        CmcBorrow cmcBorrow = new CmcBorrow();
58
+        cmcBorrow.setApplyDept(getLoginUser().getDeptId());
59
+        List<CmcBorrow> list = cmcBorrowService.selectCmcBorrowList(cmcBorrow);
60
+        CmcBorrow borrow = new CmcBorrow();
61
+        borrow.setUndertakingDept(getLoginUser().getDeptId().toString());
62
+        List<CmcBorrow> list1 = cmcBorrowService.selectCmcBorrowList(borrow);
63
+        list.addAll(list1);
64
+        list.stream().distinct().collect(Collectors.toList());
65
+        return getDataTable(list);
66
+    }
67
+
54 68
     /**
55 69
      * 导出cmc借款申请列表
56 70
      */

+ 7
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectCommentController.java ファイルの表示

@@ -87,11 +87,14 @@ public class CmcProjectCommentController extends BaseController
87 87
     @PostMapping
88 88
     public AjaxResult add(@RequestBody CmcProjectComment cmcProjectComment)
89 89
     {
90
-        if (cmcProjectComment.getJyComment() != null) {
90
+        if (cmcProjectComment.getJyComment() != null && cmcProjectComment.getJyApprover() != null && cmcProjectComment.getJyApprovalTime() != null) {
91 91
             cmcProjectComment.setJyApprover(getLoginUser().getUserId());
92 92
             cmcProjectComment.setJyApprovalTime(new Date());
93
+            return toAjax(cmcProjectCommentService.insertCmcProjectComment(cmcProjectComment));
94
+        }
95
+        else {
96
+            return toAjax(cmcProjectCommentService.updateCmcProjectComment(cmcProjectComment));
93 97
         }
94
-        return toAjax(cmcProjectCommentService.insertCmcProjectComment(cmcProjectComment));
95 98
     }
96 99
 
97 100
     /**
@@ -101,11 +104,11 @@ public class CmcProjectCommentController extends BaseController
101 104
     @PutMapping
102 105
     public AjaxResult edit(@RequestBody CmcProjectComment cmcProjectComment)
103 106
     {
104
-        if (cmcProjectComment.getManageComment() != null && cmcProjectComment.getScComment() == null) {
107
+        if (cmcProjectComment.getManageComment() != null && cmcProjectComment.getManageApprover() != null && cmcProjectComment.getManageApprovalTime() != null && cmcProjectComment.getScComment() == null) {
105 108
             cmcProjectComment.setManageApprover(getLoginUser().getUserId());
106 109
             cmcProjectComment.setManageApprovalTime(new Date());
107 110
         }
108
-        if (cmcProjectComment.getScComment() != null) {
111
+        if (cmcProjectComment.getScComment() != null && cmcProjectComment.getScApprover() != null && cmcProjectComment.getScApprovalTime() != null) {
109 112
             CmcProjectComment projectComment = cmcProjectCommentService.selectCmcProjectCommentByProjectId(cmcProjectComment.getProjectId());
110 113
             StringBuilder scApprover = new StringBuilder();
111 114
             if (projectComment.getScApprover() == null)

+ 2
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java ファイルの表示

@@ -103,7 +103,8 @@ public class SysUserController extends BaseController
103 103
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
104 104
             for (Long post : userPostList)
105 105
                 postName.append(postService.selectPostById(post).getPostName()).append("、");
106
-            sysUser.setPostNames(postName.substring(0, postName.length() - 1));
106
+            if (!postName.toString().equals(""))
107
+                sysUser.setPostNames(postName.substring(0, postName.length() - 1));
107 108
             sysUser.setUserId(sysUser.getUserId() - 1);
108 109
         }
109 110
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);

+ 3
- 3
oa-back/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java ファイルの表示

@@ -57,7 +57,7 @@ public class SysUser extends BaseEntity
57 57
     private String password;
58 58
 
59 59
     /** 帐号状态(0正常 1停用) */
60
-    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
60
+    @Excel(name = "帐号状态", readConverterExp = "0=在职,1=离职,2=退休,3=试用,4=返聘")
61 61
     private String status;
62 62
 
63 63
     /** 删除标志(0代表存在 2代表删除) */
@@ -107,11 +107,11 @@ public class SysUser extends BaseEntity
107 107
     private String updateReason;
108 108
 
109 109
     /** 入职时间 */
110
-    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM", type = Type.EXPORT)
110
+    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd", type = Type.EXPORT)
111 111
     private Date entryDate;
112 112
 
113 113
     /** 出生时间 */
114
-    @Excel(name = "出生时间", width = 30, dateFormat = "yyyy-MM", type = Type.EXPORT)
114
+    @Excel(name = "出生时间", width = 30, dateFormat = "yyyy-MM-dd", type = Type.EXPORT)
115 115
     private Date birthday;
116 116
 
117 117
     /** 年龄 */

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowMapper.xml ファイルの表示

@@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
114 114
         <include refid="selectCmcBorrowVo"/>
115 115
         <where>  
116 116
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
117
-            <if test="undertakingDept != null  and undertakingDept != ''"> and p.undertaking_dept = #{undertakingDept}</if>
117
+            <if test="undertakingDept != null  and undertakingDept != ''"> and find_in_set(#{undertakingDept}, p.undertaking_dept)</if>
118 118
             <if test="applyReason != null  and applyReason != ''"> and b.apply_reason = #{applyReason}</if>
119 119
             <if test="borrowUsage != null  and borrowUsage != ''"> and b.borrow_usage = #{borrowUsage}</if>
120 120
             <if test="applyDept != null  and applyDept != ''"> and b.apply_dept = #{applyDept}</if>

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml ファイルの表示

@@ -117,7 +117,7 @@
117 117
             <if test="applier != null "> and ca.applier = #{applier}</if>
118 118
             <if test="useDept != null "> and ca.use_dept = #{useDept}</if>
119 119
             <if test="cars != null  and cars != ''"> and find_in_set(#{cars}, ca.cars)</if>
120
-            <if test="drivers != null  and drivers != ''"> and find_in_set(#{drivers}, ca.drivers})</if>
120
+            <if test="drivers != null  and drivers != ''"> and find_in_set(#{drivers}, ca.drivers)</if>
121 121
             <if test="projectId != null  and projectId != ''"> and ca.project_id = #{projectId}</if>
122 122
             <if test="applyReason != null  and applyReason != ''"> and ca.apply_reason = #{applyReason}</if>
123 123
             <if test="passengers != null "> and ca.passengers = #{passengers}</if>

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleMapper.xml ファイルの表示

@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
106 106
         <where>
107 107
             <if test="settleId != null  and settleId != ''"> and s.settle_id = #{settleId}</if>
108 108
             <if test="projectId != null"> and s.project_id = #{projectId}</if>
109
-            <if test="undertakingDept != null  and undertakingDept != ''"> and p.undertaking_dept = #{undertakingDept}</if>
109
+            <if test="undertakingDept != null  and undertakingDept != ''"> and find_in_set(#{undertakingDept}, p.undertaking_dept)</if>
110 110
             <if test="xmName != null"> and s.xm_name like concat('%', #{xmName}, '%')</if>
111 111
             <if test="workloadReport != null  and workloadReport != ''"> and s.workload_report = #{workloadReport}</if>
112 112
             <if test="reporter != null "> and s.reporter = #{reporter}</if>

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml ファイルの表示

@@ -305,7 +305,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
305 305
 			<if test="graduateSchool != null">graduate_school = #{graduateSchool},</if>
306 306
 			<if test="major != null">major = #{major},</if>
307 307
 			<if test="degree != null">degree = #{degree},</if>
308
-			<if test="contractSign != null">contract_sign = #{contractSign},</if>
308
+			contract_sign = #{contractSign},
309 309
 			contract_expire = #{contractExpire},
310 310
 			<if test="homePlace != null">home_place = #{homePlace},</if>
311 311
  			update_time = sysdate()

+ 9
- 0
oa-ui/src/api/oa/borrow/borrow.js ファイルの表示

@@ -9,6 +9,15 @@ export function listBorrow(query) {
9 9
   })
10 10
 }
11 11
 
12
+// 部门负责人查询cmc借款申请列表
13
+export function listBorrowDeptQuery(query) {
14
+  return request({
15
+    url: '/oa/borrow/listDeptQuery',
16
+    method: 'get',
17
+    params: query
18
+  })
19
+}
20
+
12 21
 // 查询cmc借款申请详细
13 22
 export function getBorrow(borrowId) {
14 23
   return request({

+ 2
- 2
oa-ui/src/views/oa/project/change.vue ファイルの表示

@@ -138,7 +138,7 @@ export default {
138 138
     /** 查询cmc项目变更列表 */
139 139
     async getList() {
140 140
       this.loading = true;
141
-      if (this.deptId > 107 && this.deptId != 109) {
141
+      if (this.deptId > 106 && this.deptId != 109) {
142 142
         let response = await checkPermi(['oa:allproject:query'])
143 143
         if (response == false) {
144 144
           this.queryParams.undertakingDept = this.deptId
@@ -151,7 +151,7 @@ export default {
151 151
       });
152 152
     },
153 153
     remoteMethod(val) {
154
-      if (this.deptId > 107) {
154
+      if (this.deptId > 106) {
155 155
         this.queryParams.undertakingDept = this.deptId
156 156
       }
157 157
       this.queryParams.projectNumber = val;

+ 3
- 3
oa-ui/src/views/oa/project/index.vue ファイルの表示

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-27 14:49:15
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-25 16:35:45
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-08-20 17:09:10
6 6
 -->
7 7
 <template>
8 8
   <div class="project-wrapper">
@@ -303,7 +303,7 @@ export default {
303 303
     // 查询项目列表
304 304
     async getList() {
305 305
       this.loading = true
306
-      if (this.deptId > 107 && this.deptId != 109) {
306
+      if (this.deptId > 106 && this.deptId != 109) {
307 307
         let response = await checkPermi(['oa:allproject:query'])
308 308
         if (response == false) {
309 309
           this.queryParams.undertakingDept = this.deptId

読み込み中…
キャンセル
保存