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-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/LocalDecoder.java |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/LocalDecoder.java b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/LocalDecoder.java
new file mode 100644
index 0000000..976f340
--- /dev/null
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/LocalDecoder.java
@@ -0,0 +1,37 @@
+package com.dy.testClient.tcpClient;
+
+import com.dy.common.util.ByteUtil;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
+import org.apache.mina.filter.codec.ProtocolDecoderOutput;
+
+import java.io.IOException;
+
+public class LocalDecoder extends CumulativeProtocolDecoder {
+
+    private static final Logger log = LogManager.getLogger(LocalDecoder.class) ;
+
+    private static final String DECODER_STATE_KEY = LocalDecoder.class.getName() + ".STATE";
+
+    public static final int MAX_SIZE = 2147483647 ;
+
+
+    /**
+     * 瀵圭綉缁滀紶杈撴潵鐨勬暟鎹繘琛岃В鐮�
+     */
+    protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws IOException, Exception{
+        int remain = in.remaining() ;
+        if(remain > 0){
+            byte[] preByte = new byte[remain];
+            in.get(preByte) ;
+            in.position(0) ;
+            log.info("鏀跺埌涓績涓嬭鏁版嵁锛�" + ByteUtil.bytes2Hex(preByte, true));
+        }
+        return true;
+    }
+
+
+}

--
Gitblit v1.8.0