refactor(cqms): 整理检查模块并迁移 WBS 服务

清理旧检查页面、服务和接口,补充 WBS 检查服务及数据库脚本,同步工程引用与菜单配置,收敛 CQMS 检查功能的代码组织。
This commit is contained in:
2026-09-20 15:49:27 +08:00
parent 8efe030f47
commit dc19b6d6b6
204 changed files with 319 additions and 59884 deletions
@@ -96,7 +96,6 @@
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
@@ -114,28 +113,15 @@
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="选择设计交底单位" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Self" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="600px" Height="300px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuMore" OnClick="btnMenuMore_Click" EnablePostBack="true" runat="server" Icon="ZoomIn"
Text="展开全部">
</f:MenuButton>
<f:MenuButton ID="btnMenuAddTechnicalDisclose" OnClick="btnMenuAddTechnicalDisclose_Click" EnablePostBack="true" runat="server" Icon="Add"
Text="发起设计交底">
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu2" runat="server">
<f:MenuButton ID="btnMenuAddTechnicalDisclose2" OnClick="btnMenuAddTechnicalDisclose2_Click" EnablePostBack="true" runat="server" Icon="Add"
Text="发起设计交底">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var treeID = '<%= trWBS.ClientID %>';
var menuID = '<%= Menu1.ClientID %>';
var menuID2 = '<%= Menu2.ClientID %>';
// 保存当前菜单对应的树节点ID
var currentNodeId;
@@ -167,11 +153,6 @@
}
}
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID2).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>
@@ -190,118 +190,6 @@ namespace FineUIPro.Web.CQMS.WBS
}
#endregion
/// <summary>
/// 关闭窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
}
/// <summary>
/// 发起设计交底(树节点)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuAddTechnicalDisclose_Click(object sender, EventArgs e)
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CQMSTechnicalDiscloseMenuId, BLL.Const.BtnAdd))
{
if (this.trWBS.SelectedNode.CommandName == "WorkPackage")
{
var childWorkPackages = from x in Funs.DB.WBS_WorkPackage where x.SuperWorkPackageId == this.trWBS.SelectedNodeID && x.IsApprove == true select x;
if (childWorkPackages.Count() == 0) //末级节点
{
var oldTechnicalDisclose = BLL.CQMS_TechnicalDiscloseService.GetTechnicalDiscloseByDataId(this.trWBS.SelectedNodeID);
if (oldTechnicalDisclose == null)
{
var unitWork = (from x in Funs.DB.WBS_UnitWork
join y in Funs.DB.WBS_WorkPackage on x.UnitWorkId equals y.UnitWorkId
where y.WorkPackageId == this.trWBS.SelectedNodeID
select x).FirstOrDefault();
string unitWorkId = string.Empty;
if (unitWork != null)
{
unitWorkId = unitWork.UnitWorkId;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SelectUnit.aspx?UnitWorkId={0}&DataId={1}", unitWorkId, this.trWBS.SelectedNodeID, "导入 - ")));
}
else
{
ShowNotify("该节点已发起设计交底!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请选择末级节点发起设计交底!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请选择末级节点发起设计交底!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 发起设计交底(表格节点)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuAddTechnicalDisclose2_Click(object sender, EventArgs e)
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CQMSTechnicalDiscloseMenuId, BLL.Const.BtnAdd))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
var oldTechnicalDisclose = BLL.CQMS_TechnicalDiscloseService.GetTechnicalDiscloseByDataId(id);
if (oldTechnicalDisclose == null)
{
var unitWork = (from x in Funs.DB.WBS_UnitWork
join y in Funs.DB.WBS_WorkPackage on x.UnitWorkId equals y.UnitWorkId
where y.WorkPackageId == this.trWBS.SelectedNodeID
select x).FirstOrDefault();
string unitWorkId = string.Empty;
if (unitWork != null)
{
unitWorkId = unitWork.UnitWorkId;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SelectUnit.aspx?UnitWorkId={0}&DataId={1}", unitWorkId, id, "导入 - ")));
}
else
{
ShowNotify("该节点已发起设计交底!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 展开全部
/// </summary>
@@ -647,4 +535,4 @@ namespace FineUIPro.Web.CQMS.WBS
}
#endregion
}
}
}
@@ -165,15 +165,6 @@ namespace FineUIPro.Web.CQMS.WBS {
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -192,31 +183,5 @@ namespace FineUIPro.Web.CQMS.WBS {
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuMore;
/// <summary>
/// btnMenuAddTechnicalDisclose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAddTechnicalDisclose;
/// <summary>
/// Menu2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu2;
/// <summary>
/// btnMenuAddTechnicalDisclose2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAddTechnicalDisclose2;
}
}
@@ -1,38 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectUnit.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.SelectUnit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList runat="server" ID="drpUnit" Label="单位名称" LabelWidth="150px" ShowRedStar="true"></f:DropDownList>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
OnClick="btnSave_Click" Text="发起">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -1,64 +0,0 @@
using BLL;
using System;
namespace FineUIPro.Web.CQMS.WBS
{
public partial class SelectUnit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string UnitWorkId = Request.Params["UnitWorkId"];
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWorkId);
if (unitWork != null)
{
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, unitWork.UnitId, true);//单位
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveData(true);
}
private void SaveData(bool b)
{
if (this.drpUnit.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择单位名称!", MessageBoxIcon.Warning);
return;
}
Model.Technical_TechnicalDisclose technicalDisclose = new Model.Technical_TechnicalDisclose();
technicalDisclose.TechnicalDiscloseId = SQLHelper.GetNewID();
technicalDisclose.ProjectId = this.CurrUser.LoginProjectId;
technicalDisclose.UnitId = this.drpUnit.SelectedValue;
technicalDisclose.UnitWorkId = Request.Params["UnitWorkId"];
string dataId = Request.Params["DataId"];
technicalDisclose.DataId = dataId;
string discloseName = string.Empty;
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(dataId);
if (workPackage != null)
{
discloseName = workPackage.PackageContent;
}
else
{
var controlItemAndCycle = BLL.ControlItemAndCycleService.GetControlItemAndCycleById(dataId);
if (controlItemAndCycle != null)
{
discloseName = controlItemAndCycle.ControlItemContent;
}
}
technicalDisclose.DiscloseName = discloseName;
technicalDisclose.State = "0"; //未交底
technicalDisclose.CompileMan = this.CurrUser.PersonId;
technicalDisclose.CompileDate = DateTime.Now;
BLL.CQMS_TechnicalDiscloseService.AddTechnicalDisclose(technicalDisclose);
ShowNotify("发起成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
}
}
}
-87
View File
@@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.WBS {
public partial class SelectUnit {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdCheckerId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckerId;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}