調整牌位排版,增加疏文列印
This commit is contained in:
@@ -159,6 +159,7 @@ public class designerController : ApiController
|
||||
tsd.Height = item.height == null ? "" : (string)item.height;
|
||||
tsd.TextWidth = item.textWidth == null ? "" : (string)item.textWidth;
|
||||
tsd.TextHeight = item.textHeight == null ? "" : (string)item.textHeight;
|
||||
tsd.TextSpan = item.textSpan == null ? "" : (string)item.textSpan;
|
||||
tsd.TwoOffset = item.twoOffset == null ? "" : (string)item.twoOffset;
|
||||
tsd.ThreeOffset = item.threeOffset == null ? "" : (string)item.threeOffset;
|
||||
tsd.FourOffset = item.fourOffset == null ? "" : (string)item.fourOffset;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.Util.Optional;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -98,4 +99,55 @@ public class orderdetailController:ApiController
|
||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/orderdetail/GetShuwenData")]
|
||||
public IHttpActionResult GetShuwenData([FromBody] dynamic data)
|
||||
{
|
||||
var json = data;
|
||||
var num = (json.activity_num == null ? 0 : (int)json.activity_num);
|
||||
var query = _db.pro_order_detail.AsQueryable();
|
||||
query=query.Where(x => (_db.act_bom.AsQueryable().Where(y => y.package_num == null).Select(y => y.item_num).ToList()).
|
||||
Contains(x.actItem_num));
|
||||
query = query.Where(x => (_db.pro_order.AsQueryable().
|
||||
Where(w => w.activity_num ==num ).Select(w => w.order_no)).ToList().Contains(x.order_no));
|
||||
//這些是功德主
|
||||
var list = query.OrderByDescending(x=>x.price).Select(x => new
|
||||
{
|
||||
x.num,x.order_no,x.actItem_num,x.parent_num,x.print_id,x.f_num_tablet,x.price,
|
||||
childs=_db.pro_order_detail.Where(z=>z.order_no==x.order_no&&x.parent_num==x.actItem_num).Select(z=>new
|
||||
{
|
||||
x.num,
|
||||
x.order_no,
|
||||
x.actItem_num,
|
||||
x.parent_num,
|
||||
x.print_id,
|
||||
x.f_num_tablet,
|
||||
x.price
|
||||
}).ToList()
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
var query1 = _db.pro_order_detail.AsQueryable();
|
||||
query1 = query1.Where(x => !(_db.act_bom.AsQueryable().Where(y => y.package_num == null).Select(y => y.item_num).ToList()).
|
||||
Contains(x.actItem_num));
|
||||
query1 = query1.Where(x => x.parent_num == null);
|
||||
query1 = query1.Where(x => (_db.pro_order.AsQueryable().
|
||||
Where(w => w.activity_num == num).Select(w => w.order_no)).ToList().Contains(x.order_no));
|
||||
//這些是非功德主
|
||||
var list1 = query1.OrderByDescending(x => x.price).Select(x => new
|
||||
{
|
||||
x.num,
|
||||
x.order_no,
|
||||
x.actItem_num,
|
||||
x.parent_num,
|
||||
x.print_id,
|
||||
x.f_num_tablet,
|
||||
x.price
|
||||
}).ToList();
|
||||
|
||||
return Ok(new {result="Y",data=new { list=list,list1=list1 } });
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user