whycxzp
2025-05-27 3e6ac0b05ec1ee4456c7402f17677e449a3dcc09
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package com.whyc.controller;
 
import com.whyc.dto.*;
import com.whyc.service.WmsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@RestController
@Api(tags = "WMS接口")
@RequestMapping("wms")
public class InterfaceWmsController {
 
    @Autowired
    private WmsService service;
 
    /**
     * 获取所有库位数据
     * API:/api/Wms_material/get_all
     * @return
     */
    @GetMapping("getMaterialList")
    public Response getMaterialList(){
 
        return service.getMaterialList();
    }
 
    /**
     * 下发任务
     * API:/api/Wms_pallet/WmsOutTask
     * See Also: {com.whyc.dto.WmsPalletDto} WmsPalletDto
     * des    Int    是    任务类型 1 =出库、2=测电压、3=活化
     */
    @PostMapping("sendTask")
    public Response sendTask(@RequestBody WmsPalletDto palletDto){
 
        return service.sendTask(palletDto);
    }
 
    /**
     * 下发入库任务
     * @param taskDto
     * @return
     */
    @PostMapping("sendTaskInbound")
    public Response sendTaskInbound(@RequestBody WmsTaskDto taskDto){
 
        return service.sendTaskInbound(taskDto);
    }
 
 
    /**
     * 取消任务
     * @param cancelDto
     * @return
     */
    @PostMapping("cancelTask")
    public Response cancelTask(@RequestBody WmsTaskCancelDto cancelDto){
 
        return service.cancelTask(cancelDto);
    }
 
    /**
     * 任务状态上报接口
     * TODO 待现场确认含义 API名称    上层系统提供
     */
 
 
    /**
     * 获取所有库位数据
     * API:/api/wms_location/get_all
     */
    @GetMapping("getLocationList")
    public Response getLocationList(){
 
        return service.getLocationList();
    }
 
    /**
     * @param MaterialType 0=获取所有、1=载具、2=电池
     * @param PalletStatus 0=库位、1=获取所有、4=待出库
     * @return
     */
    @GetMapping("getPalletList")
    public Response getPalletList(@RequestParam int MaterialType,@RequestParam int PalletStatus){
 
        return service.getPalletList(MaterialType,PalletStatus);
    }
 
    /**
     * 提供给第三方的接口,用于接收任务状态
     * @param taskDto
     * @return
     */
    @PostMapping("sendTaskStatus")
    public Response sendTaskStatus(@RequestBody TaskDto taskDto){
        return service.sendTaskStatus(taskDto);
    }
 
    @GetMapping("task/getFinishedPage")
    public Response getFinishedPage(@RequestParam int pageNum,@RequestParam int pageSize){
        return service.getFinishedPage(pageNum,pageSize);
    }
 
    @GetMapping("task/getOngoingList")
    public Response getOngoingList(){
        return service.getOngoingList();
    }
 
}