河北专项检查和移动端
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
@@ -12,22 +13,18 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string CheckSpecialId
|
||||
public string InspectionItemId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CheckSpecialId"];
|
||||
return (string)ViewState["InspectionItemId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CheckSpecialId"] = value;
|
||||
ViewState["InspectionItemId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.View_CheckSpecialDetail> checkSpecialDetails = new List<Model.View_CheckSpecialDetail>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -40,129 +37,73 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
hdAttachUrl.Text = string.Empty;
|
||||
hdId.Text = string.Empty;
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
checkSpecialDetails.Clear();
|
||||
this.InspectionItemId = Request.Params["InspectionItemId"];
|
||||
|
||||
this.CheckSpecialId = Request.Params["CheckSpecialId"];
|
||||
var checkSpecial = BLL.Check_CheckSpecialService.GetCheckSpecialByCheckSpecialId(this.CheckSpecialId);
|
||||
if (checkSpecial != null)
|
||||
var item = (from x in Funs.DB.Inspect_InspectionItem
|
||||
join y in Funs.DB.Inspect_Inspection on x.InspectionId equals y.InspectionId
|
||||
where x.InspectionItemId == this.InspectionItemId
|
||||
select new {
|
||||
InspectionItemId = x.InspectionItemId,
|
||||
InspectionId = x.InspectionId,
|
||||
ProjectId = y.ProjectId,
|
||||
ProjectName = Funs.DB.Base_Project.FirstOrDefault(p => p.ProjectId == y.ProjectId).ProjectName,
|
||||
InspectionCode = y.InspectionCode,
|
||||
CheckMan = y.CheckMan,
|
||||
ProblemTypeName = y.ProblemTypeName,
|
||||
Place = y.Place,
|
||||
PersonResponsible = y.PersonResponsible,
|
||||
PersonResponsibleName = Funs.DB.Sys_User.FirstOrDefault(p => p.UserId == y.PersonResponsible).UserName,
|
||||
WorkAreaName = x.WorkAreaName,
|
||||
States = y.States,
|
||||
ItemStates = x.States,
|
||||
EvaluateResults = x.EvaluateResults,
|
||||
BeforelUrl = x.BeforelUrl,
|
||||
AfterUrl = x.AfterUrl,
|
||||
AuditTime = x.AuditTime,
|
||||
AuditMan = x.AuditMan,
|
||||
RectificationResults = x.RectificationResults,
|
||||
AuditManName = Funs.DB.Sys_User.FirstOrDefault(p => p.UserId == x.AuditMan).UserName
|
||||
}
|
||||
).FirstOrDefault();
|
||||
this.Code.Text = item.InspectionCode;
|
||||
this.PName.Text = item.ProjectName;
|
||||
this.Cman.Text = item.CheckMan;
|
||||
this.Pman.Text = item.ProblemTypeName;
|
||||
this.Ptype.Text = item.ProblemTypeName;
|
||||
this.Iarea.Text = item.Place;
|
||||
this.Carea.Text = item.WorkAreaName;
|
||||
this.conclusion.Text = item.RectificationResults;
|
||||
this.divImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment(ConfigurationManager.AppSettings["CEMS_IMG_URL"], item.BeforelUrl);
|
||||
this.divRectificationImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment(ConfigurationManager.AppSettings["CEMS_IMG_URL"], item.AfterUrl);
|
||||
|
||||
if (item.States == "1"&&item.ItemStates == "1")
|
||||
{
|
||||
this.txtCheckSpecialCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CheckSpecialId);
|
||||
if (checkSpecial.CheckTime != null)
|
||||
{
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkSpecial.CheckTime);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(checkSpecial.CheckType))
|
||||
{
|
||||
this.rbType.SelectedValue = checkSpecial.CheckType;
|
||||
}
|
||||
this.txtPartInPersonNames.Text = checkSpecial.PartInPersonNames;
|
||||
this.txtSupCheckItemSet.Text = Technique_CheckItemSetService.GetCheckItemSetNameById(checkSpecial.CheckItemSetId);
|
||||
this.txtPartInPersons.Text = checkSpecial.PartInPersons;
|
||||
checkSpecialDetails = (from x in Funs.DB.View_CheckSpecialDetail
|
||||
where x.CheckSpecialId == this.CheckSpecialId
|
||||
orderby x.UnitName, x.SortIndex
|
||||
select x).ToList();
|
||||
this.state.Text = "待提交";
|
||||
}
|
||||
if (item.States == "2" && item.ItemStates == "1")
|
||||
{
|
||||
this.state.Text = "待审批";
|
||||
}
|
||||
if (item.States == "2" && item.ItemStates == "2")
|
||||
{
|
||||
this.state.Text = "待整改";
|
||||
}
|
||||
if (item.States == "2" && item.ItemStates == "3")
|
||||
{
|
||||
this.state.Text = "已闭环";
|
||||
}
|
||||
if (item.States == "2" && item.ItemStates == "3")
|
||||
{
|
||||
this.state.Text = "已闭环";
|
||||
}
|
||||
if(item.States == "3")
|
||||
{
|
||||
this.state.Text = "已闭环";
|
||||
}
|
||||
Grid1.DataSource = checkSpecialDetails;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.CheckSpecialId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckSpecial&menuId={1}&type=-1", this.CheckSpecialId, BLL.Const.ProjectCheckSpecialMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string checkSpecialDetailId = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
if (e.CommandName == "click")
|
||||
{
|
||||
var detail = Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialDetailId(Grid1.DataKeys[e.RowIndex][0].ToString());
|
||||
if (detail != null)
|
||||
{
|
||||
List<string> getList = Funs.GetStrListByStr(detail.DataId,'|');
|
||||
foreach (var item in getList)
|
||||
{
|
||||
List<string> getItemList = Funs.GetStrListByStr(item, ',');
|
||||
if (getItemList.Count() > 1)
|
||||
{
|
||||
if (getItemList[0].ToString() == "1")
|
||||
{
|
||||
var getRe = RectifyNoticesService.GetRectifyNoticesById(getItemList[1].ToString());
|
||||
if (getRe != null)
|
||||
{
|
||||
if (getRe.CompleteManId ==this.CurrUser.UserId &&( string.IsNullOrEmpty(getRe.States) || getRe.States == Const.State_0))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyNoticesAdd.aspx?RectifyNoticesId={0}", getRe.RectifyNoticesId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyNoticesView.aspx?RectifyNoticesId={0}", getRe.RectifyNoticesId, "查看 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getItemList[0].ToString() == "2")
|
||||
{
|
||||
var getpu = PunishNoticeService.GetPunishNoticeById(getItemList[1].ToString());
|
||||
if (getpu.CompileMan == this.CurrUser.UserId && (string.IsNullOrEmpty(getpu.PunishStates) || getpu.PunishStates == Const.State_0))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PunishNoticeEdit.aspx?PunishNoticeId={0}", getpu.PunishNoticeId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PunishNoticeView.aspx?PunishNoticeId={0}", getpu.PunishNoticeId, "查看 - ")));
|
||||
}
|
||||
}
|
||||
if (getItemList[0].ToString() == "3")
|
||||
{
|
||||
var getpau = Check_PauseNoticeService.GetPauseNoticeByPauseNoticeId(getItemList[1].ToString());
|
||||
if (getpau.CompileManId == this.CurrUser.UserId && (string.IsNullOrEmpty(getpau.PauseStates) || getpau.PauseStates == Const.State_0))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PauseNoticeEdit.aspx?PauseNoticeId={0}", getpau.PauseNoticeId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PauseNoticeView.aspx?PauseNoticeId={0}", getpau.PauseNoticeId, "查看 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.CommandName == "attchUrl")
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckSpecial&menuId={1}&edit=1&type=-1", checkSpecialDetailId, BLL.Const.ProjectCheckSpecialMenuId)));
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
var details = (from x in Funs.DB.View_CheckSpecialDetail
|
||||
where x.CheckSpecialId == this.CheckSpecialId
|
||||
select x).ToList();
|
||||
Grid1.DataSource = details;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user