| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | 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 { |
| | | public class WorkController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WorkService workService; |
| | |
| | | private BasDevpService basDevpService; |
| | | |
| | | @RequestMapping("/available/put/site") |
| | | @ManagerAuth(memo = "获取有效的入库站点") |
| | | @ManagerAuth(memo = "获取入库站点") |
| | | public R availablePutSite(){ |
| | | return R.ok().add(basDevpService.getAvailableDevp()); |
| | | return R.ok().add(basDevpService.getAvailableInSite()); |
| | | } |
| | | |
| | | @RequestMapping("/full/store/start") |
| | | @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 start(@RequestBody FullStoreParam fullStoreParam) { |
| | | public R fullStorePutStart(@RequestBody FullStoreParam fullStoreParam) { |
| | | workService.startupFullStore(fullStoreParam,getUserId()); |
| | | return R.ok("入库成功"); |
| | | } |
| | | |
| | | System.out.println(JSON.toJSONString(fullStoreParam)); |
| | | @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(); |
| | | } |
| | | |