|
|
|
@ -663,13 +663,13 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
var checkIds = model.bookids.Where(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)).Select(a => a.bookid).ToArray();
|
|
|
|
|
#region 主单处理
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l,r) => new { m = r, h=l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l,bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
//if (orderList.Count != model.bookids.Length)
|
|
|
|
@ -685,7 +685,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -940,14 +940,13 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
if (model.bookids.Any(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
{
|
|
|
|
|
var checkIds = model.bookids.Where(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)).Select(a => a.bookid).ToArray();
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -956,7 +955,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -1174,12 +1173,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
var checkIds = model.bookids.Where(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)).Select(a => a.bookid).ToArray();
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -1188,7 +1185,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -1397,15 +1394,13 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
if (model.bookids.Any(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
{
|
|
|
|
|
var checkIds = model.bookids.Where(a => a.MHBillType.Equals("H", StringComparison.OrdinalIgnoreCase)).Select(a => a.bookid).ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -1414,7 +1409,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -1631,12 +1626,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -1645,7 +1638,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -1653,7 +1646,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
blModel = saveRlt.Data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (blModel.IsCheckIn)
|
|
|
|
|
if (blModel.IsCheckIn || !blModel.IsChangeEndorse)
|
|
|
|
|
{
|
|
|
|
|
blModel.Status = BLIssueStatusEnum.ChangeEndorse.ToString();
|
|
|
|
|
blModel.StatusName = BLIssueStatusEnum.ChangeEndorse.GetDescription();
|
|
|
|
@ -1893,12 +1886,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -1907,7 +1898,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -1919,7 +1910,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
blModel.Status = BLIssueStatusEnum.RejectReleaeNotice.ToString();
|
|
|
|
|
blModel.StatusName = BLIssueStatusEnum.RejectReleaeNotice.GetDescription();
|
|
|
|
|
blModel.IsChangeEndorse = true;
|
|
|
|
|
//blModel.Isrej = true;
|
|
|
|
|
|
|
|
|
|
await tenantDb.Updateable<BLIssueManageBase>(blModel)
|
|
|
|
|
.UpdateColumns(x => new
|
|
|
|
@ -2042,12 +2033,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -2056,7 +2045,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -2080,8 +2069,8 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
var log = new BLIssueManageLog
|
|
|
|
|
{
|
|
|
|
|
Pid = blModel.Id,
|
|
|
|
|
ActionCode = BLIssueActionEnum.RejectReleaeNotice.ToString(),
|
|
|
|
|
ActionName = BLIssueActionEnum.RejectReleaeNotice.GetDescription(),
|
|
|
|
|
ActionCode = BLIssueActionEnum.BLModify.ToString(),
|
|
|
|
|
ActionName = BLIssueActionEnum.BLModify.GetDescription(),
|
|
|
|
|
Note = model.Notes,
|
|
|
|
|
Result = "成功",
|
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
@ -2187,12 +2176,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
#region 主单处理
|
|
|
|
|
var orderList = tenantDb.Queryable<SeaExportBillManage>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
.LeftJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.Select((l, r) => new { m = r, h = l })
|
|
|
|
|
.MergeTable()
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r) => l.h.Id == r.BookingId)
|
|
|
|
|
.Where((l, r) => checkIds.Contains(l.h.Id) && l.h.Deleted == false)
|
|
|
|
|
.Select((l, r) => new { order = l, bl = r })
|
|
|
|
|
.InnerJoin<SeaExport>((l, r) => l.BusinessId == r.Id)
|
|
|
|
|
.LeftJoin<BLIssueManageBase>((l, r, t) => l.Id == t.BookingId)
|
|
|
|
|
.Where((l, r, t) => checkIds.Contains(l.Id) && l.Deleted == false)
|
|
|
|
|
.Select((l, r, t) => new { order = r, sub = l, bl = t })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var data in orderList)
|
|
|
|
@ -2201,7 +2188,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (blModel == null || blModel.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var dto = GetReadSaveInfo(data.order.m, data.order.h);
|
|
|
|
|
var dto = GetReadSaveInfo(data.order, data.sub);
|
|
|
|
|
|
|
|
|
|
var saveRlt = await Save(dto);
|
|
|
|
|
|
|
|
|
@ -2353,7 +2340,6 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
var model = new BLIssueManageBaseInputDto
|
|
|
|
|
{
|
|
|
|
|
BookingId = order.Id,
|
|
|
|
|
BLNo = order.MBLNO,
|
|
|
|
|
CustomerId = order.CustomerId,
|
|
|
|
|
CustomerName = order.CustomerName,
|
|
|
|
@ -2375,6 +2361,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (hOrder != null && hOrder.Id > 0)
|
|
|
|
|
{
|
|
|
|
|
model.BookingId = hOrder.Id;
|
|
|
|
|
model.IssueType = hOrder.IssueType;
|
|
|
|
|
//model.IssueTypeCode = hOrder.IssueTypeCode;
|
|
|
|
|
//model.IssuePlaceCode = hOrder.IssuePlaceCode;
|
|
|
|
@ -2388,6 +2375,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
model.BookingId = order.Id;
|
|
|
|
|
model.IssueType = order.IssueType;
|
|
|
|
|
model.IssueTypeCode = order.IssueTypeCode;
|
|
|
|
|
model.IssuePlaceCode = order.IssuePlaceCode;
|
|
|
|
@ -2409,6 +2397,10 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
model.AgreementDays = (Int16)Math.Ceiling(timeDiff / (24 * 60m));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
model.UpdateBy = long.Parse(user.UserId);
|
|
|
|
|
model.UpdateUserName = user.UserName;
|
|
|
|
|
model.UpdateTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
return model;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|