|
@@ -2908,15 +2908,28 @@ namespace TeamAAS_VP.Core
|
|
|
string source_log = $"..\\Log\\LogInfo\\{dt.ToString("yyyy-MM")}\\{dt.ToString("yyyy-MM-dd")}.txt";
|
|
string source_log = $"..\\Log\\LogInfo\\{dt.ToString("yyyy-MM")}\\{dt.ToString("yyyy-MM-dd")}.txt";
|
|
|
string target_log = Path.Combine(filePath, Path.GetFileName(source_log));
|
|
string target_log = Path.Combine(filePath, Path.GetFileName(source_log));
|
|
|
File.Copy(source_log, target_log, true);
|
|
File.Copy(source_log, target_log, true);
|
|
|
- if (pressureSensorConfig.IsSavePressureCurve && i == pngindex)
|
|
|
|
|
|
|
+ //判断是否保存锁付曲线
|
|
|
|
|
+ if (pressureSensorConfig.IsSavePressureCurve)
|
|
|
{
|
|
{
|
|
|
- //复制曲线图
|
|
|
|
|
- string pngfile_path = $"{pressureSensorConfig.PressureCurvePath}\\{dt.ToString("yyyy-MM")}\\{dt.ToString("yyyy-MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
|
|
|
|
|
- string pngfileName = $"{pngfile_path}\\pressure-{ProductMainSN[i]}-{pngindex}.png";
|
|
|
|
|
- string target_png = Path.Combine(filePath, Path.GetFileName(pngfileName));
|
|
|
|
|
- File.Copy(pngfileName, target_png, true);
|
|
|
|
|
- SendTaskMessage($"曲线图{pngindex}复制完成", MessageLevel.Debug);
|
|
|
|
|
|
|
+ string target_Directory = filePath + "\\压力曲线\\";
|
|
|
|
|
+ string source_Torque_Image = pressureSensorConfig.PressureCurvePath + $"\\{dt.ToString("yyyy-MM")}\\{dt.ToString("yyyy-MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
|
|
|
|
|
+ var col = Directory.GetFiles(source_Torque_Image);
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ Directory.CreateDirectory(target_Directory);
|
|
|
|
|
+ foreach (var item in col)
|
|
|
|
|
+ {
|
|
|
|
|
+ string target_Torque = target_Directory + item.Replace(source_Torque_Image, "");
|
|
|
|
|
+ File.Copy(item, target_Torque, true);
|
|
|
|
|
+ SendTaskMessage($"曲线图{i}保存成功", MessageLevel.Error);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Exception)
|
|
|
|
|
+ {
|
|
|
|
|
+ SendTaskMessage($"扭力曲线图读取失败", MessageLevel.Error);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
CompressionImage(filePath, filename, device.Station, device.FixtureId);
|
|
CompressionImage(filePath, filename, device.Station, device.FixtureId);
|
|
|
|
|
|
|
|
//上传csv
|
|
//上传csv
|