|
|
@ -613,6 +613,7 @@ namespace Myshipping.Application
|
|
|
|
/// 批量编辑
|
|
|
|
/// 批量编辑
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpPost("/BookingOrder/BachUpdate")]
|
|
|
|
public async Task BachUpdate(BatchUpdate dto)
|
|
|
|
public async Task BachUpdate(BatchUpdate dto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (dto == null || dto.Id.Count == 0)
|
|
|
|
if (dto == null || dto.Id.Count == 0)
|
|
|
@ -776,8 +777,6 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 下载文件
|
|
|
|
/// 下载文件
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -1225,7 +1224,8 @@ namespace Myshipping.Application
|
|
|
|
//var result = new FileContentResult(bs, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
//var result = new FileContentResult(bs, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
var opt = App.GetOptions<TempFileOptions>().Path;
|
|
|
|
var opt = App.GetOptions<TempFileOptions>().Path;
|
|
|
|
var serverpath = Path.Combine(App.WebHostEnvironment.WebRootPath, opt);//服务器路径
|
|
|
|
var serverpath = Path.Combine(App.WebHostEnvironment.WebRootPath, opt);//服务器路径
|
|
|
|
if (!Directory.Exists(serverpath)) {
|
|
|
|
if (!Directory.Exists(serverpath))
|
|
|
|
|
|
|
|
{
|
|
|
|
Directory.CreateDirectory(serverpath);
|
|
|
|
Directory.CreateDirectory(serverpath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await File.WriteAllBytesAsync(Path.Combine(serverpath, fileName), bs);
|
|
|
|
await File.WriteAllBytesAsync(Path.Combine(serverpath, fileName), bs);
|
|
|
@ -1236,7 +1236,7 @@ namespace Myshipping.Application
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="fileName">文件名</param>
|
|
|
|
/// <param name="fileName">文件名</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("/BookingOrder/downloadPrint")]
|
|
|
|
[HttpGet("/BookingOrder/DownloadPrint")]
|
|
|
|
public IActionResult DownloadPrint(string fileName)
|
|
|
|
public IActionResult DownloadPrint(string fileName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var opt = App.GetOptions<TempFileOptions>().Path;
|
|
|
|
var opt = App.GetOptions<TempFileOptions>().Path;
|
|
|
@ -1806,6 +1806,76 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 批量编辑vgm
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="ids">业务id 逗号拼接</param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpGet("/BookingOrder/GetVmgDataList")]
|
|
|
|
|
|
|
|
public async Task<List<BatchVGM>> GetVmgDataList(string ids)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var arr = ids.Split(',');
|
|
|
|
|
|
|
|
if (arr.Length == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah("请传入正确数据");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var main = await _rep.AsQueryable().Where(x => x.ParentId == 0).ToListAsync();
|
|
|
|
|
|
|
|
List<BatchVGM> batchVGMs = new List<BatchVGM>();
|
|
|
|
|
|
|
|
foreach (var item in arr)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BatchVGM batchVGM = new BatchVGM();
|
|
|
|
|
|
|
|
batchVGM.Id = Convert.ToInt64(item);
|
|
|
|
|
|
|
|
batchVGM.MBLNO = main.Where(x => x.Id == batchVGM.Id).Select(x => x.MBLNO).FirstOrDefault();
|
|
|
|
|
|
|
|
batchVGM.ctnlist = await _repCtn.Where(x => x.BILLID == batchVGM.Id).Select(x => new BatchVGMList
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = x.Id,
|
|
|
|
|
|
|
|
CTNCODE = x.CTNCODE,
|
|
|
|
|
|
|
|
CTNALL = x.CTNALL,
|
|
|
|
|
|
|
|
CNTRNO = x.CNTRNO,
|
|
|
|
|
|
|
|
KGS = x.KGS,
|
|
|
|
|
|
|
|
TAREWEIGHT = x.TAREWEIGHT,
|
|
|
|
|
|
|
|
WEIGHTYPE = x.WEIGHTYPE,
|
|
|
|
|
|
|
|
WEIGHKGS = x.WEIGHKGS
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batchVGMs.Add(batchVGM);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return batchVGMs;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 批量保存vgm
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpPost("/BookingOrder/SaveBatchVgm")]
|
|
|
|
|
|
|
|
public async Task SaveBatchVgm(List<BatchVGMList> dto) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dto == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah("未提交数据");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in dto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _repCtn.UpdateAsync(x => x.Id==item.Id, x => new BookingCtn
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CTNCODE = item.CTNCODE,
|
|
|
|
|
|
|
|
CTNALL = item.CTNALL,
|
|
|
|
|
|
|
|
CNTRNO = item.CNTRNO,
|
|
|
|
|
|
|
|
KGS = item.KGS,
|
|
|
|
|
|
|
|
TAREWEIGHT = item.TAREWEIGHT,
|
|
|
|
|
|
|
|
WEIGHTYPE = item.WEIGHTYPE,
|
|
|
|
|
|
|
|
WEIGHKGS = item.WEIGHKGS
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 订舱、截单EDI
|
|
|
|
#region 订舱、截单EDI
|
|
|
|