|
@ -117,34 +117,68 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
return Msg; |
|
|
return Msg; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工單工程 保存判斷
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
public string CheckWipInfoInsert_WipSystem(WipSystem model) |
|
|
public string CheckWipInfoInsert_WipSystem(WipSystem model) |
|
|
{ |
|
|
{ |
|
|
string Msg = string.Empty; |
|
|
string Msg = string.Empty; |
|
|
|
|
|
|
|
|
// 判斷預設值是否更改過,如果有就判斷必填欄位
|
|
|
// 當工單-工程資訊有填寫任何一個欄位,就要把必填欄位都填寫
|
|
|
if (!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
if (!string.IsNullOrWhiteSpace(model.Engineer) || |
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
!string.IsNullOrWhiteSpace(model.PowerMode) || |
|
|
!string.IsNullOrWhiteSpace(model.BiMemo) || |
|
|
!string.IsNullOrWhiteSpace(model.BiMemo) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
|
|
|
model.BiRatio != 0 || |
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
!string.IsNullOrWhiteSpace(model.Bios)) |
|
|
!string.IsNullOrWhiteSpace(model.Bios) || |
|
|
{ |
|
|
!string.IsNullOrWhiteSpace(model.BiosVer) || |
|
|
if (string.IsNullOrWhiteSpace(model.BiTemperature)) |
|
|
!string.IsNullOrWhiteSpace(model.Cpu) || |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTemperature)).Name + ","; |
|
|
!string.IsNullOrWhiteSpace(model.DmiBi) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Ram) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Fw) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Fw1) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Fw2) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Ec) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.OsVer) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Jumper) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Memo)) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
// 判斷預設值是否更改過,如果有就判斷必填欄位
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiMemo) || |
|
|
|
|
|
model.BiRatio == 0 || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Bios) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiosVer)) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTemperature)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTemperature)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTime)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTime)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiMemo)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiMemo)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Checksum)) |
|
|
if (string.IsNullOrWhiteSpace(model.Checksum)) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Checksum)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Checksum)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Bios)) |
|
|
if (string.IsNullOrWhiteSpace(model.Bios)) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Bios)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Bios)).Name + ","; |
|
|
|
|
|
|
|
|
} |
|
|
if (string.IsNullOrWhiteSpace(model.BiosVer)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiosVer)).Name + ","; |
|
|
|
|
|
|
|
|
|
|
|
if (model.BiRatio == 0) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiRatio)).Name + ","; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return Msg; |
|
|
return Msg; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -152,30 +186,63 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
string Msg = string.Empty; |
|
|
string Msg = string.Empty; |
|
|
|
|
|
|
|
|
// 判斷預設值是否更改過,如果有就判斷必填欄位
|
|
|
// 當工單-板卡資訊有填寫任何一個欄位,就要把必填欄位都填寫
|
|
|
if (model.BiRatio != 0 || |
|
|
if (model.BiRatio != 0 || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiosRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiosRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiosVer) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BiRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BurnLocation) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.BurnRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.CsRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.Engineer) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.PartsBakeRemarks) || |
|
|
model.PartsBakeTime != 0 || |
|
|
model.PartsBakeTime != 0 || |
|
|
model.PcbBake != 0 || |
|
|
model.PcbBake != 0 || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.PcbBakeRemarks) || |
|
|
|
|
|
!string.IsNullOrWhiteSpace(model.PcbProcessingRemarks)) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
// 判斷預設值是否更改過,如果有就判斷必填欄位
|
|
|
|
|
|
if (model.BiRatio == 0 || |
|
|
|
|
|
model.PartsBakeTime == 0 || |
|
|
|
|
|
model.PcbBake == 0 || |
|
|
!string.IsNullOrWhiteSpace(model.BiosVer) || |
|
|
!string.IsNullOrWhiteSpace(model.BiosVer) || |
|
|
!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
!string.IsNullOrWhiteSpace(model.BiTemperature) || |
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
!string.IsNullOrWhiteSpace(model.BiTime) || |
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
!string.IsNullOrWhiteSpace(model.Checksum) || |
|
|
!string.IsNullOrWhiteSpace(model.BurnLocation)) |
|
|
!string.IsNullOrWhiteSpace(model.BurnLocation)) |
|
|
{ |
|
|
{ |
|
|
if (string.IsNullOrWhiteSpace(model.BiTemperature)) |
|
|
if (model.BiRatio == 0) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTemperature)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiRatio)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
if (model.PartsBakeTime == 0) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTime)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.PartsBakeTime)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Checksum)) |
|
|
if (model.PcbBake == 0) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Checksum)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.PcbBake)).Name + ","; |
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BurnLocation)) |
|
|
if (string.IsNullOrWhiteSpace(model.BiosVer)) |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BurnLocation)).Name + ","; |
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiosVer)).Name + ","; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTemperature)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTemperature)).Name + ","; |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BiTime)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BiTime)).Name + ","; |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Checksum)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.Checksum)).Name + ","; |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.BurnLocation)) |
|
|
|
|
|
Msg += model.GetAttributeFrom<DisplayAttribute>(nameof(model.BurnLocation)).Name + ","; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return Msg; |
|
|
return Msg; |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
@ -1213,6 +1280,30 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
ViewBag.RuleStationByWipNoUnitNoList = items; |
|
|
ViewBag.RuleStationByWipNoUnitNoList = items; |
|
|
return Json(new { data = items }); |
|
|
return Json(new { data = items }); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 取出貨序號
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="itemNo">料號</param>
|
|
|
|
|
|
/// <param name="lotNo">生產序號</param>
|
|
|
|
|
|
/// <param name="num">生產數量</param>
|
|
|
|
|
|
/// <returns>RuleStation </returns>
|
|
|
|
|
|
[HttpPost] |
|
|
|
|
|
public async Task<JsonResult> GetBarcodeOther(string itemNo, string lotNo, int num) |
|
|
|
|
|
{ |
|
|
|
|
|
var result = await _pcsApi.GetSerialRuleByQurey(itemNo, lotNo.Trim().ToUpper(), num); |
|
|
|
|
|
string StartNO = ""; |
|
|
|
|
|
string EndNO = ""; |
|
|
|
|
|
|
|
|
|
|
|
if (result.Success) |
|
|
|
|
|
{ |
|
|
|
|
|
StartNO = result.Msg.Split('~')[0]; |
|
|
|
|
|
EndNO = result.Msg.Split('~')[1] ?? result.Msg.Split('~')[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Json(new Result() { success = result.Success, msg = result.Msg, data = new { StartNO, EndNO } }); |
|
|
|
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
[ResponseCache(Duration = 0)] |
|
|
[ResponseCache(Duration = 0)] |
|
@ -1943,7 +2034,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = await _pcsApi.PutWipInfo(JsonConvert.SerializeObject(model.wipInfo)); |
|
|
result = await _pcsApi.PutWipInfo(JsonConvert.SerializeObject(model.wipInfo)); |
|
|
if (result.Success) |
|
|
if (result.Success) |
|
|
{ |
|
|
{ |
|
|