From c83101eb62f5d4906b9c01ceea6b21a37f9e84d8 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 18 十一月 2025 09:24:53 +0800
Subject: [PATCH] bug修复
---
ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/PicAccessResult.java | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/PicAccessResult.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/PicAccessResult.java
index bd8c2f9..660c856 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/PicAccessResult.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/result/HK/PicAccessResult.java
@@ -5,6 +5,9 @@
import org.springframework.data.mongodb.core.index.TextIndexed;
import org.springframework.data.mongodb.core.mapping.Document;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+
/**
* 鍥剧墖璁块棶鐩戞祴缁撴灉
*
@@ -12,30 +15,28 @@
*/
@Data
@Document(collection = "hk_pic_access")
+//鍙瓨浜嗚溅杈嗙殑
public class PicAccessResult extends BaseResult {
+ private Integer dataType;
/**
* 鏁版嵁绫诲瀷涓�1鏃惰〃绀哄崱鍙e唴鐮侊紝鏁版嵁绫诲瀷涓�2鎴�11鏃惰〃绀轰汉鑴搁噰闆嗚澶囧唴鐮�
*/
- @TextIndexed
private String indexCode;
/**
* 璁惧鎴栧崱鍙e浗鏍囩紪鐮�
*/
- @TextIndexed
private String externalIndexCode;
/**
* 璁惧鎴栧崱鍙e悕绉�
*/
- @TextIndexed
private String deviceName;
/**
* 缁勭粐缂栧彿
*/
- @TextIndexed
private String orgCode;
/**
@@ -78,4 +79,15 @@
*/
private int bigDisableCount;
+ public static BigDecimal calUrl(PicAccessResult result) {
+ BigDecimal url = BigDecimal.ZERO;
+ if (result.getSampleCount() != 0) {
+ //鍥剧墖璁块棶姝e父閲� = 鎶芥閲�-寮傚父閲�
+ BigDecimal picNormalCount = new BigDecimal(result.getSampleCount() - result.getExpCount());
+ //鍥剧墖鎶芥閲�
+ BigDecimal sampleCount = new BigDecimal(result.getSampleCount());
+ url = picNormalCount.divide(sampleCount, 4, RoundingMode.HALF_UP);
+ }
+ return url;
+ }
}
--
Gitblit v1.8.0