焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.DataShow;
using System;
using System.Collections.Generic;
using System.Data;
@@ -13,6 +12,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 委托主键
/// </summary>
public string CH_TrustID
@@ -46,6 +59,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
btnNew.OnClientClick = Window1.GetShowReference("TrustManageEditAdd.aspx") + "return false;";
@@ -53,25 +80,45 @@ namespace FineUIPro.Web.HJGL.TrustManage
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.InitTreeMenu();
}
#region -
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
this.tvControlItem.Nodes.Clear();
List<Model.Base_Unit> units = null;
var getUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
var getUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
if (getUnit != null && getUnit.UnitType == BLL.Const.ProjectUnitType_2)
{
units = (from x in Funs.DB.Base_Unit where x.UnitId == this.CurrUser.UnitId select x).ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_2);
}
if (units != null)
@@ -87,7 +134,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
var instaRe = (from x in Funs.DB.CH_Trust
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.CurrUser.LoginProjectId && x.CH_TrustType == "1"
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.ProjectId && x.CH_TrustType == "1"
select y).Distinct();
foreach (var ins in instaRe)
{
@@ -387,7 +434,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrustManageEditMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TrustManageEditMenuId, BLL.Const.BtnModify))
{
var trust = BLL.TrustManageEditService.GetCH_TrustByID(tvControlItem.SelectedNodeID);
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && trust != null)
@@ -417,7 +464,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TrustManageEditMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.TrustManageEditMenuId, Const.BtnDelete))
{
var trust = BLL.TrustManageEditService.GetCH_TrustByID(tvControlItem.SelectedNodeID);
if (trust == null)
@@ -530,7 +577,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -662,7 +709,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto .HasValue && sysSet.IsAuto .Value)
{
initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx";
@@ -680,7 +727,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// string varValue = string.Empty;
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
@@ -910,7 +957,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// hssfworkbook.Write(filess);
// }
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
// FileInfo filet = new FileInfo(ReportFileName);
// Response.Clear();
@@ -968,7 +1015,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -1102,7 +1149,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto.HasValue && sysSet.IsAuto.Value)
{
initTemplatePath = "File\\Fastreport\\设备焊口检测委托单NoPic.frx";
@@ -1120,7 +1167,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// string varValue = string.Empty;
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
@@ -1350,7 +1397,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// hssfworkbook.Write(filess);
// }
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
// FileInfo filet = new FileInfo(ReportFileName);
// Response.Clear();
@@ -1383,7 +1430,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// if (trust != null)
// {
// string varValue = string.Empty;
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
@@ -1613,7 +1660,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// hssfworkbook.Write(filess);
// }
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
// FileInfo filet = new FileInfo(ReportFileName);
// Response.Clear();