From d4431c7e89865a506af8662244004d0baa7ed609 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 11 六月 2025 12:24:15 +0800
Subject: [PATCH] 投诉处理,爬
---
zhengcaioa/Services/FiAccountRecordService.cs | 43 ++++++++++++++++++++++++++++++++++---------
1 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/zhengcaioa/Services/FiAccountRecordService.cs b/zhengcaioa/Services/FiAccountRecordService.cs
index 2c9013b..74402ef 100644
--- a/zhengcaioa/Services/FiAccountRecordService.cs
+++ b/zhengcaioa/Services/FiAccountRecordService.cs
@@ -116,12 +116,28 @@
}
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())
@@ -130,22 +146,24 @@
&& (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()))
+ && (string.IsNullOrWhiteSpace(searchEntity.Creater) || (a.Creater != "ZCUserCentre" && a.Creater != "shop"))
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,
@@ -154,6 +172,7 @@
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,
@@ -170,11 +189,12 @@
- if (searchEntity.totalrows == 0)
+ //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;
}
@@ -201,12 +221,17 @@
/// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
/// </summary>
/// <returns></returns>
- public List<FiAccountRecordDTO> GetList()
+ public List<FiAccountRecordDTO> GetList(string OperationalMatters = null, string Remark = null)
{
var listPosition = _context.FiAccountRecords.Where(r => r.RecStatus == "A" ).ToList();
+ if (!string.IsNullOrEmpty(OperationalMatters)&& !string.IsNullOrEmpty(Remark))
+ {
+ listPosition = listPosition.Where(x => x.OperationalMatters == OperationalMatters || x.Remark == Remark).ToList();
+ }
+
var list = _mapper.Map<List<FiAccountRecordDTO>>(listPosition);
return list;
}
--
Gitblit v1.9.1