wet 2 years ago
commit 04cba339c3

@ -30,7 +30,7 @@ namespace Myshipping.Application.Entity
/// <summary>
/// 创建人ID
/// </summary>
public virtual string CreatedUserId { get; set; }
public virtual long CreatedUserId { get; set; }
/// <summary>
/// 创建人名称
@ -40,7 +40,7 @@ namespace Myshipping.Application.Entity
/// <summary>
/// 修改人ID
/// </summary>
public virtual string UpdatedUserId { get; set; }
public virtual long UpdatedUserId { get; set; }
/// <summary>
/// 修改人名称

@ -2761,10 +2761,11 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
@ -2783,10 +2784,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
@ -2815,10 +2816,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
@ -2837,6 +2838,11 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck))
{
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
@ -2864,10 +2870,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "</br>");
//}
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 用户任务统计展示
/// </summary>
public class TaskUserStatItem
{
/// <summary>
/// 级别分层1-异常/个人/公共 2-待处理/已完成/已取消/已挂起 3-按照任务类型展示)
/// </summary>
public int Level { get; set; }
/// <summary>
/// 排序值
/// </summary>
public int SortNo { get; set; }
/// <summary>
/// 展示代码
/// </summary>
public string Key { get; set; }
/// <summary>
/// 展示名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 记录条数
/// </summary>
public int Total { get; set; }
/// <summary>
/// 执行KEY
/// </summary>
public string ActionKey { get; set; }
}
}

@ -30,6 +30,6 @@ namespace Myshipping.Application
/// </summary>
/// <param name="isReCalc">是否强制计算</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetCurrentTotalStat(bool isReCalc = false);
Task<List<TaskUserStatItem>> GetCurrentTotalStat(bool isReCalc = false);
}
}

@ -6,11 +6,13 @@ using Furion.RemoteRequest;
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity;
using Myshipping.Core;
using Myshipping.Core.Entity;
using MySqlX.XDevAPI.Common;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.IO;
@ -314,9 +316,9 @@ namespace Myshipping.Application
/// </summary>
/// <param name="isReCalc">是否强制计算</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> GetCurrentTotalStat(bool isReCalc = false)
public async Task<List<TaskUserStatItem>> GetCurrentTotalStat(bool isReCalc = false)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
List<TaskUserStatItem> resultList = new List<TaskUserStatItem>();
/*
1
@ -339,20 +341,25 @@ namespace Myshipping.Application
if (!isReCalc)
{
//异步统计任务
}
//任务列表分组统计
var groupList = _taskBaseInfoRepository.AsQueryable()
.Where(t => (t.CreatedUserId == UserManager.UserId && t.IS_PUBLIC == 0) || (t.TenantId == userTendInfo.Tend.Id && t.IS_PUBLIC == 1))
.GroupBy(p => new { p.TASK_TYPE, p.STATUS, p.IS_EXCEPT, p.IS_PUBLIC })
.Select(p => new
{
Total = SqlFunc.AggregateCount(p.PK_ID),
TaskType = p
}).ToList();
}
}
catch (Exception ex)
{
result.succ = false;
result.msg = ex.Message;
throw Oops.Bah($"获取登陆人相关的任务统计信息异常,{0}", ex.Message);
}
return result;
return resultList;
}
}
}

Loading…
Cancel
Save