自动化立体仓库 - WMS系统
#
LSH
2023-05-17 f5f7889cd423667b4b6d63d12ff9c78750952262
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
@@ -78,11 +88,11 @@
            }
        }
        if (Cools.isEmpty(param.getLocType1())){
            return R.error("高低检测信号不能为空");
            param.setLocType1((short)1);
        }
        // 源站点状态检测
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true);
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), false);
//        sourceStaNo.setLocType1(param.getLocType1());
        sourceStaNo.setLocType1((short)1);
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
@@ -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()+"目标库位已被占用");