rev:1.立库监控新增空托盘监控 2.调拨同步接口支持多条明细

This commit is contained in:
2023-09-27 15:59:50 +08:00
parent d8769461a7
commit ac30120460
6 changed files with 84 additions and 16 deletions

View File

@@ -29,4 +29,9 @@ public interface AutoRiKuService {
* 获取发货区
* */
JSONObject queryNum(JSONObject whereJson);
/**
* 获取空托盘
* */
JSONObject getEmpPoint();
}

View File

@@ -227,4 +227,44 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
return result;
}
@Override
public JSONObject getEmpPoint() {
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
JSONObject jsonAll = new JSONObject();
JSONArray dataArr = new JSONArray();
// 获取有货货位
JSONArray haveArr = attrTab.query("sect_code = 'KTP01' and is_delete = '0' and IFNULL(storagevehicle_code,'') <> '' and is_used = '1' ").getResultJSONArray(0);
JSONObject jsonHave = new JSONObject();
jsonHave.put("name", "有货");
jsonHave.put("value", haveArr.size());
// 获取无货货位
JSONArray notHaveArr = attrTab.query("sect_code = 'KTP01' and is_delete = '0' and IFNULL(storagevehicle_code,'') = '' and is_used = '1'").getResultJSONArray(0);
JSONObject jsonNotHave = new JSONObject();
jsonNotHave.put("name", "空闲");
jsonNotHave.put("value", notHaveArr.size());
// 获取禁用货位
JSONArray usedArr = attrTab.query("sect_code = 'KTP01' and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
JSONObject jsonUsed = new JSONObject();
jsonUsed.put("name", "禁用");
jsonUsed.put("value", usedArr.size());
dataArr.add(jsonHave);
dataArr.add(jsonNotHave);
dataArr.add(jsonUsed);
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
jsonAll.put("pieSubTest", "总仓位: "+num);
jsonAll.put("data", dataArr);
jsonAll.put("name", "立库空托盘统计");
return jsonAll;
}
}

View File

@@ -34,6 +34,7 @@ public class AutoWebSocketRiKu {
data.put("two",autoRiKuService.getTwoPoint());
data.put("three",autoRiKuService.getThreePoint());
data.put("all",autoRiKuService.getAllPoint());
data.put("empList",autoRiKuService.getEmpPoint());
return new ResponseEntity<>(data, HttpStatus.OK);
}