Browse Source

1.修改前判维修输入,增加机种显示

2.修改工单KeyParts查询2,修改MAC的查询来源,安勤厂内的SFIS的ZPDKeyPart
PTD
Marvin 2 years ago
parent
commit
3acaba2cf5
  1. 6
      AMESCoreStudio.Web/Views/REP/REP001.cshtml
  2. 3
      AMESCoreStudio.WebApi/Controllers/AMES/NgInfoController.cs
  3. 10
      AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs

6
AMESCoreStudio.Web/Views/REP/REP001.cshtml

@ -151,6 +151,12 @@
width: 200,
sort: true
},
{
field: 'modelNO',
title: '機種',
width: 160,
sort: true
},
{
field: 'stationName',
title: '站別名稱',

3
AMESCoreStudio.WebApi/Controllers/AMES/NgInfoController.cs

@ -102,11 +102,14 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
join q2 in _context.BarcodeInfoes on q1.BarcodeID equals q2.BarcodeID
join q3 in _context.WipInfos on q1.WipId equals q3.WipID
join q4 in _context.Stationses on q1.StationId equals q4.StationID
join q5 in _context.WipAtts on q3.WipNO equals q5.WipNO
select new
{
q1.NgID,
q2.BarcodeNo,
q3.WipNO,
q5.ItemNO,
q5.ModelNO,
q4.StationName,
q1.TestStatus,
q1.Status,

10
AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs

@ -295,6 +295,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
await esun_conn.OpenAsync();
}
/*
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,
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'
AND a. = '{0}'
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
{
@ -774,6 +779,7 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no);
//part_no = "91000237320038";
/*
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,
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'
AND a. = '{0}'
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())
{

Loading…
Cancel
Save