- @index.Station
+ @index.StationName
|
- @index.No
+ @index.ItemNoName
|
- @index.KPPartNo
+ @index.PartNo
|
- @index.KPItemNo
+ @index.KpItemNo
|
- @index.InputDate
+ @index.CreateDate
|
}
@@ -316,6 +316,49 @@
+
@@ -325,7 +331,16 @@
}
else {
$("#inputNo").hide();
- }
+ }
+
+
+ @if (!string.IsNullOrWhiteSpace(Model.SystemMemo))
+ {
+
$("#Memo").show();
+ }
+ else
+ {
$("#Memo").hide(); }
+
});
// Jquery 將兩邊DIV設定同高度
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemChangesController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemChangesController.cs
index 40ec1892..6378a94a 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemChangesController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemChangesController.cs
@@ -68,6 +68,35 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return barcodeItemChange;
}
+ ///
+ /// 用barcodeID獲取資料 By生產履歷
+ ///
+ ///
barcodeID
+ ///
+ [HttpGet("ByBarCodeIDPCS009/{id}")]
+ public async Task
>> GetBarcodeItemChangesByBarCodeIDPCS009(int id)
+ {
+ var q = from q1 in _context.BarcodeItemChanges.Where(w => w.BarcodeID == id)
+ join q2 in _context.Items on q1.ItemNo equals q2.ItemNo
+ join q3 in _context.RuleStations on q1.RuleStationID equals q3.RuleStationID
+ join q4 in _context.UserInfoes on q1.CreateUserID equals q4.UserID
+ select new BarcodeItemChangeDTO
+ {
+ BarcodeID = q1.BarcodeID,
+ WipID = q1.WipID,
+ PartNoOld = q1.PartNoOld,
+ KpItemNo = q1.KpItemNo,
+ ItemNoName = q2.ItemName,
+ StationName = q3.StationDesc,
+ RuleStationID = q1.RuleStationID,
+ CreateUser = q4.UserName,
+ CreateDate = q1.CreateDate,
+ ChangeType = q1.ChangeType
+ };
+
+ return await q.ToListAsync();
+ }
+
///
/// 更新條碼资料
///
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs
index b46eb475..cf51fe21 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs
@@ -242,6 +242,35 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return barcodeItem;
}
+ ///
+ /// 用barcodeID獲取資料 By生產履歷
+ ///
+ /// barcodeID
+ ///
+ [HttpGet("ByBarCodeIDPCS009")]
+ public async Task>> GetBarcodeItemByBarCodeIDPCS009(int barcodeID)
+ {
+ var q = from q1 in _context.BarcodeItems.Where(w => w.BarcodeID == barcodeID)
+ join q2 in _context.Items on q1.ItemNo equals q2.ItemNo
+ join q3 in _context.RuleStations on q1.RuleStationID equals q3.RuleStationID
+ join q4 in _context.UserInfoes on q1.CreateUserID equals q4.UserID
+ select new BarcodeItemDTO
+ {
+ BarcodeID = q1.BarcodeID,
+ WipID = q1.WipID,
+ PartNo = q1.PartNo,
+ KpItemNo = q1.KpItemNo,
+ ItemNoName = q2.ItemName,
+ StationName = q3.StationDesc,
+ RuleStationID = q1.RuleStationID,
+ CreateUser = q4.UserName,
+ CreateDate = q1.CreateDate,
+ SysType = q1.SysType
+ };
+
+ return await q.ToListAsync();
+ }
+
///
/// 用barcode獲取資料
///
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipAttsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipAttsController.cs
index 4ad21d72..eb0935f2 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/WipAttsController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipAttsController.cs
@@ -62,6 +62,18 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return WipAtt.FirstOrDefault();
}
+ ///
+ /// 查詢工單資料Att By 料號
+ ///
+ /// 料號
+ ///
+ [HttpGet("ByItemNo/{id}")]
+ public async Task>> GetWipAttByItemNo(string id)
+ {
+ IQueryable q = _context.WipAtts.Where(p => p.ItemNO == id.Trim().ToUpper());
+ return await q.ToListAsync();
+ }
+
///
/// 新增工單資料Att
///
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipKpsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipKpsController.cs
index 24a7ee52..e5a79d33 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/WipKpsController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipKpsController.cs
@@ -73,7 +73,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
KpNoName = q3.ItemName
};
- return await q.ToListAsync();
+ return await q.OrderBy(o => o.KpSeq).ToListAsync();
}
///
diff --git a/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemChangDTO.cs b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemChangDTO.cs
new file mode 100644
index 00000000..c9a8ec15
--- /dev/null
+++ b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemChangDTO.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace AMESCoreStudio.WebApi.Models.AMES
+{
+ ///
+ /// 條碼组件變更資料檔 DTO
+ ///
+ public class BarcodeItemChangeDTO
+ {
+ ///
+ /// 内部條碼ID
+ ///
+ public int BarcodeItemChangeID { get; set; }
+
+ ///
+ /// 内部條碼ID
+ ///
+ public int BarcodeID { get; set; }
+
+ ///
+ /// 组件條碼
+ ///
+
+ public string PartNoOld { get; set; }
+
+ ///
+ /// 系统狀態
+ ///
+
+ public string ChangeType { get; set; }
+
+ ///
+ /// 组件代碼
+ ///
+
+ public string ItemNo { get; set; }
+
+ ///
+ /// 组件代碼Name
+ ///
+ public string ItemNoName { get; set; }
+
+ ///
+ /// 流程站别ID
+ ///
+
+ public int RuleStationID { get; set; }
+
+ ///
+ /// 流程站名稱
+ ///
+ public string StationName { get; set; }
+
+ ///
+ /// 工單ID
+ ///
+
+ public int WipID { get; set; }
+
+
+ ///
+ /// 组件料號
+ ///
+
+ public string KpItemNo { get; set; }
+
+ ///
+ /// 建立者
+ ///
+
+ public string CreateUser { get; set; }
+
+ ///
+ /// 建立時間
+ ///
+
+ public DateTime CreateDate { get; set; }
+
+ ///
+ /// 修改時間
+ ///
+
+ public DateTime UpdateDate { get; set; }
+
+ }
+}
diff --git a/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemDto.cs
new file mode 100644
index 00000000..9384a571
--- /dev/null
+++ b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemDto.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+
+namespace AMESCoreStudio.WebApi.Models.AMES
+{
+ ///
+ /// 條碼组件資料檔 DTO
+ ///
+
+ public class BarcodeItemDTO
+ {
+
+ ///
+ /// 内部條碼ID
+ ///
+ public int BarcodeID { get; set; }
+
+ ///
+ /// 工單ID
+ ///
+ public int WipID { get; set; }
+
+ ///
+ /// 流程站
+ ///
+ public string StationName { get; set; }
+
+ ///
+ /// 流程站ID
+ ///
+ public int RuleStationID { get; set; }
+
+ ///
+ /// 组件代碼Name
+ ///
+
+ public string ItemNoName { get; set; }
+
+ ///
+ /// 组件條碼
+ ///
+ public string PartNo { get; set; }
+
+ ///
+ /// 系统狀態
+ ///
+ public string SysType { get; set; }
+
+ ///
+ /// 组件料號
+ ///
+
+ public string KpItemNo { get; set; }
+
+ ///
+ /// 建立者Name
+ ///
+
+ public string CreateUser { get; set; }
+
+ ///
+ /// 建立時間
+ ///
+
+ public DateTime CreateDate { get; set; }
+
+ ///
+ /// 修改時間
+ ///
+ public DateTime UpdateDate { get; set; }
+
+ }
+}