refactor(cqms): 整理检查模块并迁移 WBS 服务
清理旧检查页面、服务和接口,补充 WBS 检查服务及数据库脚本,同步工程引用与菜单配置,收敛 CQMS 检查功能的代码组织。
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user