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/OutBoundServiceImpl.java | 37 ++++++++++++++++++++++++++++++++++---
1 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
index 29eaa91..0bad602 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
@@ -18,6 +18,7 @@
import com.by4cloud.platformx.common.security.util.SecurityUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@@ -35,6 +36,7 @@
* @author syt
* @date 2026-04-29 11:32:05
*/
+@Slf4j
@Service
@RequiredArgsConstructor
public class OutBoundServiceImpl extends ServiceImpl<OutBoundMapper, OutBound> implements OutBoundService {
@@ -43,7 +45,7 @@
private final ContractSubjectMatterMapper contractSubjectMatterMapper;
private final PaymentConfirmMapper paymentConfirmMapper;
private final ContractMapper contractMapper;
- private final ContractPaymentScheduleProcessMapper scheduleProcessMapper;
+ private final ProductMapper productMapper;
private final ContractOutBoundMapper contractOutBoundMapper;
private final DeliveryOverdueMapper deliveryOverdueMapper;
private final StringRedisTemplate redisTemplate;
@@ -400,7 +402,8 @@
PaymentConfirm lastNewConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, contract.getId())
.orderByDesc(PaymentConfirm::getCreateTime).last("limit 1"));
if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0
- && contract.getBillingAmout().compareTo(contract.getAmount()) == 0) {
+ && contract.getBillingAmout().compareTo(contract.getAmount()) == 0&&
+ StrUtil.isBlank(contract.getNextScheduleName())) {
//鏈夐浠樹笖瓒呰繃搴旀敹 鍏抽棴鍚堝悓鐘舵��
contract.setContractStatus(3);
contractMapper.updateById(contract);
@@ -429,6 +432,7 @@
contractOutBound.setLineNo(subjectMatter.getLineNo());
contractOutBound.setInvoiceStatus("0");
contractOutBound.setInvoiceNum(new BigDecimal("0"));
+ contractOutBound.setUnitPrice(subjectMatter.getUnitPrice());
contractOutBoundMapper.insert(contractOutBound);
if (!StrUtil.equals(contract.getContractCategory(), "water_house")) {
// 1. 纭畾鐢ㄤ簬姣旇緝鐨勫熀鍑嗘棩鏈燂紙浼樺厛绾э細璁″垝浜よ揣鏃ユ湡 > 鍚堝悓鍒版湡鏃ユ湡锛�
@@ -575,6 +579,9 @@
if (subjectMatter.getRemainingQuantity().compareTo(new BigDecimal("0")) == 0) {
subjectMatter.setDeliveryStatus(2);
}
+ if (StrUtil.isBlank(subjectMatter.getMaterialCode())){
+ subjectMatter.setMaterialCode(outSubjectMatterAddDTO.getSubjectMatterCode());
+ }
subjectMatter.setActualDeliveryDate(addDTO.getOutBoundTime());
contractSubjectMatterMapper.updateById(subjectMatter);
//淇濆瓨erp鍑哄簱
@@ -616,6 +623,22 @@
outBound.setOutBoundTime(ObjUtil.isNotNull(addDTO.getOutBoundTime()) ? addDTO.getOutBoundTime() : new Date());
outBound.setSubjectMatterCode(outSubjectMatterAddDTO.getSubjectMatterCode());
outBound.setSubjectMatterName(outSubjectMatterAddDTO.getSubjectMatterName());
+ List<String> smjList = new ArrayList<>();
+ smjList.add(smj);
+ smjList.add(smjhw);
+ if (("" + SecurityUtils.getUser().getCompId()).equals(smj)||("" + SecurityUtils.getUser().getCompId()).equals(smjhw)) {
+ Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, outSubjectMatterAddDTO.getSubjectMatterCode())
+ .in(Product::getCompId, smjList).last("limit 1"));
+ if (ObjUtil.isNotNull(product) ) {
+ outBound.setSubjectMatterName(outSubjectMatterAddDTO.getSubjectMatterName());
+ }
+ } else {
+ Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery().eq(Product::getErpCode, outSubjectMatterAddDTO.getSubjectMatterCode())
+ .eq(Product::getCompId, SecurityUtils.getUser().getCompId()).last("limit 1"));
+ if (ObjUtil.isNotNull(product) ) {
+ outBound.setSubjectMatterName(outSubjectMatterAddDTO.getSubjectMatterName());
+ }
+ }
outBound.setOutBoundType("1");
if (StrUtil.isEmpty(addDTO.getOutBoundType())) {
outBound.setOutBoundType("0");
@@ -843,13 +866,21 @@
@Override
public R addContractOutSgb(OutBoundAddDTO addDTO) {
+ String batchNumber = "";
+
+ if (StrUtil.isNotBlank(addDTO.getOutBoundCode())){
+ batchNumber = addDTO.getOutBoundCode();
+ }else {
+ batchNumber = genBatchNumber();
+ }
+ log.info("鍑哄簱鍗曞彿:{}",batchNumber);
//鏍¢獙鍙傛暟
R<Contract> r = vailParam(addDTO);
if (!r.isOk()) {
return r;
}
Contract contract = r.getData();
- String batchNumber = genBatchNumber();
+
//鍑哄簱
handleOutBound(batchNumber,contract, addDTO);
--
Gitblit v1.9.1