|
|
@@ -10,6 +10,7 @@ using System.Collections.Generic;
|
|
|
using System.Configuration;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
+using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Threading;
|
|
|
using System.Windows.Forms;
|
|
|
@@ -177,6 +178,7 @@ namespace CarMeterSystem
|
|
|
PreTrackScale preTrack = ucCarMeterInfoJisco1._preTrack;
|
|
|
string strMsg = "";
|
|
|
|
|
|
+
|
|
|
#region 间隔时间太短
|
|
|
vti.ValidMethod(new PreTrackScale(), "2", null);
|
|
|
if (!PbCache.monitorResult.valid_time_interval)
|
|
|
@@ -386,6 +388,14 @@ namespace CarMeterSystem
|
|
|
// PbCache.isLockFrm = false;
|
|
|
// btnSave.Enabled = true;
|
|
|
//}
|
|
|
+
|
|
|
+ //判断储存图片list是否为空,为空则保存图片
|
|
|
+ if (PbCache.listImage.Count == 0)
|
|
|
+ {
|
|
|
+ _ = BeginInvoke(new Action(() => { shotImage(); }));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
isStop = true;
|
|
|
#region 酒钢业务流程判断
|
|
|
if (isCompare)
|
|
|
@@ -734,9 +744,6 @@ namespace CarMeterSystem
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
- //图片截取
|
|
|
- // BourneCao暂时注释
|
|
|
- _ = BeginInvoke(new Action(() => { shotImage(); }));
|
|
|
|
|
|
//语音提醒部分
|
|
|
//flag =true表示称重成功
|
|
|
@@ -855,6 +862,14 @@ namespace CarMeterSystem
|
|
|
lg.WriteLog(3, PbCache.lockCarNo + "计量完成,但重量信息提示失败:" + PbCache.actualFirstNo + ex.Message); ;
|
|
|
}
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 图片名称修改
|
|
|
+ /// </summary>
|
|
|
+ //public void updateImage()
|
|
|
+ //{
|
|
|
+ // //string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",AppDomain.CurrentDomain.SetupInformation.ApplicationBase,PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7)
|
|
|
+ // File.Move();
|
|
|
+ //}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 终端截图
|
|
|
@@ -864,6 +879,23 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
#region 截取图片信息
|
|
|
|
|
|
+ string fullfilename = Path.Combine(AppConfigCache.ftpPath, DateTime.Now.ToString("yyyy-MM-dd"));
|
|
|
+ if (fullfilename.Substring(0, 8) == "https://")
|
|
|
+ {
|
|
|
+ fullfilename = fullfilename.Substring(0, 8) + fullfilename.Substring(8).Replace("//", "/").Replace("//", "/");
|
|
|
+ }
|
|
|
+ else if (fullfilename.Substring(0, 7) == "http://")
|
|
|
+ {
|
|
|
+ fullfilename = fullfilename.Substring(0, 7) + fullfilename.Substring(7).Replace("//", "/").Replace("//", "/");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ fullfilename = fullfilename.Replace("//", "/").Replace("//", "/");
|
|
|
+ }
|
|
|
+
|
|
|
+ fullfilename = fullfilename.Replace("upload", "download");
|
|
|
+
|
|
|
+ string actualFirstNo = DateTime.Now.ToString("yyyyMMddHHmmssffff");//替换PbCache.actualFirstNo
|
|
|
//截取屏幕信息
|
|
|
|
|
|
Point screenPoint = this.PointToScreen(new Point());
|
|
|
@@ -871,15 +903,22 @@ namespace CarMeterSystem
|
|
|
Image img = new Bitmap(rect.Width, rect.Height);
|
|
|
Graphics g = Graphics.FromImage(img);
|
|
|
g.CopyFromScreen(rect.X - 1, rect.Y - 1, 0, 0, rect.Size);//"D://file/1.jpg"
|
|
|
+ //img.Save(string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",
|
|
|
+ // AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
|
|
|
+ // PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7), System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
|
img.Save(string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",
|
|
|
AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
|
|
|
- PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7), System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
|
+ PbCache.sportInfo.baseSpotNo, "C" + actualFirstNo, 7), System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
|
//(PbCache.videoChild.Count + 1)), System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
|
-
|
|
|
+ MeterWorkImage meterWorkImage = new MeterWorkImage();
|
|
|
+ meterWorkImage.imageFile7 = string.Format("{0}{1}_{2}_{3}.jpg",
|
|
|
+ fullfilename + "/",
|
|
|
+ PbCache.sportInfo.baseSpotNo, "C" + actualFirstNo, 7);
|
|
|
+ PbCache.listImage.Add(meterWorkImage);
|
|
|
//*
|
|
|
//最后进行截图操作
|
|
|
CameraShotCls cameraShot = new CameraShotCls();
|
|
|
- cameraShot.CapMethod(PbCache.actualFirstNo);
|
|
|
+ cameraShot.CapMethod(actualFirstNo);
|
|
|
//*/
|
|
|
|
|
|
#endregion 截取图片信息
|
|
|
@@ -2373,6 +2412,12 @@ namespace CarMeterSystem
|
|
|
ucWeightCarTJXJG1.setWeightType(" ");
|
|
|
ucCarMeterInfoJisco1.setFormControlValue(new MeterWorkCarActualFirst() { });
|
|
|
|
|
|
+ //重置保存返回的一次编号
|
|
|
+ PbCache.actualFirstNo = "";
|
|
|
+
|
|
|
+ //清楚临时储存的listImage
|
|
|
+ PbCache.listImage.Clear();
|
|
|
+
|
|
|
// 重置PbCache变量
|
|
|
PbCache.isLockFrm = false; // 清除页面锁定
|
|
|
PbCache.lockCarNo = "";
|
|
|
@@ -2516,6 +2561,9 @@ namespace CarMeterSystem
|
|
|
case 25:
|
|
|
voiceContent = "称重数据保存失败";//计量成功,存在多条未结净一次数据,请联系计量大厅
|
|
|
break;
|
|
|
+ case 26:
|
|
|
+ voiceContent = "皮重选择成毛重";//计量成功,存在多条未结净一次数据,请联系计量大厅
|
|
|
+ break;
|
|
|
default:
|
|
|
voiceContent = "程序处理异常";
|
|
|
break;
|