From 96118de3ac74f5468cf5d4ac73d6ea3bec1da010 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期五, 20 十一月 2026 14:36:25 +0800
Subject: [PATCH] feat:新增销售指标 产品板块 重点工作 专项业务 产品收入和合同统计修改功能 feat:承兑新增承兑编号字段 feat:客商主数据更新名称 专项业务去年同月字段 机动车销售发票地址字段及判断 feat:银行流水更新客户id feat:机动车销售发票新增税务及代码字段 feat:流水更新按钮参数 feat:检索新增标的物运维按钮
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java
index 022e1ae..ff47e1e 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java
@@ -13,12 +13,9 @@
import com.by4cloud.platformx.admin.api.entity.SysDept;
import com.by4cloud.platformx.admin.api.vo.DeptExcelVO;
import com.by4cloud.platformx.business.dto.ContractSubjectMatterAddDTO;
-import com.by4cloud.platformx.business.entity.ContractSubjectMatter;
-import com.by4cloud.platformx.business.entity.Product;
-import com.by4cloud.platformx.business.entity.TaxCode;
-import com.by4cloud.platformx.business.mapper.ContractSubjectMatterMapper;
-import com.by4cloud.platformx.business.mapper.ProductMapper;
-import com.by4cloud.platformx.business.mapper.TaxCodeMapper;
+import com.by4cloud.platformx.business.dto.ContractSubjectMatterAnnotateDTO;
+import com.by4cloud.platformx.business.entity.*;
+import com.by4cloud.platformx.business.mapper.*;
import com.by4cloud.platformx.business.service.ContractSubjectMatterService;
import com.by4cloud.platformx.business.vo.ContractSubjectMatterVo;
import com.by4cloud.platformx.business.vo.SubjectMatterExcelVO;
@@ -51,9 +48,13 @@
@Slf4j
public class ContractSubjectMatterServiceImpl extends ServiceImpl<ContractSubjectMatterMapper, ContractSubjectMatter> implements ContractSubjectMatterService {
+ private final ContractMapper contractMapper;
+
private final ProductMapper productMapper;
private final TaxCodeMapper taxCodeMapper;
+
+ private final BipDictMapper bipDictMapper;
private final StringRedisTemplate redisTemplate;
@@ -376,4 +377,46 @@
log.info("鐭崇叅鏈衡�斺�攖enant1鍚堝悓鏂板浜у搧瀵煎叆鏌ヨ鍥炲弬锛歿}", response.body());
return R.ok(response.body());
}
+
+ @Override
+ public R annotate(List<ContractSubjectMatterAnnotateDTO> annotateDTOList) {
+ if (CollUtil.isNotEmpty(annotateDTOList)){
+ Long contractId = annotateDTOList.get(0).getContractId();
+ annotateDTOList.stream().forEach(annotateDTO->{
+ ContractSubjectMatter subjectMatter = baseMapper.selectById(annotateDTO.getId());
+
+ subjectMatter.setBusinessProject(annotateDTO.getBusinessProject());
+
+ if (StrUtil.isNotBlank(annotateDTO.getProductCategory())){
+ subjectMatter.setProductCategory(annotateDTO.getProductCategory());
+ BipDict dict = bipDictMapper.selectOne(Wrappers.<BipDict>lambdaQuery().eq(BipDict::getDictCode,annotateDTO.getProductCategory())
+ .eq(BipDict::getCompId,SecurityUtils.getUser().getCompId()).eq(BipDict::getDictKey,"zb-cpmc").last("limit 1"));
+ if (ObjUtil.isNotNull(dict)){
+ subjectMatter.setProductSection(dict.getProductSection());
+ }
+ }
+
+ baseMapper.updateById(subjectMatter);
+ });
+ List<ContractSubjectMatter> subjectMatterList = baseMapper.selectList(Wrappers.<ContractSubjectMatter>lambdaQuery()
+ .eq(ContractSubjectMatter::getContractId,contractId)
+ .and(wrapper -> wrapper.isNull(ContractSubjectMatter::getProductSection)
+ .or().isNull(ContractSubjectMatter::getBusinessProject)
+ .or().isNull(ContractSubjectMatter::getProductCategory)));
+ if (CollUtil.isEmpty(subjectMatterList)){
+ contractMapper.update(Wrappers.<Contract>lambdaUpdate().eq(Contract::getId,contractId).set(Contract::getAnnotateFlag,"1"));
+ }
+ }
+ return R.ok();
+ }
+
+ @Override
+ public R batchUpd(List<ContractSubjectMatter> list) {
+ if(CollUtil.isNotEmpty(list)){
+ list.stream().forEach(contractSubjectMatter -> {
+ baseMapper.updateById(contractSubjectMatter);
+ });
+ }
+ return R.ok();
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1