diff --git a/AMESCoreStudio.Web/Controllers/QRSController.cs b/AMESCoreStudio.Web/Controllers/QRSController.cs
index 102835b4..427e42f3 100644
--- a/AMESCoreStudio.Web/Controllers/QRSController.cs
+++ b/AMESCoreStudio.Web/Controllers/QRSController.cs
@@ -9876,6 +9876,12 @@ namespace AMESCoreStudio.Web.Controllers
kpDataList = kpDataList + "
" + jp[i].Name + " | ";
break;
case 4:
+ //kpDataList = kpDataList + " " + jp[i].Name + " | ";
+ break;
+ case 5:
+ kpDataList = kpDataList + " " + jp[i].Name + " | ";
+ break;
+ case 6:
kpDataList = kpDataList + " " + jp[i].Name + " | ";
break;
default:
@@ -9969,6 +9975,12 @@ namespace AMESCoreStudio.Web.Controllers
kpDataList = kpDataList + " " + jp[i].Value + " | ";
break;
case 4:
+ //kpDataList = kpDataList + " " + jp[i].Value + " | ";
+ break;
+ case 5:
+ kpDataList = kpDataList + " " + jp[i].Value + " | ";
+ break;
+ case 6:
kpDataList = kpDataList + " " + jp[i].Value + " | ";
break;
default:
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
index 06b89ef4..9df06ea7 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
@@ -708,9 +708,9 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no);
sql = sql + " and c.wip_no = '" + wipNO + "'";
*/
- string sql = @" select c.wip_no as WipNo,b.barcode_no as BarcodeNo,b.extra_barcode_no as ExtraBarcodeNo,b.box_no as BoxNo,d.model_no as ModelNO,d.item_no as ItemNO";
- sql = sql + " from jhames.barcode_info b,jhames.wip_barcode c,jhames.wip_att d";
- sql = sql + " where b.barcode_no between c.start_no and c.end_no and c.wip_no = d.wip_no";
+ string sql = @" select c.wip_no as WipNo,b.barcode_no as BarcodeNo,b.extra_barcode_no as ExtraBarcodeNo,e.station_name as StationName,b.box_no as BoxNo,d.model_no as ModelNO,d.item_no as ItemNO";
+ sql = sql + " from jhames.barcode_info b,jhames.wip_barcode c,jhames.wip_att d,jhames.stations e";
+ sql = sql + " where b.barcode_no between c.start_no and c.end_no and c.wip_no = d.wip_no and b.station_id = e.station_id";
sql = sql + " and c.wip_no = '" + wipNO + "'";
using (var barcode_cmd = conn.CreateCommand())
@@ -861,6 +861,8 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S
WriteTraceLog("query mac by mb sql:" + mac_sql);
*/
+ bool findFlag = false;
+
string mac_sql = string.Format("select partbarcode from jhames.c_sfis_keyparts where productsn = '{0}' and parttypeid='MAC'", part_no);
using (var esun_cmd = conn.CreateCommand())
@@ -872,6 +874,8 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S
{
if (esun_reader.HasRows)
{
+ findFlag = true;
+
List esun_list = new List();
DataTable esun_table = new DataTable();
@@ -933,6 +937,79 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S
}
}
+ //从barcode_item读取结转数据
+ if (!findFlag)
+ {
+ string mac_sql2 = string.Format("select a.part_no from jhames.barcode_item a,jhames.barcode_info b where a.barcode_id = b.barcode_id and b.barcode_no = '{0}' and item_no = 'MAC'", part_no);
+
+ using (var esun_cmd = conn.CreateCommand())
+ {
+ esun_cmd.CommandText = mac_sql2;
+ esun_cmd.CommandTimeout = 0;
+
+ using (var esun_reader = await esun_cmd.ExecuteReaderAsync())
+ {
+ if (esun_reader.HasRows)
+ {
+ findFlag = true;
+
+ List esun_list = new List();
+ DataTable esun_table = new DataTable();
+
+ esun_table = DataReaderToDataTable(esun_reader);
+
+ if (esun_table != null)
+ {
+ WriteTraceLog("query mac by mb trace 005:esun_talbe rows qty:" + esun_table.Rows.Count);
+ }
+
+ if (esun_table.Rows.Count > 0)
+ {
+ if (createMacCol)
+ {
+ for (int m = 0; m < esun_table.Rows.Count; m++)
+ {
+ if (dtItem.Rows.Count == 1)
+ {
+ try
+ {
+ dtBarcode.Columns.Add("KP_" + kp_no + "#MAC" + (m + 1).ToString());
+ }
+ catch { }
+ }
+ else
+ {
+ try
+ {
+ dtBarcode.Columns.Add("KP_" + kp_no + "#" + (k + 1).ToString() + "_MAC" + (m + 1).ToString());
+ }
+ catch { }
+ }
+ }
+ dtBarcode.AcceptChanges();
+ createMacCol = false;
+ }
+
+ string mac = "";
+ for (int m = 0; m < esun_table.Rows.Count; m++)
+ {
+ //mac = esun_table.Rows[m]["part_barcode"].ToString().Trim();
+ mac = esun_table.Rows[m]["PART_NO"].ToString().Trim();
+ if (dtItem.Rows.Count == 1)
+ {
+ dtBarcode.Rows[i]["KP_" + kp_no + "#MAC" + (m + 1).ToString()] = mac;
+ }
+ else
+ {
+ dtBarcode.Rows[i]["KP_" + kp_no + "#" + (k + 1).ToString() + "_MAC" + (m + 1).ToString()] = mac;
+ }
+ dtBarcode.AcceptChanges();
+ }
+ }
+ }
+ }
+ }
+ }
}
}
catch (Exception e1)