Commit eac1a888a38b6ed4506e0b836753443825e348b6

Authored by gy.huang
1 parent 06b82369

库存查询

WebApp/Apps/api/IEmptyPalletOutApp.cs
... ... @@ -36,7 +36,7 @@ namespace WebApp
36 36 if (stationRoadway.RoadWay == 3)
37 37 {
38 38 Station s = _unitWork.Find<Station>(n => n.Code == "InStationC03").FirstOrDefault();
39   - if (s.Containercode != "")
  39 + if (s.Containercode != "" && s.Code.Contains("ProductStationC0") && s.Code != "ProductStationC09")
40 40 {
41 41 Task ptask = new Task();
42 42 TaskDetail ptaskDetail = new TaskDetail();
... ...
WebApp/Apps/api/IStackerStatusApp.cs
... ... @@ -207,6 +207,7 @@ namespace WebApp
207 207 //删除已完成的托盘出库任务
208 208 _unitWork.Delete(pouttask);
209 209 _unitWork.Delete(t);
  210 +
210 211 }
211 212 else if (t.TaskType == TaskType.站台到站台)
212 213 {
... ...
WebApp/Apps/task/TaskApp.cs
... ... @@ -1459,15 +1459,23 @@ namespace WebApp
1459 1459 public TableData StationToInventoryApp(string stationCode)
1460 1460 {
1461 1461 TableData tab = new TableData();
1462   - Station station = _unitWork.Find<Station>(n => n.Code == stationCode && n.Containercode != "").FirstOrDefault();
1463   - if (station == null)
  1462 + try
1464 1463 {
1465   - tab.data = null;
  1464 + Station station = _unitWork.Find<Station>(n => n.Code == stationCode && n.Containercode != "").FirstOrDefault();
  1465 + if (station == null)
  1466 + {
  1467 + tab.data = null;
  1468 + }
  1469 + else
  1470 + {
  1471 + List<Inventory> inventories = _unitWork.Find<Inventory>(n => n.ContainerCode == station.Containercode).ToList();
  1472 + tab.data = inventories;
  1473 + }
1466 1474 }
1467   - else
  1475 + catch (Exception ex)
1468 1476 {
1469   - List<Inventory> inventories = _unitWork.Find<Inventory>(n => n.ContainerCode == station.Containercode).ToList();
1470   - tab.data = inventories;
  1477 + tab.code = 500;
  1478 + tab.msg = ex.Message;
1471 1479 }
1472 1480 return tab;
1473 1481 }
... ...