chenhj
2026-04-21 2f20856ea3ca6f2f238ba66252164687f47fcd7e
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -29,7 +29,7 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
@@ -85,12 +85,14 @@
            // 状态 = 数量和完工数量比较
            if(i.getSchedulingNum().compareTo(new BigDecimal(0)) == 0){
                i.setStatus("未完成");
                i.setStatus("未开始");
            } else if(i.getQuantity().compareTo(i.getSchedulingNum()) <= 0){
                i.setStatus("已完成");
            }else{
                i.setStatus("生产中");
            }
            // 进度保留两位小数
            i.setProgress(i.getSchedulingNum().divide(i.getQuantity(),4,RoundingMode.CEILING).multiply(new BigDecimal(100)));
        });
        return list;