|
@@ -9178,19 +9178,36 @@ FROM
|
|
|
//SetDataInfoView
|
|
|
var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
|
|
|
|
|
|
- var wordTypeData = dataSource.Where(it => it.STid == 72).ToList(); //三公费用-Word明细类型
|
|
|
- List<SetDataInfoView> _WordTypeData = _mapper.Map<List<SetDataInfoView>>(wordTypeData);
|
|
|
+ var fileTypes = new List<EecSetDataInfoView>();
|
|
|
|
|
|
- var excelTypeData = dataSource.Where(it => it.STid == 73).ToList(); //三公费用-Excel明细类型
|
|
|
- List<SetDataInfoView> _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
|
|
|
+ var wordTypeData = dataSource.Where(it => it.STid == 72).Select(x => new EecSetDataInfoView() {
|
|
|
+ ParentId = 1,
|
|
|
+ Id = x.Id,
|
|
|
+ Name = x.Name
|
|
|
+
|
|
|
+ }) .ToList(); //三公费用-Word明细类型
|
|
|
+ if (wordTypeData.Any()) fileTypes.AddRange(wordTypeData);
|
|
|
+
|
|
|
+ var excelTypeData = dataSource.Where(it => it.STid == 73)
|
|
|
+ .Select(x => new EecSetDataInfoView()
|
|
|
+ {
|
|
|
+ ParentId = 2,
|
|
|
+ Id = x.Id,
|
|
|
+ Name = x.Name
|
|
|
+ }).ToList(); //三公费用-Excel明细类型
|
|
|
+ if (excelTypeData.Any()) fileTypes.AddRange(excelTypeData);
|
|
|
+
|
|
|
+ var groupNameList = new EecSetDataInfoView() { ParentId = 3, Id = 1, Name = "团组成员名单" };
|
|
|
+ fileTypes.Add(groupNameList);
|
|
|
+
|
|
|
+ fileTypes = fileTypes.OrderBy(x => x.ParentId).ThenBy(x => x.Id).ToList();
|
|
|
|
|
|
//默认币种显示
|
|
|
var _currencyInfos = await EnterExitCostMobileGetCurrencyInit();
|
|
|
var viewPermissionData = await _enterExitCostRep.PermissionViewUsersAsync();
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
- WordTypeData = _WordTypeData,
|
|
|
- ExcelTypeData = _ExcelTypeData,
|
|
|
+ FileTypeData = fileTypes,
|
|
|
CurrencyInit = _currencyInfos,
|
|
|
viewPermissionData = viewPermissionData
|
|
|
}));
|