From c19de84fa332a00c651f28e3a52292fd14f143a1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 23 九月 2025 17:30:07 +0800
Subject: [PATCH] 陆常丽反应软件系统财务对账时而数据不准确,分析源码,找到bug原因是,财务对账统计只有用户点击后才会触发统计功能,把历史上及当天进行了统计,如果当天统计时未下班,例如是中午触发统计了,而下午又进行了充值售水,但下班后未再点击触发对账统计,那么今天的对账统计完成了但数据不对。编写自动任务,在下半夜进行对账统计。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cd92/CdSv.java |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cd92/CdSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cd92/CdSv.java
index b74f6f3..9328b6b 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cd92/CdSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/p202404V201/cd92/CdSv.java
@@ -2,17 +2,19 @@
 
 import com.dy.pipIrrGlobal.daoPr.PrIntakeVcMapper;
 import com.dy.pipIrrGlobal.daoPr.PrWaterPriceMapper;
-import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper;
+import com.dy.pipIrrGlobal.daoRm.RmCommandOpenMapper;
 import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
-import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.pojoRm.RmCommandOpen;
 import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
 import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
 import com.dy.pipIrrRemote.monitor.common.ComSv;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * @Author: liurunyu
@@ -28,6 +30,8 @@
     protected PrWaterPriceMapper prWaterPriceDao ;
     @Autowired
     protected PrIntakeVcMapper prIntakeVcDao ;
+    @Autowired
+    protected RmCommandOpenMapper rmCommandOpenDao ;
 
     public VoVirtualCard selectClientVtCardById(Long id){
         return seVirtualCardDao.getVcById(id) ;
@@ -46,6 +50,7 @@
     /**
      * 璁剧疆铏氭嫙鍗¤鍗犵敤
      */
+    @Transactional(rollbackFor = Exception.class)
     public void setVcUsed(Long id, Long intakeId){
         SeVirtualCard po = new SeVirtualCard() ;
         po.setId(id);
@@ -54,4 +59,22 @@
         po.setOpenTime(new Date());
         seVirtualCardDao.updateByPrimaryKeySelective(po);
     }
+
+    public RmCommandOpen getCommandOpen(Long intakeId){
+        List<RmCommandOpen> list = rmCommandOpenDao.selectByIntakeId(intakeId) ;
+        if(list != null && list.size() > 0){
+            return list.get(0) ;
+        }
+        return null ;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    public void saveCommandOpen(RmCommandOpen po){
+        rmCommandOpenDao.insert(po) ;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    public void updateCommandOpen(RmCommandOpen po){
+        rmCommandOpenDao.updateByPrimaryKeySelective(po) ;
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0