From 0ee46d33cc339f3fd17593e6bfe2f033afe6019a Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期三, 17 六月 2026 15:14:13 +0800
Subject: [PATCH] feat:合同新增时显示供应属性 出库新增根据合同出库 资金账目新增时间条件检索 新增延期出货菜单
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java | 71 +++++++++++++++++++++++++++++++----
1 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
index ef61fb2..f3447f0 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
@@ -6,8 +6,10 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.by4cloud.platformx.business.dto.ContracQueryDTO;
import com.by4cloud.platformx.business.dto.ContractAddDTO;
import com.by4cloud.platformx.business.dto.ContractUpdateDTO;
+import com.by4cloud.platformx.business.dto.DelayOutApprovalDTO;
import com.by4cloud.platformx.business.entity.Contract;
import com.by4cloud.platformx.common.core.util.R;
import com.by4cloud.platformx.common.data.mybatis.BaseModel;
@@ -49,19 +51,19 @@
/**
* 鍒嗛〉鏌ヨ
* @param page 鍒嗛〉瀵硅薄
- * @param contract 鍚堝悓绠$悊
+ * @param queryDTO 鍚堝悓绠$悊
* @return
*/
@Operation(summary = "鍒嗛〉鏌ヨ" , description = "鍒嗛〉鏌ヨ" )
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('business_contract_view')" )
- public R getContractPage(@ParameterObject Page page, @ParameterObject Contract contract) {
+ public R getContractPage(@ParameterObject Page page, @ParameterObject ContracQueryDTO queryDTO) {
LambdaQueryWrapper<Contract> wrapper = Wrappers.lambdaQuery();
- wrapper.like(StringUtils.isNotBlank(contract.getContractName()),Contract::getContractName,contract.getContractName());
- wrapper.like(StringUtils.isNotBlank(contract.getPartyA()),Contract::getPartyA,contract.getPartyA());
- wrapper.eq(ObjUtil.isNotNull(contract.getContractStatus()),Contract::getContractStatus,contract.getContractStatus());
- wrapper.orderByDesc(BaseModel::getCreateTime);
- return R.ok(contractService.pageByScope(page, wrapper));
+// wrapper.like(StringUtils.isNotBlank(contract.getContractName()),Contract::getContractName,contract.getContractName());
+// wrapper.like(StringUtils.isNotBlank(contract.getPartyA()),Contract::getPartyA,contract.getPartyA());
+// wrapper.eq(ObjUtil.isNotNull(contract.getContractStatus()),Contract::getContractStatus,contract.getContractStatus());
+// wrapper.orderByDesc(Contract::getCreateTime);
+ return R.ok(contractService.pageScope(page, queryDTO));
}
@@ -131,6 +133,14 @@
}
/**
+ * list 涓嬫媺
+ */
+ @GetMapping("/list")
+ public R list() {
+ return R.ok(contractService.list(Wrappers.<Contract>lambdaQuery().eq(Contract::getContractStatus,2).orderByDesc(Contract::getCreateTime)));
+ }
+
+ /**
* 鍚姩瀹℃牳娴佺▼
* @param id id
* @return R
@@ -182,7 +192,9 @@
@GetMapping("/listByBusId/{busId}" )
public R listByBusId(@PathVariable("busId" ) Long busId) {
return R.ok(contractService.listByScope(Wrappers.<Contract>lambdaQuery().eq(Contract::getPartyAId,busId)
- .gt(Contract::getBillingAmout,new BigDecimal("0"))));
+ .eq(Contract::getPartyBId,SecurityUtils.getUser().getCompId())
+ .gt(Contract::getBillingAmout,new BigDecimal("0"))
+ .apply("paid_amount < billing_amout")));
}
/**
@@ -195,4 +207,47 @@
public void exportContractYMJJGCLWord(@PathVariable("id" ) Long id, HttpServletResponse response) {
contractService.exportContractYMJJGCLWord(id,response);
}
+
+ /**
+ * 鏍规嵁妯$増鐢熸垚word涓�鐓ゆ満宸ヤ笟鍝佷拱鍗栧悎鍚�
+ * @param id id
+ * @return R
+ */
+ @Operation(summary = "鏍规嵁妯$増鐢熸垚word鍚堝悓" , description = "鏍规嵁妯$増鐢熸垚word鍚堝悓" )
+ @GetMapping("/exportContractYMJGYPMMWord/{id}" )
+ public void exportContractYMJGYPMMWord(@PathVariable("id" ) Long id, HttpServletResponse response) {
+ contractService.exportContractYMJGYPMMWord(id,response);
+ }
+
+ /**
+ * 鏍规嵁妯$増鐢熸垚word涓�鐓ゆ満宸ョ熆浜у搧涔板崠鍚堝悓
+ * @param id id
+ * @return R
+ */
+ @Operation(summary = "鏍规嵁妯$増鐢熸垚word鍚堝悓" , description = "鏍规嵁妯$増鐢熸垚word鍚堝悓" )
+ @GetMapping("/exportContractYMJGKCPMMWord/{id}" )
+ public void exportContractYMJGKCPMMWord(@PathVariable("id" ) Long id, HttpServletResponse response) {
+ contractService.exportContractYMJGKCPMMWord(id,response);
+ }
+
+ /**
+ * 鏍规嵁妯$増鐢熸垚word涓�鐓ゆ満閲囪喘鍚堝悓
+ * @param id id
+ * @return R
+ */
+ @Operation(summary = "鏍规嵁妯$増鐢熸垚word鍚堝悓" , description = "鏍规嵁妯$増鐢熸垚word鍚堝悓" )
+ @GetMapping("/exportContractYMJCGWord/{id}" )
+ public void exportContractYMJCGWord(@PathVariable("id" ) Long id, HttpServletResponse response) {
+ contractService.exportContractYMJCGWord(id,response);
+ }
+
+ /**
+ * 寤舵湡鍑鸿揣瀹℃壒
+ */
+
+ @PostMapping("/delayOutApproval")
+ public R delayOutApproval(@RequestBody DelayOutApprovalDTO dto) {
+ return contractService.delayOutApproval(dto);
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.1