diff --git a/DataBase/版本日志/SGGLDB_WH_2024-02-26-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-02-26-gaofei.sql
new file mode 100644
index 00000000..1855763f
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-02-26-gaofei.sql
@@ -0,0 +1,54 @@
+alter table [dbo].[DriverRun_DriverRun] add InstallationId nvarchar(500) null
+GO
+alter table [dbo].[DriverRun_DriverRun] add InstallationNames nvarchar(500) null
+GO
+alter table [dbo].[DriverRun_DriverRun] add Objective nvarchar(500) null
+GO
+alter table [dbo].[DriverRun_DriverRun] add NeedCompletedDate datetime null
+GO
+alter table [dbo].[DriverRun_DriverRun] add CompileMan nvarchar(50) null
+GO
+alter table [dbo].[DriverRun_DriverRun] add CompileDate datetime null
+GO
+alter table [dbo].[DriverRun_DriverRun] add State char(1) null
+GO
+alter table [dbo].[DriverRun_DriverRun] add RealCompletedDate datetime null
+GO
+alter table [dbo].[DriverPrepare_SchemePlanItem] add FileCode nvarchar(100) null
+GO
+alter table [dbo].[DriverPrepare_SchemePlanItem] add CompileMan nvarchar(50) null
+GO
+alter table [dbo].[DriverPrepare_SchemePlanItem] add PlanCompletedDate datetime null
+GO
+
+CREATE TABLE [dbo].[DriverRun_DriverRunApprove](
+ [DriverRunApproveId] [nvarchar](50) NOT NULL,
+ [DriverRunId] [nvarchar](50) NULL,
+ [ApproveMan] [nvarchar](50) NULL,
+ [ApproveDate] [datetime] NULL,
+ [IsAgree] [bit] NULL,
+ [ApproveIdea] [nvarchar](200) NULL,
+ [ApproveType] [char](1) NULL,
+ [AttachUrl] [nvarchar](200) NULL,
+ CONSTRAINT [PK_DriverRun_DriverRunApprove] PRIMARY KEY CLUSTERED
+(
+ [DriverRunApproveId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+SET ANSI_PADDING OFF
+GO
+
+ALTER TABLE [dbo].[DriverRun_DriverRunApprove] WITH CHECK ADD CONSTRAINT [FK_DriverRun_DriverRunApprove_DriverRun_DriverRun] FOREIGN KEY([DriverRunId])
+REFERENCES [dbo].[DriverRun_DriverRun] ([DriverRunId])
+GO
+
+ALTER TABLE [dbo].[DriverRun_DriverRunApprove] CHECK CONSTRAINT [FK_DriverRun_DriverRunApprove_DriverRun_DriverRun]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DriverRun_DriverRunApprove'
+GO
+
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index af7de356..a1546ac2 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -744,6 +744,7 @@
+
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index a96ed1c0..07121580 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -4748,6 +4748,39 @@ namespace BLL
#endregion
+ #region 试车流程定义
+ #region 开车保运管理流程定义
+ ///
+ /// 编制
+ ///
+ public const string DriverRun_Compile = "1";
+
+ ///
+ /// 开车负责人审批
+ ///
+ public static string DriverRun_Audit1 = "2";
+
+ ///
+ /// 保运主任审批
+ ///
+ public static string DriverRun_Audit2 = "3";
+
+ ///
+ /// 保运主任确认完成
+ ///
+ public static string DriverRun_Audit3 = "4";
+
+ ///
+ /// 开车负责人确认完成
+ ///
+ public static string DriverRun_Audit4 = "5";
+
+ ///
+ /// 流程闭环
+ ///
+ public static string DriverRun_Complete = "6";
+ #endregion
+ #endregion
#region 施工综合
#region 菜单Id
diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs
index 7f59e4a1..9d6a40c2 100644
--- a/SGGL/BLL/SysManage/UserService.cs
+++ b/SGGL/BLL/SysManage/UserService.cs
@@ -928,6 +928,18 @@ namespace BLL
}
}
+ public static void Init2(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetMainUserList(projectId);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
///
/// ʩλλ̡רҵȡ鿴Ϣû
///
diff --git a/SGGL/BLL/TestRun/DriverRun/DriverRunApproveService.cs b/SGGL/BLL/TestRun/DriverRun/DriverRunApproveService.cs
new file mode 100644
index 00000000..c999fe34
--- /dev/null
+++ b/SGGL/BLL/TestRun/DriverRun/DriverRunApproveService.cs
@@ -0,0 +1,273 @@
+using Newtonsoft.Json.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public class DriverRunApproveService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+ ///
+ /// 获取开车保运管理模板列表
+ ///
+ ///
+ ///
+ ///
+ public static DataTable getListData(string DriverRunId)
+ {
+ var res = from x in db.DriverRun_DriverRunApprove
+ where x.DriverRunId == DriverRunId && x.ApproveDate != null && x.ApproveType != "S"
+ orderby x.ApproveDate
+ select new
+ {
+ x.DriverRunApproveId,
+ x.DriverRunId,
+ ApproveMan = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(),
+ x.ApproveDate,
+ x.IsAgree,
+ x.ApproveIdea,
+ x.ApproveType,
+ };
+ return Funs.LINQToDataTable(res);
+ }
+ ///
+ /// 根据开车保运管理编号删除对应的所有开车保运管理审批信息
+ ///
+ /// 开车保运管理编号
+ public static void DeleteDriverRunApprovesByDriverRunId(string DriverRunId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.DriverRun_DriverRunApprove where x.DriverRunId == DriverRunId select x).ToList();
+ db.DriverRun_DriverRunApprove.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ ///
+ /// 获取登录人的通知信息
+ ///
+ ///
+ ///
+ ///
+ public static IQueryable getList(string userId)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var res = from x in db.DriverRun_DriverRunApprove
+ join ca in db.DriverRun_DriverRun on x.DriverRunId equals ca.DriverRunId
+ where x.ApproveDate == null && x.ApproveType == "S" && x.ApproveMan == userId
+ orderby x.ApproveDate
+ select new
+ {
+ //x.DriverRunApproveId,
+ x.DriverRunId,
+ //x.ApproveDate,
+ //x.IsAgree,
+ //x.ApproveIdea,
+ //x.ApproveType,
+ ca.Code
+ };
+ return res.AsQueryable().Distinct();
+ }
+ }
+ ///
+ /// 更新通知信息提醒
+ ///
+ ///
+ ///
+ ///
+ public static Model.DriverRun_DriverRunApprove GetSee(string DriverRunId, string userId)
+ {
+ return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
+ }
+ public static void See(string DriverRunId, string userId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var res = db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
+ if (res != null)
+ {
+ res.ApproveDate = DateTime.Now;
+ db.SubmitChanges();
+ }
+ }
+ }
+ ///
+ /// 根据开车保运管理编号获取一个开车保运管理审批信息
+ ///
+ /// 开车保运管理编号
+ /// 一个开车保运管理审批实体
+ public static Model.DriverRun_DriverRunApprove GetDriverRunApproveByDriverRunId(string DriverRunId)
+ {
+ return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType != "S" && x.ApproveDate == null);
+ }
+ ///
+ /// 修改开车保运管理审批信息
+ ///
+ /// 开车保运管理审批实体
+ public static void UpdateDriverRunApprove(Model.DriverRun_DriverRunApprove approve)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.First(e => e.DriverRunApproveId == approve.DriverRunApproveId && e.ApproveDate == null);
+ newApprove.DriverRunId = approve.DriverRunId;
+ newApprove.ApproveMan = approve.ApproveMan;
+ newApprove.ApproveDate = approve.ApproveDate;
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ newApprove.IsAgree = approve.IsAgree;
+ newApprove.ApproveType = approve.ApproveType;
+
+ db.SubmitChanges();
+ }
+ ///
+ /// 增加开车保运管理审批信息
+ ///
+ /// 开车保运管理审批实体
+ public static void AddDriverRunApprove(Model.DriverRun_DriverRunApprove approve)
+ {
+ Model.SGGLDB db = Funs.DB;
+ string newKeyID = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRunApprove));
+ Model.DriverRun_DriverRunApprove newApprove = new Model.DriverRun_DriverRunApprove();
+ newApprove.DriverRunApproveId = newKeyID;
+ newApprove.DriverRunId = approve.DriverRunId;
+ newApprove.ApproveMan = approve.ApproveMan;
+ newApprove.ApproveDate = approve.ApproveDate;
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ newApprove.IsAgree = approve.IsAgree;
+ newApprove.ApproveType = approve.ApproveType;
+ db.DriverRun_DriverRunApprove.InsertOnSubmit(newApprove);
+ db.SubmitChanges();
+
+ }
+ public static string AddDriverRunApproveForApi(Model.DriverRun_DriverRunApprove approve)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ string newKeyID = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRunApprove));
+ Model.DriverRun_DriverRunApprove newApprove = new Model.DriverRun_DriverRunApprove();
+ newApprove.DriverRunApproveId = newKeyID;
+ newApprove.DriverRunId = approve.DriverRunId;
+ newApprove.ApproveMan = approve.ApproveMan;
+ newApprove.ApproveDate = approve.ApproveDate;
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ newApprove.IsAgree = approve.IsAgree;
+ newApprove.ApproveType = approve.ApproveType;
+
+ db.DriverRun_DriverRunApprove.InsertOnSubmit(newApprove);
+ db.SubmitChanges();
+ return newKeyID;
+ }
+ }
+ ///
+ /// 开车负责人审批信息
+ ///
+ ///
+ ///
+ public static Model.DriverRun_DriverRunApprove GetAudit1(string DriverRunId)
+ {
+ return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit1);
+ }
+
+ ///
+ /// 保运主任审批信息
+ ///
+ ///
+ ///
+ public static Model.DriverRun_DriverRunApprove GetAudit2(string DriverRunId)
+ {
+ return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit2);
+ }
+
+ ///
+ /// 分包负责人审批信息
+ ///
+ ///
+ ///
+ public static Model.DriverRun_DriverRunApprove GetAudit3(string DriverRunId)
+ {
+ return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit3);
+ }
+
+ public static Model.DriverRun_DriverRunApprove GetComplie(string DriverRunId)
+ {
+ return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Compile);
+ }
+ public static List GetListDataByCodeForApi(string code)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q = from x in db.DriverRun_DriverRunApprove
+ where x.DriverRunId == code && x.ApproveDate != null && x.ApproveType != "S"
+ orderby x.ApproveDate
+ select new
+ {
+ x.DriverRunApproveId,
+ x.DriverRunId,
+ ApproveMan = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(),
+ x.ApproveDate,
+ x.IsAgree,
+ x.ApproveIdea,
+ x.ApproveType,
+ };
+ List res = new List();
+ var list = q.ToList();
+ foreach (var item in list)
+ {
+ Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
+ approve.DriverRunApproveId = item.DriverRunApproveId;
+ approve.DriverRunId = item.DriverRunId;
+ approve.ApproveMan = item.ApproveMan;
+ approve.ApproveDate = item.ApproveDate;
+ approve.IsAgree = item.IsAgree;
+ approve.ApproveIdea = item.ApproveIdea;
+ approve.ApproveType = item.ApproveType;
+ res.Add(approve);
+ }
+ return res;
+ }
+ }
+ public static Model.DriverRun_DriverRunApprove getCurrApproveForApi(string DriverRunId)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.FirstOrDefault(e => e.DriverRunId == DriverRunId && e.ApproveType != "S" && e.ApproveDate == null);
+ if (newApprove != null)
+ {
+ Model.Sys_User user = BLL.UserService.GetUserByUserId(newApprove.ApproveMan);
+ if (user != null)
+ {
+ newApprove.ApproveIdea = user.UserName;
+ }
+ }
+ return newApprove;
+ }
+ }
+ public static void UpdateDriverRunApproveForApi(Model.DriverRun_DriverRunApprove approve)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.FirstOrDefault(e => e.DriverRunApproveId == approve.DriverRunApproveId && e.ApproveDate == null);
+ if (newApprove != null)
+ {
+ if (!string.IsNullOrEmpty(approve.DriverRunId))
+ {
+ newApprove.DriverRunId = approve.DriverRunId;
+ }
+ if (!string.IsNullOrEmpty(approve.ApproveMan))
+ newApprove.ApproveMan = approve.ApproveMan;
+ if (approve.ApproveDate.HasValue)
+ newApprove.ApproveDate = approve.ApproveDate;
+ if (!string.IsNullOrEmpty(approve.ApproveIdea))
+ newApprove.ApproveIdea = approve.ApproveIdea;
+ if (approve.IsAgree.HasValue)
+ newApprove.IsAgree = approve.IsAgree;
+ if (!string.IsNullOrEmpty(approve.ApproveType))
+ newApprove.ApproveType = approve.ApproveType;
+
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs b/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs
index 668efa2c..d90ec97e 100644
--- a/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs
+++ b/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs
@@ -1,15 +1,17 @@
-using System;
+using Model;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Web.UI.WebControls;
namespace BLL
{
///
/// 开车保运管理
///
- public static class DriverRunService
+ public static class DriverRunService
{
///
/// 根据主键获取开车保运管理
@@ -34,8 +36,15 @@ namespace BLL
newDriverRun.UnitId = driverRun.UnitId;
newDriverRun.Implement = driverRun.Implement;
newDriverRun.Descriptions = driverRun.Descriptions;
+ newDriverRun.InstallationId = driverRun.InstallationId;
+ newDriverRun.InstallationNames = driverRun.InstallationNames;
+ newDriverRun.Objective = driverRun.Objective;
+ newDriverRun.NeedCompletedDate = driverRun.NeedCompletedDate;
+ newDriverRun.CompileMan = driverRun.CompileMan;
+ newDriverRun.CompileDate = driverRun.CompileDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
+ newDriverRun.State = driverRun.State;
Funs.DB.DriverRun_DriverRun.InsertOnSubmit(newDriverRun);
Funs.DB.SubmitChanges();
}
@@ -54,8 +63,14 @@ namespace BLL
newDriverRun.UnitId = driverRun.UnitId;
newDriverRun.Implement = driverRun.Implement;
newDriverRun.Descriptions = driverRun.Descriptions;
+ newDriverRun.InstallationId = driverRun.InstallationId;
+ newDriverRun.InstallationNames = driverRun.InstallationNames;
+ newDriverRun.Objective = driverRun.Objective;
+ newDriverRun.NeedCompletedDate = driverRun.NeedCompletedDate;
+ newDriverRun.RealCompletedDate = driverRun.RealCompletedDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
+ newDriverRun.State = driverRun.State;
Funs.DB.SubmitChanges();
}
}
@@ -77,5 +92,163 @@ namespace BLL
Funs.DB.SubmitChanges();
}
}
+
+ public static Model.DriverRun_DriverRun GetDriverRunForApi(string driverRunId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.DriverRun_DriverRun x = db.DriverRun_DriverRun.FirstOrDefault(e => e.DriverRunId == driverRunId);
+ return x;
+ }
+ }
+
+ public static void Init(FineUIPro.DropDownList dropName, string state, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetDHandleTypeByState(state);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
+ ///
+ /// 根据状态选择下一步办理类型
+ ///
+ ///
+ ///
+ public static ListItem[] GetDHandleTypeByState(string state)
+ {
+ if (state == Const.DriverRun_Compile) //无是否同意
+ {
+ ListItem[] lis = new ListItem[1];
+ lis[0] = new ListItem("开车负责人审批", Const.DriverRun_Audit1);
+ return lis;
+ }
+ else if (state == Const.DriverRun_Audit1)//有是否同意
+ {
+ ListItem[] lis = new ListItem[1];
+ lis[0] = new ListItem("保运主任审批", Const.DriverRun_Audit2);//是 加载
+ return lis;
+ }
+ else if (state == Const.DriverRun_Audit2)//无是否同意
+ {
+ ListItem[] lis = new ListItem[1];
+ lis[0] = new ListItem("保运主任确认完成", Const.DriverRun_Audit3);
+ return lis;
+ }
+ else if (state == Const.DriverRun_Audit3)//无是否同意
+ {
+ ListItem[] lis = new ListItem[1];
+ lis[0] = new ListItem("开车负责人确认完成", Const.DriverRun_Audit4);
+ return lis;
+ }
+ else if (state == Const.DriverRun_Audit4)//有是否同意
+ {
+ ListItem[] lis = new ListItem[1];
+ lis[0] = new ListItem("流程闭环", Const.DriverRun_Complete);//是 加载
+ return lis;
+ }
+ else
+ return null;
+ }
+
+ public static List GetListDataForApi(string state, string projectId, int index, int page)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.DriverRun_DriverRun;
+ List ids = new List();
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+ if (!string.IsNullOrEmpty(state))
+ {
+ q = q.Where(e => e.State == state);
+ }
+ var qq1 = from x in q
+ orderby x.Code descending
+ select new
+ {
+ x.DriverRunId,
+ x.ProjectId,
+ x.UnitId,
+ x.Code,
+ x.Descriptions,
+ x.InstallationId,
+ x.InstallationNames,
+ x.State,
+ x.Objective,
+ x.NeedCompletedDate,
+ x.AttachUrl,
+ };
+ var list = qq1.Skip(index * page).Take(page).ToList();
+
+ List listRes = new List();
+ for (int i = 0; i < list.Count; i++)
+ {
+ Model.DriverRun_DriverRun x = new Model.DriverRun_DriverRun();
+ x.DriverRunId = list[i].DriverRunId;
+ x.ProjectId = list[i].ProjectId;
+ x.Code = list[i].Code;
+ x.UnitId = list[i].UnitId + "$" + UnitService.GetUnitNameByUnitId(list[i].UnitId);
+ x.Descriptions = list[i].Descriptions;
+ x.State = list[i].State;
+ x.InstallationId = list[i].InstallationId;
+ x.InstallationNames = list[i].InstallationNames;
+ x.Objective = list[i].Objective;
+ x.NeedCompletedDate = list[i].NeedCompletedDate;
+ x.AttachUrl = list[i].AttachUrl;
+ listRes.Add(x);
+ }
+ return listRes;
+ }
+ }
+
+ public static void UpdateDriverRunForApi(Model.DriverRun_DriverRun DriverRun)
+ {
+
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.DriverRun_DriverRun newDriverRun = db.DriverRun_DriverRun.First(e => e.DriverRunId == DriverRun.DriverRunId);
+ if (!string.IsNullOrEmpty(DriverRun.Code))
+ newDriverRun.Code = DriverRun.Code;
+ if (!string.IsNullOrEmpty(DriverRun.UnitId))
+ newDriverRun.UnitId = DriverRun.UnitId;
+ if (!string.IsNullOrEmpty(DriverRun.Descriptions))
+ newDriverRun.Descriptions = DriverRun.Descriptions;
+ if (!string.IsNullOrEmpty(DriverRun.State))
+ newDriverRun.State = DriverRun.State;
+ if (DriverRun.NeedCompletedDate.HasValue)
+ newDriverRun.NeedCompletedDate = DriverRun.NeedCompletedDate;
+ if (DriverRun.RealCompletedDate.HasValue)
+ newDriverRun.RealCompletedDate = DriverRun.RealCompletedDate;
+ if (!string.IsNullOrEmpty(DriverRun.InstallationId))
+ newDriverRun.InstallationId = DriverRun.InstallationId;
+ if (!string.IsNullOrEmpty(DriverRun.InstallationNames))
+ newDriverRun.InstallationNames = DriverRun.InstallationNames;
+ if (!string.IsNullOrEmpty(DriverRun.Objective))
+ newDriverRun.Objective = DriverRun.Objective;
+ db.SubmitChanges();
+ }
+ }
+
+ public static int GetListCount(string projectId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable q = db.DriverRun_DriverRun;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ q = q.Where(e => e.ProjectId == projectId);
+ }
+
+ return q.Count();
+ }
+
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划.xlsx b/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划.xlsx
index a5f6269c..6549d73c 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划.xlsx and b/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划.xlsx differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划2.xlsx b/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划2.xlsx
index f1593bea..a7aa9839 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划2.xlsx and b/SGGL/FineUIPro.Web/File/Excel/TestRun/开车方案编制计划2.xlsx differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 5e32514c..e17af7a3 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1753,6 +1753,7 @@
+
@@ -15819,6 +15820,13 @@
DriverRunPlanEdit.aspx
+
+ DriverRunView.aspx
+ ASPXCodeBehind
+
+
+ DriverRunView.aspx
+
DriverScheme.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx
index 209da8ac..b2d11933 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx
+++ b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx
@@ -21,6 +21,9 @@
+
+
@@ -41,6 +44,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.cs
index 0300fd86..6c60d2a6 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.cs
@@ -277,10 +277,18 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
cell.SetCellValue(item.SolutionName);
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
+ cell.SetCellValue(item.FileCode);
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
+ cell.SetCellValue(item.CompileMan);
+ cell = row.CreateCell(4);
+ cell.CellStyle = cellStyle;
+ string date = string.Empty;
+ if (item.PlanCompletedDate != null)
+ {
+ date = string.Format("{0:yyyy-MM-dd}", item.PlanCompletedDate);
+ }
+ cell.SetCellValue(date);
i++;
}
// 第三步:写入文件流
@@ -364,10 +372,18 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
cell.SetCellValue(item.SolutionName);
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
+ cell.SetCellValue(item.FileCode);
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
+ cell.SetCellValue(item.CompileMan);
+ cell = row.CreateCell(5);
+ cell.CellStyle = cellStyle;
+ string date = string.Empty;
+ if (item.PlanCompletedDate != null)
+ {
+ date = string.Format("{0:yyyy-MM-dd}", item.PlanCompletedDate);
+ }
+ cell.SetCellValue(date);
if (type != item.SolutionType)
{
type = item.SolutionType;
@@ -408,5 +424,28 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
}
}
#endregion
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var items = from x in db.DriverPrepare_SchemePlanItem
+ join y in db.DriverPrepare_SchemePlan on x.SchemePlanId equals y.SchemePlanId
+ where y.ProjectId == this.CurrUser.LoginProjectId
+ select x;
+ foreach (JObject mergedRow in Grid1.GetMergedData())
+ {
+ JObject values = mergedRow.Value("values");
+ int i = mergedRow.Value("index");
+ var item = items.FirstOrDefault(x => x.SchemePlanItemId == this.Grid1.Rows[i].DataKeys[0].ToString());
+ if (item != null)
+ {
+ item.FileCode = values.Value("FileCode");
+ item.CompileMan = values.Value("CompileMan");
+ item.PlanCompletedDate = Funs.GetNewDateTime(values.Value("PlanCompletedDate"));
+ db.SubmitChanges();
+ }
+ }
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.designer.cs
index 47e4ff3c..d67fc6a0 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/TestRun/DriverPrepare/SchemePlan.aspx.designer.cs
@@ -66,6 +66,15 @@ namespace FineUIPro.Web.TestRun.DriverPrepare {
///
protected global::FineUIPro.TextBox hdItemsString;
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
///
/// btnSelect 控件。
///
@@ -102,6 +111,33 @@ namespace FineUIPro.Web.TestRun.DriverPrepare {
///
protected global::FineUIPro.Button btnDel;
+ ///
+ /// txtFileCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtFileCode;
+
+ ///
+ /// txtCompileMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCompileMan;
+
+ ///
+ /// txtPlanCompletedDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPlanCompletedDate;
+
///
/// Window1 控件。
///
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRun.aspx b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRun.aspx
index f70b7302..c23634a3 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRun.aspx
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRun.aspx
@@ -9,7 +9,7 @@
-
\ No newline at end of file
+
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.cs
index 3501ffd1..281b217c 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.cs
@@ -5,6 +5,21 @@ namespace FineUIPro.Web.TestRun.DriverRun
{
public partial class DriverRunEdit : PageBase
{
+ ///
+ /// 办理类型
+ ///
+ public string State
+ {
+ get
+ {
+ return (string)ViewState["State"];
+ }
+ set
+ {
+ ViewState["State"] = value;
+ }
+ }
+
#region 加载
///
/// 页面加载
@@ -16,32 +31,104 @@ namespace FineUIPro.Web.TestRun.DriverRun
if (!IsPostBack)
{
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
- this.drpImplement.DataTextField = "Text";
- this.drpImplement.DataValueField = "Value";
- this.drpImplement.DataSource = BLL.DropListService.drpDriverRunImplementItemList();
- this.drpImplement.DataBind();
- Funs.FineUIPleaseSelect(this.drpImplement);
-
+ BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
+ plApprove1.Hidden = true;
+ plApprove2.Hidden = true;
+ txtRealCompletedDate.Hidden = true;
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
if (data != null)
{
+ plApprove1.Hidden = false;
+ plApprove2.Hidden = false;
+ var dt = DriverRunApproveService.getListData(id);
+ gvApprove.DataSource = dt;
+ gvApprove.DataBind();
this.hdId.Text = id;
this.txtCode.Text = data.Code;
if (!string.IsNullOrEmpty(data.UnitId))
{
this.drpUnitId.SelectedValue = data.UnitId;
}
- if (!string.IsNullOrEmpty(data.Code))
- {
- this.drpImplement.SelectedValue = data.Code;
- }
+ this.drpUnitWorkIds.SelectedValueArray = data.InstallationId.Split(',');
this.txtDescriptions.Text = data.Descriptions;
- this.txtRemark.Text = data.Remark;
+ this.txtObjective.Text = data.Objective;
+ if (data.NeedCompletedDate != null)
+ {
+ this.txtNeedCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.NeedCompletedDate);
+ }
+ if (data.RealCompletedDate != null)
+ {
+ this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
+ }
+ if (!string.IsNullOrEmpty(data.State))
+ {
+ State = data.State;
+ }
+ else
+ {
+ State = BLL.Const.DriverRun_Compile;
+ }
+ if (State != BLL.Const.DriverRun_Complete)
+ {
+ DriverRunService.Init(drpHandleType, State, false);
+ }
+ if (State == BLL.Const.DriverRun_Compile)
+ {
+ UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
+ this.drpHandleMan.SelectedIndex = 1;
+ }
+ else
+ {
+ if (State == BLL.Const.DriverRun_Audit2)
+ {
+ Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetAudit2(id);
+ if (approve != null)
+ {
+ ListItem[] list = new ListItem[1];
+ list[0] = new ListItem(BLL.UserService.GetUserByUserId(approve.ApproveMan).UserName ?? "", approve.ApproveMan);
+ drpHandleMan.DataValueField = "Value";
+ drpHandleMan.DataTextField = "Text";
+ drpHandleMan.DataSource = list;
+ drpHandleMan.DataBind();
+ }
+ }
+ else if (State == BLL.Const.DriverRun_Audit3)
+ {
+ txtRealCompletedDate.Hidden = false;
+ Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetAudit1(id);
+ if (approve != null)
+ {
+ ListItem[] list = new ListItem[1];
+ list[0] = new ListItem(BLL.UserService.GetUserByUserId(approve.ApproveMan).UserName ?? "", approve.ApproveMan);
+ drpHandleMan.DataValueField = "Value";
+ drpHandleMan.DataTextField = "Text";
+ drpHandleMan.DataSource = list;
+ drpHandleMan.DataBind();
+ }
+ }
+ else if (State == BLL.Const.DriverRun_Audit4)
+ {
+ txtRealCompletedDate.Hidden = false;
+ drpHandleMan.Items.Clear();
+ drpHandleMan.Enabled = false;
+ }
+ else
+ {
+ UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
+ }
+ }
+ this.txtOpinions.Text = "同意";
}
}
+ else
+ {
+ State = Const.DriverRun_Compile;
+ DriverRunService.Init(drpHandleType, State, false);
+ UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
+ }
}
}
#endregion
@@ -62,7 +149,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
#endregion
- #region 保存
+ #region 保存/提交
///
/// 保存按钮
///
@@ -70,16 +157,50 @@ namespace FineUIPro.Web.TestRun.DriverRun
///
protected void btnSave_Click(object sender, EventArgs e)
{
- if (this.drpImplement.SelectedValue == BLL.Const._Null)
- {
- Alert.ShowInTop("请选择记录/报告/执行情况!", MessageBoxIcon.Warning);
- return;
- }
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
return;
}
+ if (this.drpUnitWorkIds.SelectedValue == BLL.Const._Null)
+ {
+ Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
+ {
+ Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
+ return;
+ }
+ SaveData("save");
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ protected void btnSubmit_Click(object sender, EventArgs e)
+ {
+ if (this.drpUnitId.SelectedValue == BLL.Const._Null)
+ {
+ Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (this.drpUnitWorkIds.SelectedValue == BLL.Const._Null)
+ {
+ Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
+ {
+ Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
+ return;
+ }
+ SaveData("submit");
+ ShowNotify("提交成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ private void SaveData(string saveType)
+ {
string id = Request.Params["id"];
Model.DriverRun_DriverRun newData = new Model.DriverRun_DriverRun();
newData.Code = this.txtCode.Text.Trim();
@@ -87,15 +208,77 @@ namespace FineUIPro.Web.TestRun.DriverRun
{
newData.UnitId = this.drpUnitId.SelectedValue;
}
- if (this.drpImplement.SelectedValue != BLL.Const._Null)
+ if (!string.IsNullOrEmpty(this.drpUnitWorkIds.SelectedValue))
{
- newData.Implement = this.drpImplement.SelectedItem.Text;
+ newData.InstallationId = GetStringByArray(this.drpUnitWorkIds.SelectedValueArray);
+ string unitWorkNames = string.Empty;
+ foreach (var item in this.drpUnitWorkIds.SelectedValueArray)
+ {
+ var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(item);
+ if (unitWork != null)
+ {
+ unitWorkNames += unitWork.UnitWorkName + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(unitWorkNames))
+ {
+ newData.InstallationNames = unitWorkNames.Substring(0, unitWorkNames.LastIndexOf(","));
+ }
}
newData.Descriptions = this.txtDescriptions.Text.Trim();
- newData.Remark = this.txtRemark.Text.Trim();
+ newData.Objective = this.txtObjective.Text.Trim();
+ newData.NeedCompletedDate = Funs.GetNewDateTime(this.txtNeedCompletedDate.Text.Trim());
newData.ProjectId = this.CurrUser.LoginProjectId;
+ newData.RealCompletedDate = Funs.GetNewDateTime(this.txtRealCompletedDate.Text.Trim());
+ if (saveType == "submit")
+ {
+ newData.State = drpHandleType.SelectedValue.Trim();
+ }
+ else
+ {
+ Model.DriverRun_DriverRun newData1 = BLL.DriverRunService.GetDriverRunById(id);
+
+ if (newData1 != null)
+ {
+ if (string.IsNullOrEmpty(newData1.State))
+ {
+ newData.State = BLL.Const.DriverRun_Compile;
+ }
+ else
+ {
+ newData.State = newData1.State;
+ }
+ }
+ else
+ {
+ newData.State = BLL.Const.DriverRun_Compile;
+ }
+ }
if (!string.IsNullOrEmpty(id))
{
+ Model.DriverRun_DriverRunApprove approve1 = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(id);
+ if (approve1 != null && saveType == "submit")
+ {
+ approve1.ApproveDate = DateTime.Now;
+ approve1.ApproveIdea = txtOpinions.Text.Trim();
+ BLL.DriverRunApproveService.UpdateDriverRunApprove(approve1);
+ }
+ if (saveType == "submit" && !string.IsNullOrEmpty(this.drpHandleMan.SelectedValue))
+ {
+ Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
+ approve.DriverRunId = id;
+ if (!string.IsNullOrEmpty(this.drpHandleMan.SelectedValue))
+ {
+ approve.ApproveMan = this.drpHandleMan.SelectedValue;
+ }
+ approve.ApproveType = this.drpHandleType.SelectedValue;
+ if (this.drpHandleType.SelectedValue == BLL.Const.DriverRun_Complete)
+ {
+ approve.ApproveDate = DateTime.Now;
+ }
+ BLL.DriverRunApproveService.AddDriverRunApprove(approve);
+ APICommonService.SendSubscribeMessage(approve.ApproveMan, "开车保运委托单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
+ }
newData.DriverRunId = id;
BLL.DriverRunService.UpdateDriverRun(newData);
}
@@ -110,25 +293,97 @@ namespace FineUIPro.Web.TestRun.DriverRun
newData.DriverRunId = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRun));
this.hdId.Text = newData.DriverRunId;
}
+ newData.CompileMan = this.CurrUser.UserId;
+ newData.CompileDate = DateTime.Now;
BLL.DriverRunService.AddDriverRun(newData);
+ if (saveType == "submit")
+ {
+ Model.DriverRun_DriverRunApprove approve1 = new Model.DriverRun_DriverRunApprove();
+ approve1.DriverRunId = newData.DriverRunId;
+ approve1.ApproveDate = DateTime.Now;
+ approve1.ApproveMan = this.CurrUser.UserId;
+ approve1.ApproveType = BLL.Const.DriverRun_Compile;
+ BLL.DriverRunApproveService.AddDriverRunApprove(approve1);
+
+ Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
+ approve.DriverRunId = newData.DriverRunId;
+ if (this.drpHandleMan.SelectedValue != "0")
+ {
+ approve.ApproveMan = this.drpHandleMan.SelectedValue;
+ }
+ approve.ApproveType = this.drpHandleType.SelectedValue;
+
+ BLL.DriverRunApproveService.AddDriverRunApprove(approve);
+ APICommonService.SendSubscribeMessage(approve.ApproveMan, "开车保运委托单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
+ }
+ else
+ {
+ Model.DriverRun_DriverRunApprove approve1 = new Model.DriverRun_DriverRunApprove();
+ approve1.DriverRunId = newData.DriverRunId;
+ approve1.ApproveMan = this.CurrUser.UserId;
+ approve1.ApproveType = BLL.Const.DriverRun_Compile;
+ BLL.DriverRunApproveService.AddDriverRunApprove(approve1);
+ }
}
- ShowNotify("保存成功!", MessageBoxIcon.Success);
- PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ private string GetStringByArray(string[] array)
+ {
+ string str = string.Empty;
+ foreach (var item in array)
+ {
+ if (item != BLL.Const._Null)
+ {
+ str += item + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(str))
+ {
+ str = str.Substring(0, str.LastIndexOf(","));
+ }
+ return str;
}
#endregion
- #region DropDownList下拉选择事件
- protected void drpImplement_SelectedIndexChanged(object sender, EventArgs e)
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ protected string ConvertState(object state)
{
- if (this.drpImplement.SelectedValue == BLL.Const._Null)
+ if (state != null)
{
- this.txtCode.Text = string.Empty;
- }
- else
- {
- this.txtCode.Text = this.drpImplement.SelectedValue;
+ if (state.ToString() == BLL.Const.DriverRun_Compile)
+ {
+ return "编制";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit1)
+ {
+ return "开车负责人审批";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit2)
+ {
+ return "保运主任审批";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit3)
+ {
+ return "保运主任确认完成";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit4)
+ {
+ return "开车负责人确认完成";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Complete)
+ {
+ return "流程闭环";
+ }
+ else
+ {
+ return "";
+ }
}
+ return "";
}
- #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.designer.cs
index 74c39a17..6a62700c 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunEdit.aspx.designer.cs
@@ -66,6 +66,15 @@ namespace FineUIPro.Web.TestRun.DriverRun {
///
protected global::FineUIPro.Button btnSave;
+ ///
+ /// btnSubmit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSubmit;
+
///
/// hdAttachUrl 控件。
///
@@ -102,15 +111,6 @@ namespace FineUIPro.Web.TestRun.DriverRun {
///
protected global::FineUIPro.Form Form2;
- ///
- /// drpImplement 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpImplement;
-
///
/// txtCode 控件。
///
@@ -129,6 +129,15 @@ namespace FineUIPro.Web.TestRun.DriverRun {
///
protected global::FineUIPro.DropDownList drpUnitId;
+ ///
+ /// drpUnitWorkIds 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitWorkIds;
+
///
/// txtDescriptions 控件。
///
@@ -139,13 +148,31 @@ namespace FineUIPro.Web.TestRun.DriverRun {
protected global::FineUIPro.TextArea txtDescriptions;
///
- /// txtRemark 控件。
+ /// txtObjective 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextArea txtRemark;
+ protected global::FineUIPro.TextArea txtObjective;
+
+ ///
+ /// txtNeedCompletedDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtNeedCompletedDate;
+
+ ///
+ /// txtRealCompletedDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtRealCompletedDate;
///
/// Panel3 控件。
@@ -174,6 +201,87 @@ namespace FineUIPro.Web.TestRun.DriverRun {
///
protected global::FineUIPro.Button btnAttach;
+ ///
+ /// ContentPanel5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel5;
+
+ ///
+ /// Form5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form5;
+
+ ///
+ /// drpHandleType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHandleType;
+
+ ///
+ /// drpHandleMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHandleMan;
+
+ ///
+ /// plApprove1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove1;
+
+ ///
+ /// txtOpinions 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtOpinions;
+
+ ///
+ /// plApprove2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove2;
+
+ ///
+ /// gvApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvApprove;
+
+ ///
+ /// lbtype 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbtype;
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx
index 56d47f46..d22b8689 100644
--- a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx
@@ -20,9 +20,9 @@
-
+
+ EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Hidden="true">
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx
new file mode 100644
index 00000000..1103d6ec
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx
@@ -0,0 +1,124 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DriverRunView.aspx.cs" Inherits="FineUIPro.Web.TestRun.DriverRun.DriverRunView" %>
+
+
+
+
+
+
+ 查看开车保运管理
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.cs
new file mode 100644
index 00000000..688871a4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.cs
@@ -0,0 +1,136 @@
+using BLL;
+using System;
+
+namespace FineUIPro.Web.TestRun.DriverRun
+{
+ public partial class DriverRunView : PageBase
+ {
+ ///
+ /// 办理类型
+ ///
+ public string State
+ {
+ get
+ {
+ return (string)ViewState["State"];
+ }
+ set
+ {
+ ViewState["State"] = value;
+ }
+ }
+
+ #region 加载
+ ///
+ /// 页面加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
+ BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
+ string id = Request.Params["id"];
+ if (!string.IsNullOrEmpty(id))
+ {
+ Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
+ if (data != null)
+ {
+ var dt = DriverRunApproveService.getListData(id);
+ gvApprove.DataSource = dt;
+ gvApprove.DataBind();
+ this.hdId.Text = id;
+ this.txtCode.Text = data.Code;
+ if (!string.IsNullOrEmpty(data.UnitId))
+ {
+ this.drpUnitId.SelectedValue = data.UnitId;
+ }
+ this.drpUnitWorkIds.SelectedValueArray = data.InstallationId.Split(',');
+ this.txtDescriptions.Text = data.Descriptions;
+ this.txtObjective.Text = data.Objective;
+ if (data.NeedCompletedDate != null)
+ {
+ this.txtNeedCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.NeedCompletedDate);
+ }
+ if (data.RealCompletedDate != null)
+ {
+ this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
+ }
+ if (!string.IsNullOrEmpty(data.State))
+ {
+ State = data.State;
+ }
+ else
+ {
+ State = BLL.Const.DriverRun_Compile;
+ }
+ }
+ }
+ else
+ {
+ State = Const.DriverRun_Compile;
+ }
+ }
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 附件上传
+ ///
+ ///
+ ///
+ protected void btnAttach_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
+ {
+ this.hdId.Text = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRun));
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/DriverRun/DriverRun&menuId={1}", this.hdId.Text, BLL.Const.DriverRunMenuId)));
+ }
+ #endregion
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ protected string ConvertState(object state)
+ {
+ if (state != null)
+ {
+ if (state.ToString() == BLL.Const.DriverRun_Compile)
+ {
+ return "编制";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit1)
+ {
+ return "开车负责人审批";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit2)
+ {
+ return "保运主任审批";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit3)
+ {
+ return "保运主任确认完成";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Audit4)
+ {
+ return "开车负责人确认完成";
+ }
+ else if (state.ToString() == BLL.Const.DriverRun_Complete)
+ {
+ return "流程闭环";
+ }
+ else
+ {
+ return "";
+ }
+ }
+ return "";
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.designer.cs
new file mode 100644
index 00000000..228aa8de
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunView.aspx.designer.cs
@@ -0,0 +1,222 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.TestRun.DriverRun {
+
+
+ public partial class DriverRunView {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// hdAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdAttachUrl;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdId;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCode;
+
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
+ ///
+ /// drpUnitWorkIds 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitWorkIds;
+
+ ///
+ /// txtDescriptions 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtDescriptions;
+
+ ///
+ /// txtObjective 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtObjective;
+
+ ///
+ /// txtNeedCompletedDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtNeedCompletedDate;
+
+ ///
+ /// txtRealCompletedDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtRealCompletedDate;
+
+ ///
+ /// Panel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel3;
+
+ ///
+ /// lblAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblAttach;
+
+ ///
+ /// btnAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAttach;
+
+ ///
+ /// plApprove2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove2;
+
+ ///
+ /// gvApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvApprove;
+
+ ///
+ /// lbtype 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbtype;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index 56282e91..aae34665 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -77,7 +77,7 @@
-
+
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 2539bd46..837df833 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -770,6 +770,9 @@ namespace Model
partial void InsertDriverRun_DriverRun(DriverRun_DriverRun instance);
partial void UpdateDriverRun_DriverRun(DriverRun_DriverRun instance);
partial void DeleteDriverRun_DriverRun(DriverRun_DriverRun instance);
+ partial void InsertDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
+ partial void UpdateDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
+ partial void DeleteDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
partial void InsertDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
partial void UpdateDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
partial void DeleteDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
@@ -4533,6 +4536,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table DriverRun_DriverRunApprove
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table DriverRun_DriverRunContact
{
get
@@ -127179,6 +127190,12 @@ namespace Model
private string _SolutionType;
+ private string _FileCode;
+
+ private string _CompileMan;
+
+ private System.Nullable _PlanCompletedDate;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -127193,6 +127210,12 @@ namespace Model
partial void OnSortIndexChanged();
partial void OnSolutionTypeChanging(string value);
partial void OnSolutionTypeChanged();
+ partial void OnFileCodeChanging(string value);
+ partial void OnFileCodeChanged();
+ partial void OnCompileManChanging(string value);
+ partial void OnCompileManChanged();
+ partial void OnPlanCompletedDateChanging(System.Nullable value);
+ partial void OnPlanCompletedDateChanged();
#endregion
public DriverPrepare_SchemePlanItem()
@@ -127300,6 +127323,66 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileCode", DbType="NVarChar(100)")]
+ public string FileCode
+ {
+ get
+ {
+ return this._FileCode;
+ }
+ set
+ {
+ if ((this._FileCode != value))
+ {
+ this.OnFileCodeChanging(value);
+ this.SendPropertyChanging();
+ this._FileCode = value;
+ this.SendPropertyChanged("FileCode");
+ this.OnFileCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
+ public string CompileMan
+ {
+ get
+ {
+ return this._CompileMan;
+ }
+ set
+ {
+ if ((this._CompileMan != value))
+ {
+ this.OnCompileManChanging(value);
+ this.SendPropertyChanging();
+ this._CompileMan = value;
+ this.SendPropertyChanged("CompileMan");
+ this.OnCompileManChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanCompletedDate", DbType="DateTime")]
+ public System.Nullable PlanCompletedDate
+ {
+ get
+ {
+ return this._PlanCompletedDate;
+ }
+ set
+ {
+ if ((this._PlanCompletedDate != value))
+ {
+ this.OnPlanCompletedDateChanging(value);
+ this.SendPropertyChanging();
+ this._PlanCompletedDate = value;
+ this.SendPropertyChanged("PlanCompletedDate");
+ this.OnPlanCompletedDateChanged();
+ }
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -127343,10 +127426,28 @@ namespace Model
private string _Remark;
+ private string _InstallationId;
+
+ private string _InstallationNames;
+
+ private string _Objective;
+
+ private System.Nullable _NeedCompletedDate;
+
+ private string _CompileMan;
+
+ private System.Nullable _CompileDate;
+
+ private string _State;
+
+ private System.Nullable _RealCompletedDate;
+
private EntityRef _Base_Project;
private EntityRef _Base_Unit;
+ private EntitySet _DriverRun_DriverRunApprove;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -127367,12 +127468,29 @@ namespace Model
partial void OnAttachUrlChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
+ partial void OnInstallationIdChanging(string value);
+ partial void OnInstallationIdChanged();
+ partial void OnInstallationNamesChanging(string value);
+ partial void OnInstallationNamesChanged();
+ partial void OnObjectiveChanging(string value);
+ partial void OnObjectiveChanged();
+ partial void OnNeedCompletedDateChanging(System.Nullable value);
+ partial void OnNeedCompletedDateChanged();
+ partial void OnCompileManChanging(string value);
+ partial void OnCompileManChanged();
+ partial void OnCompileDateChanging(System.Nullable value);
+ partial void OnCompileDateChanged();
+ partial void OnStateChanging(string value);
+ partial void OnStateChanged();
+ partial void OnRealCompletedDateChanging(System.Nullable value);
+ partial void OnRealCompletedDateChanged();
#endregion
public DriverRun_DriverRun()
{
this._Base_Project = default(EntityRef);
this._Base_Unit = default(EntityRef);
+ this._DriverRun_DriverRunApprove = new EntitySet(new Action(this.attach_DriverRun_DriverRunApprove), new Action(this.detach_DriverRun_DriverRunApprove));
OnCreated();
}
@@ -127544,6 +127662,166 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationId", DbType="NVarChar(500)")]
+ public string InstallationId
+ {
+ get
+ {
+ return this._InstallationId;
+ }
+ set
+ {
+ if ((this._InstallationId != value))
+ {
+ this.OnInstallationIdChanging(value);
+ this.SendPropertyChanging();
+ this._InstallationId = value;
+ this.SendPropertyChanged("InstallationId");
+ this.OnInstallationIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationNames", DbType="NVarChar(500)")]
+ public string InstallationNames
+ {
+ get
+ {
+ return this._InstallationNames;
+ }
+ set
+ {
+ if ((this._InstallationNames != value))
+ {
+ this.OnInstallationNamesChanging(value);
+ this.SendPropertyChanging();
+ this._InstallationNames = value;
+ this.SendPropertyChanged("InstallationNames");
+ this.OnInstallationNamesChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Objective", DbType="NVarChar(500)")]
+ public string Objective
+ {
+ get
+ {
+ return this._Objective;
+ }
+ set
+ {
+ if ((this._Objective != value))
+ {
+ this.OnObjectiveChanging(value);
+ this.SendPropertyChanging();
+ this._Objective = value;
+ this.SendPropertyChanged("Objective");
+ this.OnObjectiveChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NeedCompletedDate", DbType="DateTime")]
+ public System.Nullable NeedCompletedDate
+ {
+ get
+ {
+ return this._NeedCompletedDate;
+ }
+ set
+ {
+ if ((this._NeedCompletedDate != value))
+ {
+ this.OnNeedCompletedDateChanging(value);
+ this.SendPropertyChanging();
+ this._NeedCompletedDate = value;
+ this.SendPropertyChanged("NeedCompletedDate");
+ this.OnNeedCompletedDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
+ public string CompileMan
+ {
+ get
+ {
+ return this._CompileMan;
+ }
+ set
+ {
+ if ((this._CompileMan != value))
+ {
+ this.OnCompileManChanging(value);
+ this.SendPropertyChanging();
+ this._CompileMan = value;
+ this.SendPropertyChanged("CompileMan");
+ this.OnCompileManChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
+ public System.Nullable CompileDate
+ {
+ get
+ {
+ return this._CompileDate;
+ }
+ set
+ {
+ if ((this._CompileDate != value))
+ {
+ this.OnCompileDateChanging(value);
+ this.SendPropertyChanging();
+ this._CompileDate = value;
+ this.SendPropertyChanged("CompileDate");
+ this.OnCompileDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Char(1)")]
+ public string State
+ {
+ get
+ {
+ return this._State;
+ }
+ set
+ {
+ if ((this._State != value))
+ {
+ this.OnStateChanging(value);
+ this.SendPropertyChanging();
+ this._State = value;
+ this.SendPropertyChanged("State");
+ this.OnStateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealCompletedDate", DbType="DateTime")]
+ public System.Nullable RealCompletedDate
+ {
+ get
+ {
+ return this._RealCompletedDate;
+ }
+ set
+ {
+ if ((this._RealCompletedDate != value))
+ {
+ this.OnRealCompletedDateChanging(value);
+ this.SendPropertyChanging();
+ this._RealCompletedDate = value;
+ this.SendPropertyChanged("RealCompletedDate");
+ this.OnRealCompletedDateChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRun_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -127612,6 +127890,302 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRunApprove_DriverRun_DriverRun", Storage="_DriverRun_DriverRunApprove", ThisKey="DriverRunId", OtherKey="DriverRunId", DeleteRule="NO ACTION")]
+ public EntitySet DriverRun_DriverRunApprove
+ {
+ get
+ {
+ return this._DriverRun_DriverRunApprove;
+ }
+ set
+ {
+ this._DriverRun_DriverRunApprove.Assign(value);
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ private void attach_DriverRun_DriverRunApprove(DriverRun_DriverRunApprove entity)
+ {
+ this.SendPropertyChanging();
+ entity.DriverRun_DriverRun = this;
+ }
+
+ private void detach_DriverRun_DriverRunApprove(DriverRun_DriverRunApprove entity)
+ {
+ this.SendPropertyChanging();
+ entity.DriverRun_DriverRun = null;
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DriverRun_DriverRunApprove")]
+ public partial class DriverRun_DriverRunApprove : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _DriverRunApproveId;
+
+ private string _DriverRunId;
+
+ private string _ApproveMan;
+
+ private System.Nullable _ApproveDate;
+
+ private System.Nullable _IsAgree;
+
+ private string _ApproveIdea;
+
+ private string _ApproveType;
+
+ private string _AttachUrl;
+
+ private EntityRef _DriverRun_DriverRun;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnDriverRunApproveIdChanging(string value);
+ partial void OnDriverRunApproveIdChanged();
+ partial void OnDriverRunIdChanging(string value);
+ partial void OnDriverRunIdChanged();
+ partial void OnApproveManChanging(string value);
+ partial void OnApproveManChanged();
+ partial void OnApproveDateChanging(System.Nullable value);
+ partial void OnApproveDateChanged();
+ partial void OnIsAgreeChanging(System.Nullable value);
+ partial void OnIsAgreeChanged();
+ partial void OnApproveIdeaChanging(string value);
+ partial void OnApproveIdeaChanged();
+ partial void OnApproveTypeChanging(string value);
+ partial void OnApproveTypeChanged();
+ partial void OnAttachUrlChanging(string value);
+ partial void OnAttachUrlChanged();
+ #endregion
+
+ public DriverRun_DriverRunApprove()
+ {
+ this._DriverRun_DriverRun = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverRunApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string DriverRunApproveId
+ {
+ get
+ {
+ return this._DriverRunApproveId;
+ }
+ set
+ {
+ if ((this._DriverRunApproveId != value))
+ {
+ this.OnDriverRunApproveIdChanging(value);
+ this.SendPropertyChanging();
+ this._DriverRunApproveId = value;
+ this.SendPropertyChanged("DriverRunApproveId");
+ this.OnDriverRunApproveIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverRunId", DbType="NVarChar(50)")]
+ public string DriverRunId
+ {
+ get
+ {
+ return this._DriverRunId;
+ }
+ set
+ {
+ if ((this._DriverRunId != value))
+ {
+ if (this._DriverRun_DriverRun.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnDriverRunIdChanging(value);
+ this.SendPropertyChanging();
+ this._DriverRunId = value;
+ this.SendPropertyChanged("DriverRunId");
+ this.OnDriverRunIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")]
+ public string ApproveMan
+ {
+ get
+ {
+ return this._ApproveMan;
+ }
+ set
+ {
+ if ((this._ApproveMan != value))
+ {
+ this.OnApproveManChanging(value);
+ this.SendPropertyChanging();
+ this._ApproveMan = value;
+ this.SendPropertyChanged("ApproveMan");
+ this.OnApproveManChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")]
+ public System.Nullable ApproveDate
+ {
+ get
+ {
+ return this._ApproveDate;
+ }
+ set
+ {
+ if ((this._ApproveDate != value))
+ {
+ this.OnApproveDateChanging(value);
+ this.SendPropertyChanging();
+ this._ApproveDate = value;
+ this.SendPropertyChanged("ApproveDate");
+ this.OnApproveDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")]
+ public System.Nullable IsAgree
+ {
+ get
+ {
+ return this._IsAgree;
+ }
+ set
+ {
+ if ((this._IsAgree != value))
+ {
+ this.OnIsAgreeChanging(value);
+ this.SendPropertyChanging();
+ this._IsAgree = value;
+ this.SendPropertyChanged("IsAgree");
+ this.OnIsAgreeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
+ public string ApproveIdea
+ {
+ get
+ {
+ return this._ApproveIdea;
+ }
+ set
+ {
+ if ((this._ApproveIdea != value))
+ {
+ this.OnApproveIdeaChanging(value);
+ this.SendPropertyChanging();
+ this._ApproveIdea = value;
+ this.SendPropertyChanged("ApproveIdea");
+ this.OnApproveIdeaChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Char(1)")]
+ public string ApproveType
+ {
+ get
+ {
+ return this._ApproveType;
+ }
+ set
+ {
+ if ((this._ApproveType != value))
+ {
+ this.OnApproveTypeChanging(value);
+ this.SendPropertyChanging();
+ this._ApproveType = value;
+ this.SendPropertyChanged("ApproveType");
+ this.OnApproveTypeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(200)")]
+ public string AttachUrl
+ {
+ get
+ {
+ return this._AttachUrl;
+ }
+ set
+ {
+ if ((this._AttachUrl != value))
+ {
+ this.OnAttachUrlChanging(value);
+ this.SendPropertyChanging();
+ this._AttachUrl = value;
+ this.SendPropertyChanged("AttachUrl");
+ this.OnAttachUrlChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRunApprove_DriverRun_DriverRun", Storage="_DriverRun_DriverRun", ThisKey="DriverRunId", OtherKey="DriverRunId", IsForeignKey=true)]
+ public DriverRun_DriverRun DriverRun_DriverRun
+ {
+ get
+ {
+ return this._DriverRun_DriverRun.Entity;
+ }
+ set
+ {
+ DriverRun_DriverRun previousValue = this._DriverRun_DriverRun.Entity;
+ if (((previousValue != value)
+ || (this._DriverRun_DriverRun.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._DriverRun_DriverRun.Entity = null;
+ previousValue.DriverRun_DriverRunApprove.Remove(this);
+ }
+ this._DriverRun_DriverRun.Entity = value;
+ if ((value != null))
+ {
+ value.DriverRun_DriverRunApprove.Add(this);
+ this._DriverRunId = value.DriverRunId;
+ }
+ else
+ {
+ this._DriverRunId = default(string);
+ }
+ this.SendPropertyChanged("DriverRun_DriverRun");
+ }
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;