|
|
@ -853,23 +853,30 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
cpDeviceDataStorage.thenAccept((result) -> { |
|
|
|
//数据
|
|
|
|
JSONObject result1 = new JSONObject(); |
|
|
|
JSONArray jsonArray = new JSONArray(); |
|
|
|
for (int i = 1; i <= 5; i++) { |
|
|
|
InventoryDto dto = new InventoryDto(); |
|
|
|
dto.setInventory_qty(1000000); |
|
|
|
dto.setRegion_out_qty(5000); |
|
|
|
dto.setRegion_in_qty(9995000); |
|
|
|
dto.setMaterial_code("成品" + i); |
|
|
|
jsonArray.add(dto); |
|
|
|
} |
|
|
|
result1.put("in_qty", "100.00"); |
|
|
|
result1.put("out_qty", "10.00"); |
|
|
|
result1.put("inventory_qty", "90.00"); |
|
|
|
result1.put("in_productivity", 30); |
|
|
|
result1.put("out_productivity", 60); |
|
|
|
result1.put("inv_productivity", 80); |
|
|
|
result1.put("KCDayList", jsonArray); |
|
|
|
result1.put("KCWeekList", jsonArray); |
|
|
|
JSONArray KCDayList = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "7")) |
|
|
|
.process().getResultJSONArray(0); |
|
|
|
JSONArray KCWeekList = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "8")) |
|
|
|
.process().getResultJSONArray(0); |
|
|
|
JSONObject jo = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "9")).process().uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(jo)) { |
|
|
|
result1.put("in_qty", 0); |
|
|
|
} else { |
|
|
|
result1.put("in_qty", BigDecimal.valueOf(jo.getDoubleValue("total_qty") / 10000).setScale(2, RoundingMode.HALF_UP).toString() |
|
|
|
); |
|
|
|
} |
|
|
|
if (ObjectUtil.isEmpty(KCDayList)) { |
|
|
|
KCDayList = new JSONArray(); |
|
|
|
} |
|
|
|
if (ObjectUtil.isEmpty(KCWeekList)) { |
|
|
|
KCWeekList = new JSONArray(); |
|
|
|
} |
|
|
|
result1.put("out_qty", "0.00"); |
|
|
|
result1.put("inventory_qty", "0.00"); |
|
|
|
result1.put("in_productivity", 100); |
|
|
|
result1.put("out_productivity", 0); |
|
|
|
result1.put("inv_productivity", 0); |
|
|
|
result1.put("KCDayList", KCDayList); |
|
|
|
result1.put("KCWeekList", KCWeekList); |
|
|
|
map.put("KC", result1); |
|
|
|
}).exceptionally((e) -> { |
|
|
|
JSONObject result = new JSONObject(); |
|
|
|