|
|
|
@ -14,6 +14,7 @@ using Forks.EnterpriseServices.DataForm; |
|
|
|
using Forks.Utils; |
|
|
|
using TSingSoft.WebControls2.BillReports; |
|
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
using Forks.EnterpriseServices.BusinessInterfaces; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.TypeIOCs |
|
|
|
{ |
|
|
|
@ -27,10 +28,44 @@ namespace BWP.Web.Pages.TypeIOCs |
|
|
|
AddParameterss(dic, dmo); |
|
|
|
} |
|
|
|
|
|
|
|
public class CarLoadingGoodsSumDetailData |
|
|
|
{ |
|
|
|
public string Goods_Name { get; set; } |
|
|
|
public string Goods_Code { get; set; } |
|
|
|
public string Goods_Spec { get; set; } |
|
|
|
public Money<decimal>? Number { get; set; } |
|
|
|
public string Goods_MainUnit { get; set; } |
|
|
|
public Money<decimal>? SecondNumber { get; set; } |
|
|
|
public string Goods_SecondUnit { get; set; } |
|
|
|
public string Remark { get; set; } |
|
|
|
} |
|
|
|
|
|
|
|
//定制打印格式【装车单】
|
|
|
|
protected void AddParameterss(IDictionary<string, object> dic, CarLoading Dmo) |
|
|
|
{ |
|
|
|
|
|
|
|
var list = new List<CarLoadingGoodsSumDetailData>(); |
|
|
|
if (Dmo.BillDetails.Count > 0) { |
|
|
|
var billInfo = Dmo.BillDetails.Select(detail => new Tuple<short, long>(detail.BillTypeID, detail.BillID)).ToList(); |
|
|
|
var query = CarLoadingUtil.GoodsSumDetailQuery(billInfo); |
|
|
|
|
|
|
|
using (var context = new TransactionContext()) { |
|
|
|
using (var reader = context.Session.ExecuteReader(query)) { |
|
|
|
while (reader.Read()) { |
|
|
|
var data = new CarLoadingGoodsSumDetailData(); |
|
|
|
data.Goods_Name = (string)reader[0]; |
|
|
|
data.Goods_Code = (string)reader[1]; |
|
|
|
data.Goods_Spec = (string)reader[2]; |
|
|
|
data.Number = (Money<decimal>?)reader[3]; |
|
|
|
data.Goods_MainUnit = (string)reader[4]; |
|
|
|
data.SecondNumber = (Money<decimal>?)reader[5]; |
|
|
|
data.Goods_SecondUnit = (string)reader[6]; |
|
|
|
data.Remark = (string)reader[7]; |
|
|
|
list.Add(data); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
dic.Add("$DetailInfo3", list); |
|
|
|
PageSize = 100; |
|
|
|
dic.Add("$DetailInfo2", new Func<object>(() => GetPrintStyle(Dmo))); |
|
|
|
|
|
|
|
|