| | |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.param.AgvMobileStartPakin; |
| | | import com.zy.asrs.entity.param.AgvMobileStartParam; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.Synchronized; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | */ |
| | | @PostMapping("/comb/auth") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | String message = agvMobileService.comb(combParam, 1l); |
| | | return R.ok(message); |
| | | agvMobileService.comb(combParam, getUserId()); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /* |
| | |
| | | public R combBinding(@RequestBody Map<String,Object> map){ |
| | | String barcode = map.get("barcode").toString(); |
| | | String stationCode = map.get("stationCode").toString(); |
| | | Short containerType = Short.valueOf(map.get("containerType").toString()); |
| | | Short containerType = Short.valueOf(barcode.substring(0,2)); |
| | | agvMobileService.combBinding(barcode,stationCode,containerType); |
| | | return R.ok("托盘绑定站点成功"); |
| | | } |
| | |
| | | } |
| | | |
| | | /* |
| | | 启动入库,组托 + 生产工作档 |
| | | */ |
| | | @PostMapping("/start/pakin/auth") |
| | | @Synchronized |
| | | @Transactional |
| | | public R startPakin(@RequestBody AgvMobileStartPakin params){ |
| | | // 组托 |
| | | params.getCombParams().forEach(combParam -> { |
| | | agvMobileService.comb(combParam,getUserId()); |
| | | }); |
| | | params.setContainerType(Short.valueOf(params.getContainerCode().substring(0,2))); |
| | | workService.emptyPlateIn(params.getDevNo(),params.getContainerCode(),params.getContainerType(), getUserId(),false); |
| | | |
| | | return R.ok("生成工作档成功"); |
| | | } |
| | | |
| | | /* |
| | | 入库 |
| | | */ |
| | | @PostMapping("/pakin/empty/auth") |
| | |
| | | |
| | | for (AgvMobileStartParam.Pda pda : params.getPad()) { |
| | | pda.setContainerType(Short.valueOf(pda.getContainerCode().substring(0,2))); |
| | | workService.emptyPlateIn(pda.getDevNo(),pda.getContainerCode(),pda.getContainerType(), getUserId()); |
| | | workService.emptyPlateIn(pda.getDevNo(),pda.getContainerCode(),pda.getContainerType(), getUserId(),false); |
| | | } |
| | | |
| | | return R.ok(); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | } |