Commit b45eeac4f14b63280bed0d445ae11eb712bc87c8
1 parent
50e01da1
feat(adopt): 增加文档类型参数以优化消息转换逻辑- 在 ReceiveMessageCO 中新增 documentType 字段用于区分文档类型
- 修改 AdoptMessageServiceImpl 的 convertMessage 方法,传入 documentType 参数 - 更新 ITaxPipelineBusinessKeywordService 接口方法签名,增加 documentType 参数 - 调整 TaxPipelineBusinessConfigService 实现类中的查询逻辑,根据 documentType 过滤关键词配置 -为 TaxPipelineBusinessKeyword 查询条件添加 documentType 等值匹配规则
Showing
4 changed files
with
12 additions
and
3 deletions
tax-adopt/src/main/java/com/diligrp/tax/adopt/model/ReceiveMessageCO.java
tax-adopt/src/main/java/com/diligrp/tax/adopt/service/impl/AdoptMessageServiceImpl.java
| ... | ... | @@ -32,7 +32,7 @@ public class AdoptMessageServiceImpl implements AdoptMessageService { |
| 32 | 32 | public void convertMessage(ReceiveMessageCO receiveMessageCO) { |
| 33 | 33 | // 查询配置信息 |
| 34 | 34 | List<PipelineBusinessKeyword> pipelineBusinessKeywords = taxPipelineBusinessKeywordService.queryByTenantAndPipelineAndBusiness(receiveMessageCO.getGroup(), |
| 35 | - receiveMessageCO.getEntity(), receiveMessageCO.getPipelineCode(), receiveMessageCO.getBusinessCode()); | |
| 35 | + receiveMessageCO.getEntity(), receiveMessageCO.getPipelineCode(), receiveMessageCO.getBusinessCode(), receiveMessageCO.getDocumentType()); | |
| 36 | 36 | if (CollectionUtils.isEmpty(pipelineBusinessKeywords)) { |
| 37 | 37 | throw new TaxAgentServiceException("未找到配置信息"); |
| 38 | 38 | } | ... | ... |
tax-central/src/main/java/com/diligrp/tax/central/service/ITaxPipelineBusinessKeywordService.java
| ... | ... | @@ -18,5 +18,5 @@ public interface ITaxPipelineBusinessKeywordService { |
| 18 | 18 | * @param businessCode 业务代码 |
| 19 | 19 | * @return {@link List }<{@link PipelineBusinessKeyword }> |
| 20 | 20 | */ |
| 21 | - List<PipelineBusinessKeyword> queryByTenantAndPipelineAndBusiness(String group, String entity, String pipelineCode, String businessCode); | |
| 21 | + List<PipelineBusinessKeyword> queryByTenantAndPipelineAndBusiness(String group, String entity, String pipelineCode, String businessCode,String documentType); | |
| 22 | 22 | } | ... | ... |
tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxPipelineBusinessConfigService.java
| ... | ... | @@ -305,7 +305,7 @@ public class TaxPipelineBusinessConfigService implements ITaxPipelineBusinessKey |
| 305 | 305 | * @return {@link List }<{@link PipelineBusinessKeyword }> |
| 306 | 306 | */ |
| 307 | 307 | @Override |
| 308 | - public List<PipelineBusinessKeyword> queryByTenantAndPipelineAndBusiness(String group, String entity, String pipelineCode, String businessCode) { | |
| 308 | + public List<PipelineBusinessKeyword> queryByTenantAndPipelineAndBusiness(String group, String entity, String pipelineCode, String businessCode,String documentType) { | |
| 309 | 309 | Long tenantId = taxTenantService.getTenantId(group, entity); |
| 310 | 310 | TaxPipelineVO byTenantIdAndCode = taxPipelineService.getByTenantIdAndCode(tenantId, pipelineCode); |
| 311 | 311 | LambdaQueryWrapper<TaxPipelineBusiness> queryWrapper = new LambdaQueryWrapper<>(); |
| ... | ... | @@ -315,6 +315,7 @@ public class TaxPipelineBusinessConfigService implements ITaxPipelineBusinessKey |
| 315 | 315 | Optional.ofNullable(taxPipelineBusiness).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION)); |
| 316 | 316 | LambdaQueryWrapper<TaxPipelineBusinessKeyword> wrapper = new LambdaQueryWrapper<>(); |
| 317 | 317 | wrapper.eq(TaxPipelineBusinessKeyword::getTaxPipelineBusinessId, taxPipelineBusiness.getId()); |
| 318 | + wrapper.eq(TaxPipelineBusinessKeyword::getDocumentType, documentType); | |
| 318 | 319 | return taxPipelineBusinessKeywordRepository.selectList(wrapper).stream().map(item -> { |
| 319 | 320 | PipelineBusinessKeyword pipelineBusinessKeyword = JsonUtils.convertValue(item, PipelineBusinessKeyword.class); |
| 320 | 321 | pipelineBusinessKeyword.setDocumentFieldTypeEnum(DocumentFieldType.from(item.getDocumentFieldType())); | ... | ... |