|
|
@@ -237,7 +237,7 @@ namespace UAS_MES_NEW.Make
|
|
|
string[] txtFiles = Directory.GetFiles(txtPath.Text, $"*.{currFileType}");
|
|
|
if (txtFiles.Length == 0)
|
|
|
{
|
|
|
- LogMessage($"当前{txtPath.Text},没有{equiType}设备{currFileType.ToUpper()}文件");
|
|
|
+ LogMessage($"当前{txtPath.Text},没有{equiType}设备输出的{currFileType.ToLower()}文件");
|
|
|
return;
|
|
|
}
|
|
|
RefreshFileList();
|
|
|
@@ -706,13 +706,13 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
ps_id = dh.getFieldDataByCondition("productsmt", "ps_id", "ps_prodcode='" + Part_ + "'").ToString();
|
|
|
}
|
|
|
- if (dh.getRowCount("productsmtlocation", "PSL_PSID=" + ps_id) > 0)
|
|
|
+ if (dh.getRowCount("productsmtlocation", "PSL_PSID='" + ps_id +"'") > 0)
|
|
|
{
|
|
|
dh.ExecuteSql("delete from productsmtlocation where PSL_PSID = '" + ps_id +"'", "delete");
|
|
|
}
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into productsmtlocation(PSL_ID, PSL_PSID, PSL_DETNO, PSL_PRODCODE, PSL_REPCODE, PSL_LOCATION, PSL_BASEQTY, PSL_TABLE)" +
|
|
|
- "select productsmtlocation_seq.nextval," + ps_id + ",:letArr, :ReelNo,:ReelNo,:Station,BD_BASEQTY,'A' from bom@ERP " +
|
|
|
+ "select productsmtlocation_seq.nextval,'" + ps_id + "',:letArr, :ReelNo,:ReelNo,:Station,BD_BASEQTY,'A' from bom@ERP " +
|
|
|
"left join bomdetail@ERP on bo_id=bd_bomid where bo_mothercode='" + Part_ + "' and BD_SONCODE=:ReelNo");
|
|
|
dh.BatchInsert(sql.GetString(), new string[] { "letArr", "ReelNo", "ReelNo", "Station", "ReelNo" },
|
|
|
letNo.ToArray(), ReelNo.ToArray(), ReelNo.ToArray(), Station.ToArray(), ReelNo.ToArray());
|
|
|
@@ -847,19 +847,19 @@ namespace UAS_MES_NEW.Make
|
|
|
string res = "",wo = "";
|
|
|
if(equiType == "SPI")
|
|
|
{
|
|
|
- res = currItem[1];
|
|
|
+ res = currItem[1] == "PASS" ? "PASS" : "NG";
|
|
|
wo = ma_code.Text;
|
|
|
}
|
|
|
else if (equiType == "AOI")
|
|
|
{
|
|
|
- res = currItem[3];
|
|
|
+ res = currItem[3] == "PASS" ? "PASS" : "NG";
|
|
|
|
|
|
sql.Clear();
|
|
|
sql.Append($"SELECT a.li_code,b.dl_macode FROM line_ipaoi a, deviceline b WHERE a.ipaddress = '{currItem[2]}' AND a.li_code = b.dl_linecode");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
- if (dt.Rows.Count > 0)
|
|
|
+ if (dt.Rows.Count > 0 && !String.IsNullOrEmpty(dt.Rows[0]["dl_macode"].ToString()))
|
|
|
{
|
|
|
- wo = dt.Rows[0]["dd_name"].ToString();
|
|
|
+ wo = dt.Rows[0]["dl_macode"].ToString();
|
|
|
}
|
|
|
else
|
|
|
{
|