/// <summary> /// 根据供应商编号查找未支付的应付款(包括PO、代销结算单) /// </summary> /// <param name="vendorSysNo"></param> /// <param name="pmSysNoList"></param> /// <returns></returns> protected virtual List <PayableInfo> GetUnPayListByVendorPMSysNo(int vendorSysNo, List <int> pmSysNoList) { var unpayList = ObjectFactory <PayableProcessor> .Instance.GetUnPayOrPartlyPayList(); unpayList.RemoveAll(r => r.OrderType == PayableOrderType.CollectionSettlement); //调用PO接口取得PO单系统编号列表 var poSysNoList = ExternalDomainBroker.GetPOSysNoListByVendorSysNo(vendorSysNo, pmSysNoList); //调用PO接口取得代销结算单系统编号列表 var vendorSettleSysNoList = ExternalDomainBroker.GetVendorSettleSysNoListByVendorSysNo(vendorSysNo, pmSysNoList); unpayList = unpayList.Where(w => (w.OrderType == PayableOrderType.PO && poSysNoList.Contains(w.OrderSysNo.Value)) || (w.OrderType == PayableOrderType.VendorSettleOrder && vendorSettleSysNoList.Contains(w.OrderSysNo.Value))) .ToList(); return(unpayList); }
/// <summary> /// 根据供应商系统编号、付款单状态和供应商PM编号列表取得付款单列表(包括PO、代销结算单) /// </summary> /// <param name="vendorSysNo">供应商系统编号</param> /// <param name="status">付款单状态</param> /// <param name="pmSysNoList">供应商PM系统编号列表</param> /// <returns></returns> protected virtual List <PayItemInfo> GetListByVenderPMSysNo(int vendorSysNo, PayItemStatus status, List <int> pmSysNoList) { //取得所有满足状态Status的PO单、代销结算单 var payItemList = m_PayItemDA.GetListByStatus(status); payItemList.RemoveAll(r => r.OrderType == PayableOrderType.CollectionSettlement); //调用PO接口取得PO单系统编号列表 var poSysNoList = ExternalDomainBroker.GetPOSysNoListByVendorSysNo(vendorSysNo, pmSysNoList); //调用PO接口取得代销结算单系统编号列表 var vendorSettleSysNoList = ExternalDomainBroker.GetVendorSettleSysNoListByVendorSysNo(vendorSysNo, pmSysNoList); payItemList = payItemList.Where(w => (w.OrderType == PayableOrderType.PO && poSysNoList.Contains(w.OrderSysNo.Value)) || (w.OrderType == PayableOrderType.VendorSettleOrder && vendorSettleSysNoList.Contains(w.OrderSysNo.Value))) .ToList(); return(payItemList); }