Compare commits
6 Commits
42787c1520
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| ad6ef33ce2 | |||
| a0669475f1 | |||
| 1ce1aa9d7e | |||
| 6dd2c91289 | |||
| fdaf615194 | |||
| d038c516ea |
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
焊接数据分析:管道预制汇总菜单
|
||||
可重复执行,已有菜单时同步修正名称、地址、父级和排序。
|
||||
*/
|
||||
DECLARE @MenuId NVARCHAR(50) = N'9A28D681-0C91-49B8-9A63-DA3FEEA25BC2';
|
||||
DECLARE @SuperMenuId NVARCHAR(50) = N'F3B157B7-9BEE-4150-80CB-087828F1C51D';
|
||||
|
||||
IF NOT EXISTS (SELECT 1 FROM dbo.Sys_Menu WHERE MenuId = @SuperMenuId)
|
||||
BEGIN
|
||||
RAISERROR(N'未找到父菜单“焊接数据分析”,请先执行焊接管理菜单初始化脚本。', 16, 1);
|
||||
RETURN;
|
||||
END;
|
||||
|
||||
IF EXISTS (SELECT 1 FROM dbo.Sys_Menu WHERE MenuId = @MenuId)
|
||||
BEGIN
|
||||
UPDATE dbo.Sys_Menu
|
||||
SET MenuName = N'管道预制汇总',
|
||||
Icon = NULL,
|
||||
Url = N'HJGL/WeldingReport/PipePrefabricationSummary.aspx',
|
||||
SortIndex = 85,
|
||||
SuperMenu = @SuperMenuId,
|
||||
MenuType = N'Menu_HJGL',
|
||||
IsOffice = 0,
|
||||
IsEnd = 1,
|
||||
IsUsed = 1
|
||||
WHERE MenuId = @MenuId;
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu
|
||||
(
|
||||
MenuId,
|
||||
MenuName,
|
||||
Icon,
|
||||
Url,
|
||||
SortIndex,
|
||||
SuperMenu,
|
||||
MenuType,
|
||||
IsOffice,
|
||||
IsEnd,
|
||||
IsUsed
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@MenuId,
|
||||
N'管道预制汇总',
|
||||
NULL,
|
||||
N'HJGL/WeldingReport/PipePrefabricationSummary.aspx',
|
||||
85,
|
||||
@SuperMenuId,
|
||||
N'Menu_HJGL',
|
||||
0,
|
||||
1,
|
||||
1
|
||||
);
|
||||
END;
|
||||
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT 1
|
||||
FROM dbo.Sys_ButtonToMenu
|
||||
WHERE MenuId = @MenuId
|
||||
AND ButtonName = N'查看'
|
||||
)
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_ButtonToMenu
|
||||
(
|
||||
ButtonToMenuId,
|
||||
MenuId,
|
||||
ButtonName,
|
||||
SortIndex
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
N'40D01F4E-D38C-4480-ABF3-5FE45C0E8650',
|
||||
@MenuId,
|
||||
N'查看',
|
||||
1
|
||||
);
|
||||
END;
|
||||
GO
|
||||
@@ -432,6 +432,7 @@
|
||||
<Compile Include="HJGL\LeakVacuum\LeakVacuumAuditService.cs" />
|
||||
<Compile Include="HJGL\LeakVacuum\LeakVacuumEditService.cs" />
|
||||
<Compile Include="HJGL\LeakVacuum\LV_ItemEndCheckService.cs" />
|
||||
<Compile Include="HJGL\NDT\Batch_NDEImportService.cs" />
|
||||
<Compile Include="HJGL\NDT\Batch_NDEItemService.cs" />
|
||||
<Compile Include="HJGL\NDT\Batch_NDEService.cs" />
|
||||
<Compile Include="HJGL\PersonManage\CheckerService.cs" />
|
||||
@@ -460,6 +461,7 @@
|
||||
<Compile Include="HJGL\TestPackage\TestPackagePrintService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\HJGL_ComponentJointService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\HJGL_WeldingReportService.cs" />
|
||||
<Compile Include="HJGL\WeldingReport\PipePrefabricationSummaryService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineComponentService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineMatService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineService.cs" />
|
||||
|
||||
@@ -3553,6 +3553,17 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string NDTBatchTemplateUrl = "File\\Excel\\DataIn\\管道焊口检测结果通知单导入模板.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 检测结果批量导入空白模板
|
||||
/// </summary>
|
||||
public const string NDTBatchUnitImportTemplateUrl = "File\\Excel\\DataIn\\检测结果导入模板.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 管道焊接接头报检/检查记录打印模板
|
||||
/// </summary>
|
||||
public const string WeldAppearanceCheckReportTemplateUrl =
|
||||
"File\\Fastreport\\管道焊接接头报检\\检查记录.frx";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 初始化上传路径
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位工程级检测结果导入行
|
||||
/// </summary>
|
||||
public class UnitWorkNDEImportItem
|
||||
{
|
||||
public int RowNumber { get; set; }
|
||||
|
||||
public string TrustBatchId { get; set; }
|
||||
|
||||
public string TrustBatchCode { get; set; }
|
||||
|
||||
public string TrustBatchItemId { get; set; }
|
||||
|
||||
public string PipelineCode { get; set; }
|
||||
|
||||
public string WeldJointCode { get; set; }
|
||||
|
||||
public string WelderCode { get; set; }
|
||||
|
||||
public int TotalFilm { get; set; }
|
||||
|
||||
public int PassFilm { get; set; }
|
||||
|
||||
public string CheckResult { get; set; }
|
||||
|
||||
public string CheckResultText { get; set; }
|
||||
|
||||
public string JudgeGrade { get; set; }
|
||||
|
||||
public string CheckDefects { get; set; }
|
||||
|
||||
public string CheckDefectsText { get; set; }
|
||||
|
||||
public string RepairLocation { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public DateTime? FilmDate { get; set; }
|
||||
|
||||
public DateTime? ReportDate { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程级检测结果批量导入
|
||||
/// </summary>
|
||||
public static class Batch_NDEImportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 一次性保存检测单主表、明细和委托检测状态
|
||||
/// </summary>
|
||||
public static void Import(string projectId, string unitWorkId, string personId, IList<UnitWorkNDEImportItem> importItems)
|
||||
{
|
||||
if (importItems == null || importItems.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("没有可导入的数据!");
|
||||
}
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
bool isValidUnitWork = db.WBS_UnitWork.Any(x => x.UnitWorkId == unitWorkId
|
||||
&& x.ProjectId == projectId
|
||||
&& x.SuperUnitWork == null);
|
||||
if (!isValidUnitWork)
|
||||
{
|
||||
throw new InvalidOperationException("单位工程不存在或不属于当前项目!");
|
||||
}
|
||||
|
||||
List<string> trustBatchIds = importItems.Select(x => x.TrustBatchId).Distinct().ToList();
|
||||
List<string> trustBatchItemIds = importItems.Select(x => x.TrustBatchItemId).Distinct().ToList();
|
||||
|
||||
List<Model.HJGL_Batch_BatchTrust> trusts = db.HJGL_Batch_BatchTrust
|
||||
.Where(x => trustBatchIds.Contains(x.TrustBatchId)
|
||||
&& x.ProjectId == projectId
|
||||
&& x.UnitWorkId == unitWorkId)
|
||||
.ToList();
|
||||
if (trusts.Count != trustBatchIds.Count)
|
||||
{
|
||||
throw new InvalidOperationException("导入数据包含不属于当前单位工程的委托单,请重新审核文件!");
|
||||
}
|
||||
|
||||
if (trustBatchItemIds.Count != importItems.Count)
|
||||
{
|
||||
throw new InvalidOperationException("导入数据包含重复的委托明细,请重新审核文件!");
|
||||
}
|
||||
|
||||
List<Model.HJGL_Batch_BatchTrustItem> trustItems = db.HJGL_Batch_BatchTrustItem
|
||||
.Where(x => trustBatchItemIds.Contains(x.TrustBatchItemId)
|
||||
&& trustBatchIds.Contains(x.TrustBatchId))
|
||||
.ToList();
|
||||
if (trustItems.Count != trustBatchItemIds.Count
|
||||
|| importItems.Any(x => !trustItems.Any(y => y.TrustBatchItemId == x.TrustBatchItemId
|
||||
&& y.TrustBatchId == x.TrustBatchId)))
|
||||
{
|
||||
throw new InvalidOperationException("导入数据包含无效的委托明细,请重新审核文件!");
|
||||
}
|
||||
|
||||
List<string> importedTrustBatchIds = db.HJGL_Batch_NDE
|
||||
.Where(x => trustBatchIds.Contains(x.TrustBatchId))
|
||||
.Select(x => x.TrustBatchId)
|
||||
.ToList();
|
||||
if (importedTrustBatchIds.Count > 0)
|
||||
{
|
||||
string codes = string.Join("、", importItems
|
||||
.Where(x => importedTrustBatchIds.Contains(x.TrustBatchId))
|
||||
.Select(x => x.TrustBatchCode)
|
||||
.Distinct());
|
||||
throw new InvalidOperationException("委托单[" + codes + "]已存在检测结果,不能重复导入!");
|
||||
}
|
||||
|
||||
List<Model.HJGL_Batch_NDE> ndeList = new List<Model.HJGL_Batch_NDE>();
|
||||
List<Model.HJGL_Batch_NDEItem> ndeItemList = new List<Model.HJGL_Batch_NDEItem>();
|
||||
DateTime submitDate = DateTime.Now;
|
||||
|
||||
foreach (IGrouping<string, UnitWorkNDEImportItem> group in importItems.GroupBy(x => x.TrustBatchId))
|
||||
{
|
||||
Model.HJGL_Batch_BatchTrust trust = trusts.First(x => x.TrustBatchId == group.Key);
|
||||
string ndeId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDE));
|
||||
|
||||
// 检测流水号沿用检测单编辑页的委托编号转换规则。
|
||||
string ndeCode = trust.TrustType == "R"
|
||||
? trust.TrustBatchCode.Replace("-FXWT-", "-FXJC-")
|
||||
: trust.TrustBatchCode.Replace("-WT-", "-JC-");
|
||||
ndeList.Add(new Model.HJGL_Batch_NDE
|
||||
{
|
||||
NDEID = ndeId,
|
||||
TrustBatchId = trust.TrustBatchId,
|
||||
ProjectId = projectId,
|
||||
UnitId = trust.UnitId,
|
||||
UnitWorkId = unitWorkId,
|
||||
NDEUnit = trust.NDEUnit,
|
||||
NDECode = ndeCode,
|
||||
NDEMan = personId
|
||||
});
|
||||
|
||||
foreach (UnitWorkNDEImportItem importItem in group)
|
||||
{
|
||||
ndeItemList.Add(new Model.HJGL_Batch_NDEItem
|
||||
{
|
||||
NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem)),
|
||||
NDEID = ndeId,
|
||||
TrustBatchItemId = importItem.TrustBatchItemId,
|
||||
DetectionTypeId = trust.DetectionTypeId,
|
||||
TotalFilm = importItem.TotalFilm,
|
||||
PassFilm = importItem.PassFilm,
|
||||
CheckResult = importItem.CheckResult,
|
||||
JudgeGrade = importItem.JudgeGrade,
|
||||
CheckDefects = importItem.CheckDefects,
|
||||
RepairLocation = importItem.RepairLocation,
|
||||
Remark = importItem.Remark,
|
||||
FilmDate = importItem.FilmDate,
|
||||
ReportDate = importItem.ReportDate,
|
||||
SubmitDate = submitDate
|
||||
});
|
||||
}
|
||||
|
||||
trust.IsCheck = true;
|
||||
}
|
||||
|
||||
// 同一 DataContext 只提交一次,保证主表、明细和委托状态要么全部成功,要么全部失败。
|
||||
db.HJGL_Batch_NDE.InsertAllOnSubmit(ndeList);
|
||||
db.HJGL_Batch_NDEItem.InsertAllOnSubmit(ndeItemList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace BLL
|
||||
/// 分页查询焊缝外观检测记录。
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID。</param>
|
||||
/// <param name="checkCode">检测编号。</param>
|
||||
/// <param name="pipelineCode">管线号查询条件。</param>
|
||||
/// <param name="weldJointCode">焊口号查询条件。</param>
|
||||
/// <param name="qualified">合格状态,1为合格,0为不合格,空为全部。</param>
|
||||
@@ -20,7 +21,7 @@ namespace BLL
|
||||
/// <param name="pageSize">每页记录数。</param>
|
||||
/// <returns>外观检测记录及总记录数。</returns>
|
||||
public static Tuple<List<Model.WeldAppearanceCheckItem>, int> GetList(string projectId,
|
||||
string pipelineCode, string weldJointCode, string qualified, int pageIndex, int pageSize)
|
||||
string checkCode, string pipelineCode, string weldJointCode, string qualified, int pageIndex, int pageSize)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var query = from c in db.HJGL_WeldAppearanceCheck
|
||||
@@ -30,6 +31,10 @@ namespace BLL
|
||||
where string.IsNullOrEmpty(projectId) || c.ProjectId == projectId
|
||||
select new { c, w, CheckPersonName = p == null ? string.Empty : p.PersonName };
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(checkCode))
|
||||
{
|
||||
query = query.Where(x => x.c.CheckCode == checkCode);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(pipelineCode))
|
||||
{
|
||||
query = query.Where(x => x.w.PipelineCode.Contains(pipelineCode));
|
||||
@@ -71,10 +76,93 @@ namespace BLL
|
||||
InterpassTemperature = x.c.InterpassTemperature,
|
||||
CreateTime = x.c.CreateTime
|
||||
}).ToList();
|
||||
PopulateReportFields(data);
|
||||
PopulateAttachUrls(data);
|
||||
return Tuple.Create(data, total);
|
||||
}
|
||||
|
||||
private static void PopulateReportFields(List<Model.WeldAppearanceCheckItem> data)
|
||||
{
|
||||
List<string> weldJointIds = data.Select(x => x.WeldJointId).Distinct().ToList();
|
||||
if (weldJointIds.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var details = Funs.DB.View_HJGL_WeldJoint
|
||||
.Where(x => weldJointIds.Contains(x.WeldJointId))
|
||||
.Select(x => new
|
||||
{
|
||||
x.WeldJointId,
|
||||
x.UnitWorkId,
|
||||
x.UnitWorkName,
|
||||
x.WelderCode,
|
||||
x.Specification,
|
||||
x.MaterialCode,
|
||||
x.WeldingLocationCode,
|
||||
x.WeldingMethodCode,
|
||||
x.WeldingRod,
|
||||
x.WeldingRodCode,
|
||||
x.WeldingWire,
|
||||
x.WeldingWireCode
|
||||
}).ToList();
|
||||
|
||||
List<string> consumablesIds = details
|
||||
.SelectMany(x => new[] { x.WeldingWire, x.WeldingRod })
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x))
|
||||
.Distinct()
|
||||
.ToList();
|
||||
var consumablesById = new Dictionary<string, string>();
|
||||
if (consumablesIds.Count > 0)
|
||||
{
|
||||
consumablesById = Funs.DB.Base_Consumables
|
||||
.Where(x => consumablesIds.Contains(x.ConsumablesId))
|
||||
.ToDictionary(x => x.ConsumablesId, x => x.ConsumablesName);
|
||||
}
|
||||
|
||||
foreach (Model.WeldAppearanceCheckItem item in data)
|
||||
{
|
||||
var detail = details.FirstOrDefault(x => x.WeldJointId == item.WeldJointId);
|
||||
if (detail == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
item.UnitWorkId = detail.UnitWorkId;
|
||||
item.UnitWorkName = detail.UnitWorkName;
|
||||
item.WelderCode = detail.WelderCode;
|
||||
item.Specification = detail.Specification;
|
||||
item.MaterialCode = detail.MaterialCode;
|
||||
item.WeldingLocation = detail.WeldingLocationCode;
|
||||
item.WeldingMethodCode = detail.WeldingMethodCode;
|
||||
item.WeldingRodCode = detail.WeldingRodCode;
|
||||
item.WeldingWireCode = detail.WeldingWireCode;
|
||||
string wireName;
|
||||
string rodName;
|
||||
consumablesById.TryGetValue(detail.WeldingWire ?? string.Empty, out wireName);
|
||||
consumablesById.TryGetValue(detail.WeldingRod ?? string.Empty, out rodName);
|
||||
// 焊材牌号使用焊丝、焊条在耗材基础表中的名称,按既有报表口径以“+”合并并去重。
|
||||
item.WeldingMaterial = string.Join("+", new[] { wireName, rodName }
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x)).Distinct());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询当前项目可用于筛选和打印的检测编号。
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID。</param>
|
||||
/// <returns>检测编号列表。</returns>
|
||||
public static List<string> GetCheckCodes(string projectId)
|
||||
{
|
||||
return Funs.DB.HJGL_WeldAppearanceCheck
|
||||
.Where(x => (string.IsNullOrEmpty(projectId) || x.ProjectId == projectId)
|
||||
&& x.CheckCode != null && x.CheckCode != string.Empty)
|
||||
.Select(x => x.CheckCode)
|
||||
.Distinct()
|
||||
.OrderByDescending(x => x)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询当前项目中已焊接的焊口。
|
||||
/// </summary>
|
||||
|
||||
@@ -382,6 +382,53 @@ namespace BLL
|
||||
}, out totalCount).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新待审核明细的实际施工工艺参数。
|
||||
/// </summary>
|
||||
/// <param name="input">待审核明细及四项工艺参数</param>
|
||||
/// <returns>错误信息,空字符串表示成功</returns>
|
||||
public static string UpdateWeldingDailyTempDetailParameters(Model.WeldingDailyTempDetailEditInput input)
|
||||
{
|
||||
if (input == null || string.IsNullOrWhiteSpace(input.TempDetailId)
|
||||
|| string.IsNullOrWhiteSpace(input.ProjectId))
|
||||
{
|
||||
return "待审核明细或项目不能为空";
|
||||
}
|
||||
|
||||
string weldingMethodId = NormalizeOptionalId(input.WeldingMethodId);
|
||||
string weldTypeId = NormalizeOptionalId(input.WeldTypeId);
|
||||
string weldingWire = NormalizeOptionalId(input.WeldingWire);
|
||||
string weldingRod = NormalizeOptionalId(input.WeldingRod);
|
||||
string parameterError = ValidatePendingWeldingParameters(
|
||||
weldingMethodId, weldTypeId, weldingWire, weldingRod);
|
||||
if (!string.IsNullOrEmpty(parameterError))
|
||||
{
|
||||
return parameterError;
|
||||
}
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var detail = db.HJGL_WeldingDailyTempDetail.FirstOrDefault(x =>
|
||||
x.TempDetailId == input.TempDetailId && x.ProjectId == input.ProjectId);
|
||||
if (detail == null)
|
||||
{
|
||||
return "待审核明细不存在";
|
||||
}
|
||||
if (detail.AuditState >= AuditStateApproved)
|
||||
{
|
||||
return "该明细已完成审核,不能修改";
|
||||
}
|
||||
|
||||
// 编辑页只维护临时工艺快照;正式焊口仍在专工审核通过时统一回写。
|
||||
detail.WeldingMethodId = weldingMethodId;
|
||||
detail.WeldTypeId = weldTypeId;
|
||||
detail.WeldingWire = weldingWire;
|
||||
detail.WeldingRod = weldingRod;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。
|
||||
/// </summary>
|
||||
@@ -1109,6 +1156,11 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
private static string NormalizeOptionalId(string value)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(value) ? null : value.Trim();
|
||||
}
|
||||
|
||||
private static string FirstNotEmpty(params string[] values)
|
||||
{
|
||||
return values == null ? null : values.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x));
|
||||
@@ -1303,6 +1355,178 @@ namespace BLL
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊接日志导出数据;传日报ID时导出单份日报,否则按单位工程和月份导出。
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitWorkId">单位工程ID</param>
|
||||
/// <param name="weldingDailyId">焊接日报ID</param>
|
||||
/// <param name="month">月份,格式为yyyy-MM</param>
|
||||
/// <returns>仅包含俄文表头和业务数据的焊接日志</returns>
|
||||
public static DataTable GetWeldingLogExportData(string projectId, string unitWorkId,
|
||||
string weldingDailyId, string month)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(projectId)
|
||||
|| (string.IsNullOrWhiteSpace(unitWorkId) && string.IsNullOrWhiteSpace(weldingDailyId)))
|
||||
{
|
||||
return new DataTable();
|
||||
}
|
||||
|
||||
DateTime monthStart = DateTime.MinValue;
|
||||
if (string.IsNullOrWhiteSpace(weldingDailyId)
|
||||
&& !DateTime.TryParse(month + "-01", out monthStart))
|
||||
{
|
||||
return new DataTable();
|
||||
}
|
||||
|
||||
string condition;
|
||||
var parameters = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@ProjectId", projectId)
|
||||
};
|
||||
if (!string.IsNullOrWhiteSpace(weldingDailyId))
|
||||
{
|
||||
condition = "jot.WeldingDailyId = @WeldingDailyId";
|
||||
parameters.Add(new SqlParameter("@WeldingDailyId", weldingDailyId));
|
||||
}
|
||||
else
|
||||
{
|
||||
condition = @"jot.UnitWorkId = @UnitWorkId
|
||||
AND jot.WeldingDateD >= @MonthStart
|
||||
AND jot.WeldingDateD < @NextMonth";
|
||||
parameters.Add(new SqlParameter("@UnitWorkId", unitWorkId));
|
||||
parameters.Add(new SqlParameter("@MonthStart", monthStart.Date));
|
||||
parameters.Add(new SqlParameter("@NextMonth", monthStart.Date.AddMonths(1)));
|
||||
}
|
||||
|
||||
// 俄文日志列横跨焊口、日报、外观、热处理、硬度和无损检测,统一在服务层完成映射,页面仅负责下载。
|
||||
string sql = @"
|
||||
SELECT ROW_NUMBER() OVER (ORDER BY jot.WeldingDateD, jot.PipelineCode, jot.WeldJointCode) AS C01,
|
||||
CONCAT(jot.PipelineCode, '/', jot.WeldJointCode,
|
||||
CASE WHEN ISNULL(jot.WeldTypeCode, '') = '' THEN '' ELSE ', ' + jot.WeldTypeCode END) AS C02,
|
||||
CASE WHEN welder.BackingDisplay = welder.CoverDisplay THEN welder.BackingDisplay
|
||||
WHEN welder.BackingDisplay = '' THEN welder.CoverDisplay
|
||||
WHEN welder.CoverDisplay = '' THEN welder.BackingDisplay
|
||||
ELSE welder.BackingDisplay + CHAR(10) + welder.CoverDisplay END AS C03,
|
||||
REPLACE(ISNULL(jot.MaterialCode, ''), '/', ' / ') AS C04,
|
||||
REPLACE(REPLACE(
|
||||
COALESCE(NULLIF(jot.Specification, ''),
|
||||
CONCAT(CONVERT(varchar(30), jot.Dia), N'×', CONVERT(varchar(30), jot.Thickness))),
|
||||
N'Φ', ''), '*', N'×') AS C05,
|
||||
CONVERT(varchar(10), jot.WeldingDateD, 104) AS C06,
|
||||
ISNULL(jot.WeldingMethodCode, '') AS C07,
|
||||
CONCAT(
|
||||
CASE WHEN ISNULL(jot.WeldingWireCode, '') = '' THEN ''
|
||||
ELSE jot.WeldingWireCode + CASE WHEN ISNULL(wire.Standard, '') = '' THEN '' ELSE ' (' + wire.Standard + ')' END END,
|
||||
CASE WHEN ISNULL(jot.WeldingWireCode, '') = '' OR ISNULL(jot.WeldingRodCode, '') = '' THEN '' ELSE CHAR(10) END,
|
||||
CASE WHEN ISNULL(jot.WeldingRodCode, '') = '' THEN ''
|
||||
ELSE jot.WeldingRodCode + CASE WHEN ISNULL(rod.Standard, '') = '' THEN '' ELSE ' (' + rod.Standard + ')' END END) AS C08,
|
||||
CASE WHEN appearance.PreheatTemperature IS NULL AND appearance.InterpassTemperature IS NULL
|
||||
THEN CASE WHEN ISNULL(jot.PreTemperature, '') = '' THEN '' ELSE jot.PreTemperature + N' °C' END
|
||||
WHEN appearance.InterpassTemperature IS NULL
|
||||
THEN CONCAT(CONVERT(varchar(30), appearance.PreheatTemperature), N' °C')
|
||||
WHEN appearance.PreheatTemperature IS NULL
|
||||
THEN CONCAT(CONVERT(varchar(30), appearance.InterpassTemperature), N' °C')
|
||||
ELSE CONCAT(CONVERT(varchar(30), appearance.PreheatTemperature), ' / ',
|
||||
CONVERT(varchar(30), appearance.InterpassTemperature), N' °C') END AS C09,
|
||||
N'' AS C10,
|
||||
N'' AS C11,
|
||||
N'' AS C12,
|
||||
ISNULL(hotProcess.RecordChartNo, '') AS C13,
|
||||
CONCAT(
|
||||
CASE WHEN hardness.HardNessValue1 IS NULL THEN '' ELSE CONVERT(varchar(20), hardness.HardNessValue1) END,
|
||||
CASE WHEN hardness.HardNessValue2 IS NULL THEN '' ELSE '/' + CONVERT(varchar(20), hardness.HardNessValue2) END,
|
||||
CASE WHEN hardness.HardNessValue3 IS NULL THEN '' ELSE '/' + CONVERT(varchar(20), hardness.HardNessValue3) END,
|
||||
CASE WHEN ISNULL(hardness.HardReportNo, '') = '' THEN '' ELSE ', ' + RTRIM(hardness.HardReportNo) END,
|
||||
CASE WHEN hardness.ReportDate IS NULL THEN '' ELSE ', ' + CONVERT(varchar(10), hardness.ReportDate, 104) END) AS C14,
|
||||
CASE WHEN appearance.IsQualified = 1 THEN N'Годен'
|
||||
WHEN appearance.IsQualified = 0 THEN N'Не годен'
|
||||
ELSE N'' END AS C15,
|
||||
ISNULL(ndt.ResultText, '') AS C16,
|
||||
N'' AS C17
|
||||
FROM dbo.View_HJGL_WeldJoint AS jot
|
||||
LEFT JOIN dbo.Base_Consumables AS wire ON wire.ConsumablesId = jot.WeldingWire
|
||||
LEFT JOIN dbo.Base_Consumables AS rod ON rod.ConsumablesId = jot.WeldingRod
|
||||
OUTER APPLY
|
||||
(
|
||||
SELECT CONCAT(ISNULL(jot.BackingWelderName, ''),
|
||||
CASE WHEN ISNULL(jot.BackingWelderCode, '') = '' THEN '' ELSE ' (' + jot.BackingWelderCode + ')' END) AS BackingDisplay,
|
||||
CONCAT(ISNULL(jot.CoverWelderName, ''),
|
||||
CASE WHEN ISNULL(jot.CoverWelderCode, '') = '' THEN '' ELSE ' (' + jot.CoverWelderCode + ')' END) AS CoverDisplay
|
||||
) AS welder
|
||||
OUTER APPLY
|
||||
(
|
||||
SELECT TOP 1 checkItem.IsQualified, checkItem.PreheatTemperature, checkItem.InterpassTemperature
|
||||
FROM dbo.HJGL_WeldAppearanceCheck AS checkItem
|
||||
WHERE checkItem.WeldJointId = jot.WeldJointId
|
||||
ORDER BY checkItem.CheckTime DESC, checkItem.CreateTime DESC, checkItem.AppearanceCheckId DESC
|
||||
) AS appearance
|
||||
OUTER APPLY
|
||||
(
|
||||
SELECT TOP 1 report.RecordChartNo
|
||||
FROM dbo.HJGL_HotProess_TrustItem AS trustItem
|
||||
LEFT JOIN dbo.HJGL_HotProess_Report AS report
|
||||
ON report.HotProessTrustItemId = trustItem.HotProessTrustItemId
|
||||
WHERE trustItem.WeldJointId = jot.WeldJointId
|
||||
ORDER BY report.ProessDate DESC, report.HotProessReportId DESC
|
||||
) AS hotProcess
|
||||
OUTER APPLY
|
||||
(
|
||||
SELECT TOP 1 report.HardReportNo, report.HardNessValue1, report.HardNessValue2,
|
||||
report.HardNessValue3, hardTrust.ReportDate
|
||||
FROM dbo.HJGL_Hard_TrustItem AS hardItem
|
||||
LEFT JOIN dbo.HJGL_Hard_Report AS report ON report.HardTrustItemID = hardItem.HardTrustItemID
|
||||
LEFT JOIN dbo.HJGL_Hard_Trust AS hardTrust ON hardTrust.HardTrustID = hardItem.HardTrustID
|
||||
WHERE hardItem.WeldJointId = jot.WeldJointId
|
||||
ORDER BY hardTrust.ReportDate DESC, report.SortIndex, report.HardReportId DESC
|
||||
) AS hardness
|
||||
OUTER APPLY
|
||||
(
|
||||
SELECT STUFF((
|
||||
SELECT CHAR(10) + CONCAT(ISNULL(detectionType.DetectionTypeCode, ''),
|
||||
CASE ndeItem.CheckResult WHEN '1' THEN N': Годен' WHEN '2' THEN N': Не годен' ELSE '' END,
|
||||
CASE WHEN ISNULL(ndeItem.NDEReportNo, nde.NDECode) IS NULL THEN ''
|
||||
ELSE ', ' + ISNULL(ndeItem.NDEReportNo, nde.NDECode) END,
|
||||
CASE WHEN ndeItem.ReportDate IS NULL THEN '' ELSE ', ' + CONVERT(varchar(10), ndeItem.ReportDate, 104) END)
|
||||
FROM dbo.HJGL_Batch_BatchTrustItem AS trustItem
|
||||
INNER JOIN dbo.HJGL_Batch_NDEItem AS ndeItem ON ndeItem.TrustBatchItemId = trustItem.TrustBatchItemId
|
||||
LEFT JOIN dbo.HJGL_Batch_NDE AS nde ON nde.NDEID = ndeItem.NDEID
|
||||
LEFT JOIN dbo.Base_DetectionType AS detectionType ON detectionType.DetectionTypeId = ndeItem.DetectionTypeId
|
||||
WHERE trustItem.WeldJointId = jot.WeldJointId
|
||||
ORDER BY ndeItem.ReportDate, ndeItem.NDEItemID
|
||||
FOR XML PATH(''), TYPE).value('.', 'nvarchar(max)'), 1, 1, '') AS ResultText
|
||||
) AS ndt
|
||||
WHERE jot.ProjectId = @ProjectId AND " + condition;
|
||||
|
||||
DataTable table = SQLHelper.GetDataTableRunText(sql, parameters.ToArray());
|
||||
string[] headers =
|
||||
{
|
||||
"№\r\nп/п",
|
||||
"Обозначение сварного соединения по исполнительному чертежу, тип сварного соединения ГОСТ 16037",
|
||||
"Ф.И.О.\r\nсварщика,\r\nличное\r\nклеймо",
|
||||
"Марка стали (композиция марок\r\nсталей), НД, №№ сертификатов",
|
||||
"Наружный диаметр элемента трубопровода и толщина стенки Dн×S, мм",
|
||||
"Дата сварки, температурные условия в рабочей зоне,°С",
|
||||
"Способ\r\nсварки",
|
||||
"Сварочные материалы (марка электрода, сварочной проволоки, защитный газ, флюс), НД, №№ сертификатов",
|
||||
"Режим\r\nпредварительного и\r\nсопутствующего\r\nподогрева",
|
||||
"Отметка о контроле\r\nкорня\r\nшва",
|
||||
"Стилоскопирование металла шва,\r\n№ заключения, дата",
|
||||
"Ф.И.О. оператора- термиста, личное клеймо",
|
||||
"№ диаграммы по журналу термообработки сварных соединений",
|
||||
"Твердость металла шва, № заключения, дата",
|
||||
"Отметка о годности сварного соединения по внешнему осмотру и измерениям",
|
||||
"Способ и результаты неразрушающего контроля сварного соединения, № заключения, дата",
|
||||
"Результаты измерения ферритной фазы в металле шва, № заключения, дата"
|
||||
};
|
||||
for (int i = 0; i < headers.Length; i++)
|
||||
{
|
||||
table.Columns[i].ColumnName = headers[i];
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
public static Dictionary<string, object> GetFileOutValueById(string WeldingDailyId)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 管道预制汇总服务。
|
||||
/// </summary>
|
||||
public static class PipePrefabricationSummaryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 按单位、单位工程汇总管道预制达因。
|
||||
/// </summary>
|
||||
public static List<PipePrefabricationSummaryItem> GetSummary(
|
||||
string projectId,
|
||||
IEnumerable<string> unitWorkIds,
|
||||
DateTime startDate,
|
||||
DateTime endDate,
|
||||
DateTime reportDate)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
throw new ArgumentException("项目不能为空。", "projectId");
|
||||
}
|
||||
|
||||
if (startDate.Date > endDate.Date)
|
||||
{
|
||||
throw new ArgumentException("开始日期不能晚于结束日期。");
|
||||
}
|
||||
|
||||
var selectedUnitWorkIds = (unitWorkIds ?? Enumerable.Empty<string>())
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x) && x != Const._Null)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
var parameters = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@ProjectId", projectId),
|
||||
new SqlParameter("@StartDate", startDate.Date),
|
||||
// 结束日期按整日包含,SQL 使用小于次日零点规避时间精度问题。
|
||||
new SqlParameter("@EndDateExclusive", endDate.Date.AddDays(1)),
|
||||
// 报表日期 D 的昨日数据取 D-1,当日零点作为昨日区间的结束边界。
|
||||
new SqlParameter("@DailyStartDate", reportDate.Date.AddDays(-1)),
|
||||
new SqlParameter("@ReportDate", reportDate.Date)
|
||||
};
|
||||
|
||||
string unitWorkFilter = string.Empty;
|
||||
if (selectedUnitWorkIds.Count > 0)
|
||||
{
|
||||
var parameterNames = new List<string>();
|
||||
for (int index = 0; index < selectedUnitWorkIds.Count; index++)
|
||||
{
|
||||
string parameterName = "@UnitWorkId" + index;
|
||||
parameterNames.Add(parameterName);
|
||||
parameters.Add(new SqlParameter(parameterName, selectedUnitWorkIds[index]));
|
||||
}
|
||||
|
||||
unitWorkFilter = " AND unitWork.UnitWorkId IN (" + string.Join(",", parameterNames) + ")";
|
||||
}
|
||||
|
||||
string sql = @"
|
||||
SELECT
|
||||
ISNULL(unitWork.UnitWorkName, '') AS UnitWorkName,
|
||||
ISNULL(unitInfo.UnitCode, '') AS ConstructionUnitCode,
|
||||
ISNULL(unitWork.UnitWorkCode, '') AS UnitWorkCode,
|
||||
CAST(SUM(ISNULL(joint.Size, 0)) AS DECIMAL(19, 2)) AS TotalDrawingQuantity,
|
||||
CAST(SUM(ISNULL(joint.Size, 0)) AS DECIMAL(19, 2)) AS IsoDrawingQuantity,
|
||||
CAST(SUM(CASE WHEN joint.JointAttribute = N'预制口' THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS WorkFrontQuantity,
|
||||
CAST(SUM(CASE
|
||||
WHEN joint.JointAttribute = N'预制口'
|
||||
AND daily.WeldingDate < @EndDateExclusive
|
||||
THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS CompletedQuantity,
|
||||
CAST(SUM(CASE
|
||||
WHEN joint.JointAttribute = N'预制口'
|
||||
AND daily.WeldingDate >= @StartDate
|
||||
AND daily.WeldingDate < @EndDateExclusive
|
||||
THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS WeeklyQuantity,
|
||||
CAST(SUM(CASE
|
||||
WHEN joint.JointAttribute = N'预制口'
|
||||
AND daily.WeldingDate >= @DailyStartDate
|
||||
AND daily.WeldingDate < @ReportDate
|
||||
THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS DailyQuantity,
|
||||
CAST(SUM(CASE
|
||||
WHEN joint.JointAttribute = N'预制口'
|
||||
AND daily.WeldingDate < @DailyStartDate
|
||||
THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS PreviousDayCumulativeQuantity,
|
||||
CAST(SUM(CASE
|
||||
WHEN joint.JointAttribute = N'预制口'
|
||||
AND daily.WeldingDate < @StartDate
|
||||
THEN ISNULL(joint.Size, 0) ELSE 0 END) AS DECIMAL(19, 2)) AS LastWeekCumulativeQuantity
|
||||
FROM HJGL_WeldJoint joint
|
||||
INNER JOIN HJGL_Pipeline pipeline ON pipeline.PipelineId = joint.PipelineId
|
||||
INNER JOIN WBS_UnitWork unitWork ON unitWork.UnitWorkId = pipeline.UnitWorkId
|
||||
LEFT JOIN Base_Unit unitInfo ON unitInfo.UnitId = unitWork.UnitId
|
||||
LEFT JOIN HJGL_WeldingDaily daily ON daily.WeldingDailyId = joint.WeldingDailyId
|
||||
WHERE pipeline.ProjectId = @ProjectId
|
||||
AND pipeline.PipeArea = '1'" + unitWorkFilter + @"
|
||||
GROUP BY unitWork.UnitWorkName, unitInfo.UnitCode, unitWork.UnitWorkCode
|
||||
ORDER BY unitWork.UnitWorkName, unitWork.UnitWorkCode";
|
||||
|
||||
DataTable table = SQLHelper.GetDataTableRunText(sql, parameters.ToArray());
|
||||
return table.AsEnumerable().Select((row, index) =>
|
||||
{
|
||||
string unitCode;
|
||||
string blockCode;
|
||||
ParseUnitAndBlock(
|
||||
Convert.ToString(row["UnitWorkName"]),
|
||||
Convert.ToString(row["ConstructionUnitCode"]),
|
||||
Convert.ToString(row["UnitWorkCode"]),
|
||||
out unitCode,
|
||||
out blockCode);
|
||||
|
||||
return new PipePrefabricationSummaryItem
|
||||
{
|
||||
RowKey = (index + 1).ToString(),
|
||||
UnitCode = unitCode,
|
||||
UnitWorkCode = blockCode,
|
||||
// 当前模型没有独立的计划图纸达因字段,图纸总量按工厂预制管线设计焊口总达因统计。
|
||||
TotalDrawingQuantity = GetDecimal(row, "TotalDrawingQuantity"),
|
||||
IsoDrawingQuantity = GetDecimal(row, "IsoDrawingQuantity"),
|
||||
WorkFrontQuantity = GetDecimal(row, "WorkFrontQuantity"),
|
||||
CompletedQuantity = GetDecimal(row, "CompletedQuantity"),
|
||||
DailyQuantity = GetDecimal(row, "DailyQuantity"),
|
||||
PreviousDayCumulativeQuantity = GetDecimal(row, "PreviousDayCumulativeQuantity"),
|
||||
WeeklyQuantity = GetDecimal(row, "WeeklyQuantity"),
|
||||
LastWeekCumulativeQuantity = GetDecimal(row, "LastWeekCumulativeQuantity"),
|
||||
Note = string.Empty
|
||||
};
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
private static void ParseUnitAndBlock(
|
||||
string unitWorkName,
|
||||
string fallbackUnitCode,
|
||||
string fallbackBlockCode,
|
||||
out string unitCode,
|
||||
out string blockCode)
|
||||
{
|
||||
// 本项目单位工程名称按“Unit.Block”维护,报表需拆分成两个业务列。
|
||||
string[] segments = (unitWorkName ?? string.Empty).Split(new[] { '.' }, 2);
|
||||
if (segments.Length == 2
|
||||
&& !string.IsNullOrWhiteSpace(segments[0])
|
||||
&& !string.IsNullOrWhiteSpace(segments[1]))
|
||||
{
|
||||
unitCode = segments[0].Trim();
|
||||
blockCode = segments[1].Trim();
|
||||
return;
|
||||
}
|
||||
|
||||
unitCode = fallbackUnitCode ?? string.Empty;
|
||||
blockCode = fallbackBlockCode ?? string.Empty;
|
||||
}
|
||||
|
||||
private static decimal GetDecimal(DataRow row, string columnName)
|
||||
{
|
||||
return row.IsNull(columnName) ? 0M : Convert.ToDecimal(row[columnName]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 管道预制汇总行。
|
||||
/// </summary>
|
||||
public class PipePrefabricationSummaryItem
|
||||
{
|
||||
public string RowKey { get; set; }
|
||||
public string UnitCode { get; set; }
|
||||
public string UnitWorkCode { get; set; }
|
||||
public decimal TotalDrawingQuantity { get; set; }
|
||||
public decimal IsoDrawingQuantity { get; set; }
|
||||
public decimal WorkFrontQuantity { get; set; }
|
||||
public decimal CompletedQuantity { get; set; }
|
||||
public decimal DailyQuantity { get; set; }
|
||||
public decimal PreviousDayCumulativeQuantity { get; set; }
|
||||
public decimal WeeklyQuantity { get; set; }
|
||||
public decimal LastWeekCumulativeQuantity { get; set; }
|
||||
public string Note { get; set; }
|
||||
|
||||
public string TotalDrawingQuantityDisplay { get { return FormatQuantity(TotalDrawingQuantity); } }
|
||||
public string IsoDrawingQuantityDisplay { get { return FormatQuantity(IsoDrawingQuantity); } }
|
||||
public string WorkFrontQuantityDisplay { get { return FormatQuantity(WorkFrontQuantity); } }
|
||||
public string CompletedQuantityDisplay { get { return FormatQuantity(CompletedQuantity); } }
|
||||
public string DailyQuantityDisplay { get { return FormatQuantity(DailyQuantity); } }
|
||||
public string PreviousDayCumulativeQuantityDisplay { get { return FormatQuantity(PreviousDayCumulativeQuantity); } }
|
||||
public string WeeklyQuantityDisplay { get { return FormatQuantity(WeeklyQuantity); } }
|
||||
public string LastWeekCumulativeQuantityDisplay { get { return FormatQuantity(LastWeekCumulativeQuantity); } }
|
||||
public string QuantityCompleteRateDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return TotalDrawingQuantity <= 0M
|
||||
? "0.00%"
|
||||
: (CompletedQuantity * 100M / TotalDrawingQuantity).ToString("0.00") + "%";
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatQuantity(decimal quantity)
|
||||
{
|
||||
return quantity.ToString("#,##0.##");
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="2026-08-20" ReportInfo.Modified="2026-08-20" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Dictionary>
|
||||
<TableDataSource Name="Data" ReferenceName="Data" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="RowNumber" DataType="System.Int32"/>
|
||||
<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"/>
|
||||
<Column Name="WeldingLocation" DataType="System.String"/>
|
||||
<Column Name="WeldingMethodCode" DataType="System.String"/>
|
||||
<Column Name="WeldingMaterial" DataType="System.String"/>
|
||||
<Column Name="ItemCode" DataType="System.String"/>
|
||||
<Column Name="BatchCode" DataType="System.String"/>
|
||||
<Column Name="Remark" DataType="System.String"/>
|
||||
</TableDataSource>
|
||||
<Parameter Name="ProjectName" DataType="System.String"/>
|
||||
<Parameter Name="CheckCode" DataType="System.String"/>
|
||||
<Parameter Name="NDTMethod" DataType="System.String"/>
|
||||
<Parameter Name="InspectionCount" DataType="System.String"/>
|
||||
<Parameter Name="DetectionRate" DataType="System.String"/>
|
||||
</Dictionary>
|
||||
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" LeftMargin="20" TopMargin="15" RightMargin="20" BottomMargin="15">
|
||||
<PageHeaderBand Name="PageHeader1" Width="971.46" Height="128.52" PrintOn="FirstPage, LastPage, OddPages, EvenPages, RepeatedBand, SinglePage">
|
||||
<TextObject Name="TextStandard" Width="170.1" Height="35.91" Text="SH/T 3543—G402" VertAlign="Center" Font="楷体, 11pt"/>
|
||||
<TextObject Name="TextTitle" Left="170.1" Width="500.85" Height="35.91" Text="管道焊接接头报检/检查记录" HorzAlign="Center" VertAlign="Center" Font="楷体, 18pt, style=Bold"/>
|
||||
<TextObject Name="TextProject" Left="670.95" Width="300.51" Height="35.91" Text="工程名称:[ProjectName]" HorzAlign="Right" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextCheckCodeLabel" Top="35.91" Width="155.93" Height="34.02" Border.Lines="All" Text="报检/检查记录编号" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextCheckCode" Left="155.93" Top="35.91" Width="330.75" Height="34.02" Border.Lines="All" Text="[CheckCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextMethodLabel" Left="486.68" Top="35.91" Width="119.07" Height="34.02" Border.Lines="All" Text="无损检测方法" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextMethod" Left="605.75" Top="35.91" Width="63.5" Height="34.02" Border.Lines="All" Text="[NDTMethod]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextCountLabel" Left="669.25" Top="35.91" Width="94.5" Height="34.02" Border.Lines="All" Text="报检数量" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextCount" Left="763.75" Top="35.91" Width="66.15" Height="34.02" Border.Lines="All" Text="[InspectionCount]个" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextRateLabel" Left="829.9" Top="35.91" Width="85.05" Height="34.02" Border.Lines="All" Text="检测比例" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="TextRate" Left="914.95" Top="35.91" Width="56.51" Height="34.02" Border.Lines="All" Text="[DetectionRate]%" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||
<TextObject Name="HeaderRowNumber" Top="69.93" Width="30" Height="58.59" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderPipeline" Left="30" Top="69.93" Width="145" Height="58.59" Border.Lines="All" Text="管道编号/单线号/管段号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderWeldJoint" Left="175" Top="69.93" Width="55" Height="58.59" Border.Lines="All" Text="焊口 编号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderWelder" Left="230" Top="69.93" Width="60" Height="58.59" Border.Lines="All" Text="焊工 代号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderSpecification" Left="290" Top="69.93" Width="85" Height="58.59" Border.Lines="All" Text="规格 mm" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderMaterial" Left="375" Top="69.93" Width="100" Height="58.59" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderLocation" Left="475" Top="69.93" Width="55" Height="58.59" Border.Lines="All" Text="焊接 位置" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderMethod" Left="530" Top="69.93" Width="70" Height="58.59" Border.Lines="All" Text="焊接方法" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderWeldingMaterial" Left="600" Top="69.93" Width="90" Height="58.59" Border.Lines="All" Text="焊材牌号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderItemCode" Left="690" Top="69.93" Width="60" Height="58.59" Border.Lines="All" Text="物料代码" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderBatchCode" Left="750" Top="69.93" Width="60" Height="58.59" Border.Lines="All" Text="炉批号" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
<TextObject Name="HeaderRemark" Left="810" Top="69.93" Width="161.46" Height="58.59" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="楷体, 9pt"/>
|
||||
</PageHeaderBand>
|
||||
<DataBand Name="Data1" Top="132.52" Width="971.46" Height="36.86" DataSource="Data">
|
||||
<TextObject Name="DataRowNumber" Width="30" Height="36.86" Border.Lines="All" Text="[Data.RowNumber]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataPipeline" Left="30" Width="145" Height="36.86" Border.Lines="All" Text="[Data.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataWeldJoint" Left="175" Width="55" Height="36.86" Border.Lines="All" Text="[Data.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataWelder" Left="230" Width="60" Height="36.86" Border.Lines="All" Text="[Data.WelderCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataSpecification" Left="290" Width="85" Height="36.86" Border.Lines="All" Text="[Data.Specification]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataMaterial" Left="375" Width="100" Height="36.86" Border.Lines="All" Text="[Data.MaterialCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataLocation" Left="475" Width="55" Height="36.86" Border.Lines="All" Text="[Data.WeldingLocation]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataMethod" Left="530" Width="70" Height="36.86" Border.Lines="All" Text="[Data.WeldingMethodCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataWeldingMaterial" Left="600" Width="90" Height="36.86" Border.Lines="All" Text="[Data.WeldingMaterial]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataItemCode" Left="690" Width="60" Height="36.86" Border.Lines="All" Text="[Data.ItemCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataBatchCode" Left="750" Width="60" Height="36.86" Border.Lines="All" Text="[Data.BatchCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
<TextObject Name="DataRemark" Left="810" Width="161.46" Height="36.86" Border.Lines="All" Text="[Data.Remark]" HorzAlign="Center" VertAlign="Center" Font="楷体, 8.5pt"/>
|
||||
</DataBand>
|
||||
<ReportSummaryBand Name="ReportSummary1" Top="173.38" Width="971.46" Height="75.6" KeepWithData="true">
|
||||
<TextObject Name="SignTeam" Width="242.87" Height="75.6" Border.Lines="All" Text="施工班组长: 日期:" VertAlign="Center" Font="宋体, 10.5pt" Padding="10, 2, 2, 2"/>
|
||||
<TextObject Name="SignQuality" Left="242.87" Width="242.86" Height="75.6" Border.Lines="All" Text="质量检查员: 日期:" VertAlign="Center" Font="宋体, 10.5pt" Padding="10, 2, 2, 2"/>
|
||||
<TextObject Name="SignContractor" Left="485.73" Width="242.86" Height="75.6" Border.Lines="All" Text="总包代表: 日期:" VertAlign="Center" Font="宋体, 10.5pt" Padding="10, 2, 2, 2"/>
|
||||
<TextObject Name="SignOwner" Left="728.59" Width="242.87" Height="75.6" Border.Lines="All" Text="业主代表: 日期:" VertAlign="Center" Font="宋体, 10.5pt" Padding="10, 2, 2, 2"/>
|
||||
</ReportSummaryBand>
|
||||
</ReportPage>
|
||||
</Report>
|
||||
@@ -368,6 +368,7 @@
|
||||
<Content Include="CLGL\AntiCorrosionCheckRecordEdit.aspx" />
|
||||
<Content Include="CLGL\AntiCorrosionCheckRecordView.aspx" />
|
||||
<Content Include="File\Excel\DataOut\防腐委托单.xlsx" />
|
||||
<Content Include="File\Excel\DataOut\管道预制汇总模板.xlsx" />
|
||||
<Content Include="File\Fastreport\防腐委托单.frx" />
|
||||
<Content Include="common\main2.aspx" />
|
||||
<Content Include="common\mainMenu_DigitalSite.aspx" />
|
||||
@@ -1626,6 +1627,7 @@
|
||||
<Content Include="HJGL\NDT\NDTBatchAudit.aspx" />
|
||||
<Content Include="HJGL\NDT\NDTBatchEdit.aspx" />
|
||||
<Content Include="HJGL\NDT\NDTBatchImport.aspx" />
|
||||
<Content Include="HJGL\NDT\NDTBatchUnitImport.aspx" />
|
||||
<Content Include="HJGL\NDT\RepairNotice.aspx" />
|
||||
<Content Include="HJGL\PersonManage\CheckerItem.aspx" />
|
||||
<Content Include="HJGL\PersonManage\CheckerItemEdit.aspx" />
|
||||
@@ -1719,6 +1721,7 @@
|
||||
<Content Include="HJGL\WeldingManage\WeldMatMatch.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldMatMatchGet.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldReport.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldingDailyTempDetailEdit.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldAppearanceCheck.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldAppearanceCheckEdit.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldReportEdit.aspx" />
|
||||
@@ -1731,6 +1734,7 @@
|
||||
<Content Include="HJGL\WeldingReport\JointShowColumn.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\NDTMonthlyReport.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\NDTWeeklyReport.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\PipePrefabricationSummary.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\PipePrefabricationRateStatistics.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\UnitWorkareaAnalyze.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\UnitWorkAreaQuality.aspx" />
|
||||
@@ -3659,6 +3663,7 @@
|
||||
<Content Include="File\Word\HSSE\工程停工令.doc" />
|
||||
<Content Include="File\Word\HSSE\专项检查.doc" />
|
||||
<Content Include="File\Excel\DataIn\WBS定制导入模板.xls" />
|
||||
<Content Include="File\Excel\DataIn\检测结果导入模板.xlsx" />
|
||||
<Content Include="File\Word\HSSE\安全日志.doc" />
|
||||
<Content Include="File\Word\PHTGL\合同评审、审批表.docx" />
|
||||
<Content Include="File\Word\PHTGL\招标文件审批表.docx" />
|
||||
@@ -3704,6 +3709,7 @@
|
||||
<Content Include="File\Fastreport\JGZL\管道无损检测结果汇总表.frx" />
|
||||
<Content Include="File\Fastreport\JGZL\管道材料材质标识检查记录.frx" />
|
||||
<Content Include="File\Fastreport\JGZL\管道焊接工作记录.frx" />
|
||||
<Content Include="File\Fastreport\管道焊接接头报检\检查记录.frx" />
|
||||
<Content Include="File\Fastreport\JGZL\管道系统压力试验条件确认记录.frx" />
|
||||
<Content Include="File\Fastreport\JGZL\管道系统压力试验记录.frx" />
|
||||
<Content Include="File\Fastreport\JGZL\管道试压包尾项清单.frx" />
|
||||
@@ -10933,6 +10939,13 @@
|
||||
<Compile Include="HJGL\NDT\NDTBatchImport.aspx.designer.cs">
|
||||
<DependentUpon>NDTBatchImport.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\NDT\NDTBatchUnitImport.aspx.cs">
|
||||
<DependentUpon>NDTBatchUnitImport.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\NDT\NDTBatchUnitImport.aspx.designer.cs">
|
||||
<DependentUpon>NDTBatchUnitImport.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\NDT\RepairNotice.aspx.cs">
|
||||
<DependentUpon>RepairNotice.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -11584,6 +11597,13 @@
|
||||
<DependentUpon>WeldReport.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\WeldingDailyTempDetailEdit.aspx.cs">
|
||||
<DependentUpon>WeldingDailyTempDetailEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\WeldingDailyTempDetailEdit.aspx.designer.cs">
|
||||
<DependentUpon>WeldingDailyTempDetailEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\WeldAppearanceCheck.aspx.cs">
|
||||
<DependentUpon>WeldAppearanceCheck.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -11671,6 +11691,13 @@
|
||||
<Compile Include="HJGL\WeldingReport\NDTWeeklyReport.aspx.designer.cs">
|
||||
<DependentUpon>NDTWeeklyReport.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\PipePrefabricationSummary.aspx.cs">
|
||||
<DependentUpon>PipePrefabricationSummary.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\PipePrefabricationSummary.aspx.designer.cs">
|
||||
<DependentUpon>PipePrefabricationSummary.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\PipePrefabricationRateStatistics.aspx.cs">
|
||||
<DependentUpon>PipePrefabricationRateStatistics.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -89,12 +89,11 @@
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -734,73 +734,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
|
||||
#endregion
|
||||
|
||||
#region 报表打印
|
||||
/// <summary>
|
||||
/// 报表打印
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
var q = BLL.PipelineService.GetPipelineByPipelineId(pipelineId);
|
||||
|
||||
if (q != null)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipelineId select x).Count();
|
||||
var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipelineId && x.WeldingDailyId != null select x).Count();
|
||||
if (jotCount == weldJotCount)
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
varValue = project.ProjectName;
|
||||
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(q.UnitWorkId);
|
||||
if (unitWork != null)
|
||||
{
|
||||
varValue = varValue + "|" + unitWork.UnitWorkName;
|
||||
}
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@IsoId", pipelineId));
|
||||
listStr.Add(new SqlParameter("@Flag", "0"));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = BLL.SQLHelper.GetDataTableRunProc("HJGL_spJointWorkRecordNew", parameter);
|
||||
string page = Funs.GetPagesCountByPageSize(11, 16, tb.Rows.Count).ToString();
|
||||
|
||||
|
||||
varValue = varValue + "|" + page;
|
||||
|
||||
if (!string.IsNullOrEmpty(varValue))
|
||||
{
|
||||
varValue = HttpUtility.UrlEncodeUnicode(varValue);
|
||||
}
|
||||
if (tb.Rows.Count <= 11)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport1Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport2Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport1Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择焊接完成管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口及刷新页面
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
@@ -951,47 +884,17 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
//var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID);
|
||||
//if (iso != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else if (workArea != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning);
|
||||
//}
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("材料信息表" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 500;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出焊口初始信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut2_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
//if (iso != null)
|
||||
//{
|
||||
// Response.ClearContent();
|
||||
// string filename = Funs.GetNewFileName();
|
||||
// Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(Resources.Lan.WeldingJointInfo + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
// Response.ContentType = "application/excel";
|
||||
// Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// this.Grid1.PageSize = 100000;
|
||||
// this.BindGrid();
|
||||
// Response.Write(GetGridTableHtml(Grid1));
|
||||
// Response.End();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法btnMatImport_Click
|
||||
@@ -1046,9 +949,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 管线材料导入
|
||||
|
||||
/// <summary>
|
||||
@@ -1123,5 +1023,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,15 +176,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnMatImport 控件。
|
||||
/// </summary>
|
||||
@@ -194,6 +185,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnMatImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar6" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnUnitWorkImport" Text="检测结果导入" ToolTip="选中单位工程后批量导入检测结果"
|
||||
Icon="ApplicationGet" runat="server" Hidden="true" OnClick="btnUnitWorkImport_Click" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="检测单节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
this.btnUnitWorkImport.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnAuditing))
|
||||
{
|
||||
@@ -1073,5 +1074,27 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
ShowNotify("请选择委托单号!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程级批量导入检测结果
|
||||
/// </summary>
|
||||
protected void btnUnitWorkImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_NDTBatchMenuId, Const.BtnSave))
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.tvControlItem.SelectedNode == null || this.tvControlItem.SelectedNode.CommandName != "单位工程")
|
||||
{
|
||||
ShowNotify("请先选中单位工程节点!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string window = string.Format("NDTBatchUnitImport.aspx?unitWorkId={0}&type={1}",
|
||||
Server.UrlEncode(this.tvControlItem.SelectedNodeID), Server.UrlEncode(this.Type));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(window));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.NDT {
|
||||
namespace FineUIPro.Web.HJGL.NDT
|
||||
{
|
||||
|
||||
|
||||
public partial class NDTBatch {
|
||||
public partial class NDTBatch
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -102,6 +104,24 @@ namespace FineUIPro.Web.HJGL.NDT {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearchCode;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar6;
|
||||
|
||||
/// <summary>
|
||||
/// btnUnitWorkImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUnitWorkImport;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NDTBatchUnitImport.aspx.cs" Inherits="FineUIPro.Web.HJGL.NDT.NDTBatchUnitImport" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>检测结果导入</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Left" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="lblUnitWork" Label="单位工程" LabelWidth="80px" runat="server" />
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" Text="下载模板"
|
||||
ToolTip="下载空白检测结果导入模板" OnClick="btnDownLoad_Click"
|
||||
EnablePostBack="true" EnableAjax="false" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:FileUpload ID="fuAttachUrl" runat="server" Label="导入文件" LabelWidth="80px"
|
||||
EmptyText="选择要导入的 .xlsx 文件" />
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" Text="审核并预览"
|
||||
ToolTip="校验导入文件并预览" OnClick="btnAudit_Click" />
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交导入"
|
||||
ToolTip="提交当前预览数据" OnClick="btnSave_Click" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" Height="520px" DataKeyNames="TrustBatchItemId" DataIDField="TrustBatchItemId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" AllowPaging="true" PageSize="100"
|
||||
EnableTextSelection="true" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
<Columns>
|
||||
<f:RenderField Width="60px" DataField="RowNumber" HeaderText="序号"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="180px" DataField="TrustBatchCode" HeaderText="委托编号"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="180px" DataField="PipelineCode" HeaderText="管线号"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="120px" DataField="WeldJointCode" HeaderText="检件焊口号"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="100px" DataField="WelderCode" HeaderText="焊工号"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="90px" DataField="TotalFilm" HeaderText="检测总数"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="80px" DataField="PassFilm" HeaderText="合格数"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="90px" DataField="CheckResultText" HeaderText="是否合格"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="90px" DataField="JudgeGrade" HeaderText="评定级别"
|
||||
HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="140px" DataField="CheckDefectsText" HeaderText="缺陷"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="140px" DataField="RepairLocation" HeaderText="返修位置"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="180px" DataField="Remark" HeaderText="备注"
|
||||
HeaderTextAlign="Center" TextAlign="Left" />
|
||||
<f:RenderField Width="110px" DataField="FilmDate" HeaderText="检测日期"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="110px" DataField="ReportDate" HeaderText="报告日期"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,496 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.NDT
|
||||
{
|
||||
public partial class NDTBatchUnitImport : PageBase
|
||||
{
|
||||
private static readonly string[] TemplateColumns =
|
||||
{
|
||||
"序号", "委托编号", "管线号", "检件焊口号", "焊工号", "检测总数",
|
||||
"合格数", "是否合格", "评定级别", "缺陷", "返修位置", "备注",
|
||||
"检测日期", "报告日期"
|
||||
};
|
||||
|
||||
private string UnitWorkId
|
||||
{
|
||||
get { return Convert.ToString(ViewState["UnitWorkId"]); }
|
||||
set { ViewState["UnitWorkId"] = value; }
|
||||
}
|
||||
|
||||
private string NDTType
|
||||
{
|
||||
get { return Convert.ToString(ViewState["NDTType"]); }
|
||||
set { ViewState["NDTType"] = value; }
|
||||
}
|
||||
|
||||
private string ImportCacheKey
|
||||
{
|
||||
get { return Convert.ToString(ViewState["ImportCacheKey"]); }
|
||||
set { ViewState["ImportCacheKey"] = value; }
|
||||
}
|
||||
|
||||
private List<UnitWorkNDEImportItem> ImportItems
|
||||
{
|
||||
get
|
||||
{
|
||||
return Session[ImportCacheKey] as List<UnitWorkNDEImportItem>
|
||||
?? new List<UnitWorkNDEImportItem>();
|
||||
}
|
||||
set { Session[ImportCacheKey] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UnitWorkId = Request.QueryString["unitWorkId"];
|
||||
NDTType = Request.QueryString["type"];
|
||||
ImportCacheKey = "NDTBatchUnitImport_" + Guid.NewGuid().ToString("N");
|
||||
ImportItems = new List<UnitWorkNDEImportItem>();
|
||||
|
||||
WBS_UnitWork unitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x =>
|
||||
x.UnitWorkId == UnitWorkId
|
||||
&& x.ProjectId == CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null);
|
||||
if (unitWork == null)
|
||||
{
|
||||
btnAudit.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
btnDownLoad.Enabled = false;
|
||||
ShowNotify("单位工程不存在或不属于当前项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
lblUnitWork.Text = unitWork.UnitWorkCode + " " + unitWork.UnitWorkName;
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
string templatePath = Server.MapPath("~/" + Const.NDTBatchUnitImportTemplateUrl.Replace("\\", "/"));
|
||||
if (!File.Exists(templatePath))
|
||||
{
|
||||
ShowNotify("检测结果导入模板不存在,请联系管理员!", MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
FileInfo info = new FileInfo(templatePath);
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("检测结果导入模板.xlsx", System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", info.Length.ToString());
|
||||
Response.TransmitFile(templatePath, 0, info.Length);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
}
|
||||
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!fuAttachUrl.HasFile)
|
||||
{
|
||||
ShowNotify("请选择要导入的 Excel 文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string extension = Path.GetExtension(fuAttachUrl.FileName).ToLowerInvariant();
|
||||
if (extension != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能导入 .xlsx 文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadDirectory = Path.Combine(rootPath, Const.ExcelUrl);
|
||||
if (!Directory.Exists(uploadDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(uploadDirectory);
|
||||
}
|
||||
|
||||
string filePath = Path.Combine(uploadDirectory, Funs.GetNewFileName() + extension);
|
||||
try
|
||||
{
|
||||
fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
DataTable table = MiniExcel.QueryAsDataTable(filePath, useHeaderRow: true);
|
||||
List<string> errors;
|
||||
List<UnitWorkNDEImportItem> importItems = ParseImportItems(table, out errors);
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
ImportItems = new List<UnitWorkNDEImportItem>();
|
||||
BindGrid();
|
||||
ShowErrors(errors);
|
||||
return;
|
||||
}
|
||||
|
||||
ImportItems = importItems;
|
||||
BindGrid();
|
||||
ShowNotify("审核完成,共 " + importItems.Count + " 条,请确认后提交导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ImportItems = new List<UnitWorkNDEImportItem>();
|
||||
BindGrid();
|
||||
ShowNotify("读取导入文件失败:" + ex.Message, MessageBoxIcon.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_NDTBatchMenuId, Const.BtnSave))
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
List<UnitWorkNDEImportItem> importItems = ImportItems;
|
||||
if (importItems.Count == 0)
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Batch_NDEImportService.Import(CurrUser.LoginProjectId, UnitWorkId, CurrUser.PersonId, importItems);
|
||||
Session.Remove(ImportCacheKey);
|
||||
ShowNotify("成功导入 " + importItems.Count + " 条检测结果!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
private List<UnitWorkNDEImportItem> ParseImportItems(DataTable table, out List<string> errors)
|
||||
{
|
||||
errors = new List<string>();
|
||||
List<UnitWorkNDEImportItem> result = new List<UnitWorkNDEImportItem>();
|
||||
if (table == null || table.Rows.Count == 0)
|
||||
{
|
||||
errors.Add("导入数据为空!");
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> missingColumns = TemplateColumns.Where(x => !table.Columns.Contains(x)).ToList();
|
||||
if (missingColumns.Count > 0)
|
||||
{
|
||||
errors.Add("导入 Excel 格式错误,缺少列:" + string.Join("、", missingColumns));
|
||||
return result;
|
||||
}
|
||||
|
||||
List<View_Batch_BatchTrustItem> trustItems = GetUnitWorkTrustItems();
|
||||
Dictionary<string, View_Batch_BatchTrust> trustMap = Funs.DB.View_Batch_BatchTrust
|
||||
.Where(x => x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkId == UnitWorkId)
|
||||
.ToList()
|
||||
.Where(IsCurrentNDTType)
|
||||
.GroupBy(x => Normalize(x.TrustBatchCode))
|
||||
.ToDictionary(x => x.Key, x => x.First());
|
||||
HashSet<string> importedTrustBatchIds = new HashSet<string>(Funs.DB.HJGL_Batch_NDE
|
||||
.Where(x => x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkId == UnitWorkId)
|
||||
.Select(x => x.TrustBatchId)
|
||||
.ToList());
|
||||
Dictionary<string, Base_Defect> defectMap = Funs.DB.Base_Defect
|
||||
.ToList()
|
||||
.GroupBy(x => Normalize(x.DefectName))
|
||||
.ToDictionary(x => x.Key, x => x.First());
|
||||
HashSet<string> rowKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
for (int index = 0; index < table.Rows.Count; index++)
|
||||
{
|
||||
DataRow row = table.Rows[index];
|
||||
int excelRowNumber = index + 2;
|
||||
string trustBatchCode = GetCellValue(row, "委托编号");
|
||||
string pipelineCode = GetCellValue(row, "管线号");
|
||||
string weldJointCode = GetCellValue(row, "检件焊口号");
|
||||
string totalFilmText = GetCellValue(row, "检测总数");
|
||||
string passFilmText = GetCellValue(row, "合格数");
|
||||
string filmDateText = GetCellValue(row, "检测日期");
|
||||
string reportDateText = GetCellValue(row, "报告日期");
|
||||
|
||||
if (string.IsNullOrEmpty(trustBatchCode)
|
||||
&& string.IsNullOrEmpty(pipelineCode)
|
||||
&& string.IsNullOrEmpty(weldJointCode)
|
||||
&& string.IsNullOrEmpty(totalFilmText)
|
||||
&& string.IsNullOrEmpty(passFilmText)
|
||||
&& string.IsNullOrEmpty(filmDateText)
|
||||
&& string.IsNullOrEmpty(reportDateText))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
int errorCount = errors.Count;
|
||||
int sequence = index + 1;
|
||||
string sequenceText = GetCellValue(row, "序号");
|
||||
if (!string.IsNullOrEmpty(sequenceText)
|
||||
&& (!int.TryParse(sequenceText, out sequence) || sequence <= 0))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:序号必须为大于 0 的整数");
|
||||
}
|
||||
|
||||
View_Batch_BatchTrust trust = null;
|
||||
if (string.IsNullOrEmpty(trustBatchCode) || !trustMap.TryGetValue(Normalize(trustBatchCode), out trust))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:委托编号[" + trustBatchCode + "]不属于当前单位工程");
|
||||
}
|
||||
else if (importedTrustBatchIds.Contains(trust.TrustBatchId))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:委托编号[" + trustBatchCode + "]已存在检测结果,不能重复导入");
|
||||
}
|
||||
|
||||
View_Batch_BatchTrustItem trustItem = null;
|
||||
if (trust != null)
|
||||
{
|
||||
trustItem = trustItems.FirstOrDefault(x =>
|
||||
x.TrustBatchId == trust.TrustBatchId
|
||||
&& Normalize(x.PipelineCode) == Normalize(pipelineCode)
|
||||
&& Normalize(x.WeldJointCode) == Normalize(weldJointCode));
|
||||
if (trustItem == null)
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:管线[" + pipelineCode + "]焊口[" + weldJointCode + "]不存在于该委托单");
|
||||
}
|
||||
}
|
||||
|
||||
string welderCode = GetCellValue(row, "焊工号");
|
||||
if (trustItem != null && !string.IsNullOrEmpty(welderCode)
|
||||
&& Normalize(trustItem.WelderCode) != Normalize(welderCode))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:焊工号[" + welderCode + "]与委托明细不一致");
|
||||
}
|
||||
|
||||
int totalFilm;
|
||||
if (!int.TryParse(totalFilmText, out totalFilm) || totalFilm <= 0)
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:检测总数必须为大于 0 的整数");
|
||||
}
|
||||
|
||||
int passFilm;
|
||||
if (!int.TryParse(passFilmText, out passFilm) || passFilm < 0)
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:合格数必须为不小于 0 的整数");
|
||||
}
|
||||
else if (totalFilm > 0 && passFilm > totalFilm)
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:合格数不能大于检测总数");
|
||||
}
|
||||
|
||||
string checkResultText = GetCellValue(row, "是否合格");
|
||||
string checkResult = ConvertCheckResult(checkResultText);
|
||||
if (string.IsNullOrEmpty(checkResult))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:是否合格只能填写“合格”或“不合格”");
|
||||
}
|
||||
|
||||
string judgeGrade = ConvertJudgeGrade(GetCellValue(row, "评定级别"));
|
||||
if (judgeGrade == null)
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:评定级别只能填写Ⅰ、Ⅱ、Ⅲ、Ⅳ、Ⅴ或1-5");
|
||||
}
|
||||
|
||||
string defectText = GetCellValue(row, "缺陷");
|
||||
List<string> defectIds = new List<string>();
|
||||
if (!string.IsNullOrEmpty(defectText))
|
||||
{
|
||||
foreach (string defectName in SplitDefects(defectText))
|
||||
{
|
||||
Base_Defect defect;
|
||||
if (!defectMap.TryGetValue(Normalize(defectName), out defect))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:缺陷[" + defectName + "]不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
defectIds.Add(Convert.ToString(defect.DefectId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string rowKey = Normalize(trustBatchCode) + "|" + Normalize(pipelineCode) + "|" + Normalize(weldJointCode);
|
||||
if (!rowKeys.Add(rowKey))
|
||||
{
|
||||
errors.Add("第" + excelRowNumber + "行:同一委托、管线和焊口在文件中重复");
|
||||
}
|
||||
|
||||
// 两个日期均为非必填列;兼容 Excel 日期单元格、序列值和常见日期文本。
|
||||
DateTime? filmDate = ParseOptionalDate(row, "检测日期", excelRowNumber, errors);
|
||||
DateTime? reportDate = ParseOptionalDate(row, "报告日期", excelRowNumber, errors);
|
||||
|
||||
if (errors.Count == errorCount && trust != null && trustItem != null)
|
||||
{
|
||||
result.Add(new UnitWorkNDEImportItem
|
||||
{
|
||||
RowNumber = sequence,
|
||||
TrustBatchId = trust.TrustBatchId,
|
||||
TrustBatchCode = trust.TrustBatchCode,
|
||||
TrustBatchItemId = trustItem.TrustBatchItemId,
|
||||
PipelineCode = trustItem.PipelineCode,
|
||||
WeldJointCode = trustItem.WeldJointCode,
|
||||
WelderCode = trustItem.WelderCode,
|
||||
TotalFilm = totalFilm,
|
||||
PassFilm = passFilm,
|
||||
CheckResult = checkResult,
|
||||
CheckResultText = checkResultText == "是" ? "合格" : checkResultText == "否" ? "不合格" : checkResultText,
|
||||
JudgeGrade = judgeGrade,
|
||||
CheckDefects = string.Join(",", defectIds.Distinct()),
|
||||
CheckDefectsText = defectText,
|
||||
RepairLocation = GetCellValue(row, "返修位置"),
|
||||
Remark = GetCellValue(row, "备注"),
|
||||
FilmDate = filmDate,
|
||||
ReportDate = reportDate
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (result.Count == 0 && errors.Count == 0)
|
||||
{
|
||||
errors.Add("导入数据为空!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<View_Batch_BatchTrustItem> GetUnitWorkTrustItems()
|
||||
{
|
||||
return Funs.DB.View_Batch_BatchTrustItem
|
||||
.Where(x => x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkId == UnitWorkId && x.PipelineCode !=null)
|
||||
.ToList()
|
||||
.Where(IsCurrentNDTType)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private bool IsCurrentNDTType(View_Batch_BatchTrustItem item)
|
||||
{
|
||||
return NDTType == "R" ? item.TrustType == "R" : string.IsNullOrEmpty(item.TrustType);
|
||||
}
|
||||
|
||||
private bool IsCurrentNDTType(View_Batch_BatchTrust item)
|
||||
{
|
||||
return NDTType == "R" ? item.TrustType == "R" : string.IsNullOrEmpty(item.TrustType);
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
List<UnitWorkNDEImportItem> items = ImportItems;
|
||||
Grid1.RecordCount = items.Count;
|
||||
Grid1.DataSource = items.Skip(Grid1.PageIndex * Grid1.PageSize).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
private void ShowErrors(IEnumerable<string> errors)
|
||||
{
|
||||
Alert alert = new Alert
|
||||
{
|
||||
Message = string.Join("<br/>", errors.Distinct().Select(HttpUtility.HtmlEncode)),
|
||||
Target = Target.Self
|
||||
};
|
||||
alert.Show();
|
||||
}
|
||||
|
||||
private static string GetCellValue(DataRow row, string columnName)
|
||||
{
|
||||
return Convert.ToString(row[columnName]).Replace("\n", "").Replace("\t", "").Replace("\r", "").Trim();
|
||||
}
|
||||
|
||||
private static DateTime? ParseOptionalDate(DataRow row, string columnName, int excelRowNumber, ICollection<string> errors)
|
||||
{
|
||||
object rawValue = row[columnName];
|
||||
string value = Convert.ToString(rawValue).Trim();
|
||||
if (rawValue == null || rawValue == DBNull.Value || string.IsNullOrEmpty(value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (rawValue is DateTime)
|
||||
{
|
||||
return ((DateTime)rawValue).Date;
|
||||
}
|
||||
|
||||
double oaDate;
|
||||
if (double.TryParse(value, out oaDate))
|
||||
{
|
||||
try
|
||||
{
|
||||
return DateTime.FromOADate(oaDate).Date;
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
// 无效序列值继续按日期文本处理,最终给出统一提示。
|
||||
}
|
||||
}
|
||||
|
||||
DateTime date;
|
||||
if (DateTime.TryParse(value, out date))
|
||||
{
|
||||
return date.Date;
|
||||
}
|
||||
|
||||
errors.Add("第" + excelRowNumber + "行:" + columnName + "格式错误,应填写有效日期");
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string Normalize(string value)
|
||||
{
|
||||
return (value ?? string.Empty).Replace(" ", string.Empty).Trim().ToUpperInvariant();
|
||||
}
|
||||
|
||||
private static string ConvertCheckResult(string value)
|
||||
{
|
||||
if (value == "合格" || value == "是")
|
||||
{
|
||||
return "1";
|
||||
}
|
||||
if (value == "不合格" || value == "否")
|
||||
{
|
||||
return "2";
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private static string ConvertJudgeGrade(string value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case "": return string.Empty;
|
||||
case "Ⅰ":
|
||||
case "1": return "Ⅰ";
|
||||
case "Ⅱ":
|
||||
case "2": return "Ⅱ";
|
||||
case "Ⅲ":
|
||||
case "3": return "Ⅲ";
|
||||
case "Ⅳ":
|
||||
case "4": return "Ⅳ";
|
||||
case "Ⅴ":
|
||||
case "5": return "Ⅴ";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<string> SplitDefects(string value)
|
||||
{
|
||||
return value.Split(new[] { ',', ',', '、', ';', ';' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => x.Trim())
|
||||
.Where(x => !string.IsNullOrEmpty(x));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.NDT
|
||||
{
|
||||
public partial class NDTBatchUnitImport
|
||||
{
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
protected global::FineUIPro.Label lblUnitWork;
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,11 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlCheckCode" runat="server" Label="检测编号" Width="300px"
|
||||
LabelWidth="80px" EnableEdit="true" AutoSelectFirstItem="false"
|
||||
EmptyText="请选择检测编号">
|
||||
<f:ListItem Text="全部" Value="" />
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号" Width="250px"
|
||||
LabelWidth="70px" />
|
||||
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号" Width="220px"
|
||||
@@ -41,6 +46,8 @@
|
||||
<f:Button ID="btnQuery" runat="server" Text="查询" Icon="SystemSearch"
|
||||
OnClick="btnQuery_Click" />
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnPrint" runat="server" Text="打印" Icon="Printer"
|
||||
OnClick="btnPrint_Click" />
|
||||
<f:Button ID="btnNew" runat="server" Text="新增" Icon="Add"
|
||||
OnClick="btnNew_Click" />
|
||||
<f:Button ID="btnEdit" runat="server" Text="修改" Icon="Pencil"
|
||||
@@ -52,6 +59,7 @@
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField Width="60px" HeaderText="序号" TextAlign="Center" />
|
||||
<f:RenderField Width="210px" DataField="CheckCode" HeaderText="检测编号" />
|
||||
<f:RenderField Width="220px" DataField="PipelineCode" HeaderText="管线号" />
|
||||
<f:RenderField Width="130px" DataField="WeldJointCode" HeaderText="焊口号" />
|
||||
<f:RenderField Width="100px" DataField="QualifiedText" HeaderText="外观是否合格"
|
||||
@@ -81,6 +89,9 @@
|
||||
<f:Window ID="Window1" Title="焊缝外观检测" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="760px" Height="560px" />
|
||||
<f:Window ID="Window2" Title="打印预览" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1100px" Height="700px" />
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var gridImageSelector = '#<%= Grid1.ClientID %> img.img';
|
||||
@@ -107,6 +118,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
@@ -8,18 +11,37 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack) BindGrid();
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindCheckCodes();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindCheckCodes()
|
||||
{
|
||||
foreach (string checkCode in WeldAppearanceCheckService.GetCheckCodes(CurrUser.LoginProjectId))
|
||||
{
|
||||
ddlCheckCode.Items.Add(new FineUIPro.ListItem(checkCode, checkCode));
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
var result = WeldAppearanceCheckService.GetList(CurrUser.LoginProjectId, txtPipelineCode.Text.Trim(),
|
||||
txtWeldJointCode.Text.Trim(), ddlQualified.SelectedValue, Grid1.PageIndex, Grid1.PageSize);
|
||||
var result = GetCurrentPageData();
|
||||
Grid1.RecordCount = result.Item2;
|
||||
Grid1.DataSource = result.Item1;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
private Tuple<List<Model.WeldAppearanceCheckItem>, int> GetCurrentPageData()
|
||||
{
|
||||
return WeldAppearanceCheckService.GetList(CurrUser.LoginProjectId,
|
||||
(ddlCheckCode.SelectedValue ?? string.Empty).Trim(),
|
||||
txtPipelineCode.Text.Trim(), txtWeldJointCode.Text.Trim(), ddlQualified.SelectedValue,
|
||||
Grid1.PageIndex, Grid1.PageSize);
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { Grid1.PageIndex = e.NewPageIndex; BindGrid(); }
|
||||
protected void btnQuery_Click(object sender, EventArgs e) { Grid1.PageIndex = 0; BindGrid(); }
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e) { BindGrid(); }
|
||||
@@ -61,6 +83,100 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string checkCode = (ddlCheckCode.SelectedValue ?? string.Empty).Trim();
|
||||
if (string.IsNullOrEmpty(checkCode))
|
||||
{
|
||||
Alert.ShowInTop("请选择检测编号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!HasPower(Const.BtnPrint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var printResult = WeldAppearanceCheckService.GetList(CurrUser.LoginProjectId, checkCode,
|
||||
txtPipelineCode.Text.Trim(), txtWeldJointCode.Text.Trim(), ddlQualified.SelectedValue,
|
||||
0, int.MaxValue);
|
||||
List<Model.WeldAppearanceCheckItem> printItems = printResult.Item1;
|
||||
if (printItems.Count == 0)
|
||||
{
|
||||
Alert.ShowInTop("当前筛选条件没有可打印的焊口记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
DataTable reportData = CreateReportData(printItems);
|
||||
var parameters = new Dictionary<string, string>
|
||||
{
|
||||
{ "ProjectName", ProjectService.GetProjectNameByProjectId(CurrUser.LoginProjectId) },
|
||||
{ "CheckCode", checkCode },
|
||||
{ "NDTMethod", "RT" },
|
||||
// 报检数量使用本次实际打印的焊口总数,不包含版式补齐的空行。
|
||||
{ "InspectionCount", printItems.Count.ToString() },
|
||||
{ "DetectionRate", string.Empty }
|
||||
};
|
||||
|
||||
FastReportService.ResetData();
|
||||
FastReportService.AddFastreportTable(reportData);
|
||||
FastReportService.AddFastreportParameter(parameters);
|
||||
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = Const.WeldAppearanceCheckReportTemplateUrl;
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(string.Format(
|
||||
"~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("打印模板不存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private static DataTable CreateReportData(List<Model.WeldAppearanceCheckItem> items)
|
||||
{
|
||||
var table = new DataTable("Data");
|
||||
table.Columns.Add("RowNumber", typeof(int));
|
||||
table.Columns.Add("PipelineCode", typeof(string));
|
||||
table.Columns.Add("WeldJointCode", typeof(string));
|
||||
table.Columns.Add("WelderCode", typeof(string));
|
||||
table.Columns.Add("Specification", typeof(string));
|
||||
table.Columns.Add("MaterialCode", typeof(string));
|
||||
table.Columns.Add("WeldingLocation", typeof(string));
|
||||
table.Columns.Add("WeldingMethodCode", typeof(string));
|
||||
table.Columns.Add("WeldingMaterial", typeof(string));
|
||||
table.Columns.Add("ItemCode", typeof(string));
|
||||
table.Columns.Add("BatchCode", typeof(string));
|
||||
table.Columns.Add("Remark", typeof(string));
|
||||
|
||||
const int regularPageRowCount = 14;
|
||||
const int lastPageRowCount = 12;
|
||||
int reportRowCount = items.Count <= lastPageRowCount
|
||||
? lastPageRowCount
|
||||
: lastPageRowCount + (int)Math.Ceiling((items.Count - lastPageRowCount)
|
||||
/ (decimal)regularPageRowCount) * regularPageRowCount;
|
||||
for (int i = 0; i < reportRowCount; i++)
|
||||
{
|
||||
if (i < items.Count)
|
||||
{
|
||||
Model.WeldAppearanceCheckItem item = items[i];
|
||||
// 明细字段严格对应检查表模板;物料代码和炉批号当前业务无来源,保持空白待签填。
|
||||
table.Rows.Add(i + 1, item.PipelineCode, item.WeldJointCode, item.WelderCode,
|
||||
item.Specification, item.MaterialCode, item.WeldingLocation, item.WeldingMethodCode,
|
||||
item.WeldingMaterial, string.Empty, string.Empty, item.Remark);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 普通页显示14行、末页显示12行,不足部分补空行,使签字区紧跟末页数据区。
|
||||
table.Rows.Add(i + 1, string.Empty, string.Empty, string.Empty, string.Empty,
|
||||
string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
|
||||
string.Empty, string.Empty);
|
||||
}
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
private void OpenSelectedRecord()
|
||||
{
|
||||
if (!EnsureSelected() || !HasPower(Const.BtnModify)) return;
|
||||
|
||||
@@ -50,6 +50,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlCheckCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlCheckCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
@@ -86,6 +95,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -130,5 +148,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldMatMatch.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.WeldMatMatch" %>
|
||||
|
||||
<%@ Register Src="~/Controls/_3DLook.ascx" TagName="_3DLook" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
@@ -136,10 +135,6 @@
|
||||
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelTopRegion" RegionPosition="Top" ShowBorder="true" RegionPercent="30%" IsFluid="true" Hidden="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
|
||||
TitleToolTip="三维模型显示" AutoScroll="true" IFrameUrl="../../CLGL/ArrivalStatistics.aspx" EnableIFrame="true">
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" RegionPercent="30%"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
|
||||
TitleToolTip="三维模型显示" AutoScroll="true">
|
||||
@@ -263,11 +258,6 @@
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var panelTopRegionCD = '<%= panelTopRegion.ClientID %>';
|
||||
function getiframWidth() {
|
||||
return F(panelTopRegionCD).getWidth();
|
||||
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
@@ -328,17 +328,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <returns>符合材料匹配入口条件的管线列表。</returns>
|
||||
private List<Model.HJGL_Pipeline> GetTestPackagePipelineList(string ptpId)
|
||||
{
|
||||
var completeInOutPlanDetailRelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
where y.State == (int)TwConst.State.已完成 && y.WarehouseId == drpWarehouse.SelectedValue
|
||||
select x;
|
||||
//var completeInOutPlanDetailRelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
// join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
// where y.State == (int)TwConst.State.已完成 && y.WarehouseId == drpWarehouse.SelectedValue
|
||||
// select x;
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
join p in Funs.DB.PTP_PipelineList on x.PipelineId equals p.PipelineId
|
||||
join y in completeInOutPlanDetailRelationList on x.PipelineId equals y.PipelineId into temp
|
||||
from y in temp.DefaultIfEmpty()
|
||||
where y == null
|
||||
&& p.PTP_ID == ptpId
|
||||
where p.PTP_ID == ptpId
|
||||
&& x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& x.WarehouseId == WarehouseId
|
||||
|
||||
@@ -212,15 +212,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// panelTopRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelTopRegion;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -266,6 +266,11 @@
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:WindowField ColumnID="PendingEdit" HeaderText="操作" Text="编辑" Width="60px"
|
||||
HeaderTextAlign="Center" TextAlign="Center" WindowID="WindowPendingEdit" Locked="true"
|
||||
DataIFrameUrlFields="TempDetailId"
|
||||
DataIFrameUrlFormatString="WeldingDailyTempDetailEdit.aspx?TempDetailId={0}">
|
||||
</f:WindowField>
|
||||
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="180px">
|
||||
</f:RenderField>
|
||||
@@ -364,6 +369,10 @@
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="WindowPendingEdit" Title="编辑待审核焊接工艺" Hidden="true" EnableIFrame="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="WindowPendingEdit_Close"
|
||||
IsModal="true" Width="680px" Height="320px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1400px" Height="650px">
|
||||
@@ -380,6 +389,9 @@
|
||||
<f:MenuButton ID="btnMenuOut" OnClick="btnOut_Click" Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false"
|
||||
runat="server" Text="导出">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuWeldingLogOut" OnClick="btnWeldingLogOut_Click" Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false"
|
||||
runat="server" Text="导出(焊接日志)">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Top"
|
||||
runat="server" Text="删除">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -634,6 +636,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭待审核工艺编辑窗口后刷新当前页。
|
||||
/// </summary>
|
||||
protected void WindowPendingEdit_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindPendingGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
@@ -720,6 +730,135 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出俄文焊接日志。
|
||||
/// </summary>
|
||||
protected void btnWeldingLogOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (tvControlItem.SelectedNode == null
|
||||
|| (tvControlItem.SelectedNode.CommandName != "UnitWork"
|
||||
&& tvControlItem.SelectedNode.CommandName != "WeldingDaily"))
|
||||
{
|
||||
Alert.ShowInTop("请选择单位工程或焊接日报!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string unitWorkId = null;
|
||||
string weldingDailyId = null;
|
||||
string fileName;
|
||||
if (tvControlItem.SelectedNode.CommandName == "WeldingDaily")
|
||||
{
|
||||
weldingDailyId = tvControlItem.SelectedNodeID;
|
||||
var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(weldingDailyId);
|
||||
if (daily == null || daily.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
Alert.ShowInTop("所选焊接日报不存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var unitWork = UnitWorkService.getUnitWorkByUnitWorkId(daily.UnitWorkId);
|
||||
fileName = "焊接日志-" + (unitWork == null ? string.Empty : unitWork.UnitWorkName + "-")
|
||||
+ daily.WeldingDailyCode + ".xlsx";
|
||||
}
|
||||
else
|
||||
{
|
||||
unitWorkId = tvControlItem.SelectedNodeID;
|
||||
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(unitWorkId);
|
||||
if (unitWork == null || unitWork.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
Alert.ShowInTop("所选单位工程不存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
fileName = "焊接日志-" + unitWork.UnitWorkName + "-" + txtMonth.Text.Trim() + ".xlsx";
|
||||
}
|
||||
|
||||
DataTable data = BLL.WeldingDailyService.GetWeldingLogExportData(
|
||||
this.CurrUser.LoginProjectId, unitWorkId, weldingDailyId, txtMonth.Text.Trim());
|
||||
if (data.Rows.Count == 0)
|
||||
{
|
||||
Alert.ShowInTop("无数据,无法导出!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] fileBytes;
|
||||
var workbook = new XSSFWorkbook();
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
ISheet sheet = workbook.CreateSheet("Сварочный журнал");
|
||||
ICellStyle headerStyle = workbook.CreateCellStyle();
|
||||
headerStyle.Alignment = HorizontalAlignment.Center;
|
||||
headerStyle.VerticalAlignment = VerticalAlignment.Center;
|
||||
headerStyle.WrapText = true;
|
||||
headerStyle.BorderTop = BorderStyle.Thin;
|
||||
headerStyle.BorderRight = BorderStyle.Thin;
|
||||
headerStyle.BorderBottom = BorderStyle.Thin;
|
||||
headerStyle.BorderLeft = BorderStyle.Thin;
|
||||
IFont headerFont = workbook.CreateFont();
|
||||
headerFont.IsBold = true;
|
||||
headerFont.FontHeightInPoints = 10;
|
||||
headerStyle.SetFont(headerFont);
|
||||
|
||||
ICellStyle dataStyle = workbook.CreateCellStyle();
|
||||
dataStyle.Alignment = HorizontalAlignment.Center;
|
||||
dataStyle.VerticalAlignment = VerticalAlignment.Center;
|
||||
dataStyle.WrapText = true;
|
||||
dataStyle.BorderTop = BorderStyle.Thin;
|
||||
dataStyle.BorderRight = BorderStyle.Thin;
|
||||
dataStyle.BorderBottom = BorderStyle.Thin;
|
||||
dataStyle.BorderLeft = BorderStyle.Thin;
|
||||
|
||||
IRow headerRow = sheet.CreateRow(0);
|
||||
headerRow.HeightInPoints = 90;
|
||||
for (int columnIndex = 0; columnIndex < data.Columns.Count; columnIndex++)
|
||||
{
|
||||
ICell cell = headerRow.CreateCell(columnIndex);
|
||||
cell.SetCellValue(data.Columns[columnIndex].ColumnName);
|
||||
cell.CellStyle = headerStyle;
|
||||
}
|
||||
|
||||
for (int rowIndex = 0; rowIndex < data.Rows.Count; rowIndex++)
|
||||
{
|
||||
IRow row = sheet.CreateRow(rowIndex + 1);
|
||||
row.HeightInPoints = 30;
|
||||
for (int columnIndex = 0; columnIndex < data.Columns.Count; columnIndex++)
|
||||
{
|
||||
ICell cell = row.CreateCell(columnIndex);
|
||||
object value = data.Rows[rowIndex][columnIndex];
|
||||
if (columnIndex == 0 && value != DBNull.Value)
|
||||
{
|
||||
cell.SetCellValue(Convert.ToDouble(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.SetCellValue(value == DBNull.Value ? string.Empty : value.ToString());
|
||||
}
|
||||
cell.CellStyle = dataStyle;
|
||||
}
|
||||
}
|
||||
|
||||
int[] columnWidths = { 6, 45, 25, 35, 25, 25, 16, 45, 24, 18, 26, 24, 24, 28, 35, 45, 35 };
|
||||
for (int i = 0; i < columnWidths.Length; i++)
|
||||
{
|
||||
sheet.SetColumnWidth(i, columnWidths[i] * 256);
|
||||
}
|
||||
sheet.CreateFreezePane(0, 1);
|
||||
sheet.FitToPage = true;
|
||||
sheet.PrintSetup.Landscape = true;
|
||||
sheet.PrintSetup.FitWidth = 1;
|
||||
workbook.Write(stream);
|
||||
fileBytes = stream.ToArray();
|
||||
}
|
||||
|
||||
HttpResponse response = HttpContext.Current.Response;
|
||||
response.Clear();
|
||||
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
response.AddHeader("Content-Disposition", "attachment;filename="
|
||||
+ HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
response.AddHeader("Content-Length", fileBytes.Length.ToString());
|
||||
response.BinaryWrite(fileBytes);
|
||||
response.Flush();
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest();
|
||||
}
|
||||
|
||||
protected void btnMenuDeleteDetail_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
|
||||
@@ -410,6 +410,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPendingPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPendingEdit 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.Window WindowPendingEdit;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -464,6 +469,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuWeldingLogOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuWeldingLogOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldingDailyTempDetailEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.WeldingDailyTempDetailEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑待审核焊接工艺</title>
|
||||
<base target="_self" />
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="12px" runat="server">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号" Readonly="true" LabelWidth="90px" />
|
||||
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号" Readonly="true" LabelWidth="90px" />
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldingMethod" runat="server" Label="焊接方法"
|
||||
EnableEdit="true" LabelWidth="90px" />
|
||||
<f:DropDownList ID="drpWeldType" runat="server" Label="焊缝类型"
|
||||
EnableEdit="true" LabelWidth="90px" />
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldingWire" runat="server" Label="焊丝"
|
||||
EnableEdit="true" LabelWidth="90px" />
|
||||
<f:DropDownList ID="drpWeldingRod" runat="server" Label="焊条"
|
||||
EnableEdit="true" LabelWidth="90px" />
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" runat="server" Text="保存" Icon="SystemSave" OnClick="btnSave_Click" />
|
||||
<f:Button ID="btnClose" runat="server" Text="关闭" Icon="SystemClose" EnablePostBack="false" />
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,96 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldingDailyTempDetailEdit : PageBase
|
||||
{
|
||||
private string TempDetailId
|
||||
{
|
||||
get { return (string)ViewState["TempDetailId"]; }
|
||||
set { ViewState["TempDetailId"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (IsPostBack)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
TempDetailId = Request.Params["TempDetailId"];
|
||||
BindProcessDropDownLists();
|
||||
BindDetail();
|
||||
}
|
||||
|
||||
private void BindProcessDropDownLists()
|
||||
{
|
||||
Base_WeldingMethodService.InitWeldingMethodDropDownList(drpWeldingMethod, true, "请选择");
|
||||
Base_WeldTypeService.InitWeldTypeDropDownList(drpWeldType, "请选择", true);
|
||||
Base_ConsumablesService.InitConsumablesDropDownList(drpWeldingWire, true, "1", "请选择");
|
||||
Base_ConsumablesService.InitConsumablesDropDownList(drpWeldingRod, true, "2", "请选择");
|
||||
}
|
||||
|
||||
private void BindDetail()
|
||||
{
|
||||
var detail = WeldingDailyService.GetWeldingDailyTempDetailById(TempDetailId);
|
||||
if (detail == null || detail.ProjectId != CurrUser.LoginProjectId)
|
||||
{
|
||||
btnSave.Enabled = false;
|
||||
Alert.ShowInTop("待审核明细不存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
txtPipelineCode.Text = detail.PipelineCode;
|
||||
txtWeldJointCode.Text = detail.WeldJointCode;
|
||||
SetSelectedValue(drpWeldingMethod, detail.WeldingMethodId);
|
||||
SetSelectedValue(drpWeldType, detail.WeldTypeId);
|
||||
SetSelectedValue(drpWeldingWire, detail.WeldingWire);
|
||||
SetSelectedValue(drpWeldingRod, detail.WeldingRod);
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId,
|
||||
Const.HJGL_WeldReportMenuId, Const.BtnModify))
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string error = WeldingDailyService.UpdateWeldingDailyTempDetailParameters(
|
||||
new Model.WeldingDailyTempDetailEditInput
|
||||
{
|
||||
TempDetailId = TempDetailId,
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldingMethodId = NormalizeSelectedValue(drpWeldingMethod.SelectedValue),
|
||||
WeldTypeId = NormalizeSelectedValue(drpWeldType.SelectedValue),
|
||||
WeldingWire = NormalizeSelectedValue(drpWeldingWire.SelectedValue),
|
||||
WeldingRod = NormalizeSelectedValue(drpWeldingRod.SelectedValue)
|
||||
});
|
||||
if (!string.IsNullOrEmpty(error))
|
||||
{
|
||||
ShowNotify(error, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
LogService.AddLog(CurrUser.PersonId, "编辑焊接日报待审核工艺参数");
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
private static void SetSelectedValue(FineUIPro.DropDownList dropDownList, string value)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
dropDownList.SelectedValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
private static string NormalizeSelectedValue(string value)
|
||||
{
|
||||
return string.IsNullOrEmpty(value) || value == Const._Null ? null : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldingDailyTempDetailEdit
|
||||
{
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
protected global::FineUIPro.DropDownList drpWeldingMethod;
|
||||
protected global::FineUIPro.DropDownList drpWeldType;
|
||||
protected global::FineUIPro.DropDownList drpWeldingWire;
|
||||
protected global::FineUIPro.DropDownList drpWeldingRod;
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipePrefabricationSummary.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingReport.PipePrefabricationSummary" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>管道预制汇总</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" runat="server" ShowBorder="true" ShowHeader="false"
|
||||
Title="管道预制汇总" BoxFlex="1" EnableColumnLines="true" EnableTextSelection="true"
|
||||
DataKeyNames="RowKey" DataIDField="RowKey" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程"
|
||||
LabelAlign="Right" LabelWidth="80px" Width="320px" EmptyText="全部单位工程"
|
||||
EnableEdit="true" EnableCheckBoxSelect="true" EnableMultiSelect="true"
|
||||
AutoSelectFirstItem="false">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="dpReportDate" runat="server" Label="报表日期"
|
||||
LabelAlign="Right" LabelWidth="80px" Width="190px">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker ID="dpStartDate" runat="server" Label="日期范围"
|
||||
LabelAlign="Right" LabelWidth="80px" Width="190px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="lblDateSeparator" runat="server" Text="至"></f:Label>
|
||||
<f:DatePicker ID="dpEndDate" runat="server" Width="110px"></f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnQuery" runat="server" Text="查询" Icon="SystemSearch"
|
||||
OnClick="btnQuery_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnExport" runat="server" Text="导出" Icon="TableGo"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnExport_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="Unit<br/>(单位)" ColumnID="UnitCode" DataField="UnitCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Block<br/>(单位工程)" ColumnID="UnitWorkCode" DataField="UnitWorkCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="110px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Total Drawing Quantity<br/>(图纸总量)" ColumnID="TotalDrawingQuantity"
|
||||
DataField="TotalDrawingQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="175px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="ISO Drawing Qty-Cum.<br/>(DI,已收图累计)" ColumnID="IsoDrawingQuantity"
|
||||
DataField="IsoDrawingQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="190px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Work front Qty-Cum.<br/>(DI,可预制工作面累计)" ColumnID="WorkFrontQuantity"
|
||||
DataField="WorkFrontQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="210px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Completed Qty-Cum.<br/>(DI,累计已完成)" ColumnID="CompletedQuantity"
|
||||
DataField="CompletedQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="190px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Qty Complete (%)<br/>(完成量占比)" ColumnID="QuantityCompleteRate"
|
||||
DataField="QuantityCompleteRateDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Daily Qty<br/>(DI,昨天数据)" ColumnID="DailyQuantity"
|
||||
DataField="DailyQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Previous day Qty-Cum<br/>(DI,前天累计数据)" ColumnID="PreviousDayCumulativeQuantity"
|
||||
DataField="PreviousDayCumulativeQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="195px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="This Weekly Qty<br/>(DI,本周数据)" ColumnID="WeeklyQuantity"
|
||||
DataField="WeeklyQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="160px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Last week Qty-Cum.<br/>(DI,上周累计)" ColumnID="LastWeekCumulativeQuantity"
|
||||
DataField="LastWeekCumulativeQuantityDisplay" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Right" Width="185px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Note<br/>(备注)" ColumnID="Note" DataField="Note"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="120px"
|
||||
ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,194 @@
|
||||
using BLL;
|
||||
using MiniExcelLibs;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingReport
|
||||
{
|
||||
public partial class PipePrefabricationSummary : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UnitWorkService.InitUnitWorkDropDownList(drpUnitWork, CurrUser.LoginProjectId, false);
|
||||
DateTime today = DateTime.Today;
|
||||
int daysSinceMonday = ((int)today.DayOfWeek + 6) % 7;
|
||||
dpReportDate.SelectedDate = today;
|
||||
dpStartDate.SelectedDate = today.AddDays(-daysSinceMonday);
|
||||
dpEndDate.SelectedDate = today.AddDays(6 - daysSinceMonday);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime reportDate;
|
||||
DateTime startDate;
|
||||
DateTime endDate;
|
||||
if (!TryGetFilterDates(out reportDate, out startDate, out endDate))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string templatePath = Path.Combine(Funs.RootPath, "File", "Excel", "DataOut", "管道预制汇总模板.xlsx");
|
||||
if (!File.Exists(templatePath))
|
||||
{
|
||||
ShowNotify("未找到管道预制汇总导出模板!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
List<PipePrefabricationSummaryItem> rows = GetSummary(reportDate, startDate, endDate);
|
||||
var value = CreateExportValue(rows, reportDate);
|
||||
string fileName = string.Format(
|
||||
"管道预制汇总_{0:yyyyMMdd}_{1:yyyyMMdd}-{2:yyyyMMdd}.xlsx",
|
||||
reportDate,
|
||||
startDate,
|
||||
endDate);
|
||||
string filePath = Path.Combine(Funs.RootPath, "File", "Excel", "Temp", Guid.NewGuid().ToString("N") + ".xlsx");
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
|
||||
MiniExcel.SaveAsByTemplate(filePath, templatePath, value);
|
||||
DownloadExcel(filePath, fileName);
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
DateTime reportDate;
|
||||
DateTime startDate;
|
||||
DateTime endDate;
|
||||
if (!TryGetFilterDates(out reportDate, out startDate, out endDate))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<PipePrefabricationSummaryItem> rows = GetSummary(reportDate, startDate, endDate);
|
||||
Grid1.RecordCount = rows.Count;
|
||||
Grid1.DataSource = rows;
|
||||
Grid1.DataBind();
|
||||
BindSummary(rows);
|
||||
}
|
||||
|
||||
private List<PipePrefabricationSummaryItem> GetSummary(
|
||||
DateTime reportDate,
|
||||
DateTime startDate,
|
||||
DateTime endDate)
|
||||
{
|
||||
string[] unitWorkIds = drpUnitWork.SelectedValueArray
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x) && x != Const._Null)
|
||||
.ToArray();
|
||||
return PipePrefabricationSummaryService.GetSummary(
|
||||
CurrUser.LoginProjectId,
|
||||
unitWorkIds,
|
||||
startDate,
|
||||
endDate,
|
||||
reportDate);
|
||||
}
|
||||
|
||||
private bool TryGetFilterDates(
|
||||
out DateTime reportDate,
|
||||
out DateTime startDate,
|
||||
out DateTime endDate)
|
||||
{
|
||||
reportDate = DateTime.MinValue;
|
||||
startDate = DateTime.MinValue;
|
||||
endDate = DateTime.MinValue;
|
||||
if (!dpReportDate.SelectedDate.HasValue)
|
||||
{
|
||||
ShowNotify("请选择报表日期!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dpStartDate.SelectedDate.HasValue || !dpEndDate.SelectedDate.HasValue)
|
||||
{
|
||||
ShowNotify("请选择完整的日期范围!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
reportDate = dpReportDate.SelectedDate.Value.Date;
|
||||
startDate = dpStartDate.SelectedDate.Value.Date;
|
||||
endDate = dpEndDate.SelectedDate.Value.Date;
|
||||
if (startDate > endDate)
|
||||
{
|
||||
ShowNotify("开始日期不能晚于结束日期!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void BindSummary(ICollection<PipePrefabricationSummaryItem> rows)
|
||||
{
|
||||
decimal totalDrawing = rows.Sum(x => x.TotalDrawingQuantity);
|
||||
decimal completed = rows.Sum(x => x.CompletedQuantity);
|
||||
JObject summary = new JObject
|
||||
{
|
||||
{ "UnitCode", string.Empty },
|
||||
{ "UnitWorkCode", "Total" },
|
||||
{ "TotalDrawingQuantity", PipePrefabricationSummaryItem.FormatQuantity(totalDrawing) },
|
||||
{ "IsoDrawingQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.IsoDrawingQuantity)) },
|
||||
{ "WorkFrontQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.WorkFrontQuantity)) },
|
||||
{ "CompletedQuantity", PipePrefabricationSummaryItem.FormatQuantity(completed) },
|
||||
{ "QuantityCompleteRate", GetCompleteRate(completed, totalDrawing) },
|
||||
{ "DailyQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.DailyQuantity)) },
|
||||
{ "PreviousDayCumulativeQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.PreviousDayCumulativeQuantity)) },
|
||||
{ "WeeklyQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.WeeklyQuantity)) },
|
||||
{ "LastWeekCumulativeQuantity", PipePrefabricationSummaryItem.FormatQuantity(rows.Sum(x => x.LastWeekCumulativeQuantity)) },
|
||||
{ "Note", string.Empty }
|
||||
};
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
private static string GetCompleteRate(decimal completed, decimal totalDrawing)
|
||||
{
|
||||
return totalDrawing <= 0M ? "0.00%" : (completed * 100M / totalDrawing).ToString("0.00") + "%";
|
||||
}
|
||||
|
||||
private static Dictionary<string, object> CreateExportValue(
|
||||
ICollection<PipePrefabricationSummaryItem> rows,
|
||||
DateTime reportDate)
|
||||
{
|
||||
decimal totalDrawing = rows.Sum(x => x.TotalDrawingQuantity);
|
||||
decimal completed = rows.Sum(x => x.CompletedQuantity);
|
||||
// 只向模板上半部分的数据占位符传值;下方“陕西化建人力统计表”保持模板原样空白。
|
||||
return new Dictionary<string, object>
|
||||
{
|
||||
{ "ReportDate", reportDate.ToString("yyyy-MM-dd") },
|
||||
{ "Data", rows },
|
||||
// MiniExcel 1.31.3 的普通对象不支持模板中的嵌套属性,合计值使用扁平占位符。
|
||||
{ "TotalUnitCode", string.Empty },
|
||||
{ "TotalUnitWorkCode", "Total" },
|
||||
{ "TotalDrawingQuantity", totalDrawing },
|
||||
{ "TotalIsoDrawingQuantity", rows.Sum(x => x.IsoDrawingQuantity) },
|
||||
{ "TotalWorkFrontQuantity", rows.Sum(x => x.WorkFrontQuantity) },
|
||||
{ "TotalCompletedQuantity", completed },
|
||||
{ "TotalQuantityCompleteRate", GetCompleteRate(completed, totalDrawing) },
|
||||
{ "TotalDailyQuantity", rows.Sum(x => x.DailyQuantity) },
|
||||
{ "TotalPreviousDayCumulativeQuantity", rows.Sum(x => x.PreviousDayCumulativeQuantity) },
|
||||
{ "TotalWeeklyQuantity", rows.Sum(x => x.WeeklyQuantity) },
|
||||
{ "TotalLastWeekCumulativeQuantity", rows.Sum(x => x.LastWeekCumulativeQuantity) },
|
||||
{ "TotalNote", string.Empty }
|
||||
};
|
||||
}
|
||||
|
||||
private void DownloadExcel(string filePath, string fileName)
|
||||
{
|
||||
FileInfo file = new FileInfo(filePath);
|
||||
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", file.Length.ToString());
|
||||
Response.TransmitFile(filePath, 0, file.Length);
|
||||
Response.Flush();
|
||||
File.Delete(filePath);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingReport
|
||||
{
|
||||
|
||||
|
||||
public partial class PipePrefabricationSummary
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// dpReportDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpReportDate;
|
||||
|
||||
/// <summary>
|
||||
/// dpStartDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpStartDate;
|
||||
|
||||
/// <summary>
|
||||
/// lblDateSeparator 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblDateSeparator;
|
||||
|
||||
/// <summary>
|
||||
/// dpEndDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnExport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnExport;
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,7 @@
|
||||
<TreeNode id="41C22E63-36B7-4C44-89EC-F765BFBB7C55" Text="焊工业绩分析" NavigateUrl="HJGL/WeldingReport/WelderPerformance.aspx"></TreeNode>
|
||||
<TreeNode id="5F0969E3-2A0A-473E-92BE-4DD390602556" Text="焊接缺陷分析" NavigateUrl="HJGL/WeldingReport/DefectStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="EAD61207-E396-45B0-A1D2-7A5F0498AACC" Text="管道预制率分析" NavigateUrl="HJGL/WeldingReport/PipePrefabricationRateStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="9A28D681-0C91-49B8-9A63-DA3FEEA25BC2" Text="管道预制汇总" NavigateUrl="HJGL/WeldingReport/PipePrefabricationSummary.aspx"></TreeNode>
|
||||
<TreeNode id="854C79DF-A1C0-4E3C-BCB4-7D5CD044F72B" Text="焊工功效分析" NavigateUrl="HJGL/WeldingReport/WelderEfficacy.aspx"></TreeNode>
|
||||
<TreeNode id="2C66A01D-B53F-46A1-89F0-30ED137C7498" Text="检测结果汇总" NavigateUrl="HJGL/WeldingReport/CheckResult.aspx"></TreeNode>
|
||||
<TreeNode id="6035E549-66FF-4B6D-989B-BE99C9EF5EB7" Text="焊接数据" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx"></TreeNode>
|
||||
|
||||
@@ -30,6 +30,16 @@ namespace Model
|
||||
public string WeldJointId { get; set; }
|
||||
public string PipelineCode { get; set; }
|
||||
public string WeldJointCode { get; set; }
|
||||
public string UnitWorkId { get; set; }
|
||||
public string UnitWorkName { get; set; }
|
||||
public string WelderCode { get; set; }
|
||||
public string Specification { get; set; }
|
||||
public string MaterialCode { get; set; }
|
||||
public string WeldingLocation { get; set; }
|
||||
public string WeldingMethodCode { get; set; }
|
||||
public string WeldingRodCode { get; set; }
|
||||
public string WeldingWireCode { get; set; }
|
||||
public string WeldingMaterial { get; set; }
|
||||
public bool IsQualified { get; set; }
|
||||
public string QualifiedText { get; set; }
|
||||
public string CheckPerson { get; set; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
@@ -54,6 +54,19 @@ namespace Model
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日报待审核明细工艺参数编辑对象。
|
||||
/// </summary>
|
||||
public class WeldingDailyTempDetailEditInput
|
||||
{
|
||||
public string TempDetailId { get; set; }
|
||||
public string ProjectId { get; set; }
|
||||
public string WeldingMethodId { get; set; }
|
||||
public string WeldTypeId { get; set; }
|
||||
public string WeldingWire { get; set; }
|
||||
public string WeldingRod { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日报待审核明细。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user