From 227b1472c9dbfb32bd74ac33344639ac8894202f Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 12 Jul 2023 07:10:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8=E5=AE=9E?=
=?UTF-8?q?=E6=96=BD=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-07-11.sql | 2 +
.../ZHGL/Plan/ActionPlanListEdit.aspx | 3 +-
.../ZHGL/Plan/ActionPlanListEdit.aspx.cs | 79 +++++++++++------
.../ZHGL/Plan/ActionPlanListView.aspx | 3 +-
.../ZHGL/Plan/ActionPlanListView.aspx.cs | 10 +++
.../ZHGL/Plan/DepartEdit.aspx.cs | 9 +-
SGGL/Model/Model.cs | 85 ++-----------------
7 files changed, 85 insertions(+), 106 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-07-11.sql
diff --git a/DataBase/版本日志/SGGLDB_V2023-07-11.sql b/DataBase/版本日志/SGGLDB_V2023-07-11.sql
new file mode 100644
index 00000000..7bb00535
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-07-11.sql
@@ -0,0 +1,2 @@
+alter table dbo.ActionPlan_ActionPlanListApprove drop constraint FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList
+GO
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx
index b0b2dce9..813e633a 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx
@@ -56,9 +56,10 @@
-
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs
index f851eb8c..f3a28f5b 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs
@@ -138,6 +138,10 @@ namespace FineUIPro.Web.ZHGL.Plan
this.drpReviewMan.Hidden = false;
this.drpReviewMan.SelectedValue = actionPlanList.ReviewMan;
}
+ else if (actionPlanList.IsCompanyReview == true)
+ {
+ this.rblIsReview.SelectedValue = "True2";
+ }
else
{
this.rblIsReview.SelectedValue = "False";
@@ -231,26 +235,12 @@ namespace FineUIPro.Web.ZHGL.Plan
this.btnMenuDelete.Hidden = true;
this.gvDepart.EnableRowDoubleClickEvent = false;
}
- //提交版本人多次修改
- //if (actionPlanList.CompileMan.Equals(CurrUser.PersonId))
- //{
- // txtActionPlanListCode.Enabled = true;
- // txtActionPlanListName.Enabled = true;
- // txtVersionNo.Enabled = true;
- // drpProjectType.Enabled = true;
- // drpCompileMan.Enabled = true;
- // txtCompileDate.Enabled = true;
- // ContactImg = 0;
- // Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetActionPlanListApproveByApproveMan(ActionPlanListId, CurrUser.PersonId);
- // if (approve == null)
- // {
- // rblIsAgree.Hidden = true;
- // rblIsAgree.Required = false;
- // options.Hidden = true;
- // txtOptions.Required = false;
- // optio.Hidden = true;
- // }
- //}
+ var approves = BLL.ActionPlanListApproveService.GetReviewings(this.ActionPlanListId, actionPlanList.Edition.Value);
+ if (approves.Count == 0)
+ {
+ this.drpPerson.Hidden = true;
+ this.rblIsCompanyReview.Hidden = true;
+ }
}
WindowAtt_Close(null, null);
}
@@ -380,7 +370,14 @@ namespace FineUIPro.Web.ZHGL.Plan
{
actionPlanList.CompileDate = Convert.ToDateTime(this.txtCompileDate.Text.Trim());
}
- actionPlanList.IsReview = Convert.ToBoolean(this.rblIsReview.SelectedValue);
+ if (this.rblIsReview.SelectedValue != "True2")
+ {
+ actionPlanList.IsReview = Convert.ToBoolean(this.rblIsReview.SelectedValue);
+ }
+ else
+ {
+ actionPlanList.IsCompanyReview = true;
+ }
if (this.drpReviewMan.SelectedValue != BLL.Const._Null)
{
actionPlanList.ReviewMan = this.drpReviewMan.SelectedValue;
@@ -576,6 +573,10 @@ namespace FineUIPro.Web.ZHGL.Plan
{
actionPlanList.States = BLL.Const.ActionPlanList_Reviewing;
}
+ else if (rblIsReview.SelectedValue == "True2") //公司部门评审
+ {
+ actionPlanList.States = BLL.Const.ActionPlanList_DepartReview;
+ }
else
{
actionPlanList.States = BLL.Const.ActionPlanList_Complete;
@@ -606,6 +607,10 @@ namespace FineUIPro.Web.ZHGL.Plan
}
}
}
+ else if (rblIsReview.SelectedValue == "True2") //公司部门评审
+ {
+ //OAWebSevice.PushoaActionPlan(); //推送OA待办
+ }
}
else
{
@@ -703,12 +708,21 @@ namespace FineUIPro.Web.ZHGL.Plan
{
this.drpReviewMan.Hidden = false;
this.drpPerson.Hidden = false;
+ this.gvDepart.Hidden = true;
+ }
+ else if (this.rblIsReview.SelectedValue == "True2")
+ {
+ this.drpReviewMan.Hidden = true;
+ this.drpPerson.Hidden = true;
+ this.gvDepart.Hidden = false;
+ BindDepart();
}
else
{
this.drpReviewMan.Hidden = true;
this.drpPerson.Hidden = true;
this.drpReviewMan.SelectedValue = this.CurrUser.PersonId;
+ this.gvDepart.Hidden = true;
}
}
@@ -727,10 +741,19 @@ namespace FineUIPro.Web.ZHGL.Plan
private void BindDepart()
{
- Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(this.ActionPlanListId);
- var list = ActionPlanListApproveService.getDepartListData(ActionPlanListId, actionPlanList.Edition);
- gvDepart.DataSource = list;
- gvDepart.DataBind();
+ Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(this.HFActionPlanListId.Text);
+ if (actionPlanList != null)
+ {
+ var list = ActionPlanListApproveService.getDepartListData(ActionPlanListId, actionPlanList.Edition);
+ gvDepart.DataSource = list;
+ gvDepart.DataBind();
+ }
+ else
+ {
+ var list = ActionPlanListApproveService.getDepartListData(this.HFActionPlanListId.Text, 0);
+ gvDepart.DataSource = list;
+ gvDepart.DataBind();
+ }
}
///
@@ -745,7 +768,11 @@ namespace FineUIPro.Web.ZHGL.Plan
protected void btnNew_Click(object sender, EventArgs e)
{
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListId={0}", this.ActionPlanListId, "编辑 - ")));
+ if (string.IsNullOrEmpty(HFActionPlanListId.Text)) //新增记录
+ {
+ HFActionPlanListId.Text = SQLHelper.GetNewID(typeof(Model.ActionPlan_ActionPlanList));
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListId={0}", this.HFActionPlanListId.Text, "编辑 - ")));
}
#region 编辑
diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx
index 381df194..74625c77 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx
@@ -55,9 +55,10 @@
-
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs
index a83851f1..80daa273 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListView.aspx.cs
@@ -74,6 +74,10 @@ namespace FineUIPro.Web.ZHGL.Plan
this.drpReviewMan.Hidden = false;
this.drpReviewMan.SelectedValue = actionPlanList.ReviewMan;
}
+ else if (actionPlanList.IsCompanyReview == true)
+ {
+ this.rblIsReview.SelectedValue = "True2";
+ }
else
{
this.rblIsReview.SelectedValue = "False";
@@ -103,6 +107,12 @@ namespace FineUIPro.Web.ZHGL.Plan
var list = ActionPlanListApproveService.getListData(ActionPlanListId);
gvApprove.DataSource = list;
gvApprove.DataBind();
+ var approves = BLL.ActionPlanListApproveService.GetReviewings(this.ActionPlanListId, actionPlanList.Edition.Value);
+ if (approves.Count == 0)
+ {
+ this.drpPerson.Hidden = true;
+ this.rblIsCompanyReview.Hidden = true;
+ }
WindowAtt_Close(null, null);
}
}
diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs
index 5aad0d1f..2ef9587a 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs
@@ -105,7 +105,14 @@ namespace FineUIPro.Web.ZHGL.Plan
approve.ApproveMan = this.drpApproveMan.SelectedValue;
}
approve.ApproveType = BLL.Const.ActionPlanList_DepartReview;
- approve.Edition = actionPlanList.Edition;
+ if (actionPlanList == null)
+ {
+ approve.Edition = 0;
+ }
+ else
+ {
+ approve.Edition = actionPlanList.Edition;
+ }
approve.IsPushOa = 0;
if (!string.IsNullOrEmpty(this.ActionPlanListApproveId))
{
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 329fd14f..6c5b9e81 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -10804,8 +10804,6 @@ namespace Model
private EntityRef _Person_Persons;
- private EntitySet _ActionPlan_ActionPlanListApprove;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -10844,7 +10842,6 @@ namespace Model
{
this._Base_Project = default(EntityRef);
this._Person_Persons = default(EntityRef);
- this._ActionPlan_ActionPlanListApprove = new EntitySet(new Action(this.attach_ActionPlan_ActionPlanListApprove), new Action(this.detach_ActionPlan_ActionPlanListApprove));
OnCreated();
}
@@ -11204,19 +11201,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList", Storage="_ActionPlan_ActionPlanListApprove", ThisKey="ActionPlanListId", OtherKey="ActionPlanListId", DeleteRule="NO ACTION")]
- public EntitySet ActionPlan_ActionPlanListApprove
- {
- get
- {
- return this._ActionPlan_ActionPlanListApprove;
- }
- set
- {
- this._ActionPlan_ActionPlanListApprove.Assign(value);
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -11236,18 +11220,6 @@ namespace Model
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
-
- private void attach_ActionPlan_ActionPlanListApprove(ActionPlan_ActionPlanListApprove entity)
- {
- this.SendPropertyChanging();
- entity.ActionPlan_ActionPlanList = this;
- }
-
- private void detach_ActionPlan_ActionPlanListApprove(ActionPlan_ActionPlanListApprove entity)
- {
- this.SendPropertyChanging();
- entity.ActionPlan_ActionPlanList = null;
- }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ActionPlan_ActionPlanListApprove")]
@@ -11280,8 +11252,6 @@ namespace Model
private System.Nullable _IsPushOa;
- private EntityRef _ActionPlan_ActionPlanList;
-
private EntityRef _Person_Persons;
#region 可扩展性方法定义
@@ -11316,7 +11286,6 @@ namespace Model
public ActionPlan_ActionPlanListApprove()
{
- this._ActionPlan_ActionPlanList = default(EntityRef);
this._Person_Persons = default(EntityRef);
OnCreated();
}
@@ -11352,10 +11321,6 @@ namespace Model
{
if ((this._ActionPlanListId != value))
{
- if (this._ActionPlan_ActionPlanList.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnActionPlanListIdChanging(value);
this.SendPropertyChanging();
this._ActionPlanListId = value;
@@ -11569,40 +11534,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList", Storage="_ActionPlan_ActionPlanList", ThisKey="ActionPlanListId", OtherKey="ActionPlanListId", IsForeignKey=true)]
- public ActionPlan_ActionPlanList ActionPlan_ActionPlanList
- {
- get
- {
- return this._ActionPlan_ActionPlanList.Entity;
- }
- set
- {
- ActionPlan_ActionPlanList previousValue = this._ActionPlan_ActionPlanList.Entity;
- if (((previousValue != value)
- || (this._ActionPlan_ActionPlanList.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._ActionPlan_ActionPlanList.Entity = null;
- previousValue.ActionPlan_ActionPlanListApprove.Remove(this);
- }
- this._ActionPlan_ActionPlanList.Entity = value;
- if ((value != null))
- {
- value.ActionPlan_ActionPlanListApprove.Add(this);
- this._ActionPlanListId = value.ActionPlanListId;
- }
- else
- {
- this._ActionPlanListId = default(string);
- }
- this.SendPropertyChanged("ActionPlan_ActionPlanList");
- }
- }
- }
-
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_Person_Persons", Storage="_Person_Persons", ThisKey="ApproveMan", OtherKey="PersonId", IsForeignKey=true)]
public Person_Persons Person_Persons
{
@@ -98169,7 +98100,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(2000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
@@ -98189,7 +98120,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(4000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(3000)")]
public string CanWelderId
{
get
@@ -209277,7 +209208,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
public string RewardAndPunishDecision
{
get
@@ -220756,7 +220687,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(2000)")]
public string WorkAreaId
{
get
@@ -268101,7 +268032,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(2000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
@@ -268117,7 +268048,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(4000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(3000)")]
public string CanWelderId
{
get
@@ -282582,7 +282513,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(2000)")]
public string WorkAreaId
{
get
@@ -283507,7 +283438,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(2000)")]
public string WorkAreaId
{
get