ArrivedNoticeController.java
2.45 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
package com.huaheng.api.wcs.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.huaheng.common.constant.Constants;
import com.huaheng.common.constant.QuantityConstant;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.framework.web.service.ConfigService;
import com.huaheng.pc.config.container.service.ContainerService;
import com.huaheng.pc.config.location.domain.Location;
import com.huaheng.pc.config.location.service.LocationService;
import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
@RestController
@RequestMapping("/API/WMS/v2")
public class ArrivedNoticeController extends BaseController {
@Resource
private TaskHeaderService taskHeaderService;
@Resource
private TaskDetailService taskDetailService;
@Resource
private InventoryDetailService inventoryDetailService;
@Resource
private LocationService locationService;
@Resource
private ContainerService containerService;
@Resource
private ConfigService configService;
@PostMapping("/arrivedNotice")
@ApiOperation("到达拣选台")
@ApiLogger(apiName = "到达拣选台", from="ROBOT")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult arrivedNotice(@RequestBody Map<String,String> map) {
String warehouseCode = Constants.WAREHOUSE_CODE;
String taskNo = map.get("taskNo");
String port = map.get("port");
String msg = map.get("msg");
String state = map.get("state");
LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
taskHeaderLambdaQueryWrapper.eq(TaskHeader::getId, taskNo);
TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper);
return taskHeaderService.arrivedNotice(taskHeader);
}
}