| | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.GDYKConfirmGoodsParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OffSaleParam; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 移动端接口控制器 |
| | |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Resource |
| | | private StaDescService staDescService; |
| | | |
| | | @RequestMapping("/pda/WarehouseOut/v1") |
| | | @ManagerAuth(memo = "并板途中拣料-参考念初") |
| | | public R WarehouseOutV1(@RequestBody CombParam combParam) { |
| | | return mobileService.WarehouseOutV1(combParam, getHostId(), getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/pda/WarehouseOutPickMerge/v1") |
| | | @ManagerAuth(memo = "拣料途中并板") |
| | | public R WarehouseOutPickMergeV1(@RequestBody WarehouseOutPickMergeParam param) { |
| | | if (Cools.isEmpty(param,param.getLocNo(),param.getBarcode(),param.getCombMats())) { |
| | | return R.parse("参数不能为空!"); |
| | | } |
| | | return mobileService.WarehouseOutPickMergeV1(param, getHostId(), getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/pick/in") |
| | | @ManagerAuth(memo = "并板入库") |
| | | public R pickConfirm(@RequestBody PickConfirmParam param) { |
| | | |
| | | if(Cools.isEmpty(param,param.getList(),param.getLocNo(),param.getStaNo())) { |
| | | return R.parse("参数不完整"); |
| | | } |
| | | return mobileService.pickConfirm(param, getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/barcode/list/all") |
| | | @ManagerAuth(memo = "并板入库途中拣料出库获取任务信息") |
| | | public R orderOutListOrder(@RequestParam(required = false) String barcode) { |
| | | return mobileService.orderOutListOrder(barcode, getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/barcode/list/pick") |
| | | @ManagerAuth(memo = "拣料入库途中并板获取任务信息") |
| | | public R orderOutListOrderPick(@RequestParam(required = false) String barcode) { |
| | | return mobileService.orderOutListOrderPick(barcode, getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/loc/f/list") |
| | | @ManagerAuth(memo = "获取在库库位") |
| | | public R locNoF(@RequestParam(required = false) String locNo) { |
| | | Wrapper<LocMast> wrapper = new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "F"); |
| | | if (!Cools.isEmpty(locNo)) { |
| | | wrapper.like("loc_no", locNo); |
| | | } |
| | | List<LocMast> list = locMastService.selectList(wrapper); |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @RequestMapping("/pick/sta/list") |
| | | @ManagerAuth(memo = "获取并板站") |
| | | public R pickSta() { |
| | | List<StaDesc> list = staDescService.selectList(new EntityWrapper<StaDesc>() |
| | | .eq("type_no", 104)); |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @RequestMapping("/pick/mat/list") |
| | | @ManagerAuth(memo = "获取并板物料") |
| | | public R pickMats(@RequestParam(required = false) String matnr, @RequestParam(required = false) String orderNo) { |
| | | return mobileService.pickMats(matnr, orderNo); |
| | | } |
| | | |
| | | // 商品上架 |
| | | @RequestMapping("/mat/onSale/auth") |
| | |
| | | return R.ok(); |
| | | } |
| | | // List<Order> orders = orderService.selectorderNoL(batch); |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("matnr", combParam.getMatnr()).eq("batch", combParam.getBatch()).eq("order_no",combParam.getOrderNo())); |
| | | // OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("matnr", combParam.getMatnr()).eq("batch", combParam.getBatch()).eq("order_no",combParam.getOrderNo())); |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, combParam.getOrderNo()); |
| | | List<OrderDetl> orderDetlList = OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId()); |
| | | OrderDetl orderDetl = null; |
| | | for (OrderDetl orderDetl1 : orderDetlList){ |
| | | if (combParam.getMatnr().equals(orderDetl1.getMatnr()) && combParam.getBatch().equals(orderDetl1.getBatch())){ |
| | | orderDetl = orderDetl1; |
| | | break; |
| | | } |
| | | } |
| | | if (Cools.isEmpty(orderDetl)){ |
| | | return R.error("未查到数据"); |
| | | } |
| | |
| | | } |
| | | //复核数 |
| | | orderDetl.setSource(1); |
| | | orderDetlService.updateById(orderDetl); |
| | | // orderDetlService.updateById(orderDetl); |
| | | OrderInAndOutUtil.updateOrderDetl(Boolean.FALSE,order,orderDetl); |
| | | return R.ok(); |
| | | } |
| | | |