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-file/src/main/java/com/dy/pipIrrWebFile/fm/RestHashDeal.java | 95 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 95 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/java/com/dy/pipIrrWebFile/fm/RestHashDeal.java b/pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/java/com/dy/pipIrrWebFile/fm/RestHashDeal.java
new file mode 100644
index 0000000..e404408
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/java/com/dy/pipIrrWebFile/fm/RestHashDeal.java
@@ -0,0 +1,95 @@
+package com.dy.pipIrrWebFile.fm;
+
+import com.dy.common.util.MurmurHash;
+
+public class RestHashDeal {
+
+
+ /**
+ * 鏂囦欢鍚嶇О璁$畻杞崲
+ * @param fileName
+ * @param rvo
+ * @return
+ * @throws Exception
+ */
+ public FileRestVo fileTransRest(String fileName, FileRestVo rvo) throws Exception{
+ if(fileName != null
+ && !fileName.trim().equals("")
+ && rvo != null){
+ if(DyFmListener.dyFileGroup == null
+ || DyFmListener.dyFileGroup.list == null
+ || DyFmListener.dyFileGroup.list.size() == 0){
+ throw new Exception("涓ラ噸閿欒锛屾枃浠舵湇鍔″櫒restful鏈厤缃紒") ;
+ }else{
+ DyFileSvConf.Vo confVo = null ;
+ Integer hash = null ;
+ if(DyFmListener.dyFileGroup.list.size() == 1){
+ confVo = DyFmListener.dyFileGroup.list.get(0) ;
+ }else{
+ hash = new MurmurHash().hash16_plus(fileName) ;
+ for(DyFileSvConf.Vo lvo : DyFmListener.dyFileGroup.list){
+ if(hash >= lvo.hashStart.intValue()
+ && hash <= lvo.hashEnd.intValue()){
+ confVo = lvo ;
+ break ;
+ }
+ }
+ }
+ if(confVo != null){
+ rvo.fileSysId = confVo.id;
+ rvo.fileNameHash = hash;
+ rvo.fileSysAbsolutePath = confVo.fileSysAbsolutePath;
+ rvo.fileSysRelativePath = confVo.fileSysRelativePath;
+ rvo.fileSysRestUrl = confVo.restUrl;
+ rvo.fileWebUrl = confVo.webUrl ;
+ rvo.fileWebDownloadPath = confVo.webDownloadPath ;
+ }
+ }
+ }
+ return rvo ;
+ }
+
+
+ /**
+ * 鍝堝笇鍊艰绠楄浆鎹�
+ * @param hashcode
+ * @param rvo
+ * @return
+ * @throws Exception
+ */
+ public FileRestVo fileTransRest(Integer hashcode, FileRestVo rvo) throws Exception{
+ if(hashcode != null
+ && rvo != null){
+ if(DyFmListener.dyFileGroup == null
+ || DyFmListener.dyFileGroup.list == null
+ || DyFmListener.dyFileGroup.list.size() == 0){
+ throw new Exception("涓ラ噸閿欒锛屾枃浠舵湇鍔″櫒restful鏈厤缃紒") ;
+ }else{
+ DyFileSvConf.Vo confVo = null ;
+ Integer hash = hashcode ;
+ if(DyFmListener.dyFileGroup.list.size() == 1){
+ confVo = DyFmListener.dyFileGroup.list.get(0) ;
+ }else{
+ for(DyFileSvConf.Vo lvo : DyFmListener.dyFileGroup.list){
+ if(hash >= lvo.hashStart.intValue()
+ && hash <= lvo.hashEnd.intValue()){
+ confVo = lvo ;
+ break ;
+ }
+ }
+ }
+ if(confVo != null){
+ rvo.fileSysId = confVo.id;
+ rvo.fileNameHash = hash;
+ rvo.fileSysAbsolutePath = confVo.fileSysAbsolutePath;
+ rvo.fileSysRelativePath = confVo.fileSysRelativePath;
+ rvo.fileSysRestUrl = confVo.restUrl;
+ rvo.fileWebUrl = confVo.webUrl ;
+ rvo.fileWebDownloadPath = confVo.webDownloadPath ;
+ }
+ }
+ }
+ return rvo ;
+ }
+
+}
--
Gitblit v1.8.0