自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-15 bc196046ae1ca301fadab2d0655458a5441034ea
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
package com.zy.asrs.controller;
 
import com.core.annotations.ManagerAuth;
import com.core.common.R;
import com.zy.asrs.entity.param.EmptyPlateOutParam;
import com.zy.asrs.entity.param.FullStoreParam;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.WorkService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 工作流接口控制器
 * Created by vincent on 2020/6/10
 */
@RestController
public class WorkController extends BaseController {
 
    @Autowired
    private WorkService workService;
    @Autowired
    private BasDevpService basDevpService;
 
    @RequestMapping("/available/put/site")
    @ManagerAuth(memo = "获取入库站点")
    public R availablePutSite(){
        return R.ok().add(basDevpService.getAvailableInSite());
    }
 
    @RequestMapping("/available/empty/put/site")
    @ManagerAuth(memo = "获取空板入库站点")
    public R availableEmptyPutSite(){
        return R.ok().add(basDevpService.getAvailableEmptyInSite());
    }
 
    @RequestMapping("/available/empty/take/site")
    @ManagerAuth(memo = "获取空板出库站点")
    public R availableEmptyTakeSite(){
        return R.ok().add(basDevpService.getAvailableEmptyOutSite());
    }
 
    @RequestMapping("/full/store/put/start")
    @ManagerAuth(memo = "全板入库")
    public R fullStorePutStart(@RequestBody FullStoreParam fullStoreParam) {
        workService.startupFullStore(fullStoreParam,getUserId());
        return R.ok("入库成功");
    }
 
    @RequestMapping("/empty/plate/in/start")
    @ManagerAuth(memo = "空板入库")
    public R emptyPlateInStart(@RequestParam Integer sourceStaNo) {
        workService.emptyPlateIn(sourceStaNo, getUserId());
        return R.ok("入库成功");
    }
 
    @RequestMapping("/empty/plate/out/start")
    @ManagerAuth(memo = "空板出库")
    public R emptyPlateOutStart(EmptyPlateOutParam param) {
        workService.emptyPlateOut(param, getUserId());
        return R.ok("出库成功");
    }
 
    @RequestMapping("/hand/control/wrkMast")
    @ManagerAuth(memo = "手动处理工作档")
    public R handControlWrkMast(@RequestParam String workNo,
                                @RequestParam Integer type){
        if (type == 1) {
            workService.completeWrkMast(workNo, getUserId());
        } else if (type == 2) {
            workService.cancelWrkMast(workNo, getUserId());
        }
        return R.ok();
    }
 
}