|
|
@ -17,6 +17,7 @@ using System.ComponentModel.DataAnnotations; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using AMESCoreStudio.WebApi.Enum; |
|
|
|
|
|
|
|
namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
@ -480,63 +481,6 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
ViewBag.GetWipTypeList = WipType; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// SMD點膠
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
private void GetSMDType() |
|
|
|
{ |
|
|
|
var SMDType = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "A面全點", |
|
|
|
Value = "0", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "B面全點單", |
|
|
|
Value = "1", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "A面部分點膠", |
|
|
|
Value = "2", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "B面部分點膠", |
|
|
|
Value = "3", |
|
|
|
} |
|
|
|
, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "不需點膠", |
|
|
|
Value = "4", |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
ViewBag.GetSMDTypeList = SMDType; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// DIP
|
|
|
|
/// </summary>
|
|
|
|
private void GetDIPType() |
|
|
|
{ |
|
|
|
var DIPType = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "正面", |
|
|
|
Value = "正面", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "背面", |
|
|
|
Value = "背面", |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
ViewBag.GetDIPTypeList = DIPType; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 燒錄
|
|
|
|
/// </summary>
|
|
|
@ -593,85 +537,69 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// PCB烘烤
|
|
|
|
/// 工單資訊 板卡資訊 PCB烘烤
|
|
|
|
/// </summary>
|
|
|
|
private void GetPCBBakeType() |
|
|
|
{ |
|
|
|
var PCBBakeType = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "依廠內規範", |
|
|
|
Value = "0", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "125℃/2H", |
|
|
|
Value = "1", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
private void GetPCBBakeTypeSelect(string SelectedValue = null) |
|
|
|
{ |
|
|
|
Text = "120℃/1H(FPC)", |
|
|
|
Value = "2", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
List<string> values = new List<string>(); |
|
|
|
if (SelectedValue != null) |
|
|
|
{ |
|
|
|
Text = "其他", |
|
|
|
Value = "3", |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
}; |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardPCBBakeType)).Cast<EnumPCS.EnumWipBoardPCBBakeType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetPCBBakeTypeList = PCBBakeType; |
|
|
|
ViewBag.GetPCBBakeTypeSelect = q; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// PCB加工
|
|
|
|
/// 工單資訊 板卡資訊 PCB加工
|
|
|
|
/// </summary>
|
|
|
|
private void GetPCBWorkingType() |
|
|
|
{ |
|
|
|
var PCBWorkingType = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "噴印字樣", |
|
|
|
Value = "噴印字樣", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
private void GetPCBProcessingTypeSelect(string SelectedValue = null) |
|
|
|
{ |
|
|
|
Text = "其他", |
|
|
|
Value = "其他", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
List<string> values = new List<string>(); |
|
|
|
if (SelectedValue != null) |
|
|
|
{ |
|
|
|
Text = "不需加工", |
|
|
|
Value = "不需加工", |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
}; |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardPCBProcessingType)).Cast<EnumPCS.EnumWipBoardPCBProcessingType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetPCBWorkingTypeList = PCBWorkingType; |
|
|
|
ViewBag.GetPCBProcessingTypeSelect = q; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 錫膏
|
|
|
|
/// 工單資訊 板卡資訊 錫膏
|
|
|
|
/// </summary>
|
|
|
|
private void GetSolderPaste() |
|
|
|
{ |
|
|
|
var SolderPaste = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "KOKI無鉛錫膏(S3X58-M406-3)", |
|
|
|
Value = "0", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
private void GetSolderPasteSelect(string SelectedValue = null) |
|
|
|
{ |
|
|
|
Text = "千住無鉛錫膏(M705-221BM5-32-11.5Ka3)", |
|
|
|
Value = "1", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
List<string> values = new List<string>(); |
|
|
|
if (SelectedValue != null) |
|
|
|
{ |
|
|
|
Text = "其他", |
|
|
|
Value = "2", |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
}; |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardSolderPasteType)).Cast<EnumPCS.EnumWipBoardSolderPasteType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetSolderPasteList = SolderPaste; |
|
|
|
ViewBag.GetSolderPasteSelect = q; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 工單資訊 系統工程資訊 PMType
|
|
|
|
/// </summary>
|
|
|
@ -683,11 +611,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumWipSystemPMType)).Cast<Enums.EnumWipSystemPMType>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipSystemPMType)).Cast<EnumPCS.EnumWipSystemPMType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Value = Convert.ToInt32(Enum.Parse(typeof(Enums.EnumWipSystemPMType), s.ToString())).ToString() |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = Convert.ToInt32(Enum.Parse(typeof(EnumPCS.EnumWipSystemPMType), s.ToString())).ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetWipSystemPMTypeSelect = q; |
|
|
@ -704,11 +632,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumWipSystemType)).Cast<Enums.EnumWipSystemType>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipSystemType)).Cast<EnumPCS.EnumWipSystemType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Value = Convert.ToInt32(Enum.Parse(typeof(Enums.EnumWipSystemType), s.ToString())).ToString() |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = Convert.ToInt32(Enum.Parse(typeof(EnumPCS.EnumWipSystemType), s.ToString())).ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetWipSystemTypeSelect = q; |
|
|
@ -725,51 +653,16 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumWipSopType)).Cast<Enums.EnumWipSopType>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipSopType)).Cast<EnumPCS.EnumWipSopType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetSOPTypeSelect = q; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// PCS001 SOP相關下拉
|
|
|
|
/// </summary>
|
|
|
|
private void GetPCSOPList() |
|
|
|
{ |
|
|
|
var PCSOPList = new List<SelectListItem>(){ |
|
|
|
new SelectListItem() { |
|
|
|
Text = "SOP", |
|
|
|
Value = "SOP", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "技術轉移", |
|
|
|
Value = "技術轉移", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "NA", |
|
|
|
Value = "NA", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "暫時文件", |
|
|
|
Value = "備暫時文件", |
|
|
|
}, |
|
|
|
new SelectListItem |
|
|
|
{ |
|
|
|
Text = "備註說明", |
|
|
|
Value = "備註說明", |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
ViewBag.PCSOPList = PCSOPList; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 工單鎖定-鎖定類型
|
|
|
|
/// </summary>
|
|
|
@ -854,10 +747,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumPrintMode)).Cast<Enums.EnumPrintMode>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumPrintMode)).Cast<EnumPCS.EnumPrintMode>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
@ -876,10 +769,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumApproveLogo)).Cast<Enums.EnumApproveLogo>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumApproveLogo)).Cast<EnumPCS.EnumApproveLogo>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
@ -899,10 +792,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumCompanyLogo)).Cast<Enums.EnumCompanyLogo>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumCompanyLogo)).Cast<EnumPCS.EnumCompanyLogo>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
@ -918,16 +811,60 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumWipAttr)).Cast<Enums.EnumWipAttr>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipAttr)).Cast<EnumPCS.EnumWipAttr>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetCheckboxWipAttr = q; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// SMD點膠
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
private void GetCheckboxSMD(string SelectedValue = null) |
|
|
|
{ |
|
|
|
List<string> values = new List<string>(); |
|
|
|
if (SelectedValue != null) |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardSMDType)).Cast<EnumPCS.EnumWipBoardSMDType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetCheckboxSMD = q; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// DIP
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
private void GetCheckboxDIP(string SelectedValue = null) |
|
|
|
{ |
|
|
|
List<string> values = new List<string>(); |
|
|
|
if (SelectedValue != null) |
|
|
|
{ |
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
} |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardDIPType)).Cast<EnumPCS.EnumWipBoardDIPType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString(), |
|
|
|
Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
ViewBag.GetCheckboxDIP = q; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region resut Ajax JSON
|
|
|
@ -997,10 +934,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
[HttpPost] |
|
|
|
public JsonResult GetSOPTypeJson(string id, string search) |
|
|
|
{ |
|
|
|
var q = Enum.GetValues(typeof(Enums.EnumWipSopType)).Cast<Enums.EnumWipSopType>() |
|
|
|
var q = Enum.GetValues(typeof(EnumPCS.EnumWipSopType)).Cast<EnumPCS.EnumWipSopType>() |
|
|
|
.Select(s => new SelectListItem |
|
|
|
{ |
|
|
|
Text = Enums.GetDisplayName(s).ToString(), |
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
Value = s.ToString() |
|
|
|
}).ToList(); |
|
|
|
|
|
|
@ -1146,16 +1083,13 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetSOPTypeSelect(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
@ -1163,6 +1097,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
GetCheckboxCompanyLogo(); |
|
|
|
GetCheckboxPrintMode(); |
|
|
|
GetCheckboxWipAttr(); |
|
|
|
GetCheckboxDIP(); |
|
|
|
GetCheckboxSMD(); |
|
|
|
//var result = new WipAllViewModel();
|
|
|
|
//return View(result);
|
|
|
|
|
|
|
@ -1181,16 +1117,14 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
|
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetSOPTypeSelect(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
@ -1198,6 +1132,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
GetCheckboxCompanyLogo(); |
|
|
|
GetCheckboxPrintMode(); |
|
|
|
GetCheckboxWipAttr(); |
|
|
|
GetCheckboxDIP(); |
|
|
|
GetCheckboxSMD(); |
|
|
|
#endregion
|
|
|
|
|
|
|
|
IResultModel result; |
|
|
@ -1212,6 +1148,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "true" ? "Y" : "N"; |
|
|
|
model.wipBoard.DipTape = model.wipBoard.DipTape == "true" ? "Y" : "N"; |
|
|
|
model.wipBoard.Burn = model.wipBoard.Burn == "true" ? "Y" : "N"; |
|
|
|
model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "true" ? "Y" : "N"; |
|
|
|
model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "true" ? "Y" : "N"; |
|
|
|
//系統
|
|
|
|
model.wipSystem.FinePackage = model.wipSystem.FinePackage == "true" ? "Y" : "N"; |
|
|
|
|
|
|
@ -1240,7 +1178,10 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
//板卡
|
|
|
|
model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "Y" ? "true" : "false"; |
|
|
|
model.wipBoard.DipTape = model.wipBoard.DipTape == "Y" ? "true" : "false"; |
|
|
|
model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "Y" ? "true" : "false"; |
|
|
|
model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "Y" ? "true" : "false"; |
|
|
|
model.wipBoard.Burn = model.wipBoard.Burn == "Y" ? "true" : "false"; |
|
|
|
|
|
|
|
//系統
|
|
|
|
model.wipSystem.FinePackage = model.wipSystem.FinePackage == "Y" ? "true" : "false"; |
|
|
|
ModelState.AddModelError("error", Msg); |
|
|
@ -1300,6 +1241,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.BiTemperature)) |
|
|
|
{ |
|
|
|
model.wipBoard.Smd = model.wipBoard.SMDs == null ? null : string.Join(',', model.wipBoard.SMDs); |
|
|
|
model.wipBoard.DipSide = model.wipBoard.DipSides == null ? null : string.Join(',', model.wipBoard.DipSides); |
|
|
|
model.wipBoard.ItemNo = model.wipAtt.ItemNO; |
|
|
|
model.wipBoard.WipNo = model.wipInfo.WipNO; |
|
|
|
await _pcsApi.PostWipBoard(JsonConvert.SerializeObject(model.wipBoard)); |
|
|
@ -1437,16 +1380,13 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetSOPTypeSelect(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
@ -1454,6 +1394,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
GetCheckboxCompanyLogo(); |
|
|
|
GetCheckboxPrintMode(); |
|
|
|
GetCheckboxWipAttr(); |
|
|
|
GetCheckboxDIP(); |
|
|
|
GetCheckboxSMD(); |
|
|
|
|
|
|
|
model.wipAtt = await _pcsApi.GetWipAtt(model.wipInfo.WipNO); |
|
|
|
model.wipBarcodes = await _pcsApi.GetWipBarcode(model.wipInfo.WipNO); |
|
|
@ -1496,19 +1438,25 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
|
|
|
|
model.wipBoard = await _pcsApi.GetWipBoard(model.wipInfo.WipNO); |
|
|
|
if (model.wipBoard != null) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) |
|
|
|
{ |
|
|
|
var UserInof = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result; |
|
|
|
if (UserInof != null) |
|
|
|
model.wipBoard.Engineer_Name = UserInof.UserName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
model.wipSystem = await _pcsApi.GetWipSystem(model.wipInfo.WipNO); |
|
|
|
if (model.wipSystem != null) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) |
|
|
|
{ |
|
|
|
var UserInof = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result; |
|
|
|
if (UserInof != null) |
|
|
|
model.wipSystem.Engineer_Name = UserInof.UserName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
model.wipMAC = await _pcsApi.GetWipMAC(model.wipInfo.WipNO); |
|
|
|
|
|
|
@ -1532,22 +1480,21 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
|
GetCheckboxApproveLogo(model.wipLabel != null ? model.wipLabel.ApproveLogo : null); |
|
|
|
GetCheckboxCompanyLogo(model.wipLabel != null ? model.wipLabel.CompanyLogo : null); |
|
|
|
GetCheckboxPrintMode(model.wipLabel != null ? model.wipLabel.PrintMode : null); |
|
|
|
GetCheckboxWipAttr(model.wipLabel != null ? model.wipLabel.WipAttr : null); |
|
|
|
GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : null); |
|
|
|
GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : null); |
|
|
|
return View(model); |
|
|
|
} |
|
|
|
|
|
|
@ -1578,13 +1525,23 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
model.wipBoard = await _pcsApi.GetWipBoard(model.wipInfo.WipNO); |
|
|
|
if (model.wipBoard != null) |
|
|
|
{ |
|
|
|
model.wipBoard.Engineer_Name = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result.UserName; |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) |
|
|
|
{ |
|
|
|
var UserInof = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result; |
|
|
|
if (UserInof != null) |
|
|
|
model.wipBoard.Engineer_Name = UserInof.UserName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
model.wipSystem = await _pcsApi.GetWipSystem(model.wipInfo.WipNO); |
|
|
|
if (model.wipSystem != null) |
|
|
|
{ |
|
|
|
model.wipSystem.Engineer_Name = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result.UserName; |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) |
|
|
|
{ |
|
|
|
var UserInof = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result; |
|
|
|
if (UserInof != null) |
|
|
|
model.wipSystem.Engineer_Name = UserInof.UserName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
model.wipMAC = await _pcsApi.GetWipMAC(model.wipInfo.WipNO); |
|
|
@ -1607,23 +1564,22 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetSOPTypeSelect(); |
|
|
|
GetCheckboxApproveLogo(model.wipLabel != null ? model.wipLabel.ApproveLogo : null); |
|
|
|
GetCheckboxCompanyLogo(model.wipLabel != null ? model.wipLabel.CompanyLogo : null); |
|
|
|
GetCheckboxPrintMode(model.wipLabel != null ? model.wipLabel.PrintMode : null); |
|
|
|
GetCheckboxWipAttr(model.wipLabel != null ? model.wipLabel.WipAttr : null); |
|
|
|
GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : null); |
|
|
|
GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : null); |
|
|
|
return View(model); |
|
|
|
} |
|
|
|
[HttpPost] |
|
|
@ -1639,23 +1595,23 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
await GetMFGType(); |
|
|
|
await GetProcessTypes(); |
|
|
|
await GetFlowRuleList(); |
|
|
|
GetSMDType(); |
|
|
|
GetDIPType(); |
|
|
|
GetWipSEQType(); |
|
|
|
GetBurnType(); |
|
|
|
GetPartsBakeType(); |
|
|
|
GetPCBBakeType(); |
|
|
|
GetPCBWorkingType(); |
|
|
|
GetSolderPaste(); |
|
|
|
GetPCBBakeTypeSelect(); |
|
|
|
GetPCBProcessingTypeSelect(); |
|
|
|
GetSolderPasteSelect(); |
|
|
|
GetWipType(); |
|
|
|
GetWipSystemTypeSelect(); |
|
|
|
GetPCSOPList(); |
|
|
|
GetSOPTypeSelect(); |
|
|
|
GetCheckboxApproveLogo(); |
|
|
|
GetCheckboxCompanyLogo(); |
|
|
|
GetCheckboxPrintMode(); |
|
|
|
GetCheckboxWipAttr(); |
|
|
|
GetCheckboxDIP(); |
|
|
|
GetCheckboxSMD(); |
|
|
|
GetWipSystemPMTypeSelect(); |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
model.ruleStations = await _pcsApi.GetRuleStationByWipNo(model.wipInfo.WipNO); |
|
|
@ -1673,6 +1629,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "on" ? "Y" : "N"; |
|
|
|
model.wipBoard.DipTape = model.wipBoard.DipTape == "on" ? "Y" : "N"; |
|
|
|
model.wipBoard.Burn = model.wipBoard.Burn == "on" ? "Y" : "N"; |
|
|
|
model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "on" ? "Y" : "N"; |
|
|
|
model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "on" ? "Y" : "N"; |
|
|
|
//系統
|
|
|
|
model.wipSystem.FinePackage = model.wipSystem.FinePackage == "on" ? "Y" : "N"; |
|
|
|
|
|
|
@ -1742,6 +1700,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
if (!string.IsNullOrWhiteSpace(model.wipBoard.BiTemperature)) |
|
|
|
{ |
|
|
|
model.wipBoard.Smd = model.wipBoard.SMDs == null ? null : string.Join(',', model.wipBoard.SMDs); |
|
|
|
model.wipBoard.DipSide = model.wipBoard.DipSides == null ? null : string.Join(',', model.wipBoard.DipSides); |
|
|
|
model.wipBoard.ItemNo = model.wipAtt.ItemNO; |
|
|
|
model.wipBoard.WipNo = model.wipInfo.WipNO; |
|
|
|
await _pcsApi.PutWipBoard(JsonConvert.SerializeObject(model.wipBoard)); |
|
|
|