自动化立体仓库 - WMS系统
#
野心家
2023-05-15 98b770b88b356b682260065f0449d4f453ba7c3b
src/main/java/com/zy/common/web/WcsController.java
@@ -3,10 +3,13 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.CombParam;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.PostMesDataUtils;
import com.zy.common.CodeRes;
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.StartupDto;
@@ -14,6 +17,7 @@
import com.zy.common.web.param.SearchLocParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -43,6 +47,12 @@
    private WaitPakinService waitPakinService;
    @Autowired
    private  LocDetlService locDetlService;
    @Value("mes.url")
    private String mesUrl;
    @Value("mes.inPath")
    private String inpath;
    @PostMapping("/pakin/loc/v1")
    @ResponseBody
@@ -176,6 +186,14 @@
            locMast.setModiTime(now);
            if (!locMastService.updateById(locMast)){
                throw new CoolException("改变库位状态失败");
            }else{
                //1.扫码上报
                CombParam combParam = new CombParam();
                combParam.setPackNo(locMast.getBarcode());
                combParam.setLocNo(locMast.getLocNo());
                combParam.setPackSts(1);
                combParam.setRequestTime(DateUtils.convert(new Date()));
                new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
            }
        } else {
            throw new CoolException(dto.getLocNo()+"目标库位已被占用");