1
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
alter table HJGL_Batch_PointBatchItem add NDT nvarchar(300) null
|
||||||
|
alter table HJGL_Batch_BatchTrust alter column TrustBatchCode nvarchar(100) null
|
||||||
|
GO
|
||||||
@@ -434,7 +434,7 @@ namespace BLL
|
|||||||
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust
|
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust
|
||||||
{
|
{
|
||||||
TrustBatchId = trustBatchId,
|
TrustBatchId = trustBatchId,
|
||||||
TrustBatchCode = BLL.Batch_BatchTrustService.BuildTrustBatchCode(batch.PointBatchCode, DateTime.Now),
|
TrustBatchCode = BLL.Batch_BatchTrustService.BuildTrustBatchCode(batch.PointBatchCode, DateTime.Now,string.Empty,string.Empty),
|
||||||
TrustDate = DateTime.Now,
|
TrustDate = DateTime.Now,
|
||||||
ProjectId = batch.ProjectId,
|
ProjectId = batch.ProjectId,
|
||||||
PointBatchId = pointBatchId,
|
PointBatchId = pointBatchId,
|
||||||
|
|||||||
@@ -100,6 +100,20 @@
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按类型获取探伤类型项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="DetectionTypeType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<Model.Base_DetectionType> GetDetectionTypeListByDetectionTypeType2(string[] strs)
|
||||||
|
{
|
||||||
|
var list = (from x in Funs.DB.Base_DetectionType
|
||||||
|
where strs.Contains(x.DetectionTypeCode) && !x.DetectionTypeCode.Contains("/")
|
||||||
|
orderby x.DetectionTypeCode
|
||||||
|
select x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
#region 探伤类型下拉项
|
#region 探伤类型下拉项
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 探伤类型下拉项
|
/// 探伤类型下拉项
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ namespace BLL
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据点口批编号生成委托单号,在流水号前追加日期段。
|
/// 根据点口批编号生成委托单号,在流水号前追加日期段。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string BuildTrustBatchCode(string pointBatchCode, System.DateTime trustDate)
|
public static string BuildTrustBatchCode(string pointBatchCode, System.DateTime trustDate, string typeStr1, string typeStr2)
|
||||||
{
|
{
|
||||||
string trustBatchCode = (pointBatchCode ?? string.Empty).Replace("-DK-", "-WT-");
|
string trustBatchCode = (pointBatchCode ?? string.Empty).Replace("-DK-", "-WT-").Replace(typeStr1, typeStr2);
|
||||||
return InsertDateBeforeSerial(trustBatchCode, trustDate);
|
return InsertDateBeforeSerial(trustBatchCode, trustDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ namespace BLL
|
|||||||
newBatchDetail.IsBuildTrust = batchDetail.IsBuildTrust;
|
newBatchDetail.IsBuildTrust = batchDetail.IsBuildTrust;
|
||||||
newBatchDetail.IsWelderFirst = batchDetail.IsWelderFirst;
|
newBatchDetail.IsWelderFirst = batchDetail.IsWelderFirst;
|
||||||
newBatchDetail.IsPipelineFirst = batchDetail.IsPipelineFirst;
|
newBatchDetail.IsPipelineFirst = batchDetail.IsPipelineFirst;
|
||||||
|
newBatchDetail.NDT = batchDetail.NDT;
|
||||||
newBatchDetail.Remark = batchDetail.Remark;
|
newBatchDetail.Remark = batchDetail.Remark;
|
||||||
|
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
@@ -82,13 +82,13 @@
|
|||||||
|
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>--%>
|
</f:Panel>--%>
|
||||||
<f:Panel runat="server" ID="panelCenterRegion" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
<f:Panel runat="server" ID="panelCenterRegion" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||||
Layout="Fit" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="500px" IconFont="PlusCircle" Title="点口管理"
|
Layout="Fit" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="500px" IconFont="PlusCircle" Title="点口管理"
|
||||||
TitleToolTip="点口管理" AutoScroll="true" >
|
TitleToolTip="点口管理" AutoScroll="true">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||||
<Items>
|
<Items>
|
||||||
<f:TextBox runat="server" ID="txtpipelinecode" Label ="管线号" LabelWidth="100px" LabelAlign="Right"> </f:TextBox>
|
<f:TextBox runat="server" ID="txtpipelinecode" Label="管线号" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
||||||
OnClick="btnQuery_Click">
|
OnClick="btnQuery_Click">
|
||||||
@@ -108,8 +108,8 @@
|
|||||||
<f:Button ID="btnPointAudit" Text="生成委托单" ToolTip="监理点口审核并生成委托单" Icon="ArrowNsew" runat="server"
|
<f:Button ID="btnPointAudit" Text="生成委托单" ToolTip="监理点口审核并生成委托单" Icon="ArrowNsew" runat="server"
|
||||||
OnClick="btnPointAudit_Click" Hidden="true">
|
OnClick="btnPointAudit_Click" Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnGenerate" Text="生成" ToolTip="生成委托单" Icon="TableEdit" runat="server"
|
<f:Button ID="btnGeneratingOrder" runat="server" Text="生成委托单" Icon="FolderTable"
|
||||||
OnClick="btnGenerate_Click" Hidden="true">
|
OnClick="btnGeneratingOrder_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
|
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
|
||||||
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">
|
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
<f:Toolbar ID="TbPipeline" Position="Top" runat="server" ToolbarAlign="Left" Hidden="true">
|
<f:Toolbar ID="TbPipeline" Position="Top" runat="server" ToolbarAlign="Left" Hidden="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px" >
|
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
<f:Label ID="lbRate" Label="检测比例" runat="server" LabelAlign="Right" LabelWidth="100px">
|
<f:Label ID="lbRate" Label="检测比例" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="点口管理" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="点口管理" EnableCollapse="true"
|
||||||
runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId" AllowCellEditing="true"
|
runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId" AllowCellEditing="true"
|
||||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PointBatchItemId"
|
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PointBatchItemId"
|
||||||
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC"
|
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC" OnRowDataBound="Grid1_RowDataBound"
|
||||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="20"
|
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="20"
|
||||||
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" Height="500px">
|
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" Height="500px">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -195,6 +195,14 @@
|
|||||||
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
|
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
|
||||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:TemplateField ColumnID="NDT" Width="200px" HeaderText="探伤类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBoxList runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
|
||||||
|
ID="cblNDT">
|
||||||
|
</asp:CheckBoxList>
|
||||||
|
<asp:HiddenField ID="hdBatchDetailId" runat="server" Value='<%#Bind("PointBatchItemId") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
<f:RenderField HeaderText="返修日期" ColumnID="RepairDate" DataField="RepairDate" SortField="RepairDate"
|
<f:RenderField HeaderText="返修日期" ColumnID="RepairDate" DataField="RepairDate" SortField="RepairDate"
|
||||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px" Hidden="true">
|
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|||||||
@@ -1026,63 +1026,144 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 生成
|
#region 生成委托单
|
||||||
/// <summary>
|
|
||||||
/// 生成
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnGenerate_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PointBatchMenuId, Const.BtnGenerate))
|
|
||||||
//{
|
|
||||||
|
|
||||||
// var getViewGenerateTrustLists = (from x in Funs.DB.View_GenerateTrust where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
|
||||||
// if (getViewGenerateTrustLists.Count() > 0)
|
|
||||||
// {
|
|
||||||
// var getUnit = BLL.Base_UnitService.GetUnit(this.CurrUser.UnitId);
|
|
||||||
// if (getUnit == null || getUnit.UnitTypeId == "1" || getUnit.UnitTypeId == "2" || getUnit.UnitTypeId == "3")
|
|
||||||
// {
|
|
||||||
// GenerateTrust(getViewGenerateTrustLists);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// var getUnitViewGenerateTrustLists = getViewGenerateTrustLists.Where(x => x.UnitId == this.CurrUser.UnitId);
|
|
||||||
// if (getUnitViewGenerateTrustLists.Count() > 0)
|
|
||||||
// {
|
|
||||||
// // 当前单位未委托批
|
|
||||||
// GenerateTrust(getUnitViewGenerateTrustLists.ToList());
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Alert.ShowInTop("所属单位点口已全部生成委托单!", MessageBoxIcon.Warning);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PointBatchMenuId, Const.BtnGenerate, null);
|
|
||||||
// this.InitTreeMenu();//加载树
|
|
||||||
// this.BindGrid();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Alert.ShowInTop("已全部生成委托单!", MessageBoxIcon.Warning);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生成委托单
|
/// 生成委托单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="unitId"></param>
|
/// <param name="sender"></param>
|
||||||
//private void GenerateTrust(List<Model.View_GenerateTrust> GenerateTrustLists)
|
/// <param name="e"></param>
|
||||||
//{
|
protected void btnGeneratingOrder_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PointBatchMenuId, Const.BtnPointAudit))
|
||||||
|
{
|
||||||
|
string batchId = this.tvControlItem.SelectedNodeID;
|
||||||
|
if (!string.IsNullOrEmpty(batchId))
|
||||||
|
{
|
||||||
|
var batch = BLL.PointBatchService.GetPointBatchById(batchId);
|
||||||
|
var detail = BLL.PointBatchDetailService.GetBatchDetailByBatchId(batchId);
|
||||||
|
foreach (var d in detail)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
System.Web.UI.WebControls.CheckBoxList cblNDT = (System.Web.UI.WebControls.CheckBoxList)(this.Grid1.Rows[i].FindControl("cblNDT"));
|
||||||
|
System.Web.UI.WebControls.HiddenField hdBatchDetailId = (System.Web.UI.WebControls.HiddenField)(this.Grid1.Rows[i].FindControl("hdBatchDetailId"));
|
||||||
|
if (d.PointBatchItemId == hdBatchDetailId.Value)
|
||||||
|
{
|
||||||
|
string ndtId = string.Empty;
|
||||||
|
foreach (System.Web.UI.WebControls.ListItem item in cblNDT.Items)
|
||||||
|
{
|
||||||
|
if (item.Selected)
|
||||||
|
{
|
||||||
|
ndtId += item.Value + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(ndtId))
|
||||||
|
{
|
||||||
|
ndtId = ndtId.Substring(0, ndtId.LastIndexOf(","));
|
||||||
|
d.NDT = ndtId;
|
||||||
|
BLL.PointBatchDetailService.UpdatePointBatchDetail(d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (batch.EndDate.HasValue && detail.Where(d => d.NDT != null).Count() > 0)
|
||||||
|
{
|
||||||
|
var detectionTypes = from x in Funs.DB.Base_DetectionType select x;
|
||||||
|
var type1 = detectionTypes.FirstOrDefault(x => x.DetectionTypeId == batch.DetectionTypeId);
|
||||||
|
string typeStr1 = string.Empty;
|
||||||
|
if (type1 != null)
|
||||||
|
{
|
||||||
|
typeStr1 = type1.DetectionTypeCode;
|
||||||
|
}
|
||||||
|
var trust = from x in Funs.DB.HJGL_Batch_BatchTrust where x.PointBatchId == batchId select x;
|
||||||
|
if (trust.Count() == 0)
|
||||||
|
{
|
||||||
|
detail = detail.Where(d => d.NDT != null).ToList();
|
||||||
|
foreach (var d in detail)
|
||||||
|
{
|
||||||
|
string[] ndts = d.NDT.Split(','); // 可能有多种探伤类型
|
||||||
|
foreach (string n in ndts)
|
||||||
|
{
|
||||||
|
var trustNdt = from x in Funs.DB.HJGL_Batch_BatchTrust where x.PointBatchId == batchId && x.DetectionTypeId == n select x;
|
||||||
|
if (trustNdt.Count() == 0)
|
||||||
|
{
|
||||||
|
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust();
|
||||||
|
var project = BLL.ProjectService.GetProjectByProjectId(batch.ProjectId);
|
||||||
|
var unit = BLL.UnitService.GetUnitByUnitId(batch.UnitId);
|
||||||
|
var area = BLL.UnitWorkService.getUnitWorkByUnitWorkId(batch.UnitWorkId);
|
||||||
|
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(batch.DetectionTypeId);
|
||||||
|
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(batch.DetectionRateId);
|
||||||
|
|
||||||
//}
|
string perfix = string.Empty;
|
||||||
#endregion
|
var type2 = detectionTypes.FirstOrDefault(x => x.DetectionTypeId == n);
|
||||||
|
string typeStr2 = string.Empty;
|
||||||
|
if (type2 != null)
|
||||||
|
{
|
||||||
|
typeStr2 = type2.DetectionTypeCode;
|
||||||
|
}
|
||||||
|
newBatchTrust.TrustBatchCode = BLL.Batch_BatchTrustService.BuildTrustBatchCode(batch.PointBatchCode, DateTime.Now, typeStr1, typeStr2);
|
||||||
|
string trustBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrust));
|
||||||
|
newBatchTrust.TrustBatchId = trustBatchId;
|
||||||
|
|
||||||
|
newBatchTrust.TrustDate = DateTime.Now;
|
||||||
|
newBatchTrust.ProjectId = batch.ProjectId;
|
||||||
|
newBatchTrust.PointBatchId = batch.PointBatchId;
|
||||||
|
newBatchTrust.UnitId = batch.UnitId;
|
||||||
|
newBatchTrust.UnitWorkId = batch.UnitWorkId;
|
||||||
|
newBatchTrust.DetectionTypeId = n;
|
||||||
|
newBatchTrust.DetectionRateId = batch.DetectionRateId;
|
||||||
|
var NDEUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_5);
|
||||||
|
if (NDEUnit != null)
|
||||||
|
{
|
||||||
|
newBatchTrust.NDEUnit = NDEUnit.UnitId;
|
||||||
|
}
|
||||||
|
newBatchTrust.PointBatchId = this.PointBatchId;
|
||||||
|
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
|
||||||
|
|
||||||
|
// 增加明细
|
||||||
|
|
||||||
|
Model.HJGL_Batch_BatchTrustItem item = new Model.HJGL_Batch_BatchTrustItem();
|
||||||
|
item.TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrustItem));
|
||||||
|
item.TrustBatchId = trustBatchId;
|
||||||
|
item.PointBatchItemId = d.PointBatchItemId;
|
||||||
|
item.WeldJointId = d.WeldJointId;
|
||||||
|
item.CreateDate = DateTime.Now;
|
||||||
|
BLL.Batch_BatchTrustItemService.AddBatchTrustItem(item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
Model.HJGL_Batch_BatchTrustItem item = new Model.HJGL_Batch_BatchTrustItem();
|
||||||
|
item.TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrustItem));
|
||||||
|
item.TrustBatchId = trustNdt.First().TrustBatchId;
|
||||||
|
item.PointBatchItemId = d.PointBatchItemId;
|
||||||
|
item.WeldJointId = d.WeldJointId;
|
||||||
|
item.CreateDate = DateTime.Now;
|
||||||
|
BLL.Batch_BatchTrustItemService.AddBatchTrustItem(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, this.PointBatchId, this.PointBatchId, BLL.Const.HJGL_PointBatchMenuId, "生成委托单");
|
||||||
|
ShowNotify("成功生成委托单!", MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("已生成委托单!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("批未关闭或批里没有点口!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 切除焊口
|
#region 切除焊口
|
||||||
|
|
||||||
@@ -1195,5 +1276,45 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
|
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Grid绑定事件
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1绑定事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||||
|
{
|
||||||
|
var batch = Funs.DB.View_HJGL_Batch_PointBatch.FirstOrDefault(x => x.PointBatchId == this.tvControlItem.SelectedNodeID);
|
||||||
|
if (batch != null)
|
||||||
|
{
|
||||||
|
string[] strs = batch.DetectionTypeCode.Split('/');
|
||||||
|
System.Web.UI.WebControls.CheckBoxList cblNDT = (System.Web.UI.WebControls.CheckBoxList)(this.Grid1.Rows[e.RowIndex].FindControl("cblNDT"));
|
||||||
|
cblNDT.DataTextField = "DetectionTypeCode";
|
||||||
|
cblNDT.DataValueField = "DetectionTypeId";
|
||||||
|
cblNDT.DataSource = BLL.Base_DetectionTypeService.GetDetectionTypeListByDetectionTypeType2(strs);
|
||||||
|
cblNDT.DataBind();
|
||||||
|
|
||||||
|
var batchDetail = BLL.PointBatchDetailService.GetBatchDetailById(hdBatchDetailId.Value);
|
||||||
|
if (batchDetail != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(batchDetail.NDT))
|
||||||
|
{
|
||||||
|
List<string> ndtIds = batchDetail.NDT.Split(',').ToList();
|
||||||
|
foreach (var ndtId in ndtIds)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < cblNDT.Items.Count; i++)
|
||||||
|
{
|
||||||
|
if (cblNDT.Items[i].Value == ndtId)
|
||||||
|
{
|
||||||
|
cblNDT.Items[i].Selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-2
@@ -220,13 +220,13 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
|||||||
protected global::FineUIPro.Button btnPointAudit;
|
protected global::FineUIPro.Button btnPointAudit;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnGenerate 控件。
|
/// btnGeneratingOrder 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnGenerate;
|
protected global::FineUIPro.Button btnGeneratingOrder;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSelectExpandPoint 控件。
|
/// btnSelectExpandPoint 控件。
|
||||||
@@ -417,6 +417,24 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// cblNDT 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.CheckBoxList cblNDT;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// hdBatchDetailId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.HiddenField hdBatchDetailId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(batch.UnitWorkId);
|
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(batch.UnitWorkId);
|
||||||
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(batch.DetectionTypeId);
|
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(batch.DetectionTypeId);
|
||||||
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(batch.DetectionRateId);
|
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(batch.DetectionRateId);
|
||||||
this.txtTrustBatchCode.Text = BLL.Batch_BatchTrustService.BuildTrustBatchCode(batch.PointBatchCode, DateTime.Now);
|
this.txtTrustBatchCode.Text = BLL.Batch_BatchTrustService.BuildTrustBatchCode(batch.PointBatchCode, DateTime.Now, string.Empty, string.Empty);
|
||||||
if (unit != null)
|
if (unit != null)
|
||||||
{
|
{
|
||||||
this.txtUnit.Text = unit.UnitName;
|
this.txtUnit.Text = unit.UnitName;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@
|
|||||||
IsModal="true" Width="1010px" Height="660px">
|
IsModal="true" Width="1010px" Height="660px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
<f:MenuButton ID="btnPointAudit" EnablePostBack="true" runat="server" Text="委托" Icon="ArrowNsew" OnClick="btnPointAudit_Click">
|
<f:MenuButton ID="btnPointAudit" EnablePostBack="true" runat="server" Text="委托" Hidden="true" Icon="ArrowNsew" OnClick="btnPointAudit_Click">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
</f:Menu>
|
</f:Menu>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -226,8 +226,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
||||||
}
|
}
|
||||||
pointManages = pointManages.OrderBy(x => x.StartDate);
|
pointManages = pointManages.OrderBy(x => x.StartDate);
|
||||||
|
var trustView = from x in Funs.DB.View_Batch_BatchTrust
|
||||||
foreach (var item in pointManages)
|
join y in pointManages on x.PointBatchId equals y.PointBatchId
|
||||||
|
select x;
|
||||||
|
foreach (var item in trustView)
|
||||||
{
|
{
|
||||||
var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId);
|
var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||||
@@ -235,21 +237,21 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
|
|
||||||
TreeNode newNode = new TreeNode
|
TreeNode newNode = new TreeNode
|
||||||
{
|
{
|
||||||
NodeID = item.PointBatchId,
|
NodeID = item.TrustBatchId,
|
||||||
ToolTip = "批",
|
Text = item.TrustBatchCode + "【" + startdate + "】" + "【" + item.UnitName + "】",
|
||||||
|
ToolTip = "委托单",
|
||||||
EnableClickEvent = true,
|
EnableClickEvent = true,
|
||||||
};
|
};
|
||||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4);
|
|
||||||
// 未委托批次红色显示
|
// 未委托批次红色显示
|
||||||
if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
//if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||||
{
|
//{
|
||||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
// newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||||
newNode.ToolTip = "未委托";
|
// newNode.ToolTip = "未委托";
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
// newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||||
}
|
//}
|
||||||
e.Node.Nodes.Add(newNode);
|
e.Node.Nodes.Add(newNode);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -276,8 +278,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
this.txtTrustDate.Text = string.Empty;
|
this.txtTrustDate.Text = string.Empty;
|
||||||
this.txtDetectionTypeCode.Text = string.Empty;
|
this.txtDetectionTypeCode.Text = string.Empty;
|
||||||
this.lbNDEUnit.Text = string.Empty;
|
this.lbNDEUnit.Text = string.Empty;
|
||||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId);
|
||||||
if (trust != null)
|
if (trust != null)
|
||||||
{
|
{
|
||||||
if (batch.IsClosed == true)
|
if (batch.IsClosed == true)
|
||||||
@@ -330,7 +332,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_TrustBatchMenuId, Const.BtnGenerate))
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_TrustBatchMenuId, Const.BtnGenerate))
|
||||||
{
|
{
|
||||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointAudit.aspx", "委托 - ")));
|
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointAudit.aspx", "委托 - ")));
|
||||||
Model.HJGL_Batch_PointBatch pointBatch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
Model.HJGL_Batch_PointBatch pointBatch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID.Split(',')[0]);
|
||||||
if (pointBatch != null)
|
if (pointBatch != null)
|
||||||
{
|
{
|
||||||
if (pointBatch.IsClosed == true)
|
if (pointBatch.IsClosed == true)
|
||||||
@@ -338,13 +340,13 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
ShowNotify("该检验批无需委托!", MessageBoxIcon.Warning);
|
ShowNotify("该检验批无需委托!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID.Split(',')[0]);
|
||||||
if (trust != null)
|
if (trust != null)
|
||||||
{
|
{
|
||||||
ShowNotify("该检验批已生成委托!", MessageBoxIcon.Warning);
|
ShowNotify("该检验批已生成委托!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointTrust.aspx?PointBatchId=" + this.tvControlItem.SelectedNodeID, "委托 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointTrust.aspx?PointBatchId=" + this.tvControlItem.SelectedNodeID.Split(',')[0], "委托 - ")));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -365,17 +367,17 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
if (this.tvControlItem.SelectedNode != null)
|
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||||
if (trust == null) //为生成委托
|
if (trust == null) //未生成委托
|
||||||
{
|
{
|
||||||
string strSql = @"SELECT * FROM dbo.View_GenerateTrustItem d WHERE PointBatchId=@PointBatchId ";
|
string strSql = @"SELECT * FROM dbo.View_GenerateTrustItem d WHERE PointBatchId=@PointBatchId ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>
|
List<SqlParameter> listStr = new List<SqlParameter>
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
listStr.Add(new SqlParameter("@PointBatchId", this.tvControlItem.SelectedNodeID));
|
listStr.Add(new SqlParameter("@PointBatchId", trust.PointBatchId));
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
|
||||||
@@ -489,7 +491,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||||
BLL.Batch_BatchTrustService.UpdateBatchTrustAudit(trustBatchId, true);
|
BLL.Batch_BatchTrustService.UpdateBatchTrustAudit(trustBatchId, true);
|
||||||
PageInfo();
|
PageInfo();
|
||||||
ShowNotify("该委托单已审核!", MessageBoxIcon.Success);
|
ShowNotify("该委托单已审核!", MessageBoxIcon.Success);
|
||||||
@@ -514,7 +516,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||||
string trustBatchCode = this.tvControlItem.SelectedNode.Text;
|
string trustBatchCode = this.tvControlItem.SelectedNode.Text;
|
||||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
var trust = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
||||||
|
|
||||||
@@ -566,7 +568,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
string varValue = string.Empty;
|
string varValue = string.Empty;
|
||||||
string pointBatchId = this.tvControlItem.SelectedNodeID;
|
string pointBatchId = this.tvControlItem.SelectedNodeID.Split(',')[0];
|
||||||
|
|
||||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(pointBatchId);
|
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(pointBatchId);
|
||||||
if (trust != null)
|
if (trust != null)
|
||||||
@@ -626,8 +628,6 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||||
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
|
||||||
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
|
||||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
|
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
|
||||||
var CH_WeldMethod = (from batch in Funs.DB.View_Batch_BatchTrustItem
|
var CH_WeldMethod = (from batch in Funs.DB.View_Batch_BatchTrustItem
|
||||||
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
|
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
|
||||||
|
|||||||
+873
-70
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user