zhou zhou
19 小时以前 225018d0b2e66c2066c83dfbc0d6701593ddac9a
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
package com.vincent.rsf.server.api.controller.pda;
 
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.server.api.controller.erp.params.InventoryQueryConditionParam;
import com.vincent.rsf.server.api.entity.params.PdaGeneralParam;
import com.vincent.rsf.server.api.service.InBoundService;
import com.vincent.rsf.server.api.service.ReceiveMsgService;
import com.vincent.rsf.server.common.annotation.OperationLog;
import com.vincent.rsf.server.system.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@Api(tags = "PDA入库操作接口")
@RequestMapping("/pda")
@RestController
public class InBoundController extends BaseController {
 
    @Autowired
    private InBoundService inBoundService;
    @Resource
    private ReceiveMsgService receiveMsgService;
 
    @PostMapping("/in/emptyContainer/warehousing")
    @ApiOperation("空容器入库")
    public R emptyContainerWarehousing(@RequestBody PdaGeneralParam param) {
        return inBoundService.generateTasks(param, getLoginUserId());
    }
 
    @PostMapping("/check/agvStation")
    @ApiOperation("检查单据组托 agv站点")
    public R checkAgvStation(@RequestBody PdaGeneralParam param) {
        return inBoundService.checkAgvStation(param, getLoginUserId());
    }
 
    @PostMapping("/check/non/order")
    @ApiOperation("非订单出库")
    public R checkNonOrder(@RequestBody PdaGeneralParam param) {
        if (Cools.isEmpty(param.getTransferStationNo())) {
            return R.error("目标站点为空!!!");
        }
        if (Cools.isEmpty(param.getLocNo())) {
            return R.error("请选择起点库位!!!");
        }
        return inBoundService.checkNonOrder(param, getLoginUserId());
    }
 
    /**
     * 库存查询明细
     *
     * @param condition 查询条件
     * @return 库存明细列表
     */
    @PostMapping("/inventory/details")
    @ApiOperation(value = "库存查询明细", hidden = true)
    @OperationLog("库存查询明细")
    public R queryInventoryDetails(@RequestBody InventoryQueryConditionParam condition) {
        // 参数验证
        if (condition == null) {
            return R.error("查询条件不能为空");
        }
 
        return receiveMsgService.erpQueryInventoryDetails(condition);
    }
 
}