|
@ -27,10 +27,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
public readonly IPCS _pcsApi; |
|
|
public readonly IPCS _pcsApi; |
|
|
public readonly IBAS _basApi; |
|
|
public readonly IBAS _basApi; |
|
|
public readonly IPPS _ppsApi; |
|
|
public readonly IPPS _ppsApi; |
|
|
|
|
|
public readonly IFQC _fqcApi; |
|
|
public readonly IFileServerProvider _fileServerProvider; |
|
|
public readonly IFileServerProvider _fileServerProvider; |
|
|
private readonly IWebHostEnvironment _env; |
|
|
private readonly IWebHostEnvironment _env; |
|
|
|
|
|
|
|
|
public PCSController(ILogger<PCSController> logger, ISYS sysApi, IPCS pcsApi, IBAS basApi, IPPS ppsApi |
|
|
public PCSController(ILogger<PCSController> logger, ISYS sysApi, IPCS pcsApi, IBAS basApi, IPPS ppsApi, IFQC fqcApi |
|
|
, IFileServerProvider fileServerProvider, IWebHostEnvironment env) |
|
|
, IFileServerProvider fileServerProvider, IWebHostEnvironment env) |
|
|
{ |
|
|
{ |
|
|
_logger = logger; |
|
|
_logger = logger; |
|
@ -38,6 +39,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
_pcsApi = pcsApi; |
|
|
_pcsApi = pcsApi; |
|
|
_basApi = basApi; |
|
|
_basApi = basApi; |
|
|
_ppsApi = ppsApi; |
|
|
_ppsApi = ppsApi; |
|
|
|
|
|
_fqcApi = fqcApi; |
|
|
_fileServerProvider = fileServerProvider; |
|
|
_fileServerProvider = fileServerProvider; |
|
|
_env = env; |
|
|
_env = env; |
|
|
} |
|
|
} |
|
@ -1873,12 +1875,28 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
return View(); |
|
|
return View(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// PCS009 Query By 包裝箱號
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="boxNo">包裝箱號</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public async Task<IActionResult> PCS009QueryAsync(string boxNo) |
|
|
|
|
|
{ |
|
|
|
|
|
var result = await _fqcApi.GetBarcodeInfoesByBoxNo(boxNo); |
|
|
|
|
|
|
|
|
|
|
|
if (result.Count != 0) |
|
|
|
|
|
{ |
|
|
|
|
|
return Json(new Table() { code = 0, msg = "", data = result, count = result.Count }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Json(new Table() { count = 0, data = null }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public async Task<IActionResult> PCS009R() |
|
|
public async Task<IActionResult> PCS009R(PCS009ViewModel model) |
|
|
{ |
|
|
{ |
|
|
var result = new PCS009RViewModel(); |
|
|
var result = new PCS009RViewModel(); |
|
|
|
|
|
|
|
|
var result_barcodeinfo = _pcsApi.GetBarcodeInfoesByNo("WO0002A10001").InvokeAsync().Result.FirstOrDefault(); |
|
|
var result_barcodeinfo = _pcsApi.GetBarcodeInfoesByNo(model.BarCodeNo).InvokeAsync().Result.FirstOrDefault(); |
|
|
|
|
|
|
|
|
if (result_barcodeinfo == null) |
|
|
if (result_barcodeinfo == null) |
|
|
{ |
|
|
{ |
|
@ -1903,7 +1921,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
WipNo = wipinfo.WipNO, |
|
|
WipNo = wipinfo.WipNO, |
|
|
ItemNo = wipinfo.GetWipAtt.WipNO, |
|
|
ItemNo = wipinfo.GetWipAtt.WipNO, |
|
|
UnitNo = wipinfo.UnitNO + "[" + wipinfo.GetFactoryUnit.UnitName + "]", |
|
|
UnitNo = wipinfo.GetFactoryUnit.UnitCode + "[" + wipinfo.GetFactoryUnit.UnitName + "]", |
|
|
Line = wipinfo.GetLineInfo.LineDesc, |
|
|
Line = wipinfo.GetLineInfo.LineDesc, |
|
|
ECN = wipinfo.GetWipAtt.ECN, |
|
|
ECN = wipinfo.GetWipAtt.ECN, |
|
|
ECO = wipinfo.GetWipAtt.EAN, |
|
|
ECO = wipinfo.GetWipAtt.EAN, |
|
@ -1920,7 +1938,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
result.BarCodeLogs.Add(new BarCodeLog |
|
|
result.BarCodeLogs.Add(new BarCodeLog |
|
|
{ |
|
|
{ |
|
|
Station = barcodestation.RuleStationID.ToString(), |
|
|
Station = barcodestation.GetRuleStation.StationDesc, |
|
|
RuleStation = barcodestation.RuleStatus, |
|
|
RuleStation = barcodestation.RuleStatus, |
|
|
SysType = barcodestation.Systype, |
|
|
SysType = barcodestation.Systype, |
|
|
User = barcodestation.CreateUserID.ToString(), |
|
|
User = barcodestation.CreateUserID.ToString(), |
|
@ -1934,9 +1952,9 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
result.BarCodeKPs.Add(new BarCodeKP |
|
|
result.BarCodeKPs.Add(new BarCodeKP |
|
|
{ |
|
|
{ |
|
|
Station = barcodeitem.RuleStationID.ToString(), |
|
|
Station = barcodeitem.S.StationDesc, |
|
|
KPPartNo = barcodeitem.PartNo, |
|
|
KPPartNo = barcodeitem.PartNo, |
|
|
KPItemNo = barcodeitem.ItemNo, |
|
|
KPItemNo = barcodeitem.KpItemNo, |
|
|
InputDate = barcodeitem.CreateDate.ToString() |
|
|
InputDate = barcodeitem.CreateDate.ToString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -1947,11 +1965,11 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
result.KPChanges.Add(new KPChange |
|
|
result.KPChanges.Add(new KPChange |
|
|
{ |
|
|
{ |
|
|
KPPartNo = barcodeitemchange.PartNoOld, |
|
|
KPPartNo = barcodeitemchange.PartNoOld, |
|
|
KPItemNo = barcodeitemchange.ItemNo, |
|
|
KPItemNo = barcodeitemchange.ItemNo, |
|
|
ChangeType = barcodeitemchange.ChangeType, |
|
|
ChangeType = barcodeitemchange.ChangeType, |
|
|
Date = barcodeitemchange.CreateDate.ToString(), |
|
|
Date = barcodeitemchange.CreateDate.ToString(), |
|
|
User = barcodeitemchange.CreateUserID.ToString() |
|
|
User = barcodeitemchange.CreateUserID.ToString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|