| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/wcs") |
| | | @Api(tags = "wcs接口对接") |
| | |
| | | return wcsService.receiveExMsg(params); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2026/2/6 |
| | | * @description: 申请入库任务,分配库位(内部接口) |
| | | * @version 1.0 |
| | | */ |
| | | @ApiOperation("申请入库任务,分配库位") |
| | | @PostMapping("/allocate/location") |
| | | public R allocateLocation(@RequestBody Map<String, Object> params) { |
| | | if (Cools.isEmpty(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | String barcode = (String) params.get("barcode"); |
| | | String staNo = (String) params.get("staNo"); |
| | | Integer type = params.get("type") != null ? Integer.valueOf(params.get("type").toString()) : null; |
| | | |
| | | if (Cools.isEmpty(barcode)) { |
| | | return R.error("料箱码不能为空!!"); |
| | | } |
| | | if (Cools.isEmpty(staNo)) { |
| | | return R.error("入库站点不能为空!!"); |
| | | } |
| | | if (type == null) { |
| | | return R.error("入库类型不能为空!!"); |
| | | } |
| | | |
| | | return wcsService.allocateLocation(barcode, staNo, type); |
| | | } |
| | | |
| | | |
| | | } |