Pārlūkot izejas kodu

人员参与项目信息补全

lamphua 1 nedēļu atpakaļ
vecāks
revīzija
2790a39d2f

+ 10
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Parādīt failu

@@ -158,6 +158,16 @@ public class CmcProjectController extends BaseController {
158 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 Parādīt failu

@@ -27,6 +27,14 @@ public interface CmcProjectMapper
27 27
      */
28 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 39
      * 查询cmc测绘项目列表
32 40
      * 

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectService.java Parādīt failu

@@ -27,6 +27,14 @@ public interface ICmcProjectService
27 27
      */
28 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 39
      * 查询cmc测绘项目列表
32 40
      * 

+ 12
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectServiceImpl.java Parādīt failu

@@ -44,6 +44,18 @@ public class CmcProjectServiceImpl implements ICmcProjectService
44 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 60
      * 查询cmc测绘项目列表
49 61
      * 

+ 1
- 6
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml Parādīt failu

@@ -166,12 +166,7 @@
166 166
             <if test="projectSource != null  and projectSource != ''"> and p.project_source = #{projectSource}</if>
167 167
             <if test="projectName != null  and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
168 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 170
         </where>
176 171
         group by t1.contract_id
177 172
         order by t1.draft_time desc

+ 14
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml Parādīt failu

@@ -311,6 +311,20 @@
311 311
         and find_in_set(p.project_number, #{projectNumber})
312 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 328
     <insert id="insertCmcProject" parameterType="CmcProject">
315 329
         insert into cmc_project
316 330
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 9
- 0
oa-ui/src/api/oa/project/project.js Parādīt failu

@@ -93,3 +93,12 @@ export function getProjectType() {
93 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 Parādīt failu

@@ -87,6 +87,11 @@
87 87
           </template>
88 88
         </el-table-column>
89 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 95
         <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
91 96
           <template slot-scope="scope" v-if="scope.row.userId !== 1">
92 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 Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt