diff --git a/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs b/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
index f7d07aab..7f0304c0 100644
--- a/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
@@ -134,7 +134,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
var ByExtraNo = await barcodeInfoesController.GetBarcodeInfoesByExtraNo(barCodeCheckDto.barcode);
if (ByExtraNo.Value.Count() != 0)
{
- barCodeCheckDto.extNo = barCodeCheckDto.barcode;
+ barCodeCheckDto.extNo = ByExtraNo.Value.FirstOrDefault().ExtraBarcodeNo;
barCodeCheckDto.barcode = ByExtraNo.Value.FirstOrDefault().BarcodeNo;
}
#endregion
@@ -203,8 +203,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
var barcodeItemKPDto = new BarcodeItemKPDto
{
- WipNo = barCodeCheckDto.wipNo,
- barcode = barCodeCheckDto.barcode,
+ wipNo = barCodeCheckDto.wipNo,
+ barCode = barCodeCheckDto.barcodeID,
unitNo = barCodeCheckDto.unitNo,
ststionUnitNo = station.Value.Where(w => w.StationID == barCodeCheckDto.stationID).FirstOrDefault().UnitNo,
inputKP = barCodeCheckDto.inputItems.Where(w => !w.inputType.ToUpper().StartsWith("NG")).ToList()
@@ -1987,11 +1987,11 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
#region 判斷是否有工單
WipInfosController wipInfosController = new WipInfosController(_context);
- var wipinfo = await wipInfosController.GetWipInfoByWipNo(barcodeItemKPDto.WipNo);
+ var wipinfo = await wipInfosController.GetWipInfoByWipNo(barcodeItemKPDto.wipNo);
wipinfo = wipinfo.Value.Where(w => w.UnitNO == barcodeItemKPDto.unitNo).ToList();
if (wipinfo.Value.Count() == 0)
{
- resultModel.Msg = "找不到工單號碼【" + barcodeItemKPDto.WipNo + "】";
+ resultModel.Msg = "找不到工單號碼【" + barcodeItemKPDto.wipNo + "】";
return resultModel;
}
#endregion
@@ -2001,7 +2001,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
string ItemNo = (await wipAttsController.GetWipAtt(wipinfo.Value.FirstOrDefault().WipNO)).Value.ItemNO;
if (string.IsNullOrWhiteSpace(ItemNo))
{
- resultModel.Msg = "工單號碼【" + barcodeItemKPDto.WipNo + "】,找不到料號名稱";
+ resultModel.Msg = "工單號碼【" + barcodeItemKPDto.wipNo + "】,找不到料號名稱";
return resultModel;
}
#endregion
@@ -2018,12 +2018,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
#region 確認是否有設定key Parts資料
WipKpsController wipKpsController = new WipKpsController(_context);
- var wipKps = (await wipKpsController.GetWipKpByWipNo(barcodeItemKPDto.WipNo)).Value.ToList();
+ var wipKps = (await wipKpsController.GetWipKpByWipNo(barcodeItemKPDto.wipNo)).Value.ToList();
wipKps = wipKps.Where(w => w.UnitNo == barcodeItemKPDto.ststionUnitNo).OrderBy(o => o.KpSeq).ToList();
if (wipKps.Count != 0)
{
#region 判斷內部序號是否有過站紀錄
- var BarCodeID = await BarCodeToID(barcodeItemKPDto.barcode);
+ var BarCodeID = await BarCodeToID(barcodeItemKPDto.barCodeNo);
//if (BarCodeID == 0)
//{
// resultModel.Msg = "內部序號【" + BarCodeID + "】,在條碼資料檔找不到";
@@ -2153,7 +2153,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
if (wipKpsItem.KpNo.ToUpper() == "95")
{
WipBarcodeOtherController wipBarcodeOtherController = new WipBarcodeOtherController(_context);
- var WipBarCodeOther = await wipBarcodeOtherController.CheckWipBarcodeOtherByNo(barcodeItemKPDto.WipNo, barcodeKPDtoItem.inputData);
+ var WipBarCodeOther = await wipBarcodeOtherController.CheckWipBarcodeOtherByNo(barcodeItemKPDto.wipNo, barcodeKPDtoItem.inputData);
if (WipBarCodeOther.Value.Count() == 0)
{
CheckMsg += "組件序號【" + barcodeKPDtoItem.inputData + "】 與工單設定出貨序號區間不符合 ";
diff --git a/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemKPDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemKPDto.cs
index 8616c91e..df28a280 100644
--- a/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemKPDto.cs
+++ b/AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemKPDto.cs
@@ -14,12 +14,22 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
///
/// 工單號碼
///
- public string WipNo { get; set; }
+ public string wipNo { get; set; }
///
- /// 條碼
+ /// 工單號碼ID
///
- public string barcode { get; set; }
+ public int wipId { get; set; }
+
+ ///
+ /// 內部條碼ID
+ ///
+ public int barCode { get; set; }
+
+ ///
+ /// 內部條碼No
+ ///
+ public string barCodeNo { get; set; }
///
/// 工單-生產單位
diff --git a/AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs b/AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs
index 2318d6a8..552369e1 100644
--- a/AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs
+++ b/AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs
@@ -57,7 +57,7 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
public string ruleStatus { get; set; } = "P";
///
- /// 生產單位
+ /// 生產單位-製程
///
[DataMember]
public string unitNo { get; set; }
@@ -69,12 +69,11 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
public int flowRule { get; set; } = 0;
///
- /// 作業站
+ /// 作業站ID
///
[DataMember]
public int stationID { get; set; } = 0;
-
///
/// 線別站
///
@@ -113,27 +112,27 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
public class inputItem
{
///
- /// 刷入類型 NG or KP(Item_No)
+ /// 刷入類型 NG(不良) or KP(Item_No)
///
[DataMember]
public string inputType { get; set; }
///
- /// 刷入組件資料或不良代碼
+ /// KP:組件料號,NG:不良代碼
///
[DataMember]
public string inputData { get { return InputData; } set { InputData = string.IsNullOrWhiteSpace(value) ? "" : value.Trim().ToUpper(); } }
private string InputData;
///
- /// 組件:舊組件序號 NG:異常位置
+ /// KP:舊組件序號,NG:異常位置
///
[DataMember]
public string oldInputData { get { return OldInputData; } set { OldInputData = string.IsNullOrWhiteSpace(value) ? "" : value.Trim().ToUpper(); } }
private string OldInputData;
///
- /// 組件:組件料號 NG:
+ /// KP:組件料號,NG:
///
[DataMember]
public string kpItemNo { get { return KpItemNo; } set { KpItemNo = string.IsNullOrWhiteSpace(value) ? "" : value.Trim().ToUpper(); } }
@@ -158,4 +157,55 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
public string PartNo { get; set; } = string.Empty;
}
}
+
+ public class BarCodeCheckDtoForDBData : BarCodeCheckDto
+ {
+ ///
+ /// 料號ID
+ ///
+ [DataMember]
+ public int item { get; set; } = 0;
+
+ ///
+ /// 料號No
+ ///
+ [DataMember]
+ public string itemNo { get; set; } = string.Empty;
+
+ ///
+ /// Burn In 燒機完成狀態
+ ///
+ [DataMember]
+ public bool burnIn { get; set; } = false;
+
+ ///
+ /// 工作站_測試類別
+ ///
+ [DataMember]
+ public string stations_TestType { get; set; } = string.Empty;
+
+ ///
+ /// 工作站_工作站類別
+ ///
+ [DataMember]
+ public string stations_TypeNo { get; set; } = string.Empty;
+
+ ///
+ /// 工作站_綁定製程
+ ///
+ [DataMember]
+ public string stations_UnitNo { get; set; } = string.Empty;
+
+ ///
+ /// 工作站_工作站名稱
+ ///
+ [DataMember]
+ public string stations_Name { get; set; } = string.Empty;
+
+ ///
+ /// 生產單位_簡碼
+ ///
+ [DataMember]
+ public string factoryUnit_UnitCode { get; set; } = string.Empty;
+ }
}