| | |
| | | package com.vincent.rsf.server.api.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.controller.params.ReceiptParams; |
| | | import com.vincent.rsf.server.api.service.MobileService; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderItem; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | | |
| | | |
| | | /** |
| | | * PDA用户登录 |
| | | * @param param |
| | |
| | | |
| | | /** |
| | | * 标准扫码收货信息 |
| | | * @param barcode |
| | | * @param trackCode |
| | | * @return |
| | | */ |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | @GetMapping("/orders/{barcode}") |
| | | @GetMapping("/orders/{trackCode}") |
| | | @ApiOperation("标准扫码收货") |
| | | public R getOrderBybarcode(@PathVariable String barcode) { |
| | | if (StringUtils.isEmpty(barcode)) { |
| | | public R getOrderBybarcode(@PathVariable String trackCode) { |
| | | if (StringUtils.isEmpty(trackCode)) { |
| | | throw new CoolException("条码不能为空!!"); |
| | | } |
| | | return mobileService.getOrderByCode(barcode); |
| | | return mobileService.getOrderByCode(trackCode); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return R.error("编码不能为空!!"); |
| | | } |
| | | return mobileService.getDeltByCode(code); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖") |
| | | @PostMapping("/waitPakin/merge") |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.mergeItems(waitPakin)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖解绑") |
| | | @PostMapping("/waitPakin/unbind") |
| | | public R pakinUnBind(@RequestBody WaitPakinParam param) { |
| | | if (Objects.isNull(param)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.unBind(param)); |
| | | } |
| | | |
| | | @ApiOperation("报检") |
| | | @GetMapping("/asnOrder/inspect/{code}") |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:list')") |
| | | public R getAsnOdrers(@PathVariable String code) { |
| | | if (Objects.isNull(code)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return mobileService.inspect(code, getLoginUserId()); |
| | | } |
| | | |
| | | } |