Files
zszq-trs/YLErpDAL/Model/Client.cs
T
2024-05-09 14:06:26 +08:00

131 lines
3.3 KiB
C#

using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using YieldChain.Helpers;
using YLErp.BLL;
namespace YLErp.Model
{
public class ClientFileResult
{
public int ClientId { get; set; }
public string EncryptId { get; set; }
public string ClientName { get; set; }
public List<string> FileNames { get; set; }
public Dictionary<string, List<clientFileRet>> FilesDic { get; set; }
public ClientFileResult()
{
FileNames = new List<string>();
FilesDic = new Dictionary<string, List<clientFileRet>>();
}
}
public class clientFileRet
{
public client_file file;
/// <summary>
/// 能不能还原
/// </summary>
public bool CanBack { get; set; }
/// <summary>
/// 能不能废弃
/// </summary>
public bool CanDrop { get; set; }
/// <summary>
/// 能不能删除
/// </summary>
public bool CanDelete { get; set; }
/// <summary>
/// (V2使用)file.HasSent && file.OptState == ConsReport.OptFlagsEnum.D;
/// </summary>
public bool HasSentDrop { get; set; }
/// <summary>
/// (V2使用)分组键值
/// </summary>
public string GroupKey { get; set; }
/// <summary>
/// (V2使用)删除此文件时是否需要执行批量删除
/// </summary>
public bool NeedMatchRemove { get; set; }
}
public class ClientfileauditPage
{
public int ClientId { get; set; }
public string ClientName { get; set; }
public List<ClientfileauditPageRow> ItemRows { get; set; }
public List<RoleColumnsInner> RoleColumns { get; set; }
}
public class RoleColumnsInner
{
public int Id { get; set; }
public string Name { get; set; }
public string OptName { get; set; }
}
public class ClientfileauditPageRow
{
public string Group { get; set; }
public List<string> Titles { get; set; }
}
public class ClientfileAuditExecRequest
{
public int ClientId { get; set; }
public List<ClientfileAuditExecRequestInner> Items { get; set; }
}
public class ClientfileAuditExecRequestInner
{
public string RoleName { get; set; }
public string Group { get; set; }
public string Title { get; set; }
public bool Checked { get; set; }
}
public class ClientHelper
{
/// <summary>
/// 根据传入字符采取相应方式反序列化Trade对象
/// </summary>
public static Client Deserialize(string clientJson)
{
Client result = null;
{
if (!clientJson.StartsWith("{"))
{
clientJson = GZipHelper.DecompressBase64String(clientJson);
}
result = JsonHelper.ToObject<Client>(clientJson);
}
return result;
}
public static string Serialize(Client c)
{
var str = JsonHelper.Serialize(c, true);
var buffer = GZipHelper.Compress(Encoding.UTF8.GetBytes(str));
str = Convert.ToBase64String(buffer);
return str;
}
}
}