| | |
| | | if (CurBatch.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | //action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotSelectOrderException"); |
| | | //action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotSelectOrderException"); |
| | | return action; |
| | | } |
| | | //有当前工单且不是投入,则提示条码未投入生产,请先去首站扫描 |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | //action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotInputException", input.SN); |
| | | //action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotInputException", input.SN); |
| | | return action; |
| | | } |
| | | } |
| | |
| | | //没有可执行的工步 |
| | | ResetSteps(); |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | throw dbTran.ErrorException; |
| | | } |
| | | //保存成功,返回过站消息 |
| | | action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | return action; |
| | | } |
| | | #endregion Functions |
| | |
| | | if (CurBatch.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | //action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotSelectOrderException"); |
| | | //action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotSelectOrderException"); |
| | | return action; |
| | | } |
| | | //有当前工单且不是投入,则提示条码未投入生产,请先去首站扫描 |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | //action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotInputException", input.SN); |
| | | //action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotInputException", input.SN); |
| | | return action; |
| | | } |
| | | } |
| | |
| | | //没有可执行的工步 |
| | | ResetSteps(); |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | throw dbTran.ErrorException; |
| | | } |
| | | //保存成功,返回过站消息 |
| | | action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new("MES.Transaction.PackingNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | action.LocaleMsg = new("MES.Transaction.PackingNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | return action; |
| | | } |
| | | #endregion Functions |
| | |
| | | if (wo.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"工单[{input.OrderNo}]不存在", input.OrderNo); |
| | | //action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.EmptyException", input.OrderNO); |
| | | //action.LocaleMsg = new($"工单[{input.OrderNo}]不存在", input.OrderNo); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.EmptyException", input.OrderNo); |
| | | return action; |
| | | } |
| | | if (wo.STATUS != BIZ_MES_WO.STATUSs.Release.GetValue() && wo.STATUS != BIZ_MES_WO.STATUSs.Working.GetValue()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"工单[{input.OrderNo}]状态[{wo.STATUS.GetEnum<BIZ_MES_WO.STATUSs>().GetName()}]不能生产"); |
| | | //action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.StatusException", input.OrderNO, query.STATUS.GetEnum<BIZ_MES_WO.STATUSs>().GetName()); |
| | | //action.LocaleMsg = new($"工单[{input.OrderNo}]状态[{wo.STATUS.GetEnum<BIZ_MES_WO.STATUSs>().GetName()}]不能生产"); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.StatusException", input.OrderNo, wo.STATUS.GetEnum<BIZ_MES_WO.STATUSs>().GetName()); |
| | | return action; |
| | | } |
| | | var batch = await Biz.Db.Queryable<BIZ_MES_WO_BATCH>().ByAuth(input.AuthOption).Where(q => q.ORDER_NO == input.OrderNo && q.ACT_LINE == CurLine.LINE_CODE).FirstAsync(); |
| | | if (batch.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"工单[{input.OrderNo}]没有下发到产线状态[{CurLine.LINE_CODE}]"); |
| | | //action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.LineException", input.OrderNO, CurLine.LINE_CODE); |
| | | //action.LocaleMsg = new($"工单[{input.OrderNo}]没有下发到产线状态[{CurLine.LINE_CODE}]"); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.LineException", input.OrderNo, CurLine.LINE_CODE); |
| | | return action; |
| | | } |
| | | var wb = new WorkBatch(input.OrderNo).Init(CurLine.LINE_CODE); |
| | |
| | | if (CurBatch.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | //action.LocaleMsg = new("MES.Transaction.TestNode.Submit.NotSelectOrderException"); |
| | | //action.LocaleMsg = new($"未选择工单,请先选择要生产的工单"); |
| | | action.LocaleMsg = new("MES.Transaction.TestNode.Submit.NotSelectOrderException"); |
| | | return action; |
| | | } |
| | | //有当前工单且不是投入,则提示条码未投入生产,请先去首站扫描 |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | //action.LocaleMsg = new("MES.Transaction.TestNode.Submit.NotInputException", input.SN); |
| | | //action.LocaleMsg = new($"条码[{input.SN}]尚未投入生产,请先去首站扫描", input.SN); |
| | | action.LocaleMsg = new("MES.Transaction.TestNode.Submit.NotInputException", input.SN); |
| | | return action; |
| | | } |
| | | } |
| | |
| | | //没有可执行的工步 |
| | | ResetSteps(); |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new("MES.Transaction.TestNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | //action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | | action.LocaleMsg = new("MES.Transaction.TestNode.Submit.WorkStepException", CurPosition.POST_CODE); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | throw dbTran.ErrorException; |
| | | } |
| | | //保存成功,返回过站消息 |
| | | action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new("MES.Transaction.TestNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | action.LocaleMsg = new("MES.Transaction.TestNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | | return action; |
| | | } |
| | | |
| | |
| | | if (CurBatch.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"请先扫描要过站的条码"); |
| | | //action.LocaleMsg = new("MES.Transaction.TestNode.GetDefects.NotScanException"); |
| | | //action.LocaleMsg = new($"请先扫描要过站的条码"); |
| | | action.LocaleMsg = new("MES.Transaction.TestNode.GetDefects.NotScanException"); |
| | | return action; |
| | | } |
| | | action.Data = CurBatch.GetNodeDefects(PostCode); |
| | |
| | | var action = new ApiAction<SubmitOutput>(); |
| | | |
| | | |
| | | action.LocaleMsg = new($"请按测试项提交测试数据"); |
| | | //action.LocaleMsg = new("MES.WorkAction.IPQC.PleaseTest"); |
| | | //action.LocaleMsg = new($"请按测试项提交测试数据"); |
| | | action.LocaleMsg = new("MES.WorkAction.IPQC.PleaseTest"); |
| | | return action; |
| | | } |
| | | /// <summary> |
| | |
| | | //重置当前工序 |
| | | CurPosition.ResetSteps(); |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"标签[{Label.LABEL_NAME}]打印失败,请重新扫描产品条码", Label.LABEL_NAME); |
| | | //action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintFail", Label.LABEL_NAME); |
| | | //action.LocaleMsg = new($"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印失败,请重新扫描产品条码", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintFail", Label.LABEL_NAME, Label.LABEL_CODE); |
| | | } |
| | | return action; |
| | | } |
| | |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(); |
| | | IsFinished = true; |
| | | action.LocaleMsg = new($"标签[{Label.LABEL_NAME}]打印成功", Label.LABEL_NAME); |
| | | //action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintSuccess", Label.LABEL_NAME); |
| | | //action.LocaleMsg = new($"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); |
| | | return action; |
| | | } |
| | | |