|
|
@ -1539,6 +1539,35 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
return Json(new Result() { success = true, data = result.Count() }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 判斷治具總類
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="outfitNo">治具編號</param>
|
|
|
|
/// <param name="partNo">設備名稱(No)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost] |
|
|
|
public async Task<JsonResult> CheckOutfitInfoPartNo(string outfitNo, string partNo) |
|
|
|
{ |
|
|
|
string msg = string.Empty; |
|
|
|
if (!string.IsNullOrWhiteSpace(outfitNo)) |
|
|
|
{ |
|
|
|
var q = await _pcsApi.GetOutfitInfoByOutfitNo(outfitNo); |
|
|
|
if (q != null) |
|
|
|
{ |
|
|
|
var OutfitCommodityInfos = await _pcsApi.GetOutfitCommodityInfo(); |
|
|
|
if (!OutfitCommodityInfos.Where(w => w.CommodityID == q.CommodityID && w.CommodityNo == partNo).Any()) |
|
|
|
msg = "刷入的治具總類不一致,請確認"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
msg = $"找不到這筆【{outfitNo}】治具編號相關資料,請確認"; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return Json(new { data = msg }); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
@ -3627,12 +3656,24 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetFlowRuleList(); |
|
|
|
|
|
|
|
// 起訖序號沒填寫 或者 綁定序號沒填寫
|
|
|
|
if (model.Type1 == "LIMIT") |
|
|
|
{ |
|
|
|
if ((string.IsNullOrWhiteSpace(model.WipBarcode.StartNO) || string.IsNullOrWhiteSpace(model.WipBarcode.EndNO)) |
|
|
|
&& string.IsNullOrWhiteSpace(model.BarcodeNo)) |
|
|
|
{ |
|
|
|
ModelState.AddModelError("error", "請確認新增的條碼是否有填寫?"); |
|
|
|
return View(model); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (model.Type1 == "SOLO") |
|
|
|
{ |
|
|
|
if (string.IsNullOrWhiteSpace(model.WipBarcode.StartNO)) |
|
|
|
{ |
|
|
|
ModelState.AddModelError("error", "請確認新增的條碼是否有填寫?"); |
|
|
|
return View(model); |
|
|
|
} |
|
|
|
model.WipBarcode.EndNO = model.WipBarcode.StartNO; |
|
|
|
} |
|
|
|
|
|
|
|
if ((!string.IsNullOrWhiteSpace(model.WipBarcode.StartNO) || !string.IsNullOrWhiteSpace(model.WipBarcode.EndNO)) |
|
|
|
&& !string.IsNullOrWhiteSpace(model.BarcodeNo)) |
|
|
|