DigitalTwinsController.java
2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package com.huaheng.api.digitalTwins.controller;
import com.huaheng.api.digitalTwins.domain.InventoryInOutInfo;
import com.huaheng.api.digitalTwins.domain.MaterialTypeProportionDto;
import com.huaheng.api.digitalTwins.domain.WarehouseInfoOverviewDto;
import com.huaheng.api.digitalTwins.service.InventoryStatisticsService;
import com.huaheng.api.digitalTwins.service.LocationStatisticsService;
import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* 数字孪生面板 控制器
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/wms/digitalTwins")
public class DigitalTwinsController {
private final InventoryStatisticsService inventoryStatisticsService;
private final LocationStatisticsService locationStatisticsService;
private final TaskHeaderService taskHeaderService;
/**
* 仓库数据概况
*/
@GetMapping("/getWarehouseInfoOverview")
public WarehouseInfoOverviewDto getWarehouseInfoOverview() {
WarehouseInfoOverviewDto warehouseInfoOverviewDto = new WarehouseInfoOverviewDto();
locationStatisticsService.getLocationInfoOverview(warehouseInfoOverviewDto);
inventoryStatisticsService.getInventoryInfoOverview(warehouseInfoOverviewDto);
return warehouseInfoOverviewDto;
}
/**
* 年度入出库数量对比
*/
@GetMapping("/getMonthlyInventoryInOutQty")
public Map<Integer, InventoryInOutInfo> getMonthlyInventoryInOutQty() {
return inventoryStatisticsService.getMonthlyInventoryInOutQty();
}
/**
* 当日入出库数量对比
*/
@GetMapping("/getDailyInventoryInOutQty")
public Map<String, InventoryInOutInfo> getDailyInventoryInOutQty() {
return inventoryStatisticsService.getDailyInventoryInOutQty();
}
/**
* 库容使用率
*/
@GetMapping("/getLocationUtilizationRate")
public BigDecimal getLocationUtilizationRate() {
return locationStatisticsService.getLocationUtilizationRate();
}
/**
* 物资分类占比
*/
@GetMapping("/getMaterialTypeProportion")
public List<MaterialTypeProportionDto> getMaterialTypeProportion() {
return inventoryStatisticsService.getMaterialTypeProportion();
}
/**
* 物资周转率
* 该期间出库总金额×2/(期初库存金额+期末库存金额)
*/
@GetMapping("get3")
public Map<Integer, InventoryInOutInfo> get3() {
return null;
}
/**
* 仓库信息变化
* 展示未完成任务
*/
@GetMapping("getWarehouseInformationChange")
public List<TaskHeader> getWarehouseInfoChange() {
return taskHeaderService.getUnCompleteTaskList();
}
}