Bladeren bron

勘察项目查询

lamphua 6 maanden geleden
bovenliggende
commit
9135d84254

+ 10
- 17
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Bestand weergeven

@@ -63,22 +63,11 @@ public class CmcProjectController extends BaseController
63 63
     public TableDataInfo list(CmcProject cmcProject)
64 64
     {
65 65
         startPage();
66
-        List<CmcProject> list = cmcProjectService.selectCmcProjectList(cmcProject);
67
-        for (CmcProject project : list) {
68
-            project.setUndertakingDeptName(deptIdToName(project));
69
-            project.setQualityInspectorName(inspectorIdToName(project));
70
-        }
71
-        return getDataTable(list);
72
-    }
73
-
74
-    /**
75
-     * 查询cmc项目列表
76
-     */
77
-    @GetMapping("/listInvest")
78
-    public TableDataInfo listInvest(CmcProject cmcProject)
79
-    {
80
-        startPage();
81
-        List<CmcProject> list = cmcProjectService.selectCmcInvestProjectList(cmcProject);
66
+        List<CmcProject> list = new ArrayList<>();
67
+        if (cmcProject.getUndertakingDept() != null && cmcProject.getUndertakingDept().equals("113"))
68
+            list = cmcProjectService.selectCmcInvestProjectList(cmcProject);
69
+        else
70
+            list = cmcProjectService.selectCmcProjectList(cmcProject);
82 71
         for (CmcProject project : list) {
83 72
             project.setUndertakingDeptName(deptIdToName(project));
84 73
             project.setQualityInspectorName(inspectorIdToName(project));
@@ -93,7 +82,11 @@ public class CmcProjectController extends BaseController
93 82
     @PostMapping("/export")
94 83
     public void export(HttpServletResponse response, CmcProject cmcProject)
95 84
     {
96
-        List<CmcProject> list = cmcProjectService.selectCmcProjectList(cmcProject);
85
+        List<CmcProject> list = new ArrayList<>();
86
+        if (cmcProject.getUndertakingDept() != null && cmcProject.getUndertakingDept().equals("113"))
87
+            list = cmcProjectService.selectCmcInvestProjectList(cmcProject);
88
+        else
89
+            list = cmcProjectService.selectCmcProjectList(cmcProject);
97 90
         for (CmcProject project : list) {
98 91
             project.setUndertakingDeptName(deptIdToName(project));
99 92
             project.setQualityInspectorName(inspectorIdToName(project));

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml Bestand weergeven

@@ -160,6 +160,7 @@
160 160
             <if test="projectType != null  and projectType != ''"> and p.project_type = #{projectType}</if>
161 161
             <if test="projectLevel != null  and projectLevel != ''"> and p.project_level = #{projectLevel}</if>
162 162
             <if test="projectRegistrant != null "> and p.project_registrant = #{projectRegistrant}</if>
163
+            <if test="undertakingDept != null  and undertakingDept != ''"> and p.undertaking_dept like concat('%', #{undertakingDept}, '%')</if>
163 164
             <if test="projectPlanner != null "> and p.project_planner = #{projectPlanner}</if>
164 165
             <if test="siteLeader != null "> and p.site_leader = #{siteLeader}</if>
165 166
             <if test="planTime != null "> and p.plan_time = #{planTime}</if>

+ 1
- 10
oa-ui/src/api/oa/project/project.js Bestand weergeven

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-01-30 16:37:46
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-20 16:36:46
5
+ * @LastEditTime: 2024-09-20 17:09:29
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -15,15 +15,6 @@ export function listProject(query) {
15 15
   })
16 16
 }
17 17
 
18
-// 查询cmc勘察项目列表
19
-export function listInvestProject(query) {
20
-  return request({
21
-    url: '/oa/project/listInvest',
22
-    method: 'get',
23
-    params: query
24
-  })
25
-}
26
-
27 18
 // 查询cmc项目详细
28 19
 export function getProject(projectId) {
29 20
   return request({

+ 6
- 4
oa-ui/src/views/oa/project/invest.vue Bestand weergeven

@@ -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-09-20 16:55:07
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-09-20 17:11:35
6 6
 -->
7 7
 <template>
8 8
   <div class="project-wrapper">
@@ -243,7 +243,7 @@
243 243
 </template>
244 244
 
245 245
 <script>
246
-import { listInvestProject, submitProject, modifyProject, delProject } from "@/api/oa/project/project";
246
+import { listProject, submitProject, modifyProject, delProject } from "@/api/oa/project/project";
247 247
 import { listProjectProgress, getProjectProgress } from "@/api/oa/project/projectProgress";
248 248
 import { listDept } from '@/api/system/dept';
249 249
 import { listUser, getUser } from '@/api/system/user';
@@ -269,6 +269,7 @@ export default {
269 269
         projectNumber: '',
270 270
         projectLeader: undefined,
271 271
         projectName: '',
272
+        undertakingDept: '113'
272 273
       },
273 274
       projectList: [],
274 275
       total: 0,
@@ -313,7 +314,7 @@ export default {
313 314
           this.queryParams.undertakingDept = this.deptId
314 315
         }
315 316
       }
316
-      listInvestProject(this.queryParams).then(response => {
317
+      listProject(this.queryParams).then(response => {
317 318
         this.projectList = response.rows;
318 319
         this.total = response.total;
319 320
         this.loading = false;
@@ -484,6 +485,7 @@ export default {
484 485
     },
485 486
     handleExport() {
486 487
       this.queryParams.pageSize = 99999
488
+      this.queryParams.undertakingDept = '113'
487 489
       this.download('oa/project/export', {
488 490
         ...this.queryParams
489 491
       }, `project_${new Date().getTime()}.xlsx`).then(() => {

Laden…
Annuleren
Opslaan