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-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java
new file mode 100644
index 0000000..3fe03b0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java
@@ -0,0 +1,111 @@
+package com.dy.common.mw.channel.tcp;
+
+public class PrefixedDataAvailableStatus {
+	
+	public final static Integer status_rubbish = 0 ;//鍨冨溇鏁版嵁
+	public final static Integer status_break = 1 ;//鏂寘
+	public final static Integer status_adjoin = 2 ;//绮樺寘
+	public final static Integer status_complete = 3 ;//涓嶆柇涓嶇矘
+	
+	private Integer status ;
+	private Integer dataLen ;
+	public String protocolName;
+	public Short protocolVersion;
+	
+	public PrefixedDataAvailableStatus(){
+		status = null ;
+		dataLen = null ;
+	}
+	
+	/**
+	 * 鍨冨溇鏁版嵁
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus rubbish(Integer dataLen){
+		this.status = status_rubbish ;
+		this.dataLen = dataLen ;
+		return this ;
+	}
+	
+	/**
+	 * 鍙戠敓鏂寘
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus breaked(){
+		this.status = status_break ;
+		this.dataLen = null ;
+		return this ;
+	}
+	
+	/**
+	 * 鍙戠敓绮樺寘
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus adjoined(Integer dataLen, String protocolName, Short protocolVersion){
+		this.status = status_adjoin ;
+		this.dataLen = dataLen ;
+		this.protocolName = protocolName ;
+		this.protocolVersion = protocolVersion ;
+		return this ;
+	}
+	
+	/**
+	 * 涓嶆柇鍖呬笉绮樺寘锛屾暟鎹濂芥敹鍏�
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus completed(Integer dataLen, String protocolName, Short protocolVersion){
+		this.status = status_complete ;
+		this.dataLen = dataLen ;
+		this.protocolName = protocolName ;
+		this.protocolVersion = protocolVersion ;
+		return this ;
+	}
+	
+	/**
+	 * 鏄惁鍨冨溇鏁版嵁
+	 * @return 鐘舵��
+	 */
+	public boolean isRubbish(){
+		return this.status.intValue() == status_rubbish.intValue();
+	}
+	/**
+	 * 鏄惁鏂寘
+	 * @return 鐘舵��
+	 */
+	public boolean isBreaked(){
+		return this.status.intValue() == status_break.intValue();
+	}
+	
+	
+	/**
+	 * 鏄惁绮樺寘
+	 * @return 鏄惁绮樺寘
+	 */
+	public boolean isAdjoined(){
+		return this.status.intValue() == status_adjoin.intValue();
+	}
+	
+	/**
+	 * 鏄惁涓嶆柇涓嶇矘
+	 * @return 鏄惁涓嶆柇涓嶇矘
+	 */
+	public boolean isCompleted(){
+		return this.status.intValue() == status_complete.intValue();
+	}
+	
+	/**
+	 * 杩斿洖鏁版嵁闀垮害
+	 * @return 鏁版嵁闀垮害
+	 */
+	public Integer getDataLen(){
+		return this.dataLen ;
+	}
+	
+}

--
Gitblit v1.8.0