自动化立体仓库 - WMS系统
#
pang.jiabao
4 天以前 2dc12d419733c094bb0bbc7ef4f7a32d5067cfb9
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
package com.zy.asrs.controller;
 
import com.alibaba.fastjson.JSONObject;
import com.core.common.R;
import com.zy.asrs.entity.mes.*;
import com.zy.asrs.service.MesService;
import com.zy.common.web.BaseController;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@RestController
public class MesController extends BaseController {
 
    @Resource
    private MesService mesService;
 
 
    // 物料信息同步
    @PostMapping("/api/mes/synMatInfo")
    public MesReturn synMatInfo(@RequestBody MesMatInfo param){
 
        MesReturn mesReturn = new MesReturn();
        mesReturn.setSuccess(mesService.synMatInfo(param) == 1 ? "1" : "2");
        return mesReturn;
    }
 
    // 出库申请
    @PostMapping("/api/mes/outBoundOrder")
    public MesReturn outBoundOrder(@RequestBody MesInApply param){
 
        MesReturn mesReturn = new MesReturn();
        mesReturn.setSuccess(mesService.outBoundOrder(param) == 1 ? "1" : "2");
        return mesReturn;
    }
 
//    // 出库申请(叫料),装配库、滑块库
//    @PostMapping("/api/mes/callOutBoundOrder")
//    public MesReturn callOutBoundOrder(@RequestBody MesCallOutApply param){
//
//        MesReturn mesReturn = new MesReturn();
//        mesReturn.setSuccess(mesService.callOutBoundOrder(param) == 1 ? "1" : "2");
//        return mesReturn;
//    }
 
    // 入库申请
    @PostMapping("/api/mes/inBoundOrder")
    public MesReturn inBoundOrder(@RequestBody MesInApply param){
 
        MesReturn mesReturn = new MesReturn();
        mesReturn.setSuccess(mesService.inBoundOrder(param, 0) == 1 ? "1" : "2");
        return mesReturn;
    }
 
    // 入站允许
    @PostMapping("/api/mes/allowInStation")
    public MesReturn allowInStation(@RequestBody TransInOutStationAllow param){
 
        return mesService.allowInStation(param);
    }
 
    // 离站允许,装配库、滑块库
    @PostMapping("/api/mes/allowOutStation")
    public MesReturn allowOutStation(@RequestBody TransInOutStationAllow param){
 
        return mesService.allowOutStation(param);
    }
 
    // 下发运输任务
    @PostMapping("/api/mes/submitTask")
    public JSONObject submitTask(@RequestBody TransTask param){
 
        return mesService.submitTask(param);
    }
 
    // 接受成品刀可以入库二维码
    @PostMapping("/api/mes/inBoundItemBarcode")
    public MesReturn inBoundItemBarcode(@RequestBody MesItemBarCode param){
 
        MesReturn mesReturn = new MesReturn();
        mesReturn.setSuccess("1"); // TODO:待缓存成品刀二维码;
        return mesReturn;
    }
 
 
    // region 测试
    @GetMapping("/api/mes/transDj")
    public int transDj(@RequestParam String taskNo,@RequestParam String djNo){
 
        return mesService.transDj(taskNo,djNo);
    }
 
    // 退空托盘返回产线 pda上操作空托返回产线
    @GetMapping("/tkt")
    public R tkt(@RequestParam String taskNo){
         return mesService.tkt(taskNo);
    }
    // endregion
 
}