Selaa lähdekoodia

部门负责人借款列表

lamphua 9 kuukautta sitten
vanhempi
commit
0b063fb397

+ 18
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowController.java Näytä tiedosto

2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
 import java.util.List;
4
 import java.util.List;
5
+import java.util.stream.Collectors;
5
 import javax.servlet.http.HttpServletResponse;
6
 import javax.servlet.http.HttpServletResponse;
6
 
7
 
7
-import com.ruoyi.oa.domain.CmcProject;
8
 import com.ruoyi.oa.service.ICmcProjectService;
8
 import com.ruoyi.oa.service.ICmcProjectService;
9
 import org.springframework.beans.factory.annotation.Autowired;
9
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.web.bind.annotation.GetMapping;
10
 import org.springframework.web.bind.annotation.GetMapping;
37
     @Autowired
37
     @Autowired
38
     private ICmcBorrowService cmcBorrowService;
38
     private ICmcBorrowService cmcBorrowService;
39
 
39
 
40
-    @Autowired
41
-    private ICmcProjectService cmcProjectService;
42
-
43
     /**
40
     /**
44
      * 查询cmc借款申请列表
41
      * 查询cmc借款申请列表
45
      */
42
      */
51
         return getDataTable(list);
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
      * 导出cmc借款申请列表
69
      * 导出cmc借款申请列表
56
      */
70
      */

+ 7
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectCommentController.java Näytä tiedosto

87
     @PostMapping
87
     @PostMapping
88
     public AjaxResult add(@RequestBody CmcProjectComment cmcProjectComment)
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
             cmcProjectComment.setJyApprover(getLoginUser().getUserId());
91
             cmcProjectComment.setJyApprover(getLoginUser().getUserId());
92
             cmcProjectComment.setJyApprovalTime(new Date());
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
     @PutMapping
104
     @PutMapping
102
     public AjaxResult edit(@RequestBody CmcProjectComment cmcProjectComment)
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
             cmcProjectComment.setManageApprover(getLoginUser().getUserId());
108
             cmcProjectComment.setManageApprover(getLoginUser().getUserId());
106
             cmcProjectComment.setManageApprovalTime(new Date());
109
             cmcProjectComment.setManageApprovalTime(new Date());
107
         }
110
         }
108
-        if (cmcProjectComment.getScComment() != null) {
111
+        if (cmcProjectComment.getScComment() != null && cmcProjectComment.getScApprover() != null && cmcProjectComment.getScApprovalTime() != null) {
109
             CmcProjectComment projectComment = cmcProjectCommentService.selectCmcProjectCommentByProjectId(cmcProjectComment.getProjectId());
112
             CmcProjectComment projectComment = cmcProjectCommentService.selectCmcProjectCommentByProjectId(cmcProjectComment.getProjectId());
110
             StringBuilder scApprover = new StringBuilder();
113
             StringBuilder scApprover = new StringBuilder();
111
             if (projectComment.getScApprover() == null)
114
             if (projectComment.getScApprover() == null)

+ 2
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java Näytä tiedosto

103
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
103
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
104
             for (Long post : userPostList)
104
             for (Long post : userPostList)
105
                 postName.append(postService.selectPostById(post).getPostName()).append("、");
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
             sysUser.setUserId(sysUser.getUserId() - 1);
108
             sysUser.setUserId(sysUser.getUserId() - 1);
108
         }
109
         }
109
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
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 Näytä tiedosto

57
     private String password;
57
     private String password;
58
 
58
 
59
     /** 帐号状态(0正常 1停用) */
59
     /** 帐号状态(0正常 1停用) */
60
-    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
60
+    @Excel(name = "帐号状态", readConverterExp = "0=在职,1=离职,2=退休,3=试用,4=返聘")
61
     private String status;
61
     private String status;
62
 
62
 
63
     /** 删除标志(0代表存在 2代表删除) */
63
     /** 删除标志(0代表存在 2代表删除) */
107
     private String updateReason;
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
     private Date entryDate;
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
     private Date birthday;
115
     private Date birthday;
116
 
116
 
117
     /** 年龄 */
117
     /** 年龄 */

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowMapper.xml Näytä tiedosto

114
         <include refid="selectCmcBorrowVo"/>
114
         <include refid="selectCmcBorrowVo"/>
115
         <where>  
115
         <where>  
116
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
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
             <if test="applyReason != null  and applyReason != ''"> and b.apply_reason = #{applyReason}</if>
118
             <if test="applyReason != null  and applyReason != ''"> and b.apply_reason = #{applyReason}</if>
119
             <if test="borrowUsage != null  and borrowUsage != ''"> and b.borrow_usage = #{borrowUsage}</if>
119
             <if test="borrowUsage != null  and borrowUsage != ''"> and b.borrow_usage = #{borrowUsage}</if>
120
             <if test="applyDept != null  and applyDept != ''"> and b.apply_dept = #{applyDept}</if>
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 Näytä tiedosto

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

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleMapper.xml Näytä tiedosto

106
         <where>
106
         <where>
107
             <if test="settleId != null  and settleId != ''"> and s.settle_id = #{settleId}</if>
107
             <if test="settleId != null  and settleId != ''"> and s.settle_id = #{settleId}</if>
108
             <if test="projectId != null"> and s.project_id = #{projectId}</if>
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
             <if test="xmName != null"> and s.xm_name like concat('%', #{xmName}, '%')</if>
110
             <if test="xmName != null"> and s.xm_name like concat('%', #{xmName}, '%')</if>
111
             <if test="workloadReport != null  and workloadReport != ''"> and s.workload_report = #{workloadReport}</if>
111
             <if test="workloadReport != null  and workloadReport != ''"> and s.workload_report = #{workloadReport}</if>
112
             <if test="reporter != null "> and s.reporter = #{reporter}</if>
112
             <if test="reporter != null "> and s.reporter = #{reporter}</if>

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Näytä tiedosto

305
 			<if test="graduateSchool != null">graduate_school = #{graduateSchool},</if>
305
 			<if test="graduateSchool != null">graduate_school = #{graduateSchool},</if>
306
 			<if test="major != null">major = #{major},</if>
306
 			<if test="major != null">major = #{major},</if>
307
 			<if test="degree != null">degree = #{degree},</if>
307
 			<if test="degree != null">degree = #{degree},</if>
308
-			<if test="contractSign != null">contract_sign = #{contractSign},</if>
308
+			contract_sign = #{contractSign},
309
 			contract_expire = #{contractExpire},
309
 			contract_expire = #{contractExpire},
310
 			<if test="homePlace != null">home_place = #{homePlace},</if>
310
 			<if test="homePlace != null">home_place = #{homePlace},</if>
311
  			update_time = sysdate()
311
  			update_time = sysdate()

+ 9
- 0
oa-ui/src/api/oa/borrow/borrow.js Näytä tiedosto

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
 // 查询cmc借款申请详细
21
 // 查询cmc借款申请详细
13
 export function getBorrow(borrowId) {
22
 export function getBorrow(borrowId) {
14
   return request({
23
   return request({

+ 2
- 2
oa-ui/src/views/oa/project/change.vue Näytä tiedosto

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

+ 3
- 3
oa-ui/src/views/oa/project/index.vue Näytä tiedosto

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-02-27 14:49:15
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
 <template>
7
 <template>
8
   <div class="project-wrapper">
8
   <div class="project-wrapper">
303
     // 查询项目列表
303
     // 查询项目列表
304
     async getList() {
304
     async getList() {
305
       this.loading = true
305
       this.loading = true
306
-      if (this.deptId > 107 && this.deptId != 109) {
306
+      if (this.deptId > 106 && this.deptId != 109) {
307
         let response = await checkPermi(['oa:allproject:query'])
307
         let response = await checkPermi(['oa:allproject:query'])
308
         if (response == false) {
308
         if (response == false) {
309
           this.queryParams.undertakingDept = this.deptId
309
           this.queryParams.undertakingDept = this.deptId

Loading…
Peruuta
Tallenna