wanghaomei 8 months ago
commit 5dfbdaa739

@ -338,6 +338,19 @@ namespace Myshipping.Application
[SugarColumn(ColumnName = "SLOT_SOURCE")]
[Description("舱位来源 EMAIL-邮件导入 MANUAL-手工")]
public string SLOT_SOURCE{ get; set; }
/// <summary>
/// 是否Cancellation
/// </summary>
[SugarColumn(ColumnName = "IS_CANCELLATION")]
[Description("是否Cancellation")]
public bool IS_CANCELLATION { get; set; }
/// <summary>
/// Cancellation时间
/// </summary>
[SugarColumn(ColumnName = "CANCELLATION_DATE")]
[Description("Cancellation时间")]
public DateTime? CANCELLATION_DATE { get; set; }
}
}

@ -10,10 +10,10 @@ using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 任务目的港未提货未返箱
/// 任务格式单
/// </summary>
[SugarTable("task_pod_discharge_gateout_full")]
[Description("任务目的港未提货未返箱")]
[SugarTable("task_draft_info")]
[Description("任务格式单")]
public class TaskDraftInfo : TaskManageDbEntity
{
/// <summary>

@ -43,6 +43,16 @@ namespace Myshipping.Application
[Description("Booking Cancellation Notice")]
BC_CANCEL_NOTICE,
/// <summary>
/// Booking Cancellation
/// </summary>
[Description("Draft")]
DRAFT,
/// <summary>
/// Booking Cancellation Notice
/// </summary>
[Description("Draft Notice")]
DRAFT_NOTICE,
/// <summary>
/// 空
/// </summary>
[Description("NONE")]

@ -54,6 +54,7 @@ namespace Myshipping.Application.Event
var baseList = await _repBase.AsQueryable().Filter(null, true)
.Where(x => !x.IsDeleted
&& !x.IS_CANCELLATION
&& x.VESSEL == paraObj.VESSEL
&& x.VOYNO == paraObj.VOYNO
&& x.CONTRACT_NO == paraObj.CONTRACT_NO

@ -990,17 +990,23 @@ namespace Myshipping.Application.Service.BookingOrder
//菜单375504048771141=我的任务台账
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
if (userlist == null)
userlist = new List<long> { UserManager.UserId };
bool isAdmin = false;
if (userlist.Count > 0)
if(userlist == null)
{
isAdmin = true;
userlist = new List<long>();
}
else if (userlist != null && userlist.Count > 0)
{
userlist.Add(UserManager.UserId);
userlist = userlist.Distinct().ToList();
}
_logger.LogInformation("任务台账权限范围 {list}", userlist);
var entities = await _bookingDeliveryRecordRep.AsQueryable()
.Where(t => userlist.Contains(t.CreatedUserId.Value))
.Where(t => isAdmin || userlist.Contains(t.CreatedUserId.Value))
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
.WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd)
.WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)
@ -1296,6 +1302,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="ids">马士基API订舱ID组</param>
/// <returns>返回执行结果消息</returns>
[HttpPost("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchSend(long[] ids)
{
var list = await _bookingDeliveryRecordRep.AsQueryable()
@ -1316,6 +1323,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="id">马士基API订舱ID</param>
/// <param name="copyNum">需要复制生成记录</param>
/// <returns>返回执行结果消息</returns>
[HttpGet("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchCopy(long id, int copyNum)
{

@ -145,7 +145,7 @@ namespace Myshipping.Application
private readonly IServiceWorkFlowManageService _serviceWorkFlowManageService;
private readonly IDjyUserConfigService _djyUserConfigService;
private readonly IBookingSlotService bookingSlotService;
private readonly IBookingValueAddedService bookingValueAddedService;
private readonly IEventPublisher _publisher;
private readonly SqlSugarRepository<DjyTenantParamValue> _repTenantParamValue;
@ -177,7 +177,7 @@ namespace Myshipping.Application
ISysOrgService orgService, SqlSugarRepository<BookingLineOpMgrConfig> repLineOpMgrConfig, SqlSugarRepository<SysEmp> repSysEmp, SqlSugarRepository<BookingAutoYardImport> repAutoYard,
IServiceWorkFlowManageService serviceWorkFlowManageService, IDjyUserConfigService djyUserConfigService, IEventPublisher publisher, SqlSugarRepository<BookingSlotBase> repSlotBase,
SqlSugarRepository<BookingSlotAllocation> repSlotAllocation, SqlSugarRepository<BookingSlotAllocationCtn> repSlotAllocationCtn, IBookingSlotService bookingSlotService,
SqlSugarRepository<BookingGoodsStatusSubscribe> repBookingStatusSubscribe, SqlSugarRepository<DjyTenantParamValue> repTenantParamValue)
SqlSugarRepository<BookingGoodsStatusSubscribe> repBookingStatusSubscribe, SqlSugarRepository<DjyTenantParamValue> repTenantParamValue, IBookingValueAddedService bookingValueAddedService)
{
this._logger = logger;
this._rep = rep;
@ -231,6 +231,7 @@ namespace Myshipping.Application
this.bookingSlotService = bookingSlotService;
_repBookingStatusSubscribe = repBookingStatusSubscribe;
_repTenantParamValue = repTenantParamValue;
this.bookingValueAddedService = bookingValueAddedService;
}
#region 主表和箱信息
@ -11910,11 +11911,9 @@ namespace Myshipping.Application
}
}
}
#endregion
#region BC
/// <summary>
/// 接收BC信息更新订舱
/// </summary>
@ -12004,5 +12003,224 @@ namespace Myshipping.Application
CustomerBookingSyncHelper.SendCustomerBookingSync((long)id, BookingOrderSyncTypeEnum.BC.ToString());
}
}
#endregion
#region 电放
/// <summary>
/// 船司电放提交
/// </summary>
/// <param name="ids">订舱主键数组</param>
/// <returns>每单的处理提交结果</returns>
[HttpPost("/BookingOrder/SubmitTelex")]
public async Task<List<SubmitTelexResultDto>> SubmitTelex([FromBody] long[] ids)
{
var orderList = await _rep.AsQueryable().Where(x => ids.Contains(x.Id)).ToListAsync();
if (orderList.Count == 0)
{
throw Oops.Bah("未找到相应订舱");
}
var allSysConfig = _cache.GetAllSysConfig().Result;
var url = allSysConfig.FirstOrDefault(x => x.Code == "TelexServiceUrl")?.Value;
var key = allSysConfig.FirstOrDefault(x => x.Code == "TelexServiceKey")?.Value;
var secret = allSysConfig.FirstOrDefault(x => x.Code == "TelexServiceSecret")?.Value;
if (string.IsNullOrWhiteSpace(url))
{
throw Oops.Bah("大简云电放服务接口地址未配置,请联系管理员");
}
if (string.IsNullOrWhiteSpace(key))
{
throw Oops.Bah("大简云电放服务接口Key未配置请联系管理员");
}
if (string.IsNullOrWhiteSpace(secret))
{
throw Oops.Bah("大简云电放服务接口Secret未配置请联系管理员");
}
var webAccount = _webAccountConfig.GetAccountConfig("MSKWeb", UserManager.UserId).Result;
if (webAccount == null)
{
throw Oops.Bah("未配置网站账户类型MSKWeb");
}
var mappingCarrier = _cache.GetAllMappingCarrier().Result;
var mappingIssueType = _cache.GetAllMappingIssueType().Result;
List<SubmitTelexResultDto> result = new();
List<(long Id, string MBLNO, string CarrierId)> pushList = new();
foreach (var order in orderList)
{
try
{
if (string.IsNullOrWhiteSpace(order.MBLNO))
{
result.Add(new SubmitTelexResultDto(order.MBLNO, false, "提单号为空"));
continue;
}
if (string.IsNullOrWhiteSpace(order.ISSUETYPE))
{
result.Add(new SubmitTelexResultDto(order.MBLNO, false, "签单方式为空"));
continue;
}
if (string.IsNullOrWhiteSpace(order.CARRIERID))
{
result.Add(new SubmitTelexResultDto(order.MBLNO, false, "船公司为空"));
continue;
}
// 判断船公司是否符合条件
string carrierId = mappingCarrier.FirstOrDefault(x => x.Module == "TelexCheck" && x.Code == order.CARRIERID)?.MapCode;
carrierId = (carrierId ?? order.CARRIERID).ToUpper();
if (carrierId != "MSK")
{
result.Add(new SubmitTelexResultDto(order.MBLNO, false, $"[{order.CARRIER}]船公司此功能待开发"));
continue;
}
// 判断签单方式是否符合条件
string issueType = mappingIssueType.FirstOrDefault(x => x.Module == "TelexCheck" && x.Code == order.ISSUETYPE)?.MapCode;
issueType = issueType ?? order.ISSUETYPE;
if (!issueType.Equals("telex", StringComparison.OrdinalIgnoreCase))
{
result.Add(new SubmitTelexResultDto(order.MBLNO, false, $"签单方式非电放"));
continue;
}
pushList.Add((order.Id, order.MBLNO, carrierId));
}
catch (Exception ex)
{
_logger.LogError("请求电放条件判断的过程中发生未知异常mblno={mblno}, ex={ex}", order.MBLNO, ex);
result.Add(new SubmitTelexResultDto(order.MBLNO, false, $"提交错误:{ex.Message}"));
continue;
}
}
if (pushList.Count == 0)
{
return result;
}
if (ids.Length > 1)
{
url += "/v1/tasks";
var mblnos = string.Concat(',', pushList.Select(x => x.MBLNO));
try
{
// 提交电放
var data = pushList.Select(x => new
{
web_code = x.CarrierId,
web_user = webAccount.Account,
web_psw = webAccount.Password,
bno = x.MBLNO,
email = UserManager.Email
});
var body = new
{
user_key = key,
user_secret = secret,
data = data
};
_logger.LogInformation("请求电放提交接口开始mblnos={mblnos}, url={url}, body={body}", mblnos, url, body);
var rtn = await url.SetBody(body).PostAsStringAsync();
_logger.LogInformation("请求电放提交接口结束rtn={rtn}", rtn);
var jsonRtn = JObject.Parse(rtn);
if (jsonRtn.GetIntValue("code") == 200)
{
_logger.LogInformation("请求电放提交接口成功mblnos={mblnos}", mblnos);
foreach (var item in pushList)
{
// 推送 电放已安排 状态
var pushModel = new ModifyServiceProjectStatusDto
{
BookingId = item.Id,
SourceType = TrackingSourceTypeEnum.MANUAL,
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
new ModifyServiceProjectStatusDetailDto { StatusCode = "DFYAP" } }
};
var saveStatusRlt = await bookingValueAddedService.SaveServiceStatus(pushModel);
_logger.LogInformation("请求电放提交接口成功后推送 电放已安排 状态mblno={mblno}JSON={json} ,结果={rlt}",
item.MBLNO, JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
result.Add(new SubmitTelexResultDto(item.MBLNO, true, null));
}
}
else
{
var msg = jsonRtn.GetStringValue("msg")?.Replace("爬虫", "");
_logger.LogInformation("请求电放提交接口失败mblnos={mblnos}, 电放服务返回:{msg}", mblnos, msg);
result.AddRange(pushList.Select(x => new SubmitTelexResultDto(x.MBLNO, false, $"电放服务返回:{msg}")));
}
}
catch (Exception ex)
{
_logger.LogError("请求电放服务的过程中发生未知异常mblnos={mblnos}, ex={ex}", mblnos, ex);
result.AddRange(pushList.Select(x => new SubmitTelexResultDto(x.MBLNO, false, $"错误:{ex.Message}")));
}
}
else
{
url += "/v1/submit";
var order = pushList[0];
try
{
// 提交电放
var body = new
{
user_key = key,
user_secret = secret,
web_user = webAccount.Account,
web_psw = webAccount.Password,
web_code = order.CarrierId,
bno = order.MBLNO
};
_logger.LogInformation("请求电放提交接口开始mblno={mblno}, url={url}, body={body}", order.MBLNO, url, body);
var rtn = await url.SetBody(body).PostAsStringAsync();
_logger.LogInformation("请求电放提交接口结束mblno={mblno}, rtn={rtn}", order.MBLNO, rtn);
var jsonRtn = JObject.Parse(rtn);
if (jsonRtn.GetIntValue("code") == 200)
{
_logger.LogInformation("请求电放提交接口成功mblno={mblno}", order.MBLNO);
// 推送 电放已安排 状态
var pushModel = new ModifyServiceProjectStatusDto
{
BookingId = order.Id,
SourceType = TrackingSourceTypeEnum.MANUAL,
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
new ModifyServiceProjectStatusDetailDto { StatusCode = "DFYAP" } }
};
var saveStatusRlt = await bookingValueAddedService.SaveServiceStatus(pushModel);
_logger.LogInformation("请求电放提交接口成功后推送 电放已安排 状态JSON={json} ,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
result.Add(new SubmitTelexResultDto(order.MBLNO, true, null));
}
else
{
var msg = jsonRtn.GetStringValue("msg")?.Replace("爬虫", "");
_logger.LogInformation("请求电放提交接口失败mblno={mblno}, 电放服务返回:{msg}", order.MBLNO, msg);
result.Add(new SubmitTelexResultDto(order.MBLNO, false, $"电放服务返回:{msg}"));
}
}
catch (Exception ex)
{
_logger.LogError("请求电放服务的过程中发生未知异常mblno={mblno}, ex={ex}", order.MBLNO, ex);
result.Add(new SubmitTelexResultDto(order.MBLNO, false, $"错误:{ex.Message}"));
}
}
return result;
}
#endregion
}
}

@ -0,0 +1,22 @@
namespace Myshipping.Application.Service.BookingOrder.Dto
{
public class SubmitTelexResultDto
{
public SubmitTelexResultDto(string mBLNO, bool isSuccess, string failReason)
{
MBLNO = mBLNO;
IsSuccess = isSuccess;
FailReason = failReason;
}
/// <summary>
/// 提单号
/// </summary>
public string MBLNO { get; set; }
public bool IsSuccess { get; set; }
/// <summary>
/// 失败原因
/// </summary>
public string FailReason { get; set; }
}
}

@ -264,7 +264,7 @@ namespace Myshipping.Application
result.msg = "成功";
result.ext = id;
}
catch(Exception ex)
catch (Exception ex)
{
result.succ = false;
result.msg = $"失败,原因:{ex.Message}";
@ -287,7 +287,7 @@ namespace Myshipping.Application
long id = 0;
//接口方法直接调用save、delete等方法会报错可能因为非token授权登录导致故重写一遍保存、删除代码
if (dto.OpType == "add" || dto.OpType == "update" || dto.OpType == "del")
if (dto.OpType == "add" || dto.OpType == "update" || dto.OpType == "del" || dto.OpType == "cancellation")
{
//翻译船公司
if (!string.IsNullOrWhiteSpace(dto.DataObj.CARRIERID) && string.IsNullOrWhiteSpace(dto.DataObj.CARRIER))
@ -297,7 +297,7 @@ namespace Myshipping.Application
|| t.EnName.Equals(dto.DataObj.CARRIERID, StringComparison.OrdinalIgnoreCase)
|| t.CnName.Equals(dto.DataObj.CARRIERID, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
if(carrierInfo != null)
if (carrierInfo != null)
{
dto.DataObj.CARRIER = carrierInfo.CnName?.Trim();
}
@ -311,7 +311,7 @@ namespace Myshipping.Application
dto.DataObj.CtnList.ForEach(t =>
{
if(!string.IsNullOrWhiteSpace(t.CTNALL) && string.IsNullOrWhiteSpace(t.CTNCODE))
if (!string.IsNullOrWhiteSpace(t.CTNALL) && string.IsNullOrWhiteSpace(t.CTNCODE))
{
var ctnCode = ctnCodeList.FirstOrDefault(a => !string.IsNullOrWhiteSpace(a.Name) &&
a.Name.Equals(t.CTNALL, StringComparison.OrdinalIgnoreCase));
@ -399,13 +399,17 @@ namespace Myshipping.Application
.Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID
&& x.SLOT_ID == model.Id).ToList();
if(ctnList != null)
if (ctnList != null)
{
bcSrcDto.CtnList = ctnList.GroupBy(x => x.CTNALL)
.Select(x =>
{
return new TaskBCCTNInfoDto { CtnALL = x.Key, CTNNUM = x.ToList()
.Sum(a => a.CTNNUM) };
return new TaskBCCTNInfoDto
{
CtnALL = x.Key,
CTNNUM = x.ToList()
.Sum(a => a.CTNNUM)
};
}).ToList();
}
@ -473,7 +477,7 @@ namespace Myshipping.Application
}
//一般更新数据指的是Booking Amendment,需要与舱位进行数据比对
await PushCompareBCInfo(bcSrcDto, bcTargetDto,id, dto.BatchNo);
await PushCompareBCInfo(bcSrcDto, bcTargetDto, id, dto.BatchNo);
}
else if (dto.OpType == "del")
{
@ -498,6 +502,43 @@ namespace Myshipping.Application
await InsLog("Del", model.Id, "取消舱位");
}
else if (dto.OpType == "cancellation")
{
// 更新标志
var slotNO = dto.DataObj.SLOT_BOOKING_NO;
model = await _repBase.AsQueryable().Filter(null, true).FirstAsync(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID && x.SLOT_BOOKING_NO == slotNO);
if (model == null)
{
throw Oops.Bah($"未找到订舱编号为 {slotNO} 的数据");
}
id = model.Id;
model.IS_CANCELLATION = true;
model.CANCELLATION_DATE = DateTime.Now;
await _repBase.UpdateAsync(model);
// 删除该舱位相关的订舱关联关系
var slotList = await _repAllocation.AsQueryable().Where(a => a.BOOKING_SLOT_ID == id).ToListAsync();
var slotIdList = slotList.Select(s => s.Id);
await _repAllocation.Context.Updateable<BookingSlotAllocation>()
.SetColumns(a => a.IsDeleted == true)
.SetColumns(a => a.UpdatedTime == DateTime.Now)
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
.SetColumns(a => a.UpdatedUserName == UserManager.Name)
.Where(a => slotIdList.Contains(a.Id))
.ExecuteCommandAsync();
await _repAllocationCtn.Context.Updateable<BookingSlotAllocationCtn>()
.SetColumns(a => a.IsDeleted == true)
.SetColumns(a => a.UpdatedTime == DateTime.Now)
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
.SetColumns(a => a.UpdatedUserName == UserManager.Name)
.Where(a => slotIdList.Contains(a.SLOT_ALLOC_ID))
.ExecuteCommandAsync();
await InsLog("Cancellation", model.Id, "取消舱位");
}
//更新库存
await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", new BookingSlotStockUpdateModel
@ -699,6 +740,7 @@ namespace Myshipping.Application
// 1. 【舱位基础表】与【箱子表】做关联并根据【舱位主键】、【箱型】做分组统计出【总的箱量】作为queryable1
var queryable1 = _repBase.Context.Queryable<BookingSlotBase, BookingSlotCtn>((bas, ctn) => bas.Id == ctn.SLOT_ID)
.Where(bas => bas.IS_CANCELLATION == false)
.WhereIF(!string.IsNullOrEmpty(slotInput.PORTLOAD), bas => bas.PORTLOAD.Contains(slotInput.PORTLOAD))
.WhereIF(!string.IsNullOrEmpty(slotInput.PORTDISCHARGE), bas => bas.PORTLOAD.Contains(slotInput.PORTLOAD))
.WhereIF(!string.IsNullOrEmpty(slotInput.VESSEL), bas => bas.VESSEL.Contains(slotInput.VESSEL))
@ -1000,7 +1042,7 @@ namespace Myshipping.Application
/// <param name="slotId">舱位主键</param>
/// <param name="reqBatchNo">请求批次号用来区分对应的哪个批次任务</param>
/// <returns></returns>
private async Task PushCompareBCInfo(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto,long slotId,string reqBatchNo)
private async Task PushCompareBCInfo(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto, long slotId, string reqBatchNo)
{
string batchNo = IDGen.NextID().ToString();
@ -1023,7 +1065,7 @@ namespace Myshipping.Application
{
SLOT_ID = slotId,
COMPARE_BATCHNO = reqBatchNo,
COMPARE_DIFF_NUM = compareResult.extra.IsExistsDiff? compareResult.extra.ShowDetailList.Count : 0,
COMPARE_DIFF_NUM = compareResult.extra.IsExistsDiff ? compareResult.extra.ShowDetailList.Count : 0,
CreatedTime = nowDate,
UpdatedTime = nowDate,
CreatedUserId = UserManager.UserId,
@ -1113,8 +1155,8 @@ namespace Myshipping.Application
[HttpGet("/BookingSlot/GetSlotCompareResult")]
public async Task<List<CompareResultDetailInfo>> GetSlotCompareResult([FromQuery] long id, [FromQuery] string batchNo)
{
var compareInfo = await _bookingSlotCompareRepository.AsQueryable()
.FirstAsync(t => t.SLOT_ID == id && t.COMPARE_BATCHNO == batchNo);
var compareInfo = await _bookingSlotCompareRepository.AsQueryable()
.FirstAsync(t => t.SLOT_ID == id && t.COMPARE_BATCHNO == batchNo);
if (compareInfo == null)
{
@ -1150,7 +1192,7 @@ namespace Myshipping.Application
result.succ = true;
result.msg = "导入成功";
}
catch(Exception ex)
catch (Exception ex)
{
_logger.LogError($"导入舱位异常,原因:{ex.Message}");
@ -1182,7 +1224,7 @@ namespace Myshipping.Application
throw Oops.Oh($"舱位信息不存在或已作废");
// 判断是否已存在引用关系
if (_repAllocation.IsExists(a => a.BOOKING_SLOT_ID == slotInfo.Id
if (_repAllocation.IsExists(a => a.BOOKING_SLOT_ID == slotInfo.Id
&& a.BOOKING_ID > 0 && a.IsDeleted == false))
{
throw Oops.Oh($"舱位已有对应的订舱订单,不能重复执行");
@ -1213,7 +1255,7 @@ namespace Myshipping.Application
/// <param name="bookingSlotFileList">舱位附件列表</param>
/// <param name="generateModel">订舱请求详情</param>
/// <returns>返回订舱ID</returns>
private async Task<long> GenerateBookingOrder(BookingSlotBase bookingSlotBase, List<BookingSlotCtn> bookingSlotCtnList,
private async Task<long> GenerateBookingOrder(BookingSlotBase bookingSlotBase, List<BookingSlotCtn> bookingSlotCtnList,
List<BookingFile> bookingSlotFileList,
BookingGenerateDto generateModel)
{
@ -1437,7 +1479,7 @@ namespace Myshipping.Application
/// 文件名称
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 文件二进制流
/// </summary>

@ -311,7 +311,17 @@ namespace Myshipping.Application.Service.BookingSlot.Dto
[Description("舱单截止时间")]
public DateTime? MANIFEST_CUT_DATE { get; set; }
/// <summary>
/// 是否Cancellation
/// </summary>
[Description("是否Cancellation")]
public bool IS_CANCELLATION { get; set; }
/// <summary>
/// Cancellation时间
/// </summary>
[Description("Cancellation时间")]
public DateTime? CANCELLATION_DATE { get; set; }
}
/// <summary>

@ -134,6 +134,26 @@ namespace Myshipping.Application
/// </summary>
public string ThirdPayAddr { get; set; }
/// <summary>
/// 截单上传时间
/// </summary>
public string SubmittedDate { get; set; }
/// <summary>
/// 签单方式(seaway、original、telex)
/// </summary>
public string DocumentType { get; set; }
/// <summary>
/// 提单份数
/// </summary>
public string BillOfNum { get; set; }
/// <summary>
/// 放单方式
/// </summary>
public string ReleaseInstruction { get; set; }
/// <summary>
/// 箱信息
/// </summary>

@ -170,6 +170,10 @@ namespace Myshipping.Application
var shipList = _taskRollingNominationShipInfoRepository.AsQueryable()
.Where(a => a.NOM_ID == rollModel.PK_ID && a.GROUP_INDX == 1 && !a.IsDeleted).ToList();
if(shipList.Count == 0)
shipList = _taskRollingNominationShipInfoRepository.AsQueryable()
.Where(a => a.NOM_ID == rollModel.PK_ID && a.GROUP_INDX == 0 && !a.IsDeleted).ToList();
var fromEntity = shipList.FirstOrDefault(a =>
a.SHIP_TYPE.Equals("From", StringComparison.OrdinalIgnoreCase));

@ -417,6 +417,12 @@ namespace Myshipping.Application
fileCategory = TaskFileCategoryEnum.BC_CANCEL.ToString();
}
else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE)
{
attachFileType = "draftfiles";
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
}
var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName);
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
@ -466,6 +472,12 @@ namespace Myshipping.Application
fileCategory = TaskFileCategoryEnum.BC_CANCEL_NOTICE.ToString();
}
else if (TaskBaseTypeEnum.DRAFT.ToString() == taskInfo.TASK_BASE_TYPE)
{
attachFileType = "draftnoticefiles";
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
}
var noExtensionFileName = Path.GetFileNameWithoutExtension(modifyFile.FileName);
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
@ -1290,7 +1302,7 @@ namespace Myshipping.Application
#endregion
#region 任务目的港未提货/任务目的港提货未返空
if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL)
if (info.Main.TaskType == TaskBaseTypeEnum.POD_DISCHARGE_FULL || info.Main.TaskType == TaskBaseTypeEnum.POD_GATEOUT_FULL)
{
TaskPODDischargeGateoutFullInfo dischargeGateout = info.Main.PODDischargeGateoutFull.Adapt<TaskPODDischargeGateoutFullInfo>();

@ -3,8 +3,10 @@
"DefaultDbNumber": "0",
"DefaultDbType": "MySql",
//
//
"DefaultDbString": "Data Source=60.209.125.238;Database=booking_hechuan_dev;User ID=root;Password=Djy@Mysql.test;pooling=true;port=32006;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
//
//"DefaultDbString": "Data Source=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=booking_data;User ID=rulesengine_admin;Password=Rule1qaz2wsx!QAZ;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
// -
//"DefaultDbString": "Data Source=60.209.125.238;Database=booking_customer_test;User ID=root;Password=Djy@Mysql.test;pooling=true;port=32006;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
@ -12,9 +14,9 @@
//"DefaultDbString": "Data Source=60.209.125.238;Database=booking_djy_test;User ID=root;Password=Djy@Mysql.test;pooling=true;port=32006;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
// -
//"DefaultDbString": "Data Source=47.104.222.4;Database=booking_customer;User ID=root;Password=d0pC?Vhxq!Aj5g29H-TZ=M74rX38~]Jw;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
//"DefaultDbString": "Data Source=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=booking_customer;User ID=rulesengine_admin;Password=Rule1qaz2wsx!QAZ;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
// -
//"DefaultDbString": "Data Source=47.104.222.4;Database=booking_djy;User ID=root;Password=d0pC?Vhxq!Aj5g29H-TZ=M74rX38~]Jw;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
//"DefaultDbString": "Data Source=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=booking_djy;User ID=rulesengine_admin;Password=Rule1qaz2wsx!QAZ;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
"DbConfigs": [
{
@ -25,7 +27,8 @@
{
"DbNumber": "common",
"DbType": "SqlServer",
"DbString": "Server=60.209.125.238,32009;Database=DevCommonDB;User=sa;Password=Djy@Sql2022.test;MultipleActiveResultSets=True;"
"DbString": "Server=60.209.125.238,32009;Database=DevCommonDB;User=sa;Password=Djy@Sql2022.test;MultipleActiveResultSets=True;",
//"DbString": "Server=47.104.73.97,6762;Database=CommonDB;User=sa;Password=QDdjy#2020*;MultipleActiveResultSets=True;"
},
{
"DbNumber": "pingtai",

Loading…
Cancel
Save