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/PaymentSlipServiceImpl.java |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentSlipServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentSlipServiceImpl.java
index c20cbf0..357a9c3 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentSlipServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentSlipServiceImpl.java
@@ -1,18 +1,104 @@
 package com.by4cloud.platformx.business.service.impl;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.by4cloud.platformx.business.dto.PaymentSlipQueryDTO;
+import com.by4cloud.platformx.business.dto.SyncPaymentRecepitDTO;
+import com.by4cloud.platformx.business.entity.PaymentCreditSale;
+import com.by4cloud.platformx.business.entity.PaymentReceive;
 import com.by4cloud.platformx.business.entity.PaymentSlip;
+import com.by4cloud.platformx.business.mapper.PaymentCreditMapper;
+import com.by4cloud.platformx.business.mapper.PaymentReceiveMapper;
 import com.by4cloud.platformx.business.mapper.PaymentSlipMapper;
 import com.by4cloud.platformx.business.service.PaymentSlipService;
+import com.by4cloud.platformx.common.core.util.R;
 import com.by4cloud.platformx.common.data.datascope.DataScope;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 @Service
+@Slf4j
+@RequiredArgsConstructor
 public class PaymentSlipServiceImpl extends ServiceImpl<PaymentSlipMapper, PaymentSlip> implements PaymentSlipService {
+
+	private final PaymentReceiveMapper paymentReceiveMapper;
+
+	private final PaymentCreditMapper paymentCreditMapper;
+
 	@Override
 	public Page pageScope(Page page, PaymentSlipQueryDTO queryDTO) {
 		return baseMapper.pageScope(page,queryDTO, DataScope.of("comp_id"));
 	}
+
+	@Override
+	public R genReceivePayment(SyncPaymentRecepitDTO dto) {
+		//瑁呭
+		BigDecimal reveiceZb = paymentReceiveMapper.genReceivePayment(null);
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceZb,null);
+		//鐭崇叅鏈�
+		BigDecimal reveiceSmj = paymentReceiveMapper.genReceivePaymentSmj();
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceSmj,2089995177814495234L);
+		//鐭冲伐娉�
+		BigDecimal reveiceSgb = paymentReceiveMapper.genReceivePayment(2056556196124250113L);
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceSgb,2056556196124250113L);
+		//閫氭柟鍏徃
+		BigDecimal reveiceTfgs = paymentReceiveMapper.genReceivePayment(2056556421857497090L);
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceTfgs,2056556421857497090L);
+		//鏈烘鍘�
+		BigDecimal reveiceJxc = paymentReceiveMapper.genReceivePayment(2056556317461270529L);
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceJxc,2056556317461270529L);
+		//涓�鐓ゆ満
+		BigDecimal reveiceYmj = paymentReceiveMapper.genReceivePayment(2056556535640576002L);
+		saveReceive(DateUtil.offsetDay(new Date(),-1),reveiceYmj,2056556535640576002L);
+
+		return R.ok();
+	}
+
+	@Override
+	public R genCreditPayment(SyncPaymentRecepitDTO dto) {
+		//瑁呭
+		BigDecimal reveiceZb = paymentCreditMapper.genReceivePayment(null);
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceZb,null);
+		//鐭崇叅鏈�
+		BigDecimal reveiceSmj = paymentCreditMapper.genReceivePaymentSmj();
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceSmj,2089995177814495234L);
+		//鐭冲伐娉�
+		BigDecimal reveiceSgb = paymentCreditMapper.genReceivePayment(2056556196124250113L);
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceSgb,2056556196124250113L);
+		//閫氭柟鍏徃
+		BigDecimal reveiceTfgs = paymentCreditMapper.genReceivePayment(2056556421857497090L);
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceTfgs,2056556421857497090L);
+		//鏈烘鍘�
+		BigDecimal reveiceJxc = paymentCreditMapper.genReceivePayment(2056556317461270529L);
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceJxc,2056556317461270529L);
+		//涓�鐓ゆ満
+		BigDecimal reveiceYmj = paymentCreditMapper.genReceivePayment(2056556535640576002L);
+		saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceYmj,2056556535640576002L);
+
+		return R.ok();
+	}
+
+	private void saveCredit(Date offsetDay, BigDecimal reveiceZb, Long compId) {
+		PaymentCreditSale receive = new PaymentCreditSale();
+		receive.setCreditDate(offsetDay);
+		receive.setCompId(compId);
+		receive.setCreditAmount(reveiceZb);
+		paymentCreditMapper.insert(receive);
+	}
+
+	private void saveReceive(Date offsetDay, BigDecimal reveiceZb, Long compId) {
+		PaymentReceive receive = new PaymentReceive();
+		receive.setReceiveDate(offsetDay);
+		receive.setCompId(compId);
+		receive.setReceiveAmount(reveiceZb);
+		paymentReceiveMapper.insert(receive);
+	}
+
+
 }

--
Gitblit v1.9.1