Commit 787c70a3 刘韬

放开历史查询最近30天的限制

1 个父辈 4c8d82e2
...@@ -52,18 +52,19 @@ namespace OnlineStore.AutoCountClient ...@@ -52,18 +52,19 @@ namespace OnlineStore.AutoCountClient
DateTime startTime = dtpStartTime.Value; DateTime startTime = dtpStartTime.Value;
DateTime endTime = dtpEndTime.Value; DateTime endTime = dtpEndTime.Value;
if (startTime < DateTime.Now.AddDays(-30)) if (startTime > endTime)
{
MessageBox.Show("请输入正确的时间(只能查询近30天的日志)");
dtpStartTime.Focus();
return;
}
if (startTime> endTime)
{ {
MessageBox.Show("请输入正确的时间(开始时间必须小于结束时间)"); MessageBox.Show("请输入正确的时间(开始时间必须小于结束时间)");
dtpEndTime.Focus(); dtpEndTime.Focus();
return; return;
} }
if ((endTime-startTime).TotalDays > 31)
{
MessageBox.Show("请输入正确的时间(只能查询近30天的日志)");
dtpStartTime.Focus();
return;
}
PreStartTime = startTime; PreStartTime = startTime;
PreEndTime = endTime; PreEndTime = endTime;
string code = txtCode.Text.Trim(); string code = txtCode.Text.Trim();
......
...@@ -447,25 +447,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -447,25 +447,6 @@ namespace OnlineStore.DeviceLibrary
WorkLog("点料:" + "NG:未找到元器件类型,PN[" + ParamManager.GetCodeStrPN(Work_ReelInfo.WareCode) + "]"); WorkLog("点料:" + "NG:未找到元器件类型,PN[" + ParamManager.GetCodeStrPN(Work_ReelInfo.WareCode) + "]");
BackNoConfigImg(ParamManager.GetCodeStrPN(Work_ReelInfo.WareCode)); BackNoConfigImg(ParamManager.GetCodeStrPN(Work_ReelInfo.WareCode));
} }
string fileP = path1_tif + @"\" + lastFileName;
count = GetCountResult(fileP, lastParam,out string resfile);
//eyemLib.EyemImage eyemImage = xrayImage.GetRawBufferHandle();
////WorkLog("获取到指针" + eyemImage.ucpImage.ToString());
//count = GetCountResult(eyemImage, fileP, lastParam, out string resfile);
//xrayImage.FreeRawBufferHandle();
if (count < ResultMinCount)
{
isNg = true;
NgMsg = "NG:点料结果小于" + ResultMinCount;
}
WorkLog("点料: 调用 GetCountResult 获取点料结果 【" + count + "】 " + lastParam.ToStr() + ", " + NgMsg);
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count;
}
var splitindex = MoveInfo.MoveParam.WareCode.IndexOf(";"); var splitindex = MoveInfo.MoveParam.WareCode.IndexOf(";");
if (splitindex > 0) if (splitindex > 0)
{ {
...@@ -476,11 +457,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -476,11 +457,26 @@ namespace OnlineStore.DeviceLibrary
isNg = true; isNg = true;
NgMsg = "未匹配算法的新PN盘,NG."; NgMsg = "未匹配算法的新PN盘,NG.";
BackNGImg(Work_ReelInfo.WareCode); BackNGImg(Work_ReelInfo.WareCode);
//MoveInfo.MoveParam.TargetPosType = 1;
//MoveInfo.MoveParam.IsNgReel = true;
//MoveInfo.MoveParam.NgMsg = "未匹配算法的新PN盘,NG.";
} }
} }
string resfile = "";
if (!isNg)
{
string fileP = path1_tif + @"\" + lastFileName;
count = GetCountResult(fileP, lastParam, out resfile);
if (count < ResultMinCount)
{
isNg = true;
NgMsg = "NG:点料结果小于" + ResultMinCount;
}
WorkLog("点料: 调用 GetCountResult 获取点料结果 【" + count + "】 " + lastParam.ToStr() + ", " + NgMsg);
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count;
}
}
if (!isNg && SServerManager.CanConnect()) if (!isNg && SServerManager.CanConnect())
{ {
...@@ -505,6 +501,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -505,6 +501,7 @@ namespace OnlineStore.DeviceLibrary
string outF = resfile; string outF = resfile;
if (!isNg) if (!isNg)
{ {
ReadOutMsg(outF); ReadOutMsg(outF);
} }
else else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!