Commit dc07c277 LN

-图片名和参数匹配直接使用PN

1 个父辈 be3202c9
...@@ -24,8 +24,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -24,8 +24,7 @@ namespace OnlineStore.DeviceLibrary
public XRay_Config Config; public XRay_Config Config;
public XRay xRay = null; public XRay xRay = null;
// public CountImage countImage = null;
public CarerayImage carerayImage = null; public CarerayImage carerayImage = null;
public bool xRayCanStart = false; public bool xRayCanStart = false;
...@@ -36,10 +35,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,10 +35,9 @@ namespace OnlineStore.DeviceLibrary
private int ResultMinCount = 100; private int ResultMinCount = 100;
private string path_XRAY = Application.StartupPath + @"\XRAY\"; private string path_XRAY = Application.StartupPath + @"\XRAY\";
private string path1_tif = Application.StartupPath + @"\XRAY\tif"; private string path1_tif = Application.StartupPath + @"\XRAY\tif";
// private string path2_png = Application.StartupPath + @"\XRAY\png";
private string path2_out = Application.StartupPath + @"\XRAY\out\"; private string path2_out = Application.StartupPath + @"\XRAY\out\";
private string path3_area = Application.StartupPath + @"\XRAY\area.txt"; //private string path3_area = Application.StartupPath + @"\XRAY\area.txt";
private Dictionary<string, CountParam> countParamMap = new Dictionary<string, CountParam>(); private Dictionary<string, CountParam> countParamMap = new Dictionary<string, CountParam>();
......
...@@ -526,33 +526,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -526,33 +526,29 @@ namespace OnlineStore.DeviceLibrary
private void UpdateArea(string codeStr) private void UpdateArea(string codeStr)
{ {
lastParam = new CountParam("", ThresholdValue, 3); lastParam = new CountParam("", ThresholdValue, 3);
//lastTh = ThresholdValue;
//lastWSize = 3;
string[] codeArray = codeStr.Split(';'); string[] codeArray = codeStr.Split(';');
string fileValue = ""; // string fileValue = "";
string area = ""; // string area = "";
if (codeArray.Length.Equals(2)) if (codeArray.Length.Equals(2))
{ {
string pn = codeArray[0]; string pn = codeArray[0];
string type = pn.Substring(0, 2) + pn.Substring(pn.Length - 3, 3); //string type = pn.Substring(0, 2) + pn.Substring(pn.Length - 3, 3);
//if (countParamMap.ContainsKey(pn))
//{
// area = countParamMap[pn].AreaValue;
// fileValue = lastFileName + " " + area;
// lastParam = countParamMap[pn];
//}
//else
if (countParamMap.ContainsKey(pn)) if (countParamMap.ContainsKey(pn))
{ {
area = countParamMap[pn].AreaValue;
fileValue = lastFileName + " " + area;
// lastTh = countParamMap[pn].Threshold;
lastParam = countParamMap[pn]; lastParam = countParamMap[pn];
} }
else if (countParamMap.ContainsKey(type))
{
lastParam = countParamMap[type];
//lastTh = countParamMap[type].Threshold;
//lastWSize = countParamMap[type].WindowSize;
}
} }
LogUtil.info("【" + codeStr + "】使用参数 " + lastParam.ToStr() + " "); LogUtil.info("【" + codeStr + "】使用参数 " + lastParam.ToStr() + " ");
//LogUtil.info("【" + codeStr + "】使用参数【" + lastTh + "】【" + area + "】,文件名【" + lastFileName + "】内容【" + fileValue + "】"); //LogUtil.info("【" + codeStr + "】使用参数【" + lastTh + "】【" + area + "】,文件名【" + lastFileName + "】内容【" + fileValue + "】");
File.WriteAllText(path3_area, fileValue); //File.WriteAllText(path3_area, fileValue);
} }
private void ClearFilePath() private void ClearFilePath()
......
...@@ -201,15 +201,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,15 +201,16 @@ namespace OnlineStore.DeviceLibrary
string[] codeArray = WareCode.Split(';'); string[] codeArray = WareCode.Split(';');
if (codeArray.Length == 2) if (codeArray.Length == 2)
{ {
string pnStr = codeArray[0]; //string pnStr = codeArray[0];
if (pnStr.Length >= 5) //if (pnStr.Length >= 5)
{ //{
pn = pnStr.Substring(0, 2) + pnStr.Substring(pnStr.Length - 3, 3); // pn = pnStr.Substring(0, 2) + pnStr.Substring(pnStr.Length - 3, 3);
} //}
else //else
{ //{
pn = pnStr; // pn = pnStr;
} //}
pn = codeArray[0];
reald = codeArray[1]; reald = codeArray[1];
} }
return pn + "-" + reald + timeName; return pn + "-" + reald + timeName;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!