From 559c36b78f5d75e2a563cfd6273c0fe4c4e99827 Mon Sep 17 00:00:00 2001 From: guojunyun Date: Fri, 31 Oct 2025 09:27:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=88=E5=90=8C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=BD=E8=B4=B82.0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=90=88=E5=90=8C=E3=80=81=E5=9B=BD=E8=B4=B8?= =?UTF-8?q?2.0=E7=B3=BB=E7=BB=9F=E5=90=88=E5=90=8C=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/ErrorCodeConstants.java | 1 + .../admin/contract/ContractController.java | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/ErrorCodeConstants.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/ErrorCodeConstants.java index b3edc42..bb50fb2 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/ErrorCodeConstants.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/ErrorCodeConstants.java @@ -30,4 +30,5 @@ public interface ErrorCodeConstants { ErrorCode CONTRACT_SUBMIT_ERP_FAIL = new ErrorCode(1_027_000_015, "合同提交erp失败:{}"); ErrorCode CONTRACT_UNKNOWN_OPERATE = new ErrorCode(1_027_000_016, "未知的操作"); ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在"); + ErrorCode CONTRACT_PUSH_FAIL = new ErrorCode(1_027_000_019, "推送合同失败:{}"); } diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/ContractController.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/ContractController.java index 2d79e74..0f8e1d4 100644 --- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/ContractController.java +++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/ContractController.java @@ -5,7 +5,10 @@ import com.zt.plat.framework.business.interceptor.BusinessControllerMarker; import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.module.contractorder.api.ContractApi; import com.zt.plat.module.contractorder.api.vo.contract.*; +import com.zt.plat.module.contractorder.api.vo.contract.international.IntContract; +import com.zt.plat.module.contractorder.api.vo.contract.international.IntContractPageReq; import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO; import com.zt.plat.module.contractorder.service.contract.ContractService; import io.swagger.v3.oas.annotations.Operation; @@ -23,6 +26,7 @@ import java.util.List; import static com.zt.plat.framework.common.pojo.CommonResult.error; import static com.zt.plat.framework.common.pojo.CommonResult.success; +import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_PUSH_FAIL; import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_SUBMIT_ERP_FAIL; @Slf4j @@ -34,6 +38,8 @@ public class ContractController implements BusinessControllerMarker { @Resource private ContractService contractService; + @Resource + private ContractApi contractApi; @GetMapping("/page") @Operation(summary = "获得合同分页列表") @@ -186,4 +192,22 @@ public class ContractController implements BusinessControllerMarker { public CommonResult relation(@RequestBody RelationReqVo reqVo) { return success(contractService.relation(reqVo)); } + + @PostMapping("/push") + @Operation(summary = "国贸2.0系统推送合同") + @PreAuthorize("@ss.hasPermission('base:contract:create')") + CommonResult push(@Valid @RequestBody IntContract reqVO) { + try { + return contractApi.push(reqVO); + } catch (Exception e) { + return error(CONTRACT_PUSH_FAIL, e.getMessage()); + } + } + + @PostMapping("/logistics/list/page") + @Operation(summary = "国贸2.0系统合同分页查询") + @PreAuthorize("@ss.hasPermission('base:contract:query')") + CommonResult> logisticsListPage(IntContractPageReq pageReq) { + return contractApi.logisticsListPage(pageReq); + } } From bfe90f389245d841ea2d645b6667c337f685e9dd Mon Sep 17 00:00:00 2001 From: guojunyun Date: Fri, 31 Oct 2025 09:45:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/contract/ContractServiceImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractServiceImpl.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractServiceImpl.java index f02f2c7..ab19798 100644 --- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractServiceImpl.java +++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractServiceImpl.java @@ -921,13 +921,9 @@ public class ContractServiceImpl implements ContractService { } // 更新合同主信息 - contractMainMapper.updateById(newContractMainDO); - // 模板实例ID更新为null - if (newContractMainDO.getInstanceId() == null) { - contractMainMapper.update(new LambdaUpdateWrapper<>(ContractMainDO.class) - .set(ContractMainDO::getInstanceId, null) - .eq(ContractMainDO::getId, newContractMainDO.getId())); - } + contractMainMapper.update(newContractMainDO, new LambdaUpdateWrapper<>(ContractMainDO.class) + .set(ContractMainDO::getInstanceId, newContractMainDO.getInstanceId()) + .eq(ContractMainDO::getId, newContractMainDO.getId())); if (DictEnum.BSE_CTRT_STS_IN_PROGRESS.getCode().equals(newContractMainDO.getStatus())) { // 执行中合同重新提交erp