From 37cdce5348ba4f3ee260cd8d433435cf0e795366 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 19 一月 2026 16:33:17 +0800
Subject: [PATCH] 新增前后端
---
service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowServiceImpl.java | 63 ++++++++++++++++++++++++++++++-
1 files changed, 61 insertions(+), 2 deletions(-)
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowServiceImpl.java
index 52c85d8..1121365 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowServiceImpl.java
@@ -17,7 +17,9 @@
import com.ruoyi.cwgl.mapper.FundFlowMapper;
import com.ruoyi.cwgl.domain.FundFlow;
+import com.ruoyi.cwgl.domain.FundFlowLog;
import com.ruoyi.cwgl.service.IFundFlowService;
+import com.ruoyi.cwgl.service.IFundFlowLogService;
import com.ruoyi.common.core.text.Convert;
/**
@@ -33,6 +35,8 @@
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private FundFlowMapper fundFlowMapper;
+ @Resource
+ private IFundFlowLogService fundFlowLogService;
/**
@@ -103,7 +107,17 @@
public int insertFundFlow(FundFlow fundFlow)
{
fundFlow.setCreateTime(DateUtils.getNowDate());
- return fundFlowMapper.insertFundFlow(fundFlow);
+ int result = fundFlowMapper.insertFundFlow(fundFlow);
+
+ // 璁板綍鎿嶄綔鏃ュ織
+ if (result > 0) {
+ FundFlowLog log = new FundFlowLog();
+ log.setFlowId(fundFlow.getId());
+ log.setOperation("鏂板璧勯噾娴佹按锛屾祦姘村彿锛�" + fundFlow.getBankFlowNo());
+ fundFlowLogService.insertFundFlowLog(log);
+ }
+
+ return result;
}
/**
@@ -129,7 +143,17 @@
public int updateFundFlow(FundFlow fundFlow)
{
fundFlow.setUpdateTime(DateUtils.getNowDate());
- return fundFlowMapper.updateFundFlow(fundFlow);
+ int result = fundFlowMapper.updateFundFlow(fundFlow);
+
+ // 璁板綍鎿嶄綔鏃ュ織
+ if (result > 0) {
+ FundFlowLog log = new FundFlowLog();
+ log.setFlowId(fundFlow.getId());
+ log.setOperation("淇敼璧勯噾娴佹按锛屾祦姘村彿锛�" + fundFlow.getBankFlowNo());
+ fundFlowLogService.insertFundFlowLog(log);
+ }
+
+ return result;
}
/**
@@ -179,4 +203,39 @@
{
return fundFlowMapper.deleteFundFlowById(id);
}
+
+ /**
+ * 纭璧勯噾娴佹按锛堝皢鐘舵�佹敼涓哄緟璁ら锛�
+ *
+ * @param id 璧勯噾娴佹按ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int confirmFundFlow(Integer id)
+ {
+ // 鍏堟煡璇㈣祫閲戞祦姘翠俊鎭�
+ FundFlow fundFlow = fundFlowMapper.selectFundFlowById(id);
+ if (fundFlow == null) {
+ throw new RuntimeException("璧勯噾娴佹按涓嶅瓨鍦�");
+ }
+
+ // 鍒ゆ柇鐘舵�佹槸鍚︿负0锛堟甯革級鎵嶈兘纭
+ if (!"0".equals(fundFlow.getStatus())) {
+ throw new RuntimeException("鍙湁鐘舵�佷负鑽夌鐨勮祫閲戞祦姘存墠鑳界‘璁�");
+ }
+
+ // 灏嗙姸鎬佹敼涓�"1"锛堝緟璁ら锛�
+ fundFlow.setStatus("1");
+ int result = fundFlowMapper.updateFundFlow(fundFlow);
+
+ // 璁板綍鎿嶄綔鏃ュ織
+ if (result > 0) {
+ FundFlowLog log = new FundFlowLog();
+ log.setFlowId(id);
+ log.setOperation("纭璧勯噾娴佹按锛屾祦姘村彿锛�" + fundFlow.getBankFlowNo() + "锛岀姸鎬佷粠鑽夌鏀逛负寰呰棰�");
+ fundFlowLogService.insertFundFlowLog(log);
+ }
+
+ return result;
+ }
}
--
Gitblit v1.8.0