feat: 完善材料管理与焊接业务功能
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
材料用途和材料编码来源字段
|
||||
PipeArea: 1=工厂预制,2=现场安装
|
||||
*/
|
||||
IF COL_LENGTH(N'dbo.HJGL_PipeLineMat', N'PipeArea') IS NULL
|
||||
BEGIN
|
||||
ALTER TABLE dbo.HJGL_PipeLineMat ADD PipeArea NCHAR(1) NULL;
|
||||
END;
|
||||
GO
|
||||
|
||||
IF COL_LENGTH(N'dbo.HJGL_MaterialCodeLib', N'DesignInstitute') IS NULL
|
||||
BEGIN
|
||||
ALTER TABLE dbo.HJGL_MaterialCodeLib ADD DesignInstitute NVARCHAR(200) NULL;
|
||||
END;
|
||||
GO
|
||||
|
||||
/* 历史材料按所属管线区域回填;无法关联管线的历史数据保留为空。 */
|
||||
UPDATE mat
|
||||
SET mat.PipeArea = pipe.PipeArea
|
||||
FROM dbo.HJGL_PipeLineMat mat
|
||||
INNER JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = mat.PipelineId
|
||||
WHERE mat.PipeArea IS NULL
|
||||
AND pipe.PipeArea IN (N'1', N'2');
|
||||
GO
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接日报待审核接口服务适配层。
|
||||
/// </summary>
|
||||
public static class APIWeldReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取焊接日报待审核列表。
|
||||
/// </summary>
|
||||
public static List<Model.WeldingDailyTempDetailItem> GetPendingWeldingDailyTempDetailList(
|
||||
string projectId, string unitWorkId, string weldingDate, string pipelineCode, string welderCode)
|
||||
{
|
||||
return WeldingDailyService.GetWeldingDailyTempDetailList(projectId, unitWorkId,
|
||||
ParseWeldingDate(weldingDate), pipelineCode, welderCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看单条焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId)
|
||||
{
|
||||
return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量审核通过焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static string AuditPendingWeldingDailyTempDetails(string[] tempDetailIds, string auditMan)
|
||||
{
|
||||
// 审核规则、建日报、组批及状态回写统一由PC端已经使用的公共服务处理。
|
||||
return WeldingDailyService.AuditWeldingDailyTempDetails(tempDetailIds, auditMan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static string DeletePendingWeldingDailyTempDetails(string[] tempDetailIds)
|
||||
{
|
||||
return WeldingDailyService.DeleteWeldingDailyTempDetails(tempDetailIds);
|
||||
}
|
||||
|
||||
private static DateTime? ParseWeldingDate(string weldingDate)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(weldingDate))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
DateTime parsedDate;
|
||||
if (!DateTime.TryParse(weldingDate, out parsedDate))
|
||||
{
|
||||
throw new ArgumentException("焊接日期格式不正确");
|
||||
}
|
||||
|
||||
return parsedDate.Date;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -205,6 +205,7 @@
|
||||
<Compile Include="API\HJGL\APIPipelineComponentService.cs" />
|
||||
<Compile Include="API\HJGL\APIPreWeldInspectionService.cs" />
|
||||
<Compile Include="API\HJGL\APIPreWeldingDailyService.cs" />
|
||||
<Compile Include="API\HJGL\APIWeldReportService.cs" />
|
||||
<Compile Include="API\HJGL\APIReportQueryService.cs" />
|
||||
<Compile Include="API\HJGL\APITestPackageService.cs" />
|
||||
<Compile Include="API\HJGL\APITrainNumberManagerService.cs" />
|
||||
@@ -918,4 +919,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -259,28 +259,60 @@ namespace BLL
|
||||
/// <param name="pipelineIds"></param>
|
||||
/// <param name="warehouseCode"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Tw_PipeMatMatchOutput> GetPipeMatMatch(string projectId, List<string> pipelineIds, string warehouseCode, Dictionary<string, List<string>> priorityWeldJoints = null)
|
||||
public static List<Tw_PipeMatMatchOutput> GetPipeMatMatch(string projectId, List<string> pipelineIds, string warehouseCode, Dictionary<string, List<string>> priorityWeldJoints = null, string pipeArea = null)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var results = new List<Tw_PipeMatMatchOutput>();
|
||||
if (pipelineIds == null || !pipelineIds.Any())
|
||||
{
|
||||
return results;
|
||||
}
|
||||
pipelineIds = pipelineIds.Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList();
|
||||
if (!pipelineIds.Any())
|
||||
{
|
||||
return results;
|
||||
}
|
||||
|
||||
// 获取所需材料列表
|
||||
var pipeLineMats = (from x in db.HJGL_PipeLineMat
|
||||
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
join w in db.HJGL_WeldJoint on x.WeldJointId equals w.WeldJointId into weldJoin
|
||||
from w in weldJoin.DefaultIfEmpty()
|
||||
// 材料匹配只处理所需量大于0的非散件材料,避免零用量明细占用库存或影响焊口生成任务单判断。
|
||||
where z.ProjectId == projectId && pipelineIds.Contains(z.PipelineId) && x.PrefabricatedComponents != "" && (x.Number ?? 0) > 0
|
||||
select new
|
||||
{
|
||||
PipeLineMat = x,
|
||||
PipelineCode = z.PipelineCode,
|
||||
UnitWorkId = z.UnitWorkId,
|
||||
UnitWorkName = m.UnitWorkName,
|
||||
WeldJointCode = w == null ? null : w.WeldJointCode
|
||||
}).ToList();
|
||||
// 先保留当前区域内已焊和未焊数据,用于识别“已经开工但尚未完成”的续作组件。
|
||||
var pipeLineMatQuery = from x in db.HJGL_PipeLineMat
|
||||
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
join w in db.HJGL_WeldJoint on x.WeldJointId equals w.WeldJointId into weldJoin
|
||||
from w in weldJoin.DefaultIfEmpty()
|
||||
// 先保留组件全部材料行,避免数量为0的历史已焊口导致续作组件识别遗漏。
|
||||
where z.ProjectId == projectId && pipelineIds.Contains(z.PipelineId)
|
||||
&& x.PrefabricatedComponents != null && x.PrefabricatedComponents != ""
|
||||
select new
|
||||
{
|
||||
PipeLineMat = x,
|
||||
PipelineCode = z.PipelineCode,
|
||||
UnitWorkId = z.UnitWorkId,
|
||||
UnitWorkName = m.UnitWorkName,
|
||||
WeldJoint = w
|
||||
};
|
||||
|
||||
string jointAttribute = GetJointAttributeByPipeArea(pipeArea);
|
||||
bool filterByPipeArea = !string.IsNullOrEmpty(jointAttribute);
|
||||
if (filterByPipeArea)
|
||||
{
|
||||
// 页面用途以材料表 PipeArea 为准,工厂/现场只能匹配相应类型的焊口。
|
||||
pipeLineMatQuery = pipeLineMatQuery.Where(x => x.PipeLineMat.PipeArea == pipeArea
|
||||
&& x.WeldJoint != null
|
||||
&& x.WeldJoint.JointAttribute == jointAttribute);
|
||||
}
|
||||
|
||||
var allPipeLineMats = pipeLineMatQuery.ToList();
|
||||
var continuationComponentKeys = new HashSet<string>(allPipeLineMats
|
||||
.Where(x => x.WeldJoint != null && !string.IsNullOrEmpty(x.WeldJoint.WeldingDailyId))
|
||||
.Select(x => GetComponentKey(x.PipeLineMat.PipelineId, x.PipeLineMat.PrefabricatedComponents)));
|
||||
|
||||
// 页面匹配只展示并消耗尚未焊接的焊口材料;不传区域的旧调用保留原查询行为。
|
||||
var pipeLineMats = filterByPipeArea
|
||||
? allPipeLineMats.Where(x => x.WeldJoint != null
|
||||
&& x.WeldJoint.WeldingDailyId==null
|
||||
&& (x.PipeLineMat.Number ?? 0) > 0).ToList()
|
||||
: allPipeLineMats.Where(x => (x.PipeLineMat.Number ?? 0) > 0).ToList();
|
||||
|
||||
var materialCodes = pipeLineMats
|
||||
.Where(x => !string.IsNullOrEmpty(x.PipeLineMat.MaterialCode))
|
||||
@@ -311,17 +343,16 @@ namespace BLL
|
||||
{
|
||||
lib = libByMaterialCode[x.PipeLineMat.MaterialCode];
|
||||
}
|
||||
// 未反写时只能按导入材料编码 Code 找候选材料库,用于展示材料名称、规格等基础信息。
|
||||
// 未反写时只能按导入材料编码 Code 找候选材料库。
|
||||
else if (!string.IsNullOrEmpty(x.PipeLineMat.MaterialCode2) && libByCode.ContainsKey(x.PipeLineMat.MaterialCode2))
|
||||
{
|
||||
lib = libByCode[x.PipeLineMat.MaterialCode2];
|
||||
}
|
||||
|
||||
// MaterialCode 对外展示导入材料编码,避免把临时匹配出的材料主编码误当成已确认结果。
|
||||
string code = !string.IsNullOrEmpty(x.PipeLineMat.MaterialCode2) ? x.PipeLineMat.MaterialCode2 : lib?.Code;
|
||||
return new Tw_PipeMatMatchOutput
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
PipeLineMatId = x.PipeLineMat.PipeLineMatId,
|
||||
PipelineId = x.PipeLineMat.PipelineId,
|
||||
PipelineCode = x.PipelineCode,
|
||||
@@ -329,7 +360,7 @@ namespace BLL
|
||||
UnitWorkName = x.UnitWorkName,
|
||||
PrefabricatedComponents = x.PipeLineMat.PrefabricatedComponents,
|
||||
WeldJointId = x.PipeLineMat.WeldJointId,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
WeldJointCode = x.WeldJoint == null ? null : x.WeldJoint.WeldJointCode,
|
||||
MaterialCode = code,
|
||||
MatchMaterialCode = x.PipeLineMat.MaterialCode,
|
||||
Code = code,
|
||||
@@ -342,29 +373,179 @@ namespace BLL
|
||||
NeedNum = x.PipeLineMat.Number,
|
||||
};
|
||||
}).ToList();
|
||||
var newRequiredMaterials = new List<Tw_PipeMatMatchOutput>();
|
||||
|
||||
var orderedPipelineMaterials = new Dictionary<string, List<Tw_PipeMatMatchOutput>>();
|
||||
foreach (string id in pipelineIds)
|
||||
{
|
||||
orderedPipelineMaterials[id] = requiredMaterials
|
||||
.Where(x => x.PipelineId == id)
|
||||
.OrderBy(x => x.PrefabricatedComponents)
|
||||
.ThenBy(x => x.WeldJointCode)
|
||||
.ThenBy(x => x.MaterialCode)
|
||||
.ThenBy(x => x.PipeLineMatId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
var newRequiredMaterials = new List<Tw_PipeMatMatchOutput>();
|
||||
var addedMaterialIds = new HashSet<string>();
|
||||
|
||||
// 先处理全部管线的手动优先焊口,保证人工选择始终高于任何自动优先规则。
|
||||
foreach (string id in pipelineIds)
|
||||
{
|
||||
var pipelineMaterials = requiredMaterials.Where(x => x.PipelineId == id).ToList();
|
||||
if (priorityWeldJoints != null && priorityWeldJoints.ContainsKey(id) && priorityWeldJoints[id] != null && priorityWeldJoints[id].Any())
|
||||
{
|
||||
// 手动优先焊口只改变本次匹配消耗顺序,不写入长期规则。
|
||||
var weldJointIds = priorityWeldJoints[id];
|
||||
newRequiredMaterials.AddRange(pipelineMaterials
|
||||
var manualPriorityMaterials = orderedPipelineMaterials[id]
|
||||
.Where(x => weldJointIds.Contains(x.WeldJointId))
|
||||
.OrderBy(x => weldJointIds.IndexOf(x.WeldJointId)));
|
||||
newRequiredMaterials.AddRange(pipelineMaterials
|
||||
.Where(x => !weldJointIds.Contains(x.WeldJointId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
newRequiredMaterials.AddRange(pipelineMaterials);
|
||||
.OrderBy(x => weldJointIds.IndexOf(x.WeldJointId))
|
||||
.ThenBy(x => x.PrefabricatedComponents)
|
||||
.ThenBy(x => x.WeldJointCode)
|
||||
.ThenBy(x => x.MaterialCode)
|
||||
.ToList();
|
||||
newRequiredMaterials.AddRange(manualPriorityMaterials);
|
||||
foreach (var item in manualPriorityMaterials)
|
||||
{
|
||||
addedMaterialIds.Add(item.PipeLineMatId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 再处理全部续作组件,避免前一条管线的未开工组件抢占后一条管线续作组件的库存。
|
||||
foreach (string id in pipelineIds)
|
||||
{
|
||||
var continuationMaterials = orderedPipelineMaterials[id]
|
||||
.Where(x => !addedMaterialIds.Contains(x.PipeLineMatId)
|
||||
&& continuationComponentKeys.Contains(GetComponentKey(x.PipelineId, x.PrefabricatedComponents)))
|
||||
.ToList();
|
||||
newRequiredMaterials.AddRange(continuationMaterials);
|
||||
foreach (var item in continuationMaterials)
|
||||
{
|
||||
addedMaterialIds.Add(item.PipeLineMatId);
|
||||
}
|
||||
}
|
||||
|
||||
// 最后处理所有尚未开工组件,保持管线及组件内的稳定排序。
|
||||
foreach (string id in pipelineIds)
|
||||
{
|
||||
newRequiredMaterials.AddRange(orderedPipelineMaterials[id].Where(x => !addedMaterialIds.Contains(x.PipeLineMatId)));
|
||||
}
|
||||
|
||||
results = GetMatMatchOutput(newRequiredMaterials, warehouseCode, projectId, true);
|
||||
// 组件匹配率以当前区域剩余未焊口的材料需求为口径,并回填到每条明细供表格合并展示。
|
||||
foreach (var componentGroup in results.GroupBy(x => new { x.PipelineId, x.PrefabricatedComponents }))
|
||||
{
|
||||
decimal needNum = componentGroup.Sum(x => x.NeedNum) ?? 0;
|
||||
decimal matchNum = componentGroup.Sum(x => x.MatchNum) ?? 0;
|
||||
decimal componentMatchRate = needNum > 0 ? matchNum / needNum : 0;
|
||||
string componentMatchRateString = Math.Round(componentMatchRate * 100, 2).ToString() + "%";
|
||||
foreach (var item in componentGroup)
|
||||
{
|
||||
item.ComponentMatchRate = componentMatchRate;
|
||||
item.ComponentMatchRateString = componentMatchRateString;
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位工程下当前区域内同时存在已焊口和未焊口的组件汇总。
|
||||
/// </summary>
|
||||
public static List<Tw_PartialWeldedComponentOutput> GetPartialWeldedComponents(string projectId, string unitWorkId, string pipeArea, string warehouseCode)
|
||||
{
|
||||
string jointAttribute = GetJointAttributeByPipeArea(pipeArea);
|
||||
if (string.IsNullOrEmpty(projectId) || string.IsNullOrEmpty(unitWorkId) || string.IsNullOrEmpty(jointAttribute))
|
||||
{
|
||||
return new List<Tw_PartialWeldedComponentOutput>();
|
||||
}
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var componentWeldRows = (from x in db.HJGL_PipeLineMat
|
||||
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
join w in db.HJGL_WeldJoint on x.WeldJointId equals w.WeldJointId
|
||||
where z.ProjectId == projectId && z.UnitWorkId == unitWorkId
|
||||
&& x.PipeArea == pipeArea
|
||||
&& x.PrefabricatedComponents != null && x.PrefabricatedComponents != ""
|
||||
&& w.JointAttribute == jointAttribute
|
||||
select new
|
||||
{
|
||||
z.PipelineId,
|
||||
z.PipelineCode,
|
||||
z.UnitWorkId,
|
||||
m.UnitWorkName,
|
||||
x.PrefabricatedComponents,
|
||||
w.WeldJointId,
|
||||
w.WeldingDailyId
|
||||
}).ToList();
|
||||
|
||||
var partialComponents = componentWeldRows
|
||||
.GroupBy(x => new { x.PipelineId, x.PipelineCode, x.UnitWorkId, x.UnitWorkName, x.PrefabricatedComponents })
|
||||
.Select(group =>
|
||||
{
|
||||
var weldJoints = group.GroupBy(x => x.WeldJointId).Select(x => x.First()).ToList();
|
||||
int weldedCount = weldJoints.Count(x => !string.IsNullOrEmpty(x.WeldingDailyId));
|
||||
int totalCount = weldJoints.Count;
|
||||
return new Tw_PartialWeldedComponentOutput
|
||||
{
|
||||
UnitWorkId = group.Key.UnitWorkId,
|
||||
UnitWorkName = group.Key.UnitWorkName,
|
||||
PipelineId = group.Key.PipelineId,
|
||||
PipelineCode = group.Key.PipelineCode,
|
||||
PrefabricatedComponents = group.Key.PrefabricatedComponents,
|
||||
PipeArea = pipeArea,
|
||||
PipeAreaText = pipeArea == PipelineService.PipeArea_SHOP ? "工厂预制" : "现场安装",
|
||||
TotalWeldJointCount = totalCount,
|
||||
WeldedWeldJointCount = weldedCount,
|
||||
UnweldedWeldJointCount = totalCount - weldedCount
|
||||
};
|
||||
})
|
||||
.Where(x => x.WeldedWeldJointCount > 0 && x.UnweldedWeldJointCount > 0)
|
||||
.OrderBy(x => x.PipelineCode)
|
||||
.ThenBy(x => x.PrefabricatedComponents)
|
||||
.ToList();
|
||||
|
||||
if (!partialComponents.Any())
|
||||
{
|
||||
return partialComponents;
|
||||
}
|
||||
|
||||
// 导出匹配率复用页面匹配规则,保证区域、未焊口及续作组件优先级完全一致。
|
||||
var pipelineIds = partialComponents.Select(x => x.PipelineId).Distinct().ToList();
|
||||
var matchOutputs = GetPipeMatMatch(projectId, pipelineIds, warehouseCode, null, pipeArea);
|
||||
var componentRates = matchOutputs
|
||||
.GroupBy(x => GetComponentKey(x.PipelineId, x.PrefabricatedComponents))
|
||||
.ToDictionary(x => x.Key, x => x.First().ComponentMatchRate ?? 0);
|
||||
foreach (var component in partialComponents)
|
||||
{
|
||||
decimal componentRate;
|
||||
componentRates.TryGetValue(GetComponentKey(component.PipelineId, component.PrefabricatedComponents), out componentRate);
|
||||
component.ComponentMatchRate = componentRate;
|
||||
component.ComponentMatchRateString = Math.Round(componentRate * 100, 2).ToString() + "%";
|
||||
}
|
||||
|
||||
return partialComponents;
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetJointAttributeByPipeArea(string pipeArea)
|
||||
{
|
||||
if (pipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
return "预制口";
|
||||
}
|
||||
if (pipeArea == PipelineService.PipeArea_FIELD)
|
||||
{
|
||||
return "安装口";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string GetComponentKey(string pipelineId, string componentCode)
|
||||
{
|
||||
return (pipelineId ?? string.Empty) + "\u001f" + (componentCode ?? string.Empty);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据管线材料匹配结果,获取管线匹配率
|
||||
/// </summary>
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
PipeGrade = codeLib.PipeGrade,
|
||||
MaterialUnit = codeLib.MaterialUnit,
|
||||
ProjectId = codeLib.ProjectId,
|
||||
Code = codeLib.Code
|
||||
Code = codeLib.Code,
|
||||
DesignInstitute = codeLib.DesignInstitute
|
||||
};
|
||||
db.HJGL_MaterialCodeLib.InsertOnSubmit(newCodeLib);
|
||||
db.SubmitChanges();
|
||||
@@ -89,6 +90,7 @@
|
||||
newCodeLib.PipeGrade = codeLib.PipeGrade;
|
||||
newCodeLib.MaterialUnit = codeLib.MaterialUnit;
|
||||
newCodeLib.Code = codeLib.Code;
|
||||
newCodeLib.DesignInstitute = codeLib.DesignInstitute;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -231,6 +233,12 @@
|
||||
///</summary>
|
||||
[ExcelColumnName("类型")]
|
||||
public string MaterialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 材料编码来源设计院。
|
||||
/// </summary>
|
||||
[ExcelColumnName("所属设计院")]
|
||||
public string DesignInstitute { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace BLL
|
||||
PipelineId = pipelineMat.PipelineId,
|
||||
Number = pipelineMat.Number,
|
||||
PrefabricatedComponents = pipelineMat.PrefabricatedComponents,
|
||||
PipeArea = pipelineMat.PipeArea,
|
||||
};
|
||||
db.HJGL_PipeLineMat.InsertOnSubmit(newPipelineMat);
|
||||
db.SubmitChanges();
|
||||
@@ -57,6 +58,7 @@ namespace BLL
|
||||
newPipelineMat.PipelineId = pipelineMat.PipelineId;
|
||||
newPipelineMat.Number = pipelineMat.Number;
|
||||
newPipelineMat.PrefabricatedComponents = pipelineMat.PrefabricatedComponents;
|
||||
newPipelineMat.PipeArea = pipelineMat.PipeArea;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -80,6 +82,20 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新材料用途,1 为工厂预制,2 为现场安装。
|
||||
/// </summary>
|
||||
public static void UpdatePipeArea(string pipelineMatId, string pipeArea)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_PipeLineMat pipeLineMat = db.HJGL_PipeLineMat.FirstOrDefault(e => e.PipeLineMatId == pipelineMatId);
|
||||
if (pipeLineMat != null)
|
||||
{
|
||||
pipeLineMat.PipeArea = pipeArea;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据材料匹配结果反写材料主编码
|
||||
/// </summary>
|
||||
|
||||
@@ -295,6 +295,179 @@ namespace BLL
|
||||
}
|
||||
|
||||
#region 焊接日报待审核
|
||||
/// <summary>
|
||||
/// 获取焊接日报待审核明细列表。
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitWorkId">单位工程ID,为空时不按单位工程过滤</param>
|
||||
/// <param name="weldingDate">焊接日期,为空时不按日期过滤</param>
|
||||
/// <param name="pipelineCode">管线编号关键字</param>
|
||||
/// <param name="welderCode">焊工编号关键字</param>
|
||||
/// <returns>待审核明细列表</returns>
|
||||
public static List<Model.WeldingDailyTempDetailItem> GetWeldingDailyTempDetailList(string projectId,
|
||||
string unitWorkId, DateTime? weldingDate, string pipelineCode, string welderCode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
return new List<Model.WeldingDailyTempDetailItem>();
|
||||
}
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var query = QueryPendingWeldingDailyTempDetails(db);
|
||||
query = query.Where(x => x.ProjectId == projectId);
|
||||
if (!string.IsNullOrEmpty(unitWorkId))
|
||||
{
|
||||
query = query.Where(x => x.UnitWorkId == unitWorkId);
|
||||
}
|
||||
if (weldingDate.HasValue)
|
||||
{
|
||||
DateTime startDate = weldingDate.Value.Date;
|
||||
DateTime endDate = startDate.AddDays(1);
|
||||
query = query.Where(x => x.WeldingDate >= startDate && x.WeldingDate < endDate);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipelineCode))
|
||||
{
|
||||
query = query.Where(x => x.PipelineCode != null && x.PipelineCode.Contains(pipelineCode));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(welderCode))
|
||||
{
|
||||
query = query.Where(x => (x.CoverWelderCode != null && x.CoverWelderCode.Contains(welderCode))
|
||||
|| (x.BackingWelderCode != null && x.BackingWelderCode.Contains(welderCode)));
|
||||
}
|
||||
|
||||
var data = query.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointCode).ToList();
|
||||
SetWeldingDailyTempDetailAttachUrls(db, data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单条焊接日报待审核明细。
|
||||
/// </summary>
|
||||
/// <param name="tempDetailId">待审核明细ID</param>
|
||||
/// <returns>待审核明细,不存在时返回空</returns>
|
||||
public static Model.WeldingDailyTempDetailItem GetWeldingDailyTempDetailById(string tempDetailId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(tempDetailId))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var data = QueryPendingWeldingDailyTempDetails(db)
|
||||
.Where(x => x.TempDetailId == tempDetailId)
|
||||
.Take(1)
|
||||
.ToList();
|
||||
SetWeldingDailyTempDetailAttachUrls(db, data);
|
||||
return data.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。
|
||||
/// </summary>
|
||||
private static System.Linq.IQueryable<Model.WeldingDailyTempDetailItem> QueryPendingWeldingDailyTempDetails(Model.SGGLDB db)
|
||||
{
|
||||
// 待审核模块只展示 AuditState=0;审核、删除仍复用本类下方已有批量业务方法。
|
||||
return from temp in db.HJGL_WeldingDailyTempDetail
|
||||
join jotItem in db.View_HJGL_WeldJoint on temp.WeldJointId equals jotItem.WeldJointId into jotItems
|
||||
from jot in jotItems.DefaultIfEmpty()
|
||||
join coverItem in db.SitePerson_Person on temp.CoverWelderId equals coverItem.PersonId into coverItems
|
||||
from coverWelder in coverItems.DefaultIfEmpty()
|
||||
join backingItem in db.SitePerson_Person on temp.BackingWelderId equals backingItem.PersonId into backingItems
|
||||
from backingWelder in backingItems.DefaultIfEmpty()
|
||||
join locationItem in db.Base_WeldingLocation on temp.WeldingLocationId equals locationItem.WeldingLocationId into locationItems
|
||||
from location in locationItems.DefaultIfEmpty()
|
||||
join submitItem in db.Person_Persons on temp.SubmitPersonId equals submitItem.PersonId into submitItems
|
||||
from submitPerson in submitItems.DefaultIfEmpty()
|
||||
where temp.AuditState == 0
|
||||
select new Model.WeldingDailyTempDetailItem
|
||||
{
|
||||
TempDetailId = temp.TempDetailId,
|
||||
ProjectId = temp.ProjectId,
|
||||
UnitId = temp.UnitId,
|
||||
UnitWorkId = temp.UnitWorkId,
|
||||
WeldJointId = temp.WeldJointId,
|
||||
PipelineId = jot == null ? null : jot.PipelineId,
|
||||
PipelineCode = jot == null ? null : jot.PipelineCode,
|
||||
WeldJointCode = jot == null ? null : jot.WeldJointCode,
|
||||
WeldingDate = temp.WeldingDate,
|
||||
CoverWelderId = temp.CoverWelderId,
|
||||
CoverWelderCode = coverWelder == null ? null : coverWelder.WelderCode,
|
||||
BackingWelderId = temp.BackingWelderId,
|
||||
BackingWelderCode = backingWelder == null ? null : backingWelder.WelderCode,
|
||||
JointAttribute = temp.JointAttribute,
|
||||
WeldingLocationId = temp.WeldingLocationId,
|
||||
WeldingLocationCode = location == null ? null : location.WeldingLocationCode,
|
||||
WeldingMode = temp.WeldingMode,
|
||||
Material1Code = jot == null ? null : jot.Material1Code,
|
||||
Material2Code = jot == null ? null : jot.Material2Code,
|
||||
DNDia = jot == null ? null : jot.DNDia,
|
||||
Size = jot == null ? (decimal?)null : jot.Size,
|
||||
Dia = jot == null ? (decimal?)null : jot.Dia,
|
||||
Thickness = jot == null ? (decimal?)null : jot.Thickness,
|
||||
WeldTypeCode = jot == null ? null : jot.WeldTypeCode,
|
||||
WeldingMethodCode = jot == null ? null : jot.WeldingMethodCode,
|
||||
WeldingWireCode = jot == null ? null : jot.WeldingWireCode,
|
||||
WeldingRodCode = jot == null ? null : jot.WeldingRodCode,
|
||||
SubmitPersonId = temp.SubmitPersonId,
|
||||
SubmitPersonName = submitPerson == null ? null : submitPerson.PersonName,
|
||||
SubmitDate = temp.SubmitDate,
|
||||
AttachUrl = temp.AttachUrl,
|
||||
AuditState = temp.AuditState,
|
||||
AuditMan = temp.AuditMan,
|
||||
AuditDate = temp.AuditDate,
|
||||
AuditRemark = temp.AuditRemark
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按待审核明细ID批量回写焊前、焊后附件地址。
|
||||
/// </summary>
|
||||
private static void SetWeldingDailyTempDetailAttachUrls(Model.SGGLDB db,
|
||||
List<Model.WeldingDailyTempDetailItem> data)
|
||||
{
|
||||
if (data == null || data.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var toKeyIds = data.SelectMany(x => new[]
|
||||
{
|
||||
x.TempDetailId + "#Before",
|
||||
x.TempDetailId + "#After"
|
||||
}).ToList();
|
||||
var attachUrlMap = db.AttachFile
|
||||
.Where(x => x.MenuId == Const.HJGL_WeldReportMenuId && toKeyIds.Contains(x.ToKeyId))
|
||||
.Select(x => new { x.ToKeyId, x.AttachUrl })
|
||||
.ToList()
|
||||
.GroupBy(x => x.ToKeyId)
|
||||
.ToDictionary(x => x.Key, x => x.Select(y => y.AttachUrl).FirstOrDefault());
|
||||
|
||||
foreach (var item in data)
|
||||
{
|
||||
string beforeUrl;
|
||||
if (attachUrlMap.TryGetValue(item.TempDetailId + "#Before", out beforeUrl))
|
||||
{
|
||||
// API统一返回斜杠路径,PC端继续兼容原有反斜杠路径显示逻辑。
|
||||
item.BeforePhotoUrl = NormalizeAttachUrl(beforeUrl);
|
||||
}
|
||||
|
||||
string afterUrl;
|
||||
if (attachUrlMap.TryGetValue(item.TempDetailId + "#After", out afterUrl))
|
||||
{
|
||||
item.AfterPhotoUrl = NormalizeAttachUrl(afterUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static string NormalizeAttachUrl(string attachUrl)
|
||||
{
|
||||
return string.IsNullOrEmpty(attachUrl) ? attachUrl : attachUrl.Replace('\\', '/');
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移动端按焊口保存焊接日报待审核明细
|
||||
/// </summary>
|
||||
@@ -610,9 +783,9 @@ namespace BLL
|
||||
return weldingDaily;
|
||||
}
|
||||
|
||||
var submitPerson = Funs.DB.Person_Persons.FirstOrDefault(x => x.PersonId == tempDetail.SubmitPersonId);
|
||||
string personName = submitPerson != null ? submitPerson.PersonName : string.Empty;
|
||||
string perfix = string.Format("{0:yyyyMMdd}", tempDetail.WeldingDate) + "-" + personName + "-";
|
||||
var submitUnitwork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == tempDetail.UnitWorkId);
|
||||
string unitWorkName = submitUnitwork != null ? submitUnitwork.UnitWorkName : string.Empty;
|
||||
string perfix = string.Format("{0:yyyyMMdd}", tempDetail.WeldingDate) + "-" + unitWorkName + "-";
|
||||
weldingDaily = new Model.HJGL_WeldingDaily
|
||||
{
|
||||
WeldingDailyId = Guid.NewGuid().ToString(),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,344 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="06/15/2026 15:31:26" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using FastReport;
|
||||
using FastReport.Data;
|
||||
using FastReport.Dialog;
|
||||
using FastReport.Barcode;
|
||||
using FastReport.Table;
|
||||
using FastReport.Utils;
|
||||
|
||||
namespace FastReport
|
||||
{
|
||||
public class ReportScript
|
||||
{
|
||||
|
||||
|
||||
private void Table4_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||
// init the data source
|
||||
rowData.Init();
|
||||
|
||||
// print the first table row - it is a header
|
||||
Table4.PrintRow(0);
|
||||
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
|
||||
// to print cells on the row
|
||||
Table4.PrintColumns();
|
||||
|
||||
// now enumerate the data source and print the table body
|
||||
|
||||
// print the table body
|
||||
Table4.PrintRow(1);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(2);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(3);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(4);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(5);
|
||||
Table4.PrintColumns();
|
||||
|
||||
// go next data source row
|
||||
rowData.Next();
|
||||
|
||||
}
|
||||
|
||||
private void Table5_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
Table5.PrintRow(0);
|
||||
Table5.PrintColumns();
|
||||
Table5.PrintRow(1);
|
||||
Table5.PrintColumns();
|
||||
}
|
||||
|
||||
|
||||
private int x;
|
||||
private void Tabel_Data_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
DataSourceBase rowData = Report.GetDataSource("Data");
|
||||
// init the data source
|
||||
rowData.Init();
|
||||
|
||||
// print the first table row - it is a header
|
||||
Tabel_Data.PrintRow(0);
|
||||
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
|
||||
// to print cells on the row
|
||||
Tabel_Data.PrintColumns();
|
||||
x=0;
|
||||
// now enumerate the data source and print the table body
|
||||
while (rowData.HasMoreRows)
|
||||
{
|
||||
x++;
|
||||
// print the table body
|
||||
Tabel_Data.PrintRow(1);
|
||||
Tabel_Data.PrintColumns();
|
||||
|
||||
// go next data source row
|
||||
rowData.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaXj7MTwVWd+W15ZHXWbvUTygn/8kT7Dd8PAtwcQdvSWlUEyCU1xPvJPbQKwTsqQwLM+O2fcBJVGvSTxsXNEsa1vy5JNdjQE5XXU2qh41PMt4c4Lp/j2o5C6htb8mS4/JfQOgej7CCf0JujCt3dJ+YxXL+XFzk+95kEmkY8jGbKIY">
|
||||
<TableDataSource Name="Table1" Alias="Head" DataType="System.Int32" Enabled="true" SelectCommand="select * from CH_Trust where CH_TrustID=@CH_TrustID">
|
||||
<Column Name="CH_TrustID" DataType="System.String"/>
|
||||
<Column Name="CH_TrustCode" DataType="System.String"/>
|
||||
<Column Name="CH_TrustUnit" DataType="System.String"/>
|
||||
<Column Name="CH_TrustDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_TrustType" DataType="System.String"/>
|
||||
<Column Name="CH_TrustMan" DataType="System.String"/>
|
||||
<Column Name="CH_Tabler" DataType="System.String"/>
|
||||
<Column Name="CH_TableDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_AuditMan" DataType="System.String"/>
|
||||
<Column Name="CH_AuditDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_Printer" DataType="System.String"/>
|
||||
<Column Name="CH_PrintDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_UnitName" DataType="System.String"/>
|
||||
<Column Name="CH_WorkNo" DataType="System.String"/>
|
||||
<Column Name="CH_ItemName" DataType="System.String"/>
|
||||
<Column Name="CH_SlopeType" DataType="System.String"/>
|
||||
<Column Name="CH_ServiceTemp" DataType="System.String"/>
|
||||
<Column Name="CH_Press" DataType="System.String"/>
|
||||
<Column Name="CH_WeldMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTRate" DataType="System.String"/>
|
||||
<Column Name="CH_NDTMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTCriteria" DataType="System.String"/>
|
||||
<Column Name="CH_AcceptGrade" DataType="System.String"/>
|
||||
<Column Name="CH_Remark" DataType="System.String"/>
|
||||
<Column Name="CH_CheckUnit" DataType="System.String"/>
|
||||
<Column Name="ProjectId" DataType="System.String"/>
|
||||
<Column Name="InstallationId" DataType="System.String"/>
|
||||
<Column Name="CH_RequestDate" DataType="System.DateTime"/>
|
||||
<Column Name="ToIso_Id" DataType="System.String"/>
|
||||
<CommandParameter Name="CH_TrustID" DataType="22" Expression="[CH_TrustID]"/>
|
||||
</TableDataSource>
|
||||
<TableDataSource Name="Table3" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand=" SELECT batch.PipelineCode ,batch.WeldJointCode,batch.WelderCode,joint.Specification , joint.MaterialCode,joint.Remark FROM dbo.View_Batch_BatchTrustItem as batch left join View_HJGL_WeldJoint joint on batch .WeldJointId=joint.WeldJointId where batch.TrustBatchId=@TrustBatchId">
|
||||
<Column Name="Remark" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="PipelineCode" DataType="System.String"/>
|
||||
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||
<Column Name="WelderCode" DataType="System.String"/>
|
||||
<Column Name="Specification" DataType="System.String"/>
|
||||
<Column Name="MaterialCode" DataType="System.String"/>
|
||||
<CommandParameter Name="TrustBatchId" DataType="12" Expression="[TrustBatchId]"/>
|
||||
</TableDataSource>
|
||||
</MsSqlDataConnection>
|
||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="CH_TrustCode" DataType="System.String"/>
|
||||
<Column Name="CH_TrustUnit" DataType="System.String"/>
|
||||
<Column Name="CH_TrustMan" DataType="System.String"/>
|
||||
<Column Name="CH_SlopeType" DataType="System.String"/>
|
||||
<Column Name="CH_WeldMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTRate" DataType="System.String"/>
|
||||
<Column Name="CH_NDTMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTCriteria" DataType="System.String"/>
|
||||
<Column Name="CH_AcceptGrade" DataType="System.String"/>
|
||||
<Column Name="CH_CheckUnit" DataType="System.String"/>
|
||||
<Column Name="ProjectName" DataType="System.String" PropName="ProjectId"/>
|
||||
<Column Name="WorkAreaName" DataType="System.String" PropName="Column"/>
|
||||
<Column Name="WorkAreaCode" DataType="System.String" PropName="Column"/>
|
||||
<Column Name="Column" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column1" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column2" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column3" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
</TableDataSource>
|
||||
<TableDataSource Name="Data" Alias="Dataaaa" ReferenceName="Data.Data" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="CH_TrustID" DataType="System.String"/>
|
||||
<Column Name="ISO_IsoNo" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="ISO_IsoNumber" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="JOT_JointNo" DataType="System.Int32" PropName="Column1" Calculated="true" Expression=""/>
|
||||
<Column Name="WED_Code2" DataType="System.Int32" PropName="Column2" Calculated="true" Expression=""/>
|
||||
<Column Name="JOT_JointDesc" DataType="System.Int32" PropName="Column3" Calculated="true" Expression=""/>
|
||||
<Column Name="STE_Name1" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="Remark" DataType="System.Int32" PropName="Column1" Calculated="true" Expression=""/>
|
||||
</TableDataSource>
|
||||
<Parameter Name="CH_TrustID" DataType="System.String"/>
|
||||
<Parameter Name="supUnit" DataType="System.String"/>
|
||||
<Parameter Name="totalUnit" DataType="System.String"/>
|
||||
<Parameter Name="ConUnit" DataType="System.String"/>
|
||||
<Parameter Name="CheckUnit" DataType="System.String"/>
|
||||
<Parameter Name="TrustBatchId" DataType="System.String"/>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1" RawPaperSize="9" Guides="75.6">
|
||||
<PageHeaderBand Name="PageHeader1" Width="718.2" Height="283.5">
|
||||
<TableObject Name="Table4" Left="18.9" Top="37.8" Width="699.25" Height="246.02" ManualBuildEvent="Table4_ManualBuild">
|
||||
<TableColumn Name="Column13" Width="94.73"/>
|
||||
<TableColumn Name="Column14" Width="94.73"/>
|
||||
<TableColumn Name="Column15" Width="75.83"/>
|
||||
<TableColumn Name="Column16" Width="94.73"/>
|
||||
<TableColumn Name="Column17" Width="94.73"/>
|
||||
<TableColumn Name="Column18" Width="72.05"/>
|
||||
<TableColumn Name="Column19" Width="72.05"/>
|
||||
<TableColumn Name="Column20" Width="100.4"/>
|
||||
<TableRow Name="Row14" Height="64.64">
|
||||
<TableCell Name="Cell81" Border.Lines="All" Text="SH/T 3543-G414" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell82" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell83" Border.Lines="All" Text="无损检测委托单(附页)" HorzAlign="Center" VertAlign="Center" Font="宋体, 16pt, style=Bold" ColSpan="4" RowSpan="2"/>
|
||||
<TableCell Name="Cell84" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell85" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell86" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell87" Border.Lines="All" Text="工程名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell88" Border.Lines="All" Text="[Table1.ProjectName]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row13" Height="43.78">
|
||||
<TableCell Name="Cell73" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell74" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell75" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell76" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell77" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell78" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell79" Border.Lines="All" Text="单位工程名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell80" Border.Lines="All" Text="[Table1.WorkAreaName]" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row8" Height="34.4">
|
||||
<TableCell Name="Cell33" Border.Lines="All" Text="检测单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell34" Border.Lines="All" Text="[Table1.CH_CheckUnit]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell35" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell36" Border.Lines="All" Text="接收人" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell37" Border.Lines="All" Text="[Table1.CH_TrustMan]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell58" Border.Lines="All" Text="委托单号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell63" Border.Lines="All" Text="[Table1.CH_TrustCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell68" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row9" Height="34.4">
|
||||
<TableCell Name="Cell38" Border.Lines="All" Text="区号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell39" Border.Lines="All" Text="[Table1.WorkAreaCode]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell40" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell41" Border.Lines="All" Text="检测时机" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell42" Border.Lines="All" Text="焊后" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell59" Border.Lines="All" Text="检测标准" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell64" Border.Lines="All" Text="[Table1.CH_NDTCriteria]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell69" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row10" Height="34.4">
|
||||
<TableCell Name="Cell43" Border.Lines="All" Text="检测类别" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell45" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell46" Border.Lines="All" Text="焊接方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell47" Border.Lines="All" Text="[Table1.CH_WeldMethod]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell60" Border.Lines="All" Text="合格级别" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell65" Border.Lines="All" Text="[Table1.CH_AcceptGrade]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell70" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row11" Height="34.4">
|
||||
<TableCell Name="Cell48" Border.Lines="All" Text="检测方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell49" Border.Lines="All" Text="[Table1.CH_NDTMethod]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell50" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="All" Text="坡口形式" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell52" Border.Lines="All" Text="[Table1.CH_SlopeType]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell61" Border.Lines="All" Text="检测比例" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell66" Border.Lines="All" Text="[Table1.CH_NDTRate]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell71" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="287.35" Width="718.2" Height="71.82">
|
||||
<TableObject Name="Tabel_Data" Left="18.9" Width="699.18" Height="71.82" Border.Lines="Top" ManualBuildEvent="Tabel_Data_ManualBuild">
|
||||
<TableColumn Name="Column21" Width="69.91"/>
|
||||
<TableColumn Name="Column22" Width="117.16"/>
|
||||
<TableColumn Name="Column23" Width="0"/>
|
||||
<TableColumn Name="Column24" Width="158.76"/>
|
||||
<TableColumn Name="Column25" Width="107.71"/>
|
||||
<TableColumn Name="Column26" Width="85.03"/>
|
||||
<TableColumn Name="Column27" Width="85.03"/>
|
||||
<TableColumn Name="Column28" Width="75.58"/>
|
||||
<TableRow Name="Row30" Height="22.68">
|
||||
<TableCell Name="Cell229" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell230" Border.Lines="All" Text="管道编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell231" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell232" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell233" Border.Lines="All" Text="焊工号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell234" Border.Lines="All" Text="焊口规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell235" Border.Lines="All" Text="焊口材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell236" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row21" Height="49.14">
|
||||
<TableCell Name="Cell137" Border.Lines="All" Text="[x]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell138" Border.Lines="All" Text="[Data.PipelineCode]" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell139" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell140" Border.Lines="All" Text="[Data.WeldJointCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell141" Border.Lines="All" Text="[Data.WelderCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell142" Border.Lines="All" Text="[Data.Specification]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell143" Border.Lines="All" Text="[Data.MaterialCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell144" Border.Lines="All" Text="[Data.Remark]" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<DataFooterBand Name="DataFooter1" Top="416" Width="718.2">
|
||||
<ChildBand Name="Child2" Top="363.01" Width="718.2" Height="49.14" FillUnusedSpace="true">
|
||||
<TableObject Name="Table6" Left="18.9" Width="699.18" Height="49.14" Border.Lines="Top">
|
||||
<TableColumn Name="Column53" Width="69.91"/>
|
||||
<TableColumn Name="Column54" Width="117.16"/>
|
||||
<TableColumn Name="Column55" Width="0"/>
|
||||
<TableColumn Name="Column56" Width="158.76"/>
|
||||
<TableColumn Name="Column57" Width="107.71"/>
|
||||
<TableColumn Name="Column58" Width="85.03"/>
|
||||
<TableColumn Name="Column59" Width="85.03"/>
|
||||
<TableColumn Name="Column60" Width="75.58"/>
|
||||
<TableRow Name="Row29" Height="49.14">
|
||||
<TableCell Name="Cell221" Border.Lines="All"/>
|
||||
<TableCell Name="Cell222" Border.Lines="All" ColSpan="2"/>
|
||||
<TableCell Name="Cell223" Border.Lines="All"/>
|
||||
<TableCell Name="Cell224" Border.Lines="All"/>
|
||||
<TableCell Name="Cell225" Border.Lines="All"/>
|
||||
<TableCell Name="Cell226" Border.Lines="All"/>
|
||||
<TableCell Name="Cell227" Border.Lines="All"/>
|
||||
<TableCell Name="Cell228" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</ChildBand>
|
||||
</DataFooterBand>
|
||||
</DataBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="419.84" Width="718.2" Height="181.43">
|
||||
<TableObject Name="Table5" Left="18.9" Width="699.21" Height="135.6" Border.Lines="All" RepeatHeaders="false">
|
||||
<TableColumn Name="Column37" Width="99.45"/>
|
||||
<TableColumn Name="Column38" Width="90"/>
|
||||
<TableColumn Name="Column39" Width="99.45"/>
|
||||
<TableColumn Name="Column40" Width="71.1"/>
|
||||
<TableColumn Name="Column41" Width="99.45"/>
|
||||
<TableColumn Name="Column42" Width="67.32"/>
|
||||
<TableColumn Name="Column43" Width="76.77"/>
|
||||
<TableColumn Name="Column44" Width="95.67"/>
|
||||
<TableRow Name="Row24" Height="43.94">
|
||||
<TableCell Name="Cell161" Border.Lines="Left, Right" Text=" 建设单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell162" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell163" Border.Lines="Left, Right" Text=" 监理单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell164" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell165" Border.Lines="Left, Right" Text=" 总包单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell166" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell167" Border.Lines="Left, Right" Text=" 施工单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell168" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row25" Height="45.83">
|
||||
<TableCell Name="Cell169" Border.Lines="All"/>
|
||||
<TableCell Name="Cell170" Border.Lines="All"/>
|
||||
<TableCell Name="Cell171" Border.Lines="All"/>
|
||||
<TableCell Name="Cell172" Border.Lines="All"/>
|
||||
<TableCell Name="Cell173" Border.Lines="All"/>
|
||||
<TableCell Name="Cell174" Border.Lines="All"/>
|
||||
<TableCell Name="Cell175" Border.Lines="All"/>
|
||||
<TableCell Name="Cell176" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row27" Height="45.83">
|
||||
<TableCell Name="Cell185" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell186" Border.Lines="All"/>
|
||||
<TableCell Name="Cell187" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell188" Border.Lines="All"/>
|
||||
<TableCell Name="Cell189" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell190" Border.Lines="All"/>
|
||||
<TableCell Name="Cell191" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell192" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<ChildBand Name="Child1" Top="605.12" Width="718.2" Height="17.77" PrintOnBottom="true"/>
|
||||
</PageFooterBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
@@ -0,0 +1,360 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="08/06/2026 15:05:55" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using FastReport;
|
||||
using FastReport.Data;
|
||||
using FastReport.Dialog;
|
||||
using FastReport.Barcode;
|
||||
using FastReport.Table;
|
||||
using FastReport.Utils;
|
||||
|
||||
namespace FastReport
|
||||
{
|
||||
public class ReportScript
|
||||
{
|
||||
|
||||
|
||||
private void Table4_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||
// init the data source
|
||||
rowData.Init();
|
||||
|
||||
// print the first table row - it is a header
|
||||
Table4.PrintRow(0);
|
||||
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
|
||||
// to print cells on the row
|
||||
Table4.PrintColumns();
|
||||
|
||||
// now enumerate the data source and print the table body
|
||||
|
||||
// print the table body
|
||||
Table4.PrintRow(1);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(2);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(3);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(4);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(5);
|
||||
Table4.PrintColumns();
|
||||
Table4.PrintRow(6);
|
||||
Table4.PrintColumns();
|
||||
// go next data source row
|
||||
rowData.Next();
|
||||
|
||||
}
|
||||
|
||||
private void Table5_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
Table5.PrintRow(0);
|
||||
Table5.PrintColumns();
|
||||
Table5.PrintRow(1);
|
||||
Table5.PrintColumns();
|
||||
}
|
||||
|
||||
|
||||
private int x;
|
||||
private void Tabel_Data_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
DataSourceBase rowData = Report.GetDataSource("Data");
|
||||
// init the data source
|
||||
rowData.Init();
|
||||
|
||||
// print the first table row - it is a header
|
||||
Tabel_Data.PrintRow(0);
|
||||
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
|
||||
// to print cells on the row
|
||||
Tabel_Data.PrintColumns();
|
||||
x=0;
|
||||
// now enumerate the data source and print the table body
|
||||
while (rowData.HasMoreRows)
|
||||
{
|
||||
x++;
|
||||
// print the table body
|
||||
Tabel_Data.PrintRow(1);
|
||||
Tabel_Data.PrintColumns();
|
||||
|
||||
// go next data source row
|
||||
rowData.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaXj7MTwVWd+W15ZHXWbvUTygn/8kT7Dd8PAtwcQdvSWlUEyCU1xPvJPbQKwTsqQwLM+O2fcBJVGvSTxsXNEsa1vy5JNdjQE5XXU2qh41PMt4c4Lp/j2o5C6htb8mS4/JfQOgej7CCf0JujCt3dJ+YxWqG4Aq/FT5hZrRwDISNQ+A">
|
||||
<TableDataSource Name="Table1" Alias="Head" DataType="System.Int32" Enabled="true" SelectCommand="select * from CH_Trust where CH_TrustID=@CH_TrustID">
|
||||
<Column Name="CH_TrustID" DataType="System.String"/>
|
||||
<Column Name="CH_TrustCode" DataType="System.String"/>
|
||||
<Column Name="CH_TrustUnit" DataType="System.String"/>
|
||||
<Column Name="CH_TrustDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_TrustType" DataType="System.String"/>
|
||||
<Column Name="CH_TrustMan" DataType="System.String"/>
|
||||
<Column Name="CH_Tabler" DataType="System.String"/>
|
||||
<Column Name="CH_TableDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_AuditMan" DataType="System.String"/>
|
||||
<Column Name="CH_AuditDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_Printer" DataType="System.String"/>
|
||||
<Column Name="CH_PrintDate" DataType="System.DateTime"/>
|
||||
<Column Name="CH_UnitName" DataType="System.String"/>
|
||||
<Column Name="CH_WorkNo" DataType="System.String"/>
|
||||
<Column Name="CH_ItemName" DataType="System.String"/>
|
||||
<Column Name="CH_SlopeType" DataType="System.String"/>
|
||||
<Column Name="CH_ServiceTemp" DataType="System.String"/>
|
||||
<Column Name="CH_Press" DataType="System.String"/>
|
||||
<Column Name="CH_WeldMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTRate" DataType="System.String"/>
|
||||
<Column Name="CH_NDTMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTCriteria" DataType="System.String"/>
|
||||
<Column Name="CH_AcceptGrade" DataType="System.String"/>
|
||||
<Column Name="CH_Remark" DataType="System.String"/>
|
||||
<Column Name="CH_CheckUnit" DataType="System.String"/>
|
||||
<Column Name="ProjectId" DataType="System.String"/>
|
||||
<Column Name="InstallationId" DataType="System.String"/>
|
||||
<Column Name="CH_RequestDate" DataType="System.DateTime"/>
|
||||
<Column Name="ToIso_Id" DataType="System.String"/>
|
||||
<CommandParameter Name="CH_TrustID" DataType="22" Expression="[CH_TrustID]"/>
|
||||
</TableDataSource>
|
||||
<TableDataSource Name="Table3" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand=" SELECT batch.PipelineCode ,batch.WeldJointCode,batch.WelderCode,joint.Specification , joint.MaterialCode,joint.Remark FROM dbo.View_Batch_BatchTrustItem as batch left join View_HJGL_WeldJoint joint on batch .WeldJointId=joint.WeldJointId where batch.TrustBatchId=@TrustBatchId order by batch.PipelineCode,batch.WeldJointCode">
|
||||
<Column Name="Remark" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="PipelineCode" DataType="System.String"/>
|
||||
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||
<Column Name="WelderCode" DataType="System.String"/>
|
||||
<Column Name="Specification" DataType="System.String"/>
|
||||
<Column Name="MaterialCode" DataType="System.String"/>
|
||||
<CommandParameter Name="TrustBatchId" DataType="12" Expression="[TrustBatchId]"/>
|
||||
</TableDataSource>
|
||||
</MsSqlDataConnection>
|
||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="CH_TrustCode" DataType="System.String"/>
|
||||
<Column Name="CH_TrustUnit" DataType="System.String"/>
|
||||
<Column Name="CH_TrustMan" DataType="System.String"/>
|
||||
<Column Name="CH_SlopeType" DataType="System.String"/>
|
||||
<Column Name="CH_WeldMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTRate" DataType="System.String"/>
|
||||
<Column Name="CH_NDTMethod" DataType="System.String"/>
|
||||
<Column Name="CH_NDTCriteria" DataType="System.String"/>
|
||||
<Column Name="CH_AcceptGrade" DataType="System.String"/>
|
||||
<Column Name="CH_CheckUnit" DataType="System.String"/>
|
||||
<Column Name="ProjectName" DataType="System.String" PropName="ProjectId"/>
|
||||
<Column Name="WorkAreaName" DataType="System.String" PropName="Column"/>
|
||||
<Column Name="WorkAreaCode" DataType="System.String" PropName="Column"/>
|
||||
<Column Name="Column" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column1" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column2" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
<Column Name="Column3" DataType="System.Int32" Calculated="true" Expression=""/>
|
||||
</TableDataSource>
|
||||
<TableDataSource Name="Data" Alias="Dataaaa" ReferenceName="Data.Data" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="CH_TrustID" DataType="System.String"/>
|
||||
<Column Name="ISO_IsoNo" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="ISO_IsoNumber" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="JOT_JointNo" DataType="System.Int32" PropName="Column1" Calculated="true" Expression=""/>
|
||||
<Column Name="WED_Code2" DataType="System.Int32" PropName="Column2" Calculated="true" Expression=""/>
|
||||
<Column Name="JOT_JointDesc" DataType="System.Int32" PropName="Column3" Calculated="true" Expression=""/>
|
||||
<Column Name="STE_Name1" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
|
||||
<Column Name="Remark" DataType="System.Int32" PropName="Column1" Calculated="true" Expression=""/>
|
||||
</TableDataSource>
|
||||
<Parameter Name="CH_TrustID" DataType="System.String"/>
|
||||
<Parameter Name="supUnit" DataType="System.String"/>
|
||||
<Parameter Name="totalUnit" DataType="System.String"/>
|
||||
<Parameter Name="ConUnit" DataType="System.String"/>
|
||||
<Parameter Name="CheckUnit" DataType="System.String"/>
|
||||
<Parameter Name="TrustBatchId" DataType="System.String"/>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1" RawPaperSize="9" Guides="75.6">
|
||||
<PageHeaderBand Name="PageHeader1" Width="718.2" Height="318.22">
|
||||
<TableObject Name="Table4" Left="18.9" Top="37.8" Width="699.25" Height="280.42" ManualBuildEvent="Table4_ManualBuild">
|
||||
<TableColumn Name="Column13" Width="94.73"/>
|
||||
<TableColumn Name="Column14" Width="94.73"/>
|
||||
<TableColumn Name="Column15" Width="75.83"/>
|
||||
<TableColumn Name="Column16" Width="94.73"/>
|
||||
<TableColumn Name="Column17" Width="94.73"/>
|
||||
<TableColumn Name="Column18" Width="72.05"/>
|
||||
<TableColumn Name="Column19" Width="72.05"/>
|
||||
<TableColumn Name="Column20" Width="100.4"/>
|
||||
<TableRow Name="Row14" Height="64.64">
|
||||
<TableCell Name="Cell81" Border.Lines="All" Text="SH/T 3543-G414" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell82" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell83" Border.Lines="All" Text="管道焊口检测委托单" HorzAlign="Center" VertAlign="Center" Font="宋体, 16pt, style=Bold" ColSpan="4" RowSpan="2"/>
|
||||
<TableCell Name="Cell84" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell85" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell86" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell87" Border.Lines="All" Text="工程名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell88" Border.Lines="All" Text="[Table1.ProjectName]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row13" Height="43.78">
|
||||
<TableCell Name="Cell73" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell74" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell75" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell76" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell77" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell78" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell79" Border.Lines="All" Text="单位工程名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell80" Border.Lines="All" Text="[Table1.WorkAreaName]" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row8" Height="34.4">
|
||||
<TableCell Name="Cell33" Border.Lines="All" Text="检测单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell34" Border.Lines="All" Text="[Table1.CH_CheckUnit]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell35" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell36" Border.Lines="All" Text="接收人" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell37" Border.Lines="All" Text="[Table1.CH_TrustMan]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell58" Border.Lines="All" Text="委托单号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell63" Border.Lines="All" Text="[Table1.CH_TrustCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell68" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row9" Height="34.4">
|
||||
<TableCell Name="Cell38" Border.Lines="All" Text="区号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell39" Border.Lines="All" Text="[Table1.WorkAreaCode]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell40" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell41" Border.Lines="All" Text="检测时机" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell42" Border.Lines="All" Text="焊后" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell59" Border.Lines="All" Text="检测标准" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell64" Border.Lines="All" Text="NB/T47013.2-2015" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell69" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row10" Height="34.4">
|
||||
<TableCell Name="Cell43" Border.Lines="All" Text="检测类别" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell45" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell46" Border.Lines="All" Text="焊接方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell47" Border.Lines="All" Text="[Table1.CH_WeldMethod]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell60" Border.Lines="All" Text="合格级别" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell65" Border.Lines="All" Text="[Table1.CH_AcceptGrade]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell70" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row11" Height="34.4">
|
||||
<TableCell Name="Cell48" Border.Lines="All" Text="检测方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell49" Border.Lines="All" Text="[Table1.CH_NDTMethod]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell50" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="All" Text="坡口形式" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell52" Border.Lines="All" Text="[Table1.CH_SlopeType]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell61" Border.Lines="All" Text="检测比例" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell66" Border.Lines="All" Text="[Table1.CH_NDTRate]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell71" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row31" Height="34.4">
|
||||
<TableCell Name="Cell237" Border.Lines="All" Text="检测时机" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell238" Border.Lines="All" AllowExpressions="false" ColSpan="7">
|
||||
<CheckBoxObject Name="CheckBox1" Left="94.5" Top="15.12" Width="9.45" Height="9.45" Border.Lines="All" Cursor="IBeam" Checked="false"/>
|
||||
<CheckBoxObject Name="CheckBox2" Left="321.3" Top="15.12" Width="9.45" Height="9.45" Border.Lines="All" Cursor="IBeam" Checked="false"/>
|
||||
<TextObject Name="Text1" Left="113.4" Top="9.45" Width="94.5" Height="18.9" Text="工厂化预制焊口" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
<TextObject Name="Text2" Left="340.2" Top="9.45" Width="94.5" Height="18.9" Text="安装施工焊口" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
</TableCell>
|
||||
<TableCell Name="Cell239" Border.Lines="All"/>
|
||||
<TableCell Name="Cell240" Border.Lines="All"/>
|
||||
<TableCell Name="Cell241" Border.Lines="All"/>
|
||||
<TableCell Name="Cell242" Border.Lines="All"/>
|
||||
<TableCell Name="Cell243" Border.Lines="All"/>
|
||||
<TableCell Name="Cell244" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="321.35" Width="718.2" Height="71.82">
|
||||
<TableObject Name="Tabel_Data" Left="18.9" Width="699.18" Height="71.82" Border.Lines="Top" ManualBuildEvent="Tabel_Data_ManualBuild">
|
||||
<TableColumn Name="Column21" Width="69.91"/>
|
||||
<TableColumn Name="Column22" Width="117.16"/>
|
||||
<TableColumn Name="Column23" Width="0"/>
|
||||
<TableColumn Name="Column24" Width="158.76"/>
|
||||
<TableColumn Name="Column25" Width="107.71"/>
|
||||
<TableColumn Name="Column26" Width="85.03"/>
|
||||
<TableColumn Name="Column27" Width="85.03"/>
|
||||
<TableColumn Name="Column28" Width="75.58"/>
|
||||
<TableRow Name="Row30" Height="22.68">
|
||||
<TableCell Name="Cell229" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell230" Border.Lines="All" Text="管道编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell231" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell232" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell233" Border.Lines="All" Text="焊工号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell234" Border.Lines="All" Text="焊口规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell235" Border.Lines="All" Text="焊口材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell236" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row21" Height="49.14">
|
||||
<TableCell Name="Cell137" Border.Lines="All" Text="[x]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell138" Border.Lines="All" Text="[Data.PipelineCode]" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell139" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell140" Border.Lines="All" Text="[Data.WeldJointCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell141" Border.Lines="All" Text="[Data.WelderCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell142" Border.Lines="All" Text="[Data.Specification]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell143" Border.Lines="All" Text="[Data.MaterialCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell144" Border.Lines="All" Text="[Data.Remark]" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<DataFooterBand Name="DataFooter1" Top="448.55" Width="718.2">
|
||||
<ChildBand Name="Child2" Top="396.29" Width="718.2" Height="49.14" FillUnusedSpace="true">
|
||||
<TableObject Name="Table6" Left="18.9" Width="699.18" Height="49.14" Border.Lines="Top">
|
||||
<TableColumn Name="Column53" Width="69.91"/>
|
||||
<TableColumn Name="Column54" Width="117.16"/>
|
||||
<TableColumn Name="Column55" Width="0"/>
|
||||
<TableColumn Name="Column56" Width="158.76"/>
|
||||
<TableColumn Name="Column57" Width="107.71"/>
|
||||
<TableColumn Name="Column58" Width="85.03"/>
|
||||
<TableColumn Name="Column59" Width="85.03"/>
|
||||
<TableColumn Name="Column60" Width="75.58"/>
|
||||
<TableRow Name="Row29" Height="49.14">
|
||||
<TableCell Name="Cell221" Border.Lines="All"/>
|
||||
<TableCell Name="Cell222" Border.Lines="All" ColSpan="2"/>
|
||||
<TableCell Name="Cell223" Border.Lines="All"/>
|
||||
<TableCell Name="Cell224" Border.Lines="All"/>
|
||||
<TableCell Name="Cell225" Border.Lines="All"/>
|
||||
<TableCell Name="Cell226" Border.Lines="All"/>
|
||||
<TableCell Name="Cell227" Border.Lines="All"/>
|
||||
<TableCell Name="Cell228" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</ChildBand>
|
||||
</DataFooterBand>
|
||||
</DataBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="451.68" Width="718.2" Height="181.43">
|
||||
<TableObject Name="Table5" Left="18.9" Width="699.21" Height="135.6" Border.Lines="All" RepeatHeaders="false">
|
||||
<TableColumn Name="Column37" Width="99.45"/>
|
||||
<TableColumn Name="Column38" Width="90"/>
|
||||
<TableColumn Name="Column39" Width="99.45"/>
|
||||
<TableColumn Name="Column40" Width="71.1"/>
|
||||
<TableColumn Name="Column41" Width="99.45"/>
|
||||
<TableColumn Name="Column42" Width="67.32"/>
|
||||
<TableColumn Name="Column43" Width="76.77"/>
|
||||
<TableColumn Name="Column44" Width="95.67"/>
|
||||
<TableRow Name="Row24" Height="43.94">
|
||||
<TableCell Name="Cell161" Border.Lines="Left, Right" Text=" 建设单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell162" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell163" Border.Lines="Left, Right" Text=" 监理单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell164" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell165" Border.Lines="Left, Right" Text=" 总包单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell166" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell167" Border.Lines="Left, Right" Text=" 施工单位: " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell168" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row25" Height="45.83">
|
||||
<TableCell Name="Cell169" Border.Lines="All"/>
|
||||
<TableCell Name="Cell170" Border.Lines="All"/>
|
||||
<TableCell Name="Cell171" Border.Lines="All"/>
|
||||
<TableCell Name="Cell172" Border.Lines="All"/>
|
||||
<TableCell Name="Cell173" Border.Lines="All"/>
|
||||
<TableCell Name="Cell174" Border.Lines="All"/>
|
||||
<TableCell Name="Cell175" Border.Lines="All"/>
|
||||
<TableCell Name="Cell176" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row27" Height="45.83">
|
||||
<TableCell Name="Cell185" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell186" Border.Lines="All"/>
|
||||
<TableCell Name="Cell187" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell188" Border.Lines="All"/>
|
||||
<TableCell Name="Cell189" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell190" Border.Lines="All"/>
|
||||
<TableCell Name="Cell191" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell192" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<ChildBand Name="Child1" Top="636.23" Width="718.2" Height="32.13" PrintOnBottom="true"/>
|
||||
</PageFooterBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
@@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="06/29/2023 16:17:25" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using FastReport;
|
||||
using FastReport.Data;
|
||||
using FastReport.Dialog;
|
||||
using FastReport.Barcode;
|
||||
using FastReport.Table;
|
||||
using FastReport.Utils;
|
||||
|
||||
namespace FastReport
|
||||
{
|
||||
public class ReportScript
|
||||
{
|
||||
|
||||
|
||||
|
||||
private int x;
|
||||
private void Tabel_Data_ManualBuild(object sender, EventArgs e)
|
||||
{
|
||||
DataSourceBase rowData = Report.GetDataSource("Data");
|
||||
// init the data source
|
||||
rowData.Init();
|
||||
|
||||
// print the first table row - it is a header
|
||||
Tabel_Data.PrintRow(0);
|
||||
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
|
||||
// to print cells on the row
|
||||
Tabel_Data.PrintColumns();
|
||||
x=0;
|
||||
// now enumerate the data source and print the table body
|
||||
while (rowData.HasMoreRows)
|
||||
{
|
||||
x++;
|
||||
// print the table body
|
||||
Tabel_Data.PrintRow(1);
|
||||
Tabel_Data.PrintColumns();
|
||||
|
||||
// go next data source row
|
||||
rowData.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREqJVR0Mamf/zPeVAMs94NN">
|
||||
<TableDataSource Name="Data" DataType="System.Int32" Enabled="true" SelectCommand=" select PipelineCode as ISO_IsoNo ,WeldJointCode as JOT_JointNo,Specification as JOT_JointDesc,MaterialCode from dbo.View_HJGL_HotProess_TrustItem AS Trust WHERE Trust.HotProessTrustId=@HotProessTrustId">
|
||||
<Column Name="ISO_IsoNo" DataType="System.String"/>
|
||||
<Column Name="JOT_JointNo" DataType="System.String"/>
|
||||
<Column Name="JOT_JointDesc" DataType="System.String"/>
|
||||
<Column Name="MaterialCode" DataType="System.String"/>
|
||||
<CommandParameter Name="HotProessTrustId" DataType="22" Expression="[HotProessTrustId]"/>
|
||||
</TableDataSource>
|
||||
</MsSqlDataConnection>
|
||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="ProjectName" DataType="System.String"/>
|
||||
<Column Name="WorkAreaName" DataType="System.String"/>
|
||||
<Column Name="HotProessTrustNo" DataType="System.String"/>
|
||||
<Column Name="CH_TrustMan" DataType="System.String"/>
|
||||
<Column Name="WorkAreaCode" DataType="System.String"/>
|
||||
<Column Name="JoinNum" DataType="System.String"/>
|
||||
</TableDataSource>
|
||||
<Parameter Name="HotProessTrustId" DataType="System.String"/>
|
||||
<Parameter Name="totalUnit" DataType="System.String"/>
|
||||
<Parameter Name="supUnit" DataType="System.String"/>
|
||||
<Parameter Name="ConUnit" DataType="System.String"/>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1" RawPaperSize="9">
|
||||
<PageHeaderBand Name="PageHeader1" Width="718.2" Height="211.33">
|
||||
<TableObject Name="Table4" Left="18.9" Top="37.8" Width="699.25" Height="173.53">
|
||||
<TableColumn Name="Column13" Width="94.73"/>
|
||||
<TableColumn Name="Column14" Width="94.73"/>
|
||||
<TableColumn Name="Column15" Width="75.83"/>
|
||||
<TableColumn Name="Column16" Width="94.73"/>
|
||||
<TableColumn Name="Column17" Width="94.73"/>
|
||||
<TableColumn Name="Column18" Width="72.05"/>
|
||||
<TableColumn Name="Column19" Width="43.7"/>
|
||||
<TableColumn Name="Column20" Width="128.75"/>
|
||||
<TableRow Name="Row14" Height="60.78">
|
||||
<TableCell Name="Cell81" Border.Lines="All" Text="SH/T 3543" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell82" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell83" Border.Lines="All" Text="管道焊口热处理委托单" HorzAlign="Center" VertAlign="Center" Font="宋体, 16pt, style=Bold" ColSpan="4" RowSpan="2"/>
|
||||
<TableCell Name="Cell84" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell85" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell86" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell87" Border.Lines="Left, Top" Text="工程 名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell88" Border.Lines="Right, Top" Text="[Table1.ProjectName]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row13" Height="43.78">
|
||||
<TableCell Name="Cell73" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell74" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell75" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell76" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell77" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell78" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell79" Border.Lines="Left, Bottom" Text="工区 名称" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell80" Border.Lines="Right, Bottom" Text="[Table1.WorkAreaName]" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row8" Height="22.99">
|
||||
<TableCell Name="Cell33" Border.Lines="All" Text="委托单编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell34" Border.Lines="All" Text="[Table1.HotProessTrustNo]" HorzAlign="Center" VertAlign="Center" ColSpan="3"/>
|
||||
<TableCell Name="Cell35" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell36" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell37" Border.Lines="All" Text="热处理接收人" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell58" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="3"/>
|
||||
<TableCell Name="Cell63" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||
<TableCell Name="Cell68" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row9" Height="22.99">
|
||||
<TableCell Name="Cell38" Border.Lines="All" Text="区号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell39" Border.Lines="All" Text="[Table1.WorkAreaCode]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell40" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell41" Border.Lines="All" Text="热处理温度" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell42" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell59" Border.Lines="All" Text="执行标准" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell64" Border.Lines="All" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell69" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row11" Height="22.99">
|
||||
<TableCell Name="Cell48" Border.Lines="All" Text="检测方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell49" Border.Lines="All" Text="硬度" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell50" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell51" Border.Lines="All" Text="热处理方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell52" Border.Lines="All" Text="电加热" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell61" Border.Lines="All" Text="焊口数/道" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell66" Border.Lines="All" Text="[Table1.JoinNum]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell71" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="215.18" Width="718.2" Height="81.27">
|
||||
<TableObject Name="Tabel_Data" Left="18.9" Width="697.67" Height="81.27" Border.Lines="Top" FixedRows="1" ManualBuildEvent="Tabel_Data_ManualBuild">
|
||||
<TableColumn Name="Column21" Width="60.46"/>
|
||||
<TableColumn Name="Column22" Width="107.71"/>
|
||||
<TableColumn Name="Column23" Width="88.81"/>
|
||||
<TableColumn Name="Column24" Width="69.91"/>
|
||||
<TableColumn Name="Column26" Width="66.13"/>
|
||||
<TableColumn Name="Column27" Width="151.18"/>
|
||||
<TableColumn Name="Column61"/>
|
||||
<TableColumn Name="Column28" Width="87.32"/>
|
||||
<TableRow Name="Row30" Height="32.13">
|
||||
<TableCell Name="Cell229" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell230" Border.Lines="All" Text="管道编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell231" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell232" Border.Lines="All" Text="焊口规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
|
||||
<TableCell Name="Cell234" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell235" Border.Lines="All" Text="焊口材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell237" Border.Lines="All" Text="热处理日期" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell236" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row21" Height="49.14">
|
||||
<TableCell Name="Cell137" Border.Lines="All" Text="[x]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell138" Border.Lines="All" Text="[Data.ISO_IsoNo]" VertAlign="Center"/>
|
||||
<TableCell Name="Cell139" Border.Lines="All" Text="[Data.JOT_JointNo]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell140" Border.Lines="All" Text="[Data.JOT_JointDesc]" HorzAlign="Center" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell142" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell143" Border.Lines="All" Text="[Data.MaterialCode]" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell238" Border.Lines="All" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center"/>
|
||||
<TableCell Name="Cell144" Border.Lines="All" HorzAlign="Center" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<DataFooterBand Name="DataFooter1" Top="353.28" Width="718.2">
|
||||
<ChildBand Name="Child2" Top="300.29" Width="718.2" Height="49.14" FillUnusedSpace="true">
|
||||
<TableObject Name="Table6" Left="18.9" Width="697.67" Height="49.14" Border.Lines="Top">
|
||||
<TableColumn Name="Column53" Width="60.46"/>
|
||||
<TableColumn Name="Column54" Width="107.71"/>
|
||||
<TableColumn Name="Column55" Width="88.81"/>
|
||||
<TableColumn Name="Column56" Width="69.91"/>
|
||||
<TableColumn Name="Column58" Width="66.13"/>
|
||||
<TableColumn Name="Column59" Width="151.18"/>
|
||||
<TableColumn Name="Column62"/>
|
||||
<TableColumn Name="Column60" Width="87.32"/>
|
||||
<TableRow Name="Row29" Height="49.14">
|
||||
<TableCell Name="Cell221" Border.Lines="All"/>
|
||||
<TableCell Name="Cell222" Border.Lines="All"/>
|
||||
<TableCell Name="Cell223" Border.Lines="All"/>
|
||||
<TableCell Name="Cell224" Border.Lines="All" ColSpan="2"/>
|
||||
<TableCell Name="Cell226" Border.Lines="All"/>
|
||||
<TableCell Name="Cell227" Border.Lines="All"/>
|
||||
<TableCell Name="Cell239" Border.Lines="All"/>
|
||||
<TableCell Name="Cell228" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</ChildBand>
|
||||
</DataFooterBand>
|
||||
</DataBand>
|
||||
<PageFooterBand Name="PageFooter1" Top="357.12" Width="718.2" Height="219.24">
|
||||
<TableObject Name="Table5" Left="18.9" Width="697.36" Height="163.77" Border.Lines="All" RepeatHeaders="false">
|
||||
<TableColumn Name="Column37" Width="127.89"/>
|
||||
<TableColumn Name="Column38" Width="110.88"/>
|
||||
<TableColumn Name="Column39" Width="127.89"/>
|
||||
<TableColumn Name="Column40" Width="99.54"/>
|
||||
<TableColumn Name="Column41" Width="135.4"/>
|
||||
<TableColumn Name="Column42" Width="95.76"/>
|
||||
<TableRow Name="Row24" Height="43.94">
|
||||
<TableCell Name="Cell161" Border.Lines="Left, Right" Text=" 施工单位: [ConUnit] " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell162" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell163" Border.Lines="Left, Right" Text=" 监理单位: [supUnit] " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell164" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
<TableCell Name="Cell165" Border.Lines="Left, Right" Text=" 建设单位项目部门: [totalUnit] " Font="宋体, 10pt" ColSpan="2" RowSpan="2"/>
|
||||
<TableCell Name="Cell166" Border.Lines="Left, Right, Top" Font="宋体, 10pt"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row25" Height="26.84">
|
||||
<TableCell Name="Cell169" Border.Lines="All"/>
|
||||
<TableCell Name="Cell170" Border.Lines="All"/>
|
||||
<TableCell Name="Cell171" Border.Lines="All"/>
|
||||
<TableCell Name="Cell172" Border.Lines="All"/>
|
||||
<TableCell Name="Cell173" Border.Lines="All"/>
|
||||
<TableCell Name="Cell174" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row31" Height="47.25">
|
||||
<TableCell Name="Cell240" Border.Lines="Left, Right" Text="技术员签字: 焊接负责人: " ColSpan="2"/>
|
||||
<TableCell Name="Cell241"/>
|
||||
<TableCell Name="Cell242" Border.Lines="Left, Right" Text="签字人:" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell243" VertAlign="Center"/>
|
||||
<TableCell Name="Cell244" Border.Lines="Left, Right" Text="签字人:" VertAlign="Center" ColSpan="2"/>
|
||||
<TableCell Name="Cell245" VertAlign="Center"/>
|
||||
</TableRow>
|
||||
<TableRow Name="Row27" Height="45.74">
|
||||
<TableCell Name="Cell185" Border.Lines="Left, Right, Bottom" Text=" 日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell186" Border.Lines="All"/>
|
||||
<TableCell Name="Cell187" Border.Lines="Left, Right, Bottom" Text=" 日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell188" Border.Lines="All"/>
|
||||
<TableCell Name="Cell189" Border.Lines="Left, Right, Bottom" Text=" 日期: 年 月 日" ColSpan="2"/>
|
||||
<TableCell Name="Cell190" Border.Lines="All"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<TextObject Name="Text1" Left="585.9" Top="179.55" Width="103.95" Height="28.35" Text="第[Page#]页 共[TotalPages#]页"/>
|
||||
<ChildBand Name="Child1" Top="580.21" Width="718.2" Height="41.96" PrintOnBottom="true"/>
|
||||
</PageFooterBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
@@ -17444,7 +17444,7 @@
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<f:RenderField Width="90px" ColumnID="MaterialUnit" DataField="MaterialUnit" FieldType="String" HeaderText="单位"
|
||||
HeaderTextAlign="Center" TextAlign="Left" SortField="MaterialUnit" >
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="DesignInstitute" DataField="DesignInstitute" FieldType="String" HeaderText="所属设计院"
|
||||
HeaderTextAlign="Center" TextAlign="Left" SortField="DesignInstitute">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="260px" ColumnID="MaterialDef" DataField="MaterialDef" FieldType="String"
|
||||
HeaderText="材料描述" HeaderTextAlign="Center" TextAlign="Left"
|
||||
ExpandUnusedSpace="true">
|
||||
|
||||
@@ -55,13 +55,20 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMaterialUnit" runat="server" Label="单位"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDesignInstitute" runat="server" Label="所属设计院"
|
||||
MaxLength="200" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtMaterialDef" runat="server" Label="描述" MaxLength="300" LabelWidth="100px">
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
txtMaterialSpec.Text = lib.MaterialSpec;
|
||||
txtMaterialDef.Text = lib.MaterialDef;
|
||||
txtMaterialUnit.Text = lib.MaterialUnit;
|
||||
txtDesignInstitute.Text = lib.DesignInstitute;
|
||||
//txtMaterialCode.Enabled = false;
|
||||
}
|
||||
else
|
||||
@@ -71,7 +72,10 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
MaterialMade = this.txtMaterialMade.Text.Trim(),
|
||||
MaterialDef = this.txtMaterialDef.Text.Trim(),
|
||||
MaterialUnit = txtMaterialUnit.Text.Trim(),
|
||||
Code = this.txtCode.Text.Trim()
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
DesignInstitute = string.IsNullOrWhiteSpace(txtDesignInstitute.Text)
|
||||
? null
|
||||
: txtDesignInstitute.Text.Trim()
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(materialCode))
|
||||
@@ -91,4 +95,4 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,11 @@ namespace FineUIPro.Web.HJGL.BaseInfo {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtDesignInstitute 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtDesignInstitute;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialDef 控件。
|
||||
|
||||
@@ -153,6 +153,9 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
// item.MaterialMade = dv[i]["材质"].ToString();
|
||||
item.MaterialUnit = rows[i].MaterialUnit;
|
||||
item.MaterialName = rows[i].MaterialName;
|
||||
item.DesignInstitute = string.IsNullOrWhiteSpace(rows[i].DesignInstitute)
|
||||
? null
|
||||
: rows[i].DesignInstitute.Trim();
|
||||
//item.PipeGrade = dv[i]["管道等级"].ToString();
|
||||
//item.ProjectId = CurrUser.LoginProjectId;
|
||||
//= SQLHelper.GetNewID(typeof(Model.Editor_CostReport));
|
||||
@@ -236,6 +239,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
MaterialUnit = x.MaterialUnit,
|
||||
MaterialName = x.MaterialName,
|
||||
DesignInstitute = x.DesignInstitute,
|
||||
|
||||
}).DistinctBy(temp => new
|
||||
{
|
||||
@@ -243,7 +247,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
temp.MaterialDef,
|
||||
temp.MaterialSpec,
|
||||
temp.MaterialUnit,
|
||||
temp.MaterialName
|
||||
temp.MaterialName,
|
||||
temp.DesignInstitute
|
||||
}).ToList();
|
||||
codeLib_update = (from x in codeLib_update
|
||||
select new HJGL_MaterialCodeLib
|
||||
@@ -253,6 +258,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
MaterialUnit = x.MaterialUnit,
|
||||
MaterialName = x.MaterialName,
|
||||
DesignInstitute = x.DesignInstitute,
|
||||
|
||||
}).DistinctBy(temp => new
|
||||
{
|
||||
@@ -260,7 +266,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
temp.MaterialDef,
|
||||
temp.MaterialSpec,
|
||||
temp.MaterialUnit,
|
||||
temp.MaterialName
|
||||
temp.MaterialName,
|
||||
temp.DesignInstitute
|
||||
}).ToList();
|
||||
foreach (var item in codeLib_update)
|
||||
{
|
||||
@@ -281,4 +288,4 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,13 +88,7 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="PackageIn" runat="server" Hidden="true" OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdateImport" Text="更新导入" ToolTip="更新导入" Icon="PackageIn" runat="server" Hidden="true" OnClick="btnUpdateImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPDMSImport" Text="PDMS导入" ToolTip="PDMS导入" Icon="PackageIn" runat="server" OnClick="btnPDMSImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click">
|
||||
</f:Button>
|
||||
|
||||
@@ -156,6 +150,9 @@
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="PipeAreaText" DataField="PipeAreaText"
|
||||
FieldType="String" HeaderText="材料用途" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
@@ -218,6 +215,9 @@
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="PipeAreaText" DataField="PipeAreaText"
|
||||
FieldType="String" HeaderText="材料用途" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
@@ -279,6 +279,9 @@
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="PipeAreaText" DataField="PipeAreaText"
|
||||
FieldType="String" HeaderText="材料用途" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
|
||||
@@ -327,13 +327,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
ISNULL(lib.MaterialSpec, libCode.MaterialSpec) AS MaterialSpec,
|
||||
ISNULL(lib.MaterialMade, libCode.MaterialMade) AS MaterialMade,
|
||||
ISNULL(lib.MaterialDef, libCode.MaterialDef) AS MaterialDef,
|
||||
pipe.Number,pipe.PrefabricatedComponents,weld.WeldJointCode
|
||||
pipe.Number,pipe.PrefabricatedComponents,
|
||||
CASE pipe.PipeArea WHEN '1' THEN N'工厂预制' WHEN '2' THEN N'现场安装' END AS PipeAreaText,
|
||||
weld.WeldJointCode
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN dbo.HJGL_MaterialCodeLib lib ON lib.MaterialCode = pipe.MaterialCode
|
||||
LEFT JOIN HJGL_Pipeline line ON pipe.PipelineId=line.PipelineId
|
||||
OUTER APPLY (SELECT TOP 1 * FROM dbo.HJGL_MaterialCodeLib codeLib WHERE codeLib.ProjectId=line.ProjectId AND codeLib.Code=pipe.MaterialCode2 ORDER BY codeLib.MaterialCode) libCode
|
||||
LEFT JOIN dbo.HJGL_WeldJoint weld ON weld.WeldJointId = pipe.WeldJointId
|
||||
WHERE line.UnitWorkId=@UnitWorkId and line.PipeArea='1' and pipe.PrefabricatedComponents !='' ";
|
||||
WHERE line.UnitWorkId=@UnitWorkId and pipe.PipeArea='1' and pipe.PrefabricatedComponents !='' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
//{
|
||||
@@ -369,13 +371,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
ISNULL(lib.MaterialSpec, libCode.MaterialSpec) AS MaterialSpec,
|
||||
ISNULL(lib.MaterialMade, libCode.MaterialMade) AS MaterialMade,
|
||||
ISNULL(lib.MaterialDef, libCode.MaterialDef) AS MaterialDef,
|
||||
pipe.Number,weld.WeldJointCode
|
||||
pipe.Number,
|
||||
CASE pipe.PipeArea WHEN '1' THEN N'工厂预制' WHEN '2' THEN N'现场安装' END AS PipeAreaText,
|
||||
weld.WeldJointCode
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN dbo.HJGL_MaterialCodeLib lib ON lib.MaterialCode = pipe.MaterialCode
|
||||
LEFT JOIN HJGL_Pipeline line ON pipe.PipelineId=line.PipelineId
|
||||
OUTER APPLY (SELECT TOP 1 * FROM dbo.HJGL_MaterialCodeLib codeLib WHERE codeLib.ProjectId=line.ProjectId AND codeLib.Code=pipe.MaterialCode2 ORDER BY codeLib.MaterialCode) libCode
|
||||
LEFT JOIN dbo.HJGL_WeldJoint weld ON weld.WeldJointId = pipe.WeldJointId
|
||||
WHERE line.UnitWorkId=@UnitWorkId and line.PipeArea='2' ";
|
||||
WHERE line.UnitWorkId=@UnitWorkId and pipe.PipeArea='2' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(pipelineId))
|
||||
{
|
||||
@@ -407,13 +411,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
ISNULL(lib.MaterialSpec, libCode.MaterialSpec) AS MaterialSpec,
|
||||
ISNULL(lib.MaterialMade, libCode.MaterialMade) AS MaterialMade,
|
||||
ISNULL(lib.MaterialDef, libCode.MaterialDef) AS MaterialDef,
|
||||
pipe.Number,pipe.PrefabricatedComponents,weld.WeldJointCode
|
||||
pipe.Number,pipe.PrefabricatedComponents,
|
||||
CASE pipe.PipeArea WHEN '1' THEN N'工厂预制' WHEN '2' THEN N'现场安装' END AS PipeAreaText,
|
||||
weld.WeldJointCode
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN dbo.HJGL_MaterialCodeLib lib ON lib.MaterialCode = pipe.MaterialCode
|
||||
LEFT JOIN HJGL_Pipeline line ON pipe.PipelineId=line.PipelineId
|
||||
OUTER APPLY (SELECT TOP 1 * FROM dbo.HJGL_MaterialCodeLib codeLib WHERE codeLib.ProjectId=line.ProjectId AND codeLib.Code=pipe.MaterialCode2 ORDER BY codeLib.MaterialCode) libCode
|
||||
LEFT JOIN dbo.HJGL_WeldJoint weld ON weld.WeldJointId = pipe.WeldJointId
|
||||
WHERE line.UnitWorkId=@UnitWorkId and line.PipeArea='1' and (pipe.PrefabricatedComponents is null or pipe.PrefabricatedComponents='') ";
|
||||
WHERE line.UnitWorkId=@UnitWorkId and pipe.PipeArea='1' and (pipe.PrefabricatedComponents is null or pipe.PrefabricatedComponents='') ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
|
||||
//{
|
||||
@@ -1006,64 +1012,10 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.tvControlItem.SelectedNodeID);
|
||||
if (unitWork != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelineListIn.aspx?UnitWorkId={0}", this.tvControlItem.SelectedNodeID, "导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先选择单位工程!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 更新导入
|
||||
/// <summary>
|
||||
/// 更新导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdateImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.tvControlItem.SelectedNodeID);
|
||||
if (unitWork != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelineListUpdateIn.aspx?UnitWorkId={0}", this.tvControlItem.SelectedNodeID, "更新导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先选择单位工程!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PDMS导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPDMSImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.tvControlItem.SelectedNodeID);
|
||||
if (unitWork != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelineListPDMSIn.aspx?UnitWorkId={0}", this.tvControlItem.SelectedNodeID, "导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先选择单位工程!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 管线材料导入
|
||||
|
||||
/// <summary>
|
||||
/// 管线材料导入
|
||||
|
||||
@@ -185,33 +185,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdateImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdateImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnPDMSImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPDMSImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnMatImport 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -44,6 +44,15 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpPipeArea" runat="server" Label="材料用途" Required="true"
|
||||
ShowRedStar="true" LabelWidth="100px">
|
||||
<f:ListItem Text="工厂预制" Value="1" />
|
||||
<f:ListItem Text="现场安装" Value="2" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
|
||||
@@ -44,6 +44,9 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
? Const._Null
|
||||
: pipeLineMat.MaterialCode;
|
||||
this.txtMaterialCode.Text = pipeLineMat.MaterialCode2;
|
||||
this.drpPipeArea.SelectedValue = string.IsNullOrEmpty(pipeLineMat.PipeArea)
|
||||
? PipelineService.PipeArea_SHOP
|
||||
: pipeLineMat.PipeArea;
|
||||
BindMaterialDetails(pipeLineMat.MaterialCode, false);
|
||||
}
|
||||
}
|
||||
@@ -118,6 +121,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
this.PipeLineMatId,
|
||||
mainMaterialCode,
|
||||
this.txtMaterialCode.Text.Trim());
|
||||
PipelineMatService.UpdatePipeArea(this.PipeLineMatId, this.drpPipeArea.SelectedValue);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
@@ -77,6 +77,11 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtBatchNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpPipeArea 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList drpPipeArea;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -674,7 +674,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\管道焊口热处理委托单NoPic.frx";
|
||||
initTemplatePath = "File\\Fastreport\\管道焊缝热处理委托_附件5.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
|
||||
@@ -233,11 +233,10 @@
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="50" Value="50" />
|
||||
<f:ListItem Text="100" Value="100" />
|
||||
<f:ListItem Text="200" Value="200" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
OnClick="btnDelete_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click" Hidden="true">
|
||||
MenuID="MenuPrint" ShowMenuIcon="true" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -115,7 +115,7 @@
|
||||
<f:Button ID="btnBack" Text="退回" Icon="ArrowLeft" runat="server" OnClick="btnBack_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="Button1" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
MenuID="MenuPrint" ShowMenuIcon="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -200,6 +200,10 @@
|
||||
<f:MenuButton ID="btnPointAudit" EnablePostBack="true" runat="server" Text="委托" Icon="ArrowNsew" OnClick="btnPointAudit_Click">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="MenuPrint" runat="server">
|
||||
<f:MenuButton ID="btnPrintAttachment4" EnablePostBack="true" runat="server" Text="附件4:管道焊口检测委托单" Icon="Printer" OnClick="btnPrintAttachment4_Click" />
|
||||
<f:MenuButton ID="btnPrintAttachment6" EnablePostBack="true" runat="server" Text="附件6:无损检测委托单" Icon="Printer" OnClick="btnPrintAttachment6_Click" />
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID1 = '<%= Menu1.ClientID %>';
|
||||
|
||||
@@ -598,6 +598,21 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
return;
|
||||
}
|
||||
}
|
||||
protected void btnPrintAttachment4_Click(object sender, EventArgs e)
|
||||
{
|
||||
ViewState["TrustPrintTemplate"] = "附件4";
|
||||
btnPrint_Click(sender, e);
|
||||
}
|
||||
|
||||
protected void btnPrintAttachment6_Click(object sender, EventArgs e)
|
||||
{
|
||||
ViewState["TrustPrintTemplate"] = "附件6";
|
||||
btnPrint_Click(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按所选模板打印检测委托单。附件4为主单,附件6为无损检测附页,两者共用当前委托数据源。
|
||||
/// </summary>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
// string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
@@ -629,6 +644,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
// 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)
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
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
|
||||
where batch.TrustBatchId == trust.TrustBatchId
|
||||
@@ -723,7 +743,9 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
// Session["CH_TrustID"] = reportId;
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx";
|
||||
initTemplatePath = (ViewState["TrustPrintTemplate"] as string) == "附件6"
|
||||
? "File\\Fastreport\\无损检测委托单_附件6.frx"
|
||||
: "File\\Fastreport\\管道焊口检测委托单_附件4.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
|
||||
+67
-38
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
|
||||
|
||||
public partial class TrustBatch {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
|
||||
|
||||
public partial class TrustBatch
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWelderCode 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWelderCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustDateMonth 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTrustDateMonth;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustBatchCode 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtTrustBatchCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustDate 控件。
|
||||
/// </summary>
|
||||
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtTrustDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDetectionTypeCode 控件。
|
||||
/// </summary>
|
||||
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtDetectionTypeCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbNDEUnit 控件。
|
||||
/// </summary>
|
||||
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNDEUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbIsTrust 控件。
|
||||
/// </summary>
|
||||
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbIsTrust;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbIsAudit 控件。
|
||||
/// </summary>
|
||||
@@ -227,7 +229,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbIsAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnBack 控件。
|
||||
/// </summary>
|
||||
@@ -236,7 +238,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBack;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Button1 控件。
|
||||
/// </summary>
|
||||
@@ -245,7 +247,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -254,7 +256,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -263,7 +265,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -272,7 +274,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -281,7 +283,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -290,7 +292,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
@@ -299,7 +301,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -308,7 +310,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnPointAudit 控件。
|
||||
/// </summary>
|
||||
@@ -317,5 +319,32 @@ namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPointAudit;
|
||||
|
||||
/// <summary>
|
||||
/// MenuPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu MenuPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrintAttachment4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPrintAttachment4;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrintAttachment6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnPrintAttachment6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
OnClick="btnDelete_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
MenuID="MenuPrint" ShowMenuIcon="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -182,6 +182,10 @@
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1010px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Menu ID="MenuPrint" runat="server">
|
||||
<f:MenuButton ID="btnPrintAttachment4" EnablePostBack="true" runat="server" Text="附件4:管道焊口检测委托单" Icon="Printer" OnClick="btnPrintAttachment4_Click" />
|
||||
<f:MenuButton ID="btnPrintAttachment6" EnablePostBack="true" runat="server" Text="附件6:无损检测委托单(附页)" Icon="Printer" OnClick="btnPrintAttachment6_Click" />
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function reloadGrid() {
|
||||
|
||||
@@ -449,6 +449,21 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnPrintAttachment4_Click(object sender, EventArgs e)
|
||||
{
|
||||
ViewState["TrustPrintTemplate"] = "附件4";
|
||||
btnPrint_Click(sender, e);
|
||||
}
|
||||
|
||||
protected void btnPrintAttachment6_Click(object sender, EventArgs e)
|
||||
{
|
||||
ViewState["TrustPrintTemplate"] = "附件6";
|
||||
btnPrint_Click(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按所选模板打印返修委托单。两个模板均保留返修页面的当前明细数据源。
|
||||
/// </summary>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt = new DataTable("Table1");
|
||||
@@ -548,7 +563,9 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
// Session["CH_TrustID"] = reportId;
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\管道焊口返修委托单NoPic.frx";
|
||||
initTemplatePath = (ViewState["TrustPrintTemplate"] as string) == "附件6"
|
||||
? "File\\Fastreport\\无损检测委托单_附件6.frx"
|
||||
: "File\\Fastreport\\管道焊口检测委托单_附件4.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
|
||||
@@ -290,5 +290,20 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// MenuPrint 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.Menu MenuPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrintAttachment4 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.MenuButton btnPrintAttachment4;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrintAttachment6 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.MenuButton btnPrintAttachment6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<f:Toolbar ID="Toolbar1" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="lbVersion2" runat="server" Text="预制散件导入时无需编辑组件"></f:Label>
|
||||
<f:Label ID="lbVersion3" runat="server" Text="模板末列材料用途必填:工厂预制或现场安装"></f:Label>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -59,11 +60,11 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="历史记录" IsFluid="true" ForceFit="true"
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="历史记录" IsFluid="true" ForceFit="true"
|
||||
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
|
||||
EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
|
||||
AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false" Height="250"
|
||||
IsDatabasePaging="false" AllowPaging="true" PageSize="300" EnableBigDataRowTip="false" EnableBigData="true">
|
||||
IsDatabasePaging="false" AllowPaging="true" PageSize="300" >
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="编号"
|
||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
List<string> result = new List<string>();
|
||||
bool includeBatch = ckIncludeBatch.Checked;
|
||||
int minColumnCount = includeBatch ? 7 : 5;
|
||||
int minColumnCount = includeBatch ? 8 : 6;
|
||||
|
||||
matList.Clear();
|
||||
if (count < minColumnCount)
|
||||
@@ -159,8 +159,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
string unitworkId = string.Empty;
|
||||
unitworkId = Request.Params["UnitWorkId"];
|
||||
string PipeArea = string.Empty;//管线划分 1工厂预制 2现场施工
|
||||
|
||||
if (pds[i].A != null && !string.IsNullOrEmpty(pds[i].A.ToString()))
|
||||
{
|
||||
string pipelineCode = pds[i].A.ToString();
|
||||
@@ -168,7 +166,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (pipeline.Count() > 0)
|
||||
{
|
||||
item.PipelineId = pipeline.First().PipelineId;
|
||||
PipeArea = pipeline.First().PipeArea;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -182,6 +179,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add((i + 2) + "Line, [管线号] 不能为空</br>");
|
||||
}
|
||||
|
||||
// 材料用途由 Excel 显式填写,不再从所属管线区域推断。
|
||||
object pipeAreaValue = includeBatch ? pds[i].H : pds[i].F;
|
||||
item.PipeArea = GetPipeArea(pipeAreaValue == null ? null : pipeAreaValue.ToString());
|
||||
if (string.IsNullOrEmpty(item.PipeArea))
|
||||
{
|
||||
result.Add("第" + (i + 2).ToString() + "行, [材料用途] 必须填写“工厂预制”或“现场安装”</br>");
|
||||
}
|
||||
|
||||
|
||||
if (pds[i].C != null && !string.IsNullOrEmpty(pds[i].C.ToString()))
|
||||
{
|
||||
@@ -264,7 +269,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add((i + 2) + "Line, [数量] 不能为空</br>");
|
||||
}
|
||||
|
||||
if (PipeArea == "1")
|
||||
if (item.PipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
if (pds[i].B != null && !string.IsNullOrEmpty(pds[i].B.ToString()))
|
||||
{
|
||||
@@ -280,8 +285,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
var model = includeBatch
|
||||
? matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents)
|
||||
: matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode2 == item.MaterialCode2 && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents);
|
||||
? matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents && x.PipeArea == item.PipeArea)
|
||||
: matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode2 == item.MaterialCode2 && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents && x.PipeArea == item.PipeArea);
|
||||
if (model.Count() == 0)
|
||||
{
|
||||
matList.Add(item);
|
||||
@@ -517,6 +522,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
&& x.WeldJointId == item.WeldJointId
|
||||
&& x.PipelineId == item.PipelineId
|
||||
&& x.PrefabricatedComponents == item.PrefabricatedComponents
|
||||
&& x.PipeArea == item.PipeArea
|
||||
&& (string.IsNullOrEmpty(item.MaterialCode) || x.MaterialCode == item.MaterialCode)
|
||||
select x;
|
||||
if (pipeLineMat.Count() == 0 || pipeLineMat == null)
|
||||
@@ -537,5 +543,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
BLL.HJGL_PipelineComponentService.SyncPipelineComponentByMatId(item.PipeLineMatId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将导入模板中的材料用途转换为数据库编码。
|
||||
/// </summary>
|
||||
private static string GetPipeArea(string value)
|
||||
{
|
||||
string text = value == null ? string.Empty : value.Trim();
|
||||
if (string.Equals(text, "工厂预制", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return PipelineService.PipeArea_SHOP;
|
||||
}
|
||||
if (string.Equals(text, "现场安装", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(text, "现场施工", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return PipelineService.PipeArea_FIELD;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbVersion2;
|
||||
|
||||
/// <summary>
|
||||
/// lbVersion3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbVersion3;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -90,7 +90,11 @@
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnStatisticsMat" ToolTip="匹配材料" Icon="TabGo" runat="server" OnClick="btnStatisticsMat_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
<f:Button ID="btnExportPartialComponents" Text="导出部分已焊组件" ToolTip="按当前区域导出所选单位工程的部分已焊组件"
|
||||
Icon="TableGo" runat="server" OnClick="btnExportPartialComponents_Click" EnableAjax="false"
|
||||
DisableControlBeforePostBack="true" EnablePostBack="true">
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -163,7 +167,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="材料匹配"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="PipelineId" AllowSorting="true"
|
||||
EnableColumnLines="true" DataIDField="PipelineId" AllowSorting="true" EnableTextSelection="true"
|
||||
SortField="MatchRate" SortDirection="DESC" EnableCheckBoxSelect="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="150px" ColumnID="UnitWorkName" DataField="UnitWorkName" SortField="UnitWorkName"
|
||||
@@ -189,7 +193,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id,PipelineId,PrefabricatedComponents,WeldJointId" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" FixedRowHeight="true" RowHeight="46"
|
||||
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" FixedRowHeight="true" RowHeight="46" EnableTextSelection="true"
|
||||
SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true" EnableSummary="true" SummaryPosition="Bottom" >
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
@@ -200,6 +204,10 @@
|
||||
FieldType="String" HeaderText="预制组件号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ComponentMatchRateString" DataField="ComponentMatchRateString" SortField="ComponentMatchRate"
|
||||
FieldType="String" HeaderText="组件匹配率" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="WeldJointCode" DataField="WeldJointCode" SortField="WeldJointCode"
|
||||
FieldType="String" HeaderText="焊口号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
@@ -236,9 +244,10 @@
|
||||
FieldType="String" HeaderText="匹配率" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onMaterialDetailDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -262,6 +271,13 @@
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
function onMaterialDetailDataLoad(event) {
|
||||
// 逐级依赖管线和组件合并,避免同名组件跨管线或相同匹配率跨组件合并。
|
||||
this.mergeColumns(['PipelineCode', 'PrefabricatedComponents', 'ComponentMatchRateString'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
@@ -13,6 +15,19 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
private const string TreeCommandBuilding = "建筑工程";
|
||||
private const string TreeCommandInstallation = "安装工程";
|
||||
private const string TreeCommandUnitWork = "单位工程";
|
||||
private const string TreeCommandPipeline = "管线";
|
||||
private const string TreeCommandLoad = "加载";
|
||||
private const string PrefabricationJointAttribute = "预制口";
|
||||
private const string InstallationJointAttribute = "安装口";
|
||||
private const string WeldingRodConsumablesType = "2";
|
||||
private const string WeldingWireConsumablesType = "1";
|
||||
private const string ManualWeldingMode = "手动";
|
||||
private const string CoverMaterialClassFe1 = "Fe-1";
|
||||
private const string CoverMaterialClassFe3 = "Fe-3";
|
||||
|
||||
public string WarehouseId
|
||||
{
|
||||
get
|
||||
@@ -89,29 +104,61 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
if (!IsPostBack)
|
||||
{
|
||||
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
|
||||
PipeArea = Request.Params["PipeArea"];
|
||||
drpWarehouse.DataTextField = "Key";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId);
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse_SelectedIndexChanged(null, null);
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
priorityWeldJoints = new Dictionary<string, HashSet<string>>();
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
this.drpFlowingSection.DataTextField = "Value";
|
||||
this.drpFlowingSection.DataValueField = "Value";
|
||||
this.drpFlowingSection.DataSource = pipeline;
|
||||
this.drpFlowingSection.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpFlowingSection);
|
||||
this.InitTreeMenu();//加载树
|
||||
InitializePage();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化页面状态、筛选项和左侧管线树。
|
||||
/// </summary>
|
||||
private void InitializePage()
|
||||
{
|
||||
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
|
||||
PipeArea = Request.Params["PipeArea"];
|
||||
BindWarehouseOptions();
|
||||
ResetMaterialStockCache();
|
||||
dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
priorityWeldJoints = new Dictionary<string, HashSet<string>>();
|
||||
BindFlowingSectionOptions();
|
||||
InitTreeMenu();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定当前项目可用仓库,并触发仓库切换后的树刷新。
|
||||
/// </summary>
|
||||
private void BindWarehouseOptions()
|
||||
{
|
||||
drpWarehouse.DataTextField = "Key";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId);
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse_SelectedIndexChanged(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清空材料库存缓存,避免首次加载沿用其他入口的区域缓存。
|
||||
/// </summary>
|
||||
private void ResetMaterialStockCache()
|
||||
{
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定当前项目的流水段筛选项。
|
||||
/// </summary>
|
||||
private void BindFlowingSectionOptions()
|
||||
{
|
||||
var flowingSections = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
drpFlowingSection.DataTextField = "Value";
|
||||
drpFlowingSection.DataValueField = "Value";
|
||||
drpFlowingSection.DataSource = flowingSections;
|
||||
drpFlowingSection.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpFlowingSection);
|
||||
}
|
||||
|
||||
#region 加载树装置-单位-工作区
|
||||
|
||||
/// <summary>
|
||||
@@ -121,20 +168,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
|
||||
TreeNode rootNode1 = new TreeNode();
|
||||
rootNode1.NodeID = "1";
|
||||
rootNode1.Text = "建筑工程";
|
||||
rootNode1.CommandName = "建筑工程";
|
||||
rootNode1.Selectable = false;
|
||||
rootNode1.EnableCheckBox = false;
|
||||
TreeNode rootNode1 = CreateRootNode("1", TreeCommandBuilding, false, false);
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
rootNode2.NodeID = "2";
|
||||
rootNode2.Text = "安装工程";
|
||||
rootNode2.CommandName = "安装工程";
|
||||
rootNode2.Expanded = true;
|
||||
rootNode2.EnableCheckBox = false;
|
||||
TreeNode rootNode2 = CreateRootNode("2", TreeCommandInstallation, true, null);
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
|
||||
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
||||
@@ -143,57 +180,54 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
orderby x.UnitWorkCode
|
||||
select x).ToList();
|
||||
|
||||
List<Model.WBS_UnitWork> unitWork1 = null;
|
||||
List<Model.WBS_UnitWork> unitWork2 = null;
|
||||
BindUnitWorkNodes(rootNode1, unitWorkList.Where(x => x.ProjectType == "1"), false);
|
||||
BindUnitWorkNodes(rootNode2, unitWorkList.Where(x => x.ProjectType == "2"), true);
|
||||
}
|
||||
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
/// <summary>
|
||||
/// 创建建筑工程或安装工程根节点。
|
||||
/// </summary>
|
||||
private TreeNode CreateRootNode(string nodeId, string text, bool expanded, bool? selectable)
|
||||
{
|
||||
var rootNode = new TreeNode
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = GetUnitWorkTestPackagePipelineCount(q.UnitWorkId);
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
tn1.EnableCheckBox = false;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
BindTestPackageNodes(tn1);
|
||||
}
|
||||
}
|
||||
NodeID = nodeId,
|
||||
Text = text,
|
||||
CommandName = text,
|
||||
Expanded = expanded,
|
||||
EnableCheckBox = false
|
||||
};
|
||||
if (selectable.HasValue)
|
||||
{
|
||||
rootNode.Selectable = selectable.Value;
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = GetUnitWorkTestPackagePipelineCount(q.UnitWorkId);
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||
{
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
tn2.EnableCheckBox = false;
|
||||
return rootNode;
|
||||
}
|
||||
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
BindTestPackageNodes(tn2);
|
||||
}
|
||||
/// <summary>
|
||||
/// 将单位工程节点绑定到指定工程根节点。
|
||||
/// </summary>
|
||||
private void BindUnitWorkNodes(TreeNode parentNode, IEnumerable<Model.WBS_UnitWork> unitWorks, bool expandSelectedNode)
|
||||
{
|
||||
foreach (var unitWork in unitWorks)
|
||||
{
|
||||
int pipelineCount = GetUnitWorkTestPackagePipelineCount(unitWork.UnitWorkId);
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(unitWork.UnitId);
|
||||
TreeNode unitWorkNode = new TreeNode
|
||||
{
|
||||
NodeID = unitWork.UnitWorkId,
|
||||
Text = unitWork.UnitWorkName + "【" + pipelineCount.ToString() + "】管线",
|
||||
ToolTip = "施工单位:" + unitNamesUnitIds,
|
||||
CommandName = TreeCommandUnitWork,
|
||||
EnableExpandEvent = true,
|
||||
EnableClickEvent = true,
|
||||
EnableCheckBox = false,
|
||||
Expanded = expandSelectedNode && unitWork.UnitWorkId == hdUnitWorkId.Text
|
||||
};
|
||||
parentNode.Nodes.Add(unitWorkNode);
|
||||
if (pipelineCount > 0)
|
||||
{
|
||||
BindTestPackageNodes(unitWorkNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,16 +253,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode;
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.CommandName = "管线";
|
||||
newNode.CommandName = TreeCommandPipeline;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载";
|
||||
newNode.Text = TreeCommandLoad;
|
||||
newNode.NodeID = SQLHelper.GetNewID();
|
||||
newNode.CommandName = "加载";
|
||||
newNode.CommandName = TreeCommandLoad;
|
||||
newNode.Icon = Icon.ArrowDown;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
@@ -288,7 +322,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定试压包下当前仓库、区域和筛选条件内尚未完成出库的管线。
|
||||
/// 获取指定试压包下当前仓库和页面筛选条件内尚未完成出库的管线;材料区域由匹配服务按材料明细过滤。
|
||||
/// </summary>
|
||||
/// <param name="ptpId">试压包ID。</param>
|
||||
/// <returns>符合材料匹配入口条件的管线列表。</returns>
|
||||
@@ -306,7 +340,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
where y == null
|
||||
&& p.PTP_ID == ptpId
|
||||
&& x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& x.WarehouseId == WarehouseId
|
||||
orderby x.PipelineCode
|
||||
@@ -353,7 +386,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "加载")
|
||||
if (e.CommandName == TreeCommandLoad)
|
||||
{
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
@@ -475,7 +508,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
selectList.Add(model.Id);
|
||||
}
|
||||
|
||||
if (IsMaterialCodeConfirmed(model, confirmedPipeLineMatIds))
|
||||
// 匹配率优先级高于历史确认状态,0% 或未满配材料不能再显示为绿色。
|
||||
if (model.MatchRate == null || model.MatchRate < 1)
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
else if (IsMaterialCodeConfirmed(model, confirmedPipeLineMatIds))
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "green";
|
||||
}
|
||||
@@ -483,10 +521,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "priority";
|
||||
}
|
||||
else if (model.MatchRate < 1 || model.MatchRate == null)
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
}
|
||||
}
|
||||
|
||||
Grid1.SelectedRowIDArray = selectList.ToArray();
|
||||
@@ -531,10 +565,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
.Distinct()
|
||||
.ToList();
|
||||
var reportWeldJointIds = Funs.DB.HJGL_WeldJoint
|
||||
.Where(x => weldJointIds.Contains(x.WeldJointId)&& x.WeldingDailyId !=null)
|
||||
.Where(x => weldJointIds.Contains(x.WeldJointId) && x.WeldingDailyId != null && x.WeldingDailyId != "")
|
||||
.Select(x => x.WeldJointId).Distinct().ToList();
|
||||
return matchOutputs
|
||||
.Where(x => string.IsNullOrEmpty(x.WeldJointId) || !taskWeldJointIds.Contains(x.WeldJointId) || reportWeldJointIds.Contains(x.WeldJointId))
|
||||
.Where(x => string.IsNullOrEmpty(x.WeldJointId)
|
||||
|| (!taskWeldJointIds.Contains(x.WeldJointId) && !reportWeldJointIds.Contains(x.WeldJointId)))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -600,7 +635,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e">事件参数。</param>
|
||||
protected void btnMatchHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
Alert.ShowInTop("1、管线绿色为匹配率100%,明细绿色为已反写材料主编码,红色为匹配率小于100%,蓝色为手动优先焊口。<br/>2、一个焊口可能对应多条材料明细,该焊口全部有效明细已反写材料主编码后才允许一键生成任务单。<br/>3、焊口已进行焊前准备,匹配了焊评才能生成任务单", "说明", MessageBoxIcon.Information);
|
||||
Alert.ShowInTop("1、管线绿色为匹配率100%,明细绿色为已反写材料主编码,红色为匹配率小于100%,蓝色为手动优先焊口。<br/>2、库存匹配顺序为手动优先焊口、存在已焊口的续作组件、其他未开工组件。<br/>3、一个焊口可能对应多条材料明细,该焊口全部有效明细已反写材料主编码后才允许一键生成任务单。<br/>4、焊口已进行焊前准备,匹配了焊评才能生成任务单", "说明", MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -625,7 +660,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.CurrUser.LoginProjectId,
|
||||
dicSeclectPipeLine.Keys.ToList(),
|
||||
drpWarehouse.SelectedValue,
|
||||
GetPriorityWeldJointList());
|
||||
GetPriorityWeldJointList(),
|
||||
PipeArea);
|
||||
BindGrid3();
|
||||
BindGrid2(keepSelectedPipelineIds);
|
||||
}
|
||||
@@ -692,7 +728,74 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按树节点获取可加入本次匹配的管线。单位工程节点会展开到其下所有试压包,再套用当前仓库、区域和页面筛选条件。
|
||||
/// 按当前材料区域导出所选单位工程下全部部分已焊接组件。
|
||||
/// </summary>
|
||||
protected void btnExportPartialComponents_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.WBS_UnitWork unitWork = tvControlItem.SelectedNode == null
|
||||
? null
|
||||
: BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNode.NodeID);
|
||||
if (unitWork == null)
|
||||
{
|
||||
ShowNotify("请先选择需要导出的单位工程!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var components = TwArrivalStatisticsService.GetPartialWeldedComponents(
|
||||
this.CurrUser.LoginProjectId,
|
||||
unitWork.UnitWorkId,
|
||||
PipeArea,
|
||||
drpWarehouse.SelectedValue);
|
||||
if (!components.Any())
|
||||
{
|
||||
ShowNotify("当前单位工程和区域下没有部分已焊接组件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var exportData = components.Select(x => new
|
||||
{
|
||||
单位工程 = x.UnitWorkName,
|
||||
区域 = x.PipeAreaText,
|
||||
管线号 = x.PipelineCode,
|
||||
预制组件号 = x.PrefabricatedComponents,
|
||||
总焊口数 = x.TotalWeldJointCount,
|
||||
已焊口数 = x.WeldedWeldJointCount,
|
||||
未焊口数 = x.UnweldedWeldJointCount,
|
||||
组件匹配率 = x.ComponentMatchRateString
|
||||
}).ToList();
|
||||
|
||||
string areaText = PipeArea == PipelineService.PipeArea_SHOP ? "工厂预制" : "现场安装";
|
||||
string fileName = GetSafeFileName(unitWork.UnitWorkName) + "_" + areaText + "_部分已焊组件_" + DateTime.Now.ToString("yyyyMMdd") + ".xlsx";
|
||||
string tempDirectory = Path.Combine(Funs.RootPath, @"File\Excel\Temp");
|
||||
Directory.CreateDirectory(tempDirectory);
|
||||
string filePath = Path.Combine(tempDirectory, Guid.NewGuid().ToString("N") + ".xlsx");
|
||||
|
||||
MiniExcel.SaveAs(filePath, exportData);
|
||||
FileInfo fileInfo = new FileInfo(filePath);
|
||||
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
|
||||
response.Clear();
|
||||
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
response.AddHeader("Content-Length", fileInfo.Length.ToString());
|
||||
// 先读取到响应缓冲区再删除临时文件,避免 TransmitFile 异步发送期间文件仍被占用。
|
||||
response.BinaryWrite(File.ReadAllBytes(filePath));
|
||||
File.Delete(filePath);
|
||||
response.Flush();
|
||||
System.Web.HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||
}
|
||||
|
||||
private static string GetSafeFileName(string fileName)
|
||||
{
|
||||
string safeFileName = string.IsNullOrEmpty(fileName) ? "单位工程" : fileName;
|
||||
foreach (char invalidChar in Path.GetInvalidFileNameChars())
|
||||
{
|
||||
safeFileName = safeFileName.Replace(invalidChar, '_');
|
||||
}
|
||||
return safeFileName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按树节点获取可加入本次匹配的管线。单位工程节点会展开到其下所有试压包,再套用当前仓库和页面筛选条件。
|
||||
/// </summary>
|
||||
/// <param name="node">左侧树节点。</param>
|
||||
/// <returns>符合材料匹配入口条件的管线列表。</returns>
|
||||
@@ -703,13 +806,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return new List<Model.HJGL_Pipeline>();
|
||||
}
|
||||
|
||||
if (node.CommandName == "管线")
|
||||
if (node.CommandName == TreeCommandPipeline)
|
||||
{
|
||||
var pipeline = PipelineService.GetPipelineByPipelineId(node.NodeID);
|
||||
return pipeline == null ? new List<Model.HJGL_Pipeline>() : new List<Model.HJGL_Pipeline> { pipeline };
|
||||
}
|
||||
|
||||
if (node.CommandName == "单位工程")
|
||||
if (node.CommandName == TreeCommandUnitWork)
|
||||
{
|
||||
var testPackageIds = (from x in Funs.DB.PTP_TestPackage
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
@@ -743,7 +846,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var selectNodes = tvControlItem.GetCheckedNodes();
|
||||
foreach (var node in selectNodes)
|
||||
{
|
||||
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == "管线")
|
||||
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == TreeCommandPipeline)
|
||||
{
|
||||
dicSeclectPipeLine.Add(node.NodeID, node.Text);
|
||||
addCount++;
|
||||
@@ -978,19 +1081,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ShowNotify("选中管线中没有已反写材料主编码的可生成任务单焊口!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
|
||||
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
|
||||
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == WeldingRodConsumablesType select x;
|
||||
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == WeldingWireConsumablesType select x;
|
||||
var selectedWeldJointIdList = selectedWeldJointIds.ToList();
|
||||
var selectRowId = GetTaskableWeldJointRows(selectedWeldJointIdList);
|
||||
|
||||
Dictionary<string, string> unitworkTaskCode = new Dictionary<string, string>();
|
||||
Dictionary<string, string> unitworkSerialNumber = new Dictionary<string, string>();
|
||||
Dictionary<int, string> matchPipeline = new Dictionary<int, string>();
|
||||
// 生成任务单仍保留管线在匹配结果中的排序,用于任务单列表按管线顺序展示。
|
||||
for (int rowIndex = 0; rowIndex < Grid2.Rows.Count; rowIndex++)
|
||||
{
|
||||
matchPipeline.Add(rowIndex + 1, Grid2.Rows[rowIndex].RowID);
|
||||
}
|
||||
Dictionary<int, string> matchPipeline = GetMatchPipelineOrder();
|
||||
if (!selectRowId.Any())
|
||||
{
|
||||
ShowNotify("未找到可生成任务单的焊口!", MessageBoxIcon.Warning);
|
||||
@@ -998,8 +1096,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
foreach (var weldjoint in selectRowId)
|
||||
{
|
||||
string canWeldingRodName = string.Empty;
|
||||
string canWeldingWireName = string.Empty;
|
||||
Model.HJGL_WeldTask NewTask = new Model.HJGL_WeldTask();
|
||||
NewTask.ProjectId = this.CurrUser.LoginProjectId;
|
||||
NewTask.UnitWorkId = PipelineService.GetPipelineByPipelineId(weldjoint.PipelineId)?.UnitWorkId;
|
||||
@@ -1038,59 +1134,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
|
||||
NewTask.WeldingRod = weldJoint.WeldingRod;
|
||||
NewTask.WeldingWire = weldJoint.WeldingWire;
|
||||
//获取可替代焊丝焊条
|
||||
var mat = BLL.Base_MaterialService.GetMaterialByMaterialId(weldJoint.Material1Id);
|
||||
string matClass = mat.MaterialClass;
|
||||
var matRod = weldingRods.FirstOrDefault(x => x.ConsumablesId == weldJoint.WeldingRod);
|
||||
if (matRod != null)
|
||||
{
|
||||
foreach (var item in weldingRods)
|
||||
{
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
if (IsCoverClass(matRod.SteelType, item.SteelType))
|
||||
{
|
||||
canWeldingRodName = canWeldingRodName + item.ConsumablesName + ",";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (matRod.SteelType == item.SteelType)
|
||||
{
|
||||
canWeldingRodName = canWeldingRodName + item.ConsumablesName + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(canWeldingRodName))
|
||||
{
|
||||
NewTask.CanWeldingRodName = canWeldingRodName.Substring(0, canWeldingRodName.Length - 1);
|
||||
}
|
||||
}
|
||||
var matWire = weldingWires.FirstOrDefault(x => x.ConsumablesId == weldJoint.WeldingWire);
|
||||
if (matWire != null)
|
||||
{
|
||||
foreach (var item in weldingWires)
|
||||
{
|
||||
if (matClass == "Fe-1" || matClass == "Fe-3")
|
||||
{
|
||||
if (IsCoverClass(matWire.SteelType, item.SteelType))
|
||||
{
|
||||
canWeldingWireName = canWeldingWireName + item.ConsumablesName + ",";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (matWire.SteelType == item.SteelType)
|
||||
{
|
||||
canWeldingWireName = canWeldingWireName + item.ConsumablesName + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(canWeldingWireName))
|
||||
{
|
||||
NewTask.CanWeldingWireName = canWeldingWireName.Substring(0, canWeldingWireName.Length - 1);
|
||||
}
|
||||
}
|
||||
PopulateAlternativeConsumables(NewTask, weldJoint, weldingRods, weldingWires);
|
||||
}
|
||||
NewTask.JointAttribute = weldJoint.JointAttribute;
|
||||
|
||||
@@ -1098,7 +1142,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
NewTask.Tabler = this.CurrUser.PersonId;
|
||||
NewTask.TableDate = DateTime.Now;
|
||||
|
||||
weldJoint.WeldingMode = "手动";
|
||||
weldJoint.WeldingMode = ManualWeldingMode;
|
||||
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||
}
|
||||
@@ -1106,6 +1150,61 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前管线汇总表中的显示顺序,供任务单保存管线排序使用。
|
||||
/// </summary>
|
||||
private Dictionary<int, string> GetMatchPipelineOrder()
|
||||
{
|
||||
var matchPipeline = new Dictionary<int, string>();
|
||||
for (int rowIndex = 0; rowIndex < Grid2.Rows.Count; rowIndex++)
|
||||
{
|
||||
matchPipeline.Add(rowIndex + 1, Grid2.Rows[rowIndex].RowID);
|
||||
}
|
||||
return matchPipeline;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据母材类别计算任务单可替代的焊条和焊丝。
|
||||
/// </summary>
|
||||
private void PopulateAlternativeConsumables(
|
||||
Model.HJGL_WeldTask task,
|
||||
Model.HJGL_WeldJoint weldJoint,
|
||||
IEnumerable<Model.Base_Consumables> weldingRods,
|
||||
IEnumerable<Model.Base_Consumables> weldingWires)
|
||||
{
|
||||
// 获取可替代焊材时沿用原有母材类别和焊材钢号判断规则。
|
||||
var material = BLL.Base_MaterialService.GetMaterialByMaterialId(weldJoint.Material1Id);
|
||||
string materialClass = material.MaterialClass;
|
||||
var selectedRod = weldingRods.FirstOrDefault(x => x.ConsumablesId == weldJoint.WeldingRod);
|
||||
var selectedWire = weldingWires.FirstOrDefault(x => x.ConsumablesId == weldJoint.WeldingWire);
|
||||
|
||||
task.CanWeldingRodName = GetAlternativeConsumableNames(materialClass, selectedRod, weldingRods);
|
||||
task.CanWeldingWireName = GetAlternativeConsumableNames(materialClass, selectedWire, weldingWires);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回与当前焊材钢号兼容的候选名称,保持原有逗号分隔格式。
|
||||
/// </summary>
|
||||
private string GetAlternativeConsumableNames(
|
||||
string materialClass,
|
||||
Model.Base_Consumables selectedConsumable,
|
||||
IEnumerable<Model.Base_Consumables> candidateConsumables)
|
||||
{
|
||||
if (selectedConsumable == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
bool useCoverClass = materialClass == CoverMaterialClassFe1 || materialClass == CoverMaterialClassFe3;
|
||||
var names = candidateConsumables
|
||||
.Where(item => useCoverClass
|
||||
? IsCoverClass(selectedConsumable.SteelType, item.SteelType)
|
||||
: selectedConsumable.SteelType == item.SteelType)
|
||||
.Select(item => item.ConsumablesName)
|
||||
.ToList();
|
||||
return names.Any() ? string.Join(",", names) : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按任务单实际生成规则过滤可生成任务单的焊口视图数据。
|
||||
/// </summary>
|
||||
@@ -1128,10 +1227,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
&& x.WeldTaskId == null
|
||||
&& x.WeldingMethodCode != null
|
||||
select x).ToList();
|
||||
if (PipeArea == "1")
|
||||
if (PipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
// 工厂预制材料匹配只允许预制口生成任务单,现场安装页面不套用该限制。
|
||||
taskableRows = taskableRows.Where(x => x.JointAttribute == "预制口").ToList();
|
||||
taskableRows = taskableRows.Where(x => x.JointAttribute == PrefabricationJointAttribute).ToList();
|
||||
}
|
||||
else if (PipeArea == PipelineService.PipeArea_FIELD)
|
||||
{
|
||||
taskableRows = taskableRows.Where(x => x.JointAttribute == InstallationJointAttribute).ToList();
|
||||
}
|
||||
|
||||
return taskableRows;
|
||||
@@ -1193,26 +1295,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <returns>能覆盖返回 true,否则返回 false。</returns>
|
||||
private bool IsCoverClass(string wpsClass, string matClass)
|
||||
{
|
||||
bool isCover = false;
|
||||
int wpsSn = 0;
|
||||
int matSn = 0;
|
||||
if (wpsClass.Length > 2 && matClass.Length > 2)
|
||||
if (wpsClass.Length <= 2 || matClass.Length <= 2)
|
||||
{
|
||||
string wpsPre = wpsClass.Substring(0, wpsClass.Length - 2);
|
||||
string matPre = matClass.Substring(0, matClass.Length - 2);
|
||||
|
||||
string wps = wpsClass.Substring(wpsClass.Length - 1, 1);
|
||||
wpsSn = Funs.GetNewInt(wps).HasValue ? Funs.GetNewInt(wps).Value : 0;
|
||||
|
||||
string mat = matClass.Substring(matClass.Length - 1, 1);
|
||||
matSn = Funs.GetNewInt(mat).HasValue ? Funs.GetNewInt(mat).Value : 0;
|
||||
|
||||
if (wpsPre == matPre && matSn >= wpsSn)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return isCover;
|
||||
|
||||
string wpsPre = wpsClass.Substring(0, wpsClass.Length - 2);
|
||||
string matPre = matClass.Substring(0, matClass.Length - 2);
|
||||
int wpsSn = Funs.GetNewInt(wpsClass.Substring(wpsClass.Length - 1, 1)) ?? 0;
|
||||
int matSn = Funs.GetNewInt(matClass.Substring(matClass.Length - 1, 1)) ?? 0;
|
||||
return wpsPre == matPre && matSn >= wpsSn;
|
||||
}
|
||||
|
||||
#endregion 按钮事件
|
||||
|
||||
@@ -140,6 +140,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnStatisticsMat;
|
||||
|
||||
/// <summary>
|
||||
/// btnExportPartialComponents 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnExportPartialComponents;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
</Items>
|
||||
</f:Panel>--%>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="VBox" BoxConfigAlign="Stretch" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="400px" IconFont="PlusCircle" Title="焊接日报"
|
||||
Layout="VBox" BoxConfigAlign="Stretch" BoxFlex="1" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" IconFont="PlusCircle" Title="焊接日报"
|
||||
TitleToolTip="焊接日报" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="焊接日报" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="WeldJointId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
runat="server" BoxFlex="2" DataKeyNames="WeldJointId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId"
|
||||
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
|
||||
@@ -264,38 +264,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void BindPendingGrid()
|
||||
{
|
||||
string strSql = @"SELECT temp.TempDetailId,
|
||||
temp.WeldJointId,
|
||||
temp.WeldingDate,
|
||||
jot.PipelineCode,
|
||||
jot.WeldJointCode,
|
||||
coverWelder.WelderCode AS CoverWelderCode,
|
||||
backingWelder.WelderCode AS BackingWelderCode,
|
||||
temp.JointAttribute,
|
||||
location.WeldingLocationCode,
|
||||
jot.Size,
|
||||
jot.Dia,
|
||||
jot.Thickness,
|
||||
jot.WeldingMethodCode,
|
||||
submitPerson.PersonName AS SubmitPersonName,
|
||||
temp.SubmitDate,
|
||||
beforeAtt.AttachUrl AS BeforePhotoUrl,
|
||||
afterAtt.AttachUrl AS AfterPhotoUrl
|
||||
FROM dbo.HJGL_WeldingDailyTempDetail AS temp
|
||||
LEFT JOIN dbo.View_HJGL_WeldJoint AS jot ON jot.WeldJointId = temp.WeldJointId
|
||||
LEFT JOIN dbo.SitePerson_Person AS coverWelder ON coverWelder.PersonId = temp.CoverWelderId
|
||||
LEFT JOIN dbo.SitePerson_Person AS backingWelder ON backingWelder.PersonId = temp.BackingWelderId
|
||||
LEFT JOIN dbo.Base_WeldingLocation AS location ON location.WeldingLocationId = temp.WeldingLocationId
|
||||
LEFT JOIN dbo.Person_Persons AS submitPerson ON submitPerson.PersonId = temp.SubmitPersonId
|
||||
LEFT JOIN dbo.AttachFile AS beforeAtt ON beforeAtt.MenuId = @WeldReportMenuId
|
||||
AND beforeAtt.ToKeyId = temp.TempDetailId + '#Before'
|
||||
LEFT JOIN dbo.AttachFile AS afterAtt ON afterAtt.MenuId = @WeldReportMenuId
|
||||
AND afterAtt.ToKeyId = temp.TempDetailId + '#After'
|
||||
WHERE temp.ProjectId = @ProjectId AND temp.AuditState = 0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@WeldReportMenuId", Const.HJGL_WeldReportMenuId));
|
||||
|
||||
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
if (unitWork == null)
|
||||
{
|
||||
@@ -305,31 +273,30 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(daily.UnitWorkId);
|
||||
}
|
||||
}
|
||||
if (unitWork != null)
|
||||
{
|
||||
strSql += " AND temp.UnitWorkId = @UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", unitWork.UnitWorkId));
|
||||
}
|
||||
|
||||
DateTime? weldingDate = null;
|
||||
if (!string.IsNullOrEmpty(txtPendingWeldingDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND temp.WeldingDate >= @WeldingDate AND temp.WeldingDate < @WeldingDateEnd";
|
||||
DateTime weldingDate = Convert.ToDateTime(txtPendingWeldingDate.Text.Trim()).Date;
|
||||
listStr.Add(new SqlParameter("@WeldingDate", weldingDate));
|
||||
listStr.Add(new SqlParameter("@WeldingDateEnd", weldingDate.AddDays(1)));
|
||||
DateTime parsedDate;
|
||||
if (!DateTime.TryParse(txtPendingWeldingDate.Text.Trim(), out parsedDate))
|
||||
{
|
||||
GridPending.RecordCount = 0;
|
||||
GridPending.DataSource = null;
|
||||
GridPending.DataBind();
|
||||
Alert.ShowInTop("焊接日期格式不正确!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
weldingDate = parsedDate.Date;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtPendingPipelineCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND jot.PipelineCode LIKE @PendingPipelineCode";
|
||||
listStr.Add(new SqlParameter("@PendingPipelineCode", "%" + txtPendingPipelineCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtPendingWelderCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND (coverWelder.WelderCode LIKE @PendingWelderCode OR backingWelder.WelderCode LIKE @PendingWelderCode)";
|
||||
listStr.Add(new SqlParameter("@PendingWelderCode", "%" + txtPendingWelderCode.Text.Trim() + "%"));
|
||||
}
|
||||
strSql += " ORDER BY jot.PipelineCode, jot.WeldJointCode";
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, listStr.ToArray());
|
||||
// 待审核列表与接口共用同一套查询和字段映射,避免PC端SQL与接口逐渐分叉。
|
||||
var pendingItems = BLL.WeldingDailyService.GetWeldingDailyTempDetailList(
|
||||
this.CurrUser.LoginProjectId,
|
||||
unitWork == null ? null : unitWork.UnitWorkId,
|
||||
weldingDate,
|
||||
txtPendingPipelineCode.Text.Trim(),
|
||||
txtPendingWelderCode.Text.Trim());
|
||||
DataTable tb = this.LINQToDataTable(pendingItems);
|
||||
GridPending.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(GridPending.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(GridPending, tb);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="false" AutoLeafIdentification="true"
|
||||
EnableTextSelection="true" OnNodeExpand="tvControlItem_TreeNodeExpanded" EnableCheckBox="true" OnlyLeafCheck="true">
|
||||
EnableTextSelection="true" OnNodeExpand="tvControlItem_TreeNodeExpanded" OnNodeCheck="tvControlItem_NodeCheck" EnableCheckBox="true" OnlyLeafCheck="false">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
public partial class WeldingConDate : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
public List<string> GridWeldJointIdList { get; set; }
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
@@ -27,7 +27,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.drpPipeArea.DataSource = BLL.PipelineService.GetPipeArea();
|
||||
this.drpPipeArea.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpPipeArea);
|
||||
this.InitTreeMenu();
|
||||
this.InitTreeMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
rootNode1.Text = "建筑工程";
|
||||
rootNode1.CommandName = "建筑工程";
|
||||
rootNode1.Selectable = false;
|
||||
rootNode1.EnableCheckBox = false;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
@@ -51,6 +52,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
rootNode2.Text = "安装工程";
|
||||
rootNode2.CommandName = "安装工程";
|
||||
rootNode2.Expanded = true;
|
||||
rootNode2.EnableCheckBox = false;
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
|
||||
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
@@ -121,7 +123,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableExpandEvent = true;
|
||||
tn1.EnableClickEvent = true;
|
||||
tn1.EnableCheckBox = false;
|
||||
// 单位工程复选框表示“当前筛选条件下的全部管线”,不能只依赖已加载的分页节点。
|
||||
tn1.EnableCheckBox = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -183,7 +186,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
tn2.EnableCheckBox = false;
|
||||
// 单位工程复选框表示“当前筛选条件下的全部管线”,不能只依赖已加载的分页节点。
|
||||
tn2.EnableCheckBox = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -206,6 +210,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程节点允许勾选;不展开分页子节点,批量自动录入时会按当前筛选条件重新查询全部管线。
|
||||
/// </summary>
|
||||
protected void tvControlItem_NodeCheck(object sender, TreeCheckEventArgs e)
|
||||
{
|
||||
// FineUI 会处理父子节点的视觉状态,这里不强制勾选未加载的子节点,避免分页节点遗漏。
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize, this.drpPipeArea.SelectedValue);
|
||||
@@ -261,12 +273,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
#region 数据绑定
|
||||
private void BindGrid()
|
||||
{
|
||||
{
|
||||
GridWeldJointIdList = new List<string>();
|
||||
if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
string strSql = @"SELECT WeldJointId,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
IsWelding,IsHotProessStr,Material1Code,Material2Code,WeldTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,DNDia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark,CAST(WeldJointCode as int) as WeldJointCodeInt
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark,TRY_CAST(WeldJointCode AS INT) AS WeldJointCodeInt
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
|
||||
@@ -309,7 +327,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
GridWeldJointIdList = dt.AsEnumerable().Select(row => row.Field<string>("WeldJointId")).ToList();
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = dt.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, dt);
|
||||
@@ -412,58 +430,19 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
|
||||
// BindGrid() 上一次请求中的赋值不会保留到本次回发,按钮处理前重新查询当前筛选结果。
|
||||
BindGrid();
|
||||
if (GridWeldJointIdList.Any())
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
{
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
newJot.WPQId = null;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = null;
|
||||
newJot.WeldingWire = null;
|
||||
newJot.WeldingMethodId = null;
|
||||
newJot.GrooveTypeId = null;
|
||||
newJot.PreTemperature = null;
|
||||
newJot.IsHotProess = null;
|
||||
newJot.MatchableWPQ = null;
|
||||
}
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
AutoInputWeldJoints(GridWeldJointIdList);
|
||||
BindGrid();
|
||||
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前筛选条件下没有可自动录入的焊口!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
protected void btnAutoInput2_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -473,64 +452,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return;
|
||||
}
|
||||
TreeNode[] nodes = tvControlItem.GetCheckedNodes();
|
||||
if (nodes.Length > 0)
|
||||
var pipelineIds = new List<string>();
|
||||
foreach (TreeNode node in nodes)
|
||||
{
|
||||
foreach (TreeNode node in nodes)
|
||||
if (node.CommandName == "管线")
|
||||
{
|
||||
if (!string.IsNullOrEmpty(node.NodeID))
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == node.NodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
{
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
newJot.WPQId = null;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = null;
|
||||
newJot.WeldingWire = null;
|
||||
newJot.WeldingMethodId = null;
|
||||
newJot.GrooveTypeId = null;
|
||||
newJot.PreTemperature = null;
|
||||
newJot.IsHotProess = null;
|
||||
newJot.MatchableWPQ = null;
|
||||
}
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(node.NodeID)) pipelineIds.Add(node.NodeID);
|
||||
}
|
||||
// BindGrid();
|
||||
else if (node.CommandName != null && node.CommandName.Split('|').Length == 2)
|
||||
{
|
||||
// 单位工程节点覆盖全部分页数据,不能只取树上当前已经展开的叶子节点。
|
||||
pipelineIds.AddRange(GetPipelineIdsByUnitWork(node.NodeID));
|
||||
}
|
||||
}
|
||||
pipelineIds = pipelineIds.Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList();
|
||||
if (pipelineIds.Count > 0)
|
||||
{
|
||||
AutoInputWeldJoints(GetAutoInputWeldJoints(pipelineIds));
|
||||
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
@@ -539,6 +477,69 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按当前树筛选条件查询单位工程下的全部管线,覆盖分页和未展开节点。
|
||||
/// </summary>
|
||||
private List<string> GetPipelineIdsByUnitWork(string unitWorkId)
|
||||
{
|
||||
var query = Funs.DB.HJGL_Pipeline.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == unitWorkId);
|
||||
if (this.drpPipeArea.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
query = query.Where(x => x.PipeArea == this.drpPipeArea.SelectedValue);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
{
|
||||
query = query.Where(x => x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()));
|
||||
}
|
||||
if (ckNOEdit.Checked)
|
||||
{
|
||||
query = query.Where(p => Funs.DB.HJGL_WeldJoint.Any(w => w.PipelineId == p.PipelineId && w.IsTwoJoint == null && w.WPQId == null));
|
||||
}
|
||||
return query.Select(x => x.PipelineId).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// “全部”表示不增加焊口属性条件;预制口和安装口仍按选择值精确筛选。
|
||||
/// </summary>
|
||||
private List<string> GetAutoInputWeldJoints(IEnumerable<string> pipelineIds)
|
||||
{
|
||||
var ids = pipelineIds.Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList();
|
||||
var query = Funs.DB.HJGL_WeldJoint.Where(x => ids.Contains(x.PipelineId));
|
||||
if (!string.IsNullOrEmpty(drpJointAttribute.SelectedValue))
|
||||
{
|
||||
query = query.Where(x => x.JointAttribute == drpJointAttribute.SelectedValue);
|
||||
}
|
||||
return query.Select(x=>x.WeldJointId).ToList();
|
||||
}
|
||||
|
||||
private void AutoInputWeldJoints(List<string> weldJoints)
|
||||
{
|
||||
foreach (var weldJointId in weldJoints)
|
||||
{
|
||||
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(WeldJointService.GetWeldJointByWeldJointId(weldJointId), this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint { WeldJointId = weldJointId };
|
||||
if (wpqList != null && wpqList.Count > 0)
|
||||
{
|
||||
// 优先匹配 GTAW+SMAW 的焊评,保持原有业务优先级。
|
||||
var match = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1") ?? wpqList.First();
|
||||
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(match.WPQId);
|
||||
if (wps != null)
|
||||
{
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
}
|
||||
}
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_WeldJointMenuId, BLL.Const.BtnModify))
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
using System;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public class WeldingDailyTempDetailItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 待审核明细ID。
|
||||
/// </summary>
|
||||
public string TempDetailId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID。
|
||||
/// </summary>
|
||||
public string ProjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位ID。
|
||||
/// </summary>
|
||||
public string UnitId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程ID。
|
||||
/// </summary>
|
||||
public string UnitWorkId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊口ID。
|
||||
/// </summary>
|
||||
public string WeldJointId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管线ID。
|
||||
/// </summary>
|
||||
public string PipelineId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管线编号。
|
||||
/// </summary>
|
||||
public string PipelineCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊口编号。
|
||||
/// </summary>
|
||||
public string WeldJointCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日期。
|
||||
/// </summary>
|
||||
public DateTime WeldingDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 盖面焊工ID。
|
||||
/// </summary>
|
||||
public string CoverWelderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 盖面焊工编号。
|
||||
/// </summary>
|
||||
public string CoverWelderCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打底焊工ID。
|
||||
/// </summary>
|
||||
public string BackingWelderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打底焊工编号。
|
||||
/// </summary>
|
||||
public string BackingWelderCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊口属性。
|
||||
/// </summary>
|
||||
public string JointAttribute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊接位置ID。
|
||||
/// </summary>
|
||||
public string WeldingLocationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊接位置编号。
|
||||
/// </summary>
|
||||
public string WeldingLocationCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊接模式。
|
||||
/// </summary>
|
||||
public string WeldingMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 材质1编号。
|
||||
/// </summary>
|
||||
public string Material1Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 材质2编号。
|
||||
/// </summary>
|
||||
public string Material2Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公称直径字符串。
|
||||
/// </summary>
|
||||
public string DNDia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊口尺寸。
|
||||
/// </summary>
|
||||
public decimal? Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外径。
|
||||
/// </summary>
|
||||
public decimal? Dia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 壁厚。
|
||||
/// </summary>
|
||||
public decimal? Thickness { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊口类型编号。
|
||||
/// </summary>
|
||||
public string WeldTypeCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊接方法编号。
|
||||
/// </summary>
|
||||
public string WeldingMethodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊丝编号。
|
||||
/// </summary>
|
||||
public string WeldingWireCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊条编号。
|
||||
/// </summary>
|
||||
public string WeldingRodCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提交人ID。
|
||||
/// </summary>
|
||||
public string SubmitPersonId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提交人姓名。
|
||||
/// </summary>
|
||||
public string SubmitPersonName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提交时间。
|
||||
/// </summary>
|
||||
public DateTime SubmitDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊前照片地址。
|
||||
/// </summary>
|
||||
public string BeforePhotoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 焊后照片地址。
|
||||
/// </summary>
|
||||
public string AfterPhotoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 明细附件地址。
|
||||
/// </summary>
|
||||
public string AttachUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核状态:0待审核,1已审核。
|
||||
/// </summary>
|
||||
public int AuditState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核人ID。
|
||||
/// </summary>
|
||||
public string AuditMan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核时间。
|
||||
/// </summary>
|
||||
public DateTime? AuditDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核备注。
|
||||
/// </summary>
|
||||
public string AuditRemark { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日报待审核批量操作参数。
|
||||
/// </summary>
|
||||
public class WeldingDailyTempDetailBatchRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 待审核明细ID集合。
|
||||
/// </summary>
|
||||
public string[] TempDetailIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核人ID,批量删除时无需填写。
|
||||
/// </summary>
|
||||
public string AuditMan { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ namespace Model
|
||||
public decimal? MatchNum { get; set; }
|
||||
public decimal? MatchRate { get; set; }
|
||||
public string MatchRateString { get; set; }
|
||||
public decimal? ComponentMatchRate { get; set; }
|
||||
public string ComponentMatchRateString { get; set; }
|
||||
public int? PipeLineSortIndex { get; set; }
|
||||
|
||||
}
|
||||
@@ -48,4 +50,23 @@ namespace Model
|
||||
public decimal? MatchRate { get; set; }
|
||||
public string MatchRateString { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程下部分已焊接组件的导出汇总。
|
||||
/// </summary>
|
||||
public class Tw_PartialWeldedComponentOutput
|
||||
{
|
||||
public string UnitWorkId { get; set; }
|
||||
public string UnitWorkName { get; set; }
|
||||
public string PipelineId { get; set; }
|
||||
public string PipelineCode { get; set; }
|
||||
public string PrefabricatedComponents { get; set; }
|
||||
public string PipeArea { get; set; }
|
||||
public string PipeAreaText { get; set; }
|
||||
public int TotalWeldJointCount { get; set; }
|
||||
public int WeldedWeldJointCount { get; set; }
|
||||
public int UnweldedWeldJointCount { get; set; }
|
||||
public decimal? ComponentMatchRate { get; set; }
|
||||
public string ComponentMatchRateString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101668,6 +101668,8 @@ namespace Model
|
||||
|
||||
private string _Code;
|
||||
|
||||
private string _DesignInstitute;
|
||||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
private EntitySet<HJGL_PipeLineMat> _HJGL_PipeLineMat;
|
||||
@@ -101698,6 +101700,8 @@ namespace Model
|
||||
partial void OnBatchNoChanged();
|
||||
partial void OnCodeChanging(string value);
|
||||
partial void OnCodeChanged();
|
||||
partial void OnDesignInstituteChanging(string value);
|
||||
partial void OnDesignInstituteChanged();
|
||||
#endregion
|
||||
|
||||
public HJGL_MaterialCodeLib()
|
||||
@@ -101931,6 +101935,26 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignInstitute", DbType="NVarChar(200)")]
|
||||
public string DesignInstitute
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DesignInstitute;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DesignInstitute != value))
|
||||
{
|
||||
this.OnDesignInstituteChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DesignInstitute = value;
|
||||
this.SendPropertyChanged("DesignInstitute");
|
||||
this.OnDesignInstituteChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_MaterialCodeLib_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
|
||||
public Base_Project Base_Project
|
||||
{
|
||||
@@ -106844,6 +106868,8 @@ namespace Model
|
||||
private string _WeldJointId;
|
||||
|
||||
private string _MaterialCode2;
|
||||
|
||||
private string _PipeArea;
|
||||
|
||||
private EntityRef<HJGL_MaterialCodeLib> _HJGL_MaterialCodeLib;
|
||||
|
||||
@@ -106869,6 +106895,8 @@ namespace Model
|
||||
partial void OnWeldJointIdChanged();
|
||||
partial void OnMaterialCode2Changing(string value);
|
||||
partial void OnMaterialCode2Changed();
|
||||
partial void OnPipeAreaChanging(string value);
|
||||
partial void OnPipeAreaChanged();
|
||||
#endregion
|
||||
|
||||
public HJGL_PipeLineMat()
|
||||
@@ -107045,6 +107073,26 @@ namespace Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeArea", DbType="NChar(1)")]
|
||||
public string PipeArea
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PipeArea;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PipeArea != value))
|
||||
{
|
||||
this.OnPipeAreaChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PipeArea = value;
|
||||
this.SendPropertyChanged("PipeArea");
|
||||
this.OnPipeAreaChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_PipeLineMat_HJGL_MaterialCodeLib", Storage="_HJGL_MaterialCodeLib", ThisKey="MaterialCode", OtherKey="MaterialCode", IsForeignKey=true)]
|
||||
public HJGL_MaterialCodeLib HJGL_MaterialCodeLib
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
<Compile Include="APIItem\HJGL\TestPackageApprove.cs" />
|
||||
<Compile Include="APIItem\HJGL\TestPackageItem.cs" />
|
||||
<Compile Include="APIItem\HJGL\WelderPerformanceItem.cs" />
|
||||
<Compile Include="APIItem\HJGL\WeldingDailyTempDetailItem.cs" />
|
||||
<Compile Include="APIItem\HSSEItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\ChartAnalysisItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\CheckSpecialDetailItem.cs" />
|
||||
|
||||
@@ -310,5 +310,145 @@ namespace WebAPI.Controllers
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 焊接日报待审核
|
||||
/// <summary>
|
||||
/// 获取焊接日报待审核列表。
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitWorkId">单位工程ID,可为空</param>
|
||||
/// <param name="weldingDate">焊接日期,可为空,格式如 yyyy-MM-dd</param>
|
||||
/// <param name="pipelineCode">管线编号关键字,可为空</param>
|
||||
/// <param name="welderCode">焊工编号关键字,可为空</param>
|
||||
/// <param name="pageIndex">页码,从1开始;小于等于0时返回全部记录</param>
|
||||
/// <returns>待审核明细列表及总记录数</returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData GetPendingWeldingDailyTempDetailList(string projectId,
|
||||
string unitWorkId = null, string weldingDate = null, string pipelineCode = null,
|
||||
string welderCode = null, int pageIndex = 0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "项目ID不能为空";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
var getDataList = APIWeldReportService.GetPendingWeldingDailyTempDetailList(
|
||||
projectId, unitWorkId, weldingDate, pipelineCode, welderCode);
|
||||
int pageCount = getDataList.Count;
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1))
|
||||
.Take(Funs.PageSize).ToList();
|
||||
}
|
||||
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看单条焊接日报待审核明细。
|
||||
/// </summary>
|
||||
/// <param name="tempDetailId">待审核明细ID</param>
|
||||
/// <returns>待审核明细</returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData GetPendingWeldingDailyTempDetail(string tempDetailId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = APIWeldReportService.GetPendingWeldingDailyTempDetail(tempDetailId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量审核通过焊接日报待审核明细。
|
||||
/// </summary>
|
||||
/// <param name="request">批量审核参数</param>
|
||||
/// <returns>批量处理结果</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData AuditPendingWeldingDailyTempDetails(
|
||||
[FromBody] Model.WeldingDailyTempDetailBatchRequest request)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "参数不能为空";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
string errlog = APIWeldReportService.AuditPendingWeldingDailyTempDetails(
|
||||
request.TempDetailIds, request.AuditMan);
|
||||
if (!string.IsNullOrEmpty(errlog))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = errlog;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除焊接日报待审核明细。
|
||||
/// </summary>
|
||||
/// <param name="request">批量删除参数</param>
|
||||
/// <returns>批量处理结果</returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData DeletePendingWeldingDailyTempDetails(
|
||||
[FromBody] Model.WeldingDailyTempDetailBatchRequest request)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "参数不能为空";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
string errlog = APIWeldReportService.DeletePendingWeldingDailyTempDetails(request.TempDetailIds);
|
||||
if (!string.IsNullOrEmpty(errlog))
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = errlog;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,4 +409,4 @@
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target> -->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user