Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SHJ
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
|
||||
{
|
||||
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,
|
||||
ProjectId = batch.ProjectId,
|
||||
PointBatchId = pointBatchId,
|
||||
|
||||
@@ -100,6 +100,20 @@
|
||||
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 探伤类型下拉项
|
||||
/// <summary>
|
||||
/// 探伤类型下拉项
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace BLL
|
||||
/// <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);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace BLL
|
||||
newBatchDetail.IsBuildTrust = batchDetail.IsBuildTrust;
|
||||
newBatchDetail.IsWelderFirst = batchDetail.IsWelderFirst;
|
||||
newBatchDetail.IsPipelineFirst = batchDetail.IsPipelineFirst;
|
||||
newBatchDetail.NDT = batchDetail.NDT;
|
||||
newBatchDetail.Remark = batchDetail.Remark;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
@@ -17460,7 +17460,7 @@
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
@@ -82,13 +82,13 @@
|
||||
|
||||
</Items>
|
||||
</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="点口管理"
|
||||
TitleToolTip="点口管理" AutoScroll="true" >
|
||||
TitleToolTip="点口管理" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<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:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
||||
OnClick="btnQuery_Click">
|
||||
@@ -108,8 +108,8 @@
|
||||
<f:Button ID="btnPointAudit" Text="生成委托单" ToolTip="监理点口审核并生成委托单" Icon="ArrowNsew" runat="server"
|
||||
OnClick="btnPointAudit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnGenerate" Text="生成" ToolTip="生成委托单" Icon="TableEdit" runat="server"
|
||||
OnClick="btnGenerate_Click" Hidden="true">
|
||||
<f:Button ID="btnGeneratingOrder" runat="server" Text="生成委托单" Icon="FolderTable"
|
||||
OnClick="btnGeneratingOrder_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
|
||||
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">
|
||||
@@ -120,7 +120,7 @@
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="TbPipeline" Position="Top" runat="server" ToolbarAlign="Left" Hidden="true">
|
||||
<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 ID="lbRate" Label="检测比例" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||
</f:Label>
|
||||
@@ -166,7 +166,7 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="点口管理" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId" AllowCellEditing="true"
|
||||
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"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" Height="500px">
|
||||
<Columns>
|
||||
@@ -195,6 +195,14 @@
|
||||
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</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"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px" Hidden="true">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -1026,62 +1026,143 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
}
|
||||
#endregion
|
||||
|
||||
#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;
|
||||
//}
|
||||
}
|
||||
|
||||
#region 生成委托单
|
||||
/// <summary>
|
||||
/// 生成委托单
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
//private void GenerateTrust(List<Model.View_GenerateTrust> GenerateTrustLists)
|
||||
//{
|
||||
/// <param name="sender"></param>
|
||||
/// <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;
|
||||
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 切除焊口
|
||||
@@ -1195,5 +1276,45 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
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, "新增 - ")));
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
/// <summary>
|
||||
/// btnGenerate 控件。
|
||||
/// btnGeneratingOrder 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnGenerate;
|
||||
protected global::FineUIPro.Button btnGeneratingOrder;
|
||||
|
||||
/// <summary>
|
||||
/// btnSelectExpandPoint 控件。
|
||||
@@ -417,6 +417,24 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// </remarks>
|
||||
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>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(batch.UnitWorkId);
|
||||
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(batch.DetectionTypeId);
|
||||
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)
|
||||
{
|
||||
this.txtUnit.Text = unit.UnitName;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
IsModal="true" Width="1010px" Height="660px">
|
||||
</f:Window>
|
||||
<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:Menu>
|
||||
<f:Menu ID="MenuPrint" runat="server">
|
||||
|
||||
@@ -226,8 +226,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
||||
}
|
||||
pointManages = pointManages.OrderBy(x => x.StartDate);
|
||||
|
||||
foreach (var item in pointManages)
|
||||
var trustView = from x in Funs.DB.View_Batch_BatchTrust
|
||||
join y in pointManages on x.PointBatchId equals y.PointBatchId
|
||||
select x;
|
||||
foreach (var item in trustView)
|
||||
{
|
||||
var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||
@@ -235,21 +237,21 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
|
||||
TreeNode newNode = new TreeNode
|
||||
{
|
||||
NodeID = item.PointBatchId,
|
||||
ToolTip = "批",
|
||||
NodeID = item.TrustBatchId,
|
||||
Text = item.TrustBatchCode + "【" + startdate + "】" + "【" + item.UnitName + "】",
|
||||
ToolTip = "委托单",
|
||||
EnableClickEvent = true,
|
||||
};
|
||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4);
|
||||
// 未委托批次红色显示
|
||||
if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
newNode.ToolTip = "未委托";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||
}
|
||||
//if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
// newNode.ToolTip = "未委托";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||
//}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
@@ -276,8 +278,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
this.txtTrustDate.Text = string.Empty;
|
||||
this.txtDetectionTypeCode.Text = string.Empty;
|
||||
this.lbNDEUnit.Text = string.Empty;
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId);
|
||||
if (trust != null)
|
||||
{
|
||||
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))
|
||||
{
|
||||
//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.IsClosed == true)
|
||||
@@ -338,13 +340,13 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
ShowNotify("该检验批无需委托!", MessageBoxIcon.Warning);
|
||||
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)
|
||||
{
|
||||
ShowNotify("该检验批已生成委托!", MessageBoxIcon.Warning);
|
||||
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
|
||||
{
|
||||
@@ -365,17 +367,17 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </summary>
|
||||
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);
|
||||
if (trust == null) //为生成委托
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
if (trust == null) //未生成委托
|
||||
{
|
||||
string strSql = @"SELECT * FROM dbo.View_GenerateTrustItem d WHERE PointBatchId=@PointBatchId ";
|
||||
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();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -489,7 +491,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||
BLL.Batch_BatchTrustService.UpdateBatchTrustAudit(trustBatchId, true);
|
||||
PageInfo();
|
||||
ShowNotify("该委托单已审核!", MessageBoxIcon.Success);
|
||||
@@ -514,7 +516,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||
string trustBatchCode = this.tvControlItem.SelectedNode.Text;
|
||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
||||
|
||||
@@ -566,7 +568,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
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);
|
||||
if (trust != null)
|
||||
@@ -650,8 +652,6 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
return;
|
||||
}
|
||||
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);
|
||||
if (trust == null)
|
||||
{
|
||||
|
||||
+834
-79
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user