自动化立体仓库 - WMS系统
#
lsh
2025-04-25 1c99199ceac9596a30cf0cd4e57d684ac7da7a94
src/main/java/com/zy/asrs/controller/OutController.java
@@ -1,5 +1,6 @@
package com.zy.asrs.controller;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.annotations.ManagerAuth;
import com.core.common.*;
import com.core.exception.CoolException;
@@ -12,6 +13,8 @@
import com.zy.common.model.LocDto;
import com.zy.common.model.TaskDto;
import com.zy.common.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -28,6 +31,7 @@
@RestController
public class OutController extends BaseController {
    private static final Logger log = LoggerFactory.getLogger(OutController.class);
    @Autowired
    private OrderService orderService;
    @Autowired
@@ -137,15 +141,26 @@
        StockOutParam param = new StockOutParam();
        ArrayList<StockOutParam.LocDetl> locDetls = new ArrayList<>();
        for (LocDto locDto:locDtos){
            Order order = orderService.selectByNo(locDto.getOrderNo());
            OrderDetl orderDetl = orderDetlService.selectById(locDto.getOrderDetlId());
            StockOutParam.LocDetl locDetl = new StockOutParam.LocDetl();
            locDetl.setBrand(locDto.getBrand());
            locDetl.setLocNo(locDto.getLocNo());
            try{
                LocDetl locDetl1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", locDto.getBatch()));
                locDetl.setLocNo(locDetl1.getLocNo());
            }catch (Exception e){
                log.error("订单出库库位号处理异常:"+e);
                locDetl.setLocNo(locDto.getLocNo());
            }
            locDetl.setAnfme(locDto.getAnfme());
            locDetl.setMatnr(locDto.getMatnr());
            locDetl.setBatch(locDto.getBatch());
            locDetl.setModel(locDto.getModel());
            locDetl.setSpecs(locDto.getSpecs());
            locDetl.setZpallet(locDto.getZpallet());
            locDetl.setMemo(orderDetl.getMemo());
            locDetl.setColor(order.getCstmrName());
            param.setOrderNo(locDto.getOrderNo());
@@ -154,7 +169,9 @@
        param.setLocDetls(locDetls);
        List<StockOutParam> stockOutParams = OutboundAllocationUtil.OutboundClassification(param);
        Date now = new Date();
        for (StockOutParam stockOutParam : stockOutParams){
            stockOutParam.setNowTime(now);
            workService.startupFullTakeStore(stockOutParam, getUserId());
        }