From ab0b4b2397c46701e372a49cf8ff4d268bb577b3 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期三, 23 四月 2025 10:40:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java              |   13 +++++++------
 aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java |    5 ++++-
 aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java                  |   13 +++++++------
 3 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java
index 243c864..7bb0732 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java
@@ -6,6 +6,7 @@
 import com.aps.common.core.annotation.Excel;
 import com.aps.common.core.web.domain.BaseEntity;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 /**
@@ -31,7 +32,7 @@
 
     /** 姣忔棩鐞嗚鏃堕棿 */
     @Excel(name = "姣忔棩鐞嗚鏃堕棿")
-    private Long theoryHours;
+    private BigDecimal theoryHours;
 
     /** 鎴闇�姹傛棩鍓╀綑澶╂暟  */
     @Excel(name = "鎴闇�姹傛棩鍓╀綑澶╂暟 ")
@@ -39,7 +40,7 @@
 
     /** 鐞嗚浜ц兘 */
     @Excel(name = "鐞嗚浜ц兘")
-    private Long theoryCapacity;
+    private BigDecimal theoryCapacity;
 
     /** 鏈哄姞闇�姹傛棩鏈� */
     @Excel(name = "鏈哄姞闇�姹傛棩鏈�",width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@@ -83,12 +84,12 @@
         return devicesQuantity;
     }
 
-    public void setTheoryHours(Long theoryHours) 
+    public void setTheoryHours(BigDecimal theoryHours)
     {
         this.theoryHours = theoryHours;
     }
 
-    public Long getTheoryHours() 
+    public BigDecimal getTheoryHours()
     {
         return theoryHours;
     }
@@ -103,12 +104,12 @@
         return restDays;
     }
 
-    public void setTheoryCapacity(Long theoryCapacity) 
+    public void setTheoryCapacity(BigDecimal theoryCapacity)
     {
         this.theoryCapacity = theoryCapacity;
     }
 
-    public Long getTheoryCapacity() 
+    public BigDecimal getTheoryCapacity()
     {
         return theoryCapacity;
     }
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java
index e4ef04b..c772fb8 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java
@@ -6,6 +6,7 @@
 import com.aps.common.core.annotation.Excel;
 import com.aps.common.core.web.domain.BaseEntity;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 /**
@@ -32,7 +33,7 @@
 
     /** 姣忔棩鐞嗚鏃堕棿 */
     @Excel(name = "姣忔棩鐞嗚鏃堕棿")
-    private Long theoryHours;
+    private BigDecimal theoryHours;
 
     /** 鎴闇�姹傛棩鍓╀綑澶╂暟  */
     @Excel(name = "鎴闇�姹傛棩鍓╀綑澶╂暟")
@@ -40,7 +41,7 @@
 
     /** 鐞嗚浜ц兘 */
     @Excel(name = "鐞嗚浜ц兘")
-    private Long theoryCapacity;
+    private BigDecimal theoryCapacity;
 
     /** 鏈哄姞闇�姹傛棩鏈� */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@@ -87,12 +88,12 @@
         return devicesQuantity;
     }
 
-    public void setTheoryHours(Long theoryHours) 
+    public void setTheoryHours(BigDecimal theoryHours)
     {
         this.theoryHours = theoryHours;
     }
 
-    public Long getTheoryHours() 
+    public BigDecimal getTheoryHours()
     {
         return theoryHours;
     }
@@ -107,12 +108,12 @@
         return restDays;
     }
 
-    public void setTheoryCapacity(Long theoryCapacity) 
+    public void setTheoryCapacity(BigDecimal theoryCapacity)
     {
         this.theoryCapacity = theoryCapacity;
     }
 
-    public Long getTheoryCapacity() 
+    public BigDecimal getTheoryCapacity()
     {
         return theoryCapacity;
     }
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java
index 3e77acd..ed19b40 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java
@@ -1,5 +1,6 @@
 package com.aps.core.service.impl;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.util.List;
 import java.util.stream.Stream;
@@ -115,7 +116,9 @@
             tempList.forEach(temp->{
                 temp.setId(IdUtils.simpleUUID());
                 //璁$畻閫昏緫锛氱悊璁轰骇鑳�=璁惧鏁伴噺x姣忔棩鐞嗚鏃堕棿x鎴闇�姹傛棩鍓╀綑澶╂暟
-                temp.setTheoryCapacity(temp.getDevicesQuantity()*temp.getTheoryHours()*temp.getRestDays());
+                BigDecimal devicesQuantity = new BigDecimal(temp.getDevicesQuantity());
+                BigDecimal restDays = new BigDecimal(temp.getRestDays());
+                temp.setTheoryCapacity(devicesQuantity.multiply(temp.getTheoryHours()).multiply(restDays));
                 temp.setBatchNumber(batchNum);
                 temp.setCreateTime(DateUtils.getNowDate());
                 apsResourceGroupTempMapper.insertApsResourceGroupTemp(temp);

--
Gitblit v1.9.3