20241021 修改共检通知单
This commit is contained in:
parent
66d458026e
commit
abb15b53fc
|
@ -0,0 +1,13 @@
|
|||
|
||||
alter table ProcessControl_InspectionManagement add ChildUnitWorkId nvarchar(50)
|
||||
alter table ProcessControl_InspectionManagement add ChildBranch nvarchar(50)
|
||||
go
|
||||
ALTER TABLE [dbo].[ProcessControl_InspectionManagement] DROP CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_CNProfessional]
|
||||
GO
|
||||
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='D03E079B-8B97-4C5A-BF1C-782887548B92' where CNProfessionalId='10487C07-DE54-4ED6-BBDF-2C7988A44665'--¹ÜµÀ
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='445B1EE6-901E-4A07-A4AB-4EE1066E742F' where CNProfessionalId='DEB367FF-AD35-41A0-B68E-FA8E68737B93'--µçÆø
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='E9AC9563-E338-48B7-867D-488222AD0557' where CNProfessionalId='F41C5022-F499-4BD7-84B6-E87E4CE53CAC'--ÍÁ½¨
|
||||
--update ProcessControl_InspectionManagement set CNProfessionalId='' where CNProfessionalId='FBC066BE-082F-4185-AE5C-016A12132ADE'--É豸
|
||||
|
||||
|
|
@ -21,6 +21,11 @@ namespace BLL
|
|||
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static List<Model.Control_PointCropping> GetCnProList()
|
||||
{
|
||||
return (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
|
|
|
@ -250,6 +250,8 @@ namespace BLL
|
|||
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
|
||||
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
|
||||
newInspectionManagement.FileType = inspectionManagement.FileType;
|
||||
newInspectionManagement.ChildUnitWorkId = inspectionManagement.ChildUnitWorkId;
|
||||
newInspectionManagement.ChildBranch = inspectionManagement.ChildBranch;
|
||||
db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
@ -282,6 +284,8 @@ namespace BLL
|
|||
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
|
||||
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
|
||||
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
|
||||
newInspectionManagement.ChildUnitWorkId = inspectionManagement.ChildUnitWorkId;
|
||||
newInspectionManagement.ChildBranch = inspectionManagement.ChildBranch;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,14 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
||||
//BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
||||
//专业
|
||||
this.drpCNProfessional.DataTextField = "DetectionItems";
|
||||
this.drpCNProfessional.DataValueField = "ControlId";
|
||||
this.drpCNProfessional.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||
this.drpCNProfessional.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpCNProfessional);
|
||||
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BindGrid();
|
||||
}
|
||||
|
@ -42,7 +49,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
P.CNProfessionalId,
|
||||
P.UnitWorkId,
|
||||
U.UnitName,
|
||||
C.ProfessionalName,
|
||||
C.DetectionItems as ProfessionalName,
|
||||
P.NoticeCode,
|
||||
UnitWork.UnitWorkName,
|
||||
DP.DivisionName AS Branch,
|
||||
|
@ -52,7 +59,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
P.AcceptanceCheckMan"
|
||||
+ @" FROM ProcessControl_InspectionManagement AS P"
|
||||
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
||||
+ @" LEFT JOIN Base_CNProfessional C ON C.CNProfessionalId = P.CNProfessionalId"
|
||||
+ @" LEFT JOIN Control_PointCropping C ON C.ControlId = P.CNProfessionalId"
|
||||
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
||||
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
||||
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
||||
|
|
|
@ -15,91 +15,56 @@
|
|||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="施工分包商" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" >
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="施工分包商" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" ></f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtNoticeCode" runat="server" Label="共检通知单编号" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtAcceptanceSite" Label="验收部位" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true" ></f:TextBox>
|
||||
<f:TextBox ID="txtNoticeCode" runat="server" Label="共检通知单" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
<f:DropDownList ID="drpUnitWorkId" runat="server" Label="单位工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWorkId_SelectedIndexChanged" Hidden="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="fr1" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitWorkId" runat="server" Label="单位工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWorkId_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpChirldUnitWorkId" runat="server" Label="子单位工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpChirldUnitWorkId_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpBranch" runat="server" Label="分部工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpBranch_SelectedIndexChanged"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="fr2" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpChildBranch" runat="server" Label="子分部工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpChildBranch_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpProEngineering" runat="server" Label="分项工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true"></f:DropDownList>
|
||||
<f:Label ID="Lable1" runat="server"></f:Label>
|
||||
</Items>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow ColumnWidths="95% 5%">
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUnitWork" Label="单位工程名称" runat="server" Readonly="true" LabelAlign="Right" LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnSearch" OnClick="btnSearch_Click" ToolTip="搜索" Icon="Find" EnablePostBack="true" runat="server">
|
||||
<f:TextBox runat="server" ID="txtAcceptanceSite" Label="验收部位" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="50% 10% 30%">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpAcceptanceCheckMan" runat="server" Label="检查人" EnableCheckBoxSelect="true" LabelWidth="130px"
|
||||
EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
LabelWidth="130px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtBranch" Label="分部" Readonly="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtControlPointType" Label="控制点内容" LabelAlign="Right" LabelWidth="130px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtClass" Label="控制点等级" LabelAlign="Right" LabelWidth="130px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow ColumnWidths="50% 10% 30%">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpAcceptanceCheckMan" runat="server" Label="检查人" EnableCheckBoxSelect="true" LabelWidth="130px"
|
||||
EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
<%-- <f:TextBox runat="server" ID="txtAcceptanceCheckMan" Label="检查人" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>--%>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
LabelWidth="130px" LabelAlign="Right" >
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="共检内容列表" EnableCollapse="false" runat="server"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="共检内容列表" EnableCollapse="false" runat="server"
|
||||
BoxFlex="1" DataKeyNames="InspectionDetailId,ControlPointType" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="1" DataIDField="InspectionDetailId" OnRowCommand="Grid1_RowCommand" AllowSorting="true" ForceFit="true" SortField="CreateDate"
|
||||
EnableTextSelection="True" >
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
|
@ -110,8 +75,7 @@
|
|||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField ColumnID="UnitWork" Width="120px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Center"
|
||||
>
|
||||
<f:TemplateField ColumnID="UnitWork" Width="120px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitWork(Eval("UnitWorkId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
|
|
@ -21,14 +21,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
//测试阶段,仅hfnbd账号使用
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
{
|
||||
this.drpUnitWorkId.Hidden = false;
|
||||
this.fr1.Hidden = false;
|
||||
this.fr2.Hidden = false;
|
||||
}
|
||||
GetButtonPower();
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
//BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
//专业
|
||||
this.drpCNProfessionalId.DataTextField = "DetectionItems";
|
||||
this.drpCNProfessionalId.DataValueField = "ControlId";
|
||||
this.drpCNProfessionalId.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||
this.drpCNProfessionalId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpCNProfessionalId);
|
||||
|
||||
//单位工程
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
|
@ -44,9 +51,11 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
this.drpUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpUnitWorkId.DataSource = q;
|
||||
this.drpUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpUnitWorkId);
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);
|
||||
Funs.FineUIPleaseSelect(this.drpUnitWorkId);//单位工程
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);//子单位工程
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);//分部工程
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);//子分部工程
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);//分项工程
|
||||
|
||||
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
|
||||
if (!string.IsNullOrEmpty(Request.Params["View"]))
|
||||
|
@ -75,27 +84,118 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
|
||||
{
|
||||
this.drpUnitWorkId.SelectedValue = inspectionManagement.UnitWorkId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))
|
||||
{
|
||||
//子单位工程
|
||||
var childUnitWorks = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.SuperUnitWork == inspectionManagement.UnitWorkId
|
||||
&& (y.SuperUnitWork != "0")
|
||||
select new
|
||||
{
|
||||
y.UnitWorkId,
|
||||
UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
|
||||
}).Distinct().ToList();
|
||||
this.drpChirldUnitWorkId.DataTextField = "UnitWorkName";
|
||||
this.drpChirldUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpChirldUnitWorkId.DataSource = childUnitWorks;
|
||||
this.drpChirldUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);
|
||||
this.drpChirldUnitWorkId.SelectedIndex = 0;
|
||||
this.drpChirldUnitWorkId.SelectedValue = inspectionManagement.ChildUnitWorkId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.Branch))
|
||||
{
|
||||
//分部工程
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = a;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
|
||||
this.drpBranch.SelectedValue = inspectionManagement.Branch;
|
||||
if (string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))//无子单位工程
|
||||
{
|
||||
//分部工程
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == inspectionManagement.UnitWorkId
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = a;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
this.drpBranch.SelectedValue = inspectionManagement.Branch;
|
||||
}
|
||||
else
|
||||
{
|
||||
//分部工程(有子单位工程)
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == inspectionManagement.ChildUnitWorkId
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = a;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
this.drpBranch.SelectedValue = inspectionManagement.Branch;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildBranch))
|
||||
{
|
||||
#region 子分部工程
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))
|
||||
{
|
||||
//子分部工程
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == inspectionManagement.Branch
|
||||
&& x.UnitWorkId == inspectionManagement.ChildUnitWorkId
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == inspectionManagement.Branch
|
||||
&& x.UnitWorkId == inspectionManagement.UnitWorkId
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
this.drpChildBranch.SelectedValue = inspectionManagement.ChildBranch;
|
||||
#endregion
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ControlPointType))
|
||||
{
|
||||
|
@ -215,10 +315,18 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
{
|
||||
inspectionManagement.UnitWorkId = this.drpUnitWorkId.SelectedValue;
|
||||
}
|
||||
if (this.drpChirldUnitWorkId.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ChildUnitWorkId = this.drpChirldUnitWorkId.SelectedValue;
|
||||
}
|
||||
if (this.drpBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.Branch = this.drpBranch.SelectedValue;
|
||||
}
|
||||
if (this.drpChildBranch.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ChildBranch = this.drpChildBranch.SelectedValue;
|
||||
}
|
||||
if (this.drpProEngineering.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ControlPointType = this.drpProEngineering.SelectedValue;
|
||||
|
@ -527,9 +635,29 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
/// <param name="e"></param>
|
||||
protected void drpUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpBranch.Items.Clear();
|
||||
this.drpChirldUnitWorkId.Items.Clear();
|
||||
if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//子单位工程
|
||||
var childUnitWorks = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.SuperUnitWork == this.drpUnitWorkId.SelectedValue
|
||||
&& (y.SuperUnitWork != "0")
|
||||
select new
|
||||
{
|
||||
y.UnitWorkId,
|
||||
UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
|
||||
}).Distinct().ToList();
|
||||
this.drpChirldUnitWorkId.DataTextField = "UnitWorkName";
|
||||
this.drpChirldUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpChirldUnitWorkId.DataSource = childUnitWorks;
|
||||
this.drpChirldUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);
|
||||
this.drpChirldUnitWorkId.SelectedIndex = 0;
|
||||
|
||||
//分部工程
|
||||
this.drpBranch.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
|
@ -545,8 +673,37 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
this.drpBranch.DataSource = q;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子单位工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpChirldUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpChirldUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
this.drpBranch.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpChirldUnitWorkId.SelectedValue
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = q;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
}
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -556,9 +713,55 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
/// <param name="e"></param>
|
||||
protected void drpBranch_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpProEngineering.Items.Clear();
|
||||
this.drpChildBranch.Items.Clear();
|
||||
if (this.drpBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
#region 子分部工程
|
||||
if (this.drpChirldUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//子分部工程
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& x.UnitWorkId == this.drpChirldUnitWorkId.SelectedValue
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
//分项工程
|
||||
this.drpProEngineering.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
|
@ -600,6 +803,36 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
|||
}
|
||||
this.drpProEngineering.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子分部工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpChildBranch_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpProEngineering.Items.Clear();
|
||||
if (this.drpChildBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//分项工程
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == this.drpChildBranch.SelectedValue
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = a;
|
||||
this.drpProEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);
|
||||
this.drpProEngineering.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -67,13 +67,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
|||
protected global::FineUIPro.TextBox txtNoticeCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptanceSite 控件。
|
||||
/// drpUnitWorkId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAcceptanceSite;
|
||||
protected global::FineUIPro.DropDownList drpUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// fr1 控件。
|
||||
|
@ -85,13 +85,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
|||
protected global::FineUIPro.FormRow fr1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWorkId 控件。
|
||||
/// drpChirldUnitWorkId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWorkId;
|
||||
protected global::FineUIPro.DropDownList drpChirldUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// drpBranch 控件。
|
||||
|
@ -111,6 +111,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow fr2;
|
||||
|
||||
/// <summary>
|
||||
/// drpChildBranch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpChildBranch;
|
||||
|
||||
/// <summary>
|
||||
/// drpProEngineering 控件。
|
||||
/// </summary>
|
||||
|
@ -121,13 +130,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
|||
protected global::FineUIPro.DropDownList drpProEngineering;
|
||||
|
||||
/// <summary>
|
||||
/// Lable1 控件。
|
||||
/// txtAcceptanceSite 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Lable1;
|
||||
protected global::FineUIPro.TextBox txtAcceptanceSite;
|
||||
|
||||
/// <summary>
|
||||
/// drpAcceptanceCheckMan 控件。
|
||||
|
@ -156,15 +165,6 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
|
|
@ -333,7 +333,7 @@ namespace FineUIPro.Web
|
|||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "质量一次合格率";
|
||||
var cns = BLL.CNProfessionalService.GetList();
|
||||
var cns = BLL.CNProfessionalService.GetCnProList();
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
|
||||
|
@ -348,16 +348,16 @@ namespace FineUIPro.Web
|
|||
double result = 0, result2 = 0;
|
||||
foreach (var cn in cns)
|
||||
{
|
||||
listCategories.Add(cn.ProfessionalName);
|
||||
var okChecks = TotalCheckDetailOKLists.Where(x => x.CNProfessionalId == cn.CNProfessionalId).ToList();
|
||||
var totalChecks = TotalCheckDetailLists.Where(x => x.CNProfessionalId == cn.CNProfessionalId).ToList();
|
||||
listCategories.Add(cn.DetectionItems);
|
||||
var okChecks = TotalCheckDetailOKLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
||||
var totalChecks = TotalCheckDetailLists.Where(x => x.CNProfessionalId == cn.ControlId).ToList();
|
||||
if (okChecks.Count > 0 && totalChecks.Count > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(okChecks.Count);
|
||||
var b = Convert.ToDouble(totalChecks.Count);
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 1));
|
||||
}
|
||||
if (cn.ProfessionalName.Contains("管道"))
|
||||
if (cn.DetectionItems.Contains("管道"))
|
||||
{
|
||||
var ndtList = (from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && x.ProjectId == this.CurrUser.LoginProjectId orderby x.CreateDate descending select x).FirstOrDefault();
|
||||
if (ndtList != null && !string.IsNullOrEmpty(ndtList.TotalRate))
|
||||
|
|
|
@ -707,14 +707,14 @@ namespace FineUIPro.Web.common
|
|||
private void getInspectionManagementInfo()
|
||||
{
|
||||
|
||||
var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
|
||||
//var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
var q = (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
||||
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
//获取专业
|
||||
InspectionManagementZy += "'" + item.ProfessionalName + "',";
|
||||
InspectionManagementZy += "'" + item.DetectionItems + "',";
|
||||
//根据专业获取总计
|
||||
//var num1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
|
@ -725,18 +725,18 @@ namespace FineUIPro.Web.common
|
|||
if (pids == null)
|
||||
{
|
||||
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId
|
||||
where x.CNProfessionalId == item.ControlId
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
|
||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true
|
||||
select x).Count();
|
||||
}
|
||||
else {
|
||||
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)
|
||||
where x.CNProfessionalId == item.ControlId && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||
where x.CNProfessionalId == item.ControlId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
}
|
||||
|
||||
|
|
2261
SGGL/Model/Model.cs
2261
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue