|
|
|
@ -33,6 +33,8 @@ using DS.Module.Core.Data;
|
|
|
|
|
using Masuit.Tools.Models;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using DS.Module.DjyServiceStatus;
|
|
|
|
|
using DS.WMS.Core.Invoice.Dtos;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
@ -62,6 +64,59 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
_djyServiceStatusService = _serviceProvider.GetRequiredService<IDjyServiceStatusService>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新手动更新海运出口派车报关标识
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="code"></param>
|
|
|
|
|
/// <param name="type">类型 true 勾选保存 false 勾选取消</param>
|
|
|
|
|
public async void UpdateSeaExportTag(long id,string code,bool type = true) {
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var order = tenantDb.Queryable<SeaExport>().Filter(null, true).First(x => x.Id == id);
|
|
|
|
|
var oldOrder = order.Adapt<SeaExport>();
|
|
|
|
|
|
|
|
|
|
if (type)
|
|
|
|
|
{
|
|
|
|
|
if (code == "YPC")
|
|
|
|
|
{
|
|
|
|
|
order.IsLand = true;
|
|
|
|
|
}
|
|
|
|
|
if (code == "BG")
|
|
|
|
|
{
|
|
|
|
|
order.IsCustoms = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (code == "YPC")
|
|
|
|
|
{
|
|
|
|
|
order.IsLand = false;
|
|
|
|
|
}
|
|
|
|
|
if (code == "BG")
|
|
|
|
|
{
|
|
|
|
|
order.IsCustoms = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//order.Note = "更新主单货物状态";
|
|
|
|
|
await tenantDb.Updateable(order)
|
|
|
|
|
.UpdateColumnsIF(code == "YPC", x => new { x.IsLand })
|
|
|
|
|
.UpdateColumnsIF(code == "BG", x => new { x.IsCustoms })
|
|
|
|
|
.EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
// 记录日志
|
|
|
|
|
await SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
|
{
|
|
|
|
|
OperateType = "Update",
|
|
|
|
|
OldOrder = oldOrder,
|
|
|
|
|
NewOrder = order,
|
|
|
|
|
SourceCode = "UpdateSeaExportTag",
|
|
|
|
|
SourceName = "手动更新海运出口标识",
|
|
|
|
|
}, tenantDb);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 海运出口差异日志
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 忽略的字段
|
|
|
|
@ -1001,13 +1056,20 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
var oldOrder = order.Adapt<SeaExport>();
|
|
|
|
|
order.BusinessStatusName = status.StatusName;
|
|
|
|
|
order.BusinessStatus = status.SystemCode;
|
|
|
|
|
order.IsVGM = status.SystemCode == "YFVGM" ? true : false;
|
|
|
|
|
order.IsBooking = status.SystemCode == "YFCD" ? true : false;
|
|
|
|
|
|
|
|
|
|
if (status.SystemCode == "YPC")
|
|
|
|
|
order.IsLand = true;
|
|
|
|
|
if(status.SystemCode == "BG")
|
|
|
|
|
order.IsCustoms = true;
|
|
|
|
|
if (status.SystemCode == "YFVGM")
|
|
|
|
|
order.IsVGM = true;
|
|
|
|
|
if (status.SystemCode == "YFCD")
|
|
|
|
|
order.IsBooking = true;
|
|
|
|
|
//order.Note = "更新主单货物状态";
|
|
|
|
|
await tenantDb.Updateable(order).UpdateColumns(x => new { x.BusinessStatusName, x.BusinessStatus })
|
|
|
|
|
.UpdateColumnsIF(status.SystemCode == "YFVGM", x => new { x.IsVGM })
|
|
|
|
|
.UpdateColumnsIF(status.SystemCode == "YFCD", x => new { x.IsBooking })
|
|
|
|
|
.UpdateColumnsIF(status.SystemCode == "YPC", x => new { x.IsLand })
|
|
|
|
|
.UpdateColumnsIF(status.SystemCode == "BG", x => new { x.IsCustoms })
|
|
|
|
|
.EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
// 记录日志
|
|
|
|
|
await SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
|