服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-01-01 5e1220e4b610dfbcde332d9e316eff66ad0bb971
Tiger.Business.MES/Transaction/Position.cs
@@ -144,8 +144,7 @@
                        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);
                    WoContext.WoBatchDic.Add(wb.Batch.BATCH_NO, wb);
                    var wb = WoContext.Add(input.OrderNo, CurLine.LINE_CODE);
                    batchNo = wb.Batch.BATCH_NO;
                }
                CurBatch = WoContext.GetBatch(input.OrderNo, CurLine.LINE_CODE, batchNo);
@@ -651,6 +650,10 @@
                                        {
                                            minPkgList = GetMinPkgList(_pkaction);
                                        }
                                        if (curAction is PrintInStoreLabel)
                                        {
                                            minPkgList = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                        }
                                    }
                                    return string.Join("\r\n", minPkgList);
                                case "GetDescription":
@@ -673,6 +676,10 @@
                                        if (_action != null)
                                        {
                                            list = _action.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                        }
                                        if (curAction is PrintInStoreLabel)
                                        {
                                            list = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                        }
                                    }
                                    return GetHuaWeiWeek(WorkBatch.Batch.ORDER_NO, list);
@@ -707,28 +714,30 @@
                                case "GetVarByWo":
                                    return GetLabelVarWo(lv, "");
                                case "GetLOTNO":
                                    List<string> snList = new List<string>();
                                    string _lotnos = "";
                                    var _orderAction = curAction is PackingAction ? curAction as PackingAction : null;
                                    if (!CurPkg.IsNullOrEmpty())
                                    {
                                        qtylist = CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                        snList = CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                    }
                                    else
                                    {
                                        if (_orderAction != null)
                                        {
                                            var snList = _orderAction.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                            //if (!snList.Any())
                                            {
                                                snList.Add(_orderAction.CurPkg.CustSN?.FLOW_SN);
                                            }
                                            _lotnos = string.Join(",", MainDB.Queryable<MES_CUST_SN>()
                                                .Where((q) => snList.Contains(q.FLOW_SN))
                                                .Select((q) => q.WORK_ORDER).Distinct().ToList());
                                            return _lotnos;
                                            snList = _orderAction.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                            snList.Add(_orderAction.CurPkg.CustSN?.FLOW_SN);
                                        }
                                        if (curAction is PrintInStoreLabel)
                                        {
                                            snList = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                            snList.Add((curAction as PrintInStoreLabel).CurPkg.CustSN?.FLOW_SN);
                                        }
                                    }
                                    return "";
                                    _lotnos = string.Join(",", MainDB.Queryable<MES_CUST_SN>()
                                        .Where((q) => snList.Contains(q.FLOW_SN))
                                        .Select((q) => q.WORK_ORDER).Distinct().ToList());
                                    return _lotnos;
                                case "GetNOTES":
                                    return GetLabelVarWo(lv, WorkBatch.Product.ExtInfo?.Remark);
                                case "GetXH":