| | |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"工单[{0}]状态[{1}]不能生产"); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.StatusException", input.OrderNo, wo.STATUS.GetEnum<BIZ_MES_WO.STATUSs>().GetName()); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.StatusException", input.OrderNo, wo.STATUS.GetEnumDesc<BIZ_MES_WO.STATUSs>()); |
| | | return action; |
| | | } |
| | | var batch = await Biz.Db.Queryable<BIZ_MES_WO_BATCH>().ByAuth(input.AuthOption) |
| | |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"工单[{0}]批次[1]状态[{2}]不能生产"); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.BatchStatusException", input.OrderNo, batch.BATCH_NO, batch.STATUS.GetEnum<BIZ_MES_WO_BATCH.STATUSs>().GetName()); |
| | | action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.BatchStatusException", input.OrderNo, batch.BATCH_NO, batch.STATUS.GetEnumDesc<BIZ_MES_WO_BATCH.STATUSs>()); |
| | | return action; |
| | | } |
| | | var wb = new WorkBatch(input.OrderNo).Init(CurLine.LINE_CODE); |
| | |
| | | return WorkBatch.Product.ITEM_NAME; |
| | | case "GetCustomer": |
| | | return WorkBatch.Batch.Customer.ToJson(); |
| | | case "GetSalesOrder": |
| | | return WorkBatch.WO.SALES_ORDER; |
| | | case "GetPackNumber": |
| | | return WorkBatch.WO.ORDER_NO; |
| | | case "GetBoxQR": |
| | | return action is PackingAction ? GetBoxCode(lvars, action as PackingAction) : ""; |
| | | case "GetCardQR": |
| | |
| | | case "GetPAndO": |
| | | return WorkBatch.WO.SALES_CONTRACT; |
| | | case "GetLTD": |
| | | return WorkBatch.Batch.Customer.CUST_NAME_CN; |
| | | return WorkBatch.WO.Customer?.CUST_NAME_CN; |
| | | case "GetHWDate": |
| | | List<string> list = new List<string>(); |
| | | var _action = action is PackingAction ? action as PackingAction : null; |
| | |
| | | case "GetVarByWo": |
| | | return GetLabelVarWo(lv, ""); |
| | | case "GetLOTNO": |
| | | string _lotnos = ""; |
| | | var _orderAction = action is PackingAction ? action as PackingAction : null; |
| | | if (_orderAction != null) |
| | | { |
| | | var snList = _orderAction.GetMinPackageList(_orderAction.CurPkg.Item).Select(q => q.FLOW_SN); |
| | | return string.Join(",", Biz.Db.Queryable<MES_CUST_SN>() |
| | | .Where((q) => snList.Contains(q.FLOW_SN)) |
| | | .Select((q) => q.WORK_ORDER).Distinct()); |
| | | var snList = _orderAction.GetMinPackageList(_orderAction.CurPkg.Item).Select(q => q.FLOW_SN).ToList(); |
| | | if (!snList.Any()) |
| | | { |
| | | snList.Add(_orderAction.CurPkg.CustSN.FLOW_SN); |
| | | } |
| | | _lotnos = string.Join(",", Biz.Db.Queryable<MES_CUST_SN>() |
| | | .Where((q) => snList.Contains(q.FLOW_SN)) |
| | | .Select((q) => q.WORK_ORDER).Distinct().ToList()); |
| | | return _lotnos; |
| | | } |
| | | return ""; |
| | | case "GetNOTES": |
| | |
| | | var itemCode = action.CurPkg.CustSN?.ITEM_CODE; |
| | | var weight = action.CurPkg.WeightInfo.Weight; |
| | | var unit = action.CurPkg.WeightInfo.Unit.ToUpper(); |
| | | var model = WorkBatch.Product.ExtInfo.Model; |
| | | var Input = WorkBatch.Product.ExtInfo.Input; |
| | | var OutPut = WorkBatch.Product.ExtInfo.OutPut; |
| | | var Power = WorkBatch.Product.ExtInfo.Power; |
| | | var Accuracy = WorkBatch.Product.ExtInfo.Accuracy; |
| | | var Display = WorkBatch.Product.ExtInfo.Display; |
| | | var Remark = WorkBatch.Product.ExtInfo.Remark; |
| | | var model = WorkBatch.Product.ExtInfo?.Model; |
| | | var Input = WorkBatch.Product.ExtInfo?.Input; |
| | | var OutPut = WorkBatch.Product.ExtInfo?.OutPut; |
| | | var Power = WorkBatch.Product.ExtInfo?.Power; |
| | | var Accuracy = WorkBatch.Product.ExtInfo?.Accuracy; |
| | | var Display = WorkBatch.Product.ExtInfo?.Display; |
| | | var Remark = WorkBatch.Product.ExtInfo?.Remark; |
| | | |
| | | return $"{code}|{itemCode}|{wo}|\r\n{snList}|{weight}{unit}|型号:{model},输入:{Input},显示:{Display},输出:{OutPut},电源:{Power},精度:{Accuracy},备注:{Remark}"; |
| | | } |