示例#1
0
        /// <summary>
        /// 查询借还明细列表
        /// </summary>
        /// <param name="req">条件</param>
        /// <returns></returns>
        public async Task <PageList <BorrowRepayRecordListInfo> > QueryBorrowRepayRecordAsync(BorrowRepayRecordReq req)
        {
            //查询
            var taskModel         = ReportDAL.Inst.QueryBorrowRepayRecordAsync(this.LoginInfo.FamilyID, req); //明细
            var taskAmountAccount = BasicDAL.Inst.QueryAmountAccountAsync(this.LoginInfo.FamilyID);           //账户

            var lstModel         = await taskModel;                                                           //明细
            var lstAmountAccount = await taskAmountAccount;                                                   //账户

            var list = new List <BorrowRepayRecordListInfo>();
            var seq  = req.GetSkip() + 1;

            foreach (var model in lstModel)
            {
                var item = new BorrowRepayRecordListInfo();
                list.Add(item);

                //账户
                var amountAccount = lstAmountAccount.Find(m => m.ID == model.AmountAccountID);

                item.Seq               = seq++;
                item.ID                = model.ID;
                item.BRDate            = model.BRDate;
                item.Target            = model.Target;
                item.BRType            = model.BRType;
                item.BRTypeName        = this.GetBorrowRepayTypeName(model.BRType);
                item.AmountAccountName = amountAccount != null ? amountAccount.Name : "";
                item.Amount            = model.Amount;
                item.Remark            = model.Remark;
            }

            return(new PageList <BorrowRepayRecordListInfo>(list, lstModel.TotalRecord));
        }
示例#2
0
        public async Task <ResultPageList <BorrowRepayRecordListInfo> > QueryBorrowRepayRecordAsync([FromBody] BorrowRepayRecordReq req)
        {
            var list = await this.bll.QueryBorrowRepayRecordAsync(req);

            return(new ResultPageList <BorrowRepayRecordListInfo>(true, this.bll.Res.Gen.OK, list, (req.GetSkip() + 1), list.TotalRecord));
        }