MobileTaskForASRSController2.java
3.41 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.huaheng.mobile.shipment;
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.receipt.receiptHeader.service.IReceiptHeaderService;
import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentAutoCombinationModel;
import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentCombinationModel;
import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader;
import com.huaheng.pc.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService;
import com.huaheng.pc.shipment.shipmentHeader.service.IShipmentHeaderService;
import com.huaheng.pc.task.task.domain.ShipmentTaskCreateModel;
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.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@CrossOrigin
@RestController
@RequestMapping("/mobile/task/taskForShip")
@Api(tags = {"MobileTaskForShipController"}, description = "手机立体库任务拣货相关")
public class MobileTaskForASRSController2 {
@Resource
private IShipmentHeaderService shipmentHeaderService;
@Resource
private ITaskService taskService;
@Resource
private IShipmentContainerHeaderService shipmentContainerHeaderService;
@PostMapping("/getTaskDetail")
@ApiOperation("移动端扫描出库单")
@Log(title = "移动端扫描出库单", action = BusinessType.OTHER)
public AjaxResult getTaskDetail(@RequestBody @ApiParam(value = "出库单号") Map<String, String> param) {
if (param.get("code") == null || param.get("code").trim().length() < 1) {
throw new JSONException("出库单号(code)不能为空");
}
AjaxResult result = shipmentHeaderService.getShipDetail(param.get("code"));
return result;
}
@PostMapping("/createShipTask")
@ApiOperation("移动端生成出库任务")
@Log(title = "移动端扫描出库单", action = BusinessType.OTHER)
public AjaxResult createShipTask(@RequestBody @ApiParam(value = "出库任务") ShipmentTaskCreateModel model) {
AjaxResult result = taskService.createTaskFromShipmentContainers(model);
return result;
}
@PostMapping("/combination")
@ApiOperation("移动端生成出库组盘")
@Log(title = "移动端出库组盘", action = BusinessType.OTHER)
public AjaxResult combination(@RequestBody @ApiParam(value = "出库组盘") List<ShipmentCombinationModel> shipmentCombinationModels) {
AjaxResult result = shipmentContainerHeaderService.Batchcombination(shipmentCombinationModels);
return result;
}
@PostMapping("/autoCombination")
@ApiOperation("移动端生产自动出库组盘")
@Log(title = "移动端自动出库组盘", action = BusinessType.OTHER)
public AjaxResult autoCombination(@RequestBody @ApiParam(value = "出库组盘") List<ShipmentAutoCombinationModel> shipmentAutoCombinationModels) {
AjaxResult result = shipmentContainerHeaderService.autoCombination(shipmentAutoCombinationModels);
return result;
}
}