20240125本部检查调整

This commit is contained in:
2024-01-25 17:24:20 +08:00
parent 6b5fb3a865
commit 2449c9fa32
14 changed files with 381 additions and 176 deletions
@@ -187,6 +187,18 @@ namespace FineUIPro.Web.OfficeCheck.Check
/// </summary>
private void PageInfoLoad()
{
this.drpSubjectUnit.Text = string.Empty;
this.txtSubjectUnitMan.Text = string.Empty;
this.txtSubjectUnitTel.Text = string.Empty;
this.txtSubjectUnitAdd.Text = string.Empty;
this.txtCheckStartTime.Text = string.Empty;
this.txtCheckEndTime.Text = string.Empty;
this.txtCompileMan.Text = string.Empty;
this.txtCompileDate.Text = string.Empty;
this.lblResult.Text = string.Empty;
this.lblCheckReportResult.Text = string.Empty;
this.lblCheckResult.Text = string.Empty;
var checkInfo = BLL.CheckNoticeService.GetCheckNoticeById(this.CheckNoticeId);
if (checkInfo != null)
{
@@ -208,41 +220,50 @@ namespace FineUIPro.Web.OfficeCheck.Check
var checkTable = BLL.CheckTable1Service.GetCheckTable1ByCheckNoticeId(this.CheckNoticeId);
if (checkTable != null)
{
// this.lblSubjectUnitId.Text = BLL.ProjectService.GetProjectNameByProjectId(checkTable.SubjectProjectId);
// this.lblCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkTable.CheckDate);
// this.lblSubjectUnitId.Text = BLL.ProjectService.GetProjectNameByProjectId(checkTable.SubjectProjectId);
// this.lblCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkTable.CheckDate);
this.lblResult.Text = "评定得分:" + checkTable.TotalLastScore + ";评定结果:" + checkTable.EvaluationResult;
}
//检查报告
var checkReport = BLL.CheckReportService.GetCheckReportByCheckNoticeId(this.CheckNoticeId);
if (checkReport != null)
{
// this.lblCheckObject.Text = BLL.ProjectService.GetProjectNameByProjectId(checkInfo.SubjectProjectId);
// this.lblCheckStartTime.Text = string.Format("{0:yyyy-MM-dd}", checkInfo.CheckStartTime);
// this.lblCheckObject.Text = BLL.ProjectService.GetProjectNameByProjectId(checkInfo.SubjectProjectId);
// this.lblCheckStartTime.Text = string.Format("{0:yyyy-MM-dd}", checkInfo.CheckStartTime);
this.lblCheckReportResult.Text = checkReport.CheckResult;
}
//隐患整改
var rectify = BLL.ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId);
if (rectify != null)
{
// this.lblUnitId.Text = BLL.ProjectService.GetProjectNameByProjectId(rectify.ProjectId);
// this.lblCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", rectify.CheckedDate);
string stateText = "【待提交】";
if (rectify.States == Const.State_2)
{
stateText = "【待复查确认】";
}
else if (rectify.States == Const.State_1)
{
stateText = "【待项目整改】";
}
else if (rectify.States == Const.State_0)
{
stateText = "【待签发】";
}
else if (rectify.States == Const.State_3)
{
stateText = "【整改完成】";
}
// this.lblUnitId.Text = BLL.ProjectService.GetProjectNameByProjectId(rectify.ProjectId);
// this.lblCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", rectify.CheckedDate);
var item = BLL.ProjectSupervision_RectifyItemService.GetRectifyItemByRectifyId(rectify.RectifyId);
if (item != null)
{
this.lblCheckResult.Text = "隐患:" + item.Count() + "条";
this.lblCheckResult.Text = "隐患:" + item.Count() + "条。单据状态:" + stateText;
}
}
}
else
{
this.drpSubjectUnit.Text = string.Empty;
this.txtSubjectUnitMan.Text = string.Empty;
this.txtSubjectUnitTel.Text = string.Empty;
this.txtSubjectUnitAdd.Text = string.Empty;
this.txtCheckStartTime.Text = string.Empty;
this.txtCheckEndTime.Text = string.Empty;
this.txtCompileMan.Text = string.Empty;
this.txtCompileDate.Text = string.Empty;
this.CheckNoticeId = string.Empty;
}
}
@@ -357,6 +378,14 @@ namespace FineUIPro.Web.OfficeCheck.Check
protected void btnCheck2_Click(object sender, EventArgs e)
{
string window = String.Format("RectifyEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - ");
var getCheckNotice = CheckNoticeService.GetCheckNoticeById(this.CheckNoticeId);
var getRectify = ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId);
if (getRectify != null && getRectify.States != "0" && !string.IsNullOrEmpty(getRectify.States))
{
window = String.Format("RectifyEdit.aspx?CheckNoticeId={0}&type=1", this.CheckNoticeId, "编辑 - ");
PageContext.RegisterStartupScript(Window2.GetShowReference(window));
}
PageContext.RegisterStartupScript(Window2.GetShowReference(window));
}
@@ -162,11 +162,11 @@
</Items>
</f:Panel>
<f:Window ID="Window1" Title="检查通知维护" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Self" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="900px" Height="500px">
</f:Window>
<f:Window ID="WindowTeam" Title="维护检查工作组" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Self" EnableResize="true" runat="server" OnClose="WindowTeam_Close" IsModal="true"
Target="Parent" EnableResize="true" runat="server" OnClose="WindowTeam_Close" IsModal="true"
Width="900px" Height="500px">
</f:Window>
<%--<f:Window ID="Window3" Title="查看" ShowHeader="false" Hidden="true" EnableIFrame="true" EnableMaximize="true"
@@ -19,7 +19,7 @@
<Rows>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtRectifyNoticesCode" runat="server" Label="编号" MaxLength="70" >
<f:TextBox ID="txtRectifyNoticesCode" runat="server" Label="编号" MaxLength="70" Required="true" ShowRedStar="true">
</f:TextBox>
<f:DropDownList ID="drpProjectId" runat="server" Label="受检项目"
LabelAlign="Right" EnableEdit="true">
@@ -51,10 +51,15 @@
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdRectifyNoticesId" runat="server"></f:HiddenField>
<f:Button ID="btnSave" OnClick="btnSave_Click" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" >
<f:Button ID="btnSave" OnClick="btnSave_Click" Icon="SystemSave" runat="server"
Text="保存" ValidateForms="SimpleForm1" >
</f:Button>
<f:Button ID="btnSubmit" OnClick="btnSubmit_Click" Icon="SystemSaveNew" runat="server" ToolTip="签发" ValidateForms="SimpleForm1" >
<f:Button ID="btnSubmit" OnClick="btnSubmit_Click" Icon="SystemSaveNew" runat="server"
Text="签发" ValidateForms="SimpleForm1" >
</f:Button>
<f:Button ID="btnSure" OnClick="btnSure_Click" Icon="Accept" runat="server" Hidden="true"
Text="复查确认" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -138,7 +143,7 @@
<Rows>
<f:FormRow runat="server" ID="next">
<Items>
<f:DropDownList ID="drpSignPerson" runat="server" Label="项目安全经理" LabelWidth="110px"
<f:DropDownList ID="drpSignPerson" runat="server" Label="整改责任人:项目安全经理" LabelWidth="200px"
LabelAlign="Right" EnableEdit="true" ShowRedStar="true">
</f:DropDownList>
<f:Label runat="server"></f:Label>
@@ -1,6 +1,8 @@
using BLL;
using FineUIPro.Web.DataShow;
using Model;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
@@ -42,57 +44,89 @@ namespace FineUIPro.Web.OfficeCheck.Check
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//受检项目
BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true);
///安全经理
BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpSignPerson, this.CurrUser.LoginProjectId, Const.UnitId_SEDIN, true);
///检察人员
BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpCheckMan, this.CurrUser.LoginProjectId, null, true);
{
string type = Request.Params["type"];
if (type == "1")
{
this.btnSave.Hidden = true;
this.btnAdd.Hidden = true;
this.btnSubmit.Hidden = true;
this.Grid1.Columns[8].Hidden = true;
}
this.CheckNoticeId = Request.Params["CheckNoticeId"];
if (!string.IsNullOrEmpty(this.CheckNoticeId))
var getRectify = ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId);
if (getRectify != null)
{
Model.ProjectSupervision_Rectify RectifyNotices = ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId);
if (RectifyNotices != null)
SetDrop(getRectify.ProjectId);
this.hdRectifyNoticesId.Text = getRectify.RectifyId;
if (!string.IsNullOrEmpty(getRectify.ProjectId))
{
this.hdRectifyNoticesId.Text = RectifyNotices.RectifyId;
if (!string.IsNullOrEmpty(RectifyNotices.ProjectId))
{
this.drpProjectId.SelectedValue = RectifyNotices.ProjectId;
}
if (!string.IsNullOrEmpty(RectifyNotices.CheckManIds))
{
this.drpCheckMan.SelectedValueArray = RectifyNotices.CheckManIds.Split(',');
}
this.txtCheckPerson.Text = RectifyNotices.CheckManNames;
this.txtRectifyNoticesCode.Text = RectifyNotices.RectifyCode;
this.txtCheckedDate.Text = RectifyNotices.CheckedDate.ToString();
if (!string.IsNullOrEmpty(RectifyNotices.HiddenHazardType))
{
this.drpHiddenHazardType.SelectedValue = RectifyNotices.HiddenHazardType;
}
if (!string.IsNullOrEmpty(RectifyNotices.SignPerson))
{
this.drpSignPerson.SelectedValue = RectifyNotices.SignPerson;
}
BindGrid();
this.drpProjectId.SelectedValue = getRectify.ProjectId;
}
else
if (!string.IsNullOrEmpty(getRectify.CheckManIds))
{
this.txtCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.drpCheckMan.SelectedValueArray = getRectify.CheckManIds.Split(',');
}
this.txtCheckPerson.Text = getRectify.CheckManNames;
this.txtRectifyNoticesCode.Text = getRectify.RectifyCode;
this.txtCheckedDate.Text = getRectify.CheckedDate.ToString();
if (!string.IsNullOrEmpty(getRectify.HiddenHazardType))
{
this.drpHiddenHazardType.SelectedValue = getRectify.HiddenHazardType;
}
if (!string.IsNullOrEmpty(getRectify.SignPerson))
{
this.drpSignPerson.SelectedValue = getRectify.SignPerson;
}
BindGrid();
if (getRectify.States == Const.State_1 || getRectify.States == Const.State_2)
{
this.btnSure.Hidden = false;
}
rectifyItemLists.Clear();
}
else
{
var getCheckNotice = CheckNoticeService.GetCheckNoticeById(this.CheckNoticeId);
if (getCheckNotice != null)
{
SetDrop(getCheckNotice.SubjectProjectId);
if (!string.IsNullOrEmpty(getCheckNotice.SubjectProjectId))
{
this.drpProjectId.SelectedValue = getCheckNotice.SubjectProjectId;
}
if (!string.IsNullOrEmpty(getCheckNotice.CheckTeamLeader))
{
this.drpCheckMan.SelectedValueArray = getCheckNotice.CheckTeamLeader.Split(',');
}
var getTeam = CheckTeamService.GetCheckTeamListByCheckNoticeId(this.CheckNoticeId);
foreach (var item in getTeam)
{
this.txtCheckPerson.Text += item.UserName + "、";
}
string perfix = DateTime.Now.Year.ToString()+ DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + "-";
this.txtRectifyNoticesCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.ProjectSupervision_Rectify", "RectifyCode", perfix);
}
this.txtCheckedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
rectifyItemLists.Clear();
}
}
private void SetDrop(string projectId)
{
//受检项目
BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true);
this.drpProjectId.SelectedValue = projectId;
///安全经理
BLL.Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpSignPerson, projectId, Const.UnitId_SEDIN, true);
///检察人员
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCheckMan, Const.UnitId_SEDIN, string.Empty, true);
}
/// <summary>
/// 绑定明细
/// </summary>
@@ -442,6 +476,17 @@ namespace FineUIPro.Web.OfficeCheck.Check
}
this.drpCheckMan.SelectedValueArray = str.ToArray();
}
#endregion
#endregion
protected void btnSure_Click(object sender, EventArgs e)
{
var getRectify = ProjectSupervision_RectifyService.GetRectifyByCheckNoticeId(this.CheckNoticeId);
if (getRectify != null)
{
saveNoticesItemDetail();//增加明细
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}
}
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.OfficeCheck.Check {
public partial class RectifyEdit {
namespace FineUIPro.Web.OfficeCheck.Check
{
public partial class RectifyEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel4 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel4;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtRectifyNoticesCode 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRectifyNoticesCode;
/// <summary>
/// drpProjectId 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProjectId;
/// <summary>
/// drpCheckMan 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCheckMan;
/// <summary>
/// txtCheckPerson 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCheckPerson;
/// <summary>
/// txtCheckedDate 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtCheckedDate;
/// <summary>
/// drpHiddenHazardType 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpHiddenHazardType;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdRectifyNoticesId 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdRectifyNoticesId;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
@@ -137,7 +139,16 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// btnSure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSure;
/// <summary>
/// Form2 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// toolAdd 控件。
/// </summary>
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar toolAdd;
/// <summary>
/// btnAdd 控件。
/// </summary>
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// tWrongContent 控件。
/// </summary>
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox tWrongContent;
/// <summary>
/// tRequirement 控件。
/// </summary>
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox tRequirement;
/// <summary>
/// txtLimitTimes 控件。
/// </summary>
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtLimitTimes;
/// <summary>
/// txtRectifyResults 控件。
/// </summary>
@@ -209,7 +220,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRectifyResults;
/// <summary>
/// drpIsRectify 控件。
/// </summary>
@@ -218,7 +229,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList drpIsRectify;
/// <summary>
/// hdIsRectify 控件。
/// </summary>
@@ -227,7 +238,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdIsRectify;
/// <summary>
/// del 控件。
/// </summary>
@@ -236,7 +247,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.LinkButtonField del;
/// <summary>
/// Form3 控件。
/// </summary>
@@ -245,7 +256,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form3;
/// <summary>
/// next 控件。
/// </summary>
@@ -254,7 +265,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow next;
/// <summary>
/// drpSignPerson 控件。
/// </summary>
@@ -263,7 +274,7 @@ namespace FineUIPro.Web.OfficeCheck.Check {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSignPerson;
/// <summary>
/// WindowAtt 控件。
/// </summary>