Pārlūkot izejas kodu

根据合同工作内容查询列表

lamphua 2 dienas atpakaļ
vecāks
revīzija
5acd4257e9

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

@@ -69,6 +69,17 @@ public class CmcContractController extends BaseController
69 69
         return getDataTable(list);
70 70
     }
71 71
 
72
+    /**
73
+     * 模糊查询cmc合同评审列表
74
+     */
75
+    @GetMapping("/listFuzzy")
76
+    public TableDataInfo listFuzzy(CmcContract cmcContract)
77
+    {
78
+        startPage();
79
+        List<CmcContract> list = cmcContractService.selectCmcContractListFuzzy(cmcContract);
80
+        return getDataTable(list);
81
+    }
82
+
72 83
     /**
73 84
      * 获取cmc承接合同统计信息
74 85
      */

+ 13
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContract.java Parādīt failu

@@ -135,6 +135,9 @@ public class CmcContract extends BaseEntity
135 135
     /** 结算总额 */
136 136
     private BigDecimal settleAmount;
137 137
 
138
+    /** 查询字符 */
139
+    private String queryString;
140
+
138 141
     private SysUser draftUser;
139 142
 
140 143
     private SysUser managerUser;
@@ -470,6 +473,16 @@ public class CmcContract extends BaseEntity
470 473
         return budgetAmount;
471 474
     }
472 475
 
476
+    public void setQueryString(String queryString)
477
+    {
478
+        this.queryString = queryString;
479
+    }
480
+
481
+    public String getQueryString()
482
+    {
483
+        return queryString;
484
+    }
485
+
473 486
     @Override
474 487
     public String toString() {
475 488
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

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

@@ -37,6 +37,14 @@ public interface CmcContractMapper
37 37
      */
38 38
     public List<CmcContract> selectCmcContractList(CmcContract cmcContract);
39 39
 
40
+    /**
41
+     * 模糊查询cmc合同评审列表
42
+     *
43
+     * @param cmcContract cmc合同评审
44
+     * @return cmc合同评审集合
45
+     */
46
+    public List<CmcContract> selectCmcContractListFuzzy(CmcContract cmcContract);
47
+
40 48
     /**
41 49
      * 按时间范围查询cmc合同评审列表
42 50
      *

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

@@ -38,6 +38,14 @@ public interface ICmcContractService
38 38
      */
39 39
     public List<CmcContract> selectCmcContractList(CmcContract cmcContract);
40 40
 
41
+    /**
42
+     *模糊查询cmc合同评审列表
43
+     *
44
+     * @param cmcContract cmc合同评审
45
+     * @return cmc合同评审集合
46
+     */
47
+    public List<CmcContract> selectCmcContractListFuzzy(CmcContract cmcContract);
48
+
41 49
     /**
42 50
      * 按时间范围查询cmc合同评审列表
43 51
      *

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

@@ -57,6 +57,18 @@ public class CmcContractServiceImpl implements ICmcContractService
57 57
         return cmcContractMapper.selectCmcContractList(cmcContract);
58 58
     }
59 59
 
60
+    /**
61
+     * 模糊查询cmc合同评审列表
62
+     *
63
+     * @param cmcContract cmc合同评审
64
+     * @return cmc合同评审
65
+     */
66
+    @Override
67
+    public List<CmcContract> selectCmcContractListFuzzy(CmcContract cmcContract)
68
+    {
69
+        return cmcContractMapper.selectCmcContractListFuzzy(cmcContract);
70
+    }
71
+
60 72
     /**
61 73
      * 按时间范围查询cmc合同评审列表
62 74
      *

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

@@ -114,6 +114,45 @@
114 114
         order by c.draft_time desc
115 115
     </select>
116 116
 
117
+    <select id="selectCmcContractListFuzzy" parameterType="CmcContract" resultMap="CmcContractResult">
118
+        select distinct c.contract_id, c.contract_code, c.contract_name, c.contract_number, c.tender_id, t.project_name as t_project_name, p.project_number, p.project_name,
119
+        p.project_source, c.party_a_id, pa.party_a_name, t.a_person as a_person, t.a_phone as a_phone, t.agent as agent, t.agent_person as agent_person, sum(cp.paid_amount) as paid_amount,
120
+        t.agent_phone as agent_phone, c.amount, c.deposit, c.contract_document, c.drafter, u.nick_name as draft_nick_name, c.draft_time, c.remark, c.sign_date, c.sign_remark, c.sign_scan,
121
+        c.comment_type, c.manager_comment, c.manager_user_id, u1.nick_name as manager_nick_name, c.manager_time, c.gm_user_id, u2.nick_name as gm_nick_name, c.gm_time, c.gm_comment from cmc_contract as c
122
+        left join sys_user as u on u.user_id = c.drafter
123
+        left join sys_user as u1 on u1.user_id = c.manager_user_id
124
+        left join sys_user as u2 on u2.user_id = c.gm_user_id
125
+        left join cmc_tender as t on t.tender_id = c.tender_id
126
+        left join cmc_party_a as pa on pa.party_a_id = c.party_a_id
127
+        left join cmc_project_contract as pc on pc.contract_id = c.contract_id
128
+        left join cmc_project as p on pc.project_id = p.project_id
129
+        left join cmc_contract_paid as cp on cp.contract_id = c.contract_id
130
+        left join cmc_contract_work as cw on cw.contract_id = c.contract_id
131
+        <where>
132
+            cw.content like concat('%', #{queryString}, '%')
133
+            <if test="contractId != null  and contractId != ''"> and c.contract_id like concat('%', #{contractId}, '%')</if>
134
+            <if test="contractName!= null  and contractName != ''"> and c.contract_name like concat('%', #{contractName}, '%')</if>
135
+            <if test="contractCode!= null  and contractCode != ''"> and c.contract_code like concat('%', #{contractCode}, '%')</if>
136
+            <if test="tenderId != null  and tenderId != ''"> and c.tender_id = #{tenderId}</if>
137
+            <if test="contractNumber != null  and contractNumber != ''"> and c.contract_number = #{contractNumber}</if>
138
+            <if test="partyAId != null  and partyAId != ''"> and c.party_a_id = #{partyAId}</if>
139
+            <if test="amount != null "> and c.amount = #{amount}</if>
140
+            <if test="deposit != null "> and c.deposit = #{deposit}</if>
141
+            <if test="contractDocument != null  and contractDocument != ''"> and c.contract_document = #{contractDocument}</if>
142
+            <if test="drafter != null "> and c.drafter = #{drafter}</if>
143
+            <if test="draftTime != null "> and c.draft_time = #{draftTime}</if>
144
+            <if test="signDate != null "> and YEAR(c.sign_date) = YEAR(#{signDate})</if>
145
+            <if test="signRemark != null  and signRemark != ''"> and c.sign_remark = #{signRemark}</if>
146
+            <if test="signScan != null  and signScan != ''"> and c.sign_scan = #{signScan}</if>
147
+            <if test="commentType != null  and commentType != ''"> and c.comment_type = #{commentType}</if>
148
+            <if test="projectSource != null  and projectSource != ''"> and p.project_source = #{projectSource}</if>
149
+            <if test="projectName != null  and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
150
+            <if test="partyAName != null  and partyAName != ''"> and pa.party_a_name like concat('%', #{partyAName}, '%')</if>
151
+        </where>
152
+        group by c.contract_id
153
+        order by c.draft_time desc
154
+    </select>
155
+
117 156
     <select id="selectCmcContractListByRange" parameterType="CmcContract" resultMap="CmcContractResult">
118 157
         <include refid="selectCmcContractVo"/>
119 158
         <where>

+ 11
- 2
oa-ui/src/api/oa/contract/contract.js Parādīt failu

@@ -1,8 +1,8 @@
1 1
 /*
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:09
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-20 09:37:59
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2025-07-17 10:09:46
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -15,6 +15,15 @@ export function listContract(query) {
15 15
   })
16 16
 }
17 17
 
18
+// 模糊查询cmc合同评审列表
19
+export function listContractFuzzy(query) {
20
+  return request({
21
+    url: '/oa/contract/listFuzzy',
22
+    method: 'get',
23
+    params: query
24
+  })
25
+}
26
+
18 27
 // 查询cmc合同评审详细
19 28
 export function getContract(contractId) {
20 29
   return request({

+ 48
- 22
oa-ui/src/views/oa/contract/index.vue Parādīt failu

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:52:00
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-17 15:12:03
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2025-07-17 10:57:14
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -22,7 +22,11 @@
22 22
             :value="partyA.partyAId">
23 23
           </el-option>
24 24
         </el-select>
25
-      </el-form-item>
25
+      </el-form-item>      
26
+      <el-form-item label="工作内容" prop="queryString">
27
+          <el-input v-model="queryParams.queryString" placeholder="请输入关键字" clearable
28
+            @keyup.enter.native="handleQuery" />
29
+        </el-form-item>
26 30
       <el-form-item>
27 31
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
28 32
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -128,7 +132,7 @@
128 132
 </template>
129 133
 
130 134
 <script>
131
-import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
135
+import { listContract, listContractFuzzy, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
132 136
 import { listPartyA } from "@/api/oa/partyA/partyA";
133 137
 import contractInfo from './contractInfo.vue';
134 138
 import ContractForm from '../../flowable/form/business/contractForm.vue';
@@ -178,7 +182,8 @@ export default {
178 182
         signDate: null,
179 183
         signRemark: null,
180 184
         signScan: null,
181
-        commentType: null
185
+        commentType: null,
186
+        queryString: undefined,
182 187
       },
183 188
       // 表单参数
184 189
       form: {},
@@ -202,23 +207,44 @@ export default {
202 207
     /** 查询cmc合同评审列表 */
203 208
     getList() {
204 209
       this.loading = true;
205
-      listContract(this.queryParams).then(response => {
206
-        this.contractList = response.rows;
207
-        this.total = response.total;
208
-        for (let contract of this.contractList) {
209
-          listContractPaid({ contractId: contract.contractId }).then(res => {
210
-            if (res.total > 0) {
211
-              let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
212
-              let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
213
-              this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
214
-              this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
215
-            } else {
216
-              this.$set(contract, 'percentage', 0)
217
-            }
218
-            this.loading = false;
219
-          })
220
-        }
221
-      });
210
+      if (this.queryParams.queryString == '' || this.queryParams.queryString == undefined || this.queryParams.queryString == null) {
211
+        listContract(this.queryParams).then(response => {
212
+          this.contractList = response.rows;
213
+          this.total = response.total;
214
+          for (let contract of this.contractList) {
215
+            listContractPaid({ contractId: contract.contractId }).then(res => {
216
+              if (res.total > 0) {
217
+                let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
218
+                let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
219
+                this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
220
+                this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
221
+              } else {
222
+                this.$set(contract, 'percentage', 0)
223
+              }
224
+              this.loading = false;
225
+            })
226
+          }
227
+        });
228
+      }
229
+      else {
230
+        listContractFuzzy(this.queryParams).then(response => {
231
+          this.contractList = response.rows;
232
+          this.total = response.total;
233
+          for (let contract of this.contractList) {
234
+            listContractPaid({ contractId: contract.contractId }).then(res => {
235
+              if (res.total > 0) {
236
+                let percentage = res.rows.reduce((sum, item) => sum + Number(item.paidPercentage), 0);
237
+                let paidAmount = res.rows.reduce((sum, item) => sum + Number(item.paidAmount), 0);
238
+                this.$set(contract, 'percentage', Number(percentage.toFixed(2)))
239
+                this.$set(contract, 'paidAmount', Number(paidAmount.toFixed(2)))
240
+              } else {
241
+                this.$set(contract, 'percentage', 0)
242
+              }
243
+              this.loading = false;
244
+            })
245
+          }
246
+        });
247
+      }
222 248
     },
223 249
     // 取消按钮
224 250
     cancel() {

Notiek ielāde…
Atcelt
Saglabāt