| | |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.*; |
| | | import com.vincent.rsf.server.api.controller.erp.params.CheckObjParams; |
| | | import com.vincent.rsf.server.api.controller.erp.params.ManualShelvingParams; |
| | | import com.vincent.rsf.server.api.controller.erp.params.OpStockParams; |
| | | import com.vincent.rsf.server.api.controller.erp.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.service.AgvService; |
| | | import com.vincent.rsf.server.api.service.MobileService; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.QlyIsptItem; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.tika.utils.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private AgvService agvService; |
| | | /** |
| | | * PDA用户登录 |
| | | * @param param |
| | |
| | | @ApiOperation("获取收货区") |
| | | @GetMapping("/areas/receipt") |
| | | public R getReceiptAreas() { |
| | | return mobileService.getReceiptAreas(); |
| | | return mobileService.getReceiptAreas(getLoginUser()); |
| | | } |
| | | |
| | | |
| | |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.mergeItems(waitPakin, userId)); |
| | | // return R.ok(mobileService.mergeItems(waitPakin, userId)); |
| | | try{ |
| | | mobileService.mergeItems(waitPakin, userId); |
| | | if (waitPakin.getAgvSign()==1) { |
| | | asyncProcessAfterValidation(waitPakin,userId); |
| | | } |
| | | } catch (Exception e){ |
| | | return R.error(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Async |
| | | public void asyncProcessAfterValidation(WaitPakinParam waitPakinPda,Long userId) { |
| | | try { |
| | | Thread.sleep(500); |
| | | // WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakinPda.getBarcode())); |
| | | agvService.AGVBindAndInTaskStart(waitPakinPda, userId); |
| | | // mobileService.mergeItemsWcs(waitPakin,userId); |
| | | } catch (Exception e) { |
| | | // log.error("异步处理AGV后续逻辑失败", e); |
| | | } |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | |
| | | if (Objects.isNull(params) || params.isEmpty()) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return mobileService.checkUpdate(params); |
| | | return mobileService.checkUpdate(params, getLoginUserId()); |
| | | } |
| | | |
| | | @ApiOperation("获取上架信息") |