|
|
|
@ -368,7 +368,7 @@ namespace Myshipping.Application
|
|
|
|
|
var groupList = input.ctnInputs.Where(x => x.CTNNUM > 0).GroupBy(c => c.CTNALL).Select(g => $"{g.Key}*{g.Sum(gg => gg.CTNNUM)}");
|
|
|
|
|
input.CNTRTOTAL = string.Join(" / ", groupList);
|
|
|
|
|
}
|
|
|
|
|
var et = await _rep.Where(x => x.MBLNO == input.MBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0).FirstAsync();
|
|
|
|
|
var et = await _rep.Where(x => x.MBLNO == input.MBLNO && x.TenantId == UserManager.TENANT_ID && x.HBLNO == input.HBLNO&&x.ParentId==input.ParentId).FirstAsync();
|
|
|
|
|
if (et != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -483,7 +483,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
var main = await _rep.AsQueryable().Where(x => x.Id == input.Id).FirstAsync();
|
|
|
|
|
|
|
|
|
|
var et = await _rep.Where(x => x.MBLNO == input.MBLNO && x.TenantId == UserManager.TENANT_ID && x.Id != input.Id && x.ParentId == 0).FirstAsync();
|
|
|
|
|
var et = await _rep.Where(x => x.MBLNO == input.MBLNO && x.TenantId == UserManager.TENANT_ID && x.HBLNO == input.HBLNO && x.ParentId == input.ParentId&&x.Id!=input.Id).FirstAsync();
|
|
|
|
|
if (et != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -1644,7 +1644,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileName">文件名</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingOrder/DownloadPrint")]
|
|
|
|
|
[HttpGet("/BookingOrder/DownloadPrint"), AllowAnonymous]
|
|
|
|
|
public IActionResult DownloadPrint(string fileName)
|
|
|
|
|
{
|
|
|
|
|
var opt = App.GetOptions<TempFileOptions>().Path;
|
|
|
|
@ -3462,6 +3462,67 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
[HttpGet("/BookingOrder/test")]
|
|
|
|
|
public void test() {
|
|
|
|
|
|
|
|
|
|
var opt = App.GetOptions<TempFileOptions>();
|
|
|
|
|
var dirAbs = opt.Path;
|
|
|
|
|
var RemainHours = Convert.ToDouble(opt.RemainHours);
|
|
|
|
|
var fileFullPath = Path.Combine(App.WebHostEnvironment.WebRootPath, dirAbs);
|
|
|
|
|
string[] Files = Directory.GetFiles(fileFullPath); //当前目录下的文件:
|
|
|
|
|
foreach (string it in Files)
|
|
|
|
|
{
|
|
|
|
|
FileInfo fi = new FileInfo(it);
|
|
|
|
|
var date = fi.CreationTime.AddHours(RemainHours);
|
|
|
|
|
if (date < DateTime.Now)
|
|
|
|
|
{
|
|
|
|
|
File.Delete(it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
string[] _Files = Directory.GetDirectories(fileFullPath); //当前目录下的文件夹:
|
|
|
|
|
if (_Files.Length>0) {
|
|
|
|
|
foreach (string it in _Files)
|
|
|
|
|
{
|
|
|
|
|
//FileInfo fi = new FileInfo(it);
|
|
|
|
|
//var date = fi.CreationTime.AddHours(RemainHours);
|
|
|
|
|
//if (date < DateTime.Now)
|
|
|
|
|
//{
|
|
|
|
|
// File.Delete(it);
|
|
|
|
|
//}
|
|
|
|
|
test1( it);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public void test1(string path) {
|
|
|
|
|
var opt = App.GetOptions<TempFileOptions>();
|
|
|
|
|
var RemainHours = Convert.ToDouble(opt.RemainHours);
|
|
|
|
|
string[] Files = Directory.GetFiles(path); //当前目录下的文件:
|
|
|
|
|
foreach (string it in Files)
|
|
|
|
|
{
|
|
|
|
|
FileInfo fi = new FileInfo(it);
|
|
|
|
|
var date = fi.CreationTime.AddHours(RemainHours);
|
|
|
|
|
if (date < DateTime.Now)
|
|
|
|
|
{
|
|
|
|
|
File.Delete(it);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
string[] _Files = Directory.GetDirectories(path); //当前目录下的文件夹:
|
|
|
|
|
if (_Files.Length>0) {
|
|
|
|
|
foreach (string it in _Files)
|
|
|
|
|
{
|
|
|
|
|
test1(it);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|