2024-10-24 18:01:26 +08:00
|
|
|
|
using EPLAN.Harness.Common.Extensions;
|
|
|
|
|
using EPLAN.Harness.Core.Controls;
|
2024-10-25 15:17:32 +08:00
|
|
|
|
using EPLAN.Harness.Core.Settings;
|
2024-10-24 18:01:26 +08:00
|
|
|
|
using EPLAN.Harness.ProjectCore.Report;
|
|
|
|
|
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
|
|
|
|
using Sinvo.EplanHpD.Plugin.WPFUI.Utils;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Concurrent;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using static Sinvo.EplanHpD.Plugin.WPFUI.MainWindow;
|
|
|
|
|
|
|
|
|
|
namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
|
|
|
|
|
|
|
|
|
public partial class MainViewModel : INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
#region Properties
|
|
|
|
|
public UpdateDataGridColumns UpdateDataGridColumns;
|
|
|
|
|
|
|
|
|
|
private ObservableCollection<ReportModel> data;
|
|
|
|
|
private ObservableCollection<StuffedDataModel> stuffedData;
|
|
|
|
|
private ObservableCollection<ExportModel> exportData;
|
|
|
|
|
private ObservableCollection<DataGridColumn> dataColumns;
|
|
|
|
|
public ObservableCollection<ReportModel> Data
|
|
|
|
|
{
|
|
|
|
|
get => data;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
data = value;
|
|
|
|
|
OnPropertyChanged(nameof(Data));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<StuffedDataModel> StuffedData
|
|
|
|
|
{
|
|
|
|
|
get => stuffedData;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
stuffedData = value;
|
|
|
|
|
OnPropertyChanged(nameof(StuffedData));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<ExportModel> ExportData
|
|
|
|
|
{
|
|
|
|
|
get => exportData;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
exportData = value;
|
|
|
|
|
OnPropertyChanged(nameof(ExportData));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<DataGridColumn> DataColumns
|
|
|
|
|
{
|
|
|
|
|
get => dataColumns;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
dataColumns = value;
|
|
|
|
|
OnPropertyChanged(nameof(DataColumns));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _isRequireCe;
|
|
|
|
|
public bool IsRequireCe
|
|
|
|
|
{
|
|
|
|
|
get => _isRequireCe;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isRequireCe = value;
|
|
|
|
|
OnPropertyChanged(nameof(IsRequireCe));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private string _projectNo;
|
|
|
|
|
public string ProjectNo
|
|
|
|
|
{
|
|
|
|
|
get => _projectNo;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_projectNo = value;
|
|
|
|
|
OnPropertyChanged(nameof(ProjectNo));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _isUseDiscoloration;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否使用变色管
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool IsUseDiscoloration
|
|
|
|
|
{
|
|
|
|
|
get => _isUseDiscoloration;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isUseDiscoloration = value;
|
|
|
|
|
OnPropertyChanged(nameof(IsUseDiscoloration));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private string _mechanismNo;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 机构号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string MechanismNo
|
|
|
|
|
{
|
|
|
|
|
get => _mechanismNo;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_mechanismNo = value;
|
|
|
|
|
OnPropertyChanged(nameof(MechanismNo));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private string _mechanismName;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 机构名称
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string MechanismName
|
|
|
|
|
{
|
|
|
|
|
get => _mechanismName;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_mechanismName = value;
|
|
|
|
|
OnPropertyChanged(nameof(MechanismName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private WireFlagType _flagType;
|
|
|
|
|
public WireFlagType FlagType
|
|
|
|
|
{
|
|
|
|
|
get => _flagType;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_flagType = value;
|
|
|
|
|
OnPropertyChanged(nameof(FlagType));
|
2024-10-25 15:17:32 +08:00
|
|
|
|
FormUISettings.Instance.SetValue("FlagType", $"{FlagType}");
|
|
|
|
|
FormUISettings.Instance.SaveSingleton();
|
2024-10-24 18:01:26 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public Task<List<DataGridTextColumn>> GetColumns(List<ReportColumn> columns)
|
|
|
|
|
{
|
|
|
|
|
var dataColumns = new List<DataGridTextColumn>();
|
|
|
|
|
foreach (var column in columns)
|
|
|
|
|
{
|
|
|
|
|
//Trace.WriteLine($"/// {column.Text}\r\n public string {column.ID} {{get;set;}} ");
|
|
|
|
|
|
|
|
|
|
dataColumns.Add(new DataGridTextColumn()
|
|
|
|
|
{
|
|
|
|
|
Header = column.Text,
|
|
|
|
|
Binding = new System.Windows.Data.Binding(column.ID)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return Task.FromResult(dataColumns);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Task<List<ReportModel>> LoadReportDataAsync(IEnumerable<BaseReportEntry> data, List<ReportColumn> columns)
|
|
|
|
|
{
|
2024-10-25 15:17:32 +08:00
|
|
|
|
var savedFlagType = FormUISettings.Instance.GetValue("FlagType");
|
|
|
|
|
if (Enum.IsDefined(typeof(WireFlagType), savedFlagType))
|
|
|
|
|
{
|
|
|
|
|
FlagType = (WireFlagType)Enum.Parse(typeof(WireFlagType), savedFlagType.ToString());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
FlagType = WireFlagType.Dual;
|
|
|
|
|
}
|
2024-10-26 10:27:03 +08:00
|
|
|
|
|
2024-10-24 18:01:26 +08:00
|
|
|
|
var reportDatas = new ConcurrentBag<ReportModel>();
|
|
|
|
|
//foreach (var entry in data)
|
|
|
|
|
data.AsParallel().WithDegreeOfParallelism(8).ForAll(entry =>
|
|
|
|
|
{
|
|
|
|
|
var obj = new ReportModel();
|
|
|
|
|
foreach (var column in columns)
|
|
|
|
|
{
|
|
|
|
|
if (!entry.Properties.ContainsKey(column.ColumnID)) continue;
|
|
|
|
|
var value = entry.Properties[column.ColumnID].GetDisplayValue();
|
2024-10-26 10:27:03 +08:00
|
|
|
|
|
2024-10-24 18:01:26 +08:00
|
|
|
|
var property = typeof(ReportModel).GetProperty(column.ID);
|
2024-10-26 10:27:03 +08:00
|
|
|
|
property?.SetValue(obj, value ?? "");
|
|
|
|
|
|
2024-10-24 18:01:26 +08:00
|
|
|
|
}
|
|
|
|
|
reportDatas.Add(obj);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
return Task.FromResult(reportDatas.ToList());
|
|
|
|
|
}
|
|
|
|
|
public async Task<List<StuffedDataModel>> StuffData(List<ReportModel> data)
|
|
|
|
|
{
|
|
|
|
|
var datas = new ConcurrentBag<StuffedDataModel>();
|
2024-10-25 08:40:22 +08:00
|
|
|
|
//var isAllCe = true;
|
|
|
|
|
//var isL1 = false;
|
|
|
|
|
//var isL2 = false;
|
|
|
|
|
//var isL3 = false;
|
|
|
|
|
//var isPe = false;
|
2024-10-24 18:01:26 +08:00
|
|
|
|
//foreach (var item in Data)
|
|
|
|
|
data.AsParallel().WithDegreeOfParallelism(8).ForAll(item =>
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (item == null) return;
|
|
|
|
|
|
|
|
|
|
var data = new StuffedDataModel();
|
|
|
|
|
|
2024-10-25 08:40:22 +08:00
|
|
|
|
//if (!string.IsNullOrEmpty(item.PartNumber))
|
|
|
|
|
//{
|
|
|
|
|
// if (!item.PartNumber.Contains("-CE/"))
|
|
|
|
|
// {
|
|
|
|
|
// isAllCe = false;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
2024-10-24 18:01:26 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(item.Imprint) && item.Imprint.Contains("&"))
|
|
|
|
|
{
|
|
|
|
|
var splitImprint = item.Imprint.Split('&');
|
|
|
|
|
if (splitImprint != null)
|
|
|
|
|
{
|
|
|
|
|
data.WireNumber = item.Imprint = splitImprint[0];
|
|
|
|
|
data.DiscolorationDesc = splitImprint[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
data.WireNumber = item.Imprint;
|
|
|
|
|
}
|
|
|
|
|
data.Imprint = item.Imprint;
|
|
|
|
|
data.WireColor = GetWireColorCode(item.DisplayColor, item.DisplayStripeColor);
|
|
|
|
|
//if (string.IsNullOrEmpty(data.WireColor))
|
|
|
|
|
//{
|
|
|
|
|
// data.IsError = true;
|
|
|
|
|
// data.CheckedMsg += "线色不符合规范\r\n";
|
|
|
|
|
//}
|
|
|
|
|
data.WireModel = item.PartNumber;
|
|
|
|
|
data.WireCode = item.ERPNr;
|
|
|
|
|
data.WireName = item.WireName;
|
|
|
|
|
//if (string.IsNullOrEmpty(data.WireCode))
|
|
|
|
|
//{
|
|
|
|
|
// data.IsError = true;
|
|
|
|
|
// data.CheckedMsg += "线材编码为空\r\n";
|
|
|
|
|
//}
|
|
|
|
|
data.FrontTerminalModel = item.ConnectorFrom;
|
|
|
|
|
data.FrontTerminalMaterialCode = item.ConnectorFromERPNr;
|
|
|
|
|
//if (string.IsNullOrEmpty(data.FrontTerminalMaterialCode))
|
|
|
|
|
//{
|
|
|
|
|
// data.IsError = true;
|
|
|
|
|
// data.CheckedMsg += "前端子物料编码为空\r\n";
|
|
|
|
|
//}
|
|
|
|
|
data.FrontStripLength = item.StripLengthFrom;
|
|
|
|
|
data.RearTerminalModel = item.ConnectorTo;
|
|
|
|
|
data.RearTerminalMaterialCode = item.ConnectorToERPNr;
|
|
|
|
|
//if (string.IsNullOrEmpty(data.RearTerminalMaterialCode))
|
|
|
|
|
//{
|
|
|
|
|
// data.IsError = true;
|
|
|
|
|
// data.CheckedMsg = "后端子物料编码为空\r\n";
|
|
|
|
|
//}
|
|
|
|
|
data.RearStripLength = item.StripLengthTo;
|
|
|
|
|
|
|
|
|
|
//MID(输出报表!J2,1,FIND(" mm2",输出报表!J2)-1)
|
|
|
|
|
data.CrossSection = item.CoreDiameter.Replace(" mm2", "").Trim();
|
|
|
|
|
//=ROUND(MID(输出报表!H2,1,FIND(" mm",输出报表!H2)-1),0)+0
|
2024-10-26 10:27:03 +08:00
|
|
|
|
if (double.TryParse(item.Length.Replace(" mm", "").Trim(), out double wireLength))
|
|
|
|
|
data.WireLength = $"{Math.Round(wireLength, 0)}";
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
data.WireLength = string.Empty;
|
|
|
|
|
}
|
2024-10-24 18:01:26 +08:00
|
|
|
|
//data.WireNumber = item.Imprint;
|
|
|
|
|
data.Quantity = 1;
|
|
|
|
|
//"RV-"&A2&"-"&"1×"&J2&"-"&L2&"-"&"16×N2"&"-"&M2
|
|
|
|
|
data.Model = $"RV-{data.WireColor}-1x{data.CrossSection}-{data.WireLength}-16×N2-{data.WireNumber}";
|
|
|
|
|
//data.IsChecked = true;
|
|
|
|
|
if (!string.IsNullOrEmpty(data.DiscolorationDesc))
|
|
|
|
|
{
|
|
|
|
|
var results = ExcelHelper.GetInsulationSoftSleeveTable(data.DiscolorationDesc);
|
|
|
|
|
var insulationModels = results as InsulationModel[] ?? results.ToArray();
|
|
|
|
|
if (insulationModels.Any())
|
|
|
|
|
{
|
|
|
|
|
data.Insulation = insulationModels.First();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
data.Insulation = new InsulationModel();
|
|
|
|
|
}
|
2024-10-26 10:27:03 +08:00
|
|
|
|
var numberTube = ExcelHelper.GetNumberTube(data.WireModel);
|
|
|
|
|
if (numberTube != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
data.NumberTubeSpec = numberTube.TubeModel;
|
|
|
|
|
data.NumberTubeMaterialNo = numberTube.TubeMaterialCode;
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-24 18:01:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (datas.Any(it => it.Model == data.Model))
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// var existsItem = datas.First(it => it.Model == data.Model);
|
|
|
|
|
// if (existsItem != null)
|
|
|
|
|
// {
|
|
|
|
|
// existsItem.Quantity += 1;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
{
|
|
|
|
|
if (data != null)
|
|
|
|
|
datas.Add(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Trace.WriteLine($"{ex}");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2024-10-25 08:40:22 +08:00
|
|
|
|
//IsRequireCe = isAllCe;
|
|
|
|
|
//IsUseDiscoloration = isL1 && isL2 && isL3 && isPe;
|
|
|
|
|
//Trace.WriteLine($"isAllCE: {isAllCe}");
|
|
|
|
|
//Trace.WriteLine($"isSDIProject: {isL1 && isL2 && isL3 && isPe}");
|
2024-10-24 18:01:26 +08:00
|
|
|
|
return await Task.FromResult<List<StuffedDataModel>>([.. datas]);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取颜色代号
|
|
|
|
|
/// TODO : 改成从excel中读取基本资料
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="displayColor"></param>
|
|
|
|
|
/// <param name="displayStripeColor"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private static string GetWireColorCode(string displayColor, string displayStripeColor = null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string colorCode;
|
|
|
|
|
|
|
|
|
|
if (displayColor == "黄色" && displayStripeColor == "绿色")
|
|
|
|
|
{
|
|
|
|
|
return "GNYE";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
colorCode = displayColor switch
|
|
|
|
|
{
|
|
|
|
|
"红色" => "RD",
|
|
|
|
|
"黄色" => "YE",
|
|
|
|
|
"蓝色" => "BU",
|
|
|
|
|
"绿色" => "GN",
|
|
|
|
|
"黑色" => "BK",
|
|
|
|
|
"灰色" => "GR",
|
|
|
|
|
"白色" => "WH",
|
|
|
|
|
"棕色" => "BN",
|
|
|
|
|
"橙色" => "OG",
|
|
|
|
|
"紫色" => "VT",
|
|
|
|
|
"绿/黄双色" => "GNYE",
|
|
|
|
|
"浅蓝色" => "BU",
|
|
|
|
|
_ => "",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return colorCode;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取号码管规格
|
|
|
|
|
/// </summary>
|
2024-10-26 10:27:03 +08:00
|
|
|
|
//public string GetNumberTubeSpecification(string crossSection, string colorCode)
|
|
|
|
|
//{
|
|
|
|
|
// if (crossSection == "16")
|
|
|
|
|
// {
|
|
|
|
|
// if (colorCode == "YE") return "黄色热缩管φ12/定制";
|
|
|
|
|
// if (colorCode == "GN") return "绿色热缩管φ12/定制";
|
|
|
|
|
// if (colorCode == "RD") return "红色热缩管φ12/定制";
|
|
|
|
|
// if (colorCode == "BU") return "蓝色热缩管φ12/定制";
|
|
|
|
|
// if (colorCode == "GNYE") return "黄绿色热缩管φ12/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "0.3" || crossSection == "0.5" || crossSection == "0.75" || crossSection == "1")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ2.5/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "1.5")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ3/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "2.5")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ4/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "4")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ5/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "6")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ6/定制";
|
|
|
|
|
// }
|
|
|
|
|
// else if (crossSection == "10")
|
|
|
|
|
// {
|
|
|
|
|
// return "白色号码管φ8/定制";
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// return string.Empty;
|
|
|
|
|
//}
|
2024-10-24 18:01:26 +08:00
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
private void OnPropertyChanged(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
2024-10-25 15:17:32 +08:00
|
|
|
|
//new StudioSettings().Plugins.
|
|
|
|
|
|
2024-10-24 18:01:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void GenExportData()
|
|
|
|
|
{
|
|
|
|
|
if (StuffedData.Any(it => !it.IsIgnore && (!it.IsChecked || it.IsError)))
|
|
|
|
|
{
|
|
|
|
|
FlexMessageBox.Info("存在未检查通过或是未做检查,不允许生成!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(MechanismNo) || string.IsNullOrEmpty(MechanismName))
|
|
|
|
|
{
|
|
|
|
|
FlexMessageBox.Info("机构信息未完善,不允许生成!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
ExportData = [];
|
|
|
|
|
int seqNo = 1;
|
|
|
|
|
var dataList = new List<ExportModel>();
|
2024-10-26 10:27:03 +08:00
|
|
|
|
var nowDateStr = DateTime.Now.ToString("yyyy-MM-dd");
|
2024-10-24 18:01:26 +08:00
|
|
|
|
//foreach (var stuffedDataModel in StuffedData)
|
|
|
|
|
StuffedData.AsParallel().WithDegreeOfParallelism(1).ForAll(stuffedDataModel =>
|
|
|
|
|
|
|
|
|
|
{
|
2024-10-26 10:27:03 +08:00
|
|
|
|
//var numberTubeSpec = GetNumberTubeSpecification(stuffedDataModel.CrossSection, stuffedDataModel.WireColor);
|
2024-10-24 18:01:26 +08:00
|
|
|
|
var exportModel = new ExportModel
|
|
|
|
|
{
|
|
|
|
|
SeqNo = seqNo.ToString(),
|
|
|
|
|
MechanismName = MechanismName,
|
|
|
|
|
MechanismNo = MechanismNo,
|
|
|
|
|
DrawNo = stuffedDataModel.Model,
|
|
|
|
|
MaterialCode = "",
|
|
|
|
|
WireOrTubeSpec = stuffedDataModel.WireModel,
|
|
|
|
|
WireOrTubeMaterialNo = stuffedDataModel.WireCode,
|
|
|
|
|
WireOrTubeLength = Math.Round(double.Parse(stuffedDataModel.WireLength), 0),
|
2024-10-26 10:27:03 +08:00
|
|
|
|
NumberTubeSpec = stuffedDataModel.NumberTubeSpec,
|
|
|
|
|
NumberTubeMaterialNo = stuffedDataModel.NumberTubeMaterialNo,
|
2024-10-24 18:01:26 +08:00
|
|
|
|
NumberTubeContent = stuffedDataModel.Imprint,
|
|
|
|
|
FrontTerminalModel = stuffedDataModel.FrontTerminalModel,
|
|
|
|
|
FrontTerminalMaterialNo = stuffedDataModel.FrontTerminalMaterialCode,
|
|
|
|
|
FrontTerminalStripLength = stuffedDataModel.FrontStripLength,
|
|
|
|
|
RearTerminalModel = stuffedDataModel.RearTerminalModel,
|
|
|
|
|
RearTerminalMaterialNo = stuffedDataModel.RearTerminalMaterialCode,
|
|
|
|
|
RearTerminalStripLength = stuffedDataModel.RearStripLength,
|
|
|
|
|
InsulationModel = stuffedDataModel.Insulation?.Specification,
|
2024-10-26 10:27:03 +08:00
|
|
|
|
InsulationMaterialNo = stuffedDataModel.Insulation?.MaterialCode,
|
|
|
|
|
OrderDate = nowDateStr
|
2024-10-24 18:01:26 +08:00
|
|
|
|
};
|
|
|
|
|
seqNo++;
|
|
|
|
|
dataList.Add(exportModel);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
if (dataList != null && dataList.Any())
|
|
|
|
|
{
|
|
|
|
|
dataList.ForEach(ExportData.Add);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|