rev:1.立库监控新增空托盘监控 2.调拨同步接口支持多条明细
This commit is contained in:
@@ -29,4 +29,9 @@ public interface AutoRiKuService {
|
||||
* 获取发货区
|
||||
* */
|
||||
JSONObject queryNum(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 获取空托盘
|
||||
* */
|
||||
JSONObject getEmpPoint();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user