自动化立体仓库 - WMS系统
#
Junjie
8 天以前 b998e671c7e9eb1760cd38a8388885af758a9c14
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -13,6 +13,7 @@
import com.zy.asrs.entity.result.MobileAdjustResult;
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MathUtils;
import com.zy.asrs.utils.OrderInAndOutUtil;
import com.zy.common.model.WrkDto;
import com.zy.common.utils.Synchro;
@@ -68,6 +69,9 @@
    @Resource
    private StaDescService staDescService;
    @Autowired
    private OrderDetlPakinService orderDetlPakinService;
    @RequestMapping("/pda/WarehouseOut/v1")
    @ManagerAuth(memo = "并板途中拣料-参考念初")
@@ -209,15 +213,15 @@
                        Synchro.Copy(orderDetl, combMat);
                        combMat.setMatnr(orderDetl.getMatnr());
                        combMat.setBatch(orderDetl.getBatch());
                        combMat.setAnfme(orderDetl.getAnfme() - orderDetl.getWorkQty());
                        combMat.setAnfme(MathUtils.subtract(orderDetl.getAnfme(), orderDetl.getWorkQty()));
                        combMat.setMaktx(orderDetl.getMaktx());
                        combMat.setSpecs(orderDetl.getSpecs());
                        combMat.setEnableQty(orderDetl.getAnfme() - orderDetl.getWorkQty());
                        combMat.setEnableQty(MathUtils.subtract(orderDetl.getAnfme(), orderDetl.getWorkQty()));
                        combMats.add(combMat);
                    }
                    combParam.setCombMats(combMats);
                }
                combParam.setOrderNo(order.getOrderNo());
                //combParam.setOrderNo(order.getOrderNo());
                combParams.add(combParam);
            }
        }
@@ -240,8 +244,41 @@
        Mat mat = matService.selectByMatnr(nccJcQilibcBarcodeflowWms.getWlbm());
        MatParam matParam = new MatParam();
        Synchro.Copy(mat, matParam);
        OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>().eq("order_no", nccJcQilibcBarcodeflowWms.getZkdh()).eq("matnr", mat.getMatnr()).eq("batch", nccJcQilibcBarcodeflowWms.getVbatchcode()));
        if (orderDetlPakin == null) {
            throw new CoolException("未找到此单号");
        }
        matParam.setStandby1(orderDetlPakin.getStandby1());
        matParam.setOrderNo(nccJcQilibcBarcodeflowWms.getZkdh());
        matParam.setBatch(nccJcQilibcBarcodeflowWms.getVbatchcode());
        matParam.setAnfme(nccJcQilibcBarcodeflowWms.getAsnnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getAsnnum().doubleValue());
        matParam.setWeight(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue());
        matParam.setAnfme2(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue());
        matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode());
        return R.ok().add(matParam);
    }
    @RequestMapping(value = "/mat/auth")
    @ManagerAuth
    public R pdaSearchV3(@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(nccJcQilibcBarcodeflowWms.getAsnnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getAsnnum().doubleValue());
        matParam.setAnfme2(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue());
        matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode());
        return R.ok().add(matParam);
    }