| | |
| | | package com.zy.asrs.wms.asrs.controller;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.zy.asrs.common.domain.CodeRes;
|
| | | import com.zy.asrs.common.domain.enums.LoginSystemType;
|
| | | import com.zy.asrs.framework.annotations.ManagerAuth;
|
| | | import com.zy.asrs.framework.common.Cools;
|
| | | import com.zy.asrs.framework.common.R;
|
| | | import com.zy.asrs.wms.asrs.entity.Loc;
|
| | | import com.zy.asrs.wms.asrs.entity.Order;
|
| | | import com.zy.asrs.wms.asrs.entity.WaitPakin;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.OrderInfoDto;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.PickSheetDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.param.BatchMergeOrdersParam;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PageRequest;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
|
| | | import com.zy.asrs.wms.asrs.service.MobileService;
|
| | | import com.zy.asrs.wms.asrs.service.OrderService;
|
| | | import com.zy.asrs.wms.asrs.service.WaitPakinService;
|
| | | import com.zy.asrs.wms.common.domain.BaseParam;
|
| | | import com.zy.asrs.wms.system.controller.BaseController;
|
| | | import com.zy.asrs.wms.system.entity.Host;
|
| | | import com.zy.asrs.wms.system.entity.User;
|
| | |
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import sun.nio.ch.IOStatus;
|
| | |
|
| | | import java.util.*;
|
| | |
|
| | |
| | | private OrderService orderService;
|
| | | @Autowired
|
| | | private MobileService mobileService;
|
| | | @Autowired
|
| | | private WaitPakinService waitPakinService;
|
| | |
|
| | | /**
|
| | | * 获取用户机构
|
| | |
| | | }
|
| | | Order order = orderService.selectByBarcode(barcode.get("barcode"));
|
| | |
|
| | | if (!(order.getOrderType() == 1)) {
|
| | | return R.error("非入库订单, 不可操作!!");
|
| | | }
|
| | | // if (order.getOrderSettle() > 2) {
|
| | | // return R.error("单据当前状态不可做入库操作!!");
|
| | | // }
|
| | | List<OrderInfoDto> orders = orderService.getDetlForOrderId(order.getId());
|
| | |
|
| | | return R.ok(orders);
|
| | | }
|
| | |
|
| | | /**
|
| | | * PDA扫码入库
|
| | | * 1. 绑定库位号与拖盘码
|
| | | * 2. 库位置为在库状态
|
| | | * @return
|
| | | */
|
| | | @PostMapping("/matnr/in/barcode")
|
| | | public R pakinToStock(@RequestBody PakinOnShelvesParams shelvesParams) {
|
| | | if (StringUtil.isNullOrEmpty(shelvesParams.getBarcode())) {
|
| | | return R.error("拖盘码不能为空!!");
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(shelvesParams.getLoc())) {
|
| | | return R.error("库位不能为空!!");
|
| | | }
|
| | | //TODO 绑定库位,添加库位明细
|
| | | if (mobileService.pakinToStock(shelvesParams)) {
|
| | | return R.ok("入库成功!!");
|
| | | } else {
|
| | | return R.error("入库失败!!");
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取拖码盘绑定商品
|
| | | * @return
|
| | | */
|
| | | @GetMapping("/barcode/matnr/{code}")
|
| | | public R getAllGoods(@PathVariable String code) {
|
| | | if (StringUtil.isNullOrEmpty(code)) {
|
| | | return R.error("托盘码不能为空!!");
|
| | | }
|
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code).eq(WaitPakin::getIoStatus, 0));
|
| | |
|
| | | return R.ok(waitPakins);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取拣货明细
|
| | | * @return
|
| | | */
|
| | | @GetMapping("/pick/detl/{code}")
|
| | | public R pickDetlByPickNo(@PathVariable String code) {
|
| | | if (StringUtil.isNullOrEmpty(code)) {
|
| | | return R.error("拣货单据编码不能为空!!");
|
| | | }
|
| | | PickSheetDetlDto pickSheetDetls = mobileService.outFlatSheet(code);
|
| | |
|
| | | return R.ok(pickSheetDetls);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 拣货单确认出库
|
| | | * @param code
|
| | | * @return
|
| | | */
|
| | | @GetMapping("/pick/confirm/{code}")
|
| | | public R confirmOutFlatSheet(@PathVariable String code) {
|
| | | if (StringUtil.isNullOrEmpty(code)) {
|
| | | return R.error("拣货单据编码不能为空!!");
|
| | | }
|
| | | if (!mobileService.confirmFlatSheet(code)) {
|
| | | return R.error("出库失败!!");
|
| | | }
|
| | | return R.ok("出库成功!!");
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | }
|