wet 2 years ago
commit ac38b8d3c0

@ -63,5 +63,22 @@ namespace Myshipping.Application.Entity
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
public string YARDCONTRACT { get; set; }
/// <summary>
/// 场站联系人电话
/// </summary>
public string YARDCONTRACTTEL { get; set; }
}
}

@ -2465,6 +2465,26 @@
备注
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingLetteryard.YARDID">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingLetteryard.YARD">
<summary>
场站
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingLetteryard.YARDCONTRACT">
<summary>
场站联系人
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingLetteryard.YARDCONTRACTTEL">
<summary>
场站联系人电话
</summary>
</member>
<member name="T:Myshipping.Application.Entity.BookingLog">
<summary>
舱单日志
@ -7148,6 +7168,26 @@
备注
</summary>
</member>
<member name="P:Myshipping.Application.BookingLetteryardInput.YARDID">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Application.BookingLetteryardInput.YARD">
<summary>
场站
</summary>
</member>
<member name="P:Myshipping.Application.BookingLetteryardInput.YARDCONTRACT">
<summary>
场站联系人
</summary>
</member>
<member name="P:Myshipping.Application.BookingLetteryardInput.YARDCONTRACTTEL">
<summary>
场站联系人电话
</summary>
</member>
<member name="T:Myshipping.Application.AddBookingLetteryardInput">
<summary>
入货通知新增输入参数
@ -9205,6 +9245,16 @@
租户名称
</summary>
</member>
<member name="P:Myshipping.Application.QueryBookingPrintTemplateInput.IsMain">
<summary>
主单
</summary>
</member>
<member name="P:Myshipping.Application.QueryBookingPrintTemplateInput.IsSub">
<summary>
分单
</summary>
</member>
<member name="T:Myshipping.Application.BookingPrintTemplateOutput">
<summary>
订舱打印模板输出参数

@ -284,13 +284,13 @@ namespace Myshipping.Application
.WhereIF(!string.IsNullOrWhiteSpace(input.LANECODE), u => u.LANECODE == input.LANECODE)
.WhereIF(!string.IsNullOrWhiteSpace(input.LANENAME), u => u.LANENAME.Contains(input.LANENAME))
.WhereIF(!string.IsNullOrWhiteSpace(input.FREIGHTPAYER), u => u.FREIGHTPAYER.Contains(input.FREIGHTPAYER))
.WhereIF(userlist!=null&&userlist.Count()>0, u => userlist.Contains((long)u.CreatedUserId))
.WhereIF(userlist != null && userlist.Count() > 0, u => userlist.Contains((long)u.CreatedUserId))
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort))
.ToPagedListAsync(input.PageNo, input.PageSize);
var list = entities.Adapt<SqlSugarPagedList<PageBookingOrder>>();
foreach (var item in list.Items)
{
@ -298,11 +298,12 @@ namespace Myshipping.Application
if (sta != null) { item.bookstatus = sta; }
var st = await _bookingremark.AsQueryable().Where(x => x.PId == item.Id).ToListAsync();
if (st != null) { item.bookremark = st; }
if (!string.IsNullOrWhiteSpace( item.ETD)) {
if (!string.IsNullOrWhiteSpace(item.ETD))
{
item.ETD = Convert.ToDateTime(item.ETD).ToString("yyyy-MM-dd");
}
}
return list;
}
@ -948,7 +949,7 @@ namespace Myshipping.Application
bookingStatusLog.BookingId = Convert.ToInt64(item.BusinessId);
bookingStatusLog.Category = "ship";
bookingStatusLog.CreatedTime = DateTime.Now;
if (string.IsNullOrWhiteSpace( item.YardCode) && !string.IsNullOrWhiteSpace( item.CARRIERID ))
if (string.IsNullOrWhiteSpace(item.YardCode) && !string.IsNullOrWhiteSpace(item.CARRIERID))
{
bookingStatusLog.Status = "订阅目的港";
}
@ -1163,7 +1164,10 @@ namespace Myshipping.Application
FromName = user.Name,
FromTel = user.Tel,
FromMail = user.Email,
YARDID = order.YARDID,
YARD = order.YARD,
YARDCONTRACT = order.YARDCONTRACT,
YARDCONTRACTTEL = order.YARDCONTRACTTEL,
};
}
@ -1636,7 +1640,7 @@ namespace Myshipping.Application
{
//当前公司所有已配置的模板
var allList = await _repPrintTemplate.AsQueryable()
.Filter(null, true).InnerJoin<BookingPrinttemplateRight>((d,t)=>d.Id==t.PrintTemplateId&&t.SysUserId==UserManager.UserId)
.Filter(null, true).InnerJoin<BookingPrinttemplateRight>((d, t) => d.Id == t.PrintTemplateId && t.SysUserId == UserManager.UserId)
.Where(d => d.TenantId == UserManager.TENANT_ID)
.Select(d => new
{
@ -2468,7 +2472,7 @@ namespace Myshipping.Application
var curBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(order.KINDPKGS, StringComparison.OrdinalIgnoreCase));
if(curBasePkgs == null)
if (curBasePkgs == null)
throw Oops.Bah($"包装{order.KINDPKGS}的基础数据代码未找到");
var ediPkgs = ediPkgsList.FirstOrDefault(x => x.Code.Equals(curBasePkgs.Code, StringComparison.OrdinalIgnoreCase));
@ -2771,7 +2775,7 @@ namespace Myshipping.Application
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
var currRlt = PILEdiHelper.CreateEdiPIL(ediModel);
#endregion
@ -2847,7 +2851,7 @@ namespace Myshipping.Application
}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
}
CommonWebApiResult currRlt = new CommonWebApiResult();
@ -2880,7 +2884,7 @@ namespace Myshipping.Application
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
CommonWebApiResult currRlt = YTEdiHelper.CreateEdiYT(ediModel);
#endregion

@ -74,6 +74,23 @@ namespace Myshipping.Application
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
public string YARDCONTRACT { get; set; }
/// <summary>
/// 场站联系人电话
/// </summary>
public string YARDCONTRACTTEL { get; set; }
}
/// <summary>

@ -51,11 +51,12 @@ namespace Myshipping.Application
[HttpGet("/BookingPrintTemplate/page")]
public async Task<dynamic> Page([FromQuery] QueryBookingPrintTemplateInput input)
{
_rep.Context.QueryFilter.Clear();
var entities = await _rep.AsQueryable()
var entities = await _rep.AsQueryable().Filter(null, true)
.WhereIF(!string.IsNullOrWhiteSpace(input.TypeName), u => u.TypeName.Contains(input.TypeName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName.Contains(input.FileName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.FileName.Contains(input.TenantName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.TenantName.Contains(input.TenantName.Trim()))
.WhereIF(input.IsMain.HasValue, u => u.IsMain == input.IsMain)
.WhereIF(input.IsSub.HasValue, u => u.IsSub == input.IsSub)
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
@ -116,6 +117,8 @@ namespace Myshipping.Application
TypeName = input.TypeName,
TenantId = input.TenantId,
TenantName = input.TenantName,
IsMain = input.IsMain,
IsSub = input.IsSub,
};
await _rep.InsertAsync(newFile);
using (var stream = File.Create(fileAbsPath))
@ -134,20 +137,6 @@ namespace Myshipping.Application
[HttpPost("/BookingPrintTemplate/edit")]
public async Task Update(IFormFile file, [FromForm] UpdateBookingPrintTemplateInput input)
{
//未上传打印模板文件
if (file == null || file.Length == 0)
{
throw Oops.Bah(BookingErrorCode.BOOK113);
}
var opt = App.GetOptions<PrintTemplateOptions>();
var originalFilename = file.FileName; // 文件原始名称
var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀
if (!opt.fileType.Contains(fileSuffix))
{
throw Oops.Bah(BookingErrorCode.BOOK114);
}
var cc = _rep.AsQueryable().Filter(null, true).Count(c => c.TenantId == input.TenantId && c.TypeCode == input.TypeCode && c.Id != input.Id);
if (cc > 0)
{
@ -162,33 +151,44 @@ namespace Myshipping.Application
entity = input.Adapt(entity);
var dirAbs = string.Empty;
if (string.IsNullOrEmpty(opt.basePath))
if (file != null)
{
dirAbs = Path.Combine(App.WebHostEnvironment.WebRootPath, opt.relativePath);
}
else
{
dirAbs = Path.Combine(opt.basePath, opt.relativePath);
}
var opt = App.GetOptions<PrintTemplateOptions>();
var originalFilename = file.FileName; // 文件原始名称
var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀
if (!opt.fileType.Contains(fileSuffix))
{
throw Oops.Bah(BookingErrorCode.BOOK114);
}
if (!Directory.Exists(dirAbs))
Directory.CreateDirectory(dirAbs);
var dirAbs = string.Empty;
if (string.IsNullOrEmpty(opt.basePath))
{
dirAbs = Path.Combine(App.WebHostEnvironment.WebRootPath, opt.relativePath);
}
else
{
dirAbs = Path.Combine(opt.basePath, opt.relativePath);
}
if (!Directory.Exists(dirAbs))
Directory.CreateDirectory(dirAbs);
// 先存库获取Id
var fileSaveName = $"{entity.Id}{fileSuffix}".ToLower();
var fileRelaPath = Path.Combine(opt.relativePath, fileSaveName).ToLower();
var fileAbsPath = Path.Combine(dirAbs, fileSaveName).ToLower();
// 先存库获取Id
var fileSaveName = $"{entity.Id}{fileSuffix}".ToLower();
var fileRelaPath = Path.Combine(opt.relativePath, fileSaveName).ToLower();
var fileAbsPath = Path.Combine(dirAbs, fileSaveName).ToLower();
entity.FileName = originalFilename;
entity.FilePath = fileRelaPath;
entity.FileName = originalFilename;
entity.FilePath = fileRelaPath;
await _rep.UpdateAsync(entity);
using (var stream = File.Create(fileAbsPath))
{
await file.CopyToAsync(stream);
using (var stream = File.Create(fileAbsPath))
{
await file.CopyToAsync(stream);
}
}
await _rep.UpdateAsync(entity);
}
/// <summary>

@ -94,5 +94,14 @@ namespace Myshipping.Application
/// </summary>
public string TenantName { get; set; }
/// <summary>
/// 主单
/// </summary>
public bool? IsMain { get; set; }
/// <summary>
/// 分单
/// </summary>
public bool? IsSub { get; set; }
}
}

@ -132,5 +132,9 @@ namespace Myshipping.Core.Entity
/// 客服
/// </summary>
public string CUSTSERVICE { get; set; }
/// <summary>
/// 提单信息
/// </summary>
public string TIDANINFO { get; set; }
}
}

@ -1744,6 +1744,11 @@
客服
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyCustomer.TIDANINFO">
<summary>
提单信息
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyCustomerContact">
<summary>
@ -9646,6 +9651,11 @@
客服
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyCustomerInput.TIDANINFO">
<summary>
提单信息
</summary>
</member>
<member name="T:Myshipping.Core.Service.AddDjyCustomerInput">
<summary>
订舱客户新增输入参数

@ -157,6 +157,10 @@ namespace Myshipping.Core.Service
/// 客服
/// </summary>
public string CUSTSERVICE { get; set; }
/// <summary>
/// 提单信息
/// </summary>
public string TIDANINFO { get; set; }
public List<AddDjyCustomerContactInput> Contacts { get; set; }

@ -12,6 +12,7 @@ using System.Web.Mvc;
using Myshipping.Report.DB;
using Myshipping.Application.Entity;
using System.Text;
using Myshipping.Core.Entity;
namespace Myshipping.Report.Controllers
{
@ -171,10 +172,20 @@ namespace Myshipping.Report.Controllers
log.Debug($"准备获取订舱数据:{bookingId}");
var order = sqlSugarClient.Queryable<BookingOrder>().First(x => x.Id == bookingId);
var ctns = sqlSugarClient.Queryable<BookingCtn>().Where(x => x.BILLID == bookingId).ToList();
var letterYard = sqlSugarClient.Queryable<BookingLetteryard>().First(x => x.BookingId == bookingId);
DjyCustomer customer = null;
if (!string.IsNullOrEmpty(order.AGENTID)) //根据国外代理,获取客户的提单信息
{
customer = sqlSugarClient.Queryable<DjyCustomer>().First(x => x.CodeName == order.AGENTID && x.TenantId == order.TenantId);
}
var strObj = JsonConvert.SerializeObject(new
{
order = order,
ctns = ctns
ctns = ctns,
letterYard,
agentCustomer = customer,
});
log.Debug($"订舱数据:{strObj}");

@ -175,9 +175,18 @@
<Compile Include="..\Myshipping.Application\Entity\BookingCtnDetail.cs">
<Link>DB\BookingCtnDetail.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Application\Entity\BookingLetteryard.cs">
<Link>DB\BookingLetteryard.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Application\Entity\BookingOrder.cs">
<Link>DB\BookingOrder.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Core\Entity\DJY\DjyCustomer.cs">
<Link>DB\DjyCustomer.cs</Link>
</Compile>
<Compile Include="..\Myshipping.Core\Entity\DJY\DjyCustomerContact.cs">
<Link>DB\DjyCustomerContact.cs</Link>
</Compile>
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\ReportController.cs" />

Loading…
Cancel
Save