Browse Source

Yiru修改完工入庫,昶亨完工顯示安勤工單

修改ipqc抽驗序號要於工單之內
PTD
BB.Wang 2 years ago
parent
commit
e742b7740c
  1. 11
      AMESCoreStudio.Web/Controllers/PCSController.cs
  2. 29
      AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs
  3. 29
      AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml
  4. 132
      AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs

11
AMESCoreStudio.Web/Controllers/PCSController.cs

@ -7371,9 +7371,18 @@ namespace AMESCoreStudio.Web.Controllers
else else
{ {
result = await _pcsApi.GetFqcInhouseMasterMultiQuery_EVER(barcodeNo: barcodeNo, wipNo: wipNo var result_EVER = await _pcsApi.GetFqcInhouseMasterMultiQuery_Avalue(barcodeNo: barcodeNo, wipNo: wipNo
, boxNo: boxNo, inhouseNo: inhouseNo, date_str: date_str, date_end: date_end , boxNo: boxNo, inhouseNo: inhouseNo, date_str: date_str, date_end: date_end
, status: status, page: page, limit: limit); , status: status, page: page, limit: limit);
foreach (var item in result_EVER.Data)
{
var wipresult= await _pcsApi.GetWipInfoByWipNO_EVER(wipno: item.WipNo);
item.WipNo = wipresult.Select(s => s.RelatedWONO).FirstOrDefault();
}
result = result_EVER ;
} }
if (result.Data.Count() != 0) if (result.Data.Count() != 0)

29
AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs

@ -1683,11 +1683,40 @@ namespace AMESCoreStudio.Web
, string boxNo = null, string inhouseNo = null, string date_str = null, string date_end = null , string boxNo = null, string inhouseNo = null, string date_str = null, string date_end = null
, string status = null, int page = 0, int limit = 10); , string status = null, int page = 0, int limit = 10);
/// <summary>
/// FQC查詢
/// </summary>
/// <param name="barcodeNo">內部序號</param>
/// <param name="wipNo">工單號碼</param>
/// <param name="boxNo">外箱號碼</param>
/// <param name="inhouseNo">入庫單號碼</param>
/// <param name="date_str">入庫時間起</param>
/// <param name="date_end">入庫時間迄</param>
/// <param name="status">抽驗結果</param>
/// <param name="page">頁數</param>
/// <param name="limit">筆數</param>
/// <returns></returns>
[WebApiClient.Attributes.HttpGet("http://192.168.4.109:5088/api/FqcInhouseMaster/FqcInhouseMasterMultiQuery_Avalue/")]
ITask<ResultModel<FqcInhouseMaster_WareDto>> GetFqcInhouseMasterMultiQuery_Avalue(string barcodeNo = null, string wipNo = null
, string boxNo = null, string inhouseNo = null, string date_str = null, string date_end = null
, string status = null, int page = 0, int limit = 10);
[WebApiClient.Attributes.HttpGet("http://192.168.4.109:5088/api/BarcodeInfoes/ByBoxNoPCS031Q/")] [WebApiClient.Attributes.HttpGet("http://192.168.4.109:5088/api/BarcodeInfoes/ByBoxNoPCS031Q/")]
ITask<ResultModel<BoxNO_SNDto>> GetBarcodeInfoesByBoxNoPCS031Q_EVER(string boxNo, int page = 0, int limit = 10); ITask<ResultModel<BoxNO_SNDto>> GetBarcodeInfoesByBoxNoPCS031Q_EVER(string boxNo, int page = 0, int limit = 10);
/// <summary>
/// 查詢工單基本資料-WipNO
/// </summary>
/// <returns></returns>
[WebApiClient.Attributes.HttpGet("http://192.168.4.109:5088/api/WipInfos/WipInfoByWipNo/{wipno}")]
ITask<List<WipInfo>> GetWipInfoByWipNO_EVER(string wipno);
//YIRU End ---------------------------------------------------------------------------------------- //YIRU End ----------------------------------------------------------------------------------------
#endregion #endregion

29
AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml

@ -196,6 +196,23 @@
insertMaster("T"); insertMaster("T");
}); });
function insertMaster(status) { function insertMaster(status) {
var data = $("#WipNo").val();
if (data) {
var Barcode = $("#BarcodeNo").val();
$.ajax({
url: '/SPC/CheckBarcodeNO?BarcodeNo=' + Barcode + '&WipNo=' + data,
dataType: 'json',
contentType: "application/json",
type: 'get',
success: function (result) {
if (!result.data) {
alert("檢驗序號不在工單區間內");
event.preventDefault();
return false;
}
else {
var model = $("#modelform").serializeArray(); var model = $("#modelform").serializeArray();
//console.info(model); //console.info(model);
@ -251,6 +268,16 @@
} }
}
}
});
}
}; };
function insertList(id) { function insertList(id) {
@ -491,6 +518,7 @@
if (e.keyCode == 13 ) { if (e.keyCode == 13 ) {
var data = $("#WipNo").val(); var data = $("#WipNo").val();
if (data) { if (data) {
var Barcode = $("#BarcodeNo").val(); var Barcode = $("#BarcodeNo").val();
CheckBarcodeNo(Barcode, data); CheckBarcodeNo(Barcode, data);
event.preventDefault(); event.preventDefault();
@ -672,6 +700,7 @@
}); });
}; };
// PLM_ECN // PLM_ECN
$("#GetPLMECN").on("click", function () { $("#GetPLMECN").on("click", function () {
var ItemNo = $("#ItemNo").val(); var ItemNo = $("#ItemNo").val();

132
AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs

@ -438,13 +438,37 @@ namespace AMESCoreStudio.WebApi.Controllers.BLL
result.IPQCTotal = 12; result.IPQCTotal = 12;
// FQC批退率 Board // FQC批退率 Board
result.FQCRRBoard = 5.08; //result.FQCRRBoard = 5.08;
var f_FQCRRBoard = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016ByDetail(null, null, null, sDate, eDate, "1001");
if (f_FQCRRBoard.DataTotal > 0)
{
foreach (var item in f_FQCRRBoard.Data.Where(W => W.type == "單板"))
{
result.FQCRRBoard = item.rejectRate;
}
}
// FQC批退率 System // FQC批退率 System
result.FQCRRSystem = 12.12; //result.FQCRRSystem = 12.12;
var f_FQCRRSystem = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016ByDetail(null, null, null, sDate, eDate, "1001");
if (f_FQCRRSystem.DataTotal > 0)
{
foreach (var item in f_FQCRRSystem.Data.Where(W => W.type == "系統組裝"))
{
result.FQCRRSystem = item.rejectRate;
}
}
// FQC批退率 Medical // FQC批退率 Medical
result.FQCRRMedical = 11.11; //result.FQCRRMedical = 11.11;
var f_FQCRRMedical = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016ByDetail(null, null, null, sDate, eDate, "1001");
if (f_FQCRRSystem.DataTotal > 0)
{
foreach (var item in f_FQCRRMedical.Data.Where(W => W.type == "醫療"))
{
result.FQCRRMedical = item.rejectRate;
}
}
// DOA Board // DOA Board
result.DOABoard = 0.04; result.DOABoard = 0.04;
@ -456,7 +480,107 @@ namespace AMESCoreStudio.WebApi.Controllers.BLL
result.DOAMedical = 0.00; result.DOAMedical = 0.00;
// FPY 立德 Board // FPY 立德 Board
result.FPYBoard_LEI = 99.15; //result.FPYBoard_LEI = 99.15;
var f_FPYBoard_LEI = await new WipStationController(_context).GetWipStation4QRS014GroupB(null, sDate, eDate, null, null, null);
if (f_FPYBoard_LEI.DataTotal > 0)
{
double sum_rate = 100.0;
int sum_idx = 1;
DataTable dtRate = new DataTable();
dtRate.Columns.Add("STATION_ID");
dtRate.Columns.Add("OK_QTY");
dtRate.Columns.Add("NG_QTY");
dtRate.PrimaryKey = new DataColumn[] { dtRate.Columns[0] };
dtRate.AcceptChanges();
foreach (var data in f_FPYBoard_LEI.Data)
{
string str = data.ToString();
string[] str2 = str.Replace("{", "").Replace("}", "").Split(',');
string str3 = "";
for (int i = 0; i < str2.Length; i++)
{
string[] str21 = str2[i].Split("=");
str3 = str3 + str21[0].Trim() + ":" + "'" + str21[1].Trim() + "',";
}
JObject j0 = JObject.Parse("{" + str3.Substring(0, str3.Length - 1) + "}");
int stationID = int.Parse(j0["StationID"].ToString());
bool existFlag = false;
int idx = 0;
for (int i = 0; i < dtRate.Rows.Count; i++)
{
if (dtRate.Rows[i]["STATION_ID"].ToString() == stationID.ToString())
{
idx = i;
existFlag = true;
break;
}
}
int okQty = 0, ngQty = 0;
if (j0["RuleStatus"].ToString() == "P")
{
okQty = int.Parse(j0["FirstCnt"].ToString());
}
else
{
ngQty = int.Parse(j0["FirstCnt"].ToString());
}
if (existFlag)
{
if (okQty > 0)
{
dtRate.Rows[idx][1] = okQty;
}
if (ngQty > 0)
{
dtRate.Rows[idx][2] = ngQty;
}
dtRate.AcceptChanges();
}
else
{
DataRow dr = dtRate.NewRow();
dr[0] = stationID;
dr[1] = okQty;
dr[2] = ngQty;
dtRate.Rows.Add(dr);
dtRate.AcceptChanges();
}
}
if (dtRate.Rows.Count > 0)
{
for (int j = 0; j < dtRate.Rows.Count; j++)
{
int okQty = int.Parse(dtRate.Rows[j][1].ToString());
int ngQty = int.Parse(dtRate.Rows[j][2].ToString());
int inputQty = okQty + ngQty;
double rate = 0;
if (okQty > 0)
{
rate = (okQty * 1.0 / inputQty) * 100;
}
if (rate > 0)
{
//sum_rate = sum_rate * (rate / 100.0);
sum_idx = sum_idx + 1;
sum_rate = sum_rate + rate;
}
}
}
result.FPYBoard_LEI = double.Parse((sum_rate / sum_idx).ToString("0.00"));
}
// FPY 立德 System // FPY 立德 System
result.FPYSystem_LEI = 92.12; result.FPYSystem_LEI = 92.12;

Loading…
Cancel
Save