| | |
| | | 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.*; |
| | |
| | | @RequestMapping("agvMobile") |
| | | public class AgvMobileController extends BaseController { |
| | | |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(AgvMobileController.class); |
| | | @Autowired |
| | | private AgvMobileService agvMobileService; |
| | | @Autowired |
| | |
| | | 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; |
| | |
| | | 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); |
| | | // 同步调拨单 |
| | |
| | | @ManagerAuth(memo = "站点回退") |
| | | @Synchronized |
| | | public R doBack(@RequestBody AgvMobileStartPakin param){ |
| | | if (Cools.isEmpty(param)){ |
| | | return R.error("参数为空"); |
| | | } |
| | | agvMobileService.doBack(param, getUserId()); |
| | | return R.ok(); |
| | | } |