merge
This commit is contained in:
@@ -597,7 +597,7 @@ public class orderController : ApiController
|
||||
//var qry1 = _db.pro_order_detail.AsEnumerable();
|
||||
//qry1 = qry1.Where(o => o.order_no == order_no);
|
||||
//var qry1 = prod.pro_order_detail.AsEnumerable();
|
||||
var qry1 = prod.pro_order_detail.AsQueryable();
|
||||
var qry1 = prod.pro_order_detail.AsQueryable().include(o=>o.pro_order.activity.activity_relating);
|
||||
|
||||
//if (!string.IsNullOrEmpty(q.subject))
|
||||
// qry = qry.Where(o => o.subject.Contains(q.subject));
|
||||
@@ -638,13 +638,19 @@ public class orderController : ApiController
|
||||
|
||||
var ret = new
|
||||
{
|
||||
list = qry1_list.Select(x => new
|
||||
list = qry1_list.Select(x => {
|
||||
var tmpActivityRelating = x.pro_order?.activity?.activity_relating?.Where(a => a.actItem_num == x.actItem_num).FirstOrDefault();
|
||||
return new
|
||||
{
|
||||
has_yang_limit = tmpActivityRelating?.has_yang_limit ?? false,
|
||||
has_chao_limit = tmpActivityRelating?.has_chao_limit ?? false,
|
||||
yang_limit_count = tmpActivityRelating?.yang_limit_count ?? 0,
|
||||
chao_limit_count = tmpActivityRelating?.chao_limit_count ?? 0,
|
||||
id = i++,
|
||||
num = x.num,
|
||||
order_no = x.order_no,
|
||||
actitem_num_selected = new
|
||||
{
|
||||
{
|
||||
text = x.actItem_num.HasValue ? x.actItem.subject : "",
|
||||
val = x.actItem_num.HasValue ? x.actItem_num.Value : 0,
|
||||
},
|
||||
@@ -758,6 +764,10 @@ public class orderController : ApiController
|
||||
text = ar.actItem.subject,
|
||||
val = ar.actItem_num,
|
||||
},
|
||||
has_yang_limit = ar.has_yang_limit ?? false,
|
||||
has_chao_limit = ar.has_chao_limit ?? false,
|
||||
yang_limit_count = ar.yang_limit_count ?? 0,
|
||||
chao_limit_count = ar.chao_limit_count ?? 0,
|
||||
parent_num = q.num,
|
||||
f_num_selected = new
|
||||
{
|
||||
@@ -838,6 +848,10 @@ public class orderController : ApiController
|
||||
text = x.actItem.subject,
|
||||
val = x.actItem.num,
|
||||
},
|
||||
has_yang_limit = x.has_yang_limit,
|
||||
has_chao_limit = x.has_chao_limit,
|
||||
yang_limit_count = x.yang_limit_count,
|
||||
chao_limit_count = x.chao_limit_count,
|
||||
f_num_selected = new
|
||||
{
|
||||
text = "",
|
||||
@@ -922,8 +936,6 @@ public class orderController : ApiController
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
||||
Reference in New Issue
Block a user