rev:大屏成品数据修改
This commit is contained in:
@@ -131,7 +131,7 @@ public class BigScreenServiceImpl implements BigScreenService {
|
||||
dto.setInventory_qty(dto.getQualified_in_qty() + dto.getUnqualified_in_qty());
|
||||
res.add(dto);
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}, pool);
|
||||
manufacturedProductsDayProductionTask.thenAccept((result) -> {
|
||||
@@ -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);
|
||||
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()
|
||||
);
|
||||
}
|
||||
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);
|
||||
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();
|
||||
|
||||
@@ -247,3 +247,51 @@
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user