2024-06-07 22:07:03 +08:00
|
|
|
|
using Aspose.Words;
|
2024-05-31 16:17:04 +08:00
|
|
|
|
using BLL;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Linq;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
using System.Web;
|
|
|
|
|
|
using System.Web.UI;
|
|
|
|
|
|
using System.Web.UI.WebControls;
|
2024-05-31 16:17:04 +08:00
|
|
|
|
|
|
|
|
|
|
namespace FineUIPro.Web.CQMS.QualityPlanning
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class Organizational : PageBase
|
|
|
|
|
|
{
|
|
|
|
|
|
#region 加载
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 加载页面
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
string projectId = this.CurrUser.LoginProjectId;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
this.ContentPanel3.Title = "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(projectId);
|
|
|
|
|
|
|
|
|
|
|
|
if (TabStrip1.ActiveTabIndex == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpUnitId.Items.Clear();
|
|
|
|
|
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, projectId, BLL.Const.ProjectUnitType_1, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (TabStrip1.ActiveTabIndex == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpUnitId.Items.Clear();
|
|
|
|
|
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, projectId, BLL.Const.ProjectUnitType_2, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
DataBind(this.drpUnitId.SelectedValue);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 加载数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="unitId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private void DataBind(string unitId)
|
|
|
|
|
|
{
|
|
|
|
|
|
string projectId = this.CurrUser.LoginProjectId;
|
|
|
|
|
|
if (unitId == BLL.Const.UnitId_CWCEC)
|
|
|
|
|
|
{
|
|
|
|
|
|
string projectManagerName = string.Empty;
|
|
|
|
|
|
var projectManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目经理");
|
|
|
|
|
|
if (projectManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in projectManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
projectManagerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(projectManagerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Label1.Text = "项目经理:" + projectManagerName.Substring(0, projectManagerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
string deputyProjectManagerName = string.Empty;
|
|
|
|
|
|
var deputyProjectManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目副经理");
|
|
|
|
|
|
if (deputyProjectManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in deputyProjectManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
deputyProjectManagerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(deputyProjectManagerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Label2.Text = "项目副经理:" + deputyProjectManagerName.Substring(0, deputyProjectManagerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-07 22:07:03 +08:00
|
|
|
|
string sjName = string.Empty;
|
|
|
|
|
|
var sj = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设计经理");
|
|
|
|
|
|
if (sj != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in sj)
|
|
|
|
|
|
{
|
|
|
|
|
|
sjName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(sjName))
|
|
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label3.Text = "设计经理:" + sjName.Substring(0, sjName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string cgName = string.Empty;
|
|
|
|
|
|
var cg = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "采购经理");
|
|
|
|
|
|
if (cg != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in cg)
|
|
|
|
|
|
{
|
|
|
|
|
|
cgName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(cgName))
|
|
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label7.Text = "采购经理:" + cgName.Substring(0, cgName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string name4 = string.Empty;
|
|
|
|
|
|
var con = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工经理");
|
|
|
|
|
|
if (con != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in con)
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name4))
|
|
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label5.Text = "施工经理:" + name4.Substring(0, name4.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string name5 = string.Empty;
|
|
|
|
|
|
var qa = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量经理");
|
|
|
|
|
|
if (qa != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in qa)
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name5))
|
|
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label6.Text = "质量经理:" + name5.Substring(0, name5.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string name6 = string.Empty;
|
2025-12-05 16:07:28 +08:00
|
|
|
|
var hseManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设计工程师");
|
2024-06-07 22:07:03 +08:00
|
|
|
|
if (hseManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
name6 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name6))
|
|
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label4.Text = "设计工程师:" + name6.Substring(0, name6.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string warehousemanName = string.Empty;
|
2025-12-05 16:07:28 +08:00
|
|
|
|
var warehousemanLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工工程师");
|
2024-06-07 22:07:03 +08:00
|
|
|
|
if (warehousemanLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in warehousemanLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
warehousemanName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(warehousemanName))
|
|
|
|
|
|
{
|
|
|
|
|
|
warehousemanName = warehousemanName.Substring(0, warehousemanName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label8.Text = "施工工程师:" + warehousemanName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
|
|
|
|
|
|
string name7 = string.Empty;
|
|
|
|
|
|
string nameList = string.Empty;
|
|
|
|
|
|
var carManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓储、采购工程师");
|
|
|
|
|
|
if (carManager != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in carManager)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
name7 += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList += name7;
|
|
|
|
|
|
}
|
|
|
|
|
|
string ccname = string.Empty;
|
|
|
|
|
|
var ccManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓储工程师");
|
|
|
|
|
|
if (ccManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in ccManager)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
ccname += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
nameList += ccname;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string cgname = string.Empty;
|
|
|
|
|
|
var cgManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "采购工程师");
|
|
|
|
|
|
if (cgManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in cgManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
cgname += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList += cgname;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(nameList))
|
|
|
|
|
|
{
|
|
|
|
|
|
nameList = nameList.Substring(0, nameList.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label9.Text = "仓储、采购工程师:" + nameList;
|
|
|
|
|
|
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
string hseEngineerName = string.Empty;
|
2025-12-05 16:07:28 +08:00
|
|
|
|
var hseEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量工程师");
|
2024-06-07 22:07:03 +08:00
|
|
|
|
if (hseEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(hseEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label10.Text = "质量工程师:" + hseEngineerName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
string carEngineerName = string.Empty;
|
2025-12-05 16:07:28 +08:00
|
|
|
|
var carEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "现场资料员");
|
2024-06-07 22:07:03 +08:00
|
|
|
|
if (carEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in carEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
carEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(carEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
carEngineerName = carEngineerName.Substring(0, carEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
this.Label11.Text = "现场资料员:" + carEngineerName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
string threeTestName = string.Empty;
|
|
|
|
|
|
var threeTestList = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, BLL.Const.ProjectUnitType_5);
|
|
|
|
|
|
if (threeTestList != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in threeTestList)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
threeTestName += item.UnitName + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(threeTestName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
threeTestName = threeTestName.Substring(0, threeTestName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Label12.Text = "第三方检测:" + threeTestName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
string subUnitName = string.Empty;
|
|
|
|
|
|
var subUnitList = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, BLL.Const.ProjectUnitType_2);
|
|
|
|
|
|
if (subUnitList != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in subUnitList)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
subUnitName += item.UnitName + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(subUnitName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
subUnitName = subUnitName.Substring(0, subUnitName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Label13.Text = "施工分包商:" + subUnitName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
this.divSubOrganizational.Visible = true;
|
|
|
|
|
|
this.divOrganizational.Visible = false;
|
|
|
|
|
|
|
|
|
|
|
|
string projectManagerName = string.Empty;
|
|
|
|
|
|
var projectManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目经理");
|
|
|
|
|
|
if (projectManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in projectManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
projectManagerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(projectManagerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
projectManagerName = projectManagerName.Substring(0, projectManagerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label17.Text = "项目经理:" + projectManagerName;
|
|
|
|
|
|
|
|
|
|
|
|
string name4 = string.Empty;
|
|
|
|
|
|
var con = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工经理");
|
|
|
|
|
|
if (con != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in con)
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name4))
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 = name4.Substring(0, name4.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label18.Text = "施工经理:" + name4;
|
|
|
|
|
|
|
|
|
|
|
|
string name5 = string.Empty;
|
|
|
|
|
|
var qa = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量经理");
|
|
|
|
|
|
if (qa != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in qa)
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name5))
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 = name5.Substring(0, name5.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label19.Text = "质量经理:" + name5;
|
|
|
|
|
|
|
|
|
|
|
|
string name6 = string.Empty;
|
|
|
|
|
|
var hseManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE经理");
|
|
|
|
|
|
if (hseManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
name6 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name6))
|
|
|
|
|
|
{
|
|
|
|
|
|
name6 = name6.Substring(0, name6.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label20.Text = "HSE经理:" + name6;
|
|
|
|
|
|
|
|
|
|
|
|
string docName = string.Empty;
|
|
|
|
|
|
var doc = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "文控工程师");
|
|
|
|
|
|
if (doc != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in doc)
|
|
|
|
|
|
{
|
|
|
|
|
|
docName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(docName))
|
|
|
|
|
|
{
|
|
|
|
|
|
docName = docName.Substring(0, docName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label21.Text = "文控工程师:" + docName;
|
|
|
|
|
|
|
|
|
|
|
|
string hseEngineerName = string.Empty;
|
|
|
|
|
|
var hseEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE工程师");
|
|
|
|
|
|
if (hseEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(hseEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label22.Text = "HSE工程师:" + hseEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
string CVEngineerName = string.Empty;
|
|
|
|
|
|
var CVEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "土建工程师");
|
|
|
|
|
|
if (CVEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in CVEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
CVEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(CVEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
CVEngineerName = CVEngineerName.Substring(0, CVEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label23.Text = "土建工程师:" + CVEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
string FEEngineerName = string.Empty;
|
|
|
|
|
|
var FEEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设备工程师");
|
|
|
|
|
|
if (FEEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in FEEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
FEEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(FEEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
FEEngineerName = FEEngineerName.Substring(0, FEEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label24.Text = "设备工程师:" + FEEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
string PDEngineerName = string.Empty;
|
|
|
|
|
|
var PDEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "管道工程师");
|
|
|
|
|
|
if (PDEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in PDEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
PDEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PDEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
PDEngineerName = PDEngineerName.Substring(0, PDEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label25.Text = "管道工程师:" + PDEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
string EHEngineerName = string.Empty;
|
|
|
|
|
|
var EHEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "电气工程师");
|
|
|
|
|
|
if (EHEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in EHEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
EHEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(EHEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
EHEngineerName = EHEngineerName.Substring(0, EHEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label26.Text = "电气工程师:" + EHEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
string EAEngineerName = string.Empty;
|
|
|
|
|
|
var EAEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仪表工程师");
|
|
|
|
|
|
if (EAEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in EAEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
EAEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(EAEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
EAEngineerName = EAEngineerName.Substring(0, EAEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Label27.Text = "仪表工程师:" + EAEngineerName;
|
2024-06-04 15:52:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-06-07 22:07:03 +08:00
|
|
|
|
protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (TabStrip1.ActiveTabIndex == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpUnitId.Items.Clear();
|
|
|
|
|
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_1, false);
|
|
|
|
|
|
this.drpUnitId.SelectedIndex = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (TabStrip1.ActiveTabIndex == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.drpUnitId.Items.Clear();
|
|
|
|
|
|
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false);
|
|
|
|
|
|
this.drpUnitId.SelectedIndex = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
DataBind(this.drpUnitId.SelectedValue);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 导出
|
2024-06-04 15:52:03 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 导出
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
string rootPath = Server.MapPath("~/");
|
|
|
|
|
|
string initTemplatePath = string.Empty;
|
|
|
|
|
|
string uploadfilepath = string.Empty;
|
|
|
|
|
|
string newUrl = string.Empty;
|
|
|
|
|
|
string filePath = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
string projectId = this.CurrUser.LoginProjectId;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
string unitId = this.drpUnitId.SelectedValue;
|
|
|
|
|
|
|
2024-06-04 15:52:03 +08:00
|
|
|
|
var pModel = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
|
|
|
|
|
|
|
2024-06-07 22:07:03 +08:00
|
|
|
|
if (unitId == BLL.Const.UnitId_CWCEC)
|
2024-06-06 15:48:52 +08:00
|
|
|
|
{
|
2024-06-07 22:07:03 +08:00
|
|
|
|
initTemplatePath = Const.CQMS_OrganizationalUrl;
|
|
|
|
|
|
uploadfilepath = rootPath + initTemplatePath;
|
2024-06-06 15:48:52 +08:00
|
|
|
|
|
2025-07-24 10:21:02 +08:00
|
|
|
|
newUrl = uploadfilepath.Replace("总包质量管理组织机构图", "总包质量管理组织机构图(" + pModel.ShortName.Replace("/", "") + ")");
|
2024-06-07 22:07:03 +08:00
|
|
|
|
//filePath = initTemplatePath.Replace(".doc", trainRecords.TrainRecordsId.Replace("/", "-") + ".pdf");
|
|
|
|
|
|
if (File.Exists(newUrl))
|
|
|
|
|
|
{
|
|
|
|
|
|
File.Delete(newUrl);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
File.Copy(uploadfilepath, newUrl);
|
|
|
|
|
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
|
|
|
|
|
if (projectName != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
projectName.Text = "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(projectId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark projectManager = doc.Range.Bookmarks["ProjectManager"];
|
|
|
|
|
|
string pm = string.Empty;
|
|
|
|
|
|
var lists1 = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目经理");
|
|
|
|
|
|
if (lists1 != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in lists1)
|
|
|
|
|
|
{
|
|
|
|
|
|
pm += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(pm))
|
|
|
|
|
|
{
|
|
|
|
|
|
pm = pm.Substring(0, pm.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
projectManager.Text = "项目经理:" + pm;
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark deputyProjectManager = doc.Range.Bookmarks["DeputyProjectManager"];
|
|
|
|
|
|
string deputyProject = string.Empty;
|
|
|
|
|
|
var lists2 = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目副经理");
|
|
|
|
|
|
if (lists2 != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in lists2)
|
|
|
|
|
|
{
|
|
|
|
|
|
deputyProject += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(deputyProject))
|
|
|
|
|
|
{
|
|
|
|
|
|
deputyProject = deputyProject.Substring(0, deputyProject.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
deputyProjectManager.Text = "项目副经理:" + deputyProject;
|
|
|
|
|
|
|
2024-06-07 22:07:03 +08:00
|
|
|
|
Bookmark sj = doc.Range.Bookmarks["sjManager"];
|
|
|
|
|
|
string sjName = string.Empty;
|
|
|
|
|
|
var sjLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设计经理");
|
|
|
|
|
|
if (sjLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in sjLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
sjName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(sjName))
|
|
|
|
|
|
{
|
|
|
|
|
|
sjName = sjName.Substring(0, sjName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
sj.Text = "设计经理:" + sjName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark sgManager = doc.Range.Bookmarks["sgManager"];
|
|
|
|
|
|
string name4 = string.Empty;
|
|
|
|
|
|
var con = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工经理");
|
|
|
|
|
|
if (con != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in con)
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name4))
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 = name4.Substring(0, name4.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
sgManager.Text = "施工经理:" + name4;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark qaManager = doc.Range.Bookmarks["qaManager"];
|
|
|
|
|
|
string name5 = string.Empty;
|
|
|
|
|
|
var qa = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量经理");
|
|
|
|
|
|
if (qa != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in qa)
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name5))
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 = name5.Substring(0, name5.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
qaManager.Text = "质量经理:" + name5;
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
|
|
|
|
|
|
Bookmark cgManager = doc.Range.Bookmarks["cgManager"];
|
|
|
|
|
|
string cgName = string.Empty;
|
|
|
|
|
|
var cg = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "采购经理");
|
|
|
|
|
|
if (cg != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in cg)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
cgName += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(cgName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
cgName = cgName.Substring(0, cgName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
cgManager.Text = "采购经理:" + cgName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark designEngineer = doc.Range.Bookmarks["designEngineer"];
|
|
|
|
|
|
string designEName = string.Empty;
|
|
|
|
|
|
var designEngineerNames = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设计工程师");
|
|
|
|
|
|
if (designEngineerNames != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in designEngineerNames)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
designEName += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(designEName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
designEName = "设计工程师:" + designEName.Substring(0, designEName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
designEngineer.Text = "设计工程师:" + designEName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark constructionEngineer = doc.Range.Bookmarks["constructionEngineer"];
|
|
|
|
|
|
string ConEngineer = string.Empty;
|
|
|
|
|
|
var conLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工工程师");
|
|
|
|
|
|
if (conLists != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in conLists)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
ConEngineer += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(ConEngineer))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
ConEngineer = ConEngineer.Substring(0, ConEngineer.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
constructionEngineer.Text = "施工工程师:" + ConEngineer;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark buyEngineer = doc.Range.Bookmarks["buyEngineer"];
|
|
|
|
|
|
string name7 = string.Empty;
|
|
|
|
|
|
string nameList = string.Empty;
|
|
|
|
|
|
var carManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓储、采购工程师");
|
|
|
|
|
|
if (carManager != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in carManager)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
name7 += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList += name7;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
string ccname = string.Empty;
|
|
|
|
|
|
var ccManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓储工程师");
|
|
|
|
|
|
if (ccManager != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in ccManager)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
ccname += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList += ccname;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
string cgname = string.Empty;
|
|
|
|
|
|
var cgEngineer = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "采购工程师");
|
|
|
|
|
|
if (cgEngineer != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in cgEngineer)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
cgname += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList += cgname;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(nameList))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
nameList = nameList.Substring(0, nameList.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
buyEngineer.Text = "仓储、采购工程师:" + nameList;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
|
|
|
|
|
|
Bookmark qualityEngineer = doc.Range.Bookmarks["QualityEngineer"];
|
|
|
|
|
|
string qualityEngineerName = string.Empty;
|
|
|
|
|
|
var qualityEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量工程师");
|
|
|
|
|
|
if (qualityEngineerLists != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in qualityEngineerLists)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
qualityEngineerName += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(qualityEngineerName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
qualityEngineerName = qualityEngineerName.Substring(0, qualityEngineerName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
qualityEngineer.Text = "质量工程师:" + qualityEngineerName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
|
|
|
|
|
|
Bookmark DataClerk = doc.Range.Bookmarks["DataClerk"];
|
|
|
|
|
|
string dataClerkName = string.Empty;
|
|
|
|
|
|
var dataClerkLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "现场资料员");
|
|
|
|
|
|
if (dataClerkLists != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in dataClerkLists)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
dataClerkName += item + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(dataClerkName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
dataClerkName = dataClerkName.Substring(0, dataClerkName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
DataClerk.Text = "现场资料员:" + dataClerkName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark ThreeTest = doc.Range.Bookmarks["ThreeTest"];
|
|
|
|
|
|
string threeTestName = string.Empty;
|
|
|
|
|
|
var threeTestList = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, BLL.Const.ProjectUnitType_5);
|
|
|
|
|
|
if (threeTestList != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in threeTestList)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
threeTestName += item.UnitName + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(threeTestName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
threeTestName = threeTestName.Substring(0, threeTestName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
ThreeTest.Text = "第三方检测:" + threeTestName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
2025-12-05 16:07:28 +08:00
|
|
|
|
Bookmark subUnit = doc.Range.Bookmarks["subUnit"];
|
|
|
|
|
|
string subUnitName = string.Empty;
|
|
|
|
|
|
var subUnitList = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, BLL.Const.ProjectUnitType_2);
|
|
|
|
|
|
if (subUnitList != null)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
foreach (var item in subUnitList)
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
subUnitName += item.UnitName + ",";
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(subUnitName))
|
2024-06-07 22:07:03 +08:00
|
|
|
|
{
|
2025-12-05 16:07:28 +08:00
|
|
|
|
subUnitName = subUnitName.Substring(0, subUnitName.LastIndexOf(','));
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-05 16:07:28 +08:00
|
|
|
|
subUnit.Text = "施工分包商:" + subUnitName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark hse = doc.Range.Bookmarks["hseManager"];
|
|
|
|
|
|
//string name6 = string.Empty;
|
|
|
|
|
|
//var hseManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE经理");
|
|
|
|
|
|
//if (hseManager != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in hseManager)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name6 += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(name6))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name6 = name6.Substring(0, name6.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//hse.Text = "HSE经理:" + name6;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark car = doc.Range.Bookmarks["carManager"];
|
|
|
|
|
|
//string name7 = string.Empty;
|
|
|
|
|
|
//var carManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "开车经理");
|
|
|
|
|
|
//if (carManager != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in carManager)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name7 += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(name7))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name7 = name7.Substring(0, name7.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//car.Text = "开车经理:" + name7;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark warehouse = doc.Range.Bookmarks["warehouseManager"];
|
|
|
|
|
|
//string warehousemanName = string.Empty;
|
|
|
|
|
|
//var warehousemanLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓库管理员");
|
|
|
|
|
|
//if (warehousemanLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in warehousemanLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// warehousemanName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(warehousemanName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// warehousemanName = warehousemanName.Substring(0, warehousemanName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//warehouse.Text = "仓库管理员:" + warehousemanName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark docManager = doc.Range.Bookmarks["docManager"];
|
|
|
|
|
|
//string docName = string.Empty;
|
|
|
|
|
|
//var docm = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "文控工程师");
|
|
|
|
|
|
//if (docm != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in docm)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// docName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(docName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// docName = docName.Substring(0, docName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//docManager.Text = "文控工程师:" + docName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark hseEngineer = doc.Range.Bookmarks["hseEngineer"];
|
|
|
|
|
|
//string hseEngineerName = string.Empty;
|
|
|
|
|
|
//var hseEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE工程师");
|
|
|
|
|
|
//if (hseEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in hseEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// hseEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(hseEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//hseEngineer.Text = "HSE工程师:" + hseEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark carEngineer = doc.Range.Bookmarks["carEngineer"];
|
|
|
|
|
|
//string carEngineerName = string.Empty;
|
|
|
|
|
|
//var carEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "开车工程师");
|
|
|
|
|
|
//if (carEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in carEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// carEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(carEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// carEngineerName = carEngineerName.Substring(0, carEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//carEngineer.Text = "开车工程师:" + carEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark CVEngineer = doc.Range.Bookmarks["CVEngineer"];
|
|
|
|
|
|
//string CVEngineerName = string.Empty;
|
|
|
|
|
|
//var CVEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "土建工程师");
|
|
|
|
|
|
//if (CVEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in CVEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// CVEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(CVEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// CVEngineerName = CVEngineerName.Substring(0, CVEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//CVEngineer.Text = "土建工程师:" + CVEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark FEEngineer = doc.Range.Bookmarks["FEEngineer"];
|
|
|
|
|
|
//string FEEngineerName = string.Empty;
|
|
|
|
|
|
//var FEEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设备工程师");
|
|
|
|
|
|
//if (FEEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in FEEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// FEEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(FEEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// FEEngineerName = FEEngineerName.Substring(0, FEEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//FEEngineer.Text = "设备工程师:" + FEEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark PDEngineer = doc.Range.Bookmarks["PDEngineer"];
|
|
|
|
|
|
//string PDEngineerName = string.Empty;
|
|
|
|
|
|
//var PDEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "管道工程师");
|
|
|
|
|
|
//if (PDEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in PDEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// PDEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(PDEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// PDEngineerName = PDEngineerName.Substring(0, PDEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//PDEngineer.Text = "管道工程师:" + PDEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark EHEngineer = doc.Range.Bookmarks["EHEngineer"];
|
|
|
|
|
|
//string EHEngineerName = string.Empty;
|
|
|
|
|
|
//var EHEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "电气工程师");
|
|
|
|
|
|
//if (EHEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in EHEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// EHEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(EHEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// EHEngineerName = EHEngineerName.Substring(0, EHEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//EHEngineer.Text = "电气工程师:" + EHEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
//Bookmark EAEngineer = doc.Range.Bookmarks["EAEngineer"];
|
|
|
|
|
|
//string EAEngineerName = string.Empty;
|
|
|
|
|
|
//var EAEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仪表工程师");
|
|
|
|
|
|
//if (EAEngineerLists != null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// foreach (var item in EAEngineerLists)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// EAEngineerName += item + ",";
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (!string.IsNullOrEmpty(EAEngineerName))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// EAEngineerName = EAEngineerName.Substring(0, EAEngineerName.LastIndexOf(','));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//EAEngineer.Text = "仪表工程师:" + EAEngineerName;
|
2024-06-07 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
doc.Save(newUrl);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
2024-06-04 15:52:03 +08:00
|
|
|
|
{
|
2024-06-07 22:07:03 +08:00
|
|
|
|
initTemplatePath = Const.CQMS_SubOrganizationalUrl;
|
|
|
|
|
|
uploadfilepath = rootPath + initTemplatePath;
|
|
|
|
|
|
|
|
|
|
|
|
newUrl = uploadfilepath.Replace("分包质量管理组织机构图", "分包质量管理组织机构图(" + pModel.ShortName + ")");
|
|
|
|
|
|
//filePath = initTemplatePath.Replace(".doc", trainRecords.TrainRecordsId.Replace("/", "-") + ".pdf");
|
|
|
|
|
|
if (File.Exists(newUrl))
|
|
|
|
|
|
{
|
|
|
|
|
|
File.Delete(newUrl);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
File.Copy(uploadfilepath, newUrl);
|
|
|
|
|
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
|
|
|
|
|
if (projectName != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
projectName.Text = "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(projectId);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark projectManager = doc.Range.Bookmarks["ProjectManager"];
|
|
|
|
|
|
string pm = string.Empty;
|
|
|
|
|
|
var lists1 = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目经理");
|
|
|
|
|
|
if (lists1 != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in lists1)
|
|
|
|
|
|
{
|
|
|
|
|
|
pm += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(pm))
|
|
|
|
|
|
{
|
|
|
|
|
|
pm = pm.Substring(0, pm.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
projectManager.Text = "项目经理:" + pm;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark sgManager = doc.Range.Bookmarks["sgManager"];
|
|
|
|
|
|
string name4 = string.Empty;
|
|
|
|
|
|
var con = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工经理");
|
|
|
|
|
|
if (con != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in con)
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name4))
|
|
|
|
|
|
{
|
|
|
|
|
|
name4 = name4.Substring(0, name4.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
sgManager.Text = "施工经理:" + name4;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark qaManager = doc.Range.Bookmarks["qaManager"];
|
|
|
|
|
|
string name5 = string.Empty;
|
|
|
|
|
|
var qa = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量经理");
|
|
|
|
|
|
if (qa != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in qa)
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name5))
|
|
|
|
|
|
{
|
|
|
|
|
|
name5 = name5.Substring(0, name5.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
qaManager.Text = "质量经理:" + name5;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark hse = doc.Range.Bookmarks["hseManager"];
|
|
|
|
|
|
string name6 = string.Empty;
|
|
|
|
|
|
var hseManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE经理");
|
|
|
|
|
|
if (hseManager != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseManager)
|
|
|
|
|
|
{
|
|
|
|
|
|
name6 += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(name6))
|
|
|
|
|
|
{
|
|
|
|
|
|
name6 = name6.Substring(0, name6.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
hse.Text = "HSE经理:" + name6;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark docManager = doc.Range.Bookmarks["docManager"];
|
|
|
|
|
|
string docName = string.Empty;
|
|
|
|
|
|
var docm = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "文控工程师");
|
|
|
|
|
|
if (docm != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in docm)
|
|
|
|
|
|
{
|
|
|
|
|
|
docName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(docName))
|
|
|
|
|
|
{
|
|
|
|
|
|
docName = docName.Substring(0, docName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
docManager.Text = "文控工程师:" + docName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark hseEngineer = doc.Range.Bookmarks["hseEngineer"];
|
|
|
|
|
|
string hseEngineerName = string.Empty;
|
|
|
|
|
|
var hseEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE工程师");
|
|
|
|
|
|
if (hseEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in hseEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(hseEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
hseEngineer.Text = "HSE工程师:" + hseEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark CVEngineer = doc.Range.Bookmarks["CVEngineer"];
|
|
|
|
|
|
string CVEngineerName = string.Empty;
|
|
|
|
|
|
var CVEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "土建工程师");
|
|
|
|
|
|
if (CVEngineerLists != null)
|
2024-06-04 15:52:03 +08:00
|
|
|
|
{
|
2024-06-07 22:07:03 +08:00
|
|
|
|
foreach (var item in CVEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
CVEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(CVEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
CVEngineerName = CVEngineerName.Substring(0, CVEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
CVEngineer.Text = "土建工程师:" + CVEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark FEEngineer = doc.Range.Bookmarks["FEEngineer"];
|
|
|
|
|
|
string FEEngineerName = string.Empty;
|
|
|
|
|
|
var FEEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设备工程师");
|
|
|
|
|
|
if (FEEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in FEEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
FEEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(FEEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
FEEngineerName = FEEngineerName.Substring(0, FEEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
FEEngineer.Text = "设备工程师:" + FEEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark PDEngineer = doc.Range.Bookmarks["PDEngineer"];
|
|
|
|
|
|
string PDEngineerName = string.Empty;
|
|
|
|
|
|
var PDEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "管道工程师");
|
|
|
|
|
|
if (PDEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in PDEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
PDEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PDEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
PDEngineerName = PDEngineerName.Substring(0, PDEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
PDEngineer.Text = "管道工程师:" + PDEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark EHEngineer = doc.Range.Bookmarks["EHEngineer"];
|
|
|
|
|
|
string EHEngineerName = string.Empty;
|
|
|
|
|
|
var EHEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "电气工程师");
|
|
|
|
|
|
if (EHEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in EHEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
EHEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(EHEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
EHEngineerName = EHEngineerName.Substring(0, EHEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
EHEngineer.Text = "电气工程师:" + EHEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
Bookmark EAEngineer = doc.Range.Bookmarks["EAEngineer"];
|
|
|
|
|
|
string EAEngineerName = string.Empty;
|
|
|
|
|
|
var EAEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仪表工程师");
|
|
|
|
|
|
if (EAEngineerLists != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in EAEngineerLists)
|
|
|
|
|
|
{
|
|
|
|
|
|
EAEngineerName += item + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(EAEngineerName))
|
|
|
|
|
|
{
|
|
|
|
|
|
EAEngineerName = EAEngineerName.Substring(0, EAEngineerName.LastIndexOf(','));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
EAEngineer.Text = "仪表工程师:" + EAEngineerName;
|
|
|
|
|
|
|
|
|
|
|
|
doc.Save(newUrl);
|
|
|
|
|
|
}
|
2024-06-04 15:52:03 +08:00
|
|
|
|
string fileName = Path.GetFileName(newUrl);
|
|
|
|
|
|
FileInfo info = new FileInfo(newUrl);
|
|
|
|
|
|
long fileSize = info.Length;
|
|
|
|
|
|
Response.Clear();
|
|
|
|
|
|
Response.ContentType = "application/x-zip-compressed";
|
|
|
|
|
|
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
|
|
|
|
|
Response.AddHeader("Content-Length", fileSize.ToString());
|
|
|
|
|
|
Response.TransmitFile(newUrl, 0, fileSize);
|
|
|
|
|
|
Response.Flush();
|
|
|
|
|
|
Response.Close();
|
|
|
|
|
|
File.Delete(newUrl);
|
2024-05-31 16:17:04 +08:00
|
|
|
|
}
|
2024-06-07 22:07:03 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region DropDownList下拉选择事件
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 单位下拉选择
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void drpUnitId_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataBind(this.drpUnitId.SelectedValue);
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2024-05-31 16:17:04 +08:00
|
|
|
|
}
|
2024-06-07 22:07:03 +08:00
|
|
|
|
}
|