|
@@ -2407,6 +2407,40 @@ namespace TeamAAS_VP.Core
|
|
|
string torque = string.Join(",", torqueList);
|
|
string torque = string.Join(",", torqueList);
|
|
|
string pressure = string.Join(",", pressureList);
|
|
string pressure = string.Join(",", pressureList);
|
|
|
string turn = string.Join(",", turnList);
|
|
string turn = string.Join(",", turnList);
|
|
|
|
|
+ //
|
|
|
|
|
+ //try
|
|
|
|
|
+ //{
|
|
|
|
|
+ // DateTime dt = DateTime.Now;
|
|
|
|
|
+ // string filename = ProductMainSN[i] + "_" + dt.ToString("yyyyMMddHHmmss");
|
|
|
|
|
+ // var device = _configService.GetDeviceInfo();
|
|
|
|
|
+ // (bool isSuc, string resp) = await _mesService.SendFtpFileAsync(ProductMainSN[i], filename);
|
|
|
|
|
+ // if (isSuc)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // LogHelper.WriteLogMes($"上传数据成功");
|
|
|
|
|
+ // SendTaskMessage($"上传数据成功", MessageLevel.Debug);
|
|
|
|
|
+ // string filePath = $"D:\\image\\Recored\\{dt.ToString("yyyy-MM")}\\{dt.ToString("MM-dd")}\\{currentProduct.Name}\\{ProductMainSN[i]}";
|
|
|
|
|
+ // //复制csv
|
|
|
|
|
+ // string source_csv = $"{stationConfig.SaveCsvPath}\\{dt.ToString("yyyy-MM")}\\{i}_{stationConfig.DataInfo.PROCESS_NAME}_{dt.ToString("yyyy-MM-dd")}.csv";
|
|
|
|
|
+ // string target_csv = Path.Combine(filePath, Path.GetFileName(source_csv)); ;
|
|
|
|
|
+ // File.Copy(source_csv, target_csv, true);
|
|
|
|
|
+ // //复制log
|
|
|
|
|
+ // 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));
|
|
|
|
|
+ // File.Copy(source_log, target_log, true);
|
|
|
|
|
+ // CompressionImage(filePath, filename, device.FixtureId);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // else
|
|
|
|
|
+ // {
|
|
|
|
|
+ // LogHelper.WriteLogMes($"上传数据失败");
|
|
|
|
|
+ // SendTaskMessage($"上传数据失败", MessageLevel.Error);
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
|
|
+ //catch (Exception ex)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // SendTaskMessage($"上传数据时出错:{ex.Message}", MessageLevel.Error);
|
|
|
|
|
+ // LogHelper.WriteLogError($"上传数据时出错", ex);
|
|
|
|
|
+ //}
|
|
|
|
|
+ //
|
|
|
//这里现在上传的结果都是锁付站的,如果存在其他附属站的数据需要上传时,将不适用,要根据实际情况进行调整
|
|
//这里现在上传的结果都是锁付站的,如果存在其他附属站的数据需要上传时,将不适用,要根据实际情况进行调整
|
|
|
(bool isSuccess, string response) = await _mesService.SubmitGetAsync(ProductMainSN[i], "", torque, pressure, turn, resultIndex == 1 ? true : false, _LastMesCheckTime[i], serverTimeResult.Now);
|
|
(bool isSuccess, string response) = await _mesService.SubmitGetAsync(ProductMainSN[i], "", torque, pressure, turn, resultIndex == 1 ? true : false, _LastMesCheckTime[i], serverTimeResult.Now);
|
|
|
if (isSuccess)
|
|
if (isSuccess)
|