wangxinhui
3 天以前 a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -197,7 +197,7 @@
        /// </summary>
        /// <param name="palletCode">RFID信息</param>
        /// <returns></returns>
        public WebResponseContent YLPurchaseBoxing(string palletCode, decimal weight = 0, decimal thickness = 0, decimal wide = 0)
        public WebResponseContent YLPurchaseBoxing(string palletCode, decimal weight = 0, decimal thickness = 0, decimal wide = 0, string stationCode = "")
        {
            WebResponseContent content = new WebResponseContent();
            try
@@ -210,106 +210,87 @@
                        UpdateStock(stockInfoOld, weight, thickness, wide);
                        return content.OK($"临时入库{stockInfoOld.RfidCode}");
                    }
                    else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.老厂退库.ObjToInt())
                    else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.出库完成.ObjToInt() && stockInfoOld.IsPick==WhetherEnum.False.ObjToInt() && stationCode.IsNotEmptyOrNull())
                    {
                        stockInfoOld.StockStatus = StockStatusEmun.老厂退库.ObjToInt();
                        stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
                        stockInfoOld.StockOutLength = 0;
                        stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
                        UpdateStock(stockInfoOld, weight, thickness, wide);
                        return content.OK($"老厂退库{stockInfoOld.RfidCode}");
                        return content.OK($"老厂未领料退库{stockInfoOld.RfidCode}");
                    }
                    else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.老厂退料暂存.ObjToInt() && stationCode.IsNotEmptyOrNull())
                    {
                        stockInfoOld.StockStatus = StockStatusEmun.老厂退库.ObjToInt();
                        stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
                        stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
                        stockInfoOld.StockOutLength = 0;
                        stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
                        UpdateStock(stockInfoOld, weight, thickness, wide);
                        return content.OK($"老厂领料退库{stockInfoOld.RfidCode}");
                    }
                    else if (stockInfoOld != null)
                    {
                        return content.Error("RFID信息已存在");
                        throw new Exception($"{palletCode}RFID信息已存在");
                    }
                    #region å¤„理采购绑定RFID逻辑
                    Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.老厂.ToString()).FirstOrDefault();
                    if (yLInboundCache == null)
                    if (stationCode.IsNullOrEmpty())
                    {
                        return content.Error("未找到原料缓存条码信息");
                    }
                    if (yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
                    {
                        return content.Error($"原料缓存条码{yLInboundCache.BarCode}已绑定RFID{yLInboundCache.RfidCode}");
                    }
                    else
                    {
                        Dt_StockInfo ExistStockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == yLInboundCache.BarCode);
                        if (ExistStockInfo != null && ExistStockInfo.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && ExistStockInfo.StockStatus == StockStatusEmun.博思通组盘暂存.ObjToInt())
                        #region å¤„理采购绑定RFID逻辑
                        Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.老厂.ToString()).FirstOrDefault();
                        if (yLInboundCache == null)
                        {
                            yLInboundCache.RfidCode = palletCode;
                            yLInboundCache.BindStatus = WhetherEnum.True.ObjToInt();
                            ExistStockInfo.RfidCode = palletCode;
                            _unitOfWorkManage.BeginTran();
                            //更新组盘信息
                            UpdateStock(ExistStockInfo, weight, thickness, wide);
                            _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                            _unitOfWorkManage.CommitTran();
                            return content.OK($"博思通库存转存{ExistStockInfo.RfidCode}");
                            return content.Error("未找到原料缓存条码信息");
                        }
                        if (yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
                        {
                            return content.Error($"原料缓存条码{yLInboundCache.BarCode}已绑定RFID{yLInboundCache.RfidCode}");
                        }
                        else
                        {
                            //获取采购信息
                            Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _purchaseBSTOrderDetailRepository.QueryFirst(x => x.Barcode == yLInboundCache.BarCode);
                            if (purchaseBSTOrderDetail == null)
                            Dt_StockInfo ExistStockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == yLInboundCache.BarCode);
                            if (ExistStockInfo != null && ExistStockInfo.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && ExistStockInfo.StockStatus == StockStatusEmun.博思通组盘暂存.ObjToInt())
                            {
                                return content.Error($"未找到条码{yLInboundCache.BarCode}采购信息");
                                yLInboundCache.RfidCode = palletCode;
                                yLInboundCache.BindStatus = WhetherEnum.True.ObjToInt();
                                ExistStockInfo.RfidCode = palletCode;
                                _unitOfWorkManage.BeginTran();
                                //更新组盘信息
                                UpdateStock(ExistStockInfo, weight, thickness, wide);
                                _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                                _unitOfWorkManage.CommitTran();
                                return content.OK($"博思通库存转存{ExistStockInfo.RfidCode}");
                            }
                            if (purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus != InOrderStatusEnum.未开始.ObjToInt())
                            else if(ExistStockInfo != null && ExistStockInfo.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && ExistStockInfo.StockStatus == StockStatusEmun.组盘暂存.ObjToInt())
                            {
                                return content.Error($"采购{purchaseBSTOrderDetail.Barcode}信息已入库或入库中");
                                //获取采购信息
                                Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _inboundRepository.PurchaseBSTOrderDetailRepository.QueryFirst(x => x.Barcode == yLInboundCache.BarCode);
                                yLInboundCache.RfidCode = palletCode;
                                yLInboundCache.BindStatus = WhetherEnum.True.ObjToInt();
                                ExistStockInfo.RfidCode = palletCode;
                                purchaseBSTOrderDetail.RfidCode= palletCode;
                                _unitOfWorkManage.BeginTran();
                                UpdateStock(ExistStockInfo, weight, thickness, wide);
                                _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                                _inboundRepository.PurchaseBSTOrderDetailRepository.UpdateData(purchaseBSTOrderDetail);
                                _unitOfWorkManage.CommitTran();
                                return content.OK($"采购入库{ExistStockInfo.RfidCode}");
                            }
                            else
                            {
                                purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus = InOrderStatusEnum.入库中.ObjToInt();
                                purchaseBSTOrderDetail.RfidCode = palletCode;
                                throw new Exception("未知错误");
                            }
                            //获取采购主单
                            Dt_PurchaseBSTOrder purchaseBSTOrder = _purchaseBSTOrderRepository.QueryFirst(x => x.Id == purchaseBSTOrderDetail.PurchaseBSTOrderId);
                            //获取物料
                            Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == purchaseBSTOrderDetail.MaterialId);
                            //生成库存组盘信息
                            Dt_StockInfo stockInfo = new Dt_StockInfo()
                            {
                                MaterielInvOrgId = materielInfo.MaterielInvOrgId,
                                PalletCode = purchaseBSTOrderDetail.Barcode,
                                RfidCode = palletCode,
                                LocationCode = "",
                                PalletType = 1,
                                WarehouseId = materielInfo.WarehouseId,
                                StockAttribute = materielInfo.MaterielSourceType,
                                StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                                MaterielSpec = materielInfo.MaterielSpec,
                                Unit = materielInfo.MaterielUnit,
                                MaterielThickness = purchaseBSTOrderDetail.MaterialThick,
                                MaterielWide = purchaseBSTOrderDetail.MaterialWide,
                                MaterielWeight = purchaseBSTOrderDetail.DeliveryQty,
                                CheckWeight=weight,
                                CheckThickness=thickness,
                                CheckWide=wide,
                                MaterielCode = materielInfo.MaterielCode,
                                MaterielName = materielInfo.MaterielName,
                                StockLength = purchaseBSTOrderDetail.ProcurementLength,
                                MaterielId = purchaseBSTOrderDetail.MaterialId
                            };
                            if (purchaseBSTOrderDetail.MaterialWide > 1200)
                            {
                                stockInfo.PalletType = 2;
                            }
                            yLInboundCache.RfidCode = palletCode;
                            yLInboundCache.BindStatus = WhetherEnum.True.ObjToInt();
                            _unitOfWorkManage.BeginTran();
                            //新增组盘信息
                            _stockRepository.StockInfoRepository.AddData(stockInfo);
                            if (purchaseBSTOrder.PurchaseOrderStatus == InOrderStatusEnum.未开始.ObjToInt())
                            {
                                purchaseBSTOrder.PurchaseOrderStatus = InOrderStatusEnum.入库中.ObjToInt();
                                _purchaseBSTOrderRepository.UpdateData(purchaseBSTOrder);
                            }
                            _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                            _purchaseBSTOrderDetailRepository.UpdateData(purchaseBSTOrderDetail);
                            _unitOfWorkManage.CommitTran();
                        }
                        #endregion
                    }
                    #endregion
                    content.OK("绑定成功");
                    else if (!stationCode.IsNullOrEmpty() && stockInfoOld == null)
                    {
                        throw new Exception($"{palletCode}RFID信息不存在");
                    }
                    else
                    {
                        throw new Exception("未知错误");
                    }
                }
                
            }
@@ -340,32 +321,27 @@
            {
                if (string.IsNullOrEmpty(palletCode))
                {
                    return content.Error("条码不能为空");
                    throw new Exception("条码不能为空");
                }
                Dt_StockInfo stockInfoOld = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
                if (stockInfoOld != null)
                {
                    return content.Error("条码信息库存中已存在");
                    throw new Exception("条码信息库存中已存在");
                }
                //获取采购信息
                Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _purchaseBSTOrderDetailRepository.QueryFirst(x => x.Barcode == palletCode);
                Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _inboundRepository.PurchaseBSTOrderDetailRepository.QueryFirst(x => x.Barcode == palletCode);
                if (purchaseBSTOrderDetail == null)
                {
                    BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(palletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>();
                    if (bSTResponse.Code == 500)
                    {
                        return content.Error($"未找到条码{palletCode}采购信息并一期ERP库存也不存在");
                        throw new Exception($"未找到条码{palletCode}采购信息并一期ERP库存也不存在");
                    }
                    BSTStockInfoDTO bSTStockInfoDTO=bSTResponse.Data;
                    if (bSTStockInfoDTO==null)
                    {
                        return content.Error($"一期ERP未返回{palletCode}的库存信息");
                    }
                    Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == bSTStockInfoDTO.MaterialId);
                    if (materielInfo==null)
                    {
                        return content.Error($"未找到条码{palletCode}物料信息{bSTStockInfoDTO.MaterialNo}");
                    }
                    BSTStockInfoDTO bSTStockInfoDTO=bSTResponse.Data ?? throw new Exception($"一期ERP未返回{palletCode}的库存信息");
                    Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == bSTStockInfoDTO.MaterialId) ?? throw new Exception($"未找到条码{palletCode}物料信息{bSTStockInfoDTO.MaterialNo}");
                    //生成库存组盘信息
                    Dt_StockInfo stockInfo = new Dt_StockInfo()
                    {
@@ -391,15 +367,11 @@
                    {
                        stockInfo.PalletType = 2;
                    }
                    Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.老厂.ToString()).FirstOrDefault();
                    if (yLInboundCache == null)
                    {
                        return content.Error("未找到原料条码缓存信息");
                    }
                    Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.老厂.ToString()).FirstOrDefault() ?? throw new Exception("未找到原料条码缓存信息");
                    int Id = yLInboundCache.Id;
                    if (yLInboundCache.BarCode == palletCode)
                    {
                        return content.Error($"条码{palletCode}已扫码");
                        throw new Exception($"条码{palletCode}已扫码");
                    }
                    else if (yLInboundCache.BarCode != palletCode && yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
                    {
@@ -409,6 +381,7 @@
                        //新增组盘信息
                        _stockRepository.StockInfoRepository.AddData(stockInfo);
                        _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                        //启动线体
                        WebResponseContent webResponse = YLPurchasePush();
                        if (!webResponse.Status)
                        {
@@ -419,7 +392,7 @@
                    }
                    else
                    {
                        return content.Error($"上卷条码{yLInboundCache.BarCode}还未进行绑定");
                        throw new Exception($"上卷条码{yLInboundCache.BarCode}还未进行绑定");
                    }
                    
                }
@@ -427,24 +400,63 @@
                {
                    if (purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus != InOrderStatusEnum.未开始.ObjToInt())
                    {
                        return content.Error($"条码{palletCode}采购信息已入库或入库中");
                        throw new Exception($"条码{palletCode}采购信息已入库或入库中");
                    }
                    Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.老厂.ToString()).FirstOrDefault();
                    if (yLInboundCache == null)
                    {
                        return content.Error("未找到原料条码缓存信息");
                        throw new Exception("未找到原料条码缓存信息");
                    }
                    int Id = yLInboundCache.Id;
                    if (yLInboundCache.BarCode == palletCode)
                    {
                        return content.Error($"条码{palletCode}已扫码");
                        throw new Exception($"条码{palletCode}已扫码");
                    }
                    else if (yLInboundCache.BarCode != palletCode && yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
                    {
                        yLInboundCache = _mapper.Map<Dt_YLInboundCache>(purchaseBSTOrderDetail);
                        yLInboundCache.Id = Id;
                        //获取采购主单
                        Dt_PurchaseBSTOrder purchaseBSTOrder = _inboundRepository.PurchaseBSTOrderRepository.QueryFirst(x => x.Id == purchaseBSTOrderDetail.PurchaseBSTOrderId);
                        //获取物料
                        Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == purchaseBSTOrderDetail.MaterialId);
                        //生成库存组盘信息
                        Dt_StockInfo stockInfo = new Dt_StockInfo()
                        {
                            MaterielInvOrgId = materielInfo.MaterielInvOrgId,
                            PalletCode = purchaseBSTOrderDetail.Barcode,
                            RfidCode = "",
                            LocationCode = "",
                            PalletType = 1,
                            WarehouseId = materielInfo.WarehouseId,
                            StockAttribute = materielInfo.MaterielSourceType,
                            StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                            MaterielSpec = materielInfo.MaterielSpec,
                            Unit = materielInfo.MaterielUnit,
                            MaterielThickness = purchaseBSTOrderDetail.MaterialThick,
                            MaterielWide = purchaseBSTOrderDetail.MaterialWide,
                            MaterielWeight = purchaseBSTOrderDetail.DeliveryQty,
                            MaterielCode = materielInfo.MaterielCode,
                            MaterielName = materielInfo.MaterielName,
                            StockLength = purchaseBSTOrderDetail.ProcurementLength,
                            MaterielId = purchaseBSTOrderDetail.MaterialId
                        };
                        if (purchaseBSTOrderDetail.MaterialWide > 1200)
                        {
                            stockInfo.PalletType = 2;
                        }
                        purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus = InOrderStatusEnum.入库中.ObjToInt();
                        _unitOfWorkManage.BeginTran();
                        _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                        //新增组盘信息
                        _stockRepository.StockInfoRepository.AddData(stockInfo);
                        if (purchaseBSTOrder.PurchaseOrderStatus == InOrderStatusEnum.未开始.ObjToInt())
                        {
                            purchaseBSTOrder.PurchaseOrderStatus = InOrderStatusEnum.入库中.ObjToInt();
                            _inboundRepository.PurchaseBSTOrderRepository.UpdateData(purchaseBSTOrder);
                        }
                        _inboundRepository.PurchaseBSTOrderDetailRepository.UpdateData(purchaseBSTOrderDetail);
                        //启动线体
                        WebResponseContent webResponse = YLPurchasePush();
                        if (!webResponse.Status)
                        {
@@ -455,7 +467,7 @@
                    }
                    else
                    {
                        return content.Error($"上卷条码{yLInboundCache.BarCode}还未进行绑定");
                       throw new Exception($"上卷条码{yLInboundCache.BarCode}还未进行绑定");
                    }
                }
                
@@ -587,7 +599,7 @@
                    {
                        return content.Error($"未找到对应的终点货位信息");
                    }
                    Dt_AGVStationInfo agvstation = _agvStationInfoRepository.QueryFirst(x => x.AGVStationCode == task.SourceAddress && ( x.StationArea == nameof(AGVStationAreaEnum.一楼月台码头) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺织布) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺淋膜) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺淋膜)));
                    Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == task.SourceAddress && ( x.StationArea == nameof(AGVStationAreaEnum.一楼月台码头) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺织布) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺淋膜) || x.StationArea == nameof(AGVStationAreaEnum.一楼无纺淋膜)));
                    if (agvstation != null)
                    {
                        agvstation.IsOccupied = WhetherEnum.False.ObjToInt();
@@ -599,7 +611,7 @@
                        _unitOfWorkManage.BeginTran();
                        if (agvstation != null)
                        {
                            _agvStationInfoRepository.UpdateData(agvstation);
                            _basicRepository.AGVStationInfoRepository.UpdateData(agvstation);
                        }
                        proStockInfo.LocationCode = locationInfoEnd.LocationCode;
                        proStockInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
@@ -618,7 +630,7 @@
                        _unitOfWorkManage.BeginTran();
                        if (agvstation != null)
                        {
                            _agvStationInfoRepository.UpdateData(agvstation);
                            _basicRepository.AGVStationInfoRepository.UpdateData(agvstation);
                        }
                        proStockInfo.LocationCode = locationInfoEnd.LocationCode;
                        proStockInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
@@ -665,7 +677,7 @@
                    _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
                    BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.人工完成 : WIDESEA_Core.Enums.OperateTypeEnum.自动完成);
                    //上报老厂ERP
                    if (stockInfo.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt())
                    if (stockInfo.MaterielInvOrgId == MaterielInvOrgEnum.老厂.ObjToInt() && task.TaskType==TaskTypeEnum.Inbound.ObjToInt())
                    {
                        int Qty = Convert.ToInt32(stockInfo.MaterielWeight);
                        BSTPurchaseUpModel bSTPurchaseUpModel = new BSTPurchaseUpModel()
@@ -800,7 +812,7 @@
                //{
                //    return content.Error($"框码格式错误{barCode}");
                //}
                Dt_AGVStationInfo agvstation = _agvStationInfoRepository.QueryFirst(x=>x.AGVStationCode==startPoint);
                Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==startPoint);
                if (agvstation==null)
                {
                    return content.Error($"起点错误{startPoint}");
@@ -892,7 +904,7 @@
                    {
                        return content.Error($"未找到物料信息{matCode}");
                    }
                    Dt_AGVStationInfo agvstation = _agvStationInfoRepository.QueryFirst(x => x.AGVStationCode == startPoint);
                    Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == startPoint);
                    if (agvstation == null)
                    {
                        return content.Error($"起点错误{startPoint}");
@@ -1170,7 +1182,7 @@
                    return content.Error($"物料编码{nameof(MESProInDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}信息不存在");
                }
                //获取所有AGV点位
                List<Dt_AGVStationInfo> aGVStationInfos = _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                List<Dt_AGVStationInfo> aGVStationInfos = _basicRepository.AGVStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                //判断是否存在重复
                MESProInDTO? proInDTO = proInDTOs.FirstOrDefault(x => x.IsMantissa == false && proInOrderInfos.Select(x => x.BarCode).Contains(x.BarCode));
@@ -1246,7 +1258,7 @@
                List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
                List<Dt_Task> tasks = new List<Dt_Task>();
                //获取所有AGV点位
                List<Dt_AGVStationInfo> aGVStationInfos = _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                List<Dt_AGVStationInfo> aGVStationInfos = _basicRepository.AGVStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
                //根据半成品信息呼叫对应任务
                foreach (var item in mESProInOrderInfos)
                {