| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.model.enumUtils.OrderEnumVo; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.nc.entity.NccJcQilibcBarcodeflowWms; |
| | | import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private ManLocDetlMapper manLocDetlMapper; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private NccJcQilibcBarcodeflowWmsService nccJcQilibcBarcodeflowWmsService; |
| | | @Autowired |
| | | private OrderPakinService orderPakinService; |
| | | |
| | | @Resource |
| | | private StaDescService staDescService; |
| | |
| | | mobileService.onSale(combParam); |
| | | return R.ok("上架成功"); |
| | | } |
| | | |
| | | // 商品下架 |
| | | @RequestMapping("/mat/offSale/auth") |
| | | //@ManagerAuth |
| | |
| | | mobileService.offSale(offSaleParam); |
| | | return R.ok("下架成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | |
| | | if (Cools.isEmpty(orderNo)){ |
| | | orderNo=null; |
| | | } |
| | | // List<Order> orders = orderService.selectorderNoL(orderNo); |
| | | List<Order> orders = OrderInAndOutUtil.selectOrderNoL(null, orderNo); |
| | | if (Cools.isEmpty(orders)){ |
| | | List<OrderPakin> orderPakins = orderPakinService.selectorderNoL(orderNo); |
| | | //List<Order> orders = OrderInAndOutUtil.selectOrderNoL(OrderEnumVo.PAKIN.getCode(), orderNo); |
| | | if (Cools.isEmpty(orderPakins)) { |
| | | return R.ok(); |
| | | } |
| | | LinkedList<CombParam> combParams = new LinkedList<>(); |
| | | if (!Cools.isEmpty(orders)){ |
| | | for (Order order:orders){ |
| | | if (!Cools.isEmpty(orderPakins)) { |
| | | for (OrderPakin order : orderPakins) { |
| | | CombParam combParam=new CombParam(); |
| | | if (order == null) { |
| | | continue; |
| | |
| | | combParams.add(combParam); |
| | | } |
| | | } |
| | | return R.ok().add(combParams); |
| | | return R.ok().add(combParams.get(0)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/search/auth") |
| | | @ManagerAuth |
| | | public R pdaSearchV2(@RequestParam String matnr) { |
| | | EntityWrapper<NccJcQilibcBarcodeflowWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("VBARCODE", matnr).orderBy("ts", false); |
| | | NccJcQilibcBarcodeflowWms nccJcQilibcBarcodeflowWms = nccJcQilibcBarcodeflowWmsService.selectOne(wrapper); |
| | | if (null == nccJcQilibcBarcodeflowWms) { |
| | | return R.error("未找到此条码"); |
| | | } else { |
| | | if (!nccJcQilibcBarcodeflowWms.getInfla().equals("出库")) { |
| | | return R.error("该条码最后一次不是出库"); |
| | | } |
| | | } |
| | | Mat mat = matService.selectByMatnr(nccJcQilibcBarcodeflowWms.getWlbm()); |
| | | MatParam matParam = new MatParam(); |
| | | Synchro.Copy(mat, matParam); |
| | | matParam.setBatch(nccJcQilibcBarcodeflowWms.getVbatchcode()); |
| | | matParam.setAnfme(12D); |
| | | return R.ok().add(matParam); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |