333
This commit is contained in:
43
MyCode.Project.Domain/Message/Response/Common/Format.cs
Normal file
43
MyCode.Project.Domain/Message/Response/Common/Format.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.Common
|
||||
{
|
||||
public class Format
|
||||
{
|
||||
/// <summary>
|
||||
/// 格式化数据样式
|
||||
/// </summary>
|
||||
public static void FormatValues<T>(T h)
|
||||
{
|
||||
PropertyInfo[] proFEntity = h.GetType().GetProperties();
|
||||
foreach (PropertyInfo pi in proFEntity)
|
||||
{
|
||||
decimal? NewValue = 0m;
|
||||
string NewValueTypeName = NewValue.GetType().Name;
|
||||
string PiTypeName = pi.PropertyType.Name;
|
||||
var item = pi.PropertyType.GenericTypeArguments.FirstOrDefault();
|
||||
if (NewValue.GetType().Name.Equals(pi.PropertyType.Name) || (item != null && item.Name == NewValueTypeName))
|
||||
{
|
||||
var value = (decimal?)pi.GetValue(h);
|
||||
if (value.HasValue)
|
||||
{ }
|
||||
try
|
||||
{
|
||||
pi.SetValue(h, Math.Round(value.Value, 2, MidpointRounding.AwayFromZero), null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
MyCode.Project.Domain/Message/Response/Common/ItemResult.cs
Normal file
82
MyCode.Project.Domain/Message/Response/Common/ItemResult.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using MyCode.Project.Infrastructure.Enumeration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.Common
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// 列表项结果-下拉列表
|
||||
public class ItemResult
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// 文本
|
||||
public string Text { get; set; }
|
||||
//
|
||||
// 摘要:
|
||||
// 值
|
||||
public string Value { get; set; }
|
||||
//
|
||||
// 摘要:
|
||||
// 排序号
|
||||
public int? SortId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ServiceDeptList
|
||||
{
|
||||
/// <summary>
|
||||
/// 文本
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
public int? SortId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示 1=显示 0=隐藏
|
||||
/// </summary>
|
||||
public int IfShow { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class NameValue
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// 文本
|
||||
public string Name { get; set; }
|
||||
//
|
||||
// 摘要:
|
||||
// 值
|
||||
public int Value { get; set; }
|
||||
//
|
||||
// 摘要:
|
||||
// 排序号
|
||||
public int? SortId { get; set; }
|
||||
}
|
||||
|
||||
public class TypeValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 4:新评论通知 5:打卡提醒 ,
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板id
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
||||
22
MyCode.Project.Domain/Message/Response/Common/KeyValue.cs
Normal file
22
MyCode.Project.Domain/Message/Response/Common/KeyValue.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using MyCode.Project.Infrastructure.Enumeration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.Common
|
||||
{
|
||||
public class KeyValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 显示的文字
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
public Guid? Value { get; set; }
|
||||
}
|
||||
}
|
||||
107
MyCode.Project.Domain/Message/Response/Common/KingDeeResult.cs
Normal file
107
MyCode.Project.Domain/Message/Response/Common/KingDeeResult.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.Common
|
||||
{
|
||||
|
||||
public class KingDeeResult
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ResponseStatus ResponseStatus { get; set; }
|
||||
|
||||
public object Result { get; set; }
|
||||
}
|
||||
|
||||
public class ErrorsItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FieldName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int DIndex { get; set; }
|
||||
}
|
||||
|
||||
public class SuccessEntitysItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Number { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int DIndex { get; set; }
|
||||
}
|
||||
|
||||
public class SuccessMessagesItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FieldName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int DIndex { get; set; }
|
||||
}
|
||||
|
||||
public class ResponseStatus
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ErrorCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IsSuccess { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<ErrorsItem> Errors { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<SuccessEntitysItem> SuccessEntitys { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<SuccessMessagesItem> SuccessMessages { get; set; }
|
||||
/// <summary>
|
||||
/// 0:默认 1:上下文丢失 2:没有权限 3:操作标识为空 4:异常 5:单据标识为空 6:数据库操作失败 7:许可错误 8:参数错误 9:指定字段/值不存在
|
||||
/// 10:未找到对应数据 11:验证失败 12:不可操作 13:网控冲突 14:调用限制 15:禁止管理员登录
|
||||
/// </summary>
|
||||
public string MsgCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Root
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public KingDeeResult Result { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.Common
|
||||
{
|
||||
public class QueueProcess
|
||||
{
|
||||
/// <summary>
|
||||
/// 要执行的路径
|
||||
/// </summary>
|
||||
public string TypePath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 方法名
|
||||
/// </summary>
|
||||
public string MethodName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
public string Parameter
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user