| | |
| | | } |
| | | var query = (from a in _context.FiAccountRecords//.Where(x => x.RecStatus == "A") |
| | | join z in _context.FiAccounts on a.AccountId equals z.Id |
| | | |
| | | join b in listCode.Where(x => x.CodeTable == "fi_account" && x.CodeField == "accounttype") |
| | | on z.Accounttype equals b.CodeSn |
| | | into bsss |
| | | from bbb in bsss.DefaultIfEmpty() |
| | | |
| | | |
| | | join c in listCode.Where(x => x.CodeTable == "fi_account_record" && x.CodeField == "RecordTypeId") |
| | | on a.RecordTypeId equals c.CodeSn |
| | | into csss |
| | | from ccc in csss.DefaultIfEmpty() |
| | | |
| | | |
| | | join f in _context.FiSubjects on a.SubjectId equals f.Id |
| | | into fsss |
| | | from fff in fsss.DefaultIfEmpty() |
| | | |
| | | |
| | | join y in _context.PltUsers on a.Creater equals y.Id |
| | | into ysss |
| | | from yyy in ysss.DefaultIfEmpty() |
| | | |
| | | where a.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Createtime) || (a.Createtime >= XdTimestart && a.Createtime <= XdTimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Accounttype) || z.Accounttype == searchEntity.Accounttype.Trim()) |
| | |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.OperationalMatters) || a.OperationalMatters.Contains(searchEntity.OperationalMatters.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.PaymentUnit) || a.PaymentUnit.Contains(searchEntity.PaymentUnit.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.CreaterName) || y.UserName.Contains(searchEntity.CreaterName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.CreaterName) || yyy.UserName.Contains(searchEntity.CreaterName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.RecordTypeId) || a.RecordTypeId == searchEntity.RecordTypeId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.RecordTypeId) || a.RecordTypeId == searchEntity.RecordTypeId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Remark) || a.Remark.Contains(searchEntity.Remark.Trim())) |
| | | |
| | | select new FiAccountRecordDTO |
| | | { |
| | | Id = a.Id, |
| | | SubjectId = a.SubjectId, |
| | | SubjectName = f.Subjectname, |
| | | SubjectName = fff.Subjectname, |
| | | AccountId = a.AccountId, |
| | | AccountName = z.Accountname, |
| | | |
| | | Accounttype = z.Accounttype, |
| | | AccounttypeName = b.Comments, |
| | | AccounttypeName = bbb.Comments, |
| | | RecordTypeId = a.RecordTypeId, |
| | | RecordTypeName = c.Comments, |
| | | RecordTypeName = ccc.Comments, |
| | | Department = a.Department, |
| | | Money = a.Money, |
| | | PaymentUnit = a.PaymentUnit, |
| | |
| | | CreatetimeName = a.Createtime.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | |
| | | Creater = a.Creater, |
| | | CreaterName = yyy.UserName, |
| | | Createtime = a.Createtime, |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | |
| | | data.LoadData(searchEntity, rolelist); |
| | | data.Heji1 = Math.Round(query.Sum(x => x.Money) ?? 0, 2); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.Money) ?? 0, 2); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |
| | | |
| | |
| | | /// 获取所有有效角色 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<FiAccountRecordDTO> GetList(string OperationalMatters = null) |
| | | public List<FiAccountRecordDTO> GetList(string OperationalMatters = null, string Remark = null) |
| | | { |
| | | |
| | | |
| | | var listPosition = _context.FiAccountRecords.Where(r => r.RecStatus == "A" ).ToList(); |
| | | |
| | | if (!string.IsNullOrEmpty(OperationalMatters)) |
| | | if (!string.IsNullOrEmpty(OperationalMatters)&& !string.IsNullOrEmpty(Remark)) |
| | | { |
| | | listPosition = listPosition.Where(x => x.OperationalMatters == OperationalMatters).ToList(); |
| | | listPosition = listPosition.Where(x => x.OperationalMatters == OperationalMatters || x.Remark == Remark).ToList(); |
| | | } |
| | | |
| | | var list = _mapper.Map<List<FiAccountRecordDTO>>(listPosition); |