服务层列表接口返回 PageVO(配合控制器分页改造)
This commit is contained in:
@@ -7,6 +7,7 @@ using Yh.Platform.Abstractions;
|
|||||||
using Yh.SchClass.OpenApi;
|
using Yh.SchClass.OpenApi;
|
||||||
using YhCore.Entity;
|
using YhCore.Entity;
|
||||||
using YhCore.Model.Dto;
|
using YhCore.Model.Dto;
|
||||||
|
using YhCore.Model.Vo;
|
||||||
using YhCore.Repository;
|
using YhCore.Repository;
|
||||||
using YhCore.Service.Interfaces;
|
using YhCore.Service.Interfaces;
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ namespace YhCore.Service.Impl
|
|||||||
#region 抄送
|
#region 抄送
|
||||||
|
|
||||||
/// <summary>抄送列表(旧 SendRdList:DocStatus 1/11,SendUserID 含本人;旧为教师内连接)。</summary>
|
/// <summary>抄送列表(旧 SendRdList:DocStatus 1/11,SendUserID 含本人;旧为教师内连接)。</summary>
|
||||||
public async Task<List<DocPrintListItem>> SendRdListAsync(string name, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> SendRdListAsync(string name, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
||||||
|
|
||||||
@@ -88,6 +89,7 @@ namespace YhCore.Service.Impl
|
|||||||
docs = docs.Where(m => m.TakeDate <= date2).ToList();
|
docs = docs.Where(m => m.TakeDate <= date2).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var total = docs.Count(m => m.DocStatus == "1" || m.DocStatus == "11");
|
||||||
docs = docs.Where(m => m.DocStatus == "1" || m.DocStatus == "11")
|
docs = docs.Where(m => m.DocStatus == "1" || m.DocStatus == "11")
|
||||||
.OrderByDescending(m => m.SerID)
|
.OrderByDescending(m => m.SerID)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
@@ -101,7 +103,7 @@ namespace YhCore.Service.Impl
|
|||||||
if (!TryGetTea(teaMap, item.UserID, out var tea)) continue;
|
if (!TryGetTea(teaMap, item.UserID, out var tea)) continue;
|
||||||
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd"));
|
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>查看抄送人员详情(旧 SendDetailsList)。</summary>
|
/// <summary>查看抄送人员详情(旧 SendDetailsList)。</summary>
|
||||||
@@ -349,7 +351,7 @@ namespace YhCore.Service.Impl
|
|||||||
#region 列表
|
#region 列表
|
||||||
|
|
||||||
/// <summary>我的文印列表(旧 MyList;旧 DocTypeName 误用 YZBM 字典,此处保持旧行为)。</summary>
|
/// <summary>我的文印列表(旧 MyList;旧 DocTypeName 误用 YZBM 字典,此处保持旧行为)。</summary>
|
||||||
public async Task<List<DocPrintListItem>> MyListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> MyListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.UserID == userId && m.SchSerID == schSerId)).ToList();
|
var docs = (await _doc.FindAsync(m => m.UserID == userId && m.SchSerID == schSerId)).ToList();
|
||||||
|
|
||||||
@@ -365,6 +367,7 @@ namespace YhCore.Service.Impl
|
|||||||
docs = docs.Where(m => m.TakeDate <= date2).ToList();
|
docs = docs.Where(m => m.TakeDate <= date2).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var total = docs.Count;
|
||||||
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate).ThenByDescending(m => m.EditDate)
|
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate).ThenByDescending(m => m.EditDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
|
|
||||||
@@ -376,14 +379,14 @@ namespace YhCore.Service.Impl
|
|||||||
TryGetTea(teaMap, item.UserID, out var tea); // 旧为左连接,缺失补空
|
TryGetTea(teaMap, item.UserID, out var tea); // 旧为左连接,缺失补空
|
||||||
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm", "YZBM"));
|
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm", "YZBM"));
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 全部文印列表(旧 AllList 原生 SQL 四分类:x=待我审(0) y=我已审(1) z=抄送我(2) m=我发起(3),按优先级去重)。
|
/// 全部文印列表(旧 AllList 原生 SQL 四分类:x=待我审(0) y=我已审(1) z=抄送我(2) m=我发起(3),按优先级去重)。
|
||||||
/// 旧 Name 过滤的 SQL 拼接存在运算符优先级缺陷,此处按语义实现:内容/教师名/字典名任一命中。
|
/// 旧 Name 过滤的 SQL 拼接存在运算符优先级缺陷,此处按语义实现:内容/教师名/字典名任一命中。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<List<DocPrintListItem>> AllListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> AllListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
int uid = int.Parse(userId);
|
int uid = int.Parse(userId);
|
||||||
|
|
||||||
@@ -423,6 +426,7 @@ namespace YhCore.Service.Impl
|
|||||||
|| DictNameContains(dictMap, "YZFL", t.doc.DPType, name));
|
|| DictNameContains(dictMap, "YZFL", t.doc.DPType, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var total = query.Count();
|
||||||
var pageItems = query.OrderByDescending(t => t.doc.SerID).ThenByDescending(t => t.doc.TakeDate)
|
var pageItems = query.OrderByDescending(t => t.doc.SerID).ThenByDescending(t => t.doc.TakeDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
|
|
||||||
@@ -434,16 +438,17 @@ namespace YhCore.Service.Impl
|
|||||||
item.ctype = ctype;
|
item.ctype = ctype;
|
||||||
result.Add(item);
|
result.Add(item);
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文印审核列表(旧 ShenheList:固定流程 + 指派 + 自由流程三路并集,HashSet 去重)。
|
/// 文印审核列表(旧 ShenheList:固定流程 + 指派 + 自由流程三路并集,HashSet 去重)。
|
||||||
/// 旧实现的 Name 过滤作用在未被使用的查询上(死代码),此处保持 Name 不生效的旧行为。
|
/// 旧实现的 Name 过滤作用在未被使用的查询上(死代码),此处保持 Name 不生效的旧行为。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<List<DocPrintListItem>> ShenheListAsync(string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> ShenheListAsync(string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = await GetPendingShenheDocsAsync(userId, schSerId, requireFlowIdNonZero: false);
|
var docs = await GetPendingShenheDocsAsync(userId, schSerId, requireFlowIdNonZero: false);
|
||||||
|
var total = docs.Count;
|
||||||
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate)
|
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
|
|
||||||
@@ -455,13 +460,13 @@ namespace YhCore.Service.Impl
|
|||||||
TryGetTea(teaMap, item.UserID, out var tea);
|
TryGetTea(teaMap, item.UserID, out var tea);
|
||||||
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm"));
|
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm"));
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 审批列表(旧 SPList:待审(DS,zt=false)∪ 我已审(YS,zt=true,排除 DS),_disabled 即 zt)。
|
/// 审批列表(旧 SPList:待审(DS,zt=false)∪ 我已审(YS,zt=true,排除 DS),_disabled 即 zt)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<List<DocPrintListItem>> SPListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> SPListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var userid = int.Parse(userId);
|
var userid = int.Parse(userId);
|
||||||
|
|
||||||
@@ -493,6 +498,7 @@ namespace YhCore.Service.Impl
|
|||||||
query = query.Where(m => m.doc.DocContent != null && m.doc.DocContent.IndexOf(name) >= 0);
|
query = query.Where(m => m.doc.DocContent != null && m.doc.DocContent.IndexOf(name) >= 0);
|
||||||
|
|
||||||
var ordered = query.OrderBy(m => m.doc.DocStatus).ThenByDescending(m => m.doc.EditDate).ToList();
|
var ordered = query.OrderBy(m => m.doc.DocStatus).ThenByDescending(m => m.doc.EditDate).ToList();
|
||||||
|
var total = ordered.Count;
|
||||||
|
|
||||||
var teaMap = await GetTeaMapAsync(schSerId);
|
var teaMap = await GetTeaMapAsync(schSerId);
|
||||||
var dictMap = await GetDictMapAsync(schSerId);
|
var dictMap = await GetDictMapAsync(schSerId);
|
||||||
@@ -504,11 +510,11 @@ namespace YhCore.Service.Impl
|
|||||||
item._disabled = zt; // 我已审的记录不可再编辑(覆盖通用 _disabled 语义,与旧一致)
|
item._disabled = zt; // 我已审的记录不可再编辑(覆盖通用 _disabled 语义,与旧一致)
|
||||||
result.Add(item);
|
result.Add(item);
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>文印已审列表(旧 YishenList:本人审核流水关联,排除撤销与已领取)。</summary>
|
/// <summary>文印已审列表(旧 YishenList:本人审核流水关联,排除撤销与已领取)。</summary>
|
||||||
public async Task<List<DocPrintListItem>> YishenListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> YishenListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
int uid = int.Parse(userId);
|
int uid = int.Parse(userId);
|
||||||
var tranctDataIds = (await _flowtranct.FindAsync(b => b.actionuserid == uid && b.datatype == DocPrintConstants.AppCode.ToString() && b.actionstatus != 11))
|
var tranctDataIds = (await _flowtranct.FindAsync(b => b.actionuserid == uid && b.datatype == DocPrintConstants.AppCode.ToString() && b.actionstatus != 11))
|
||||||
@@ -521,6 +527,7 @@ namespace YhCore.Service.Impl
|
|||||||
if (!string.IsNullOrEmpty(name))
|
if (!string.IsNullOrEmpty(name))
|
||||||
docs = docs.Where(m => m.DocContent != null && m.DocContent.Contains(name)).ToList();
|
docs = docs.Where(m => m.DocContent != null && m.DocContent.Contains(name)).ToList();
|
||||||
|
|
||||||
|
var total = docs.Count;
|
||||||
docs = docs.OrderByDescending(m => m.SerID).ThenByDescending(m => m.TakeDate)
|
docs = docs.OrderByDescending(m => m.SerID).ThenByDescending(m => m.TakeDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
|
|
||||||
@@ -532,11 +539,11 @@ namespace YhCore.Service.Impl
|
|||||||
TryGetTea(teaMap, item.UserID, out var tea);
|
TryGetTea(teaMap, item.UserID, out var tea);
|
||||||
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm"));
|
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd HH:mm"));
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>全部文印列表(旧 totalList,管理员视角,按状态/时间过滤)。</summary>
|
/// <summary>全部文印列表(旧 totalList,管理员视角,按状态/时间过滤)。</summary>
|
||||||
public async Task<List<DocPrintListItem>> TotalListAsync(string name, string stateid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocPrintListItem>> TotalListAsync(string name, string stateid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
||||||
|
|
||||||
@@ -552,6 +559,7 @@ namespace YhCore.Service.Impl
|
|||||||
if (!string.IsNullOrEmpty(name))
|
if (!string.IsNullOrEmpty(name))
|
||||||
docs = docs.Where(m => m.DocContent != null && m.DocContent.IndexOf(name) >= 0).ToList();
|
docs = docs.Where(m => m.DocContent != null && m.DocContent.IndexOf(name) >= 0).ToList();
|
||||||
|
|
||||||
|
var total = docs.Count;
|
||||||
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate)
|
docs = docs.OrderBy(m => m.DocStatus).ThenByDescending(m => m.TakeDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
|
|
||||||
@@ -563,7 +571,7 @@ namespace YhCore.Service.Impl
|
|||||||
TryGetTea(teaMap, item.UserID, out var tea);
|
TryGetTea(teaMap, item.UserID, out var tea);
|
||||||
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd"));
|
result.Add(await BuildListItemAsync(item, tea, dictMap, "yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<DocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -895,7 +903,7 @@ namespace YhCore.Service.Impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>文印详情统计列表(旧 List2:非待审单据按申请时间倒序分页)。</summary>
|
/// <summary>文印详情统计列表(旧 List2:非待审单据按申请时间倒序分页)。</summary>
|
||||||
public async Task<List<DocDetailStatItem>> List2Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<DocDetailStatItem>> List2Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus != "0")).ToList();
|
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus != "0")).ToList();
|
||||||
if (DateTime.TryParse(starttime, out var date1))
|
if (DateTime.TryParse(starttime, out var date1))
|
||||||
@@ -933,13 +941,16 @@ namespace YhCore.Service.Impl
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return full.OrderByDescending(a => a.EditDate)
|
var total = full.Count;
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize)
|
return PageVO<DocDetailStatItem>.Of(
|
||||||
.ToList();
|
full.OrderByDescending(a => a.EditDate)
|
||||||
|
.Skip(pageSize * pageIndex).Take(pageSize)
|
||||||
|
.ToList(),
|
||||||
|
total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>文印数量按用户排名(旧 List3)。</summary>
|
/// <summary>文印数量按用户排名(旧 List3)。</summary>
|
||||||
public async Task<List<UserRankItem>> List3Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<UserRankItem>> List3Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus == "1")).ToList();
|
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus == "1")).ToList();
|
||||||
if (DateTime.TryParse(starttime, out var date1))
|
if (DateTime.TryParse(starttime, out var date1))
|
||||||
@@ -965,23 +976,27 @@ namespace YhCore.Service.Impl
|
|||||||
.OrderByDescending(a => a.num)
|
.OrderByDescending(a => a.num)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
return grouped.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
var total = grouped.Count;
|
||||||
|
return PageVO<UserRankItem>.Of(
|
||||||
|
grouped.Skip(pageSize * pageIndex).Take(pageSize).ToList(),
|
||||||
|
total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>按月份统计明细(旧 List4:指定年月已印好单据,按申请时间倒序分页)。</summary>
|
/// <summary>按月份统计明细(旧 List4:指定年月已印好单据,按申请时间倒序分页)。</summary>
|
||||||
public async Task<List<StatListItem>> List4Async(int year, int month, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<StatListItem>> List4Async(int year, int month, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId
|
var all = (await _doc.FindAsync(m => m.SchSerID == schSerId
|
||||||
&& m.DocStatus == "1" && m.EditDate.Year == year && m.EditDate.Month == month))
|
&& m.DocStatus == "1" && m.EditDate.Year == year && m.EditDate.Month == month)).ToList();
|
||||||
.OrderByDescending(a => a.EditDate)
|
var total = all.Count;
|
||||||
|
var docs = all.OrderByDescending(a => a.EditDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize)
|
.Skip(pageSize * pageIndex).Take(pageSize)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
return await BuildStatListAsync(docs, schSerId);
|
return PageVO<StatListItem>.Of(await BuildStatListAsync(docs, schSerId), total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>按用户统计明细(旧 List5:指定用户已印好单据,按申请时间倒序分页)。</summary>
|
/// <summary>按用户统计明细(旧 List5:指定用户已印好单据,按申请时间倒序分页)。</summary>
|
||||||
public async Task<List<StatListItem>> List5Async(string userid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<StatListItem>> List5Async(string userid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.UserID == userid && m.DocStatus == "1")).ToList();
|
var docs = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.UserID == userid && m.DocStatus == "1")).ToList();
|
||||||
if (DateTime.TryParse(starttime, out var date1))
|
if (DateTime.TryParse(starttime, out var date1))
|
||||||
@@ -992,11 +1007,12 @@ namespace YhCore.Service.Impl
|
|||||||
docs = docs.Where(m => m.EditDate <= date2).ToList();
|
docs = docs.Where(m => m.EditDate <= date2).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var total = docs.Count;
|
||||||
docs = docs.OrderByDescending(a => a.EditDate)
|
docs = docs.OrderByDescending(a => a.EditDate)
|
||||||
.Skip(pageSize * pageIndex).Take(pageSize)
|
.Skip(pageSize * pageIndex).Take(pageSize)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
return await BuildStatListAsync(docs, schSerId);
|
return PageVO<StatListItem>.Of(await BuildStatListAsync(docs, schSerId), total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -1312,7 +1312,7 @@ namespace YhCore.Service.Impl
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<SHRoleDocPrintListItem>> MyListSHRoleAsync(string name, string status, string startDate, string endDate, int pageSize, int pageIndex, string userId, string schSerId)
|
public async Task<PageVO<SHRoleDocPrintListItem>> MyListSHRoleAsync(string name, string status, string startDate, string endDate, int pageSize, int pageIndex, string userId, string schSerId)
|
||||||
{
|
{
|
||||||
var resultList = (await _doc.FindAsync(m => m.UserID == userId && m.SchSerID == schSerId)).ToList();
|
var resultList = (await _doc.FindAsync(m => m.UserID == userId && m.SchSerID == schSerId)).ToList();
|
||||||
|
|
||||||
@@ -1329,7 +1329,8 @@ namespace YhCore.Service.Impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resultList.Count == 0)
|
if (resultList.Count == 0)
|
||||||
return new List<SHRoleDocPrintListItem>();
|
return PageVO<SHRoleDocPrintListItem>.Empty(pageIndex, pageSize);
|
||||||
|
var total = resultList.Count;
|
||||||
|
|
||||||
var teaMap = await GetTeaMapAsync(schSerId);
|
var teaMap = await GetTeaMapAsync(schSerId);
|
||||||
var pageList = resultList
|
var pageList = resultList
|
||||||
@@ -1375,10 +1376,10 @@ namespace YhCore.Service.Impl
|
|||||||
DocPrintNum = await GetDocPrintNumAsync(schSerId, 1, item.flowid, item.DocStep, item.SerID, userId, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
DocPrintNum = await GetDocPrintNumAsync(schSerId, 1, item.flowid, item.DocStep, item.SerID, userId, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<SHRoleDocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<SHRoleDocPrintListItem>> TotalListSHRoleAsync(int flowid, int dwid, string name, string stateid, string starttime, string endtime, int pageSize, int pageIndex, string schSerId)
|
public async Task<PageVO<SHRoleDocPrintListItem>> TotalListSHRoleAsync(int flowid, int dwid, string name, string stateid, string starttime, string endtime, int pageSize, int pageIndex, string schSerId)
|
||||||
{
|
{
|
||||||
var resultList = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus != "3")).ToList();
|
var resultList = (await _doc.FindAsync(m => m.SchSerID == schSerId && m.DocStatus != "3")).ToList();
|
||||||
|
|
||||||
@@ -1413,7 +1414,8 @@ namespace YhCore.Service.Impl
|
|||||||
resultList = resultList.Where(m => m.rid == dwid).ToList();
|
resultList = resultList.Where(m => m.rid == dwid).ToList();
|
||||||
|
|
||||||
if (resultList.Count == 0)
|
if (resultList.Count == 0)
|
||||||
return new List<SHRoleDocPrintListItem>();
|
return PageVO<SHRoleDocPrintListItem>.Empty(pageIndex, pageSize);
|
||||||
|
var total = resultList.Count;
|
||||||
|
|
||||||
var teaMap2 = await GetTeaMapAsync(schSerId);
|
var teaMap2 = await GetTeaMapAsync(schSerId);
|
||||||
var pageList = resultList
|
var pageList = resultList
|
||||||
@@ -1461,10 +1463,10 @@ namespace YhCore.Service.Impl
|
|||||||
DocPrintNum = await GetDocPrintNumAsync(schSerId, 4, item.flowid, item.DocStep, item.SerID, item.UserID, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
DocPrintNum = await GetDocPrintNumAsync(schSerId, 4, item.flowid, item.DocStep, item.SerID, item.UserID, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<SHRoleDocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<SHRoleDocPrintListItem>> SendRdListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<SHRoleDocPrintListItem>> SendRdListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var resultList = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
var resultList = (await _doc.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
||||||
var teaMap0 = await GetTeaMapAsync(schSerId);
|
var teaMap0 = await GetTeaMapAsync(schSerId);
|
||||||
@@ -1529,7 +1531,8 @@ namespace YhCore.Service.Impl
|
|||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
if (resultList2.Count == 0)
|
if (resultList2.Count == 0)
|
||||||
return new List<SHRoleDocPrintListItem>();
|
return PageVO<SHRoleDocPrintListItem>.Empty(pageIndex, pageSize);
|
||||||
|
var total = resultList2.Count;
|
||||||
|
|
||||||
var pageList = resultList2.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
var pageList = resultList2.Skip(pageSize * pageIndex).Take(pageSize).ToList();
|
||||||
var teaMap = await GetTeaMapAsync(schSerId);
|
var teaMap = await GetTeaMapAsync(schSerId);
|
||||||
@@ -1579,10 +1582,10 @@ namespace YhCore.Service.Impl
|
|||||||
FJDownInfo = await GetFJDownInfoBySendAsync(item.UpFile),
|
FJDownInfo = await GetFJDownInfoBySendAsync(item.UpFile),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<SHRoleDocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<SHRoleDocPrintListItem>> SPListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string userName, string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<SHRoleDocPrintListItem>> SPListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string userName, string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var userid = int.Parse(userId);
|
var userid = int.Parse(userId);
|
||||||
var statuss = new[] { "0" };
|
var statuss = new[] { "0" };
|
||||||
@@ -1654,7 +1657,8 @@ namespace YhCore.Service.Impl
|
|||||||
resultList = resultList.Where(m => m.rid == dwid).ToList();
|
resultList = resultList.Where(m => m.rid == dwid).ToList();
|
||||||
|
|
||||||
if (resultList.Count == 0)
|
if (resultList.Count == 0)
|
||||||
return new List<SHRoleDocPrintListItem>();
|
return PageVO<SHRoleDocPrintListItem>.Empty(pageIndex, pageSize);
|
||||||
|
var total = resultList.Count;
|
||||||
|
|
||||||
var teaMap = await GetTeaMapAsync(schSerId);
|
var teaMap = await GetTeaMapAsync(schSerId);
|
||||||
var pageList = resultList.OrderByDescending(m => m.EditDate)
|
var pageList = resultList.OrderByDescending(m => m.EditDate)
|
||||||
@@ -1704,7 +1708,7 @@ namespace YhCore.Service.Impl
|
|||||||
DocPrintNum = await GetDocPrintNumAsync(schSerId, 2, item.flowid, item.DocStep, item.SerID, userId, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
DocPrintNum = await GetDocPrintNumAsync(schSerId, 2, item.flowid, item.DocStep, item.SerID, userId, item.Examtype, item.DocStyle, item.grade, item.DocFix, item.DocShare, item.DocNum),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<SHRoleDocPrintListItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> ShenheOkSHRoleAsync(FlowTranctDto model)
|
public async Task<string> ShenheOkSHRoleAsync(FlowTranctDto model)
|
||||||
@@ -2245,11 +2249,12 @@ namespace YhCore.Service.Impl
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<SHRoleRegetJERdItem>> GetRegetJERdAsync(string schSerId, int pageSize, int pageIndex)
|
public async Task<PageVO<SHRoleRegetJERdItem>> GetRegetJERdAsync(string schSerId, int pageSize, int pageIndex)
|
||||||
{
|
{
|
||||||
var resultList = (await _regetJERd.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
var resultList = (await _regetJERd.FindAsync(m => m.SchSerID == schSerId)).ToList();
|
||||||
if (resultList.Count == 0)
|
if (resultList.Count == 0)
|
||||||
return new List<SHRoleRegetJERdItem>();
|
return PageVO<SHRoleRegetJERdItem>.Empty(pageIndex, pageSize);
|
||||||
|
var total = resultList.Count;
|
||||||
|
|
||||||
var teaMap = await GetTeaMapAsync(schSerId);
|
var teaMap = await GetTeaMapAsync(schSerId);
|
||||||
var pageList = resultList.OrderByDescending(m => m.EditDatetime)
|
var pageList = resultList.OrderByDescending(m => m.EditDatetime)
|
||||||
@@ -2276,7 +2281,7 @@ namespace YhCore.Service.Impl
|
|||||||
UnitPrice = item.UnitPrice,
|
UnitPrice = item.UnitPrice,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return PageVO<SHRoleRegetJERdItem>.Of(result, total, pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> SetDownFileTimesAsync(int serId)
|
public async Task<int> SetDownFileTimesAsync(int serId)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using YhCore.Model.Dto;
|
using YhCore.Model.Dto;
|
||||||
|
using YhCore.Model.Vo;
|
||||||
|
|
||||||
namespace YhCore.Service.Interfaces
|
namespace YhCore.Service.Interfaces
|
||||||
{
|
{
|
||||||
@@ -11,7 +12,7 @@ namespace YhCore.Service.Interfaces
|
|||||||
public interface IWYDocPrintService
|
public interface IWYDocPrintService
|
||||||
{
|
{
|
||||||
// ---- 抄送 ----
|
// ---- 抄送 ----
|
||||||
Task<List<DocPrintListItem>> SendRdListAsync(string name, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> SendRdListAsync(string name, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<SendDetailItem>> SendDetailsListAsync(int serId);
|
Task<List<SendDetailItem>> SendDetailsListAsync(int serId);
|
||||||
Task<string> EditSendAsync(int serId, string senduserid, string mysenduserid, string schSerId, string uid);
|
Task<string> EditSendAsync(int serId, string senduserid, string mysenduserid, string schSerId, string uid);
|
||||||
|
|
||||||
@@ -25,12 +26,12 @@ namespace YhCore.Service.Interfaces
|
|||||||
Task<string> RevokeAsync(FlowTranctDto model);
|
Task<string> RevokeAsync(FlowTranctDto model);
|
||||||
|
|
||||||
// ---- 列表 ----
|
// ---- 列表 ----
|
||||||
Task<List<DocPrintListItem>> MyListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> MyListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintListItem>> AllListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> AllListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintListItem>> ShenheListAsync(string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> ShenheListAsync(string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintListItem>> SPListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> SPListAsync(string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintListItem>> YishenListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> YishenListAsync(string name, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintListItem>> TotalListAsync(string name, string stateid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocPrintListItem>> TotalListAsync(string name, string stateid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<DocPrintDetailItem>> MyListtoOneAsync(int serId, string schSerId);
|
Task<List<DocPrintDetailItem>> MyListtoOneAsync(int serId, string schSerId);
|
||||||
Task<List<BindFlowOption>> BindflowinfoAsync(string schSerId, int flowType);
|
Task<List<BindFlowOption>> BindflowinfoAsync(string schSerId, int flowType);
|
||||||
|
|
||||||
@@ -43,9 +44,9 @@ namespace YhCore.Service.Interfaces
|
|||||||
|
|
||||||
// ---- 统计 ----
|
// ---- 统计 ----
|
||||||
Task<List<MonthStatItem>> List1Async(string starttime, string endtime, string schSerId);
|
Task<List<MonthStatItem>> List1Async(string starttime, string endtime, string schSerId);
|
||||||
Task<List<DocDetailStatItem>> List2Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<DocDetailStatItem>> List2Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<UserRankItem>> List3Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<UserRankItem>> List3Async(string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<StatListItem>> List4Async(int year, int month, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<StatListItem>> List4Async(int year, int month, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<StatListItem>> List5Async(string userid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<StatListItem>> List5Async(string userid, string starttime, string endtime, string schSerId, int pageSize, int pageIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ namespace YhCore.Service.Interfaces
|
|||||||
// ---- 用户记录查看和审核 ----
|
// ---- 用户记录查看和审核 ----
|
||||||
Task<SHRoleShenheFlowResult> GetshenheFlowAsync(string schSerId, decimal docprintId, int flowid);
|
Task<SHRoleShenheFlowResult> GetshenheFlowAsync(string schSerId, decimal docprintId, int flowid);
|
||||||
Task<List<SHRoleDocPrintListItem>> MyListtoOneSHRoleAsync(int serId, string schSerId);
|
Task<List<SHRoleDocPrintListItem>> MyListtoOneSHRoleAsync(int serId, string schSerId);
|
||||||
Task<List<SHRoleDocPrintListItem>> MyListSHRoleAsync(string name, string status, string startDate, string endDate, int pageSize, int pageIndex, string userId, string schSerId);
|
Task<PageVO<SHRoleDocPrintListItem>> MyListSHRoleAsync(string name, string status, string startDate, string endDate, int pageSize, int pageIndex, string userId, string schSerId);
|
||||||
Task<List<SHRoleDocPrintListItem>> TotalListSHRoleAsync(int flowid, int dwid, string name, string stateid, string starttime, string endtime, int pageSize, int pageIndex, string schSerId);
|
Task<PageVO<SHRoleDocPrintListItem>> TotalListSHRoleAsync(int flowid, int dwid, string name, string stateid, string starttime, string endtime, int pageSize, int pageIndex, string schSerId);
|
||||||
Task<List<SHRoleDocPrintListItem>> SendRdListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<SHRoleDocPrintListItem>> SendRdListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<List<SHRoleDocPrintListItem>> SPListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string userName, string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<SHRoleDocPrintListItem>> SPListSHRoleAsync(int flowid, int dwid, string name, string status, string startDate, string endDate, string userId, string userName, string schSerId, int pageSize, int pageIndex);
|
||||||
Task<string> ShenheOkSHRoleAsync(FlowTranctDto model);
|
Task<string> ShenheOkSHRoleAsync(FlowTranctDto model);
|
||||||
|
|
||||||
// ---- 规格表 / 签名 / 退回 / 金额 ----
|
// ---- 规格表 / 签名 / 退回 / 金额 ----
|
||||||
@@ -64,7 +64,7 @@ namespace YhCore.Service.Interfaces
|
|||||||
Task<string> TuiHuiAsync(string userId, string cont, decimal docId);
|
Task<string> TuiHuiAsync(string userId, string cont, decimal docId);
|
||||||
Task<string> UnTuiHuiAsync(string userId, decimal docId);
|
Task<string> UnTuiHuiAsync(string userId, decimal docId);
|
||||||
Task<string> RegetJEAsync(string schSerId, string userId, List<decimal> listDocPrintId, string type);
|
Task<string> RegetJEAsync(string schSerId, string userId, List<decimal> listDocPrintId, string type);
|
||||||
Task<List<SHRoleRegetJERdItem>> GetRegetJERdAsync(string schSerId, int pageSize, int pageIndex);
|
Task<PageVO<SHRoleRegetJERdItem>> GetRegetJERdAsync(string schSerId, int pageSize, int pageIndex);
|
||||||
Task<int> SetDownFileTimesAsync(int serId);
|
Task<int> SetDownFileTimesAsync(int serId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user