手持机
This commit is contained in:
@@ -87,6 +87,12 @@ public class KpiController extends BaseController {
|
||||
return success(kpiService.getSpaceAnalysis(warehouseId));
|
||||
}
|
||||
|
||||
@GetMapping("/spaceStatusCounts")
|
||||
public AjaxResult getSpaceStatusCounts(String warehouseId,
|
||||
String roadwayId) {
|
||||
return success(kpiService.getSpaceStatusCounts(warehouseId, roadwayId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取货位巷道数据
|
||||
*
|
||||
|
||||
@@ -32,6 +32,7 @@ public interface KpiService {
|
||||
*/
|
||||
Map<String, Object> getRoadwayAnalysis(String warehouseId, String startTime, String endTime);
|
||||
|
||||
Map<String, Object> getSpaceStatusCounts(String warehouseId, String roadwayId);
|
||||
|
||||
|
||||
Map<String, Object> getSpaceAnalysis(String warehouseId);
|
||||
|
||||
@@ -289,6 +289,35 @@ public class KpiServiceImpl implements KpiService
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSpaceStatusCounts(String warehouseId, String roadwayId) {
|
||||
BasCargoSpace query = new BasCargoSpace();
|
||||
query.setWarehouseId(warehouseId);
|
||||
query.setRoadwayId(roadwayId);
|
||||
List<BasCargoSpace> list = basCargoSpaceMapper.selectBasCargoSpaceList(query);
|
||||
|
||||
Map<String, Integer> counts = new HashMap<>();
|
||||
counts.put("1", 0); // 空闲
|
||||
counts.put("2", 0); // 占用
|
||||
counts.put("3", 0); // 入库分配
|
||||
counts.put("4", 0); // 出库分配
|
||||
counts.put("5", 0); // 入库待检
|
||||
counts.put("6", 0); // 出库待检
|
||||
|
||||
for (BasCargoSpace space : list) {
|
||||
String status = space.getStatus();
|
||||
if (status != null && counts.containsKey(status)) {
|
||||
counts.put(status, counts.get(status) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
res.put("data", counts);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getRoadways(String warehouseId){
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user