服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-10-17 4c5041a2dc64e75c3a1827a13b43a52384202491
Tiger.Business.MES/Transaction/Position.cs
@@ -117,7 +117,7 @@
                    {
                        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)
@@ -135,7 +135,7 @@
                    {
                        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);
@@ -576,7 +576,7 @@
                                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;
@@ -606,13 +606,19 @@
                                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().ToList());
                                        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":