Browse Source

1. 更換欄位名稱

PTD
ray 2 years ago
parent
commit
9d1ed3fccb
  1. 6
      AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs
  2. 30
      AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs
  3. 90
      AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
  4. 2
      AMESCoreStudio.WebApi/DTO/AMES/BarcodeInfoDto.cs
  5. 2
      AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemChangDTO.cs
  6. 2
      AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemDto.cs
  7. 2
      AMESCoreStudio.WebApi/DTO/AMES/BoxNO_SNDto.cs
  8. 2
      AMESCoreStudio.WebApi/DTO/AMES/InspectionResultDetailDto.cs
  9. 2
      AMESCoreStudio.WebApi/DTO/AMES/RuleStationDto.cs
  10. 7
      AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs

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

@ -347,8 +347,8 @@ namespace AMESCoreStudio.Web
[WebApiClient.Attributes.HttpGet("api/BarcodeStation/GetBarcodeStationByKey")]
ITask<BarcodeStation> GetBarcodeStationByKey(string id);
[WebApiClient.Attributes.HttpGet("api/BarcodeStation/InputQty/{wipID}/{ruleStationID}")]
ITask<int> GetBarcodeStationByInputQty(int wipID, int ruleStationID);
[WebApiClient.Attributes.HttpGet("api/BarcodeStation/InputQty/{wipID}/{stationID}")]
ITask<int> GetBarcodeStationByInputQty(int wipID, int stationID);
[WebApiClient.Attributes.HttpPost("api/BarcodeStation")]
ITask<ResultModel<BarcodeStation>> PostBarcodeStation([FromBody, RawJsonContent] string model);
@ -361,7 +361,7 @@ namespace AMESCoreStudio.Web
/// </summary>
/// <returns></returns>
[WebApiClient.Attributes.HttpGet("api/BarcodeStation/GetWipStationBarcodeByPCS022")]
ITask<ResultModel<dynamic>> GetWipStationBarcodeByPCS022(int wipID, int ruleStationID, int page, int limit);
ITask<ResultModel<dynamic>> GetWipStationBarcodeByPCS022(int wipID, int stationID, int page, int limit);
#endregion

30
AMESCoreStudio.WebApi/Controllers/AMES/BarcodeStationController.cs

@ -51,18 +51,19 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// </summary>
/// <param name="barcodeID">內務條碼ID</param>
/// <param name="wipID">工單ID</param>
/// <param name="ruleStationID">流程站別ID</param>
/// <param name="ruleStatus"></param>
/// <param name="StationID">流程站別ID</param>
/// <param name="FlowStationID">流程ID</param>
/// <returns></returns>
// GET: api/BarcodeStation/5
[HttpGet("Key")]
public async Task<ActionResult<BarcodeStation>> GetBarcodeStationByKey(int barcodeID, int wipID
, int ruleStationID)
, int StationID , int FlowStationID)
{
var barcodeStation = await _context.BarcodeStation
.Where(w => w.BarcodeID == barcodeID
&& w.WipID == wipID
&& w.RuleStationID == ruleStationID).FirstOrDefaultAsync();
&& w.StationID == StationID
&& w.FlowRuleID == FlowStationID).FirstOrDefaultAsync();
//if (barcodeStation == null)
@ -83,16 +84,17 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
var q = from q1 in _context.BarcodeStation.Where(w => w.BarcodeID == barcodeID)
join q2 in _context.UserInfoes on q1.CreateUserID equals q2.UserID
join q3 in _context.RuleStations on q1.RuleStationID equals q3.RuleStationID
join q3 in _context.RuleStations on new { q1.StationID, q1.FlowRuleID } equals new { q3.StationID, q3.FlowRuleID }
select new BarcodeStation
{
BarcodeID = q1.BarcodeID,
WipID = q1.WipID,
RuleStationID = q1.RuleStationID,
StationID = q1.StationID,
RuleStatus = q1.RuleStatus,
Systype = q1.Systype,
CreateDate = q1.CreateDate,
GetRuleStation = q3,
FlowRuleID = q1.FlowRuleID,
UserName = q2.UserName
};
return await q.ToListAsync();
@ -104,7 +106,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <returns></returns>
[Route("[action]")]
[HttpGet]
public async Task<ResultModel<dynamic>> GetWipStationBarcode4QRS009(int wipID, int ruleStationID, string ruleStatus, int page = 0, int limit = 10)
public async Task<ResultModel<dynamic>> GetWipStationBarcode4QRS009(int wipID, int StationID, string ruleStatus, int page = 0, int limit = 10)
{
ResultModel<dynamic> result = new ResultModel<dynamic>();
var q = from q1 in _context.BarcodeStation
@ -115,7 +117,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
q1.BarcodeID,
q1.WipID,
q1.RuleStationID,
q1.StationID,
q2.BarcodeNo,
q3.LineDesc,
q1.RuleStatus,
@ -124,7 +126,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
q4.UserName
};
q = q.Where(w => w.WipID == wipID && w.RuleStationID == ruleStationID && w.RuleStatus == ruleStatus);
q = q.Where(w => w.WipID == wipID && w.StationID == StationID && w.RuleStatus == ruleStatus);
//紀錄筆數
@ -156,7 +158,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <returns></returns>
[Route("[action]")]
[HttpGet]
public async Task<ResultModel<dynamic>> GetWipStationBarcodeByPCS022(int wipID, int ruleStationID, int page = 0, int limit = 10)
public async Task<ResultModel<dynamic>> GetWipStationBarcodeByPCS022(int wipID, int stationID, int page = 0, int limit = 10)
{
ResultModel<dynamic> result = new ResultModel<dynamic>();
var q = from q1 in _context.BarcodeStation
@ -167,7 +169,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
q1.BarcodeID,
q1.WipID,
q1.RuleStationID,
q1.StationID,
q2.BarcodeNo,
q3.LineDesc,
q1.RuleStatus,
@ -176,7 +178,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
q4.UserName
};
q = q.Where(w => w.WipID == wipID && w.RuleStationID == ruleStationID && w.RuleStatus != "F");
q = q.Where(w => w.WipID == wipID && w.StationID == stationID && w.RuleStatus != "F");
//紀錄筆數
@ -208,8 +210,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <param name="wipID">工單ID</param>
/// <param name="ruleStationID">站別ID</param>
/// <returns></returns>
[HttpGet("InputQty/{wipID}/{ruleStationID}")]
public async Task<ActionResult<int>> GetBarcodeStationByInputQty(int wipID, int ruleStationID)
[HttpGet("InputQty/{wipID}/{stationID}")]
public async Task<ActionResult<int>> GetBarcodeStationByInputQty(int wipID, int stationID)
{
// 取BarcodeID Distinct 數量
var barcodeStation = await _context.BarcodeStation

90
AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs

@ -76,7 +76,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return Ok(resultModel);
}
if (barCodeCheckDto.station == 0)
if (barCodeCheckDto.stationID == 0)
{
resultModel.Msg = "請輸入作業站代碼";
return Ok(resultModel);
@ -132,7 +132,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
#region 判斷工單狀態
resultModel = (ResultModel<string>)await CheckWipNoSationAsync(wipNo: barCodeCheckDto.wipNo, unitNo: barCodeCheckDto.unitNo
, flowRuleID: barCodeCheckDto.flowRule, line: barCodeCheckDto.line, station: barCodeCheckDto.station);
, flowRuleID: barCodeCheckDto.flowRule, line: barCodeCheckDto.line, stationID: barCodeCheckDto.stationID);
if (!resultModel.Success)
return resultModel;
@ -146,7 +146,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
#region 判斷序號流程
resultModel = (ResultModel<string>)await CheckBarCodeFlowAsync(wipno: barCodeCheckDto.wipNo, barcode: barCodeCheckDto.barcode
, unitno: barCodeCheckDto.unitNo, station: barCodeCheckDto.station);
, unitno: barCodeCheckDto.unitNo, stationID: barCodeCheckDto.stationID);
if (!resultModel.Success)
return resultModel;
@ -158,12 +158,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
item = q_wipinfo.Value.FirstOrDefault().GetWipAtt.ItemNO;
itemID = ItemNoToItemID(item).Result;
// 抓RulseStationID
var q_rulestation = await ruleStationsController.GetRuleStationByFlow(barCodeCheckDto.flowRule, 0, 0);
barCodeCheckDto.ruleStationID = q_rulestation.Value.Where(w => w.StationID == barCodeCheckDto.station).FirstOrDefault().RuleStationID;
//// 抓RulseStationID
//var q_rulestation = await ruleStationsController.GetRuleStationByFlow(barCodeCheckDto.flowRule, 0, 0);
//barCodeCheckDto.ruleStationID = q_rulestation.Value.Where(w => w.StationID == barCodeCheckDto.station).FirstOrDefault().RuleStationID;
#region 燒機判斷
resultModel = (ResultModel<string>)await GetCheckBurn(barCodeCheckDto.wipNo, barCodeCheckDto.barcodeID, barCodeCheckDto.station);
resultModel = (ResultModel<string>)await GetCheckBurn(barCodeCheckDto.wipNo, barCodeCheckDto.barcodeID, barCodeCheckDto.stationID);
if (!resultModel.Success)
return resultModel;
else if (resultModel.Msg == "BurnIn")
@ -320,14 +320,14 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
}
barCodeItem.PartNo = KPs.inputData;
barCodeItem.RuleStationID = barCodeCheckDto.ruleStationID;
barCodeItem.StationID = barCodeCheckDto.stationID;
barCodeItem.UpdateDate = DateTime.Now;
update_BarCodeItem.Add(barCodeItem);
insert_BarCodeItemChange.Add(new BarcodeItemChange
{
WipID = barCodeCheckDto.wipID,
RuleStationID = barCodeCheckDto.ruleStationID,
StationID = barCodeCheckDto.stationID,
BarcodeID = barCodeCheckDto.barcodeID,
ItemNo = barCodeItem.ItemNo,
PartNoOld = KPs.oldInputData,
@ -346,7 +346,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
#region 判斷為CHECK站.組件是否都有資料
// 判斷作業站是否為CHECK站 Station_Type == C
StationsesController stationsesController = new StationsesController(_context);
var station = await stationsesController.GetStations(barCodeCheckDto.station);
var station = await stationsesController.GetStations(barCodeCheckDto.stationID);
if (station.Value.Where(w => w.TypeNo == "C").Any())
//if (CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station).Result.Success)
{
@ -468,9 +468,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
.ToListAsync();
BarCodeCheckDto barCodeCheckDto = new BarCodeCheckDto();
barCodeCheckDto.line = -1;
barCodeCheckDto.ruleStationID = RuleStation.RuleStationID;
barCodeCheckDto.ruleStatus = "P";
barCodeCheckDto.station = RuleStation.Station.StationID;
barCodeCheckDto.stationID = RuleStation.Station.StationID;
barCodeCheckDto.userID = userID;
barCodeCheckDto.barcodeType = "M";
foreach (var item in InhouseDetail)
@ -619,7 +618,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
}
// 判斷是否為第一站
if (CheckNowFirstStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station) == "Y")
if (CheckNowFirstStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.stationID) == "Y")
{
WipInfosController wipInfosController = new WipInfosController(_context);
var wipinfo = _context.WipInfos.FindAsync(barCodeCheckDto.wipID).Result;
@ -633,9 +632,9 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
}
// 判斷下一站為完工站
if (CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station).Result.Success)
if (CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.stationID).Result.Success)
{
var result_wipInfoAllClost = await CheckWipNoBarCodeAllClost(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.ruleStationID);
var result_wipInfoAllClost = await CheckWipNoBarCodeAllClost(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.stationID);
if (!result_wipInfoAllClost.Success)
{
Msg += "wipInfosAllClost_Error:" + result_wipInfoAllClost.Msg + "<br/>";
@ -695,7 +694,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
barcodeInfo = new BarcodeInfo
{
BarcodeNo = barCodeCheckDto.barcode,
RuleStationID = barCodeCheckDto.ruleStationID,
StationID = barCodeCheckDto.stationID,
LocationID = -1,
WipID = barCodeCheckDto.wipID,
RuleStatus = barCodeCheckDto.ruleStatus,
@ -709,12 +708,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
// 更新
else
{
barcodeInfo.RuleStationID = barCodeCheckDto.ruleStationID;
barcodeInfo.StationID = barCodeCheckDto.stationID;
barcodeInfo.RuleStatus = barCodeCheckDto.ruleStatus;
barcodeInfo.StatusNo = StatusNo;
barcodeInfo.WipID = barCodeCheckDto.wipID;
barcodeInfo.ExtraBarcodeNo = barCodeCheckDto.extNo;
if (CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station).Result.Success)
if (CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.stationID).Result.Success)
{
barcodeInfo.StatusID = -1;
}
@ -735,11 +734,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
BarcodeID = barCodeCheckDto.barcodeID,
WipID = barCodeCheckDto.wipID,
RuleStationID = barCodeCheckDto.ruleStationID,
StationID = barCodeCheckDto.stationID,
RuleStatus = barCodeCheckDto.ruleStatus, //F 不良
InputDate = DateTime.Now,
LineId = barCodeCheckDto.line,
CreateUserID = barCodeCheckDto.userID
CreateUserID = barCodeCheckDto.userID,
FlowRuleID = barCodeCheckDto.flowRule
};
return await barcodeStationController.PostBarcodeStation(barcodeStation);
}
@ -761,7 +761,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
BarcodeID = barCodeCheckDto.barcodeID,
WipID = barCodeCheckDto.wipID,
RuleStationID = barCodeCheckDto.ruleStationID,
StationID = barCodeCheckDto.stationID,
ItemNo = KeyPartsItem[i].inputType,
PartNo = KeyPartsItem[i].inputData,
SysType = "S",
@ -796,7 +796,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
BarcodeNo = barCodeCheckDto.barcode,
WipNo = barCodeCheckDto.wipNo,
OutfitNo = item.inputData,
StationID = barCodeCheckDto.station,
StationID = barCodeCheckDto.stationID,
CreateUserID = barCodeCheckDto.userID,
CreateDate = DateTime.Now,
UpdateUserID = barCodeCheckDto.userID,
@ -850,7 +850,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
// 判斷作業站是否為燒機站 Station_Type == B
StationsesController stationsesController = new StationsesController(_context);
var station = await stationsesController.GetStations(model.station);
var station = await stationsesController.GetStations(model.stationID);
if (station.Value.Where(w => w.TypeNo == "B").Any())
{
@ -937,14 +937,14 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
{
NgInfo ngInfo = new NgInfo
{
TypeNo = _context.Stationses.Where(w => w.StationID == barCodeCheckDto.station).FirstOrDefault().TestType,
TypeNo = _context.Stationses.Where(w => w.StationID == barCodeCheckDto.stationID).FirstOrDefault().TestType,
OperatorID = 0,
FixtureNo = "NA",
BarcodeID = barCodeCheckDto.barcodeID,
ReasonNo = NgItem[0].inputData.Replace("$", ""),
ProgramNo = "N/A",
MachineNo = "N/A",
StationId = barCodeCheckDto.station,
StationId = barCodeCheckDto.stationID,
WipId = barCodeCheckDto.wipID,
CreateUserID = barCodeCheckDto.userID,
UpdateUserID = barCodeCheckDto.userID
@ -1390,10 +1390,10 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <param name="wipno">工單號碼</param>
/// <param name="barcode">內部條碼</param>
/// <param name="unitno">生產單位編號</param>
/// <param name="station">作業站編號</param>
/// <param name="stationID">作業站編號</param>
/// <returns></returns>
[HttpGet("BarCodeFlow")]
public async Task<IResultModel> CheckBarCodeFlowAsync(string wipno, string barcode, string unitno, int station)
public async Task<IResultModel> CheckBarCodeFlowAsync(string wipno, string barcode, string unitno, int stationID)
{
ResultModel<string> resultModel = new ResultModel<string> { Success = false };
WipInfosController wipInfosController = new WipInfosController(_context);
@ -1490,7 +1490,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
}
// 該作業站 RuleStationID
int? RuleStationID = ruleStations.Value.Where(w => w.StationID == station).Select(s => s.RuleStationID).FirstOrDefault();
int? RuleStationID = ruleStations.Value.Where(w => w.StationID == stationID).Select(s => s.RuleStationID).FirstOrDefault();
if (RuleStationID == null || RuleStationID == 0)
{
resultModel.Msg = "該工單號碼【" + wipno + "】的流程未設定此作業站";
@ -1501,7 +1501,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
BarcodeInfoesController barcodeInfoesController = new BarcodeInfoesController(_context);
var BarcodeInfos = await barcodeInfoesController.GetBarcodeInfoesByNo(barcode);
BarcodeInfos = BarcodeInfos.Value.ToList();
if (BarcodeInfos.Value.Where(w => w.RuleStationID == RuleStationID).Any())
if (BarcodeInfos.Value.Where(w => w.StationID == stationID).Any())
{
resultModel.Msg = "該內部序號【" + barcode + "】已刷過此站";
return resultModel;
@ -1511,7 +1511,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
int wipID = q1.WipID;
int flowRuleID = q1.FlowRuleID;
resultModel = (ResultModel<string>)await GetBarCodeLastStopRuleStationID(wipID, BarCodeID, station, flowRuleID, RuleStationID);
resultModel = (ResultModel<string>)await GetBarCodeLastStopRuleStationID(wipID, BarCodeID, stationID, flowRuleID);
if (!resultModel.Success)
return resultModel;
@ -1527,9 +1527,9 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <param name="unitNo">生產單位</param>
/// <param name="flowRuleID">流程</param>
/// <param name="line">線別</param>
/// <param name="station">作業站</param>
/// <param name="stationID">作業站</param>
/// <returns></returns>
private async Task<IResultModel> CheckWipNoSationAsync(string wipNo, string unitNo, int flowRuleID, int line, int station = 0)
private async Task<IResultModel> CheckWipNoSationAsync(string wipNo, string unitNo, int flowRuleID, int line, int stationID = 0)
{
ResultModel<string> resultModel = new ResultModel<string>();
@ -1573,7 +1573,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
}
// 判斷是否是投入站
var RuleStation = await _context.RuleStations.Where(w => w.FlowRuleID == flowRuleID && w.StationID == station)
var RuleStation = await _context.RuleStations.Where(w => w.FlowRuleID == flowRuleID && w.StationID == stationID)
.FirstOrDefaultAsync();
if (RuleStation != null)
{
@ -1599,7 +1599,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return resultModel;
}
// StationID = 0 代表批次鎖定
else if (q3.Data.Where(w => w.LockStatus == "0" && w.StationID == station).Any())
else if (q3.Data.Where(w => w.LockStatus == "0" && w.StationID == stationID).Any())
{
resultModel.Msg = "工單號碼【" + wipNo + "】,工單在當前站別被鎖定,不可過站";
return resultModel;
@ -2046,9 +2046,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// <param name="barCodeID">BarCodeID</param>
/// <param name="stationID">目前作業站ID</param>
/// <param name="flowRuleID">工單流程ID</param>
/// <param name="RuleStationID">目前作業站ID(RuleStation)</param>
/// <returns>true:false</returns>
private async Task<IResultModel> GetBarCodeLastStopRuleStationID(int wipID, int barCodeID, int stationID, int flowRuleID, int? RuleStationID)
private async Task<IResultModel> GetBarCodeLastStopRuleStationID(int wipID, int barCodeID, int stationID, int flowRuleID)
{
ResultModel<string> resultModel = new ResultModel<string> { Success = false };
WipInfosController wipInfosController = new WipInfosController(_context);
@ -2060,12 +2059,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
// 用作業站抓 有設定下一站為該站的資料
RulesController rulesController = new RulesController(_context);
var rules = await rulesController.GetRulesByFlowRuleID(flowRuleID);
rules = rules.Value.Where(w => w.NextStationID == stationID).ToList();
rules = rules.Value.Where(w => w.NextStationID == stationID && w.FlowRuleID == flowRuleID).ToList();
//排除第一站
if (rules.Value.Count() != 0)
{
// 抓有設定下一站=目前作業站的上一站
var nowruleSations = rules.Value.Select(s => new { s.RuleStationID, s.RuleStatus }).ToList();
var nowruleSations = rules.Value.Select(s => new { s.StationID, s.RuleStatus }).ToList();
// 取得目前BarCode 最新過站資料
BarcodeInfoesController barcodeInfoesController = new BarcodeInfoesController(_context);
var barcodeInfo = barcodeInfoesController.GetBarcodeInfoes(barCodeID).Result.Value.FirstOrDefault();
@ -2076,7 +2075,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return resultModel;
}
if (nowruleSations.Where(w => w.RuleStationID == barcodeInfo.RuleStationID
if (nowruleSations.Where(w => w.StationID == barcodeInfo.StationID
&& w.RuleStatus == barcodeInfo.RuleStatus).Count() == 0
)
{
@ -2087,7 +2086,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
else // 防止第一站重複刷入
{
if (_context.BarcodeStation.Where(w => w.BarcodeID == barCodeID
&& w.RuleStationID == RuleStationID).Any())
&& w.StationID == stationID
&& w.FlowRuleID == flowRuleID).Any())
{
resultModel.Msg = "該內部序號已刷過此站";
return resultModel;
@ -2126,13 +2126,13 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
if (!ruleStations.Value.Any(a => a.StationID == stationID))
return resultModel;
int rulestationID = ruleStations.Value.Where(w => w.StationID == stationID).FirstOrDefault().RuleStationID;
//int rulestationID = ruleStations.Value.Where(w => w.StationID == stationID).FirstOrDefault().RuleStationID;
RulesController rulesController = new RulesController(_context);
var rules = await rulesController.GetRulesByFlowRuleID(q1.FlowRuleID);
// 當下一站SatationID= 1000 代表完工站
if (rules.Value.Where(w => w.RuleStationID == rulestationID && w.NextStationID == 1000).Any())
if (rules.Value.Where(w => w.StationID == stationID && w.NextStationID == 1000).Any())
{
resultModel.Success = true;
return resultModel;
@ -2176,10 +2176,10 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
/// </summary>
/// <param name="wipno">工單號碼</param>
/// <param name="unitNo">生產單位ID</param>
/// <param name="ruleStationID">ruleStationID</param>
/// <param name="stationID">StationID</param>
/// <returns></returns>
[HttpGet("CheckWipNoBarCodeAllClost")]
public async Task<IResultModel> CheckWipNoBarCodeAllClost(string wipno, string unitNo, int ruleStationID)
public async Task<IResultModel> CheckWipNoBarCodeAllClost(string wipno, string unitNo, int stationID)
{
ResultModel<string> resultModel = new ResultModel<string> { Success = true };
WipInfosController wipInfosController = new WipInfosController(_context);
@ -2194,7 +2194,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
// 比對過站Station完工跟工單數一樣 = 完工
if (wipInfo.PlanQTY ==
barcodeInfos.Value.Where(w => w.RuleStatus == "P" && w.RuleStationID == ruleStationID).Count())
barcodeInfos.Value.Where(w => w.RuleStatus == "P" && w.StationID == stationID).Count())
{
var result = await wipInfosController.PutWipinfoToStatusNO(wipID, "E");
if (!result.Success)

2
AMESCoreStudio.WebApi/DTO/AMES/BarcodeInfoDto.cs

@ -54,7 +54,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES
/// <summary>
/// 流程站ID
/// </summary>
public int RuleStationID { get; set; }
public int StationID { get; set; }
/// <summary>
/// 生產單位

2
AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemChangDTO.cs

@ -47,7 +47,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES
/// 流程站别ID
/// </summary>
public int RuleStationID { get; set; }
public int StationID { get; set; }
/// <summary>
/// 流程站名稱

2
AMESCoreStudio.WebApi/DTO/AMES/BarcodeItemDto.cs

@ -46,7 +46,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES
/// <summary>
/// 流程站ID
/// </summary>
public int RuleStationID { get; set; }
public int StationID { get; set; }
/// <summary>

2
AMESCoreStudio.WebApi/DTO/AMES/BoxNO_SNDto.cs

@ -71,7 +71,7 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
[DataMember]
[Display(Name = "流程")]
public int RuleStationID { get; set; }
public int StationID { get; set; }
}

2
AMESCoreStudio.WebApi/DTO/AMES/InspectionResultDetailDto.cs

@ -32,7 +32,7 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
/// <summary>
/// 站別ID
/// </summary>
public string RuleStation { get; set; }
public string StationID { get; set; }
/// <summary>
/// 稽核結果

2
AMESCoreStudio.WebApi/DTO/AMES/RuleStationDto.cs

@ -9,7 +9,7 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
/// 流程站別資料
/// </summary>
public class RuleStationDto
public class RuleStationDto_Back
{
/// <summary>
/// 流程站別編號

7
AMESCoreStudio.WebApi/DTO/BLL/BarCodeCheckDto.cs

@ -70,13 +70,8 @@ namespace AMESCoreStudio.WebApi.DTO.AMES
/// 作業站
/// </summary>
[DataMember]
public int station { get; set; } = 0;
public int stationID { get; set; } = 0;
/// <summary>
/// RuleStationID
/// </summary>
[DataMember]
public int ruleStationID { get; set; } = 0;
/// <summary>
/// 線別站

Loading…
Cancel
Save