Просмотр исходного кода

人员参与项目信息补全

lamphua 1 неделю назад
Родитель
Сommit
2790a39d2f

+ 10
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Просмотреть файл

158
         return success(cmcProject);
158
         return success(cmcProject);
159
     }
159
     }
160
 
160
 
161
+    /**
162
+     * 查询cmc项目列表
163
+     */
164
+    @GetMapping("/listByPaticipates")
165
+    public TableDataInfo getListByPaticipates(CmcProject cmcProject) {
166
+        startPage();
167
+        List<CmcProject> list = cmcProjectService.selectListByPaticipates(cmcProject);
168
+        return getDataTable(list);
169
+    }
170
+
161
     /**
171
     /**
162
      * 项目自动编号
172
      * 项目自动编号
163
      */
173
      */

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcProjectMapper.java Просмотреть файл

27
      */
27
      */
28
     public List<CmcProject> selectCmcProjectByProjectNumbers(CmcProject cmcProject);
28
     public List<CmcProject> selectCmcProjectByProjectNumbers(CmcProject cmcProject);
29
 
29
 
30
+    /**
31
+     * 查询cmc项目
32
+     *
33
+     * @param cmcProject cmc项目
34
+     * @return cmc项目列表
35
+     */
36
+    public List<CmcProject> selectListByPaticipates(CmcProject cmcProject);
37
+
30
     /**
38
     /**
31
      * 查询cmc测绘项目列表
39
      * 查询cmc测绘项目列表
32
      * 
40
      * 

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectService.java Просмотреть файл

27
      */
27
      */
28
     public List<CmcProject> selectCmcProjectByProjectNumbers(CmcProject cmcProject);
28
     public List<CmcProject> selectCmcProjectByProjectNumbers(CmcProject cmcProject);
29
 
29
 
30
+    /**
31
+     * 查询cmc项目
32
+     *
33
+     * @param cmcProject cmc项目
34
+     * @return cmc项目列表
35
+     */
36
+    public List<CmcProject> selectListByPaticipates(CmcProject cmcProject);
37
+
30
     /**
38
     /**
31
      * 查询cmc测绘项目列表
39
      * 查询cmc测绘项目列表
32
      * 
40
      * 

+ 12
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectServiceImpl.java Просмотреть файл

44
         return cmcProjectMapper.selectCmcProjectByProjectNumbers(cmcProject);
44
         return cmcProjectMapper.selectCmcProjectByProjectNumbers(cmcProject);
45
     }
45
     }
46
 
46
 
47
+    /**
48
+     * 查询cmc项目
49
+     *
50
+     * @param cmcProject cmc项目
51
+     * @return cmc项目列表
52
+     */
53
+    @Override
54
+    public List<CmcProject> selectListByPaticipates(CmcProject cmcProject)
55
+    {
56
+        return cmcProjectMapper.selectListByPaticipates(cmcProject);
57
+    }
58
+
47
     /**
59
     /**
48
      * 查询cmc测绘项目列表
60
      * 查询cmc测绘项目列表
49
      * 
61
      * 

+ 1
- 6
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml Просмотреть файл

166
             <if test="projectSource != null  and projectSource != ''"> and p.project_source = #{projectSource}</if>
166
             <if test="projectSource != null  and projectSource != ''"> and p.project_source = #{projectSource}</if>
167
             <if test="projectName != null  and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
167
             <if test="projectName != null  and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
168
             <if test="partyAName != null  and partyAName != ''"> and pa.party_a_name like concat('%', #{partyAName}, '%')</if>
168
             <if test="partyAName != null  and partyAName != ''"> and pa.party_a_name like concat('%', #{partyAName}, '%')</if>
169
-            <if test="params.beginTime != null and params.beginTime != ''">
170
-                and date_format(t1.sign_date,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
171
-            </if>
172
-            <if test="params.endTime != null and params.endTime != ''">
173
-                and date_format(t1.sign_date,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
174
-            </if>
169
+            
175
         </where>
170
         </where>
176
         group by t1.contract_id
171
         group by t1.contract_id
177
         order by t1.draft_time desc
172
         order by t1.draft_time desc

+ 14
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml Просмотреть файл

311
         and find_in_set(p.project_number, #{projectNumber})
311
         and find_in_set(p.project_number, #{projectNumber})
312
     </select>
312
     </select>
313
 
313
 
314
+    <select id="selectListByPaticipates" parameterType="String" resultMap="CmcProjectResult">
315
+        select distinct(t.project_id), t.project_number, t.project_name, t.project_leader, t.register_time from
316
+        (select p.project_id, p.project_number, p.project_name, p.project_leader, p.register_time from cmc_project p
317
+        where
318
+        (p.project_number REGEXP '^[0-9]+W[0-9]' or p.project_number REGEXP '^[0-9]+C[0-9]') AND NOT (p.project_number REGEXP '[/\\*-]')
319
+        and find_in_set(#{participates}, p.participates)
320
+        union
321
+        select p.project_id, p.project_number, p.project_name, p.project_leader, p.register_time from cmc_declare d
322
+        left join cmc_project as p on p.project_id = d.project_id
323
+        where d.user_id = #{participates}) as t
324
+        group by t.project_id
325
+        order by t.register_time desc, t.project_number desc
326
+    </select>
327
+
314
     <insert id="insertCmcProject" parameterType="CmcProject">
328
     <insert id="insertCmcProject" parameterType="CmcProject">
315
         insert into cmc_project
329
         insert into cmc_project
316
         <trim prefix="(" suffix=")" suffixOverrides=",">
330
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 9
- 0
oa-ui/src/api/oa/project/project.js Просмотреть файл

93
     method: 'get',
93
     method: 'get',
94
   })
94
   })
95
 }
95
 }
96
+
97
+// 查询cmc项目详细
98
+export function getListByPaticipates(query) {
99
+  return request({
100
+    url: '/oa/project/listByPaticipates',
101
+    method: 'get',
102
+    params: query
103
+  })
104
+}

+ 5
- 0
oa-ui/src/views/oa/project/index.vue Просмотреть файл

87
           </template>
87
           </template>
88
         </el-table-column>
88
         </el-table-column>
89
         <el-table-column label="项目类型" align="center" key="projectType" prop="projectType" width="120px" sortable />
89
         <el-table-column label="项目类型" align="center" key="projectType" prop="projectType" width="120px" sortable />
90
+        <el-table-column label="登记日期" align="center" key="registerTime" prop="registerTime" width="120px" sortable >
91
+          <template slot-scope="scope">
92
+            <span>{{ parseTime(scope.row.registerTime, '{y}-{m}-{d}') }}</span>
93
+          </template>
94
+        </el-table-column>
90
         <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
95
         <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
91
           <template slot-scope="scope" v-if="scope.row.userId !== 1">
96
           <template slot-scope="scope" v-if="scope.row.userId !== 1">
92
             <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
97
             <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"

+ 3
- 3
oa-ui/src/views/oa/staff/participate.vue Просмотреть файл

36
 </template>
36
 </template>
37
 
37
 
38
 <script>
38
 <script>
39
-import { listProject } from "@/api/oa/project/project";
39
+import { getListByPaticipates } from "@/api/oa/project/project";
40
 import { listDeclare } from "@/api/oa/declare/declare"
40
 import { listDeclare } from "@/api/oa/declare/declare"
41
 export default {
41
 export default {
42
   props: {
42
   props: {
88
         this.queryParams.participates = this.$route.query.userId;
88
         this.queryParams.participates = this.$route.query.userId;
89
       else
89
       else
90
         this.queryParams.participates = this.userId;
90
         this.queryParams.participates = this.userId;
91
-      listProject(this.queryParams).then(res => {
91
+      getListByPaticipates(this.queryParams).then(res => {
92
         this.tableData = res.rows
92
         this.tableData = res.rows
93
-        this.total = res.total
93
+        this.total = res.total 
94
       });
94
       });
95
     }
95
     }
96
   }
96
   }

Загрузка…
Отмена
Сохранить