修改EDI的换行符

optimize
jianghaiqing 2 years ago
parent 32d3f4f28a
commit 42bca2fd6f

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

@ -2761,10 +2761,11 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck)) if (!string.IsNullOrWhiteSpace(strCheck))
{ {
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>")) if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{ {
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n"); strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
//} }
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
} }
@ -2783,10 +2784,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck)) if (!string.IsNullOrWhiteSpace(strCheck))
{ {
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>")) if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{ {
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n"); strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
//} }
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
} }
@ -2815,10 +2816,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck)) if (!string.IsNullOrWhiteSpace(strCheck))
{ {
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>")) if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{ {
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n"); strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
//} }
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
} }
@ -2837,6 +2838,11 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck)) 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}"); throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
} }
@ -2864,10 +2870,10 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(strCheck)) if (!string.IsNullOrWhiteSpace(strCheck))
{ {
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>")) if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{ {
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "</br>"); strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
//} }
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}"); 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> /// </summary>
/// <param name="isReCalc">是否强制计算</param> /// <param name="isReCalc">是否强制计算</param>
/// <returns>返回回执</returns> /// <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 Mapster;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity; using Myshipping.Application.Entity;
using Myshipping.Core; using Myshipping.Core;
using Myshipping.Core.Entity; using Myshipping.Core.Entity;
using MySqlX.XDevAPI.Common; using MySqlX.XDevAPI.Common;
using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -314,9 +316,9 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="isReCalc">是否强制计算</param> /// <param name="isReCalc">是否强制计算</param>
/// <returns>返回回执</returns> /// <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 1
@ -339,20 +341,25 @@ namespace Myshipping.Application
if (!isReCalc) 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) catch (Exception ex)
{ {
result.succ = false; throw Oops.Bah($"获取登陆人相关的任务统计信息异常,{0}", ex.Message);
result.msg = ex.Message;
} }
return result; return resultList;
} }
} }
} }

Loading…
Cancel
Save