|
@@ -1,12 +1,13 @@
|
|
|
package com.sckw.report.controller;
|
|
package com.sckw.report.controller;
|
|
|
|
|
|
|
|
import com.sckw.core.web.response.BaseResult;
|
|
import com.sckw.core.web.response.BaseResult;
|
|
|
-import com.sckw.core.web.response.HttpResult;
|
|
|
|
|
|
|
+import com.sckw.order.api.model.OrderExecutionDisplayVo;
|
|
|
import com.sckw.report.service.KwCapacityAnalysisService;
|
|
import com.sckw.report.service.KwCapacityAnalysisService;
|
|
|
import com.sckw.report.service.KwHomeService;
|
|
import com.sckw.report.service.KwHomeService;
|
|
|
-
|
|
|
|
|
import com.sckw.report.service.KwOrderExecutionService;
|
|
import com.sckw.report.service.KwOrderExecutionService;
|
|
|
import com.sckw.report.service.KwRealtimeSalesService;
|
|
import com.sckw.report.service.KwRealtimeSalesService;
|
|
|
|
|
+import com.sckw.transport.api.model.vo.CurrentCapacityAnalysisVo;
|
|
|
|
|
+import com.sckw.transport.api.model.vo.RealtimeSalesVolumeVo;
|
|
|
import com.sckw.transport.api.model.vo.TransportTopStatisticsVo;
|
|
import com.sckw.transport.api.model.vo.TransportTopStatisticsVo;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
@@ -16,69 +17,45 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/kwBiCapacityAnalysis")
|
|
@RequestMapping("/kwBiCapacityAnalysis")
|
|
|
-@Tag(name = "BI大屏", description = "BI大屏")
|
|
|
|
|
|
|
+@Tag(name = "BI Dashboard", description = "BI Dashboard")
|
|
|
public class BiDashboardController {
|
|
public class BiDashboardController {
|
|
|
private final KwHomeService kwHomeService;
|
|
private final KwHomeService kwHomeService;
|
|
|
private final KwCapacityAnalysisService capacityAnalysisService;
|
|
private final KwCapacityAnalysisService capacityAnalysisService;
|
|
|
private final KwOrderExecutionService orderExecutionService;
|
|
private final KwOrderExecutionService orderExecutionService;
|
|
|
private final KwRealtimeSalesService realtimeSalesService;
|
|
private final KwRealtimeSalesService realtimeSalesService;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 首页顶部数据展示区统计接口。
|
|
|
|
|
- * <p>
|
|
|
|
|
- * 一次性返回以下四个指标,供页面顶部卡片直接展示:
|
|
|
|
|
- * 1. 累计运量:系统内所有已完成运单的净重汇总;
|
|
|
|
|
- * 2. 累计车次:系统内所有已完成运单数量;
|
|
|
|
|
- * 3. 今日车次:系统内当日完成运单数量,按运单完成时间统计;
|
|
|
|
|
- * 4. 今日运量:系统内当日完成运单的净重汇总,按运单完成时间统计。
|
|
|
|
|
- * </p>
|
|
|
|
|
- *
|
|
|
|
|
- * @return 顶部数据展示区统计结果
|
|
|
|
|
- */
|
|
|
|
|
@GetMapping("/transportTopStatistics")
|
|
@GetMapping("/transportTopStatistics")
|
|
|
- @Operation(summary = "首页顶部数据展示区统计", description = "累计运量、累计车次、今日车次、今日运量")
|
|
|
|
|
|
|
+ @Operation(summary = "Transport top statistics", description = "Total volume, total trips, today trips, today volume")
|
|
|
public BaseResult<TransportTopStatisticsVo> transportTopStatistics() {
|
|
public BaseResult<TransportTopStatisticsVo> transportTopStatistics() {
|
|
|
return BaseResult.success(kwHomeService.transportTopStatistics());
|
|
return BaseResult.success(kwHomeService.transportTopStatistics());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 当前运力分析展示:待进场、装载作业、配送中
|
|
|
|
|
- */
|
|
|
|
|
- @Operation(summary = "当前运力分析展示", description = "待进场、装载作业、配送中车辆实时数量")
|
|
|
|
|
@PostMapping("/currentDisplay")
|
|
@PostMapping("/currentDisplay")
|
|
|
- public HttpResult currentDisplay() {
|
|
|
|
|
- return capacityAnalysisService.currentCapacityAnalysis();
|
|
|
|
|
|
|
+ @Operation(summary = "Current capacity display", description = "Waiting, loading and delivering")
|
|
|
|
|
+ public BaseResult<CurrentCapacityAnalysisVo> currentDisplay() {
|
|
|
|
|
+ return BaseResult.success(capacityAnalysisService.currentCapacityAnalysis());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 当前运力分析展示(子运单口径:kwt_waybill_order_subtask)
|
|
|
|
|
- */
|
|
|
|
|
- @Operation(summary = "当前运力分析展示(子运单口径)", description = "基于子运单状态聚合:待进场、装载作业、配送中")
|
|
|
|
|
@PostMapping("/currentDisplayBySubtask")
|
|
@PostMapping("/currentDisplayBySubtask")
|
|
|
- public HttpResult currentDisplayBySubtask() {
|
|
|
|
|
- return capacityAnalysisService.currentCapacityAnalysisBySubtask();
|
|
|
|
|
|
|
+ @Operation(summary = "Current capacity by subtask", description = "Waiting, loading and delivering by subtask")
|
|
|
|
|
+ public BaseResult<CurrentCapacityAnalysisVo> currentDisplayBySubtask() {
|
|
|
|
|
+ return BaseResult.success(capacityAnalysisService.currentCapacityAnalysisBySubtask());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 订单执行情况看板
|
|
|
|
|
- */
|
|
|
|
|
-
|
|
|
|
|
- @Operation(summary = "订单执行情况展示", description = "计划量、已装载、车次、完成率;列表超过 9 条由前端向上轮播")
|
|
|
|
|
@GetMapping("/display")
|
|
@GetMapping("/display")
|
|
|
- public HttpResult display() {
|
|
|
|
|
- return orderExecutionService.orderExecutionDisplay();
|
|
|
|
|
|
|
+ @Operation(summary = "Order execution display", description = "Order execution metrics and list")
|
|
|
|
|
+ public BaseResult<List<OrderExecutionDisplayVo>> display() {
|
|
|
|
|
+ return BaseResult.success(orderExecutionService.orderExecutionDisplay());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 实时销量看板
|
|
|
|
|
- */
|
|
|
|
|
- @Operation(summary = "实时销量", description = "近12个整点,每点为上小时完成运单净重汇总(吨),按商品分线")
|
|
|
|
|
@GetMapping("/volume")
|
|
@GetMapping("/volume")
|
|
|
- public HttpResult volume() {
|
|
|
|
|
- return realtimeSalesService.realtimeSalesVolume();
|
|
|
|
|
|
|
+ @Operation(summary = "Realtime sales volume", description = "Realtime sales volume trend")
|
|
|
|
|
+ public BaseResult<RealtimeSalesVolumeVo> volume() {
|
|
|
|
|
+ return BaseResult.success(realtimeSalesService.realtimeSalesVolume());
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|