Commit c13ae316daa44cfa28fe29066d5b534935ae9b2f
1 parent
df521634
修改
Showing
2 changed files
with
11 additions
and
7 deletions
WebApp/Apps/api/IStackerStatusApp.cs
... | ... | @@ -204,7 +204,7 @@ namespace WebApp |
204 | 204 | { |
205 | 205 | if (td.TaskType == TaskType.容器回库 && td.Roadway == 3 && _unitWork.IsExist<Inventory>(n => n.IsFold == "isflod")) |
206 | 206 | { |
207 | - loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => (b.Layer == 1 ? 13 : b.Layer)).ThenBy(a => a.MaxHeight).ThenByDescending(y => y.Row).FirstOrDefault(); | |
207 | + loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => b.Layer).ThenBy(a => a.MaxHeight).ThenByDescending(y => y.Row).FirstOrDefault(); | |
208 | 208 | } |
209 | 209 | else |
210 | 210 | { |
... | ... | @@ -221,7 +221,7 @@ namespace WebApp |
221 | 221 | loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" |
222 | 222 | && n.Line == locationDistribution.PointX && n.Row >= locationDistribution.PointY_1 && n.Row <= locationDistribution.PointY_2 |
223 | 223 | && n.Layer >= locationDistribution.PointZ_1 && n.Layer <= locationDistribution.PointZ_2) |
224 | - .OrderBy(n => n.Layer).ThenBy(a => a.MaxHeight).ThenBy(n => n.Row).FirstOrDefault(); | |
224 | + .OrderBy(n => (n.Layer==1||n.Layer==2) ? 13 : n.Layer).ThenBy(a => a.MaxHeight).ThenBy(n => n.Row).FirstOrDefault(); | |
225 | 225 | |
226 | 226 | if (loc != null) |
227 | 227 | { |
... | ... | @@ -245,11 +245,11 @@ namespace WebApp |
245 | 245 | { |
246 | 246 | if (stationRoadway.StationPlace == StationPlace.巷道北面) |
247 | 247 | { |
248 | - loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => b.MaxHeight).ThenBy(a => a.Layer).ThenBy(y => y.Row).FirstOrDefault(); | |
248 | + loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => b.MaxHeight).ThenBy(a => (a.Layer == 1 || a.Layer == 2)? 13 : a.Layer).ThenBy(y => y.Row).FirstOrDefault(); | |
249 | 249 | } |
250 | 250 | else if (stationRoadway.StationPlace == StationPlace.巷道南面) |
251 | 251 | { |
252 | - loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => (b.Layer)).ThenBy(a => a.MaxHeight).ThenByDescending(y => y.Row).FirstOrDefault(); | |
252 | + loc = _unitWork.Find<Location>(n => n.Status == LocationStatus.空仓位 && n.IsStop == false && n.MaxHeight >= sTKStatusModel.Height && n.Roadway == stationRoadway.RoadWay && n.ContainerCode == "" && n.DistributionType != LocationDistributionType.被分配库位静态库位).OrderBy(n => n.DistributionType).ThenBy(b => (b.Layer == 1||b.Layer == 2)? 13 : b.Layer).ThenBy(a => a.MaxHeight).ThenByDescending(y => y.Row).FirstOrDefault(); | |
253 | 253 | } |
254 | 254 | } |
255 | 255 | } |
... | ... | @@ -367,8 +367,8 @@ namespace WebApp |
367 | 367 | taskDetail.CreateTime = DateTime.Now; |
368 | 368 | _unitWork.Add(taskDetail); |
369 | 369 | ApiRequest apiRequest = new ApiRequest("WCS"); |
370 | - WCSResponse<WcsTask> _WCSResponse = apiRequest.Post<WCSResponse<WcsTask>>(JsonHelper.Instance.Serialize(taskDetail), "WcsWebApi/TaskAssign", "任务下发"); | |
371 | - //WCSResponse<WcsTask> _WCSResponse = apiRequest.Post<WCSResponse<WcsTask>>(JsonHelper.Instance.Serialize(taskDetail), "IWcsTaskTest/CreateWcsTask", "任务下发"); | |
370 | + //WCSResponse<WcsTask> _WCSResponse = apiRequest.Post<WCSResponse<WcsTask>>(JsonHelper.Instance.Serialize(taskDetail), "WcsWebApi/TaskAssign", "任务下发"); | |
371 | + WCSResponse<WcsTask> _WCSResponse = apiRequest.Post<WCSResponse<WcsTask>>(JsonHelper.Instance.Serialize(taskDetail), "IWcsTaskTest/CreateWcsTask", "任务下发"); | |
372 | 372 | if (_WCSResponse.Code != 200) |
373 | 373 | { |
374 | 374 | Response.Code = 300; |
... | ... |
WebMvc/Areas/task/Controllers/TaskController.cs
... | ... | @@ -419,7 +419,7 @@ namespace WebMvc |
419 | 419 | //查询是否启用该接口 |
420 | 420 | WebStart webStart_get_sfb = _unitWork.Find<WebStart>(n => n.InterfaceNmae == "get_sfb").FirstOrDefault(); |
421 | 421 | //排除工单号回库和废铜箔回库 |
422 | - if (Batch != "000" && (containerCode.Contains("PP") || containerCode.Contains("PJ")) && webStart_get_sfb != null) | |
422 | + if (Batch != "000" && (containerCode.Contains("PP") || containerCode.Contains("PJ") || containerCode.Contains("CP")) && webStart_get_sfb != null) | |
423 | 423 | { |
424 | 424 | if (webStart_get_sfb.IsStart) |
425 | 425 | { |
... | ... | @@ -507,6 +507,10 @@ namespace WebMvc |
507 | 507 | { |
508 | 508 | Project = value; |
509 | 509 | } |
510 | + else if (name == "sfbud03" && !string.IsNullOrEmpty(value)) | |
511 | + { | |
512 | + Customer = value; | |
513 | + } | |
510 | 514 | else if (name == "sfb01") |
511 | 515 | { |
512 | 516 | if (value != Lot) |
... | ... |