|
@@ -5657,43 +5657,41 @@ Group By CnName");
|
|
|
#endregion
|
|
|
if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 3) // web/Android/IOS
|
|
|
{
|
|
|
- var defaultParentIds = new List<int>() {
|
|
|
- 48,// 人员费用
|
|
|
- 49,// 办公费用
|
|
|
- 50,// 销售费用
|
|
|
- 51,// 其他费用
|
|
|
- 55,// 大运会
|
|
|
- };
|
|
|
+ var defaultParentIds = new List<int>()
|
|
|
+ {
|
|
|
+ 48,// 人员费用
|
|
|
+ 49,// 办公费用
|
|
|
+ 50,// 销售费用
|
|
|
+ 51,// 其他费用
|
|
|
+ 55,// 大运会
|
|
|
+ };
|
|
|
|
|
|
var dailypaymentTypeData = await RedisRepository.RedisFactory
|
|
|
- .CreateRedisRepository()
|
|
|
- .StringGetAsync<List<int>>("DailypaymentTypeData") ?? new List<int>();
|
|
|
+ .CreateRedisRepository()
|
|
|
+ .StringGetAsync<List<int>>("DailypaymentTypeData") ?? new List<int>();
|
|
|
|
|
|
var dailyTypeData = await _sqlSugar.Queryable<DailypaymentParentTypeView>()
|
|
|
- .Includes(x => x.SubData)
|
|
|
- .Where(x => defaultParentIds.Contains(x.Id))
|
|
|
- .ToListAsync();
|
|
|
+ .Includes(x => x.SubData)
|
|
|
+ .Where(x => defaultParentIds.Contains(x.Id))
|
|
|
+ .ToListAsync();
|
|
|
dailyTypeData.ForEach(x =>
|
|
|
{
|
|
|
x.SubData.ForEach(y =>
|
|
|
{
|
|
|
int currId = dailypaymentTypeData.Find(z => z == y.Id);
|
|
|
- y.IsChecked = currId == 0 ? false : true;
|
|
|
+ y.IsChecked = currId != 0;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
var companyData = await _sqlSugar.Queryable<Sys_Company>()
|
|
|
- .Where(x => x.IsDel == 0)
|
|
|
- .Select(x => new { id = x.Id, name = x.CompanyName })
|
|
|
- .ToListAsync();
|
|
|
+ .Where(x => x.IsDel == 0)
|
|
|
+ .Select(x => new { id = x.Id, name = x.CompanyName })
|
|
|
+ .ToListAsync();
|
|
|
|
|
|
- return Ok(JsonView(true, "查询成功!", new { dailyTypeData = dailyTypeData, companyData = companyData }));
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "查询失败"));
|
|
|
+ return Ok(JsonView(true, "查询成功!", new { dailyTypeData, companyData }));
|
|
|
}
|
|
|
+ else return Ok(JsonView(false, "查询失败"));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|