diff --git a/DataBase/版本日志/SGGLDB_V2026-08-02-lpf.sql b/DataBase/版本日志/SGGLDB_V2026-08-02-lpf.sql
new file mode 100644
index 00000000..12c16c05
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2026-08-02-lpf.sql
@@ -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
+
\ No newline at end of file
diff --git a/SGGL/BLL/API/HJGL/APIWeldReportService.cs b/SGGL/BLL/API/HJGL/APIWeldReportService.cs
new file mode 100644
index 00000000..b5dfc4af
--- /dev/null
+++ b/SGGL/BLL/API/HJGL/APIWeldReportService.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+
+namespace BLL
+{
+ ///
+ /// 焊接日报待审核接口服务适配层。
+ ///
+ public static class APIWeldReportService
+ {
+ ///
+ /// 获取焊接日报待审核列表。
+ ///
+ public static List GetPendingWeldingDailyTempDetailList(
+ string projectId, string unitWorkId, string weldingDate, string pipelineCode, string welderCode)
+ {
+ return WeldingDailyService.GetWeldingDailyTempDetailList(projectId, unitWorkId,
+ ParseWeldingDate(weldingDate), pipelineCode, welderCode);
+ }
+
+ ///
+ /// 查看单条焊接日报待审核明细。
+ ///
+ public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId)
+ {
+ return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
+ }
+
+ ///
+ /// 批量审核通过焊接日报待审核明细。
+ ///
+ public static string AuditPendingWeldingDailyTempDetails(string[] tempDetailIds, string auditMan)
+ {
+ // 审核规则、建日报、组批及状态回写统一由PC端已经使用的公共服务处理。
+ return WeldingDailyService.AuditWeldingDailyTempDetails(tempDetailIds, auditMan);
+ }
+
+ ///
+ /// 批量删除焊接日报待审核明细。
+ ///
+ 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;
+ }
+ }
+}
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 25a9b42c..d06c89e6 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -205,6 +205,7 @@
+
@@ -918,4 +919,4 @@
-->
-
\ No newline at end of file
+
diff --git a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs
index 81697dda..adb8ce8e 100644
--- a/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs
+++ b/SGGL/BLL/CLGL/TwArrivalStatisticsService.cs
@@ -259,28 +259,60 @@ namespace BLL
///
///
///
- public static List GetPipeMatMatch(string projectId, List pipelineIds, string warehouseCode, Dictionary> priorityWeldJoints = null)
+ public static List GetPipeMatMatch(string projectId, List pipelineIds, string warehouseCode, Dictionary> priorityWeldJoints = null, string pipeArea = null)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var results = new List();
+ 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(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();
+
+ var orderedPipelineMaterials = new Dictionary>();
+ 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();
+ var addedMaterialIds = new HashSet();
+
+ // 先处理全部管线的手动优先焊口,保证人工选择始终高于任何自动优先规则。
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;
}
}
+
+ ///
+ /// 获取单位工程下当前区域内同时存在已焊口和未焊口的组件汇总。
+ ///
+ public static List 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();
+ }
+
+ 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);
+ }
///
/// 根据管线材料匹配结果,获取管线匹配率
///
diff --git a/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs b/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs
index 1972854d..1886d8eb 100644
--- a/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs
+++ b/SGGL/BLL/HJGL/BaseInfo/MaterialCodeLibService.cs
@@ -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 @@
///
[ExcelColumnName("类型")]
public string MaterialName { get; set; }
+
+ ///
+ /// 材料编码来源设计院。
+ ///
+ [ExcelColumnName("所属设计院")]
+ public string DesignInstitute { get; set; }
}
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineMatService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineMatService.cs
index 0c00a027..ca07e9bc 100644
--- a/SGGL/BLL/HJGL/WeldingManage/PipelineMatService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/PipelineMatService.cs
@@ -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
}
}
+ ///
+ /// 更新材料用途,1 为工厂预制,2 为现场安装。
+ ///
+ 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();
+ }
+ }
+
///
/// 根据材料匹配结果反写材料主编码
///
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
index b55df11b..eada6c80 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
@@ -295,6 +295,179 @@ namespace BLL
}
#region 焊接日报待审核
+ ///
+ /// 获取焊接日报待审核明细列表。
+ ///
+ /// 项目ID
+ /// 单位工程ID,为空时不按单位工程过滤
+ /// 焊接日期,为空时不按日期过滤
+ /// 管线编号关键字
+ /// 焊工编号关键字
+ /// 待审核明细列表
+ public static List GetWeldingDailyTempDetailList(string projectId,
+ string unitWorkId, DateTime? weldingDate, string pipelineCode, string welderCode)
+ {
+ if (string.IsNullOrEmpty(projectId))
+ {
+ return new List();
+ }
+
+ 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;
+ }
+ }
+
+ ///
+ /// 获取单条焊接日报待审核明细。
+ ///
+ /// 待审核明细ID
+ /// 待审核明细,不存在时返回空
+ 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();
+ }
+ }
+
+ ///
+ /// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。
+ ///
+ private static System.Linq.IQueryable 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
+ };
+ }
+
+ ///
+ /// 按待审核明细ID批量回写焊前、焊后附件地址。
+ ///
+ private static void SetWeldingDailyTempDetailAttachUrls(Model.SGGLDB db,
+ List 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('\\', '/');
+ }
+
///
/// 移动端按焊口保存焊接日报待审核明细
///
@@ -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(),
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/MaterialCodeLib.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/MaterialCodeLib.xlsx
index d03e27fb..e5222ed6 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/MaterialCodeLib.xlsx and b/SGGL/FineUIPro.Web/File/Excel/DataIn/MaterialCodeLib.xlsx differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMat.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMat.xlsx
index f5949321..def3989f 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMat.xlsx and b/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMat.xlsx differ
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMatWithBatch.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMatWithBatch.xlsx
index fe6cc8cd..f8ca3c32 100644
Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMatWithBatch.xlsx and b/SGGL/FineUIPro.Web/File/Excel/DataIn/PipelineMatWithBatch.xlsx differ
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/无损检测委托单_附件6.frx b/SGGL/FineUIPro.Web/File/Fastreport/无损检测委托单_附件6.frx
new file mode 100644
index 00000000..868c0f75
--- /dev/null
+++ b/SGGL/FineUIPro.Web/File/Fastreport/无损检测委托单_附件6.frx
@@ -0,0 +1,344 @@
+
+
+ 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();
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单_附件4.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单_附件4.frx
new file mode 100644
index 00000000..ee74b1e8
--- /dev/null
+++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单_附件4.frx
@@ -0,0 +1,360 @@
+
+
+ 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();
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊缝热处理委托_附件5.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊缝热处理委托_附件5.frx
new file mode 100644
index 00000000..c758bce4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊缝热处理委托_附件5.frx
@@ -0,0 +1,239 @@
+
+
+ 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();
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 2c8589e7..66a80cd3 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -17444,7 +17444,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLib.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLib.aspx
index 4c64fc73..95e5f521 100644
--- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLib.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLib.aspx
@@ -70,6 +70,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx
index 9cbad1bc..085173be 100644
--- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx
@@ -55,13 +55,20 @@
-
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.cs
index 52dda9b8..64e4c0aa 100644
--- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.cs
@@ -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
}
-}
\ No newline at end of file
+}
diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.designer.cs
index 13ad643c..0fc32ebd 100644
--- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibEdit.aspx.designer.cs
@@ -101,6 +101,11 @@ namespace FineUIPro.Web.HJGL.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtMaterialUnit;
+
+ ///
+ /// txtDesignInstitute 控件。
+ ///
+ protected global::FineUIPro.TextBox txtDesignInstitute;
///
/// txtMaterialDef 控件。
diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs
index d9d8796b..8c4eea67 100644
--- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialCodeLibIn.aspx.cs
@@ -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
}
-}
\ No newline at end of file
+}
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
index 38502bbb..e712935e 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
@@ -88,13 +88,7 @@
-
-
-
-
-
-
-
+
@@ -156,6 +150,9 @@
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
TextAlign="Left">
+
+
@@ -218,6 +215,9 @@
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
TextAlign="Left">
+
+
@@ -279,6 +279,9 @@
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
TextAlign="Left">
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs
index ee75bb0e..c0333797 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.cs
@@ -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 listStr = new List();
//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 listStr = new List();
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 listStr = new List();
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
//{
@@ -1006,64 +1012,10 @@ namespace FineUIPro.Web.HJGL.DataImport
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
}
- #region 导入
- ///
- /// 导入按钮
- ///
- ///
- ///
- 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 更新导入
- ///
- /// 更新导入按钮
- ///
- ///
- ///
- 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导入
- ///
- /// 导入按钮
- ///
- ///
- ///
- 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 管线材料导入
///
/// 管线材料导入
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.designer.cs
index 2bf6f2b7..f8071939 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx.designer.cs
@@ -185,33 +185,6 @@ namespace FineUIPro.Web.HJGL.DataImport
///
protected global::FineUIPro.Button btnPrint;
- ///
- /// btnImport 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnImport;
-
- ///
- /// btnUpdateImport 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnUpdateImport;
-
- ///
- /// btnPDMSImport 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnPDMSImport;
-
///
/// btnMatImport 控件。
///
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx
index 57ea73d4..8701edce 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx
@@ -44,6 +44,15 @@
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.cs
index 386787b0..94cc7a3f 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.cs
@@ -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());
}
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.designer.cs
index ea018533..13bc9da0 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformationEdit.aspx.designer.cs
@@ -77,6 +77,11 @@ namespace FineUIPro.Web.HJGL.DataImport
///
protected global::FineUIPro.TextBox txtBatchNo;
+ ///
+ /// drpPipeArea 控件。
+ ///
+ protected global::FineUIPro.DropDownList drpPipeArea;
+
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs
index cc477ae6..cb65760b 100644
--- a/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/HotProcessHard/HotProessTrust.aspx.cs
@@ -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))
{
diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
index 9b77e328..c1ecbeea 100644
--- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
@@ -233,11 +233,10 @@
-
-
-
-
+ OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
+
+
+
diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx
index 6c781a35..b3960430 100644
--- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx
@@ -77,7 +77,7 @@
OnClick="btnDelete_Click">
+ MenuID="MenuPrint" ShowMenuIcon="true" Hidden="true">
@@ -115,7 +115,7 @@
+ MenuID="MenuPrint" ShowMenuIcon="true">
@@ -200,6 +200,10 @@
+