Commit fa5f9ce7f052bcf613c1459be98eb70bdc4de346

Authored by 周峰
1 parent 95cab426

呼叫出库料盒

jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/api/mobile/controller/ShipmentController.java
1 1 package org.jeecg.modules.wms.api.mobile.controller;
2 2  
3   -
4   -import com.aliyun.oss.ServiceException;
5   -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
6   -import com.baomidou.mybatisplus.core.toolkit.Wrappers;
7   -import org.apache.commons.lang3.StringUtils;
  3 +import io.swagger.annotations.Api;
  4 +import io.swagger.annotations.ApiOperation;
  5 +import io.swagger.annotations.ApiParam;
8 6 import org.jeecg.common.api.vo.Result;
  7 +import org.jeecg.common.aspect.annotation.AutoLog;
9 8 import org.jeecg.common.system.base.controller.JeecgController;
10 9 import org.jeecg.common.system.util.JwtUtil;
11   -import org.jeecg.modules.wms.api.erp.service.IErpService;
12 10 import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
13 11 import org.jeecg.modules.wms.api.mobile.service.IMobileService;
14   -import org.jeecg.modules.wms.config.container.entity.Container;
15   -import org.jeecg.modules.wms.config.container.service.IContainerService;
16   -import org.jeecg.modules.wms.config.location.entity.Location;
17   -import org.jeecg.modules.wms.config.location.service.ILocationService;
18 12 import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger;
19 13 import org.jeecg.modules.wms.framework.controller.BaseController;
20   -import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
21   -import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService;
22 14 import org.jeecg.utils.constant.QuantityConstant;
23 15 import org.springframework.web.bind.annotation.*;
24   -
25 16 import javax.annotation.Resource;
26 17 import javax.servlet.http.HttpServletRequest;
27 18  
28 19 /**
29   - * @author 游杰
  20 + * * PDA出库接口,整合复用PC端service层接口
30 21 */
  22 +@Api(tags="Mobile")
31 23 @RestController
32   -@RequestMapping("/mobile/receipt")
33   -public class ReceiptController extends BaseController {
34   -
  24 +@RequestMapping("/mobile/shipment")
  25 +public class ShipmentController extends BaseController {
35 26  
36 27 @Resource
37 28 private IMobileService mobileService;
38 29  
  30 + @AutoLog(value = "PDA出库-呼叫料盒")
  31 + @ApiOperation(value="PDA出库-呼叫料盒", notes="创建空的分拣出库任务,并返回任务id")
39 32 @PostMapping("/callbox")
40 33 @ResponseBody
41   - @ApiLogger(apiName = "呼叫入库料盒", from="PDA")
42   - public Result callBox(@RequestBody CallBoxBean bean, HttpServletRequest req) {
43   - String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
44   -
45   - if(StringUtils.isEmpty(bean.getContainerCode())){
46   - return Result.error("托盘号containerCode不能为空");
47   - }
48   -
49   - if(StringUtils.isEmpty(bean.getLocationCode())){
50   - return Result.error("库位locationCode不能为空");
51   - }
52   -
53   - if(StringUtils.isEmpty(bean.getCompanyCode())){
54   - return Result.error("货主companyCode不能为空");
55   - }
  34 + @ApiLogger(apiName = "PDA出库-呼叫料盒", from = "PDA")
  35 + public Result<Integer> callBox(@RequestBody CallBoxBean bean, HttpServletRequest req) {
  36 + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
56 37  
57   - //补充入库类型
58   - bean.setType(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT);
  38 + //补充入库类型
  39 + bean.setType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT);
59 40  
60   - Result result = handleMultiProcess("receipt", new JeecgController.MultiProcessListener() {
  41 + Result result = handleMultiProcess("callBox", new JeecgController.MultiProcessListener() {
61 42 @Override
62 43 public Result doProcess() {
63 44 return mobileService.callBox(bean, warehouseCode);
... ...