|
|
@ -1,5 +1,4 @@
|
|
|
|
using AngleSharp.Css;
|
|
|
|
using DS.Module.Core;
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
|
|
|
using DS.Module.Core.Condition;
|
|
|
|
using DS.Module.Core.Condition;
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
@ -498,78 +497,95 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
return await TenantDb.Queryable<FeeCustTemplate>().Where(whereList).ToQueryPageAsync(request.PageCondition);
|
|
|
|
return await TenantDb.Queryable<FeeCustTemplate>().Where(whereList).ToQueryPageAsync(request.PageCondition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
/// <summary>
|
|
|
|
///// 视图列表
|
|
|
|
/// 视图列表
|
|
|
|
///// </summary>
|
|
|
|
/// </summary>
|
|
|
|
///// <param name="request"></param>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
///// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
//public async Task<DataResult<List<FeeCustTemplateView>>> GetListViewAsync(PageRequest request)
|
|
|
|
public async Task<DataResult<List<FeeCustTemplateView>>> GetListViewAsync(PageRequest request)
|
|
|
|
//{
|
|
|
|
{
|
|
|
|
// var list = TenantDb.Queryable<FeeCustTemplateDetail>()
|
|
|
|
var query = TenantDb.Queryable<FeeCustTemplateDetail>()
|
|
|
|
// .InnerJoin<FeeCustTemplate>((d, t) => d.TemplateId == t.Id)
|
|
|
|
.InnerJoin<FeeCustTemplate>((d, t) => d.TemplateId == t.Id)
|
|
|
|
// .LeftJoin<CodeCarrier>((d, t, cc) => t.CarrierId == cc.Id)
|
|
|
|
.LeftJoin<CodeCarrier>((d, t, cc) => t.CarrierId == cc.Id)
|
|
|
|
// .LeftJoin<CodeLanes>((d, t, cc, cl) => t.LaneId == cl.Id)
|
|
|
|
.LeftJoin<CodeLanes>((d, t, cc, cl) => t.LaneId == cl.Id)
|
|
|
|
// .LeftJoin<CodeSource>((d, t, cc, cl, cs) => t.SourceId == cs.Id)
|
|
|
|
.LeftJoin<CodeSource>((d, t, cc, cl, cs) => t.SourceId == cs.Id)
|
|
|
|
// .LeftJoin<CodeSourceDetail>((d, t, cc, cl, cs, csd) => t.SourceDetailId == csd.Id)
|
|
|
|
.LeftJoin<CodeSourceDetail>((d, t, cc, cl, cs, csd) => t.SourceDetailId == csd.Id)
|
|
|
|
// .LeftJoin<InfoClient>((d, t, cc, cl, cs, csd, c) => t.ForwarderId == c.Id)
|
|
|
|
.LeftJoin<InfoClient>((d, t, cc, cl, cs, csd, c) => t.ForwarderId == c.Id)
|
|
|
|
// .LeftJoin<SysOrg>((d, t, cc, cl, cs, csd, c, so) => t.DeptOrgId == so.Id, "shippingweb8_dev.sys_org")
|
|
|
|
.LeftJoin<SysOrg>((d, t, cc, cl, cs, csd, c, so) => t.DeptOrgId == so.Id, "shippingweb8_dev.sys_org")
|
|
|
|
// .GroupBy((d, t, cc, cl, cs, csd, c, so) => new
|
|
|
|
.GroupBy((d, t, cc, cl, cs, csd, c, so) => new
|
|
|
|
// {
|
|
|
|
{
|
|
|
|
// d.TemplateId,
|
|
|
|
d.TemplateId,
|
|
|
|
// d.FeeId,
|
|
|
|
d.FeeId,
|
|
|
|
// d.FeeName,
|
|
|
|
d.FeeName,
|
|
|
|
// d.CustomerType,
|
|
|
|
d.CustomerType,
|
|
|
|
// d.CustomerId,
|
|
|
|
d.CustomerId,
|
|
|
|
// d.CustomerName,
|
|
|
|
d.CustomerName,
|
|
|
|
|
|
|
|
|
|
|
|
// t.BusinessType,
|
|
|
|
//t.BusinessType,
|
|
|
|
// t.FeeType,
|
|
|
|
//t.FeeType,
|
|
|
|
// t.StartTime,
|
|
|
|
//t.StartTime,
|
|
|
|
// t.EndTime,
|
|
|
|
//t.EndTime,
|
|
|
|
// t.IsDisabled,
|
|
|
|
//t.FeeCategoryName,
|
|
|
|
// t.FeeCategoryName,
|
|
|
|
//t.Priority,
|
|
|
|
// t.Priority,
|
|
|
|
//t.POLCode,
|
|
|
|
// t.POLCode,
|
|
|
|
//t.PODCode,
|
|
|
|
// t.PODCode,
|
|
|
|
//t.MBLFrtCode,
|
|
|
|
// t.MBLFrtCode,
|
|
|
|
|
|
|
|
|
|
|
|
//cl.LaneName,
|
|
|
|
// cl.LaneName,
|
|
|
|
//CarrierName = cc.CnName,
|
|
|
|
// CarrierName = cc.CnName,
|
|
|
|
//cs.SourceName,
|
|
|
|
// cs.SourceName,
|
|
|
|
//SourceDetailName = csd.DetailName,
|
|
|
|
// SourceDetailName = csd.DetailName,
|
|
|
|
//ForwarderName = c.ShortName,
|
|
|
|
// ForwarderName = c.ShortName,
|
|
|
|
//DeptOrgName = so.OrgName
|
|
|
|
// DeptOrgName = so.OrgName
|
|
|
|
}).Select((d, t, cc, cl, cs, csd, c, so) => new FeeCustTemplateView
|
|
|
|
// }).Select((d, t, cc, cl, cs, csd, c, so) => new FeeCustTemplateView
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
Id = d.Id,
|
|
|
|
// Id = d.Id,
|
|
|
|
TemplateId = d.TemplateId,
|
|
|
|
// TemplateId = d.TemplateId,
|
|
|
|
CustomerType = d.CustomerType,
|
|
|
|
// CustomerType = d.CustomerType,
|
|
|
|
CustomerId = d.CustomerId,
|
|
|
|
// CustomerId = d.CustomerId,
|
|
|
|
CustomerName = d.CustomerName,
|
|
|
|
// CustomerName = d.CustomerName,
|
|
|
|
FeeId = d.FeeId,
|
|
|
|
// FeeId = d.FeeId,
|
|
|
|
FeeName = d.FeeName,
|
|
|
|
// FeeName = d.FeeName,
|
|
|
|
Currency = d.Currency,
|
|
|
|
|
|
|
|
ExchangeRate = d.ExchangeRate,
|
|
|
|
|
|
|
|
TaxRate = d.TaxRate,
|
|
|
|
|
|
|
|
AccTaxRate = d.AccTaxRate,
|
|
|
|
|
|
|
|
Tax = d.Tax,
|
|
|
|
// BusinessType = t.BusinessType,
|
|
|
|
IsInvoice = d.IsInvoice,
|
|
|
|
// FeeType = t.FeeType,
|
|
|
|
IsAdvancedPay = d.IsAdvancedPay,
|
|
|
|
// StartTime = t.StartTime,
|
|
|
|
|
|
|
|
// EndTime = t.EndTime,
|
|
|
|
Unit20GP = SqlFunc.AggregateSum(d.Unit == "20GP" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// IsDisabled = t.IsDisabled,
|
|
|
|
Unit40GP = SqlFunc.AggregateSum(d.Unit == "40GP" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// FeeCategoryName = t.FeeCategoryName,
|
|
|
|
Unit40HC = SqlFunc.AggregateSum(d.Unit == "40HC" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// Priority = t.Priority,
|
|
|
|
Unit45G0 = SqlFunc.AggregateSum(d.Unit == "45G0" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// POLCode = t.POLCode,
|
|
|
|
UnitTEU = SqlFunc.AggregateSum(d.Unit == "TEU" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// PODCode = t.PODCode,
|
|
|
|
UnitP = SqlFunc.AggregateSum(d.Unit == "P" ? SqlFunc.Round(d.TaxUnitPrice, 2) : null),
|
|
|
|
// MBLFrtCode = t.MBLFrtCode,
|
|
|
|
|
|
|
|
// LaneName = cl.LaneName,
|
|
|
|
TemplateName = t.Name,
|
|
|
|
// CarrierName = cc.CnName,
|
|
|
|
BusinessType = t.BusinessType,
|
|
|
|
// SourceName = cs.SourceName,
|
|
|
|
FeeType = t.FeeType,
|
|
|
|
// SourceDetailName = csd.DetailName,
|
|
|
|
StartTime = t.StartTime,
|
|
|
|
// ForwarderName = c.ShortName,
|
|
|
|
EndTime = t.EndTime,
|
|
|
|
// DeptOrgName = so.OrgName
|
|
|
|
IsDisabled = t.IsDisabled,
|
|
|
|
// });
|
|
|
|
IsShared = t.IsShared,
|
|
|
|
//}
|
|
|
|
FeeCategoryName = t.FeeCategoryName,
|
|
|
|
|
|
|
|
Priority = t.Priority,
|
|
|
|
|
|
|
|
POLCode = t.POLCode,
|
|
|
|
|
|
|
|
PODCode = t.PODCode,
|
|
|
|
|
|
|
|
MBLFrtCode = t.MBLFrtCode,
|
|
|
|
|
|
|
|
CreateUserName = t.CreateUserName,
|
|
|
|
|
|
|
|
CreateTime = t.CreateTime,
|
|
|
|
|
|
|
|
LaneName = cl.LaneName,
|
|
|
|
|
|
|
|
CarrierName = cc.CnName,
|
|
|
|
|
|
|
|
SourceName = cs.SourceName,
|
|
|
|
|
|
|
|
SourceDetailName = csd.DetailName,
|
|
|
|
|
|
|
|
ForwarderName = c.ShortName,
|
|
|
|
|
|
|
|
DeptOrgName = so.OrgName
|
|
|
|
|
|
|
|
}).MergeTable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var whereList = request.GetConditionalModels(Db);
|
|
|
|
|
|
|
|
return await query.Where(whereList).ToQueryPageAsync(request.PageCondition);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 详情
|
|
|
|
/// 详情
|
|
|
@ -670,6 +686,8 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int rows = await TenantDb.Updateable(list).UpdateColumns(x => new
|
|
|
|
int rows = await TenantDb.Updateable(list).UpdateColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
x.CustomerId,
|
|
|
|
|
|
|
|
x.CustomerName,
|
|
|
|
x.StartTime,
|
|
|
|
x.StartTime,
|
|
|
|
x.EndTime,
|
|
|
|
x.EndTime,
|
|
|
|
x.IsDisabled,
|
|
|
|
x.IsDisabled,
|
|
|
|