MobilePutawayController.java
1.89 KB
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
package com.huaheng.mobile.receipt;
import com.alibaba.fastjson.JSONException;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.task.task.service.ITaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
@RestController
@RequestMapping("/mobile/putaway/execute")
@Api(tags = {"MobilePutawayController"}, description = "手机收货上架")
public class MobilePutawayController {
@Resource
private ITaskService taskService;
@PostMapping("/scanContainer")
@ApiOperation("手机扫描容器收货上架")
@Log(title = "手机扫描容器收货上架", action = BusinessType.OTHER)
public AjaxResult scanContainer(@RequestBody @ApiParam(value="容器号") Map<String, String> param) throws Exception {
if (param.get("containerCode") == null || param.get("containerCode").trim().length() < 1)
throw new JSONException("容器号(containerCode)不能为空");
AjaxResult retResult = taskService.createTask(param.get("containerCode"));
return retResult;
}
@PostMapping("/scanLocationCode")
@ApiOperation("手机扫描库位收货上架")
@Log(title = "手机扫描库位收货上架", action = BusinessType.OTHER)
public AjaxResult scanLocationCode(@RequestBody @ApiParam(value="库位编码") Map<String, String> param) throws Exception {
if (param.get("locationCode") == null || param.get("locationCode").trim().length() < 1)
throw new JSONException("库位号(locationCode)不能为空");
AjaxResult retResult = taskService.completeTask(param.get("locationCode"));
return retResult;
}
}