using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Helpers;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Map.Entity;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace DS.WMS.Core.Op.Method
{
///
/// 海运出口下货纸相关接口
///
public partial class SeaExportService
{
#region 下货纸
///
/// 发送下货纸
///
/// 业务id
///
public async Task SendXHZ(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var bookingId = long.Parse(id);
var rtn = await seaComService.XHZSend(bookingId, "9");
if (!rtn.Succeeded)
{
return await Task.FromResult(DataResult.Failed($"发送失败:{rtn.Message}"));
}
////订舱状态
await seaComService.SaveBookingStatus(bookingId, "sta_xhz", "下货纸");
//设置货物状态:已发下货纸,并回传东胜
await seaComService.SetGoodsStatus("YFXHZ", bookingId, tenantDb);
//await SendBookingOrder(new long[] { bookingId });
return await Task.FromResult(DataResult.Successed("发送成功!"));
}
#endregion
}
}