|
|
@@ -2832,6 +2832,11 @@ namespace TeamAAS_VP.Core
|
|
|
LogHelper.WriteLogMes($"上传数据成功");
|
|
|
SendTaskMessage($"上传数据成功", MessageLevel.Debug);
|
|
|
string filePath = $"D:\\image\\Recored\\{dt.ToString("yyyy-MM")}\\{dt.ToString("MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
|
|
|
+ string source_csv2 = $"{stationConfig.SaveCsvPath}\\{dt.ToString("yyyy-MM")}\\{i}_{stationConfig.DeviceName}_{dt.ToString("yyyy-MM-dd")}";
|
|
|
+ if (!Directory.Exists(filePath))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(filePath);
|
|
|
+ }
|
|
|
string csvfilename = $"{i}_{stationConfig.DeviceName}_{dt.ToString("yyyy-MM-dd")}";
|
|
|
//复制csv
|
|
|
string source_csv = $"{stationConfig.SaveCsvPath}\\{dt.ToString("yyyy-MM")}\\{i}_{stationConfig.DeviceName}_{dt.ToString("yyyy-MM-dd")}.csv";
|
|
|
@@ -2857,6 +2862,19 @@ namespace TeamAAS_VP.Core
|
|
|
File.Copy(item, target_Torque, true);
|
|
|
}
|
|
|
}
|
|
|
+ //string target_Directory = Path.Combine(filePath, "扭力曲线"); 待测试
|
|
|
+ //string source_Torque_Image = config.ScrewCurvePath + $"\\{dt.ToString("yyyy-MM")}\\{dt.ToString("yyyy-MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
|
|
|
+ //try
|
|
|
+ //{
|
|
|
+ // var col = Directory.GetFiles(source_Torque_Image);
|
|
|
+ // Directory.CreateDirectory(target_Directory);
|
|
|
+ // foreach (var item in col)
|
|
|
+ // {
|
|
|
+ // string fileName = Path.GetFileName(item); // 获取文件名(带后缀)
|
|
|
+ // string target_Torque = Path.Combine(target_Directory, fileName); // 拼路径(推荐)
|
|
|
+ // File.Copy(item, target_Torque, true);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
SendTaskMessage($"扭力曲线图读取失败", MessageLevel.Error);
|
|
|
@@ -2871,7 +2889,7 @@ namespace TeamAAS_VP.Core
|
|
|
if (isAfter20 && isNewDay && !_hasCompressedToday)
|
|
|
{
|
|
|
// 执行压缩
|
|
|
- CompressionImage(source_csv, csvfilename, device.Station, device.FixtureId);
|
|
|
+ CompressionImage(source_csv2, csvfilename, device.Station, device.FixtureId);
|
|
|
_lastCompressDate = dt;
|
|
|
_hasCompressedToday = true;
|
|
|
LogHelper.WriteLogMes("csv上传数据成功");
|