自动化立体仓库 - WMS系统
zyx
2024-07-04 13c2be4774f4afbb34fa70be97c96802f07b15ff
src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -12,6 +12,8 @@
import com.zy.common.web.BaseController;
import io.swagger.models.auth.In;
import lombok.Synchronized;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -27,6 +29,8 @@
@RequestMapping("agvMobile")
public class AgvMobileController extends BaseController  {
    private static final Logger log = LoggerFactory.getLogger(AgvMobileController.class);
    @Autowired
    private AgvMobileService agvMobileService;
    @Autowired
@@ -421,6 +425,11 @@
        if (mT.equals("unAuto")) {
            moveType = "2";
            ioType = 111;
            int count = agvWrkMastService.selectCount(new EntityWrapper<AgvWrkMast>().eq("io_type", ioType));
            if (count>3){
                log.equals("111任务堵塞,稍后再试!!!当前限制数量3条,限制条件:io_type = 111");
                throw new CoolException("111任务堵塞,稍后再试!");
            }
        } else {
            moveType = "1";
            ioType = 108;
@@ -431,6 +440,10 @@
            AgvWrkMast source_loc_no = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locNo));
            if (!Cools.isEmpty(source_loc_no)) {
                throw new CoolException("当前库位已生成任务!");
            }
            AgvLocMast locMastS = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locNo).eq("loc_sts","F"));
            if (Cools.isEmpty(locMastS)) {
                throw new CoolException("当前库位非在库状态!库位号="+locNo);
            }
            AgvWrkMast wrkMast = createWrkMast(ioType, 22L, locNo, "", barcode, now, getUserId(), 30,floor);
            // 同步调拨单
@@ -513,6 +526,9 @@
    @ManagerAuth(memo = "站点回退")
    @Synchronized
    public R doBack(@RequestBody AgvMobileStartPakin param){
        if (Cools.isEmpty(param)){
            return R.error("参数为空");
        }
        agvMobileService.doBack(param, getUserId());
        return R.ok();
    }