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();
|
}
|
|
}
|