|
@ -295,6 +295,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
await esun_conn.OpenAsync(); |
|
|
await esun_conn.OpenAsync(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,
|
|
|
string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,
|
|
|
case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode, |
|
|
case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode, |
|
|
f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date |
|
|
f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date |
|
@ -309,6 +310,10 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
where g.sn_result = 'OK' |
|
|
where g.sn_result = 'OK' |
|
|
AND a.工單序號 = '{0}' |
|
|
AND a.工單序號 = '{0}' |
|
|
AND c.material_id LIKE 'MAC%'", barcodeNo);
|
|
|
AND c.material_id LIKE 'MAC%'", barcodeNo);
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
string mac_sql = string.Format(@"SELECT B.[ProductSN], B.[PartBarcode], B.[MFID], B.[MOID], B.[PartTypeID], B.[MaterialID], B.[IsActive]
|
|
|
|
|
|
FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (SELECT A.[PartBarcode] FROM [SFIS].[dbo].[ZPDKeyPart] A WHERE A.[IsActive] = 1 AND A.[PartTypeID] = 'MAC' AND A.[PartBarcode] = '{0}')", barcodeNo);
|
|
|
|
|
|
|
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
@ -774,6 +779,7 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
|
|
|
|
|
//part_no = "91000237320038";
|
|
|
//part_no = "91000237320038";
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,
|
|
|
string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,
|
|
|
case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode, |
|
|
case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode, |
|
|
f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date |
|
|
f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date |
|
@ -788,6 +794,10 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
where g.sn_result = 'OK' |
|
|
where g.sn_result = 'OK' |
|
|
AND a.工單序號 = '{0}' |
|
|
AND a.工單序號 = '{0}' |
|
|
AND c.material_id LIKE 'MAC%'", part_no);
|
|
|
AND c.material_id LIKE 'MAC%'", part_no);
|
|
|
|
|
|
*/ |
|
|
|
|
|
string mac_sql = string.Format(@"SELECT B.[ProductSN], B.[PartBarcode], B.[MFID], B.[MOID], B.[PartTypeID], B.[MaterialID], B.[IsActive]
|
|
|
|
|
|
FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (SELECT A.[PartBarcode] FROM [SFIS].[dbo].[ZPDKeyPart] A WHERE A.[IsActive] = 1 AND A.[PartTypeID] = 'MAC' AND A.[PartBarcode] = '{0}')", part_no);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using (var esun_cmd = esun_conn.CreateCommand()) |
|
|
using (var esun_cmd = esun_conn.CreateCommand()) |
|
|
{ |
|
|
{ |
|
|