diff --git a/Ewide.Nbzs.BackWorkerService/Worker.cs b/Ewide.Nbzs.BackWorkerService/Worker.cs index 1c01bda..9bfbbde 100644 --- a/Ewide.Nbzs.BackWorkerService/Worker.cs +++ b/Ewide.Nbzs.BackWorkerService/Worker.cs @@ -160,6 +160,16 @@ namespace Ewide.Nbzs.BackWorkerService insert_result = db_Zlb_Conn.Insertable(db_Product_Conn.Queryable().Where(p => p.ID == projectId).ToList()).ExecuteCommand(); list_result.Add(new PushResult { Action = "Insert", TableName = "Projects", IsSuccess = insert_result > 0 }); //} + + //ProjectsStep + delete_result = db_Zlb_Conn.Deleteable().Where(p => p.ProjectID == projectId).ExecuteCommandHasChange(); + list_result.Add(new PushResult { Action = "Delete", TableName = "ProjectsStep", IsSuccess = delete_result }); + //if (delete_result) + //{ + insert_result = db_Zlb_Conn.Insertable(db_Product_Conn.Queryable().Where(p => p.ProjectID == projectId).ToList()).ExecuteCommand(); + list_result.Add(new PushResult { Action = "Insert", TableName = "ProjectsStep", IsSuccess = insert_result > 0 }); + //} + } StringBuilder push_error_reason = new(); //if (list_result.Any(r => !r.IsSuccess)) diff --git a/Ewide.Nbzs.Entity/DataBase/ProjectsStep.cs b/Ewide.Nbzs.Entity/DataBase/ProjectsStep.cs new file mode 100644 index 0000000..4a430f3 --- /dev/null +++ b/Ewide.Nbzs.Entity/DataBase/ProjectsStep.cs @@ -0,0 +1,170 @@ + //----------ProjectsStep开始---------- + + using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +//using System.Data.Entity.ModelConfiguration; +using System.Runtime.Serialization; + namespace Ewide.Nbzs.Entity + { + /// + /// 数据表实体类:ProjectsStep + /// + [Table("ProjectsStep")] + public partial class ProjectsStep: BaseEntity { + /// + /// 无描述 + /// + + [Display(Name="无描述")] + [Key] + [Column("ID")] + [DataMember] + public Guid ID {get;set;} + /// + /// 项目ID + /// + + [Display(Name="项目ID")] + [Column("ProjectID")] + [DataMember] + public Guid? ProjectID {get;set;} + /// + /// 项目阶段名称ID + /// + + [Display(Name="项目阶段名称ID")] + [Column("StepNameID")] + [DataMember] + public Guid? StepNameID {get;set;} + /// + /// 项目阶段名称 + /// + + [Display(Name="项目阶段名称")] + [Column("StepName")] + [DataMember] + public string StepName {get;set;} + /// + /// 项目阶段顺序 + /// + + [Display(Name="项目阶段顺序")] + [Column("StepSort")] + [DataMember] + public int? StepSort {get;set;} + /// + /// 项目阶段惟一代码 + /// + + [Display(Name="项目阶段惟一代码")] + [Column("StepCode")] + [DataMember] + public string StepCode {get;set;} + /// + /// 项目阶段开始时间 + /// + + [Display(Name="项目阶段开始时间")] + [Column("StartTime")] + [DataMember] + public DateTime? StartTime {get;set;} + /// + /// 项目阶段结束时间 + /// + + [Display(Name="项目阶段结束时间")] + [Column("EndTime")] + [DataMember] + public DateTime? EndTime {get;set;} + /// + /// 是否结束 + /// + + [Display(Name="是否结束")] + [Column("IsFinish")] + [DataMember] + public bool IsFinish {get;set;} + /// + /// 创建人ID + /// + + [Display(Name="创建人ID")] + [Column("CreateUserId")] + [DataMember] + public Guid? CreateUserId {get;set;} + /// + /// 创建人姓名 + /// + + [Display(Name="创建人姓名")] + [Column("CreateUserName")] + [DataMember] + public string CreateUserName {get;set;} + /// + /// 创建时间 + /// + + [Display(Name="创建时间")] + [Column("CreateTime")] + [DataMember] + public DateTime? CreateTime {get;set;} + /// + /// 修改人ID + /// + + [Display(Name="修改人ID")] + [Column("UpdateUserId")] + [DataMember] + public Guid? UpdateUserId {get;set;} + /// + /// 修改人姓名 + /// + + [Display(Name="修改人姓名")] + [Column("UpdateUserName")] + [DataMember] + public string UpdateUserName {get;set;} + /// + /// 修改时间 + /// + + [Display(Name="修改时间")] + [Column("UpdateTime")] + [DataMember] + public DateTime? UpdateTime {get;set;} + + } + + /** + /// + /// 数据表实体类Map:ProjectsStep + /// + public class ProjectsStepMap : EntityTypeConfiguration + { + public ProjectsStepMap() + { + this.ToTable("ProjectsStep"); + this.HasKey(t => t.ID); + this.Property(t => t.ProjectID).HasColumnName("ProjectID"); + this.Property(t => t.StepNameID).HasColumnName("StepNameID"); + this.Property(t => t.StepName).HasColumnName("StepName"); + this.Property(t => t.StepSort).HasColumnName("StepSort"); + this.Property(t => t.StepCode).HasColumnName("StepCode"); + this.Property(t => t.StartTime).HasColumnName("StartTime"); + this.Property(t => t.EndTime).HasColumnName("EndTime"); + this.Property(t => t.IsFinish).HasColumnName("IsFinish"); + this.Property(t => t.CreateUserId).HasColumnName("CreateUserId"); + this.Property(t => t.CreateUserName).HasColumnName("CreateUserName"); + this.Property(t => t.CreateTime).HasColumnName("CreateTime"); + this.Property(t => t.UpdateUserId).HasColumnName("UpdateUserId"); + this.Property(t => t.UpdateUserName).HasColumnName("UpdateUserName"); + this.Property(t => t.UpdateTime).HasColumnName("UpdateTime"); + } + }**/ + + } + + //----------ProjectsStep结束---------- + + \ No newline at end of file diff --git a/Ewide.Nbzs.Entity/SqlModelTpl.cs b/Ewide.Nbzs.Entity/SqlModelTpl.cs index 7e49272..c4402bb 100644 --- a/Ewide.Nbzs.Entity/SqlModelTpl.cs +++ b/Ewide.Nbzs.Entity/SqlModelTpl.cs @@ -15,6 +15,7 @@ + diff --git a/Ewide.Nbzs.Entity/SqlModelTpl.tt b/Ewide.Nbzs.Entity/SqlModelTpl.tt index 143338d..74ed8c9 100644 --- a/Ewide.Nbzs.Entity/SqlModelTpl.tt +++ b/Ewide.Nbzs.Entity/SqlModelTpl.tt @@ -16,7 +16,7 @@ string tableClass=""; //所有表名称 //string sqlGetTable = "SELECT Name FROM SysObjects Where XType='U' ORDER BY Name"; - DataTable dt = GetDataTable(new List { "Projects","InvestigateTable","NonResidentialInvestigateTable","InvestigateTable_Assessment","NonInvestigateTable_Assessment","NonResidentialAgreement","ResidentialAgreement","PoliciesRegulations","zjzwfwTickets","PushZlb" }); + DataTable dt = GetDataTable(new List { "Projects","InvestigateTable","NonResidentialInvestigateTable","InvestigateTable_Assessment","NonInvestigateTable_Assessment","NonResidentialAgreement","ResidentialAgreement","PoliciesRegulations","zjzwfwTickets","PushZlb","ProjectsStep" }); //DataTable dtRelationTable = GetRelationTable(); //所有表信息 string selectQuery ="select syscolumns.name,systypes.name,syscolumns.length from syscolumns,systypes where syscolumns.xusertype=systypes.xusertype and syscolumns.id=object_id('@tableName')"; diff --git a/Ewide.NbzsZheliban/Service/DataService.cs b/Ewide.NbzsZheliban/Service/DataService.cs index 783dd24..46c0ee9 100644 --- a/Ewide.NbzsZheliban/Service/DataService.cs +++ b/Ewide.NbzsZheliban/Service/DataService.cs @@ -64,7 +64,7 @@ namespace Ewide.NbzsZheliban.Service var cardno = userinfoObj["idnum"].ToString(); var username = userinfoObj["username"].ToString(); //修改测试数据 - db.Ado.ExecuteCommand("update InvestigateTable set ExpropriatedCardNo='" + cardno + "' where id ='A80C1599-B658-4176-8CCF-DDA57A64254F' "); + //db.Ado.ExecuteCommand("update InvestigateTable set ExpropriatedCardNo='" + cardno + "' where id ='A80C1599-B658-4176-8CCF-DDA57A64254F' "); return await GetInfoByCardNoAsync(cardno, username); } /// @@ -110,7 +110,7 @@ namespace Ewide.NbzsZheliban.Service private async Task> GetPrjListAsync(IEnumerable list_dcbs) { //项目列表 - return await db.Ado.SqlQueryAsync("select a.ID Prjid,a.area,a.AreaID,a.HouseAcquisitionDepartment as zsbm,a.CollectDecisionNo1 as year,(isnull(a.CollectDecisionNoHeadName,'')+'['+cast(a.CollectDecisionNo1 as varchar)+']'+ isnull(cast(a.CollectDecisionNo2 as varchar),'')+'号') zsjdh,dbo.get_current_state(a.ID) CurrentState,NAME,CreateRecordTime from Projects a where ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') "); + return await db.Ado.SqlQueryAsync("select a.ID Prjid,a.area,a.AreaID,a.HouseAcquisitionDepartment as zsbm,a.CollectDecisionNo1 as year,(isnull(a.CollectDecisionNoHeadName,'')+'['+cast(a.CollectDecisionNo1 as varchar)+']'+ isnull(cast(a.CollectDecisionNo2 as varchar),'')+'号') zsjdh,dbo.get_current_state(a.ID) CurrentState,NAME,CreateRecordTime from Projects a where status = 2 and ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') "); } /// /// 分户评估 @@ -120,7 +120,7 @@ namespace Ewide.NbzsZheliban.Service private async Task> GetFHPGListAsync(string InvestigateTableID_param) { //分户评估 - return await db.Ado.SqlQueryAsync("select d.id,e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName,1 type from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName,2 type from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;"); + return await db.Ado.SqlQueryAsync("select d.id,e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName,1 type from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.IsPublic=1 and d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName,2 type from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.IsPublic=1 and d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;"); } /// /// 补偿协议 @@ -130,7 +130,7 @@ namespace Ewide.NbzsZheliban.Service private async Task> GetBCXYListAsync(string InvestigateTableID_param) { //补偿协议 - return await db.Ado.SqlQueryAsync("select d.id,isnull(d.CollectDecisionNoHeadName,'')+isnull(d.No1,'')+'-'+isnull(d.No2,'')+(case when (d.No3 is null or d.No3 = '') then '' else ('-'+d.No3) end ) XyNo,d.SwitchProductionWay,e.HouseAddress,d.SummationShouldCompensateMoney,e.ProjectId as PrjId,e.id dcbId,d.SignTime,1 type from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId,e.id dcbId,d.SignTime,2 type from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); "); + return await db.Ado.SqlQueryAsync("select d.id,isnull(d.CollectDecisionNoHeadName,'')+isnull(d.No1,'')+'-'+isnull(d.No2,'')+(case when (d.No3 is null or d.No3 = '') then '' else ('-'+d.No3) end ) XyNo,d.SwitchProductionWay,e.HouseAddress,d.SummationShouldCompensateMoney,e.ProjectId as PrjId,e.id dcbId,d.SignTime,1 type from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.IsInRecords = 1 and d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId,e.id dcbId,d.SignTime,2 type from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.IsInRecords = 1 and d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); "); } private async Task GetInfoByCardNoAsync(string cardno, string username) { @@ -391,12 +391,12 @@ namespace Ewide.NbzsZheliban.Service FHPG jzlrModel = null; if (type == 1) { - jzlrModel = db.Ado.SqlQuery("select a.ID,b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,a.AtticAssessedValue,1 Type from InvestigateTable_Assessment a inner join InvestigateTable b on a.InvestigateTableID=b.ID where a.ID=@ID", new { ID = id }).FirstOrDefault(); + jzlrModel = db.Ado.SqlQuery("select a.ID,b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,a.AtticAssessedValue,1 Type from InvestigateTable_Assessment a inner join InvestigateTable b on a.InvestigateTableID=b.ID where a.IsPublic=1 and a.ID=@ID", new { ID = id }).FirstOrDefault(); } else if (type == 2) { //非住宅 - jzlrModel = db.Ado.SqlQuery("select b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,2 Type from NonInvestigateTable_Assessment a inner join NonResidentialInvestigateTable b on a.NonInvestigateTableID=b.ID where a.ID=@ID", new { ID = id }).FirstOrDefault(); + jzlrModel = db.Ado.SqlQuery("select b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,2 Type from NonInvestigateTable_Assessment a inner join NonResidentialInvestigateTable b on a.NonInvestigateTableID=b.ID where a.IsPublic=1 and a.ID=@ID", new { ID = id }).FirstOrDefault(); } if (jzlrModel == null) throw Oops.Oh("ID有误"); diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll index 54432a2..d5d52f1 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb index 0ba9e66..2b2b25d 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.dll b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.dll index 23525d9..cd3d485 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.dll and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.dll differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.pdb b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.pdb index 6d2be23..cdd322d 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.pdb and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.Core.pdb differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll index 5136516..21956eb 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb index ee00114..096e8a8 100644 Binary files a/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/bin/Release/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache index ae47fc9..5948b4a 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll index 54432a2..d5d52f1 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb index 0ba9e66..2b2b25d 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache index fbc3a9d..8617f5b 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.csproj.AssemblyReference.cache differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll index 5136516..21956eb 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb index ee00114..096e8a8 100644 Binary files a/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/obj/Release/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/README.md b/README.md index 89f10b2..15444f4 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,6 @@ http://op.zjzwfw.gov.cn/mobile/documents/technology/17111022678 接入流程 https://odynww.yuque.com/docs/share/525e3e8a-ad52-421b-90da-2d76808e3050#PzmJW 代码git -http://118.178.224.202:3000/ewide/zsxt_nbzs_h5 \ No newline at end of file +http://118.178.224.202:3000/ewide/zsxt_nbzs_h5 + +https://mapi.zjzwfw.gov.cn/web/mgop/gov-open/zj/2001833218/reserved/index.html#/?1=1&ticket=8a118a437c22b395017c2ba1be9e4d46-ticket \ No newline at end of file diff --git a/framework/Api/Ewide.Core/Attributes/OpAttribute.cs b/framework/Api/Ewide.Core/Attributes/OpAttribute.cs index 897608b..4ccb1c3 100644 --- a/framework/Api/Ewide.Core/Attributes/OpAttribute.cs +++ b/framework/Api/Ewide.Core/Attributes/OpAttribute.cs @@ -14,5 +14,6 @@ namespace Ewide.Core.Attributes this.logOpType = logOpType; } public int OpType { get => (int)logOpType; } + //测试修改 } } diff --git a/sql/ProjectsStep.sql b/sql/ProjectsStep.sql new file mode 100644 index 0000000..d268e9b --- /dev/null +++ b/sql/ProjectsStep.sql @@ -0,0 +1,154 @@ +/* + Navicat Premium Data Transfer + + Source Server : 118.178.224.202-SqlServer + Source Server Type : SQL Server + Source Server Version : 10501600 + Source Host : 118.178.224.202:1433 + Source Catalog : Nbcqb2 + Source Schema : dbo + + Target Server Type : SQL Server + Target Server Version : 10501600 + File Encoding : 65001 + + Date: 29/09/2021 18:22:48 +*/ + + +-- ---------------------------- +-- Table structure for ProjectsStep +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[ProjectsStep]') AND type IN ('U')) + DROP TABLE [dbo].[ProjectsStep] +GO + +CREATE TABLE [dbo].[ProjectsStep] ( + [ID] uniqueidentifier NOT NULL, + [ProjectID] uniqueidentifier NULL, + [StepNameID] uniqueidentifier NULL, + [StepName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [StepSort] int NULL, + [StepCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [StartTime] datetime NULL, + [EndTime] datetime NULL, + [IsFinish] bit NULL, + [CreateUserId] uniqueidentifier NULL, + [CreateUserName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [CreateTime] datetime NULL, + [UpdateUserId] uniqueidentifier NULL, + [UpdateUserName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [UpdateTime] datetime NULL +) +GO + +ALTER TABLE [dbo].[ProjectsStep] SET (LOCK_ESCALATION = TABLE) +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目ID', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'ProjectID' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段名称ID', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'StepNameID' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段名称', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'StepName' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段顺序', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'StepSort' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段惟一代码', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'StepCode' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段开始时间', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'StartTime' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'项目阶段结束时间', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'EndTime' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'是否结束', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'IsFinish' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'创建人ID', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'CreateUserId' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'创建人姓名', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'CreateUserName' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'创建时间', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'CreateTime' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'修改人ID', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'UpdateUserId' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'修改人姓名', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'UpdateUserName' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'修改时间', +'SCHEMA', N'dbo', +'TABLE', N'ProjectsStep', +'COLUMN', N'UpdateTime' +GO + + +-- ---------------------------- +-- Primary Key structure for table ProjectsStep +-- ---------------------------- +ALTER TABLE [dbo].[ProjectsStep] ADD CONSTRAINT [PK_ProjectsStep] PRIMARY KEY CLUSTERED ([ID]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO +