Esempio n. 1
0
        /// <summary>
        /// 根据供应商编号取得未支付的应付款(包括PO、代销结算单、代收结算单)
        /// </summary>
        /// <param name="vendorSysNo"></param>
        /// <returns></returns>
        protected virtual List <PayableInfo> GetUnPayListByVendorSysNo(int vendorSysNo)
        {
            var unpayList = ObjectFactory <PayableProcessor> .Instance.GetUnPayOrPartlyPayList();

            //调用PO接口取得PO单系统编号列表
            var poSysNoList = ExternalDomainBroker.GetPOSysNoListByVendorSysNo(vendorSysNo, null);

            //调用PO接口取得代销结算单系统编号列表
            var vendorSettleSysNoList = ExternalDomainBroker.GetVendorSettleSysNoListByVendorSysNo(vendorSysNo, null);

            //调用PO接口取得代收结算单系统编号列表
            var collectionSettleSysNoList = ExternalDomainBroker.GetCollectionSettlementSysNoListByVendorSysNo(vendorSysNo);

            unpayList = unpayList.Where(w => (w.OrderType == PayableOrderType.PO && poSysNoList.Contains(w.OrderSysNo.Value)) ||
                                        (w.OrderType == PayableOrderType.VendorSettleOrder && vendorSettleSysNoList.Contains(w.OrderSysNo.Value)) ||
                                        (w.OrderType == PayableOrderType.CollectionSettlement && collectionSettleSysNoList.Contains(w.OrderSysNo.Value)))
                        .ToList();

            return(unpayList);
        }
Esempio n. 2
0
        /// <summary>
        /// 根据供应商系统编号、付款单状态取得付款单列表(包括PO、代销结算单、代收结算单)
        /// </summary>
        /// <param name="vendorSysNo">供应商系统编号</param>
        /// <param name="status">付款单状态</param>
        /// <returns>满足条件的付款单列表</returns>
        protected virtual List <PayItemInfo> GetListByVendorSysNo(int vendorSysNo, PayItemStatus status)
        {
            //取得所有满足状态Status的PO单、代销结算单、代收结算单的付款单列表
            var payItemList = m_PayItemDA.GetListByStatus(status);

            //调用PO接口取得PO单系统编号列表
            var poSysNoList = ExternalDomainBroker.GetPOSysNoListByVendorSysNo(vendorSysNo, null);

            //调用PO接口取得代销结算单系统编号列表
            var vendorSettleSysNoList = ExternalDomainBroker.GetVendorSettleSysNoListByVendorSysNo(vendorSysNo, null);

            //调用PO接口取得代收结算单系统编号列表
            var collectionSettleSysNoList = ExternalDomainBroker.GetCollectionSettlementSysNoListByVendorSysNo(vendorSysNo);

            payItemList = payItemList.Where(w => (w.OrderType == PayableOrderType.PO && poSysNoList.Contains(w.OrderSysNo.Value)) ||
                                            (w.OrderType == PayableOrderType.VendorSettleOrder && vendorSettleSysNoList.Contains(w.OrderSysNo.Value)) ||
                                            (w.OrderType == PayableOrderType.CollectionSettlement && collectionSettleSysNoList.Contains(w.OrderSysNo.Value)))
                          .ToList();

            return(payItemList);
        }