using Cksoft.Unity; using System; namespace DllEapEntity { [Table("partinfo")] public class Partinfo : BaseEntity { ////自动产生代码开始&&此行不能删除 #region 自动产生代码 public Partinfo() { base.EntityStatusID = 1; } [ColDetail(10, "ID", 1, 1, 100, 1, "a.ID", "", 1, 1)] [Key] [Identity] public int ID { get; set; } [ColDetail(20, "partCode", 1, 1, 100, 1, "a.partCode", "", 1, 1)] public string partCode { get; set; } [ColDetail(30, "录入人代码", 1, 1, 100, 1, "a.RecCode", "", 1, 1)] public string RecCode { get; set; } [ColDetail(40, "录入日期", 1, 1, 100, 1, "a.RecTime", "", 1, 1)] public DateTime RecTime { get; set; } [ColDetail(50, "修改 人代码", 1, 1, 100, 1, "a.ModCode", "", 1, 1)] public string ModCode { get; set; } [ColDetail(60, "修改时间", 1, 1, 100, 1, "a.ModTime", "", 1, 1)] public DateTime ModTime { get; set; } [ColDetail(70, "QT代码", 1, 0, 100, 1, "d.FCode", "", 1, 1)] public string HandlerFCode { get; set; } [ColDetail(80, "QT名称", 1, 0, 100, 1, "d.FName", "", 1, 1)] public string HandlerFName { get; set; } [ColDetail(120, "机台ID", 1, 0, 100, 1, "b.machineID", "", 1, 1)] public int machineID { get; set; } [ColDetail(130, "程序名", 1, 0, 100, 1, "b.programName", "", 1, 1)] public string programName { get; set; } [ColDetail(140, "员工工号", 1, 0, 100, 1, "b.employNum", "", 1, 1)] public string employNum { get; set; } [ColDetail(150, "qt站别", 1, 0, 100, 1, "b.qtype", "", 1, 1)] public string qtype { get; set; } public override string GetSelectSql() { return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}"); } public override string GetQueryColSql() { string sqlstr = "a.ID ID,a.partCode partCode,a.RecCode RecCode,a.RecTime RecTime,a.ModCode ModCode,a.ModTime ModTime,d.FCode HandlerFCode,d.FName HandlerFName"; sqlstr += ",b.machineID machineID,b.programName programName,b.employNum employNum,b.qtype qtype,0 EntityStatusID"; return sqlstr; } public override string GetQueryTabSql() { string sqlstr = " partinfo a "; sqlstr += " left outer join partmachine b on a.id =b.partid"; sqlstr += " left outer join machine d on b.machineid =d.id"; return sqlstr; } public override string GetQuerySortSql() { return ""; } #endregion ////自动产生代码结束&&此行不能删除 } }