From 01ec70e3c229893badf6c2522489df4309ca4ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Thu, 2 Jul 2026 15:59:58 +0800 Subject: [PATCH] 3.0.5 --- .../mhd/system/api/SystemServiceFeign.java | 2 +- .../RemoteSystemFeignFallbackFactory.java | 7 +- .../ContractManageApplicationService.java | 9 +- .../contractManage/ContractManageApi.java | 4 +- .../mapper/basic/ContractManageMapper.xml | 111 +++++++++--------- .../BusinessDocumentApplicationService.java | 2 +- 6 files changed, 69 insertions(+), 66 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java index 2c372f6b9..4ce362167 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java @@ -359,7 +359,7 @@ public interface SystemServiceFeign { @ApiOperation("根据结算主体和费用科目获取合同信息") @GetMapping(value = "/contractManageApi/getInfoByCustomerAndSecondSubjectCode") - public AjaxResult getInfoByCustomerAndSecondSubjectCode(@RequestParam("settlementCustomersCode") String settlementCustomersCode,@RequestParam("contractType") Integer contractType,@RequestParam("firstSubjectCode") String firstSubjectCode); + public AjaxResult getInfoByCustomerAndSecondSubjectCode(@RequestParam("settlementCustomersCode") String settlementCustomersCode,@RequestParam("contractType") Integer contractType,@RequestParam("firstSubjectCode") String firstSubjectCode,@RequestParam("topOrganizationId") Long topOrganizationId,@RequestParam("organizationId") Long organizationId); /** * 根据结算主体获取合同信息 diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java index 41f189f1f..515150f72 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java @@ -284,6 +284,11 @@ public class RemoteSystemFeignFallbackFactory implements FallbackFactory contractManagePOList = contractManageDomainService.queryList(queryParam); List contractManagePOs = contractManagePOList.stream() .filter(item -> item.getSettlementCustomersCode().equals(settlementCustomersCode) diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManage/ContractManageApi.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManage/ContractManageApi.java index 540650ae9..c48ef479b 100644 --- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManage/ContractManageApi.java +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManage/ContractManageApi.java @@ -162,9 +162,9 @@ public class ContractManageApi extends BaseController{ @ApiOperation("根据结算主体和费用科目获取合同信息") @GetMapping(value = "/getInfoByCustomerAndSecondSubjectCode") - public AjaxResult getInfoByCustomerAndSecondSubjectCode(@RequestParam("settlementCustomersCode") String settlementCustomersCode,@RequestParam("contractType") Integer contractType,@RequestParam("firstSubjectCode") String firstSubjectCode) + public AjaxResult getInfoByCustomerAndSecondSubjectCode(@RequestParam("settlementCustomersCode") String settlementCustomersCode,@RequestParam("contractType") Integer contractType,@RequestParam("firstSubjectCode") String firstSubjectCode,@RequestParam("topOrganizationId") Long topOrganizationId,@RequestParam("organizationId") Long organizationId) { - return AjaxResult.success(contractManageApplicationService.getInfoByCustomerAndSecondSubjectCode(settlementCustomersCode,contractType,null,firstSubjectCode)); + return AjaxResult.success(contractManageApplicationService.getInfoByCustomerAndSecondSubjectCode(settlementCustomersCode,contractType,topOrganizationId,organizationId,firstSubjectCode)); } @ApiOperation("根据结算主体获取合同信息") diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml index ec8c105fa..7b1b8a9db 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml @@ -17,101 +17,99 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and a.create_by_name like concat('%', #{createByName}, '%') + and create_by_name like concat('%', #{createByName}, '%') - and a.update_by_name like concat('%', #{updateByName}, '%') + and update_by_name like concat('%', #{updateByName}, '%') - and a.top_organization_id = #{topOrganizationId} + and top_organization_id = #{topOrganizationId} - and a.organization_id = #{organizationId} + and organization_id = #{organizationId} - and a.organization_name like concat('%', #{organizationName}, '%') + and organization_name like concat('%', #{organizationName}, '%') - and a.contract_number = #{contractNumber} + and contract_number = #{contractNumber} - and a.contract_name like concat('%', #{contractName}, '%') + and contract_name like concat('%', #{contractName}, '%') - and a.common_contract_flag = #{commonContractFlag} + and common_contract_flag = #{commonContractFlag} - and a.contract_type = #{contractType} + and contract_type = #{contractType} - and a.contract_state = #{contractState} + and contract_state = #{contractState} - and a.signing_unit = #{signingUnit} + and asigning_unit = #{signingUnit} - and a.settlement_customers = #{settlementCustomers} + and settlement_customers = #{settlementCustomers} - and a.settlement_customers_id = #{settlementCustomersId} + and settlement_customers_id = #{settlementCustomersId} - and a.settlement_customers_code = #{settlementCustomersCode} + and settlement_customers_code = #{settlementCustomersCode} - and a.our_identity = #{ourIdentity} + and our_identity = #{ourIdentity} - and a.accounting_period = #{accountingPeriod} + and accounting_period = #{accountingPeriod} - and a.signing_date = #{signingDate} + and signing_date = #{signingDate} - and a.effective_date = #{effectiveDate} + and effective_date = #{effectiveDate} - and a.expiration_date = #{expirationDate} + and expiration_date = #{expirationDate} - and a.contract_original_url = #{contractOriginalUrl} + and contract_original_url = #{contractOriginalUrl} - and a.integrity_agreement_url = #{integrityAgreementUrl} + and integrity_agreement_url = #{integrityAgreementUrl} - and a.security_protocol_url = #{securityProtocolUrl} + and security_protocol_url = #{securityProtocolUrl} - and a.other_attachments_url = #{otherAttachmentsUrl} + and other_attachments_url = #{otherAttachmentsUrl} - and a.our_singed = #{ourSinged} + and our_singed = #{ourSinged} - and a.our_singed_phone = #{ourSingedPhone} + and our_singed_phone = #{ourSingedPhone} - and a.our_operator = #{ourOperator} + and our_operator = #{ourOperator} - and a.our_operator_phone = #{ourOperatorPhone} + and our_operator_phone = #{ourOperatorPhone} - and a.they_singed = #{theySinged} + and they_singed = #{theySinged} - and a.they_singed_phone = #{theySingedPhone} + and they_singed_phone = #{theySingedPhone} - and a.they_operator = #{theyOperator} + and they_operator = #{theyOperator} - and a.they_operator_phone = #{theyOperatorPhone} - - - and b.FIRST_SUBJECT_CODE = #{firstSubjectCode} + and they_operator_phone = #{theyOperatorPhone} + @@ -136,72 +134,75 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - and contract_number like concat('%', #{contractManageDO.contractNumber}, '%') + and a.contract_number like concat('%', #{contractManageDO.contractNumber}, '%') - and original_contract_number like concat('%', #{contractManageDO.originalContractNumber}, '%') + and a.original_contract_number like concat('%', #{contractManageDO.originalContractNumber}, '%') - and common_contract_flag = #{contractManageDO.commonContractFlag} + and a.common_contract_flag = #{contractManageDO.commonContractFlag} - and contract_type = #{contractManageDO.contractType} + and a.contract_type = #{contractManageDO.contractType} - and settlement_customers like concat('%', #{contractManageDO.settlementCustomers}, '%') + and a.settlement_customers like concat('%', #{contractManageDO.settlementCustomers}, '%') - and settlement_customers_code = #{contractManageDO.settlementCustomersCode} + and a.settlement_customers_code = #{contractManageDO.settlementCustomersCode} - and signing_unit like concat('%', #{contractManageDO.signingUnit}, '%') + and a.signing_unit like concat('%', #{contractManageDO.signingUnit}, '%') - and contract_name like concat('%', #{contractManageDO.contractName}, '%') + and a.contract_name like concat('%', #{contractManageDO.contractName}, '%') - and contract_state = #{contractManageDO.contractState} + and a.contract_state = #{contractManageDO.contractState} - AND date_format(signing_date,'%Y-%m-%d') =]]> #{contractManageDO.signingDateStart} + AND date_format(a.signing_date,'%Y-%m-%d') =]]> #{contractManageDO.signingDateStart} - AND date_format(signing_date,'%Y-%m-%d') #{contractManageDO.signingDateEnd} + AND date_format(a.signing_date,'%Y-%m-%d') #{contractManageDO.signingDateEnd} - AND date_format(effective_date,'%Y-%m-%d') =]]> #{contractManageDO.effectiveDateStart} + AND date_format(a.effective_date,'%Y-%m-%d') =]]> #{contractManageDO.effectiveDateStart} - AND date_format(effective_date,'%Y-%m-%d') #{contractManageDO.effectiveDateEnd} + AND date_format(a.effective_date,'%Y-%m-%d') #{contractManageDO.effectiveDateEnd} - AND date_format(expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.expirationDateStart} + AND date_format(a.expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.expirationDateStart} - AND date_format(expiration_date,'%Y-%m-%d') #{contractManageDO.expirationDateEnd} + AND date_format(a.expiration_date,'%Y-%m-%d') #{contractManageDO.expirationDateEnd} AND ( - date_format(effective_date,'%Y-%m-%d') #{contractManageDO.expirationDateString} - AND date_format(expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.effectiveDateString} + date_format(a.effective_date,'%Y-%m-%d') #{contractManageDO.expirationDateString} + AND date_format(a.expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.effectiveDateString} ) AND ( - date_format(expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.nowDateString} - AND date_format(effective_date,'%Y-%m-%d') #{contractManageDO.nowDateString} + date_format(a.expiration_date,'%Y-%m-%d') =]]> #{contractManageDO.nowDateString} + AND date_format(a.effective_date,'%Y-%m-%d') #{contractManageDO.nowDateString} ) - and organization_id = #{contractManageDO.organizationId} + and a.organization_id = #{contractManageDO.organizationId} - and top_organization_id = #{contractManageDO.topOrganizationId} + and a.top_organization_id = #{contractManageDO.topOrganizationId} + + + and b.FIRST_SUBJECT_CODE = #{contractManageDO.firstSubjectCode} diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/businessDocument/BusinessDocumentApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/businessDocument/BusinessDocumentApplicationService.java index ce684c175..63feec9a1 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/application/server/businessDocument/BusinessDocumentApplicationService.java +++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/businessDocument/BusinessDocumentApplicationService.java @@ -484,7 +484,7 @@ public class BusinessDocumentApplicationService { if(businessDocumentDO.getBelongModuleCode().equals(BelongModuleCode.WMS.getCode())){ contractType = 1; } - AjaxResult ajaxResult = systemServiceFeign.getInfoByCustomerAndOrganizationId(businessDocumentDO.getSettlementCustomersCode(),contractType,businessDocumentDO.getTopOrganizationId(),businessDocumentDO.getOrganizationId()); + AjaxResult ajaxResult = systemServiceFeign.getInfoByCustomerAndSecondSubjectCode(businessDocumentDO.getSettlementCustomersCode(),contractType,businessDocumentDO.getFirstSubjectCode(),businessDocumentDO.getTopOrganizationId(),businessDocumentDO.getOrganizationId()); if(!"200".equals(String.valueOf(ajaxResult.get("code")))) { throw new ServiceException("合同信息未找到"); }