收货明细得到采购明细代码!

来源:互联网 发布:r读取sas数据 编辑:程序博客网 时间:2024/05/01 15:11

VendorGoodsDlvItemDAO daoDlvItem = new VendorGoodsDlvItemDAO();    
    VendorGoodsDlvItemPO dlvItemPO = (VendorGoodsDlvItemPO) daoDlvItem.getObject(VendorGoodsDlvItemPO.class, itemPO.getDeliveryItemId());
    
    PurchaseGoodsDlvPlanDAO daoDlvPlan = new PurchaseGoodsDlvPlanDAO();    
    PurchaseGoodsDlvPlanPO deliveryPO = (PurchaseGoodsDlvPlanPO) daoDlvPlan.getObject(PurchaseGoodsDlvPlanPO.class, dlvItemPO.getBillItemId());
    
    if (itemPO.getProduct() != null) {
     BuyerComponentPO product = BusinessUtil.getMaterial(itemPO.getProduct().getQeId());
     newItemVo.setProduct(product);
     newItemVo.setBrandNo(deliveryPO.getPurchaseOrderItem().getBrandNo()); // 材料牌号
     newItemVo.setRequireSpec(deliveryPO.getPurchaseOrderItem().getRequireSpec()); // 送货规格
     newItemVo.setPartPicCode(deliveryPO.getPurchaseOrderItem().getPartNo()); //零件图号
     newItemVo.setCartType(deliveryPO.getPurchaseOrderItem().getCarModel()); //车型
//     newItemVo.setBrandNo(product.getBuyerComponentExt().getCol22()); // 材料牌号
//     newItemVo.setRequireSpec(product.getBuyerComponentExt().getCol21()); // 送货规格
//     newItemVo.setPartPicCode(product.getBuyerComponentExt().getCol23()); //零件图号
//     newItemVo.setCartType(product.getBuyerComponentExt().getCol24()); //车型
    }