新增HisData数据集项目

This commit is contained in:
大石头 2020-04-09 23:22:52 +08:00
parent 523a9cf8ed
commit 9df403e00b
35 changed files with 3637 additions and 436 deletions

1
.gitignore vendored
View File

@ -30,3 +30,4 @@ bld/
/BinWeb
/BinServer
/BinAgent
/Samples/HisData/Config

View File

@ -1,14 +1,16 @@
<#@ template language="C#" hostSpecific="true" debug="true" #>
<#@ assembly name="$(ProjectDir)\DLL\NewLife.Core.dll" #>
<#@ assembly name="$(ProjectDir)\DLL\XCode.dll" #>
<#@ assembly name="netstandard" #>
<#@ assembly name="$(ProjectDir)\..\..\DLL\NewLife.Core.dll" #>
<#@ assembly name="$(ProjectDir)\..\..\DLL\XCode.dll" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="XCode.Code" #>
<#@ output extension=".log" #>
<#
// 设置当前工作目录
PathHelper.BaseDirectory = Host.ResolvePath(".");
// 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名
PathHelper.BasePath = Host.ResolvePath(".");
// 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名、中文文件名、表名字段名大小写
//EntityBuilder.Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true,Boolean? nameIgnoreCase = null);
EntityBuilder.Build();
//var tables = DAL.ImportFrom("Company.Project.xml");

Binary file not shown.

Binary file not shown.

View File

@ -22,7 +22,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -30,7 +30,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private String _Name;
/// <summary>名称</summary>
@ -38,7 +38,7 @@ namespace AntJob.Data.Entity
[Description("名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Name", "名称", "", Master = true)]
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
public String Name { get => _Name; set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
private String _ClassName;
/// <summary>类名。支持该作业的处理器实现</summary>
@ -46,7 +46,7 @@ namespace AntJob.Data.Entity
[Description("类名。支持该作业的处理器实现")]
[DataObjectField(false, false, true, 50)]
[BindColumn("ClassName", "类名。支持该作业的处理器实现", "")]
public String ClassName { get { return _ClassName; } set { if (OnPropertyChanging(__.ClassName, value)) { _ClassName = value; OnPropertyChanged(__.ClassName); } } }
public String ClassName { get => _ClassName; set { if (OnPropertyChanging(__.ClassName, value)) { _ClassName = value; OnPropertyChanged(__.ClassName); } } }
private String _DisplayName;
/// <summary>显示名</summary>
@ -54,7 +54,7 @@ namespace AntJob.Data.Entity
[Description("显示名")]
[DataObjectField(false, false, true, 50)]
[BindColumn("DisplayName", "显示名", "")]
public String DisplayName { get { return _DisplayName; } set { if (OnPropertyChanging(__.DisplayName, value)) { _DisplayName = value; OnPropertyChanged(__.DisplayName); } } }
public String DisplayName { get => _DisplayName; set { if (OnPropertyChanging(__.DisplayName, value)) { _DisplayName = value; OnPropertyChanged(__.DisplayName); } } }
private JobModes _Mode;
/// <summary>调度模式</summary>
@ -62,7 +62,7 @@ namespace AntJob.Data.Entity
[Description("调度模式")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Mode", "调度模式", "")]
public JobModes Mode { get { return _Mode; } set { if (OnPropertyChanging(__.Mode, value)) { _Mode = value; OnPropertyChanged(__.Mode); } } }
public JobModes Mode { get => _Mode; set { if (OnPropertyChanging(__.Mode, value)) { _Mode = value; OnPropertyChanged(__.Mode); } } }
private String _Topic;
/// <summary>主题。消息调度时消费的主题</summary>
@ -70,7 +70,7 @@ namespace AntJob.Data.Entity
[Description("主题。消息调度时消费的主题")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Topic", "主题。消息调度时消费的主题", "")]
public String Topic { get { return _Topic; } set { if (OnPropertyChanging(__.Topic, value)) { _Topic = value; OnPropertyChanged(__.Topic); } } }
public String Topic { get => _Topic; set { if (OnPropertyChanging(__.Topic, value)) { _Topic = value; OnPropertyChanged(__.Topic); } } }
private Int32 _MessageCount;
/// <summary>消息数</summary>
@ -78,7 +78,7 @@ namespace AntJob.Data.Entity
[Description("消息数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MessageCount", "消息数", "")]
public Int32 MessageCount { get { return _MessageCount; } set { if (OnPropertyChanging(__.MessageCount, value)) { _MessageCount = value; OnPropertyChanged(__.MessageCount); } } }
public Int32 MessageCount { get => _MessageCount; set { if (OnPropertyChanging(__.MessageCount, value)) { _MessageCount = value; OnPropertyChanged(__.MessageCount); } } }
private DateTime _Start;
/// <summary>开始。大于等于,下一个任务的起点</summary>
@ -86,7 +86,7 @@ namespace AntJob.Data.Entity
[Description("开始。大于等于,下一个任务的起点")]
[DataObjectField(false, false, true, 0)]
[BindColumn("Start", "开始。大于等于,下一个任务的起点", "")]
public DateTime Start { get { return _Start; } set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
public DateTime Start { get => _Start; set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
private DateTime _End;
/// <summary>结束。小于不等于,默认空表示无止境</summary>
@ -94,7 +94,7 @@ namespace AntJob.Data.Entity
[Description("结束。小于不等于,默认空表示无止境")]
[DataObjectField(false, false, true, 0)]
[BindColumn("End", "结束。小于不等于,默认空表示无止境", "")]
public DateTime End { get { return _End; } set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
public DateTime End { get => _End; set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
private Int32 _Step;
/// <summary>步进。切分任务的时间区间,秒</summary>
@ -102,7 +102,7 @@ namespace AntJob.Data.Entity
[Description("步进。切分任务的时间区间,秒")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Step", "步进。切分任务的时间区间,秒", "")]
public Int32 Step { get { return _Step; } set { if (OnPropertyChanging(__.Step, value)) { _Step = value; OnPropertyChanged(__.Step); } } }
public Int32 Step { get => _Step; set { if (OnPropertyChanging(__.Step, value)) { _Step = value; OnPropertyChanged(__.Step); } } }
private Int32 _BatchSize;
/// <summary>批大小。在任务时间区间内分页处理,或者每个任务的消息数</summary>
@ -110,7 +110,7 @@ namespace AntJob.Data.Entity
[Description("批大小。在任务时间区间内分页处理,或者每个任务的消息数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BatchSize", "批大小。在任务时间区间内分页处理,或者每个任务的消息数", "")]
public Int32 BatchSize { get { return _BatchSize; } set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
public Int32 BatchSize { get => _BatchSize; set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
private Int32 _Offset;
/// <summary>偏移。距离实时时间的秒数,部分业务不能跑到实时,秒</summary>
@ -118,7 +118,7 @@ namespace AntJob.Data.Entity
[Description("偏移。距离实时时间的秒数,部分业务不能跑到实时,秒")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Offset", "偏移。距离实时时间的秒数,部分业务不能跑到实时,秒", "")]
public Int32 Offset { get { return _Offset; } set { if (OnPropertyChanging(__.Offset, value)) { _Offset = value; OnPropertyChanged(__.Offset); } } }
public Int32 Offset { get => _Offset; set { if (OnPropertyChanging(__.Offset, value)) { _Offset = value; OnPropertyChanged(__.Offset); } } }
private Int32 _MaxTask;
/// <summary>并行。多任务并行处理</summary>
@ -126,7 +126,7 @@ namespace AntJob.Data.Entity
[Description("并行。多任务并行处理")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxTask", "并行。多任务并行处理", "")]
public Int32 MaxTask { get { return _MaxTask; } set { if (OnPropertyChanging(__.MaxTask, value)) { _MaxTask = value; OnPropertyChanged(__.MaxTask); } } }
public Int32 MaxTask { get => _MaxTask; set { if (OnPropertyChanging(__.MaxTask, value)) { _MaxTask = value; OnPropertyChanged(__.MaxTask); } } }
private Int32 _MaxError;
/// <summary>最大错误。连续错误达到最大错误数时停止</summary>
@ -134,7 +134,7 @@ namespace AntJob.Data.Entity
[Description("最大错误。连续错误达到最大错误数时停止")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxError", "最大错误。连续错误达到最大错误数时停止", "")]
public Int32 MaxError { get { return _MaxError; } set { if (OnPropertyChanging(__.MaxError, value)) { _MaxError = value; OnPropertyChanged(__.MaxError); } } }
public Int32 MaxError { get => _MaxError; set { if (OnPropertyChanging(__.MaxError, value)) { _MaxError = value; OnPropertyChanged(__.MaxError); } } }
private Int32 _MaxRetry;
/// <summary>最大重试。默认10次超过该次数后将不再重试</summary>
@ -142,7 +142,7 @@ namespace AntJob.Data.Entity
[Description("最大重试。默认10次超过该次数后将不再重试")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxRetry", "最大重试。默认10次超过该次数后将不再重试", "")]
public Int32 MaxRetry { get { return _MaxRetry; } set { if (OnPropertyChanging(__.MaxRetry, value)) { _MaxRetry = value; OnPropertyChanged(__.MaxRetry); } } }
public Int32 MaxRetry { get => _MaxRetry; set { if (OnPropertyChanging(__.MaxRetry, value)) { _MaxRetry = value; OnPropertyChanged(__.MaxRetry); } } }
private Int32 _MaxTime;
/// <summary>最大执行时间。默认600秒超过该时间则认为执行器故障将会把该任务分配给其它执行器</summary>
@ -150,7 +150,7 @@ namespace AntJob.Data.Entity
[Description("最大执行时间。默认600秒超过该时间则认为执行器故障将会把该任务分配给其它执行器")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxTime", "最大执行时间。默认600秒超过该时间则认为执行器故障将会把该任务分配给其它执行器", "")]
public Int32 MaxTime { get { return _MaxTime; } set { if (OnPropertyChanging(__.MaxTime, value)) { _MaxTime = value; OnPropertyChanged(__.MaxTime); } } }
public Int32 MaxTime { get => _MaxTime; set { if (OnPropertyChanging(__.MaxTime, value)) { _MaxTime = value; OnPropertyChanged(__.MaxTime); } } }
private Int32 _MaxRetain;
/// <summary>保留。任务项保留天数超过天数的任务项将被删除默认3天</summary>
@ -158,7 +158,7 @@ namespace AntJob.Data.Entity
[Description("保留。任务项保留天数超过天数的任务项将被删除默认3天")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxRetain", "保留。任务项保留天数超过天数的任务项将被删除默认3天", "")]
public Int32 MaxRetain { get { return _MaxRetain; } set { if (OnPropertyChanging(__.MaxRetain, value)) { _MaxRetain = value; OnPropertyChanged(__.MaxRetain); } } }
public Int32 MaxRetain { get => _MaxRetain; set { if (OnPropertyChanging(__.MaxRetain, value)) { _MaxRetain = value; OnPropertyChanged(__.MaxRetain); } } }
private Int32 _MaxIdle;
/// <summary>最大空闲时间。默认3600秒超过该时间不更新则认为应用程序故障系统触发告警</summary>
@ -166,7 +166,7 @@ namespace AntJob.Data.Entity
[Description("最大空闲时间。默认3600秒超过该时间不更新则认为应用程序故障系统触发告警")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MaxIdle", "最大空闲时间。默认3600秒超过该时间不更新则认为应用程序故障系统触发告警", "")]
public Int32 MaxIdle { get { return _MaxIdle; } set { if (OnPropertyChanging(__.MaxIdle, value)) { _MaxIdle = value; OnPropertyChanged(__.MaxIdle); } } }
public Int32 MaxIdle { get => _MaxIdle; set { if (OnPropertyChanging(__.MaxIdle, value)) { _MaxIdle = value; OnPropertyChanged(__.MaxIdle); } } }
private Int32 _ErrorDelay;
/// <summary>错误延迟。默认60秒出错延迟后重新发放</summary>
@ -174,7 +174,7 @@ namespace AntJob.Data.Entity
[Description("错误延迟。默认60秒出错延迟后重新发放")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ErrorDelay", "错误延迟。默认60秒出错延迟后重新发放", "")]
public Int32 ErrorDelay { get { return _ErrorDelay; } set { if (OnPropertyChanging(__.ErrorDelay, value)) { _ErrorDelay = value; OnPropertyChanged(__.ErrorDelay); } } }
public Int32 ErrorDelay { get => _ErrorDelay; set { if (OnPropertyChanging(__.ErrorDelay, value)) { _ErrorDelay = value; OnPropertyChanged(__.ErrorDelay); } } }
private Int64 _Total;
/// <summary>总数</summary>
@ -182,7 +182,7 @@ namespace AntJob.Data.Entity
[Description("总数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Total", "总数", "")]
public Int64 Total { get { return _Total; } set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
public Int64 Total { get => _Total; set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
private Int64 _Success;
/// <summary>成功</summary>
@ -190,7 +190,7 @@ namespace AntJob.Data.Entity
[Description("成功")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Success", "成功", "")]
public Int64 Success { get { return _Success; } set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
public Int64 Success { get => _Success; set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
private Int32 _Error;
/// <summary>错误</summary>
@ -198,7 +198,7 @@ namespace AntJob.Data.Entity
[Description("错误")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Error", "错误", "")]
public Int32 Error { get { return _Error; } set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
public Int32 Error { get => _Error; set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
private Int32 _Times;
/// <summary>次数</summary>
@ -206,7 +206,7 @@ namespace AntJob.Data.Entity
[Description("次数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Times", "次数", "")]
public Int32 Times { get { return _Times; } set { if (OnPropertyChanging(__.Times, value)) { _Times = value; OnPropertyChanged(__.Times); } } }
public Int32 Times { get => _Times; set { if (OnPropertyChanging(__.Times, value)) { _Times = value; OnPropertyChanged(__.Times); } } }
private Int32 _Speed;
/// <summary>速度</summary>
@ -214,7 +214,7 @@ namespace AntJob.Data.Entity
[Description("速度")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Speed", "速度", "")]
public Int32 Speed { get { return _Speed; } set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
public Int32 Speed { get => _Speed; set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
private Boolean _Enable;
/// <summary>启用</summary>
@ -222,7 +222,7 @@ namespace AntJob.Data.Entity
[Description("启用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Enable", "启用", "")]
public Boolean Enable { get { return _Enable; } set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
public Boolean Enable { get => _Enable; set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
private String _Remark;
/// <summary>内容</summary>
@ -230,7 +230,7 @@ namespace AntJob.Data.Entity
[Description("内容")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Remark", "内容", "")]
public String Remark { get { return _Remark; } set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
public String Remark { get => _Remark; set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
private Int32 _CreateUserID;
/// <summary>创建人</summary>
@ -238,7 +238,7 @@ namespace AntJob.Data.Entity
[Description("创建人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建人", "")]
public Int32 CreateUserID { get { return _CreateUserID; } set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private String _CreateUser;
/// <summary>创建者</summary>
@ -246,7 +246,7 @@ namespace AntJob.Data.Entity
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get { return _CreateUser; } set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -254,7 +254,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
@ -262,7 +262,7 @@ namespace AntJob.Data.Entity
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private Int32 _UpdateUserID;
/// <summary>更新人</summary>
@ -270,7 +270,7 @@ namespace AntJob.Data.Entity
[Description("更新人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新人", "")]
public Int32 UpdateUserID { get { return _UpdateUserID; } set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
@ -278,7 +278,7 @@ namespace AntJob.Data.Entity
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get { return _UpdateUser; } set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -286,7 +286,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
@ -294,7 +294,7 @@ namespace AntJob.Data.Entity
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get { return _UpdateIP; } set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
@ -307,41 +307,41 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.Name : return _Name;
case __.ClassName : return _ClassName;
case __.DisplayName : return _DisplayName;
case __.Mode : return _Mode;
case __.Topic : return _Topic;
case __.MessageCount : return _MessageCount;
case __.Start : return _Start;
case __.End : return _End;
case __.Step : return _Step;
case __.BatchSize : return _BatchSize;
case __.Offset : return _Offset;
case __.MaxTask : return _MaxTask;
case __.MaxError : return _MaxError;
case __.MaxRetry : return _MaxRetry;
case __.MaxTime : return _MaxTime;
case __.MaxRetain : return _MaxRetain;
case __.MaxIdle : return _MaxIdle;
case __.ErrorDelay : return _ErrorDelay;
case __.Total : return _Total;
case __.Success : return _Success;
case __.Error : return _Error;
case __.Times : return _Times;
case __.Speed : return _Speed;
case __.Enable : return _Enable;
case __.Remark : return _Remark;
case __.CreateUserID : return _CreateUserID;
case __.CreateUser : return _CreateUser;
case __.CreateTime : return _CreateTime;
case __.CreateIP : return _CreateIP;
case __.UpdateUserID : return _UpdateUserID;
case __.UpdateUser : return _UpdateUser;
case __.UpdateTime : return _UpdateTime;
case __.UpdateIP : return _UpdateIP;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.Name: return _Name;
case __.ClassName: return _ClassName;
case __.DisplayName: return _DisplayName;
case __.Mode: return _Mode;
case __.Topic: return _Topic;
case __.MessageCount: return _MessageCount;
case __.Start: return _Start;
case __.End: return _End;
case __.Step: return _Step;
case __.BatchSize: return _BatchSize;
case __.Offset: return _Offset;
case __.MaxTask: return _MaxTask;
case __.MaxError: return _MaxError;
case __.MaxRetry: return _MaxRetry;
case __.MaxTime: return _MaxTime;
case __.MaxRetain: return _MaxRetain;
case __.MaxIdle: return _MaxIdle;
case __.ErrorDelay: return _ErrorDelay;
case __.Total: return _Total;
case __.Success: return _Success;
case __.Error: return _Error;
case __.Times: return _Times;
case __.Speed: return _Speed;
case __.Enable: return _Enable;
case __.Remark: return _Remark;
case __.CreateUserID: return _CreateUserID;
case __.CreateUser: return _CreateUser;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateUser: return _UpdateUser;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
@ -349,41 +349,41 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.Name : _Name = Convert.ToString(value); break;
case __.ClassName : _ClassName = Convert.ToString(value); break;
case __.DisplayName : _DisplayName = Convert.ToString(value); break;
case __.Mode : _Mode = (JobModes)value.ToInt(); break;
case __.Topic : _Topic = Convert.ToString(value); break;
case __.MessageCount : _MessageCount = value.ToInt(); break;
case __.Start : _Start = value.ToDateTime(); break;
case __.End : _End = value.ToDateTime(); break;
case __.Step : _Step = value.ToInt(); break;
case __.BatchSize : _BatchSize = value.ToInt(); break;
case __.Offset : _Offset = value.ToInt(); break;
case __.MaxTask : _MaxTask = value.ToInt(); break;
case __.MaxError : _MaxError = value.ToInt(); break;
case __.MaxRetry : _MaxRetry = value.ToInt(); break;
case __.MaxTime : _MaxTime = value.ToInt(); break;
case __.MaxRetain : _MaxRetain = value.ToInt(); break;
case __.MaxIdle : _MaxIdle = value.ToInt(); break;
case __.ErrorDelay : _ErrorDelay = value.ToInt(); break;
case __.Total : _Total = value.ToLong(); break;
case __.Success : _Success = value.ToLong(); break;
case __.Error : _Error = value.ToInt(); break;
case __.Times : _Times = value.ToInt(); break;
case __.Speed : _Speed = value.ToInt(); break;
case __.Enable : _Enable = value.ToBoolean(); break;
case __.Remark : _Remark = Convert.ToString(value); break;
case __.CreateUserID : _CreateUserID = value.ToInt(); break;
case __.CreateUser : _CreateUser = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID : _UpdateUserID = value.ToInt(); break;
case __.UpdateUser : _UpdateUser = Convert.ToString(value); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP : _UpdateIP = Convert.ToString(value); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.Name: _Name = Convert.ToString(value); break;
case __.ClassName: _ClassName = Convert.ToString(value); break;
case __.DisplayName: _DisplayName = Convert.ToString(value); break;
case __.Mode: _Mode = (JobModes)value; break;
case __.Topic: _Topic = Convert.ToString(value); break;
case __.MessageCount: _MessageCount = value.ToInt(); break;
case __.Start: _Start = value.ToDateTime(); break;
case __.End: _End = value.ToDateTime(); break;
case __.Step: _Step = value.ToInt(); break;
case __.BatchSize: _BatchSize = value.ToInt(); break;
case __.Offset: _Offset = value.ToInt(); break;
case __.MaxTask: _MaxTask = value.ToInt(); break;
case __.MaxError: _MaxError = value.ToInt(); break;
case __.MaxRetry: _MaxRetry = value.ToInt(); break;
case __.MaxTime: _MaxTime = value.ToInt(); break;
case __.MaxRetain: _MaxRetain = value.ToInt(); break;
case __.MaxIdle: _MaxIdle = value.ToInt(); break;
case __.ErrorDelay: _ErrorDelay = value.ToInt(); break;
case __.Total: _Total = value.ToLong(); break;
case __.Success: _Success = value.ToLong(); break;
case __.Error: _Error = value.ToInt(); break;
case __.Times: _Times = value.ToInt(); break;
case __.Speed: _Speed = value.ToInt(); break;
case __.Enable: _Enable = value.ToBoolean(); break;
case __.Remark: _Remark = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
@ -499,7 +499,7 @@ namespace AntJob.Data.Entity
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得作业字段名称的快捷方式</summary>

View File

@ -24,7 +24,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -32,7 +32,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private Int32 _JobID;
/// <summary>作业</summary>
@ -40,7 +40,7 @@ namespace AntJob.Data.Entity
[Description("作业")]
[DataObjectField(false, false, false, 0)]
[BindColumn("JobID", "作业", "")]
public Int32 JobID { get { return _JobID; } set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
public Int32 JobID { get => _JobID; set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
private String _Client;
/// <summary>客户端。IP加进程</summary>
@ -48,7 +48,7 @@ namespace AntJob.Data.Entity
[Description("客户端。IP加进程")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Client", "客户端。IP加进程", "")]
public String Client { get { return _Client; } set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
public String Client { get => _Client; set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
private DateTime _Start;
/// <summary>开始。大于等于</summary>
@ -56,7 +56,7 @@ namespace AntJob.Data.Entity
[Description("开始。大于等于")]
[DataObjectField(false, false, true, 0)]
[BindColumn("Start", "开始。大于等于", "")]
public DateTime Start { get { return _Start; } set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
public DateTime Start { get => _Start; set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
private DateTime _End;
/// <summary>结束。小于,不等于</summary>
@ -64,7 +64,7 @@ namespace AntJob.Data.Entity
[Description("结束。小于,不等于")]
[DataObjectField(false, false, true, 0)]
[BindColumn("End", "结束。小于,不等于", "")]
public DateTime End { get { return _End; } set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
public DateTime End { get => _End; set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
private Int32 _BatchSize;
/// <summary>批大小</summary>
@ -72,7 +72,7 @@ namespace AntJob.Data.Entity
[Description("批大小")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BatchSize", "批大小", "")]
public Int32 BatchSize { get { return _BatchSize; } set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
public Int32 BatchSize { get => _BatchSize; set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
private Int32 _Total;
/// <summary>总数</summary>
@ -80,7 +80,7 @@ namespace AntJob.Data.Entity
[Description("总数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Total", "总数", "")]
public Int32 Total { get { return _Total; } set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
public Int32 Total { get => _Total; set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
private Int32 _Success;
/// <summary>成功</summary>
@ -88,7 +88,7 @@ namespace AntJob.Data.Entity
[Description("成功")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Success", "成功", "")]
public Int32 Success { get { return _Success; } set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
public Int32 Success { get => _Success; set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
private Int32 _Error;
/// <summary>错误</summary>
@ -96,7 +96,7 @@ namespace AntJob.Data.Entity
[Description("错误")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Error", "错误", "")]
public Int32 Error { get { return _Error; } set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
public Int32 Error { get => _Error; set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
private Int32 _Times;
/// <summary>次数</summary>
@ -104,7 +104,7 @@ namespace AntJob.Data.Entity
[Description("次数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Times", "次数", "")]
public Int32 Times { get { return _Times; } set { if (OnPropertyChanging(__.Times, value)) { _Times = value; OnPropertyChanged(__.Times); } } }
public Int32 Times { get => _Times; set { if (OnPropertyChanging(__.Times, value)) { _Times = value; OnPropertyChanged(__.Times); } } }
private Int32 _Speed;
/// <summary>速度</summary>
@ -112,7 +112,7 @@ namespace AntJob.Data.Entity
[Description("速度")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Speed", "速度", "")]
public Int32 Speed { get { return _Speed; } set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
public Int32 Speed { get => _Speed; set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
private Int32 _Cost;
/// <summary>耗时。秒</summary>
@ -120,7 +120,7 @@ namespace AntJob.Data.Entity
[Description("耗时。秒")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Cost", "耗时。秒", "")]
public Int32 Cost { get { return _Cost; } set { if (OnPropertyChanging(__.Cost, value)) { _Cost = value; OnPropertyChanged(__.Cost); } } }
public Int32 Cost { get => _Cost; set { if (OnPropertyChanging(__.Cost, value)) { _Cost = value; OnPropertyChanged(__.Cost); } } }
private Int32 _FullCost;
/// <summary>全部耗时。秒,从任务发放到执行完成的时间</summary>
@ -128,7 +128,7 @@ namespace AntJob.Data.Entity
[Description("全部耗时。秒,从任务发放到执行完成的时间")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FullCost", "全部耗时。秒,从任务发放到执行完成的时间", "")]
public Int32 FullCost { get { return _FullCost; } set { if (OnPropertyChanging(__.FullCost, value)) { _FullCost = value; OnPropertyChanged(__.FullCost); } } }
public Int32 FullCost { get => _FullCost; set { if (OnPropertyChanging(__.FullCost, value)) { _FullCost = value; OnPropertyChanged(__.FullCost); } } }
private JobStatus _Status;
/// <summary>状态</summary>
@ -136,7 +136,7 @@ namespace AntJob.Data.Entity
[Description("状态")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Status", "状态", "")]
public JobStatus Status { get { return _Status; } set { if (OnPropertyChanging(__.Status, value)) { _Status = value; OnPropertyChanged(__.Status); } } }
public JobStatus Status { get => _Status; set { if (OnPropertyChanging(__.Status, value)) { _Status = value; OnPropertyChanged(__.Status); } } }
private Int32 _MsgCount;
/// <summary>消费消息数</summary>
@ -144,7 +144,7 @@ namespace AntJob.Data.Entity
[Description("消费消息数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MsgCount", "消费消息数", "")]
public Int32 MsgCount { get { return _MsgCount; } set { if (OnPropertyChanging(__.MsgCount, value)) { _MsgCount = value; OnPropertyChanged(__.MsgCount); } } }
public Int32 MsgCount { get => _MsgCount; set { if (OnPropertyChanging(__.MsgCount, value)) { _MsgCount = value; OnPropertyChanged(__.MsgCount); } } }
private String _Server;
/// <summary>服务器</summary>
@ -152,7 +152,7 @@ namespace AntJob.Data.Entity
[Description("服务器")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Server", "服务器", "")]
public String Server { get { return _Server; } set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
public String Server { get => _Server; set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
private Int32 _ProcessID;
/// <summary>进程</summary>
@ -160,7 +160,7 @@ namespace AntJob.Data.Entity
[Description("进程")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ProcessID", "进程", "")]
public Int32 ProcessID { get { return _ProcessID; } set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
public Int32 ProcessID { get => _ProcessID; set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
private String _Key;
/// <summary>最后键</summary>
@ -168,7 +168,7 @@ namespace AntJob.Data.Entity
[Description("最后键")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Key", "最后键", "")]
public String Key { get { return _Key; } set { if (OnPropertyChanging(__.Key, value)) { _Key = value; OnPropertyChanged(__.Key); } } }
public String Key { get => _Key; set { if (OnPropertyChanging(__.Key, value)) { _Key = value; OnPropertyChanged(__.Key); } } }
private String _Data;
/// <summary>数据。可以是Json数据比如StatID</summary>
@ -176,7 +176,7 @@ namespace AntJob.Data.Entity
[Description("数据。可以是Json数据比如StatID")]
[DataObjectField(false, false, true, 8000)]
[BindColumn("Data", "数据。可以是Json数据比如StatID", "")]
public String Data { get { return _Data; } set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
public String Data { get => _Data; set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
private String _Message;
/// <summary>备注</summary>
@ -184,7 +184,7 @@ namespace AntJob.Data.Entity
[Description("备注")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Message", "备注", "")]
public String Message { get { return _Message; } set { if (OnPropertyChanging(__.Message, value)) { _Message = value; OnPropertyChanged(__.Message); } } }
public String Message { get => _Message; set { if (OnPropertyChanging(__.Message, value)) { _Message = value; OnPropertyChanged(__.Message); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -192,7 +192,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -200,7 +200,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
#endregion
#region /
@ -213,29 +213,29 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.JobID : return _JobID;
case __.Client : return _Client;
case __.Start : return _Start;
case __.End : return _End;
case __.BatchSize : return _BatchSize;
case __.Total : return _Total;
case __.Success : return _Success;
case __.Error : return _Error;
case __.Times : return _Times;
case __.Speed : return _Speed;
case __.Cost : return _Cost;
case __.FullCost : return _FullCost;
case __.Status : return _Status;
case __.MsgCount : return _MsgCount;
case __.Server : return _Server;
case __.ProcessID : return _ProcessID;
case __.Key : return _Key;
case __.Data : return _Data;
case __.Message : return _Message;
case __.CreateTime : return _CreateTime;
case __.UpdateTime : return _UpdateTime;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.JobID: return _JobID;
case __.Client: return _Client;
case __.Start: return _Start;
case __.End: return _End;
case __.BatchSize: return _BatchSize;
case __.Total: return _Total;
case __.Success: return _Success;
case __.Error: return _Error;
case __.Times: return _Times;
case __.Speed: return _Speed;
case __.Cost: return _Cost;
case __.FullCost: return _FullCost;
case __.Status: return _Status;
case __.MsgCount: return _MsgCount;
case __.Server: return _Server;
case __.ProcessID: return _ProcessID;
case __.Key: return _Key;
case __.Data: return _Data;
case __.Message: return _Message;
case __.CreateTime: return _CreateTime;
case __.UpdateTime: return _UpdateTime;
default: return base[name];
}
}
@ -243,29 +243,29 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.JobID : _JobID = value.ToInt(); break;
case __.Client : _Client = Convert.ToString(value); break;
case __.Start : _Start = value.ToDateTime(); break;
case __.End : _End = value.ToDateTime(); break;
case __.BatchSize : _BatchSize = value.ToInt(); break;
case __.Total : _Total = value.ToInt(); break;
case __.Success : _Success = value.ToInt(); break;
case __.Error : _Error = value.ToInt(); break;
case __.Times : _Times = value.ToInt(); break;
case __.Speed : _Speed = value.ToInt(); break;
case __.Cost : _Cost = value.ToInt(); break;
case __.FullCost : _FullCost = value.ToInt(); break;
case __.Status : _Status = (JobStatus)value.ToInt(); break;
case __.MsgCount : _MsgCount = value.ToInt(); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.ProcessID : _ProcessID = value.ToInt(); break;
case __.Key : _Key = Convert.ToString(value); break;
case __.Data : _Data = Convert.ToString(value); break;
case __.Message : _Message = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.JobID: _JobID = value.ToInt(); break;
case __.Client: _Client = Convert.ToString(value); break;
case __.Start: _Start = value.ToDateTime(); break;
case __.End: _End = value.ToDateTime(); break;
case __.BatchSize: _BatchSize = value.ToInt(); break;
case __.Total: _Total = value.ToInt(); break;
case __.Success: _Success = value.ToInt(); break;
case __.Error: _Error = value.ToInt(); break;
case __.Times: _Times = value.ToInt(); break;
case __.Speed: _Speed = value.ToInt(); break;
case __.Cost: _Cost = value.ToInt(); break;
case __.FullCost: _FullCost = value.ToInt(); break;
case __.Status: _Status = (JobStatus)value; break;
case __.MsgCount: _MsgCount = value.ToInt(); break;
case __.Server: _Server = Convert.ToString(value); break;
case __.ProcessID: _ProcessID = value.ToInt(); break;
case __.Key: _Key = Convert.ToString(value); break;
case __.Data: _Data = Convert.ToString(value); break;
case __.Message: _Message = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
default: base[name] = value; break;
}
}
@ -345,7 +345,7 @@ namespace AntJob.Data.Entity
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得作业任务字段名称的快捷方式</summary>

View File

@ -25,7 +25,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -33,7 +33,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private Int32 _JobID;
/// <summary>作业</summary>
@ -41,7 +41,7 @@ namespace AntJob.Data.Entity
[Description("作业")]
[DataObjectField(false, false, false, 0)]
[BindColumn("JobID", "作业", "")]
public Int32 JobID { get { return _JobID; } set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
public Int32 JobID { get => _JobID; set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
private Int32 _TaskID;
/// <summary>作业项</summary>
@ -49,7 +49,7 @@ namespace AntJob.Data.Entity
[Description("作业项")]
[DataObjectField(false, false, false, 0)]
[BindColumn("TaskID", "作业项", "")]
public Int32 TaskID { get { return _TaskID; } set { if (OnPropertyChanging(__.TaskID, value)) { _TaskID = value; OnPropertyChanged(__.TaskID); } } }
public Int32 TaskID { get => _TaskID; set { if (OnPropertyChanging(__.TaskID, value)) { _TaskID = value; OnPropertyChanged(__.TaskID); } } }
private String _Client;
/// <summary>客户端。IP加进程</summary>
@ -57,7 +57,7 @@ namespace AntJob.Data.Entity
[Description("客户端。IP加进程")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Client", "客户端。IP加进程", "")]
public String Client { get { return _Client; } set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
public String Client { get => _Client; set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
private DateTime _Start;
/// <summary>开始。大于等于</summary>
@ -65,7 +65,7 @@ namespace AntJob.Data.Entity
[Description("开始。大于等于")]
[DataObjectField(false, false, true, 0)]
[BindColumn("Start", "开始。大于等于", "")]
public DateTime Start { get { return _Start; } set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
public DateTime Start { get => _Start; set { if (OnPropertyChanging(__.Start, value)) { _Start = value; OnPropertyChanged(__.Start); } } }
private DateTime _End;
/// <summary>结束。小于,不等于</summary>
@ -73,7 +73,7 @@ namespace AntJob.Data.Entity
[Description("结束。小于,不等于")]
[DataObjectField(false, false, true, 0)]
[BindColumn("End", "结束。小于,不等于", "")]
public DateTime End { get { return _End; } set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
public DateTime End { get => _End; set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
private Int32 _BatchSize;
/// <summary>批大小</summary>
@ -81,7 +81,7 @@ namespace AntJob.Data.Entity
[Description("批大小")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BatchSize", "批大小", "")]
public Int32 BatchSize { get { return _BatchSize; } set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
public Int32 BatchSize { get => _BatchSize; set { if (OnPropertyChanging(__.BatchSize, value)) { _BatchSize = value; OnPropertyChanged(__.BatchSize); } } }
private String _Key;
/// <summary>数据键</summary>
@ -89,7 +89,7 @@ namespace AntJob.Data.Entity
[Description("数据键")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Key", "数据键", "")]
public String Key { get { return _Key; } set { if (OnPropertyChanging(__.Key, value)) { _Key = value; OnPropertyChanged(__.Key); } } }
public String Key { get => _Key; set { if (OnPropertyChanging(__.Key, value)) { _Key = value; OnPropertyChanged(__.Key); } } }
private String _Data;
/// <summary>数据</summary>
@ -97,7 +97,7 @@ namespace AntJob.Data.Entity
[Description("数据")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Data", "数据", "")]
public String Data { get { return _Data; } set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
public String Data { get => _Data; set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
private String _Server;
/// <summary>服务器</summary>
@ -105,7 +105,7 @@ namespace AntJob.Data.Entity
[Description("服务器")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Server", "服务器", "")]
public String Server { get { return _Server; } set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
public String Server { get => _Server; set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
private Int32 _ProcessID;
/// <summary>进程</summary>
@ -113,7 +113,7 @@ namespace AntJob.Data.Entity
[Description("进程")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ProcessID", "进程", "")]
public Int32 ProcessID { get { return _ProcessID; } set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
public Int32 ProcessID { get => _ProcessID; set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
private String _ErrorCode;
/// <summary>错误码</summary>
@ -121,7 +121,7 @@ namespace AntJob.Data.Entity
[Description("错误码")]
[DataObjectField(false, false, true, 50)]
[BindColumn("ErrorCode", "错误码", "")]
public String ErrorCode { get { return _ErrorCode; } set { if (OnPropertyChanging(__.ErrorCode, value)) { _ErrorCode = value; OnPropertyChanged(__.ErrorCode); } } }
public String ErrorCode { get => _ErrorCode; set { if (OnPropertyChanging(__.ErrorCode, value)) { _ErrorCode = value; OnPropertyChanged(__.ErrorCode); } } }
private String _Message;
/// <summary>内容</summary>
@ -129,7 +129,7 @@ namespace AntJob.Data.Entity
[Description("内容")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Message", "内容", "")]
public String Message { get { return _Message; } set { if (OnPropertyChanging(__.Message, value)) { _Message = value; OnPropertyChanged(__.Message); } } }
public String Message { get => _Message; set { if (OnPropertyChanging(__.Message, value)) { _Message = value; OnPropertyChanged(__.Message); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -137,7 +137,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -145,7 +145,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
#endregion
#region /
@ -158,22 +158,22 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.JobID : return _JobID;
case __.TaskID : return _TaskID;
case __.Client : return _Client;
case __.Start : return _Start;
case __.End : return _End;
case __.BatchSize : return _BatchSize;
case __.Key : return _Key;
case __.Data : return _Data;
case __.Server : return _Server;
case __.ProcessID : return _ProcessID;
case __.ErrorCode : return _ErrorCode;
case __.Message : return _Message;
case __.CreateTime : return _CreateTime;
case __.UpdateTime : return _UpdateTime;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.JobID: return _JobID;
case __.TaskID: return _TaskID;
case __.Client: return _Client;
case __.Start: return _Start;
case __.End: return _End;
case __.BatchSize: return _BatchSize;
case __.Key: return _Key;
case __.Data: return _Data;
case __.Server: return _Server;
case __.ProcessID: return _ProcessID;
case __.ErrorCode: return _ErrorCode;
case __.Message: return _Message;
case __.CreateTime: return _CreateTime;
case __.UpdateTime: return _UpdateTime;
default: return base[name];
}
}
@ -181,22 +181,22 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.JobID : _JobID = value.ToInt(); break;
case __.TaskID : _TaskID = value.ToInt(); break;
case __.Client : _Client = Convert.ToString(value); break;
case __.Start : _Start = value.ToDateTime(); break;
case __.End : _End = value.ToDateTime(); break;
case __.BatchSize : _BatchSize = value.ToInt(); break;
case __.Key : _Key = Convert.ToString(value); break;
case __.Data : _Data = Convert.ToString(value); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.ProcessID : _ProcessID = value.ToInt(); break;
case __.ErrorCode : _ErrorCode = Convert.ToString(value); break;
case __.Message : _Message = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.JobID: _JobID = value.ToInt(); break;
case __.TaskID: _TaskID = value.ToInt(); break;
case __.Client: _Client = Convert.ToString(value); break;
case __.Start: _Start = value.ToDateTime(); break;
case __.End: _End = value.ToDateTime(); break;
case __.BatchSize: _BatchSize = value.ToInt(); break;
case __.Key: _Key = Convert.ToString(value); break;
case __.Data: _Data = Convert.ToString(value); break;
case __.Server: _Server = Convert.ToString(value); break;
case __.ProcessID: _ProcessID = value.ToInt(); break;
case __.ErrorCode: _ErrorCode = Convert.ToString(value); break;
case __.Message: _Message = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
default: base[name] = value; break;
}
}
@ -255,7 +255,7 @@ namespace AntJob.Data.Entity
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得作业错误字段名称的快捷方式</summary>

View File

@ -23,7 +23,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -31,7 +31,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private String _Name;
/// <summary>名称</summary>
@ -39,7 +39,7 @@ namespace AntJob.Data.Entity
[Description("名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Name", "名称", "", Master = true)]
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
public String Name { get => _Name; set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
private String _Action;
/// <summary>操作</summary>
@ -47,7 +47,7 @@ namespace AntJob.Data.Entity
[Description("操作")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Action", "操作", "")]
public String Action { get { return _Action; } set { if (OnPropertyChanging(__.Action, value)) { _Action = value; OnPropertyChanged(__.Action); } } }
public String Action { get => _Action; set { if (OnPropertyChanging(__.Action, value)) { _Action = value; OnPropertyChanged(__.Action); } } }
private Boolean _Success;
/// <summary>成功</summary>
@ -55,7 +55,7 @@ namespace AntJob.Data.Entity
[Description("成功")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Success", "成功", "")]
public Boolean Success { get { return _Success; } set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
public Boolean Success { get => _Success; set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
private String _Version;
/// <summary>版本</summary>
@ -63,7 +63,7 @@ namespace AntJob.Data.Entity
[Description("版本")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Version", "版本", "")]
public String Version { get { return _Version; } set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
public String Version { get => _Version; set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
private DateTime _CompileTime;
/// <summary>编译时间</summary>
@ -71,7 +71,7 @@ namespace AntJob.Data.Entity
[Description("编译时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CompileTime", "编译时间", "")]
public DateTime CompileTime { get { return _CompileTime; } set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
public DateTime CompileTime { get => _CompileTime; set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
private String _Server;
/// <summary>服务端。客户端登录到哪个服务端IP加端口</summary>
@ -79,7 +79,7 @@ namespace AntJob.Data.Entity
[Description("服务端。客户端登录到哪个服务端IP加端口")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Server", "服务端。客户端登录到哪个服务端IP加端口", "")]
public String Server { get { return _Server; } set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
public String Server { get => _Server; set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -87,7 +87,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
@ -95,7 +95,7 @@ namespace AntJob.Data.Entity
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _Remark;
/// <summary>内容</summary>
@ -103,7 +103,7 @@ namespace AntJob.Data.Entity
[Description("内容")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Remark", "内容", "")]
public String Remark { get { return _Remark; } set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
public String Remark { get => _Remark; set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
#endregion
#region /
@ -116,17 +116,17 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.Name : return _Name;
case __.Action : return _Action;
case __.Success : return _Success;
case __.Version : return _Version;
case __.CompileTime : return _CompileTime;
case __.Server : return _Server;
case __.CreateTime : return _CreateTime;
case __.CreateIP : return _CreateIP;
case __.Remark : return _Remark;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.Name: return _Name;
case __.Action: return _Action;
case __.Success: return _Success;
case __.Version: return _Version;
case __.CompileTime: return _CompileTime;
case __.Server: return _Server;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.Remark: return _Remark;
default: return base[name];
}
}
@ -134,17 +134,17 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.Name : _Name = Convert.ToString(value); break;
case __.Action : _Action = Convert.ToString(value); break;
case __.Success : _Success = value.ToBoolean(); break;
case __.Version : _Version = Convert.ToString(value); break;
case __.CompileTime : _CompileTime = value.ToDateTime(); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
case __.Remark : _Remark = Convert.ToString(value); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.Name: _Name = Convert.ToString(value); break;
case __.Action: _Action = Convert.ToString(value); break;
case __.Success: _Success = value.ToBoolean(); break;
case __.Version: _Version = Convert.ToString(value); break;
case __.CompileTime: _CompileTime = value.ToDateTime(); break;
case __.Server: _Server = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.Remark: _Remark = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
@ -188,7 +188,7 @@ namespace AntJob.Data.Entity
/// <summary>内容</summary>
public static readonly Field Remark = FindByName(__.Remark);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得应用历史字段名称的快捷方式</summary>

View File

@ -24,7 +24,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -32,7 +32,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private String _Instance;
/// <summary>实例。IP加端口</summary>
@ -40,7 +40,7 @@ namespace AntJob.Data.Entity
[Description("实例。IP加端口")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Instance", "实例。IP加端口", "")]
public String Instance { get { return _Instance; } set { if (OnPropertyChanging(__.Instance, value)) { _Instance = value; OnPropertyChanged(__.Instance); } } }
public String Instance { get => _Instance; set { if (OnPropertyChanging(__.Instance, value)) { _Instance = value; OnPropertyChanged(__.Instance); } } }
private String _Client;
/// <summary>客户端。IP加进程</summary>
@ -48,7 +48,7 @@ namespace AntJob.Data.Entity
[Description("客户端。IP加进程")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Client", "客户端。IP加进程", "")]
public String Client { get { return _Client; } set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
public String Client { get => _Client; set { if (OnPropertyChanging(__.Client, value)) { _Client = value; OnPropertyChanged(__.Client); } } }
private String _Name;
/// <summary>名称。机器名称</summary>
@ -56,7 +56,7 @@ namespace AntJob.Data.Entity
[Description("名称。机器名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Name", "名称。机器名称", "", Master = true)]
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
public String Name { get => _Name; set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
private Int32 _ProcessId;
/// <summary>进程。进程Id</summary>
@ -64,7 +64,7 @@ namespace AntJob.Data.Entity
[Description("进程。进程Id")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ProcessId", "进程。进程Id", "")]
public Int32 ProcessId { get { return _ProcessId; } set { if (OnPropertyChanging(__.ProcessId, value)) { _ProcessId = value; OnPropertyChanged(__.ProcessId); } } }
public Int32 ProcessId { get => _ProcessId; set { if (OnPropertyChanging(__.ProcessId, value)) { _ProcessId = value; OnPropertyChanged(__.ProcessId); } } }
private String _Version;
/// <summary>版本。客户端</summary>
@ -72,7 +72,7 @@ namespace AntJob.Data.Entity
[Description("版本。客户端")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Version", "版本。客户端", "")]
public String Version { get { return _Version; } set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
public String Version { get => _Version; set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
private DateTime _CompileTime;
/// <summary>编译时间</summary>
@ -80,7 +80,7 @@ namespace AntJob.Data.Entity
[Description("编译时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CompileTime", "编译时间", "")]
public DateTime CompileTime { get { return _CompileTime; } set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
public DateTime CompileTime { get => _CompileTime; set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
private String _Server;
/// <summary>服务端。客户端登录到哪个服务端IP加端口</summary>
@ -88,7 +88,7 @@ namespace AntJob.Data.Entity
[Description("服务端。客户端登录到哪个服务端IP加端口")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Server", "服务端。客户端登录到哪个服务端IP加端口", "")]
public String Server { get { return _Server; } set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
public String Server { get => _Server; set { if (OnPropertyChanging(__.Server, value)) { _Server = value; OnPropertyChanged(__.Server); } } }
private Int32 _Tasks;
/// <summary>任务数</summary>
@ -96,7 +96,7 @@ namespace AntJob.Data.Entity
[Description("任务数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Tasks", "任务数", "")]
public Int32 Tasks { get { return _Tasks; } set { if (OnPropertyChanging(__.Tasks, value)) { _Tasks = value; OnPropertyChanged(__.Tasks); } } }
public Int32 Tasks { get => _Tasks; set { if (OnPropertyChanging(__.Tasks, value)) { _Tasks = value; OnPropertyChanged(__.Tasks); } } }
private Int64 _Total;
/// <summary>总数</summary>
@ -104,7 +104,7 @@ namespace AntJob.Data.Entity
[Description("总数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Total", "总数", "")]
public Int64 Total { get { return _Total; } set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
public Int64 Total { get => _Total; set { if (OnPropertyChanging(__.Total, value)) { _Total = value; OnPropertyChanged(__.Total); } } }
private Int64 _Success;
/// <summary>成功</summary>
@ -112,7 +112,7 @@ namespace AntJob.Data.Entity
[Description("成功")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Success", "成功", "")]
public Int64 Success { get { return _Success; } set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
public Int64 Success { get => _Success; set { if (OnPropertyChanging(__.Success, value)) { _Success = value; OnPropertyChanged(__.Success); } } }
private Int64 _Error;
/// <summary>错误</summary>
@ -120,7 +120,7 @@ namespace AntJob.Data.Entity
[Description("错误")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Error", "错误", "")]
public Int64 Error { get { return _Error; } set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
public Int64 Error { get => _Error; set { if (OnPropertyChanging(__.Error, value)) { _Error = value; OnPropertyChanged(__.Error); } } }
private Int64 _Cost;
/// <summary>耗时。执行任务总耗时,秒</summary>
@ -128,7 +128,7 @@ namespace AntJob.Data.Entity
[Description("耗时。执行任务总耗时,秒")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Cost", "耗时。执行任务总耗时,秒", "")]
public Int64 Cost { get { return _Cost; } set { if (OnPropertyChanging(__.Cost, value)) { _Cost = value; OnPropertyChanged(__.Cost); } } }
public Int64 Cost { get => _Cost; set { if (OnPropertyChanging(__.Cost, value)) { _Cost = value; OnPropertyChanged(__.Cost); } } }
private Int64 _Speed;
/// <summary>速度。每秒处理数</summary>
@ -136,7 +136,7 @@ namespace AntJob.Data.Entity
[Description("速度。每秒处理数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Speed", "速度。每秒处理数", "")]
public Int64 Speed { get { return _Speed; } set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
public Int64 Speed { get => _Speed; set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
private String _LastKey;
/// <summary>最后键</summary>
@ -144,7 +144,7 @@ namespace AntJob.Data.Entity
[Description("最后键")]
[DataObjectField(false, false, true, 50)]
[BindColumn("LastKey", "最后键", "")]
public String LastKey { get { return _LastKey; } set { if (OnPropertyChanging(__.LastKey, value)) { _LastKey = value; OnPropertyChanged(__.LastKey); } } }
public String LastKey { get => _LastKey; set { if (OnPropertyChanging(__.LastKey, value)) { _LastKey = value; OnPropertyChanged(__.LastKey); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -152,7 +152,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
@ -160,7 +160,7 @@ namespace AntJob.Data.Entity
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -168,7 +168,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
@ -176,7 +176,7 @@ namespace AntJob.Data.Entity
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get { return _UpdateIP; } set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
@ -189,26 +189,26 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.Instance : return _Instance;
case __.Client : return _Client;
case __.Name : return _Name;
case __.ProcessId : return _ProcessId;
case __.Version : return _Version;
case __.CompileTime : return _CompileTime;
case __.Server : return _Server;
case __.Tasks : return _Tasks;
case __.Total : return _Total;
case __.Success : return _Success;
case __.Error : return _Error;
case __.Cost : return _Cost;
case __.Speed : return _Speed;
case __.LastKey : return _LastKey;
case __.CreateTime : return _CreateTime;
case __.CreateIP : return _CreateIP;
case __.UpdateTime : return _UpdateTime;
case __.UpdateIP : return _UpdateIP;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.Instance: return _Instance;
case __.Client: return _Client;
case __.Name: return _Name;
case __.ProcessId: return _ProcessId;
case __.Version: return _Version;
case __.CompileTime: return _CompileTime;
case __.Server: return _Server;
case __.Tasks: return _Tasks;
case __.Total: return _Total;
case __.Success: return _Success;
case __.Error: return _Error;
case __.Cost: return _Cost;
case __.Speed: return _Speed;
case __.LastKey: return _LastKey;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
@ -216,26 +216,26 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.Instance : _Instance = Convert.ToString(value); break;
case __.Client : _Client = Convert.ToString(value); break;
case __.Name : _Name = Convert.ToString(value); break;
case __.ProcessId : _ProcessId = value.ToInt(); break;
case __.Version : _Version = Convert.ToString(value); break;
case __.CompileTime : _CompileTime = value.ToDateTime(); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.Tasks : _Tasks = value.ToInt(); break;
case __.Total : _Total = value.ToLong(); break;
case __.Success : _Success = value.ToLong(); break;
case __.Error : _Error = value.ToLong(); break;
case __.Cost : _Cost = value.ToLong(); break;
case __.Speed : _Speed = value.ToLong(); break;
case __.LastKey : _LastKey = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP : _UpdateIP = Convert.ToString(value); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.Instance: _Instance = Convert.ToString(value); break;
case __.Client: _Client = Convert.ToString(value); break;
case __.Name: _Name = Convert.ToString(value); break;
case __.ProcessId: _ProcessId = value.ToInt(); break;
case __.Version: _Version = Convert.ToString(value); break;
case __.CompileTime: _CompileTime = value.ToDateTime(); break;
case __.Server: _Server = Convert.ToString(value); break;
case __.Tasks: _Tasks = value.ToInt(); break;
case __.Total: _Total = value.ToLong(); break;
case __.Success: _Success = value.ToLong(); break;
case __.Error: _Error = value.ToLong(); break;
case __.Cost: _Cost = value.ToLong(); break;
case __.Speed: _Speed = value.ToLong(); break;
case __.LastKey: _LastKey = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
@ -306,7 +306,7 @@ namespace AntJob.Data.Entity
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得应用在线字段名称的快捷方式</summary>

View File

@ -23,7 +23,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -31,7 +31,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private Int32 _JobID;
/// <summary>作业。生产消息的作业</summary>
@ -39,7 +39,7 @@ namespace AntJob.Data.Entity
[Description("作业。生产消息的作业")]
[DataObjectField(false, false, false, 0)]
[BindColumn("JobID", "作业。生产消息的作业", "")]
public Int32 JobID { get { return _JobID; } set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
public Int32 JobID { get => _JobID; set { if (OnPropertyChanging(__.JobID, value)) { _JobID = value; OnPropertyChanged(__.JobID); } } }
private String _Topic;
/// <summary>主题。区分作业下多种消息</summary>
@ -47,7 +47,7 @@ namespace AntJob.Data.Entity
[Description("主题。区分作业下多种消息")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Topic", "主题。区分作业下多种消息", "")]
public String Topic { get { return _Topic; } set { if (OnPropertyChanging(__.Topic, value)) { _Topic = value; OnPropertyChanged(__.Topic); } } }
public String Topic { get => _Topic; set { if (OnPropertyChanging(__.Topic, value)) { _Topic = value; OnPropertyChanged(__.Topic); } } }
private String _Data;
/// <summary>数据。可以是Json数据比如StatID</summary>
@ -55,7 +55,7 @@ namespace AntJob.Data.Entity
[Description("数据。可以是Json数据比如StatID")]
[DataObjectField(false, false, true, 2000)]
[BindColumn("Data", "数据。可以是Json数据比如StatID", "")]
public String Data { get { return _Data; } set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
public String Data { get => _Data; set { if (OnPropertyChanging(__.Data, value)) { _Data = value; OnPropertyChanged(__.Data); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -63,7 +63,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -71,7 +71,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
#endregion
#region /
@ -84,13 +84,13 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.JobID : return _JobID;
case __.Topic : return _Topic;
case __.Data : return _Data;
case __.CreateTime : return _CreateTime;
case __.UpdateTime : return _UpdateTime;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.JobID: return _JobID;
case __.Topic: return _Topic;
case __.Data: return _Data;
case __.CreateTime: return _CreateTime;
case __.UpdateTime: return _UpdateTime;
default: return base[name];
}
}
@ -98,13 +98,13 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.JobID : _JobID = value.ToInt(); break;
case __.Topic : _Topic = Convert.ToString(value); break;
case __.Data : _Data = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.JobID: _JobID = value.ToInt(); break;
case __.Topic: _Topic = Convert.ToString(value); break;
case __.Data: _Data = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
default: base[name] = value; break;
}
}
@ -136,7 +136,7 @@ namespace AntJob.Data.Entity
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得应用消息字段名称的快捷方式</summary>

View File

@ -22,7 +22,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private String _Name;
/// <summary>名称</summary>
@ -30,7 +30,7 @@ namespace AntJob.Data.Entity
[Description("名称")]
[DataObjectField(false, false, false, 50)]
[BindColumn("Name", "名称", "", Master = true)]
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
public String Name { get => _Name; set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
private String _DisplayName;
/// <summary>显示名</summary>
@ -38,7 +38,7 @@ namespace AntJob.Data.Entity
[Description("显示名")]
[DataObjectField(false, false, true, 50)]
[BindColumn("DisplayName", "显示名", "")]
public String DisplayName { get { return _DisplayName; } set { if (OnPropertyChanging(__.DisplayName, value)) { _DisplayName = value; OnPropertyChanged(__.DisplayName); } } }
public String DisplayName { get => _DisplayName; set { if (OnPropertyChanging(__.DisplayName, value)) { _DisplayName = value; OnPropertyChanged(__.DisplayName); } } }
private String _Secret;
/// <summary>密钥</summary>
@ -46,7 +46,7 @@ namespace AntJob.Data.Entity
[Description("密钥")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Secret", "密钥", "")]
public String Secret { get { return _Secret; } set { if (OnPropertyChanging(__.Secret, value)) { _Secret = value; OnPropertyChanged(__.Secret); } } }
public String Secret { get => _Secret; set { if (OnPropertyChanging(__.Secret, value)) { _Secret = value; OnPropertyChanged(__.Secret); } } }
private String _Category;
/// <summary>类别</summary>
@ -54,7 +54,7 @@ namespace AntJob.Data.Entity
[Description("类别")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Category", "类别", "")]
public String Category { get { return _Category; } set { if (OnPropertyChanging(__.Category, value)) { _Category = value; OnPropertyChanged(__.Category); } } }
public String Category { get => _Category; set { if (OnPropertyChanging(__.Category, value)) { _Category = value; OnPropertyChanged(__.Category); } } }
private String _Version;
/// <summary>版本</summary>
@ -62,7 +62,7 @@ namespace AntJob.Data.Entity
[Description("版本")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Version", "版本", "")]
public String Version { get { return _Version; } set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
public String Version { get => _Version; set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
private DateTime _CompileTime;
/// <summary>编译时间</summary>
@ -70,7 +70,7 @@ namespace AntJob.Data.Entity
[Description("编译时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CompileTime", "编译时间", "")]
public DateTime CompileTime { get { return _CompileTime; } set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
public DateTime CompileTime { get => _CompileTime; set { if (OnPropertyChanging(__.CompileTime, value)) { _CompileTime = value; OnPropertyChanged(__.CompileTime); } } }
private Boolean _Enable;
/// <summary>启用</summary>
@ -78,7 +78,7 @@ namespace AntJob.Data.Entity
[Description("启用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Enable", "启用", "")]
public Boolean Enable { get { return _Enable; } set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
public Boolean Enable { get => _Enable; set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
private Int32 _JobCount;
/// <summary>作业数</summary>
@ -86,7 +86,7 @@ namespace AntJob.Data.Entity
[Description("作业数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("JobCount", "作业数", "")]
public Int32 JobCount { get { return _JobCount; } set { if (OnPropertyChanging(__.JobCount, value)) { _JobCount = value; OnPropertyChanged(__.JobCount); } } }
public Int32 JobCount { get => _JobCount; set { if (OnPropertyChanging(__.JobCount, value)) { _JobCount = value; OnPropertyChanged(__.JobCount); } } }
private Int32 _MessageCount;
/// <summary>消息数</summary>
@ -94,7 +94,7 @@ namespace AntJob.Data.Entity
[Description("消息数")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MessageCount", "消息数", "")]
public Int32 MessageCount { get { return _MessageCount; } set { if (OnPropertyChanging(__.MessageCount, value)) { _MessageCount = value; OnPropertyChanged(__.MessageCount); } } }
public Int32 MessageCount { get => _MessageCount; set { if (OnPropertyChanging(__.MessageCount, value)) { _MessageCount = value; OnPropertyChanged(__.MessageCount); } } }
private String _Remark;
/// <summary>内容</summary>
@ -102,7 +102,7 @@ namespace AntJob.Data.Entity
[Description("内容")]
[DataObjectField(false, false, true, 500)]
[BindColumn("Remark", "内容", "")]
public String Remark { get { return _Remark; } set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
public String Remark { get => _Remark; set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
private Int32 _CreateUserID;
/// <summary>创建人</summary>
@ -110,7 +110,7 @@ namespace AntJob.Data.Entity
[Description("创建人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建人", "")]
public Int32 CreateUserID { get { return _CreateUserID; } set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private String _CreateUser;
/// <summary>创建者</summary>
@ -118,7 +118,7 @@ namespace AntJob.Data.Entity
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get { return _CreateUser; } set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -126,7 +126,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
@ -134,7 +134,7 @@ namespace AntJob.Data.Entity
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private Int32 _UpdateUserID;
/// <summary>更新人</summary>
@ -142,7 +142,7 @@ namespace AntJob.Data.Entity
[Description("更新人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新人", "")]
public Int32 UpdateUserID { get { return _UpdateUserID; } set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
@ -150,7 +150,7 @@ namespace AntJob.Data.Entity
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get { return _UpdateUser; } set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -158,7 +158,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
@ -166,7 +166,7 @@ namespace AntJob.Data.Entity
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get { return _UpdateIP; } set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
@ -179,25 +179,25 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.Name : return _Name;
case __.DisplayName : return _DisplayName;
case __.Secret : return _Secret;
case __.Category : return _Category;
case __.Version : return _Version;
case __.CompileTime : return _CompileTime;
case __.Enable : return _Enable;
case __.JobCount : return _JobCount;
case __.MessageCount : return _MessageCount;
case __.Remark : return _Remark;
case __.CreateUserID : return _CreateUserID;
case __.CreateUser : return _CreateUser;
case __.CreateTime : return _CreateTime;
case __.CreateIP : return _CreateIP;
case __.UpdateUserID : return _UpdateUserID;
case __.UpdateUser : return _UpdateUser;
case __.UpdateTime : return _UpdateTime;
case __.UpdateIP : return _UpdateIP;
case __.ID: return _ID;
case __.Name: return _Name;
case __.DisplayName: return _DisplayName;
case __.Secret: return _Secret;
case __.Category: return _Category;
case __.Version: return _Version;
case __.CompileTime: return _CompileTime;
case __.Enable: return _Enable;
case __.JobCount: return _JobCount;
case __.MessageCount: return _MessageCount;
case __.Remark: return _Remark;
case __.CreateUserID: return _CreateUserID;
case __.CreateUser: return _CreateUser;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateUser: return _UpdateUser;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
@ -205,25 +205,25 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.Name : _Name = Convert.ToString(value); break;
case __.DisplayName : _DisplayName = Convert.ToString(value); break;
case __.Secret : _Secret = Convert.ToString(value); break;
case __.Category : _Category = Convert.ToString(value); break;
case __.Version : _Version = Convert.ToString(value); break;
case __.CompileTime : _CompileTime = value.ToDateTime(); break;
case __.Enable : _Enable = value.ToBoolean(); break;
case __.JobCount : _JobCount = value.ToInt(); break;
case __.MessageCount : _MessageCount = value.ToInt(); break;
case __.Remark : _Remark = Convert.ToString(value); break;
case __.CreateUserID : _CreateUserID = value.ToInt(); break;
case __.CreateUser : _CreateUser = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID : _UpdateUserID = value.ToInt(); break;
case __.UpdateUser : _UpdateUser = Convert.ToString(value); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP : _UpdateIP = Convert.ToString(value); break;
case __.ID: _ID = value.ToInt(); break;
case __.Name: _Name = Convert.ToString(value); break;
case __.DisplayName: _DisplayName = Convert.ToString(value); break;
case __.Secret: _Secret = Convert.ToString(value); break;
case __.Category: _Category = Convert.ToString(value); break;
case __.Version: _Version = Convert.ToString(value); break;
case __.CompileTime: _CompileTime = value.ToDateTime(); break;
case __.Enable: _Enable = value.ToBoolean(); break;
case __.JobCount: _JobCount = value.ToInt(); break;
case __.MessageCount: _MessageCount = value.ToInt(); break;
case __.Remark: _Remark = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
@ -291,7 +291,7 @@ namespace AntJob.Data.Entity
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得应用系统字段名称的快捷方式</summary>

View File

@ -23,7 +23,7 @@ namespace AntJob.Data.Entity
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _AppID;
/// <summary>应用</summary>
@ -31,7 +31,7 @@ namespace AntJob.Data.Entity
[Description("应用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("AppID", "应用", "")]
public Int32 AppID { get { return _AppID; } set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
public Int32 AppID { get => _AppID; set { if (OnPropertyChanging(__.AppID, value)) { _AppID = value; OnPropertyChanged(__.AppID); } } }
private String _Name;
/// <summary>名称</summary>
@ -39,7 +39,7 @@ namespace AntJob.Data.Entity
[Description("名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("Name", "名称", "", Master = true)]
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
public String Name { get => _Name; set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
private String _Content;
/// <summary>内容。一般是json格式</summary>
@ -47,7 +47,7 @@ namespace AntJob.Data.Entity
[Description("内容。一般是json格式")]
[DataObjectField(false, false, true, 5000)]
[BindColumn("Content", "内容。一般是json格式", "")]
public String Content { get { return _Content; } set { if (OnPropertyChanging(__.Content, value)) { _Content = value; OnPropertyChanged(__.Content); } } }
public String Content { get => _Content; set { if (OnPropertyChanging(__.Content, value)) { _Content = value; OnPropertyChanged(__.Content); } } }
private Int32 _CreateUserID;
/// <summary>创建人</summary>
@ -55,7 +55,7 @@ namespace AntJob.Data.Entity
[Description("创建人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建人", "")]
public Int32 CreateUserID { get { return _CreateUserID; } set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
@ -63,7 +63,7 @@ namespace AntJob.Data.Entity
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
@ -71,7 +71,7 @@ namespace AntJob.Data.Entity
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private Int32 _UpdateUserID;
/// <summary>更新人</summary>
@ -79,7 +79,7 @@ namespace AntJob.Data.Entity
[Description("更新人")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新人", "")]
public Int32 UpdateUserID { get { return _UpdateUserID; } set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
@ -87,7 +87,7 @@ namespace AntJob.Data.Entity
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
@ -95,7 +95,7 @@ namespace AntJob.Data.Entity
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get { return _UpdateIP; } set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
@ -108,16 +108,16 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : return _ID;
case __.AppID : return _AppID;
case __.Name : return _Name;
case __.Content : return _Content;
case __.CreateUserID : return _CreateUserID;
case __.CreateTime : return _CreateTime;
case __.CreateIP : return _CreateIP;
case __.UpdateUserID : return _UpdateUserID;
case __.UpdateTime : return _UpdateTime;
case __.UpdateIP : return _UpdateIP;
case __.ID: return _ID;
case __.AppID: return _AppID;
case __.Name: return _Name;
case __.Content: return _Content;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
@ -125,16 +125,16 @@ namespace AntJob.Data.Entity
{
switch (name)
{
case __.ID : _ID = value.ToInt(); break;
case __.AppID : _AppID = value.ToInt(); break;
case __.Name : _Name = Convert.ToString(value); break;
case __.Content : _Content = Convert.ToString(value); break;
case __.CreateUserID : _CreateUserID = value.ToInt(); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID : _UpdateUserID = value.ToInt(); break;
case __.UpdateTime : _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP : _UpdateIP = Convert.ToString(value); break;
case __.ID: _ID = value.ToInt(); break;
case __.AppID: _AppID = value.ToInt(); break;
case __.Name: _Name = Convert.ToString(value); break;
case __.Content: _Content = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
@ -175,7 +175,7 @@ namespace AntJob.Data.Entity
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得应用配置字段名称的快捷方式</summary>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Tables Version="9.14.7315.27316" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" Output="Entity" NameSpace="AntJob.Data.Entity" ConnName="Ant" BaseClass="EntityBase" ChineseFileName="True" IgnoreNameCase="True" xmlns="http://www.newlifex.com/Model2020.xsd">
<Tables Version="9.16.7398.1902" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" Output="Entity" NameSpace="AntJob.Data.Entity" ConnName="Ant" BaseClass="EntityBase" ChineseFileName="True" IgnoreNameCase="True" xmlns="http://www.newlifex.com/Model2020.xsd">
<Table Name="App" Description="应用系统。数据作业隶属于某个应用">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />

BIN
DLL/NewLife.Core.dll Normal file

Binary file not shown.

BIN
DLL/XCode.dll Normal file

Binary file not shown.

18
Samples/HisData/Build.tt Normal file
View File

@ -0,0 +1,18 @@
<#@ template language="C#" hostSpecific="true" debug="true" #>
<#@ assembly name="netstandard" #>
<#@ assembly name="$(ProjectDir)\..\..\DLL\NewLife.Core.dll" #>
<#@ assembly name="$(ProjectDir)\..\..\DLL\XCode.dll" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="XCode.Code" #>
<#@ output extension=".log" #>
<#
// 设置当前工作目录
PathHelper.BasePath = Host.ResolvePath(".");
// 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名、中文文件名、表名字段名大小写
//EntityBuilder.Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true,Boolean? nameIgnoreCase = null);
EntityBuilder.Build();
//var tables = DAL.ImportFrom("Company.Project.xml");
//EntityBuilder.Build(tables);
#>

View File

@ -0,0 +1,188 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml.Serialization;
using NewLife;
using NewLife.Data;
using NewLife.Log;
using NewLife.Model;
using NewLife.Reflection;
using NewLife.Threading;
using NewLife.Web;
using XCode;
using XCode.Cache;
using XCode.Configuration;
using XCode.DataAccessLayer;
using XCode.Membership;
namespace HisData
{
/// <summary>收费字典</summary>
public partial class ZDSF : Entity<ZDSF>
{
#region
static ZDSF()
{
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
//var df = Meta.Factory.AdditionalFields;
//df.Add(__.Mzyflb);
// 过滤器 UserModule、TimeModule、IPModule
Meta.Modules.Add<UserModule>();
Meta.Modules.Add<TimeModule>();
Meta.Modules.Add<IPModule>();
// 单对象缓存
var sc = Meta.SingleCache;
sc.FindSlaveKeyMethod = k => Find(__.BM, k);
sc.GetSlaveKeyMethod = e => e.BM;
}
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
/// <param name="isNew">是否插入</param>
public override void Valid(Boolean isNew)
{
// 如果没有脏数据,则不需要进行任何处理
if (!HasDirty) return;
// 这里验证参数范围,建议抛出参数异常,指定参数名,前端用户界面可以捕获参数异常并聚焦到对应的参数输入框
if (BM.IsNullOrEmpty()) throw new ArgumentNullException(nameof(BM), "编码不能为空!");
// 在新插入数据或者修改了指定字段时进行修正
// 货币保留6位小数
DJ = Math.Round(DJ, 6);
// 处理当前已登录用户信息可以由UserModule过滤器代劳
/*var user = ManageProvider.User;
if (user != null)
{
if (isNew && !Dirtys[nameof(CreateUserID)]) CreateUserID = user.ID;
if (!Dirtys[nameof(UpdateUserID)]) UpdateUserID = user.ID;
}*/
//if (isNew && !Dirtys[nameof(CreateTime)]) CreateTime = DateTime.Now;
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
//if (isNew && !Dirtys[nameof(CreateIP)]) CreateIP = ManageProvider.UserHost;
//if (!Dirtys[nameof(UpdateIP)]) UpdateIP = ManageProvider.UserHost;
// 检查唯一索引
// CheckExist(isNew, __.BM);
}
///// <summary>首次连接数据库时初始化数据,仅用于实体类重载,用户不应该调用该方法</summary>
//[EditorBrowsable(EditorBrowsableState.Never)]
//protected override void InitData()
//{
// // InitData一般用于当数据表没有数据时添加一些默认数据该实体类的任何第一次数据库操作都会触发该方法默认异步调用
// if (Meta.Session.Count > 0) return;
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ZDSF[收费字典]数据……");
// var entity = new ZDSF();
// entity.ID = 0;
// entity.BM = "abc";
// entity.DH = "abc";
// entity.MC = "abc";
// entity.DJ = 0.0;
// entity.DW = "abc";
// entity.Mzyflb = 0;
// entity.Zyfylb = 0;
// entity.CreateUser = "abc";
// entity.CreateUserID = 0;
// entity.CreateTime = DateTime.Now;
// entity.CreateIP = "abc";
// entity.UpdateUser = "abc";
// entity.UpdateUserID = 0;
// entity.UpdateTime = DateTime.Now;
// entity.UpdateIP = "abc";
// entity.Insert();
// if (XTrace.Debug) XTrace.WriteLine("完成初始化ZDSF[收费字典]数据!");
//}
///// <summary>已重载。基类先调用Valid(true)验证数据然后在事务保护内调用OnInsert</summary>
///// <returns></returns>
//public override Int32 Insert()
//{
// return base.Insert();
//}
///// <summary>已重载。在事务保护范围内处理业务位于Valid之后</summary>
///// <returns></returns>
//protected override Int32 OnDelete()
//{
// return base.OnDelete();
//}
#endregion
#region
#endregion
#region
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static ZDSF FindByID(Int32 id)
{
if (id <= 0) return null;
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.ID == id);
// 单对象缓存
return Meta.SingleCache[id];
//return Find(_.ID == id);
}
/// <summary>根据编码查找</summary>
/// <param name="bm">编码</param>
/// <returns>实体对象</returns>
public static ZDSF FindByBM(String bm)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.BM == bm);
// 单对象缓存
//return Meta.SingleCache.GetItemWithSlaveKey(bm) as ZDSF;
return Find(_.BM == bm);
}
#endregion
#region
/// <summary>高级查询</summary>
/// <param name="bm">编码</param>
/// <param name="key">关键字</param>
/// <param name="page">分页参数信息。可携带统计和数据权限扩展查询等信息</param>
/// <returns>实体列表</returns>
public static IList<ZDSF> Search(String bm, String key, PageParameter page)
{
var exp = new WhereExpression();
if (!bm.IsNullOrEmpty()) exp &= _.BM == bm;
if (!key.IsNullOrEmpty()) exp &= _.DH.Contains(key) | _.MC.Contains(key) | _.DW.Contains(key) | _.CreateUser.Contains(key) | _.CreateIP.Contains(key) | _.UpdateUser.Contains(key) | _.UpdateIP.Contains(key);
return FindAll(exp, page);
}
// Select Count(ID) as ID,Category From ZDSF Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
//static readonly FieldCache<ZDSF> _CategoryCache = new FieldCache<ZDSF>(_.Category)
//{
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
//};
///// <summary>获取类别列表字段缓存10分钟分组统计数据最多的前20种用于魔方前台下拉选择</summary>
///// <returns></returns>
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
#endregion
#region
#endregion
}
}

View File

@ -0,0 +1,391 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
namespace HisData
{
/// <summary>收费字典</summary>
[Serializable]
[DataObject]
[Description("收费字典")]
[BindIndex("IU_ZDSF_BM", true, "BM")]
[BindTable("ZDSF", Description = "收费字典", ConnName = "His", DbType = DatabaseType.None)]
public partial class ZDSF : IZDSF
{
#region
private Int32 _ID;
/// <summary>编号</summary>
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private String _BM;
/// <summary>编码</summary>
[DisplayName("编码")]
[Description("编码")]
[DataObjectField(false, false, false, 50)]
[BindColumn("BM", "编码", "", Master = true)]
public String BM { get => _BM; set { if (OnPropertyChanging(__.BM, value)) { _BM = value; OnPropertyChanged(__.BM); } } }
private String _DH;
/// <summary>拼音码</summary>
[DisplayName("拼音码")]
[Description("拼音码")]
[DataObjectField(false, false, true, 50)]
[BindColumn("DH", "拼音码", "")]
public String DH { get => _DH; set { if (OnPropertyChanging(__.DH, value)) { _DH = value; OnPropertyChanged(__.DH); } } }
private String _MC;
/// <summary>名称</summary>
[DisplayName("名称")]
[Description("名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("MC", "名称", "")]
public String MC { get => _MC; set { if (OnPropertyChanging(__.MC, value)) { _MC = value; OnPropertyChanged(__.MC); } } }
private Decimal _DJ;
/// <summary>单价</summary>
[DisplayName("单价")]
[Description("单价")]
[DataObjectField(false, false, false, 0)]
[BindColumn("DJ", "单价", "")]
public Decimal DJ { get => _DJ; set { if (OnPropertyChanging(__.DJ, value)) { _DJ = value; OnPropertyChanged(__.DJ); } } }
private String _DW;
/// <summary>单位</summary>
[DisplayName("单位")]
[Description("单位")]
[DataObjectField(false, false, true, 50)]
[BindColumn("DW", "单位", "")]
public String DW { get => _DW; set { if (OnPropertyChanging(__.DW, value)) { _DW = value; OnPropertyChanged(__.DW); } } }
private Int32 _Mzyflb;
/// <summary>门诊费用类别</summary>
[DisplayName("门诊费用类别")]
[Description("门诊费用类别")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MZYFLB", "门诊费用类别", "")]
public Int32 Mzyflb { get => _Mzyflb; set { if (OnPropertyChanging(__.Mzyflb, value)) { _Mzyflb = value; OnPropertyChanged(__.Mzyflb); } } }
private Int32 _Zyfylb;
/// <summary>住院费用类别</summary>
[DisplayName("住院费用类别")]
[Description("住院费用类别")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ZYFYLB", "住院费用类别", "")]
public Int32 Zyfylb { get => _Zyfylb; set { if (OnPropertyChanging(__.Zyfylb, value)) { _Zyfylb = value; OnPropertyChanged(__.Zyfylb); } } }
private Double _Zfbl;
/// <summary>自费比例</summary>
[DisplayName("自费比例")]
[Description("自费比例")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ZFBL", "自费比例", "")]
public Double Zfbl { get => _Zfbl; set { if (OnPropertyChanging(__.Zfbl, value)) { _Zfbl = value; OnPropertyChanged(__.Zfbl); } } }
private String _CreateUser;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private Int32 _CreateUserID;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建者", "")]
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
[DisplayName("创建时间")]
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
[DisplayName("创建地址")]
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private Int32 _UpdateUserID;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新者", "")]
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
[DisplayName("更新时间")]
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
[DisplayName("更新地址")]
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
public override Object this[String name]
{
get
{
switch (name)
{
case __.ID: return _ID;
case __.BM: return _BM;
case __.DH: return _DH;
case __.MC: return _MC;
case __.DJ: return _DJ;
case __.DW: return _DW;
case __.Mzyflb: return _Mzyflb;
case __.Zyfylb: return _Zyfylb;
case __.Zfbl: return _Zfbl;
case __.CreateUser: return _CreateUser;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUser: return _UpdateUser;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
set
{
switch (name)
{
case __.ID: _ID = value.ToInt(); break;
case __.BM: _BM = Convert.ToString(value); break;
case __.DH: _DH = Convert.ToString(value); break;
case __.MC: _MC = Convert.ToString(value); break;
case __.DJ: _DJ = Convert.ToDecimal(value); break;
case __.DW: _DW = Convert.ToString(value); break;
case __.Mzyflb: _Mzyflb = value.ToInt(); break;
case __.Zyfylb: _Zyfylb = value.ToInt(); break;
case __.Zfbl: _Zfbl = value.ToDouble(); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region
/// <summary>取得收费字典字段信息的快捷方式</summary>
public partial class _
{
/// <summary>编号</summary>
public static readonly Field ID = FindByName(__.ID);
/// <summary>编码</summary>
public static readonly Field BM = FindByName(__.BM);
/// <summary>拼音码</summary>
public static readonly Field DH = FindByName(__.DH);
/// <summary>名称</summary>
public static readonly Field MC = FindByName(__.MC);
/// <summary>单价</summary>
public static readonly Field DJ = FindByName(__.DJ);
/// <summary>单位</summary>
public static readonly Field DW = FindByName(__.DW);
/// <summary>门诊费用类别</summary>
public static readonly Field Mzyflb = FindByName(__.Mzyflb);
/// <summary>住院费用类别</summary>
public static readonly Field Zyfylb = FindByName(__.Zyfylb);
/// <summary>自费比例</summary>
public static readonly Field Zfbl = FindByName(__.Zfbl);
/// <summary>创建者</summary>
public static readonly Field CreateUser = FindByName(__.CreateUser);
/// <summary>创建者</summary>
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
/// <summary>创建时间</summary>
public static readonly Field CreateTime = FindByName(__.CreateTime);
/// <summary>创建地址</summary>
public static readonly Field CreateIP = FindByName(__.CreateIP);
/// <summary>更新者</summary>
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
/// <summary>更新者</summary>
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得收费字典字段名称的快捷方式</summary>
public partial class __
{
/// <summary>编号</summary>
public const String ID = "ID";
/// <summary>编码</summary>
public const String BM = "BM";
/// <summary>拼音码</summary>
public const String DH = "DH";
/// <summary>名称</summary>
public const String MC = "MC";
/// <summary>单价</summary>
public const String DJ = "DJ";
/// <summary>单位</summary>
public const String DW = "DW";
/// <summary>门诊费用类别</summary>
public const String Mzyflb = "Mzyflb";
/// <summary>住院费用类别</summary>
public const String Zyfylb = "Zyfylb";
/// <summary>自费比例</summary>
public const String Zfbl = "Zfbl";
/// <summary>创建者</summary>
public const String CreateUser = "CreateUser";
/// <summary>创建者</summary>
public const String CreateUserID = "CreateUserID";
/// <summary>创建时间</summary>
public const String CreateTime = "CreateTime";
/// <summary>创建地址</summary>
public const String CreateIP = "CreateIP";
/// <summary>更新者</summary>
public const String UpdateUser = "UpdateUser";
/// <summary>更新者</summary>
public const String UpdateUserID = "UpdateUserID";
/// <summary>更新时间</summary>
public const String UpdateTime = "UpdateTime";
/// <summary>更新地址</summary>
public const String UpdateIP = "UpdateIP";
}
#endregion
}
/// <summary>收费字典接口</summary>
public partial interface IZDSF
{
#region
/// <summary>编号</summary>
Int32 ID { get; set; }
/// <summary>编码</summary>
String BM { get; set; }
/// <summary>拼音码</summary>
String DH { get; set; }
/// <summary>名称</summary>
String MC { get; set; }
/// <summary>单价</summary>
Decimal DJ { get; set; }
/// <summary>单位</summary>
String DW { get; set; }
/// <summary>门诊费用类别</summary>
Int32 Mzyflb { get; set; }
/// <summary>住院费用类别</summary>
Int32 Zyfylb { get; set; }
/// <summary>自费比例</summary>
Double Zfbl { get; set; }
/// <summary>创建者</summary>
String CreateUser { get; set; }
/// <summary>创建者</summary>
Int32 CreateUserID { get; set; }
/// <summary>创建时间</summary>
DateTime CreateTime { get; set; }
/// <summary>创建地址</summary>
String CreateIP { get; set; }
/// <summary>更新者</summary>
String UpdateUser { get; set; }
/// <summary>更新者</summary>
Int32 UpdateUserID { get; set; }
/// <summary>更新时间</summary>
DateTime UpdateTime { get; set; }
/// <summary>更新地址</summary>
String UpdateIP { get; set; }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
Object this[String name] { get; set; }
#endregion
}
}

View File

@ -0,0 +1,188 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml.Serialization;
using NewLife;
using NewLife.Data;
using NewLife.Log;
using NewLife.Model;
using NewLife.Reflection;
using NewLife.Threading;
using NewLife.Web;
using XCode;
using XCode.Cache;
using XCode.Configuration;
using XCode.DataAccessLayer;
using XCode.Membership;
namespace HisData
{
/// <summary>病人医嘱信息</summary>
public partial class ZYBHYZ0 : Entity<ZYBHYZ0>
{
#region
static ZYBHYZ0()
{
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
//var df = Meta.Factory.AdditionalFields;
//df.Add(__.Bhid);
// 过滤器 UserModule、TimeModule、IPModule
Meta.Modules.Add<UserModule>();
Meta.Modules.Add<TimeModule>();
Meta.Modules.Add<IPModule>();
}
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
/// <param name="isNew">是否插入</param>
public override void Valid(Boolean isNew)
{
// 如果没有脏数据,则不需要进行任何处理
if (!HasDirty) return;
// 在新插入数据或者修改了指定字段时进行修正
// 处理当前已登录用户信息可以由UserModule过滤器代劳
/*var user = ManageProvider.User;
if (user != null)
{
if (isNew && !Dirtys[nameof(CreateUserID)]) CreateUserID = user.ID;
if (!Dirtys[nameof(UpdateUserID)]) UpdateUserID = user.ID;
}*/
//if (isNew && !Dirtys[nameof(CreateTime)]) CreateTime = DateTime.Now;
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
//if (isNew && !Dirtys[nameof(CreateIP)]) CreateIP = ManageProvider.UserHost;
//if (!Dirtys[nameof(UpdateIP)]) UpdateIP = ManageProvider.UserHost;
// 检查唯一索引
// CheckExist(isNew, __.Bhid, __.Mgroupid);
}
///// <summary>首次连接数据库时初始化数据,仅用于实体类重载,用户不应该调用该方法</summary>
//[EditorBrowsable(EditorBrowsableState.Never)]
//protected override void InitData()
//{
// // InitData一般用于当数据表没有数据时添加一些默认数据该实体类的任何第一次数据库操作都会触发该方法默认异步调用
// if (Meta.Session.Count > 0) return;
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ZYBHYZ0[病人医嘱信息]数据……");
// var entity = new ZYBHYZ0();
// entity.ID = 0;
// entity.Bhid = 0;
// entity.Mgroupid = 0;
// entity.Kyzrq = 0;
// entity.Tyzrq = 0;
// entity.Kyzys = "abc";
// entity.State = 0;
// entity.CreateUser = "abc";
// entity.CreateUserID = 0;
// entity.CreateTime = DateTime.Now;
// entity.CreateIP = "abc";
// entity.UpdateUser = "abc";
// entity.UpdateUserID = 0;
// entity.UpdateTime = DateTime.Now;
// entity.UpdateIP = "abc";
// entity.Insert();
// if (XTrace.Debug) XTrace.WriteLine("完成初始化ZYBHYZ0[病人医嘱信息]数据!");
//}
///// <summary>已重载。基类先调用Valid(true)验证数据然后在事务保护内调用OnInsert</summary>
///// <returns></returns>
//public override Int32 Insert()
//{
// return base.Insert();
//}
///// <summary>已重载。在事务保护范围内处理业务位于Valid之后</summary>
///// <returns></returns>
//protected override Int32 OnDelete()
//{
// return base.OnDelete();
//}
#endregion
#region
#endregion
#region
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static ZYBHYZ0 FindByID(Int32 id)
{
if (id <= 0) return null;
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.ID == id);
// 单对象缓存
return Meta.SingleCache[id];
//return Find(_.ID == id);
}
/// <summary>根据病人ID、医嘱组号查找</summary>
/// <param name="bhid">病人ID</param>
/// <param name="mgroupid">医嘱组号</param>
/// <returns>实体对象</returns>
public static ZYBHYZ0 FindByBhidAndMgroupid(Int32 bhid, Int32 mgroupid)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.Bhid == bhid && e.Mgroupid == mgroupid);
return Find(_.Bhid == bhid & _.Mgroupid == mgroupid);
}
/// <summary>根据病人ID查找</summary>
/// <param name="bhid">病人ID</param>
/// <returns>实体列表</returns>
public static IList<ZYBHYZ0> FindAllByBhid(Int32 bhid)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.Bhid == bhid);
return FindAll(_.Bhid == bhid);
}
#endregion
#region
/// <summary>高级查询</summary>
/// <param name="bhid">病人ID</param>
/// <param name="mgroupid">医嘱组号</param>
/// <param name="key">关键字</param>
/// <param name="page">分页参数信息。可携带统计和数据权限扩展查询等信息</param>
/// <returns>实体列表</returns>
public static IList<ZYBHYZ0> Search(Int32 bhid, Int32 mgroupid, String key, PageParameter page)
{
var exp = new WhereExpression();
if (bhid >= 0) exp &= _.Bhid == bhid;
if (mgroupid >= 0) exp &= _.Mgroupid == mgroupid;
if (!key.IsNullOrEmpty()) exp &= _.Kyzys.Contains(key) | _.CreateUser.Contains(key) | _.CreateIP.Contains(key) | _.UpdateUser.Contains(key) | _.UpdateIP.Contains(key);
return FindAll(exp, page);
}
// Select Count(ID) as ID,Category From ZYBHYZ0 Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
//static readonly FieldCache<ZYBHYZ0> _CategoryCache = new FieldCache<ZYBHYZ0>(_.Category)
//{
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
//};
///// <summary>获取类别列表字段缓存10分钟分组统计数据最多的前20种用于魔方前台下拉选择</summary>
///// <returns></returns>
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
#endregion
#region
#endregion
}
}

View File

@ -0,0 +1,354 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
namespace HisData
{
/// <summary>病人医嘱信息</summary>
[Serializable]
[DataObject]
[Description("病人医嘱信息")]
[BindIndex("IU_ZYBHYZ0_BHID_MGROUPID", true, "BHID,MGROUPID")]
[BindIndex("IX_ZYBHYZ0_BHID", false, "BHID")]
[BindTable("ZYBHYZ0", Description = "病人医嘱信息", ConnName = "His", DbType = DatabaseType.None)]
public partial class ZYBHYZ0 : IZYBHYZ0
{
#region
private Int32 _ID;
/// <summary>编号</summary>
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _Bhid;
/// <summary>病人ID</summary>
[DisplayName("病人ID")]
[Description("病人ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BHID", "病人ID", "")]
public Int32 Bhid { get => _Bhid; set { if (OnPropertyChanging(__.Bhid, value)) { _Bhid = value; OnPropertyChanged(__.Bhid); } } }
private Int32 _Mgroupid;
/// <summary>医嘱组号</summary>
[DisplayName("医嘱组号")]
[Description("医嘱组号")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MGROUPID", "医嘱组号", "", Master = true)]
public Int32 Mgroupid { get => _Mgroupid; set { if (OnPropertyChanging(__.Mgroupid, value)) { _Mgroupid = value; OnPropertyChanged(__.Mgroupid); } } }
private Int32 _Kyzrq;
/// <summary>开医嘱日期</summary>
[DisplayName("开医嘱日期")]
[Description("开医嘱日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("KYZRQ", "开医嘱日期", "")]
public Int32 Kyzrq { get => _Kyzrq; set { if (OnPropertyChanging(__.Kyzrq, value)) { _Kyzrq = value; OnPropertyChanged(__.Kyzrq); } } }
private Int32 _Tyzrq;
/// <summary>停医嘱日期</summary>
[DisplayName("停医嘱日期")]
[Description("停医嘱日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("TYZRQ", "停医嘱日期", "")]
public Int32 Tyzrq { get => _Tyzrq; set { if (OnPropertyChanging(__.Tyzrq, value)) { _Tyzrq = value; OnPropertyChanged(__.Tyzrq); } } }
private String _Kyzys;
/// <summary>开医嘱医生</summary>
[DisplayName("开医嘱医生")]
[Description("开医嘱医生")]
[DataObjectField(false, false, true, 50)]
[BindColumn("KYZYS", "开医嘱医生", "")]
public String Kyzys { get => _Kyzys; set { if (OnPropertyChanging(__.Kyzys, value)) { _Kyzys = value; OnPropertyChanged(__.Kyzys); } } }
private Int32 _State;
/// <summary>状态</summary>
[DisplayName("状态")]
[Description("状态")]
[DataObjectField(false, false, false, 0)]
[BindColumn("STATE", "状态", "")]
public Int32 State { get => _State; set { if (OnPropertyChanging(__.State, value)) { _State = value; OnPropertyChanged(__.State); } } }
private String _CreateUser;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private Int32 _CreateUserID;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建者", "")]
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
[DisplayName("创建时间")]
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
[DisplayName("创建地址")]
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private Int32 _UpdateUserID;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新者", "")]
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
[DisplayName("更新时间")]
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
[DisplayName("更新地址")]
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
public override Object this[String name]
{
get
{
switch (name)
{
case __.ID: return _ID;
case __.Bhid: return _Bhid;
case __.Mgroupid: return _Mgroupid;
case __.Kyzrq: return _Kyzrq;
case __.Tyzrq: return _Tyzrq;
case __.Kyzys: return _Kyzys;
case __.State: return _State;
case __.CreateUser: return _CreateUser;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUser: return _UpdateUser;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
set
{
switch (name)
{
case __.ID: _ID = value.ToInt(); break;
case __.Bhid: _Bhid = value.ToInt(); break;
case __.Mgroupid: _Mgroupid = value.ToInt(); break;
case __.Kyzrq: _Kyzrq = value.ToInt(); break;
case __.Tyzrq: _Tyzrq = value.ToInt(); break;
case __.Kyzys: _Kyzys = Convert.ToString(value); break;
case __.State: _State = value.ToInt(); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region
/// <summary>取得病人医嘱信息字段信息的快捷方式</summary>
public partial class _
{
/// <summary>编号</summary>
public static readonly Field ID = FindByName(__.ID);
/// <summary>病人ID</summary>
public static readonly Field Bhid = FindByName(__.Bhid);
/// <summary>医嘱组号</summary>
public static readonly Field Mgroupid = FindByName(__.Mgroupid);
/// <summary>开医嘱日期</summary>
public static readonly Field Kyzrq = FindByName(__.Kyzrq);
/// <summary>停医嘱日期</summary>
public static readonly Field Tyzrq = FindByName(__.Tyzrq);
/// <summary>开医嘱医生</summary>
public static readonly Field Kyzys = FindByName(__.Kyzys);
/// <summary>状态</summary>
public static readonly Field State = FindByName(__.State);
/// <summary>创建者</summary>
public static readonly Field CreateUser = FindByName(__.CreateUser);
/// <summary>创建者</summary>
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
/// <summary>创建时间</summary>
public static readonly Field CreateTime = FindByName(__.CreateTime);
/// <summary>创建地址</summary>
public static readonly Field CreateIP = FindByName(__.CreateIP);
/// <summary>更新者</summary>
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
/// <summary>更新者</summary>
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得病人医嘱信息字段名称的快捷方式</summary>
public partial class __
{
/// <summary>编号</summary>
public const String ID = "ID";
/// <summary>病人ID</summary>
public const String Bhid = "Bhid";
/// <summary>医嘱组号</summary>
public const String Mgroupid = "Mgroupid";
/// <summary>开医嘱日期</summary>
public const String Kyzrq = "Kyzrq";
/// <summary>停医嘱日期</summary>
public const String Tyzrq = "Tyzrq";
/// <summary>开医嘱医生</summary>
public const String Kyzys = "Kyzys";
/// <summary>状态</summary>
public const String State = "State";
/// <summary>创建者</summary>
public const String CreateUser = "CreateUser";
/// <summary>创建者</summary>
public const String CreateUserID = "CreateUserID";
/// <summary>创建时间</summary>
public const String CreateTime = "CreateTime";
/// <summary>创建地址</summary>
public const String CreateIP = "CreateIP";
/// <summary>更新者</summary>
public const String UpdateUser = "UpdateUser";
/// <summary>更新者</summary>
public const String UpdateUserID = "UpdateUserID";
/// <summary>更新时间</summary>
public const String UpdateTime = "UpdateTime";
/// <summary>更新地址</summary>
public const String UpdateIP = "UpdateIP";
}
#endregion
}
/// <summary>病人医嘱信息接口</summary>
public partial interface IZYBHYZ0
{
#region
/// <summary>编号</summary>
Int32 ID { get; set; }
/// <summary>病人ID</summary>
Int32 Bhid { get; set; }
/// <summary>医嘱组号</summary>
Int32 Mgroupid { get; set; }
/// <summary>开医嘱日期</summary>
Int32 Kyzrq { get; set; }
/// <summary>停医嘱日期</summary>
Int32 Tyzrq { get; set; }
/// <summary>开医嘱医生</summary>
String Kyzys { get; set; }
/// <summary>状态</summary>
Int32 State { get; set; }
/// <summary>创建者</summary>
String CreateUser { get; set; }
/// <summary>创建者</summary>
Int32 CreateUserID { get; set; }
/// <summary>创建时间</summary>
DateTime CreateTime { get; set; }
/// <summary>创建地址</summary>
String CreateIP { get; set; }
/// <summary>更新者</summary>
String UpdateUser { get; set; }
/// <summary>更新者</summary>
Int32 UpdateUserID { get; set; }
/// <summary>更新时间</summary>
DateTime UpdateTime { get; set; }
/// <summary>更新地址</summary>
String UpdateIP { get; set; }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
Object this[String name] { get; set; }
#endregion
}
}

View File

@ -0,0 +1,193 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml.Serialization;
using NewLife;
using NewLife.Data;
using NewLife.Log;
using NewLife.Model;
using NewLife.Reflection;
using NewLife.Threading;
using NewLife.Web;
using XCode;
using XCode.Cache;
using XCode.Configuration;
using XCode.DataAccessLayer;
using XCode.Membership;
namespace HisData
{
/// <summary>病人医嘱明细信息</summary>
public partial class ZYBHYZ1 : Entity<ZYBHYZ1>
{
#region
static ZYBHYZ1()
{
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
//var df = Meta.Factory.AdditionalFields;
//df.Add(__.Dgroupid);
// 过滤器 UserModule、TimeModule、IPModule
Meta.Modules.Add<UserModule>();
Meta.Modules.Add<TimeModule>();
Meta.Modules.Add<IPModule>();
}
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
/// <param name="isNew">是否插入</param>
public override void Valid(Boolean isNew)
{
// 如果没有脏数据,则不需要进行任何处理
if (!HasDirty) return;
// 在新插入数据或者修改了指定字段时进行修正
// 货币保留6位小数
DJ = Math.Round(DJ, 6);
SL = Math.Round(SL, 6);
FY = Math.Round(FY, 6);
// 处理当前已登录用户信息可以由UserModule过滤器代劳
/*var user = ManageProvider.User;
if (user != null)
{
if (isNew && !Dirtys[nameof(CreateUserID)]) CreateUserID = user.ID;
if (!Dirtys[nameof(UpdateUserID)]) UpdateUserID = user.ID;
}*/
//if (isNew && !Dirtys[nameof(CreateTime)]) CreateTime = DateTime.Now;
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
//if (isNew && !Dirtys[nameof(CreateIP)]) CreateIP = ManageProvider.UserHost;
//if (!Dirtys[nameof(UpdateIP)]) UpdateIP = ManageProvider.UserHost;
// 检查唯一索引
// CheckExist(isNew, __.Dgroupid, __.Yzbm);
}
///// <summary>首次连接数据库时初始化数据,仅用于实体类重载,用户不应该调用该方法</summary>
//[EditorBrowsable(EditorBrowsableState.Never)]
//protected override void InitData()
//{
// // InitData一般用于当数据表没有数据时添加一些默认数据该实体类的任何第一次数据库操作都会触发该方法默认异步调用
// if (Meta.Session.Count > 0) return;
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ZYBHYZ1[病人医嘱明细信息]数据……");
// var entity = new ZYBHYZ1();
// entity.ID = 0;
// entity.Dgroupid = 0;
// entity.Yzbm = "abc";
// entity.Yzmc = "abc";
// entity.DJ = 0.0;
// entity.SL = 0.0;
// entity.FY = 0.0;
// entity.State = 0;
// entity.CreateUser = "abc";
// entity.CreateUserID = 0;
// entity.CreateTime = DateTime.Now;
// entity.CreateIP = "abc";
// entity.UpdateUser = "abc";
// entity.UpdateUserID = 0;
// entity.UpdateTime = DateTime.Now;
// entity.UpdateIP = "abc";
// entity.Insert();
// if (XTrace.Debug) XTrace.WriteLine("完成初始化ZYBHYZ1[病人医嘱明细信息]数据!");
//}
///// <summary>已重载。基类先调用Valid(true)验证数据然后在事务保护内调用OnInsert</summary>
///// <returns></returns>
//public override Int32 Insert()
//{
// return base.Insert();
//}
///// <summary>已重载。在事务保护范围内处理业务位于Valid之后</summary>
///// <returns></returns>
//protected override Int32 OnDelete()
//{
// return base.OnDelete();
//}
#endregion
#region
#endregion
#region
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static ZYBHYZ1 FindByID(Int32 id)
{
if (id <= 0) return null;
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.ID == id);
// 单对象缓存
return Meta.SingleCache[id];
//return Find(_.ID == id);
}
/// <summary>根据医嘱组号、医嘱编码查找</summary>
/// <param name="dgroupid">医嘱组号</param>
/// <param name="yzbm">医嘱编码</param>
/// <returns>实体对象</returns>
public static ZYBHYZ1 FindByDgroupidAndYzbm(Int32 dgroupid, String yzbm)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.Dgroupid == dgroupid && e.Yzbm == yzbm);
return Find(_.Dgroupid == dgroupid & _.Yzbm == yzbm);
}
/// <summary>根据医嘱组号查找</summary>
/// <param name="dgroupid">医嘱组号</param>
/// <returns>实体列表</returns>
public static IList<ZYBHYZ1> FindAllByDgroupid(Int32 dgroupid)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.Dgroupid == dgroupid);
return FindAll(_.Dgroupid == dgroupid);
}
#endregion
#region
/// <summary>高级查询</summary>
/// <param name="dgroupid">医嘱组号</param>
/// <param name="yzbm">医嘱编码</param>
/// <param name="key">关键字</param>
/// <param name="page">分页参数信息。可携带统计和数据权限扩展查询等信息</param>
/// <returns>实体列表</returns>
public static IList<ZYBHYZ1> Search(Int32 dgroupid, String yzbm, String key, PageParameter page)
{
var exp = new WhereExpression();
if (dgroupid >= 0) exp &= _.Dgroupid == dgroupid;
if (!yzbm.IsNullOrEmpty()) exp &= _.Yzbm == yzbm;
if (!key.IsNullOrEmpty()) exp &= _.Yzmc.Contains(key) | _.CreateUser.Contains(key) | _.CreateIP.Contains(key) | _.UpdateUser.Contains(key) | _.UpdateIP.Contains(key);
return FindAll(exp, page);
}
// Select Count(ID) as ID,Category From ZYBHYZ1 Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
//static readonly FieldCache<ZYBHYZ1> _CategoryCache = new FieldCache<ZYBHYZ1>(_.Category)
//{
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
//};
///// <summary>获取类别列表字段缓存10分钟分组统计数据最多的前20种用于魔方前台下拉选择</summary>
///// <returns></returns>
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
#endregion
#region
#endregion
}
}

View File

@ -0,0 +1,373 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
namespace HisData
{
/// <summary>病人医嘱明细信息</summary>
[Serializable]
[DataObject]
[Description("病人医嘱明细信息")]
[BindIndex("IU_ZYBHYZ1_DGROUPID_YZBM", true, "DGROUPID,YZBM")]
[BindIndex("IX_ZYBHYZ1_DGROUPID", false, "DGROUPID")]
[BindTable("ZYBHYZ1", Description = "病人医嘱明细信息", ConnName = "His", DbType = DatabaseType.None)]
public partial class ZYBHYZ1 : IZYBHYZ1
{
#region
private Int32 _ID;
/// <summary>编号</summary>
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _Dgroupid;
/// <summary>医嘱组号</summary>
[DisplayName("医嘱组号")]
[Description("医嘱组号")]
[DataObjectField(false, false, false, 0)]
[BindColumn("DGROUPID", "医嘱组号", "", Master = true)]
public Int32 Dgroupid { get => _Dgroupid; set { if (OnPropertyChanging(__.Dgroupid, value)) { _Dgroupid = value; OnPropertyChanged(__.Dgroupid); } } }
private String _Yzbm;
/// <summary>医嘱编码</summary>
[DisplayName("医嘱编码")]
[Description("医嘱编码")]
[DataObjectField(false, false, true, 50)]
[BindColumn("YZBM", "医嘱编码", "")]
public String Yzbm { get => _Yzbm; set { if (OnPropertyChanging(__.Yzbm, value)) { _Yzbm = value; OnPropertyChanged(__.Yzbm); } } }
private String _Yzmc;
/// <summary>医嘱名称</summary>
[DisplayName("医嘱名称")]
[Description("医嘱名称")]
[DataObjectField(false, false, true, 50)]
[BindColumn("YZMC", "医嘱名称", "")]
public String Yzmc { get => _Yzmc; set { if (OnPropertyChanging(__.Yzmc, value)) { _Yzmc = value; OnPropertyChanged(__.Yzmc); } } }
private Decimal _DJ;
/// <summary>单价</summary>
[DisplayName("单价")]
[Description("单价")]
[DataObjectField(false, false, false, 0)]
[BindColumn("DJ", "单价", "")]
public Decimal DJ { get => _DJ; set { if (OnPropertyChanging(__.DJ, value)) { _DJ = value; OnPropertyChanged(__.DJ); } } }
private Double _SL;
/// <summary>数量</summary>
[DisplayName("数量")]
[Description("数量")]
[DataObjectField(false, false, false, 0)]
[BindColumn("SL", "数量", "")]
public Double SL { get => _SL; set { if (OnPropertyChanging(__.SL, value)) { _SL = value; OnPropertyChanged(__.SL); } } }
private Decimal _FY;
/// <summary>费用</summary>
[DisplayName("费用")]
[Description("费用")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FY", "费用", "")]
public Decimal FY { get => _FY; set { if (OnPropertyChanging(__.FY, value)) { _FY = value; OnPropertyChanged(__.FY); } } }
private Int32 _State;
/// <summary>状态</summary>
[DisplayName("状态")]
[Description("状态")]
[DataObjectField(false, false, false, 0)]
[BindColumn("STATE", "状态", "")]
public Int32 State { get => _State; set { if (OnPropertyChanging(__.State, value)) { _State = value; OnPropertyChanged(__.State); } } }
private String _CreateUser;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private Int32 _CreateUserID;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建者", "")]
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
[DisplayName("创建时间")]
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
[DisplayName("创建地址")]
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private Int32 _UpdateUserID;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新者", "")]
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
[DisplayName("更新时间")]
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
[DisplayName("更新地址")]
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
public override Object this[String name]
{
get
{
switch (name)
{
case __.ID: return _ID;
case __.Dgroupid: return _Dgroupid;
case __.Yzbm: return _Yzbm;
case __.Yzmc: return _Yzmc;
case __.DJ: return _DJ;
case __.SL: return _SL;
case __.FY: return _FY;
case __.State: return _State;
case __.CreateUser: return _CreateUser;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUser: return _UpdateUser;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
set
{
switch (name)
{
case __.ID: _ID = value.ToInt(); break;
case __.Dgroupid: _Dgroupid = value.ToInt(); break;
case __.Yzbm: _Yzbm = Convert.ToString(value); break;
case __.Yzmc: _Yzmc = Convert.ToString(value); break;
case __.DJ: _DJ = Convert.ToDecimal(value); break;
case __.SL: _SL = value.ToDouble(); break;
case __.FY: _FY = Convert.ToDecimal(value); break;
case __.State: _State = value.ToInt(); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region
/// <summary>取得病人医嘱明细信息字段信息的快捷方式</summary>
public partial class _
{
/// <summary>编号</summary>
public static readonly Field ID = FindByName(__.ID);
/// <summary>医嘱组号</summary>
public static readonly Field Dgroupid = FindByName(__.Dgroupid);
/// <summary>医嘱编码</summary>
public static readonly Field Yzbm = FindByName(__.Yzbm);
/// <summary>医嘱名称</summary>
public static readonly Field Yzmc = FindByName(__.Yzmc);
/// <summary>单价</summary>
public static readonly Field DJ = FindByName(__.DJ);
/// <summary>数量</summary>
public static readonly Field SL = FindByName(__.SL);
/// <summary>费用</summary>
public static readonly Field FY = FindByName(__.FY);
/// <summary>状态</summary>
public static readonly Field State = FindByName(__.State);
/// <summary>创建者</summary>
public static readonly Field CreateUser = FindByName(__.CreateUser);
/// <summary>创建者</summary>
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
/// <summary>创建时间</summary>
public static readonly Field CreateTime = FindByName(__.CreateTime);
/// <summary>创建地址</summary>
public static readonly Field CreateIP = FindByName(__.CreateIP);
/// <summary>更新者</summary>
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
/// <summary>更新者</summary>
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得病人医嘱明细信息字段名称的快捷方式</summary>
public partial class __
{
/// <summary>编号</summary>
public const String ID = "ID";
/// <summary>医嘱组号</summary>
public const String Dgroupid = "Dgroupid";
/// <summary>医嘱编码</summary>
public const String Yzbm = "Yzbm";
/// <summary>医嘱名称</summary>
public const String Yzmc = "Yzmc";
/// <summary>单价</summary>
public const String DJ = "DJ";
/// <summary>数量</summary>
public const String SL = "SL";
/// <summary>费用</summary>
public const String FY = "FY";
/// <summary>状态</summary>
public const String State = "State";
/// <summary>创建者</summary>
public const String CreateUser = "CreateUser";
/// <summary>创建者</summary>
public const String CreateUserID = "CreateUserID";
/// <summary>创建时间</summary>
public const String CreateTime = "CreateTime";
/// <summary>创建地址</summary>
public const String CreateIP = "CreateIP";
/// <summary>更新者</summary>
public const String UpdateUser = "UpdateUser";
/// <summary>更新者</summary>
public const String UpdateUserID = "UpdateUserID";
/// <summary>更新时间</summary>
public const String UpdateTime = "UpdateTime";
/// <summary>更新地址</summary>
public const String UpdateIP = "UpdateIP";
}
#endregion
}
/// <summary>病人医嘱明细信息接口</summary>
public partial interface IZYBHYZ1
{
#region
/// <summary>编号</summary>
Int32 ID { get; set; }
/// <summary>医嘱组号</summary>
Int32 Dgroupid { get; set; }
/// <summary>医嘱编码</summary>
String Yzbm { get; set; }
/// <summary>医嘱名称</summary>
String Yzmc { get; set; }
/// <summary>单价</summary>
Decimal DJ { get; set; }
/// <summary>数量</summary>
Double SL { get; set; }
/// <summary>费用</summary>
Decimal FY { get; set; }
/// <summary>状态</summary>
Int32 State { get; set; }
/// <summary>创建者</summary>
String CreateUser { get; set; }
/// <summary>创建者</summary>
Int32 CreateUserID { get; set; }
/// <summary>创建时间</summary>
DateTime CreateTime { get; set; }
/// <summary>创建地址</summary>
String CreateIP { get; set; }
/// <summary>更新者</summary>
String UpdateUser { get; set; }
/// <summary>更新者</summary>
Int32 UpdateUserID { get; set; }
/// <summary>更新时间</summary>
DateTime UpdateTime { get; set; }
/// <summary>更新地址</summary>
String UpdateIP { get; set; }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
Object this[String name] { get; set; }
#endregion
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml.Serialization;
using NewLife;
using NewLife.Data;
using NewLife.Log;
using NewLife.Model;
using NewLife.Reflection;
using NewLife.Threading;
using NewLife.Web;
using XCode;
using XCode.Cache;
using XCode.Configuration;
using XCode.DataAccessLayer;
using XCode.Membership;
namespace HisData
{
/// <summary>病人基本信息</summary>
public partial class ZYBH0 : Entity<ZYBH0>
{
#region
static ZYBH0()
{
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
//var df = Meta.Factory.AdditionalFields;
//df.Add(__.Bhid);
// 过滤器 UserModule、TimeModule、IPModule
Meta.Modules.Add<UserModule>();
Meta.Modules.Add<TimeModule>();
Meta.Modules.Add<IPModule>();
//// 单对象缓存
//var sc = Meta.SingleCache;
//sc.FindSlaveKeyMethod = k => Find(__.Bhid, k);
//sc.GetSlaveKeyMethod = e => e.Bhid;
}
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
/// <param name="isNew">是否插入</param>
public override void Valid(Boolean isNew)
{
// 如果没有脏数据,则不需要进行任何处理
if (!HasDirty) return;
// 在新插入数据或者修改了指定字段时进行修正
// 处理当前已登录用户信息可以由UserModule过滤器代劳
/*var user = ManageProvider.User;
if (user != null)
{
if (isNew && !Dirtys[nameof(CreateUserID)]) CreateUserID = user.ID;
if (!Dirtys[nameof(UpdateUserID)]) UpdateUserID = user.ID;
}*/
//if (isNew && !Dirtys[nameof(CreateTime)]) CreateTime = DateTime.Now;
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
//if (isNew && !Dirtys[nameof(CreateIP)]) CreateIP = ManageProvider.UserHost;
//if (!Dirtys[nameof(UpdateIP)]) UpdateIP = ManageProvider.UserHost;
// 检查唯一索引
// CheckExist(isNew, __.Bhid);
}
#endregion
#region
#endregion
#region
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static ZYBH0 FindByID(Int32 id)
{
if (id <= 0) return null;
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.ID == id);
// 单对象缓存
return Meta.SingleCache[id];
//return Find(_.ID == id);
}
/// <summary>根据病人ID查找</summary>
/// <param name="bhid">病人ID</param>
/// <returns>实体对象</returns>
public static ZYBH0 FindByBhid(Int32 bhid)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.Bhid == bhid);
// 单对象缓存
//return Meta.SingleCache.GetItemWithSlaveKey(bhid) as ZYBH0;
return Find(_.Bhid == bhid);
}
#endregion
#region
/// <summary>高级查询</summary>
/// <param name="bhid">病人ID</param>
/// <param name="key">关键字</param>
/// <param name="page">分页参数信息。可携带统计和数据权限扩展查询等信息</param>
/// <returns>实体列表</returns>
public static IList<ZYBH0> Search(Int32 bhid, String key, PageParameter page)
{
var exp = new WhereExpression();
if (bhid >= 0) exp &= _.Bhid == bhid;
if (!key.IsNullOrEmpty()) exp &= _.XM.Contains(key) | _.Sfzh.Contains(key) | _.FB.Contains(key) | _.Remark.Contains(key) | _.CreateUser.Contains(key) | _.CreateIP.Contains(key) | _.UpdateUser.Contains(key) | _.UpdateIP.Contains(key);
return FindAll(exp, page);
}
// Select Count(ID) as ID,Category From ZYBH0 Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
//static readonly FieldCache<ZYBH0> _CategoryCache = new FieldCache<ZYBH0>(_.Category)
//{
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
//};
///// <summary>获取类别列表字段缓存10分钟分组统计数据最多的前20种用于魔方前台下拉选择</summary>
///// <returns></returns>
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
#endregion
#region
#endregion
}
}

View File

@ -0,0 +1,410 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
namespace HisData
{
/// <summary>病人基本信息</summary>
[Serializable]
[DataObject]
[Description("病人基本信息")]
[BindIndex("IU_ZYBH0_BHID", true, "BHID")]
[BindTable("ZYBH0", Description = "病人基本信息", ConnName = "His", DbType = DatabaseType.None)]
public partial class ZYBH0 : IZYBH0
{
#region
private Int32 _ID;
/// <summary>编号</summary>
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _Bhid;
/// <summary>病人ID</summary>
[DisplayName("病人ID")]
[Description("病人ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BHID", "病人ID", "", Master = true)]
public Int32 Bhid { get => _Bhid; set { if (OnPropertyChanging(__.Bhid, value)) { _Bhid = value; OnPropertyChanged(__.Bhid); } } }
private String _XM;
/// <summary>姓名</summary>
[DisplayName("姓名")]
[Description("姓名")]
[DataObjectField(false, false, true, 50)]
[BindColumn("XM", "姓名", "")]
public String XM { get => _XM; set { if (OnPropertyChanging(__.XM, value)) { _XM = value; OnPropertyChanged(__.XM); } } }
private Int32 _Ryrq;
/// <summary>入院日期</summary>
[DisplayName("入院日期")]
[Description("入院日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("RYRQ", "入院日期", "")]
public Int32 Ryrq { get => _Ryrq; set { if (OnPropertyChanging(__.Ryrq, value)) { _Ryrq = value; OnPropertyChanged(__.Ryrq); } } }
private Int32 _Cyrq;
/// <summary>出院日期</summary>
[DisplayName("出院日期")]
[Description("出院日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CYRQ", "出院日期", "")]
public Int32 Cyrq { get => _Cyrq; set { if (OnPropertyChanging(__.Cyrq, value)) { _Cyrq = value; OnPropertyChanged(__.Cyrq); } } }
private String _Sfzh;
/// <summary>身份证号</summary>
[DisplayName("身份证号")]
[Description("身份证号")]
[DataObjectField(false, false, true, 50)]
[BindColumn("SFZH", "身份证号", "")]
public String Sfzh { get => _Sfzh; set { if (OnPropertyChanging(__.Sfzh, value)) { _Sfzh = value; OnPropertyChanged(__.Sfzh); } } }
private String _FB;
/// <summary>费用类别</summary>
[DisplayName("费用类别")]
[Description("费用类别")]
[DataObjectField(false, false, true, 50)]
[BindColumn("FB", "费用类别", "")]
public String FB { get => _FB; set { if (OnPropertyChanging(__.FB, value)) { _FB = value; OnPropertyChanged(__.FB); } } }
private Int32 _State;
/// <summary>状态</summary>
[DisplayName("状态")]
[Description("状态")]
[DataObjectField(false, false, false, 0)]
[BindColumn("STATE", "状态", "")]
public Int32 State { get => _State; set { if (OnPropertyChanging(__.State, value)) { _State = value; OnPropertyChanged(__.State); } } }
private Int32 _Flag;
/// <summary>标记</summary>
[DisplayName("标记")]
[Description("标记")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FLAG", "标记", "")]
public Int32 Flag { get => _Flag; set { if (OnPropertyChanging(__.Flag, value)) { _Flag = value; OnPropertyChanged(__.Flag); } } }
private String _Remark;
/// <summary>内容</summary>
[DisplayName("内容")]
[Description("内容")]
[DataObjectField(false, false, true, 500)]
[BindColumn("Remark", "内容", "")]
public String Remark { get => _Remark; set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
private String _CreateUser;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private Int32 _CreateUserID;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建者", "")]
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
[DisplayName("创建时间")]
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
[DisplayName("创建地址")]
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private Int32 _UpdateUserID;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新者", "")]
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
[DisplayName("更新时间")]
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
[DisplayName("更新地址")]
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
public override Object this[String name]
{
get
{
switch (name)
{
case __.ID: return _ID;
case __.Bhid: return _Bhid;
case __.XM: return _XM;
case __.Ryrq: return _Ryrq;
case __.Cyrq: return _Cyrq;
case __.Sfzh: return _Sfzh;
case __.FB: return _FB;
case __.State: return _State;
case __.Flag: return _Flag;
case __.Remark: return _Remark;
case __.CreateUser: return _CreateUser;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUser: return _UpdateUser;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
set
{
switch (name)
{
case __.ID: _ID = value.ToInt(); break;
case __.Bhid: _Bhid = value.ToInt(); break;
case __.XM: _XM = Convert.ToString(value); break;
case __.Ryrq: _Ryrq = value.ToInt(); break;
case __.Cyrq: _Cyrq = value.ToInt(); break;
case __.Sfzh: _Sfzh = Convert.ToString(value); break;
case __.FB: _FB = Convert.ToString(value); break;
case __.State: _State = value.ToInt(); break;
case __.Flag: _Flag = value.ToInt(); break;
case __.Remark: _Remark = Convert.ToString(value); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region
/// <summary>取得病人基本信息字段信息的快捷方式</summary>
public partial class _
{
/// <summary>编号</summary>
public static readonly Field ID = FindByName(__.ID);
/// <summary>病人ID</summary>
public static readonly Field Bhid = FindByName(__.Bhid);
/// <summary>姓名</summary>
public static readonly Field XM = FindByName(__.XM);
/// <summary>入院日期</summary>
public static readonly Field Ryrq = FindByName(__.Ryrq);
/// <summary>出院日期</summary>
public static readonly Field Cyrq = FindByName(__.Cyrq);
/// <summary>身份证号</summary>
public static readonly Field Sfzh = FindByName(__.Sfzh);
/// <summary>费用类别</summary>
public static readonly Field FB = FindByName(__.FB);
/// <summary>状态</summary>
public static readonly Field State = FindByName(__.State);
/// <summary>标记</summary>
public static readonly Field Flag = FindByName(__.Flag);
/// <summary>内容</summary>
public static readonly Field Remark = FindByName(__.Remark);
/// <summary>创建者</summary>
public static readonly Field CreateUser = FindByName(__.CreateUser);
/// <summary>创建者</summary>
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
/// <summary>创建时间</summary>
public static readonly Field CreateTime = FindByName(__.CreateTime);
/// <summary>创建地址</summary>
public static readonly Field CreateIP = FindByName(__.CreateIP);
/// <summary>更新者</summary>
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
/// <summary>更新者</summary>
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得病人基本信息字段名称的快捷方式</summary>
public partial class __
{
/// <summary>编号</summary>
public const String ID = "ID";
/// <summary>病人ID</summary>
public const String Bhid = "Bhid";
/// <summary>姓名</summary>
public const String XM = "XM";
/// <summary>入院日期</summary>
public const String Ryrq = "Ryrq";
/// <summary>出院日期</summary>
public const String Cyrq = "Cyrq";
/// <summary>身份证号</summary>
public const String Sfzh = "Sfzh";
/// <summary>费用类别</summary>
public const String FB = "FB";
/// <summary>状态</summary>
public const String State = "State";
/// <summary>标记</summary>
public const String Flag = "Flag";
/// <summary>内容</summary>
public const String Remark = "Remark";
/// <summary>创建者</summary>
public const String CreateUser = "CreateUser";
/// <summary>创建者</summary>
public const String CreateUserID = "CreateUserID";
/// <summary>创建时间</summary>
public const String CreateTime = "CreateTime";
/// <summary>创建地址</summary>
public const String CreateIP = "CreateIP";
/// <summary>更新者</summary>
public const String UpdateUser = "UpdateUser";
/// <summary>更新者</summary>
public const String UpdateUserID = "UpdateUserID";
/// <summary>更新时间</summary>
public const String UpdateTime = "UpdateTime";
/// <summary>更新地址</summary>
public const String UpdateIP = "UpdateIP";
}
#endregion
}
/// <summary>病人基本信息接口</summary>
public partial interface IZYBH0
{
#region
/// <summary>编号</summary>
Int32 ID { get; set; }
/// <summary>病人ID</summary>
Int32 Bhid { get; set; }
/// <summary>姓名</summary>
String XM { get; set; }
/// <summary>入院日期</summary>
Int32 Ryrq { get; set; }
/// <summary>出院日期</summary>
Int32 Cyrq { get; set; }
/// <summary>身份证号</summary>
String Sfzh { get; set; }
/// <summary>费用类别</summary>
String FB { get; set; }
/// <summary>状态</summary>
Int32 State { get; set; }
/// <summary>标记</summary>
Int32 Flag { get; set; }
/// <summary>内容</summary>
String Remark { get; set; }
/// <summary>创建者</summary>
String CreateUser { get; set; }
/// <summary>创建者</summary>
Int32 CreateUserID { get; set; }
/// <summary>创建时间</summary>
DateTime CreateTime { get; set; }
/// <summary>创建地址</summary>
String CreateIP { get; set; }
/// <summary>更新者</summary>
String UpdateUser { get; set; }
/// <summary>更新者</summary>
Int32 UpdateUserID { get; set; }
/// <summary>更新时间</summary>
DateTime UpdateTime { get; set; }
/// <summary>更新地址</summary>
String UpdateIP { get; set; }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
Object this[String name] { get; set; }
#endregion
}
}

View File

@ -0,0 +1,180 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml.Serialization;
using NewLife;
using NewLife.Data;
using NewLife.Log;
using NewLife.Model;
using NewLife.Reflection;
using NewLife.Threading;
using NewLife.Web;
using XCode;
using XCode.Cache;
using XCode.Configuration;
using XCode.DataAccessLayer;
using XCode.Membership;
namespace HisData
{
/// <summary>病人药房请领单分月表202001</summary>
public partial class ZYYFQLD : Entity<ZYYFQLD>
{
#region
static ZYYFQLD()
{
// 累加字段,生成 Update xx Set Count=Count+1234 Where xxx
//var df = Meta.Factory.AdditionalFields;
//df.Add(__.Qlrq);
// 过滤器 UserModule、TimeModule、IPModule
Meta.Modules.Add<UserModule>();
Meta.Modules.Add<TimeModule>();
Meta.Modules.Add<IPModule>();
}
/// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
/// <param name="isNew">是否插入</param>
public override void Valid(Boolean isNew)
{
// 如果没有脏数据,则不需要进行任何处理
if (!HasDirty) return;
// 在新插入数据或者修改了指定字段时进行修正
// 货币保留6位小数
DJ = Math.Round(DJ, 6);
SL = Math.Round(SL, 6);
// 处理当前已登录用户信息可以由UserModule过滤器代劳
/*var user = ManageProvider.User;
if (user != null)
{
if (isNew && !Dirtys[nameof(CreateUserID)]) CreateUserID = user.ID;
if (!Dirtys[nameof(UpdateUserID)]) UpdateUserID = user.ID;
}*/
//if (isNew && !Dirtys[nameof(CreateTime)]) CreateTime = DateTime.Now;
//if (!Dirtys[nameof(UpdateTime)]) UpdateTime = DateTime.Now;
//if (isNew && !Dirtys[nameof(CreateIP)]) CreateIP = ManageProvider.UserHost;
//if (!Dirtys[nameof(UpdateIP)]) UpdateIP = ManageProvider.UserHost;
}
///// <summary>首次连接数据库时初始化数据,仅用于实体类重载,用户不应该调用该方法</summary>
//[EditorBrowsable(EditorBrowsableState.Never)]
//protected override void InitData()
//{
// // InitData一般用于当数据表没有数据时添加一些默认数据该实体类的任何第一次数据库操作都会触发该方法默认异步调用
// if (Meta.Session.Count > 0) return;
// if (XTrace.Debug) XTrace.WriteLine("开始初始化ZYYFQLD[病人药房请领单分月表202001]数据……");
// var entity = new ZYYFQLD();
// entity.ID = 0;
// entity.Qlrq = 0;
// entity.Qlsj = 0;
// entity.Ksbm = "abc";
// entity.Yzgroupid = 0;
// entity.Bhid = 0;
// entity.Yzbm = "abc";
// entity.DJ = 0.0;
// entity.SL = 0.0;
// entity.Yfbm = "abc";
// entity.Fyrq = 0;
// entity.State = 0;
// entity.Remark = "abc";
// entity.CreateUser = "abc";
// entity.CreateUserID = 0;
// entity.CreateTime = DateTime.Now;
// entity.CreateIP = "abc";
// entity.UpdateUser = "abc";
// entity.UpdateUserID = 0;
// entity.UpdateTime = DateTime.Now;
// entity.UpdateIP = "abc";
// entity.Insert();
// if (XTrace.Debug) XTrace.WriteLine("完成初始化ZYYFQLD[病人药房请领单分月表202001]数据!");
//}
///// <summary>已重载。基类先调用Valid(true)验证数据然后在事务保护内调用OnInsert</summary>
///// <returns></returns>
//public override Int32 Insert()
//{
// return base.Insert();
//}
///// <summary>已重载。在事务保护范围内处理业务位于Valid之后</summary>
///// <returns></returns>
//protected override Int32 OnDelete()
//{
// return base.OnDelete();
//}
#endregion
#region
#endregion
#region
/// <summary>根据编号查找</summary>
/// <param name="id">编号</param>
/// <returns>实体对象</returns>
public static ZYYFQLD FindByID(Int32 id)
{
if (id <= 0) return null;
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.ID == id);
// 单对象缓存
return Meta.SingleCache[id];
//return Find(_.ID == id);
}
/// <summary>根据病人ID查找</summary>
/// <param name="bhid">病人ID</param>
/// <returns>实体列表</returns>
public static IList<ZYYFQLD> FindAllByBhid(Int32 bhid)
{
// 实体缓存
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.Bhid == bhid);
return FindAll(_.Bhid == bhid);
}
#endregion
#region
/// <summary>高级查询</summary>
/// <param name="bhid">病人ID</param>
/// <param name="key">关键字</param>
/// <param name="page">分页参数信息。可携带统计和数据权限扩展查询等信息</param>
/// <returns>实体列表</returns>
public static IList<ZYYFQLD> Search(Int32 bhid, String key, PageParameter page)
{
var exp = new WhereExpression();
if (bhid >= 0) exp &= _.Bhid == bhid;
if (!key.IsNullOrEmpty()) exp &= _.Ksbm.Contains(key) | _.Yzbm.Contains(key) | _.Yfbm.Contains(key) | _.Remark.Contains(key) | _.CreateUser.Contains(key) | _.CreateIP.Contains(key) | _.UpdateUser.Contains(key) | _.UpdateIP.Contains(key);
return FindAll(exp, page);
}
// Select Count(ID) as ID,Category From ZYYFQLD Where CreateTime>'2020-01-24 00:00:00' Group By Category Order By ID Desc limit 20
//static readonly FieldCache<ZYYFQLD> _CategoryCache = new FieldCache<ZYYFQLD>(_.Category)
//{
//Where = _.CreateTime > DateTime.Today.AddDays(-30) & Expression.Empty
//};
///// <summary>获取类别列表字段缓存10分钟分组统计数据最多的前20种用于魔方前台下拉选择</summary>
///// <returns></returns>
//public static IDictionary<String, String> GetCategoryList() => _CategoryCache.FindAllName();
#endregion
#region
#endregion
}
}

View File

@ -0,0 +1,467 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
namespace HisData
{
/// <summary>病人药房请领单分月表202001</summary>
[Serializable]
[DataObject]
[Description("病人药房请领单分月表202001")]
[BindIndex("IX_ZYYFQLD_BHID", false, "BHID")]
[BindTable("ZYYFQLD", Description = "病人药房请领单分月表202001", ConnName = "His", DbType = DatabaseType.None)]
public partial class ZYYFQLD : IZYYFQLD
{
#region
private Int32 _ID;
/// <summary>编号</summary>
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("ID", "编号", "")]
public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
private Int32 _Qlrq;
/// <summary>请领日期</summary>
[DisplayName("请领日期")]
[Description("请领日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("QLRQ", "请领日期", "")]
public Int32 Qlrq { get => _Qlrq; set { if (OnPropertyChanging(__.Qlrq, value)) { _Qlrq = value; OnPropertyChanged(__.Qlrq); } } }
private Int32 _Qlsj;
/// <summary>请领时间</summary>
[DisplayName("请领时间")]
[Description("请领时间")]
[DataObjectField(false, false, false, 0)]
[BindColumn("QLSJ", "请领时间", "")]
public Int32 Qlsj { get => _Qlsj; set { if (OnPropertyChanging(__.Qlsj, value)) { _Qlsj = value; OnPropertyChanged(__.Qlsj); } } }
private String _Ksbm;
/// <summary>请领科室</summary>
[DisplayName("请领科室")]
[Description("请领科室")]
[DataObjectField(false, false, true, 50)]
[BindColumn("KSBM", "请领科室", "")]
public String Ksbm { get => _Ksbm; set { if (OnPropertyChanging(__.Ksbm, value)) { _Ksbm = value; OnPropertyChanged(__.Ksbm); } } }
private Int32 _Yzgroupid;
/// <summary>医嘱ID</summary>
[DisplayName("医嘱ID")]
[Description("医嘱ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("YZGROUPID", "医嘱ID", "")]
public Int32 Yzgroupid { get => _Yzgroupid; set { if (OnPropertyChanging(__.Yzgroupid, value)) { _Yzgroupid = value; OnPropertyChanged(__.Yzgroupid); } } }
private Int32 _Bhid;
/// <summary>病人ID</summary>
[DisplayName("病人ID")]
[Description("病人ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("BHID", "病人ID", "")]
public Int32 Bhid { get => _Bhid; set { if (OnPropertyChanging(__.Bhid, value)) { _Bhid = value; OnPropertyChanged(__.Bhid); } } }
private String _Yzbm;
/// <summary>药品编码</summary>
[DisplayName("药品编码")]
[Description("药品编码")]
[DataObjectField(false, false, true, 50)]
[BindColumn("YZBM", "药品编码", "")]
public String Yzbm { get => _Yzbm; set { if (OnPropertyChanging(__.Yzbm, value)) { _Yzbm = value; OnPropertyChanged(__.Yzbm); } } }
private Decimal _DJ;
/// <summary>单价</summary>
[DisplayName("单价")]
[Description("单价")]
[DataObjectField(false, false, false, 0)]
[BindColumn("DJ", "单价", "")]
public Decimal DJ { get => _DJ; set { if (OnPropertyChanging(__.DJ, value)) { _DJ = value; OnPropertyChanged(__.DJ); } } }
private Double _SL;
/// <summary>请领数量</summary>
[DisplayName("请领数量")]
[Description("请领数量")]
[DataObjectField(false, false, false, 0)]
[BindColumn("SL", "请领数量", "")]
public Double SL { get => _SL; set { if (OnPropertyChanging(__.SL, value)) { _SL = value; OnPropertyChanged(__.SL); } } }
private String _Yfbm;
/// <summary>发药药房</summary>
[DisplayName("发药药房")]
[Description("发药药房")]
[DataObjectField(false, false, true, 50)]
[BindColumn("YFBM", "发药药房", "")]
public String Yfbm { get => _Yfbm; set { if (OnPropertyChanging(__.Yfbm, value)) { _Yfbm = value; OnPropertyChanged(__.Yfbm); } } }
private Int32 _Fyrq;
/// <summary>发药日期</summary>
[DisplayName("发药日期")]
[Description("发药日期")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FYRQ", "发药日期", "")]
public Int32 Fyrq { get => _Fyrq; set { if (OnPropertyChanging(__.Fyrq, value)) { _Fyrq = value; OnPropertyChanged(__.Fyrq); } } }
private Int32 _State;
/// <summary>状态</summary>
[DisplayName("状态")]
[Description("状态")]
[DataObjectField(false, false, false, 0)]
[BindColumn("STATE", "状态", "")]
public Int32 State { get => _State; set { if (OnPropertyChanging(__.State, value)) { _State = value; OnPropertyChanged(__.State); } } }
private String _Remark;
/// <summary>内容</summary>
[DisplayName("内容")]
[Description("内容")]
[DataObjectField(false, false, true, 500)]
[BindColumn("Remark", "内容", "")]
public String Remark { get => _Remark; set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
private String _CreateUser;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateUser", "创建者", "")]
public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
private Int32 _CreateUserID;
/// <summary>创建者</summary>
[DisplayName("创建者")]
[Description("创建者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("CreateUserID", "创建者", "")]
public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
private DateTime _CreateTime;
/// <summary>创建时间</summary>
[DisplayName("创建时间")]
[Description("创建时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("CreateTime", "创建时间", "")]
public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
private String _CreateIP;
/// <summary>创建地址</summary>
[DisplayName("创建地址")]
[Description("创建地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("CreateIP", "创建地址", "")]
public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
private String _UpdateUser;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateUser", "更新者", "")]
public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
private Int32 _UpdateUserID;
/// <summary>更新者</summary>
[DisplayName("更新者")]
[Description("更新者")]
[DataObjectField(false, false, false, 0)]
[BindColumn("UpdateUserID", "更新者", "")]
public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
private DateTime _UpdateTime;
/// <summary>更新时间</summary>
[DisplayName("更新时间")]
[Description("更新时间")]
[DataObjectField(false, false, true, 0)]
[BindColumn("UpdateTime", "更新时间", "")]
public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
private String _UpdateIP;
/// <summary>更新地址</summary>
[DisplayName("更新地址")]
[Description("更新地址")]
[DataObjectField(false, false, true, 50)]
[BindColumn("UpdateIP", "更新地址", "")]
public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
public override Object this[String name]
{
get
{
switch (name)
{
case __.ID: return _ID;
case __.Qlrq: return _Qlrq;
case __.Qlsj: return _Qlsj;
case __.Ksbm: return _Ksbm;
case __.Yzgroupid: return _Yzgroupid;
case __.Bhid: return _Bhid;
case __.Yzbm: return _Yzbm;
case __.DJ: return _DJ;
case __.SL: return _SL;
case __.Yfbm: return _Yfbm;
case __.Fyrq: return _Fyrq;
case __.State: return _State;
case __.Remark: return _Remark;
case __.CreateUser: return _CreateUser;
case __.CreateUserID: return _CreateUserID;
case __.CreateTime: return _CreateTime;
case __.CreateIP: return _CreateIP;
case __.UpdateUser: return _UpdateUser;
case __.UpdateUserID: return _UpdateUserID;
case __.UpdateTime: return _UpdateTime;
case __.UpdateIP: return _UpdateIP;
default: return base[name];
}
}
set
{
switch (name)
{
case __.ID: _ID = value.ToInt(); break;
case __.Qlrq: _Qlrq = value.ToInt(); break;
case __.Qlsj: _Qlsj = value.ToInt(); break;
case __.Ksbm: _Ksbm = Convert.ToString(value); break;
case __.Yzgroupid: _Yzgroupid = value.ToInt(); break;
case __.Bhid: _Bhid = value.ToInt(); break;
case __.Yzbm: _Yzbm = Convert.ToString(value); break;
case __.DJ: _DJ = Convert.ToDecimal(value); break;
case __.SL: _SL = value.ToDouble(); break;
case __.Yfbm: _Yfbm = Convert.ToString(value); break;
case __.Fyrq: _Fyrq = value.ToInt(); break;
case __.State: _State = value.ToInt(); break;
case __.Remark: _Remark = Convert.ToString(value); break;
case __.CreateUser: _CreateUser = Convert.ToString(value); break;
case __.CreateUserID: _CreateUserID = value.ToInt(); break;
case __.CreateTime: _CreateTime = value.ToDateTime(); break;
case __.CreateIP: _CreateIP = Convert.ToString(value); break;
case __.UpdateUser: _UpdateUser = Convert.ToString(value); break;
case __.UpdateUserID: _UpdateUserID = value.ToInt(); break;
case __.UpdateTime: _UpdateTime = value.ToDateTime(); break;
case __.UpdateIP: _UpdateIP = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region
/// <summary>取得病人药房请领单分月表202001字段信息的快捷方式</summary>
public partial class _
{
/// <summary>编号</summary>
public static readonly Field ID = FindByName(__.ID);
/// <summary>请领日期</summary>
public static readonly Field Qlrq = FindByName(__.Qlrq);
/// <summary>请领时间</summary>
public static readonly Field Qlsj = FindByName(__.Qlsj);
/// <summary>请领科室</summary>
public static readonly Field Ksbm = FindByName(__.Ksbm);
/// <summary>医嘱ID</summary>
public static readonly Field Yzgroupid = FindByName(__.Yzgroupid);
/// <summary>病人ID</summary>
public static readonly Field Bhid = FindByName(__.Bhid);
/// <summary>药品编码</summary>
public static readonly Field Yzbm = FindByName(__.Yzbm);
/// <summary>单价</summary>
public static readonly Field DJ = FindByName(__.DJ);
/// <summary>请领数量</summary>
public static readonly Field SL = FindByName(__.SL);
/// <summary>发药药房</summary>
public static readonly Field Yfbm = FindByName(__.Yfbm);
/// <summary>发药日期</summary>
public static readonly Field Fyrq = FindByName(__.Fyrq);
/// <summary>状态</summary>
public static readonly Field State = FindByName(__.State);
/// <summary>内容</summary>
public static readonly Field Remark = FindByName(__.Remark);
/// <summary>创建者</summary>
public static readonly Field CreateUser = FindByName(__.CreateUser);
/// <summary>创建者</summary>
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
/// <summary>创建时间</summary>
public static readonly Field CreateTime = FindByName(__.CreateTime);
/// <summary>创建地址</summary>
public static readonly Field CreateIP = FindByName(__.CreateIP);
/// <summary>更新者</summary>
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
/// <summary>更新者</summary>
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
/// <summary>更新时间</summary>
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
/// <summary>更新地址</summary>
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
static Field FindByName(String name) => Meta.Table.FindByName(name);
}
/// <summary>取得病人药房请领单分月表202001字段名称的快捷方式</summary>
public partial class __
{
/// <summary>编号</summary>
public const String ID = "ID";
/// <summary>请领日期</summary>
public const String Qlrq = "Qlrq";
/// <summary>请领时间</summary>
public const String Qlsj = "Qlsj";
/// <summary>请领科室</summary>
public const String Ksbm = "Ksbm";
/// <summary>医嘱ID</summary>
public const String Yzgroupid = "Yzgroupid";
/// <summary>病人ID</summary>
public const String Bhid = "Bhid";
/// <summary>药品编码</summary>
public const String Yzbm = "Yzbm";
/// <summary>单价</summary>
public const String DJ = "DJ";
/// <summary>请领数量</summary>
public const String SL = "SL";
/// <summary>发药药房</summary>
public const String Yfbm = "Yfbm";
/// <summary>发药日期</summary>
public const String Fyrq = "Fyrq";
/// <summary>状态</summary>
public const String State = "State";
/// <summary>内容</summary>
public const String Remark = "Remark";
/// <summary>创建者</summary>
public const String CreateUser = "CreateUser";
/// <summary>创建者</summary>
public const String CreateUserID = "CreateUserID";
/// <summary>创建时间</summary>
public const String CreateTime = "CreateTime";
/// <summary>创建地址</summary>
public const String CreateIP = "CreateIP";
/// <summary>更新者</summary>
public const String UpdateUser = "UpdateUser";
/// <summary>更新者</summary>
public const String UpdateUserID = "UpdateUserID";
/// <summary>更新时间</summary>
public const String UpdateTime = "UpdateTime";
/// <summary>更新地址</summary>
public const String UpdateIP = "UpdateIP";
}
#endregion
}
/// <summary>病人药房请领单分月表202001接口</summary>
public partial interface IZYYFQLD
{
#region
/// <summary>编号</summary>
Int32 ID { get; set; }
/// <summary>请领日期</summary>
Int32 Qlrq { get; set; }
/// <summary>请领时间</summary>
Int32 Qlsj { get; set; }
/// <summary>请领科室</summary>
String Ksbm { get; set; }
/// <summary>医嘱ID</summary>
Int32 Yzgroupid { get; set; }
/// <summary>病人ID</summary>
Int32 Bhid { get; set; }
/// <summary>药品编码</summary>
String Yzbm { get; set; }
/// <summary>单价</summary>
Decimal DJ { get; set; }
/// <summary>请领数量</summary>
Double SL { get; set; }
/// <summary>发药药房</summary>
String Yfbm { get; set; }
/// <summary>发药日期</summary>
Int32 Fyrq { get; set; }
/// <summary>状态</summary>
Int32 State { get; set; }
/// <summary>内容</summary>
String Remark { get; set; }
/// <summary>创建者</summary>
String CreateUser { get; set; }
/// <summary>创建者</summary>
Int32 CreateUserID { get; set; }
/// <summary>创建时间</summary>
DateTime CreateTime { get; set; }
/// <summary>创建地址</summary>
String CreateIP { get; set; }
/// <summary>更新者</summary>
String UpdateUser { get; set; }
/// <summary>更新者</summary>
Int32 UpdateUserID { get; set; }
/// <summary>更新时间</summary>
DateTime UpdateTime { get; set; }
/// <summary>更新地址</summary>
String UpdateIP { get; set; }
#endregion
#region /
/// <summary>获取/设置 字段值</summary>
/// <param name="name">字段名</param>
/// <returns></returns>
Object this[String name] { get; set; }
#endregion
}
}

View File

@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="Build.tt" />
</ItemGroup>
<ItemGroup>
<Content Include="Build.tt">
<LastGenOutput>Build.log</LastGenOutput>
<Generator>TextTemplatingFileGenerator</Generator>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NewLife.XCode" Version="9.16.2020.403" />
</ItemGroup>
<ItemGroup>
<None Update="Build.log">
<DependentUpon>Build.tt</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<ItemGroup>
<Folder Include="Entity\" />
</ItemGroup>
</Project>

127
Samples/HisData/Model.xml Normal file
View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Tables Version="9.16.7398.1902" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" NameSpace="HisData" ConnName="His" Output="Entity" BaseClass="Entity" IgnoreNameCase="True" xmlns="http://www.newlifex.com/Model2020.xsd">
<Table Name="ZYBH0" Description="病人基本信息" IgnoreNameCase="False">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Bhid" ColumnName="BHID" DataType="Int32" Master="True" Description="病人ID" />
<Column Name="XM" DataType="String" Description="姓名" />
<Column Name="Ryrq" ColumnName="RYRQ" DataType="Int32" Description="入院日期" />
<Column Name="Cyrq" ColumnName="CYRQ" DataType="Int32" Description="出院日期" />
<Column Name="Sfzh" ColumnName="SFZH" DataType="String" Description="身份证号" />
<Column Name="FB" DataType="String" Description="费用类别" />
<Column Name="State" ColumnName="STATE" DataType="Int32" Description="状态" />
<Column Name="Flag" ColumnName="FLAG" DataType="Int32" Description="标记" />
<Column Name="Remark" DataType="String" Length="500" Description="内容" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="BHID" Unique="True" />
</Indexes>
</Table>
<Table Name="ZYBHYZ0" Description="病人医嘱信息" IgnoreNameCase="False">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Bhid" ColumnName="BHID" DataType="Int32" Description="病人ID" />
<Column Name="Mgroupid" ColumnName="MGROUPID" DataType="Int32" Master="True" Description="医嘱组号" />
<Column Name="Kyzrq" ColumnName="KYZRQ" DataType="Int32" Description="开医嘱日期" />
<Column Name="Tyzrq" ColumnName="TYZRQ" DataType="Int32" Description="停医嘱日期" />
<Column Name="Kyzys" ColumnName="KYZYS" DataType="String" Description="开医嘱医生" />
<Column Name="State" ColumnName="STATE" DataType="Int32" Description="状态" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="BHID,MGROUPID" Unique="True" />
<Index Columns="BHID" />
</Indexes>
</Table>
<Table Name="ZYBHYZ1" Description="病人医嘱明细信息" IgnoreNameCase="False">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Dgroupid" ColumnName="DGROUPID" DataType="Int32" Master="True" Description="医嘱组号" />
<Column Name="Yzbm" ColumnName="YZBM" DataType="String" Description="医嘱编码" />
<Column Name="Yzmc" ColumnName="YZMC" DataType="String" Description="医嘱名称" />
<Column Name="DJ" DataType="Decimal" Description="单价" />
<Column Name="SL" DataType="Double" Description="数量" />
<Column Name="FY" DataType="Decimal" Description="费用" />
<Column Name="State" ColumnName="STATE" DataType="Int32" Description="状态" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="DGROUPID,YZBM" Unique="True" />
<Index Columns="DGROUPID" />
</Indexes>
</Table>
<Table Name="ZYYFQLD" Description="病人药房请领单分月表202001" IgnoreNameCase="False">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Qlrq" ColumnName="QLRQ" DataType="Int32" Description="请领日期" />
<Column Name="Qlsj" ColumnName="QLSJ" DataType="Int32" Description="请领时间" />
<Column Name="Ksbm" ColumnName="KSBM" DataType="String" Description="请领科室" />
<Column Name="Yzgroupid" ColumnName="YZGROUPID" DataType="Int32" Description="医嘱ID" />
<Column Name="Bhid" ColumnName="BHID" DataType="Int32" Description="病人ID" />
<Column Name="Yzbm" ColumnName="YZBM" DataType="String" Description="药品编码" />
<Column Name="DJ" DataType="Decimal" Description="单价" />
<Column Name="SL" DataType="Double" Description="请领数量" />
<Column Name="Yfbm" ColumnName="YFBM" DataType="String" Description="发药药房" />
<Column Name="Fyrq" ColumnName="FYRQ" DataType="Int32" Description="发药日期" />
<Column Name="State" ColumnName="STATE" DataType="Int32" Description="状态" />
<Column Name="Remark" DataType="String" Length="500" Description="内容" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="BHID" />
</Indexes>
</Table>
<Table Name="ZDSF" Description="收费字典" IgnoreNameCase="False">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="BM" DataType="String" Master="True" Nullable="False" Description="编码" />
<Column Name="DH" DataType="String" Description="拼音码" />
<Column Name="MC" DataType="String" Description="名称" />
<Column Name="DJ" DataType="Decimal" Description="单价" />
<Column Name="DW" DataType="String" Description="单位" />
<Column Name="Mzyflb" ColumnName="MZYFLB" DataType="Int32" Description="门诊费用类别" />
<Column Name="Zyfylb" ColumnName="ZYFYLB" DataType="Int32" Description="住院费用类别" />
<Column Name="Zfbl" ColumnName="ZFBL" DataType="Double" Description="自费比例" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="BM" Unique="True" />
</Indexes>
</Table>
</Tables>

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>

26
Samples/HisWeb/Program.cs Normal file
View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace HisWeb
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

View File

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55194",
"sslPort": 44305
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"HisWeb": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

40
Samples/HisWeb/Startup.cs Normal file
View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace HisWeb
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Hello World!");
});
});
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

View File

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

View File

@ -31,6 +31,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntJob.Agent", "AntJob.Agen
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HisAgent", "Samples\HisAgent\HisAgent.csproj", "{E62006DC-E61B-42B0-A06B-ED5BF3F73D9E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HisData", "Samples\HisData\HisData.csproj", "{38F8667D-70B7-4A90-8CA7-63738E925DFF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HisWeb", "Samples\HisWeb\HisWeb.csproj", "{153499A6-E73C-4C5A-8867-D29BD586A74B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -69,12 +73,22 @@ Global
{E62006DC-E61B-42B0-A06B-ED5BF3F73D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E62006DC-E61B-42B0-A06B-ED5BF3F73D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E62006DC-E61B-42B0-A06B-ED5BF3F73D9E}.Release|Any CPU.Build.0 = Release|Any CPU
{38F8667D-70B7-4A90-8CA7-63738E925DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38F8667D-70B7-4A90-8CA7-63738E925DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38F8667D-70B7-4A90-8CA7-63738E925DFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38F8667D-70B7-4A90-8CA7-63738E925DFF}.Release|Any CPU.Build.0 = Release|Any CPU
{153499A6-E73C-4C5A-8867-D29BD586A74B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{153499A6-E73C-4C5A-8867-D29BD586A74B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{153499A6-E73C-4C5A-8867-D29BD586A74B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{153499A6-E73C-4C5A-8867-D29BD586A74B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E62006DC-E61B-42B0-A06B-ED5BF3F73D9E} = {E842807F-C45E-44DA-8AAE-7915C1EBF2A2}
{38F8667D-70B7-4A90-8CA7-63738E925DFF} = {E842807F-C45E-44DA-8AAE-7915C1EBF2A2}
{153499A6-E73C-4C5A-8867-D29BD586A74B} = {E842807F-C45E-44DA-8AAE-7915C1EBF2A2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9337283C-C795-479F-A2F1-C892EBE2490C}