|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.zy.asrs.common.domain.param.EmptyPlateOutParam; | 
|---|
|  |  |  | import com.zy.asrs.common.domain.param.FullStoreParam; | 
|---|
|  |  |  | import com.zy.asrs.common.domain.param.LocDetlAdjustParam; | 
|---|
|  |  |  | import com.zy.asrs.common.domain.param.StockOutParam; | 
|---|
|  |  |  | import com.zy.asrs.common.web.BaseController; | 
|---|
|  |  |  | import com.zy.asrs.common.wms.service.BasDevpService; | 
|---|
|  |  |  | import com.zy.asrs.common.wms.service.WorkService; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok("入库启动成功").add(workService.startupFullPutStore(fullStoreParam, getUserId(), getHostId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/empty/plate/in/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "空板入库") | 
|---|
|  |  |  | public R emptyPlateInStart(@RequestParam Integer sourceStaNo) { | 
|---|
|  |  |  | return R.ok("入库启动成功").add(workService.emptyPlateIn(sourceStaNo, getUserId(), getHostId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/available/empty/take/site") | 
|---|
|  |  |  | @ManagerAuth() | 
|---|
|  |  |  | public R availableEmptyTakeSite(){ | 
|---|
|  |  |  | return R.ok().add(basDevpService.getAvailableEmptyOutSite(getHostId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/plate/out/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "出库作业") | 
|---|
|  |  |  | public R fullStoreTakeStart(@RequestBody StockOutParam param) { | 
|---|
|  |  |  | workService.startupFullTakeStore(param, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("出库启动成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/empty/plate/out/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "空板出库") | 
|---|
|  |  |  | public R emptyPlateOutStart(EmptyPlateOutParam param) { | 
|---|
|  |  |  | workService.emptyPlateOut(param, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("出库启动成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/locCheck/out/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "盘点出库") | 
|---|
|  |  |  | public synchronized R locCheckOutStart(@RequestBody StockOutParam param) { | 
|---|
|  |  |  | workService.locCheckOut(param, getUserId(), getHostId()); | 
|---|
|  |  |  | 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(), getHostId()); | 
|---|
|  |  |  | return R.ok("工作档已完成"); | 
|---|
|  |  |  | } else if (type == 2) { | 
|---|
|  |  |  | workService.cancelWrkMast(workNo, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("工作档已取消"); | 
|---|
|  |  |  | } else if (type == 3) { | 
|---|
|  |  |  | workService.pickWrkMast(workNo, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("工作档已拣料"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/locDdetl/adjust/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "库存调整") | 
|---|
|  |  |  | public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) { | 
|---|
|  |  |  | workService.adjustLocDetl(param, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("库存调整成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/loc/move/start") | 
|---|
|  |  |  | @ManagerAuth(memo = "库位移转") | 
|---|
|  |  |  | public synchronized R locMoveStart(@RequestParam String sourceLocNo, | 
|---|
|  |  |  | @RequestParam String targetLocNo) { | 
|---|
|  |  |  | workService.locMove(sourceLocNo, targetLocNo, getUserId(), getHostId()); | 
|---|
|  |  |  | return R.ok("移库启动成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|