wankeda
2025-06-24 1caea0fdc7ed1788d854a2aba8853984b4494e01
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs
@@ -33,17 +33,17 @@
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据不能为空"}");
                    }
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("空托RHCK") && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("空托库入") && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    if (endCachePoint == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"未找到空托库出库位可用缓存架"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"未找到空托库入库位可用缓存架"}");
                    }
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                    if (point == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或物料类型不匹配"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或已禁用"}");
                    }
                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                    if (points == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,此缓存点已被锁定"}");
@@ -98,25 +98,25 @@
                {
                    string stationcode = saveModel.MainData["stationcode"].ToString();
                    //string PalletCode = saveModel.MainData["PalletCode"].ToString();
                    //string toaddress = saveModel.MainData["toaddress"].ToString();
                    if (stationcode == "")//异常返回。。。。。。
                    string toaddress = saveModel.MainData["toaddress"].ToString();
                    if (stationcode == "" || toaddress == "")//异常返回。。。。。。
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据不能为空"}");
                    }
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("空托CHCK") && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                    if (endCachePoint == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"未找到空托库入库位可用缓存架"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"未找到终点此区域空托库位可用缓存架"}");
                    }
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                    if (point == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或物料类型不匹配"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或已禁用"}");
                    }
                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.InStock.ObjToInt());
                    if (points == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,此缓存点已被锁定"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,此缓存点状态不是有货状态"}");
                    }
                    Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode);
                    if (taskcode != null)
@@ -172,15 +172,15 @@
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据不能为空"}");
                    }
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x =>x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());
                    if (endCachePoint == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"未找到终点区域可用缓存架"}");
                    }
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);// && x.Materialtype == PalletCode
                    Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());// && x.Materialtype == PalletCode
                    if (point == null)
                    {
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或物料类型不匹配"}");
                        return content = WebResponseContent.Instance.Error($"添加任务异常,错误信息:{"扫码数据异常,未找到此缓存架或已禁用"}");
                    }
                    Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt());
                    if (points == null)