|
|
|
@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
/** |
|
|
|
@ -753,11 +755,19 @@ public class DashboardPushTask { |
|
|
|
emptyContainerInventoryData.put("flatPallet", emptyFlatPallet); // 空盘-平托 |
|
|
|
emptyContainerInventoryData.put("framePallet", emptyFramePallet); // 空盘-围框托盘 |
|
|
|
emptyContainerInventoryData.put("steelPallet", emptySteelPallet); // 空盘-钢底托 |
|
|
|
|
|
|
|
List<Map<String, Object>> ggList = dashboardDao.queryGongGeUsed(); |
|
|
|
BigDecimal utilizationRate2 = BigDecimal.ZERO; |
|
|
|
if (!ggList.isEmpty()) { |
|
|
|
Object utilizationRate2Obj = ggList.getFirst().get("utilizationRate2"); |
|
|
|
utilizationRate2 = utilizationRate2Obj != null |
|
|
|
? new BigDecimal(utilizationRate2Obj.toString()).setScale(2, RoundingMode.HALF_UP) |
|
|
|
: BigDecimal.ZERO; |
|
|
|
} |
|
|
|
// 构造返回数据 |
|
|
|
Map<String, Object> storageData = new HashMap<>(); |
|
|
|
storageData.put("totalSlots", totalSlots); // 总库位数 |
|
|
|
storageData.put("usedSlots", usedSlots); // 已使用库位数 |
|
|
|
storageData.put("utilizationRate2", utilizationRate2); // 成品位利用率(宫格使用率) |
|
|
|
storageData.put("utilizationRate", utilizationRate); // 利用率 |
|
|
|
storageData.put("materialInventory", materialInventoryData); // 物料盘库存 |
|
|
|
storageData.put("emptyContainerInventory", emptyContainerInventoryData); // 空盘库存 |
|
|
|
|