From 3a894ab344295a44fede3d5f9a9a0eaa36280486 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期五, 16 一月 2026 17:57:32 +0800
Subject: [PATCH] 上传日志只保存错误数据

---
 src/main/java/com/fzzy/push/gd2023/GD2023ApiRemoteService2023.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/fzzy/push/gd2023/GD2023ApiRemoteService2023.java b/src/main/java/com/fzzy/push/gd2023/GD2023ApiRemoteService2023.java
index f388ac4..8d1d696 100644
--- a/src/main/java/com/fzzy/push/gd2023/GD2023ApiRemoteService2023.java
+++ b/src/main/java/com/fzzy/push/gd2023/GD2023ApiRemoteService2023.java
@@ -30,6 +30,8 @@
 
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
 import java.util.*;
 
 /**
@@ -127,7 +129,9 @@
             responseDto.setBizId(bizId);
             apiLog.setStatus(responseDto.getCode() == 200 ? 0 : responseDto.getCode());
             apiLog.setResult(responseDto.getMsg());
-            apiLogRep.save(apiLog);
+            if (responseDto.getCode() != 200) {
+                apiLogRep.save(apiLog);
+            }
             ResponseDto resd = new ResponseDto();
             resd.setSuccess(responseDto.getCode() == 200 ? 0 : responseDto.getCode());
             resd.setMsg(responseDto.getMsg());
@@ -625,6 +629,8 @@
                 String tyhwbm = apiCommonService.getTyhwbm(apiData.getHwdm());
                 apiData.setTyhwbm(tyhwbm);
             }
+            BigDecimal bigDecimal = BigDecimal.valueOf(apiData.getQzzrshde());
+            apiData.setQzzrshde(bigDecimal.setScale(3, RoundingMode.UP).doubleValue());
             apiData.setZhgxsj(DateUtils.addSeconds(new Date(), -10));
             return JSON.toJSONString(apiData);
         }
@@ -878,8 +884,8 @@
                 }
             }
 
-            api1403.setRotationInQty(Double.valueOf(String.format("%.3f",lrsl)));
-            api1403.setRotationOutQty(Double.valueOf(String.format("%.3f",lcsl)));
+            api1403.setRotationInQty(Double.valueOf(String.format("%.3f", lrsl)));
+            api1403.setRotationOutQty(Double.valueOf(String.format("%.3f", lcsl)));
             api1403.setDtls(dtls);
             //鍏堜笂浼犳枃浠�,鑾峰彇鏂囦欢id
             GD2023ResponseDto responseDto = GD2023HttpClientUtil.postUploadData(url, authToken, api1403.getWjdz());

--
Gitblit v1.9.3