Browse Source

rev:大屏成品数据修改

master
周舟 1 year ago
parent
commit
a1ad7abb7e
  1. 41
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java
  2. 48
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MIX_AND_TRAP.wql

41
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java

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

48
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MIX_AND_TRAP.wql

@ -247,3 +247,51 @@
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY
ENDIF ENDIF
IF 输入.flag = "7"
QUERY
SELECT
cMocode AS material_code,
SUM(iNum) as region_in_qty
FROM
st_ivt_regionio
WHERE
cVouchType = '完工入库'
AND
DATE(dDate) = CURDATE()
GROUP BY
cMocode
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "8"
QUERY
SELECT
cMocode AS material_code,
SUM(iNum) as region_in_qty
FROM
st_ivt_regionio
WHERE
cVouchType = '完工入库'
AND
dDate BETWEEN DATE_SUB( NOW(), INTERVAL 1 WEEK ) AND NOW()
GROUP BY
cMocode
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "9"
QUERY
SELECT
SUM(iNum) as total_qty
FROM
st_ivt_regionio
WHERE
cVouchType = '完工入库'
AND
DATE(dDate) = CURDATE()
ENDSELECT
ENDQUERY
ENDIF

Loading…
Cancel
Save