Commit 3f0e0000 by jiawei.su

someupdate

parent 24b96b01
...@@ -516,7 +516,6 @@ namespace Siger.ApiACC.Controllers ...@@ -516,7 +516,6 @@ namespace Siger.ApiACC.Controllers
var beats = _productionBeatSet.GetList(f => f.projectID == PID && f.machineID == machine); var beats = _productionBeatSet.GetList(f => f.projectID == PID && f.machineID == machine);
var productIds = beats.Select(f => f.product_name.ToInt()).ToList(); var productIds = beats.Select(f => f.product_name.ToInt()).ToList();
// 取产品交期最近的订单 // 取产品交期最近的订单
var planOrder = _automationFixtureToolsProduct.GetDeliveryOrder(productIds, PID); var planOrder = _automationFixtureToolsProduct.GetDeliveryOrder(productIds, PID);
if (!planOrder.Any()) if (!planOrder.Any())
...@@ -525,6 +524,11 @@ namespace Siger.ApiACC.Controllers ...@@ -525,6 +524,11 @@ namespace Siger.ApiACC.Controllers
return null; return null;
} }
var order = planOrder.FirstOrDefault(); var order = planOrder.FirstOrDefault();
var beatset = beats.Where(f => f.product_name == order.productId.ToString());
//var routeIds = beatset.Select(s => s.id).ToList();
var location = _automationLocation.GetList(f => f.projectId == PID && f.ordernumber== order.ordernumber && productIds.Contains(f.productid)); var location = _automationLocation.GetList(f => f.projectId == PID && f.ordernumber== order.ordernumber && productIds.Contains(f.productid));
if (location==null) if (location==null)
......
...@@ -110,6 +110,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -110,6 +110,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
where d.projectId == projectId && productIds.Contains(p.product_id) && d.status != (int)RowState.Invalid && p.status != (int)RowState.Invalid where d.projectId == projectId && productIds.Contains(p.product_id) && d.status != (int)RowState.Invalid && p.status != (int)RowState.Invalid
select new ResponseAutomationPlanOrder select new ResponseAutomationPlanOrder
{ {
productId=p.product_id,
ordernumber=d.OrderNumber, ordernumber=d.OrderNumber,
productCode=p.product_code, productCode=p.product_code,
productName=p.product_name, productName=p.product_name,
......
...@@ -43,7 +43,9 @@ namespace Siger.Middlelayer.AccRepository.Response ...@@ -43,7 +43,9 @@ namespace Siger.Middlelayer.AccRepository.Response
public class ResponseAutomationPlanOrder public class ResponseAutomationPlanOrder
{ {
public string ordernumber { get; set; } public string ordernumber { get; set; }
public int productId { get; set; }
public string productCode { get; set; } public string productCode { get; set; }
public string productName { get; set; } public string productName { get; set; }
public int delvery { get; set; } public int delvery { get; set; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment