安全管理,作业票等,补充公司级树
This commit is contained in:
@@ -40,20 +40,21 @@ namespace FineUIPro.Web.HSSE.License
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
//{
|
||||
// this.ProjectId = Request.Params["projectId"];
|
||||
//}
|
||||
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
|
||||
this.drpStates.DataValueField = "Value";
|
||||
this.drpStates.DataTextField = "Text";
|
||||
@@ -70,23 +71,54 @@ namespace FineUIPro.Web.HSSE.License
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string strSql = "SELECT license.HeightWorkId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkMeasures,license.States"
|
||||
+ @" ,(CASE WHEN license.States=-2 THEN '作废' WHEN license.States=0 THEN '待提交' WHEN license.States=1 THEN '审核中' WHEN license.States=2 THEN '作业中' WHEN license.States=3 THEN '已完成' WHEN license.States=-1 THEN '已取消' ELSE '未知' END) AS StatesName,WorkType,EquipmentTools "
|
||||
+ @" FROM dbo.License_HeightWork AS license "
|
||||
+ @" LEFT JOIN Base_Unit AS ApplyUnit ON license.ApplyUnitId =ApplyUnit.UnitId"
|
||||
+ @" WHERE license.ProjectId= '" + this.ProjectId +"'";
|
||||
+ @" WHERE license.ProjectId= '" + this.ProjectId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
strSql += " AND license.ApplyUnitId = @UnitId"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != Const._Null)
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != null && this.drpUnit.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND license.ApplyUnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue));
|
||||
@@ -100,7 +132,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
|
||||
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
@@ -238,7 +270,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectHeightWorkMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectHeightWorkMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
//if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -316,7 +348,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
var getUser = UserService.GetUserByUserId(getHeightWork.ApplyManId);
|
||||
if (getUser != null)
|
||||
{
|
||||
bookmarkApplyManName.Text = getUser.UserName;
|
||||
bookmarkApplyManName.Text = getUser.UserName;
|
||||
}
|
||||
|
||||
|
||||
@@ -678,7 +710,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//审核记录
|
||||
var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id);
|
||||
if (getFlows.Count() > 0)
|
||||
@@ -703,7 +735,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
DocumentBuilder builders = new DocumentBuilder(doc);
|
||||
var file = rootPath + getF1.SignatureUrl;
|
||||
builders.MoveToBookmark("OperaterMan1");
|
||||
builders.InsertImage(file, 80, 20);
|
||||
builders.InsertImage(file, 80, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -750,7 +782,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
var file = rootPath + getF2.SignatureUrl;
|
||||
builders.MoveToBookmark("OperaterMan2");
|
||||
builders.InsertImage(file, 80, 20);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -801,7 +833,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
var file = rootPath + getF3.SignatureUrl;
|
||||
builders.MoveToBookmark("OperaterMan3");
|
||||
builders.InsertImage(file, 80, 20);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -838,7 +870,7 @@ namespace FineUIPro.Web.HSSE.License
|
||||
var file = rootPath + getUser.SignatureUrl;
|
||||
DocumentBuilder builders = new DocumentBuilder(doc);
|
||||
builders.MoveToBookmark("Cancel");
|
||||
// builders.InsertImage(file, 80, 20);
|
||||
// builders.InsertImage(file, 80, 20);
|
||||
builders.Write("取消原因:" + getHeightWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CancelTime));
|
||||
}
|
||||
else
|
||||
@@ -865,12 +897,12 @@ namespace FineUIPro.Web.HSSE.License
|
||||
bookmarkClose.Text = getHeightWork.CloseReasons + " 关闭时间:"
|
||||
+ string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CloseTime) + "。";
|
||||
}
|
||||
else if(!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
|
||||
else if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl))
|
||||
{
|
||||
var file = rootPath + getUser.SignatureUrl;
|
||||
DocumentBuilder builders = new DocumentBuilder(doc);
|
||||
builders.MoveToBookmark("Close");
|
||||
// builders.InsertImage(file, 80, 20);
|
||||
// builders.InsertImage(file, 80, 20);
|
||||
builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CloseTime));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user