zhanghl
2025-04-23 ab0b4b2397c46701e372a49cf8ff4d268bb577b3
Merge remote-tracking branch 'origin/dev' into dev
已修改3个文件
31 ■■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroupTemp.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsResourceGroupServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
    }
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;
    }
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);