1
huanghongfeng
10 天以前 f49fa4b5027cfdc27b429985d023e8002abcca2e
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -388,7 +388,7 @@
                else
                {
                    //判断是否需要移库
                    string[] targetCodes = SourceAddress.Split("-");
                    string[] targetCodes = SourceAddress.Split("-");  //   R02 - 002 - 001 - 011 - 01
                    if (targetCodes[1] == "001")
                    {
                        targetCodes[1] = "002";
@@ -404,7 +404,7 @@
                    }
                    targetCodes[4] = "01";
                    string LocationCode = string.Join("-", targetCodes); //组装浅库位地址
                    Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode && (x.LocationStatus == (int)LocationStatusEnum.Free || x.LocationStatus == (int)LocationStatusEnum.InStock));
                    Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode && (x.LocationStatus == (int)LocationStatusEnum.Free || x.LocationStatus == (int)LocationStatusEnum.InStock || x.LocationStatus == (int)LocationStatusEnum.Pallet));
                    if (locationInfos == null)
                    {
                        return content = WebResponseContent.Instance.Error($"未找到该货位信息,货位编号:{locationInfos}");
@@ -442,20 +442,32 @@
                                    Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.OrderName == targetCodesst[0]);
                                    if (dt_Inbound.Startingcolumn != 0 || dt_Inbound.Terminationcolumn != 0)
                                    {
                                        newLocation = _basicService.LocationInfoService.GetLocation2(locationInfos.RoadwayNo, Locationtype, dt_Inbound.Startingcolumn, dt_Inbound.Terminationcolumn);
                                        newLocation = _basicService.LocationInfoService.GetLocation4(locationInfos.RoadwayNo, Locationtype, dt_Inbound.Startingcolumn, dt_Inbound.Terminationcolumn);
                                    }
                                    else
                                    {
                                        newLocation = _basicService.LocationInfoService.GetLocation(locationInfos.RoadwayNo, Locationtype);
                                        newLocation = _basicService.LocationInfoService.GetLocation3(locationInfos.RoadwayNo, Locationtype);
                                    }
                                }
                                else
                                {
                                    newLocation = _basicService.LocationInfoService.GetLocation(locationInfos.RoadwayNo, Locationtype);
                                    newLocation = _basicService.LocationInfoService.GetLocation3(locationInfos.RoadwayNo, Locationtype);
                                }
                                //目标货位查找库位是否有货
                                Dt_StockInfo dt_StockCurren = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == newLocation.LocationCode);
                                if (dt_StockCurren != null) return content = WebResponseContent.Instance.Error($"入库失败,托盘条码:{dt_StockInfo.PalletCode},查找出的货位信息对应已有库存");
                                Dt_Task taskcurren = BaseDal.QueryFirst(x => x.TargetAddress == newLocation.LocationCode);
                                if (taskcurren != null) return content = WebResponseContent.Instance.Error($"入库失败,托盘条码:{dt_StockInfo.PalletCode},查找出的货位信息已有入库任务");
                                bool crutaskthy = _taskHtyService.CrueeTaskHty(newLocation.LocationCode);
                                if (crutaskthy) return content = WebResponseContent.Instance.Error($"入库失败,托盘条码:{dt_StockInfo.PalletCode},查找出的货位在任务历史信息中,有入库或移库信息");
                                //找的深库区,则判断浅库位是否有
                                if (newLocation != null)
                                {
                                    Dt_Task dt_Task = new()
@@ -528,7 +540,7 @@
                if (task == null)
                {
                    string RoadwayNo = "1";
                    if (generate.SourceAddress != "R01-002-041-001-01")
                    if (generate.SourceAddress != "R01-002-041-001-01" && generate.SourceAddress != "R01-002-043-001-01")
                    {
                        RoadwayNo = "2";
                    }
@@ -808,7 +820,7 @@
                    Dt_StockInfo stockt = stocktData.FirstOrDefault(x => x.PalletCode == palletCode);
                    if (stockt !=null)
                    {
                        if (stockt.StockStatus == (int)StockStatusEmun.已入库 && (stockt.Wlstatus == (int)InventoryMaterialStatus.合格 || stockt.Wlstatus == (int)InventoryMaterialStatus.退货 || stockt.Wlstatus == (int)InventoryMaterialStatus.特采))
                        if (stockt.StockStatus == (int)StockStatusEmun.已入库 && (stockt.Wlstatus == (int)InventoryMaterialStatus.合格 || stockt.Wlstatus == (int)InventoryMaterialStatus.退货 || stockt.Wlstatus == (int)InventoryMaterialStatus.特采 || stockt.Wlstatus == (int)InventoryMaterialStatus.空托))
                        {
                            Dt_StockInfoDetail stocktdetail = StockInfoDetailData.FirstOrDefault(x => x.StockId == stockt.Id);
                            if(stocktdetail != null)