zhangxiaofeng 7 months ago
commit f06cee5f6e

@ -63,9 +63,10 @@ namespace Myshipping.Application.EDI
DjyCustomerContact custContact = null;
var postModel = new ZhongYuanSoApiModel();
JObject extObj = null;
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
var extObj = JObject.Parse(custOrder.ExtendData);
extObj = JObject.Parse(custOrder.ExtendData);
postModel.webAccount = extObj.GetStringValue("Account");
postModel.webPassword = extObj.GetStringValue("Password");
}
@ -357,9 +358,18 @@ namespace Myshipping.Application.EDI
//大简云客户订舱接收BC邮箱
var djyBookMail = sysConfigList.FirstOrDefault(x => x.Code == "DjyCustomerBookReceiveBcMail");
var bcMail = custContact.Email;
if (extObj != null) //优先使用东胜上传的邮箱
{
var opMail = extObj.GetStringValue("OpMail");
if (!string.IsNullOrEmpty(opMail))
{
bcMail = opMail;
}
}
if (djyBookMail != null)
{
bcMail += djyBookMail.Value;
bcMail += ";" + djyBookMail.Value;
}
postModel.special = new ZhongYuanSoApiSpecial()

@ -0,0 +1,74 @@
using Myshipping.Core.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 业务比对差异记录表
/// </summary>
[SugarTable("business_compare_diff_record", TableDescription = "业务比对差异记录表")]
public class BusinessCompareDiffRecord : DBEntityTenant
{
/// <summary>
/// 业务主键
/// </summary>
[SugarColumn(ColumnName = "BUSI_ID")]
[Description("业务主键")]
public long BUSI_ID { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[SugarColumn(ColumnName = "BUSI_TYPE")]
[Description("业务类型")]
public long BUSI_TYPE { get; set; }
/// <summary>
/// 任务主键
/// </summary>
[SugarColumn(ColumnName = "TASK_ID")]
[Description("任务主键")]
public long TASK_ID { get; set; }
/// <summary>
/// 打印时间
/// </summary>
[SugarColumn(ColumnName = "PRINT_DATE")]
[Description("打印时间")]
public Nullable<DateTime> PRINT_DATE { get; set; }
/// <summary>
/// 比对类型 BC_MODIFY-BC变更比对
/// </summary>
[SugarColumn(ColumnName = "COMPARE_TYPE")]
[Description("比对类型")]
public string COMPARE_TYPE { get; set; }
/// <summary>
/// 比对结果JSON
/// </summary>
[SugarColumn(ColumnName = "COMPARE_RLT")]
[Description("比对结果JSON")]
public string COMPARE_RLT { get; set; }
/// <summary>
/// 比对差异项数
/// </summary>
[SugarColumn(ColumnName = "COMPARE_DIFF_NUM")]
[Description("比对差异项数")]
public Nullable<int> COMPARE_DIFF_NUM { get; set; }
/// <summary>
/// 比对批次号
/// </summary>
[SugarColumn(ColumnName = "COMPARE_BATCHNO")]
[Description("比对批次号")]
public string COMPARE_BATCHNO { get; set; }
}
}

@ -51,5 +51,85 @@ namespace Myshipping.Application
/// </summary>
public Nullable<long> BOOKING_ID { get; set; }
/// <summary>
/// 截单上传时间
/// </summary>
public Nullable<DateTime> SUBMITTED_DATE { get; set; }
/// <summary>
/// 提单份数
/// </summary>
public Nullable<int> BILLOF_NUM { get; set; }
/// <summary>
/// 放单方式
/// </summary>
public string RELEASE_INSTRUCTION { get; set; }
/// <summary>
/// 是否拆单 SPLIT-标识已拆单
/// </summary>
public string SI_SUBTYPE { get; set; }
/// <summary>
/// 发货人
/// </summary>
public string SHIPPER { get; set; }
/// <summary>
/// 收货人
/// </summary>
public string CONSIGNEE { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string NOTIFYPARTY { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
public string NOTIFYPARTY2 { get; set; }
/// <summary>
/// 订舱方
/// </summary>
public string TRANSPORT_RECEIVER { get; set; }
/// <summary>
/// 唛头
/// </summary>
public string MARKS { get; set; }
/// <summary>
/// HS代码
/// </summary>
public string HSCODE { get; set; }
/// <summary>
/// 货描
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
/// 件数
/// </summary>
public Nullable<int> PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
public Nullable<decimal> KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public Nullable<decimal> CBM { get; set; }
}
}

@ -0,0 +1,73 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application.Entity.TaskManagePlat
{
/// <summary>
/// 任务截单回执箱明细
/// </summary>
[SugarTable("task_si_submitted_ctn")]
[Description("任务截单回执箱明细")]
public class TaskSISubmittedCtn : TaskManageDbEntity
{
/// <summary>
/// 父主键
/// </summary>
public string P_PKID { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CTNCODE { get; set; }
/// <summary>
/// 箱型
/// </summary>
public string CTNALL { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// 封号
/// </summary>
public string SEALNO { get; set; }
/// <summary>
/// 件数
/// </summary>
public Nullable<int> PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
public Nullable<decimal> KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public Nullable<decimal> CBM { get; set; }
/// <summary>
/// 称重方式
/// </summary>
public string WEIGHTYPE { get; set; }
/// <summary>
/// 称重重量
/// </summary>
public Nullable<decimal> WEIGHKGS { get; set; }
}
}

@ -53,6 +53,11 @@ namespace Myshipping.Application
[Description("Draft Notice")]
DRAFT_NOTICE,
/// <summary>
/// SI Submitted
/// </summary>
[Description("SI Submitted")]
SI_SUBMITTED,
/// <summary>
/// 空
/// </summary>
[Description("NONE")]

@ -1402,7 +1402,7 @@ namespace Myshipping.Application
order = item.Adapt<BookingCustomerOrder>();
order.BSNO = order.Id.ToString(); //客户订舱系统中的id
order.Id = YitIdHelper.NextId();
order.BSSTATUS = "已接收";
order.BSSTATUS = "待审核";
await _rep.InsertAsync(order);
}
else
@ -1424,7 +1424,7 @@ namespace Myshipping.Application
order = item.Adapt(order);
order.Id = idBackup;
order.BSNO = bsnoBackup;
order.BSSTATUS = "已接收";
order.BSSTATUS = "待审核";
order.IsDeleted = false;
await _rep.UpdateAsync(order);
}
@ -1469,7 +1469,7 @@ namespace Myshipping.Application
//日志动态
SaveAuditLog($"已接收", order.Id);
SaveAuditLog($"待审核", order.Id);
}
return rtnList;
@ -1488,7 +1488,7 @@ namespace Myshipping.Application
throw Oops.Bah("未找到业务信息");
}
if (model.BSSTATUS != "已接收")
if (model.BSSTATUS != "待审核")
{
throw Oops.Bah("当前状态不能审核");
}
@ -1549,6 +1549,8 @@ namespace Myshipping.Application
bkOrder.CUSTOMERNAME = model.BookingTenantName;
bkOrder.ParentId = 0;
bkOrder.LANENAME = bkOrder.LANECODE;
bkOrder.OPID = UserManager.UserId.ToString();
bkOrder.OP = UserManager.Name;
await _repOrder.InsertAsync(bkOrder);
var bkEdiExt = new BookingEDIExt();
@ -1619,7 +1621,7 @@ namespace Myshipping.Application
}
else
{
if (order.BSSTATUS != "已接收")
if (order.BSSTATUS != "待审核")
{
rtnList.Add(new BookingSubmitResultModel()
{
@ -2016,11 +2018,10 @@ namespace Myshipping.Application
jobj = JObject.Parse(custOrder.ExtendData);
}
var jobjBookAcc = new JObject();
jobjBookAcc["Account"] = input.BOOKINGACCOUNT;
jobjBookAcc["Password"] = input.BOOKINGPASSWORD;
jobj["BookingAccount"] = jobjBookAcc;
custOrder.ExtendData = jobjBookAcc.ToJsonString();
jobj["Account"] = input.BOOKINGACCOUNT;
jobj["Password"] = input.BOOKINGPASSWORD;
jobj["OpMail"] = input.OPMAIL;
custOrder.ExtendData = jobj.ToJsonString();
var ctns = input.CtnList.Adapt<List<BookingCtn>>();
foreach (var ctn in ctns)

@ -1210,5 +1210,10 @@ namespace Myshipping.Application
/// 航线代码
/// </summary>
public string LINECODE { get; set; }
/// <summary>
/// 操作邮箱
/// </summary>
public string OPMAIL { get; set; }
}
}

@ -142,6 +142,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingExtendState> _repextendstate;
private readonly SqlSugarRepository<BookingCustomerOrder> _repCustomerOrder;
private readonly IServiceWorkFlowManageService _serviceWorkFlowManageService;
private readonly IDjyUserConfigService _djyUserConfigService;
@ -179,7 +180,8 @@ 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, IBookingValueAddedService bookingValueAddedService)
SqlSugarRepository<BookingGoodsStatusSubscribe> repBookingStatusSubscribe, SqlSugarRepository<DjyTenantParamValue> repTenantParamValue, IBookingValueAddedService bookingValueAddedService,
SqlSugarRepository<BookingCustomerOrder> repCustomerOrder)
{
this._logger = logger;
this._rep = rep;
@ -234,6 +236,7 @@ namespace Myshipping.Application
_repBookingStatusSubscribe = repBookingStatusSubscribe;
_repTenantParamValue = repTenantParamValue;
this.bookingValueAddedService = bookingValueAddedService;
this._repCustomerOrder = repCustomerOrder;
}
#region 主表和箱信息
@ -2608,6 +2611,16 @@ namespace Myshipping.Application
ordOut.BookingEDIExt = ediExtEntity.Adapt<BookingEDIExtDto>();
}
//运营端需返回订舱需求的信息
if (App.Configuration["RunType"] is CommonConst.RUN_TYPE_DJY)
{
var custOrd = await _repCustomerOrder.AsQueryable().FirstAsync(x => x.BookingId == main.Id);
if (custOrd != null)
{
ordOut.CustomerOrderId = custOrd.Id;
}
}
return ordOut;
}
@ -4680,7 +4693,7 @@ namespace Myshipping.Application
//设置货物状态:已发下货纸,并回传东胜
await SetGoodsStatus("YFXHZ", bookingId);
await SendBookingOrder(new long[] { bookingId });
}
#endregion

@ -12,6 +12,11 @@ namespace Myshipping.Application
public List<BookingOrderDto> HbList { get; set; }
public BookingOrderUrlOutput Link { get; set; }
public List<BookingSlotBaseWithCtnDto> Slots { get; set; }
/// <summary>
/// 客户订舱需求ID
/// </summary>
public long? CustomerOrderId { get; set; }
}
public class BookingOrderUrlOutput

@ -1,5 +1,6 @@
using Mapster;
using Myshipping.Application.Entity;
using Myshipping.Application.Entity.TaskManagePlat;
using Myshipping.Application.Service.TaskManagePlat.Dtos;
using System;
using System.Collections.Generic;
@ -1026,7 +1027,33 @@ namespace Myshipping.Application
.Map(dest => dest.CARRIER, src => src.Carrier)
.Map(dest => dest.TAKE_ISSUETYPE_NAME, src => src.TakeIssueTypeName)
.Map(dest => dest.ISSUETYPE, src => src.IssueType)
.Map(dest => dest.NOTICE_DATE, src => src.NoticeDate);
.Map(dest => dest.NOTICE_DATE, src => src.NoticeDate)
.Map(dest => dest.SUBMITTED_DATE, src => src.SubmittedDate)
.Map(dest => dest.BILLOF_NUM, src => src.BillOfNum)
.Map(dest => dest.RELEASE_INSTRUCTION, src => src.ReleaseInstruction)
.Map(dest => dest.SI_SUBTYPE, src => src.SISubType)
.Map(dest => dest.SHIPPER, src => src.Shipper)
.Map(dest => dest.CONSIGNEE, src => src.Consignee)
.Map(dest => dest.NOTIFYPARTY, src => src.NotifyParty)
.Map(dest => dest.NOTIFYPARTY2, src => src.NotifyParty2)
.Map(dest => dest.HSCODE, src => src.HSCode)
.Map(dest => dest.DESCRIPTION, src => src.Description)
.Map(dest => dest.PKGS, src => src.PKGS)
.Map(dest => dest.KINDPKGS, src => src.KindPKGS)
.Map(dest => dest.KGS, src => src.KGS)
.Map(dest => dest.CBM, src => src.CBM);
config.ForType<TaskManageOrderSIFeedBackContaInfo, TaskSISubmittedCtn>()
.Map(dest => dest.CNTRNO, src => src.ContaNo)
.Map(dest => dest.CTNCODE, src => src.ContaType)
.Map(dest => dest.CTNALL, src => src.ContaTypeName)
.Map(dest => dest.SEALNO, src => src.SealNo)
.Map(dest => dest.PKGS, src => src.PKGS)
.Map(dest => dest.KINDPKGS, src => src.KINDPKGS)
.Map(dest => dest.KGS, src => src.KGS)
.Map(dest => dest.CBM, src => src.CBM)
.Map(dest => dest.WEIGHTYPE, src => src.WeighType)
.Map(dest => dest.WEIGHKGS, src => src.WeighKGS);
config.ForType<TaskManageOrderDraftInfo, TaskDraftInfo>()
.Map(dest => dest.MBL_NO, src => src.MBlNo)

@ -52,5 +52,21 @@ namespace Myshipping.Application
/// </summary>
/// <example>20GP</example>
public string ContaTypeName { get; set; }
/// <summary>
/// 包装
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 称重方式
/// </summary>
public string WeighType { get; set; }
/// <summary>
/// 称重重量
/// </summary>
public Nullable<decimal> WeighKGS { get; set; }
}
}

@ -40,10 +40,27 @@ namespace Myshipping.Application
/// 通知人
/// </summary>
public string NotifyParty { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
public string NotifyParty2 { get; set; }
/// <summary>
/// 订舱方
/// </summary>
public string TransportReceiver { get; set; }
/// <summary>
/// 唛头
/// </summary>
public string Marks{ get; set; }
/// <summary>
/// HS CODE
/// </summary>
public string HSCode { get; set; }
/// <summary>
/// 货描
/// </summary>
@ -154,6 +171,11 @@ namespace Myshipping.Application
/// </summary>
public string ReleaseInstruction { get; set; }
/// <summary>
/// 是否拆单 SPLIT-标识已拆单
/// </summary>
public string SISubType { get; set; }
/// <summary>
/// 箱信息
/// </summary>

@ -39,5 +39,12 @@ namespace Myshipping.Application
/// <param name="taskPkId">截单回执任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> SearchAndConnectBookingInfo(string taskPkId);
/// <summary>
/// 处理SI截单回执
/// </summary>
/// <param name="taskPkId">截单回执任务主键</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> ProcessSISubmitted(string taskPkId);
}
}

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity;
using Myshipping.Core;
using Myshipping.Core.Service;
using System;
using System.Collections.Generic;
using System.Linq;
@ -24,20 +25,29 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<TaskSISubmitted> _taskSISubmittedRepository;
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseRepository;
private readonly SqlSugarRepository<BookingOrder> _bookingOrderRepository;
private readonly SqlSugarRepository<BusinessCompareDiffRecord> _businessCompareDiffRecordRepository;
private readonly ILogger<TaskManageSISubmittedService> _logger;
private readonly IBookingValueAddedService _bookingValueAddedService;
private readonly IDjyTenantParamService _djyTenantParamService;
//租户SI回执是否自动更新订舱
const string CONST_SI_SUBMITTED_DEFAULT_PARAM = "SI_SUBMITTED_AUTO_UPDATE_ORDER";
public TaskManageSISubmittedService(ILogger<TaskManageSISubmittedService> logger,
SqlSugarRepository<TaskSISubmitted> taskSISubmittedRepository,
SqlSugarRepository<TaskBaseInfo> taskBaseRepository,
SqlSugarRepository<BookingOrder> bookingOrderRepository,
IBookingValueAddedService bookingValueAddedService)
SqlSugarRepository<BusinessCompareDiffRecord> businessCompareDiffRecordRepository,
IBookingValueAddedService bookingValueAddedService, IDjyTenantParamService djyTenantParamService)
{
_logger = logger;
_taskSISubmittedRepository = taskSISubmittedRepository;
_taskBaseRepository = taskBaseRepository;
_bookingOrderRepository = bookingOrderRepository;
_bookingValueAddedService = bookingValueAddedService;
_djyTenantParamService = djyTenantParamService;
_businessCompareDiffRecordRepository = businessCompareDiffRecordRepository;
}
#region 获取截单回执详情
@ -165,7 +175,7 @@ namespace Myshipping.Application
#region 重新处理截单任务
/// <summary>
/// 重新处理截单任务
/// 对未匹配订舱订单的任务记录重新对应订订单
/// 对未匹配订舱订单的任务记录重新对应订订单
/// </summary>
/// <param name="taskPkId">截单回执任务主键</param>
/// <returns>返回回执</returns>
@ -190,7 +200,7 @@ namespace Myshipping.Application
string mblNo = siSubmitted.MBL_NO.ToUpper().Trim();
var bookingInfo = _bookingOrderRepository.AsQueryable().Filter(null, true)
.FirstAsync(a => a.MBLNO == mblNo && a.IsDeleted == false && (a.ParentId == null || a.ParentId == 0));
.FirstAsync(a => a.MBLNO == mblNo && a.IsDeleted == false && (a.ParentId == null || a.ParentId == 0) && a.TenantId == UserManager.TENANT_ID);
if(bookingInfo == null)
throw Oops.Oh($"提单号{mblNo}未提取有效的订舱订单");
@ -215,5 +225,70 @@ namespace Myshipping.Application
return result;
}
#endregion
#region 处理SI截单回执
/// <summary>
/// 处理SI截单回执
/// </summary>
/// <param name="taskPkId">截单回执任务主键</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> ProcessSISubmitted(string taskPkId)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
/*
1SI_SUBMITTED_AUTO_UPDATE_ORDER=ENABLE
2
3
*/
var taskBase = _taskBaseRepository.AsQueryable().First(a => a.PK_ID == taskPkId);
if (taskBase == null)
throw Oops.Oh($"任务主键{taskPkId}无法获取业务信息");
var siSubmitted = _taskSISubmittedRepository.AsQueryable().First(a => a.TASK_ID == taskBase.PK_ID);
if (siSubmitted == null)
throw Oops.Oh($"截单回执主键{taskPkId}无法获取业务信息");
if (siSubmitted.BOOKING_ID.HasValue)
throw Oops.Oh($"当前截单回执已有匹配的订舱订单");
DjyTenantParamValueOutput paramConfig = null;
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { CONST_SI_SUBMITTED_DEFAULT_PARAM }).GetAwaiter().GetResult();
if (paramList != null && paramList.Count > 0)
{
paramConfig = paramList.FirstOrDefault(a => a.ParaCode.Equals(CONST_SI_SUBMITTED_DEFAULT_PARAM, StringComparison.OrdinalIgnoreCase));
}
if(paramConfig != null)
{
//更新前先比对一遍差异
//更新订舱数据
//更新任务的状态
//直接完成SI的回执任务
}
else
{
result.msg = "当前租户没开通自动SI回执是否自动更新订舱";
}
}
catch (Exception ex)
{
result.succ= false;
result.msg = ex.Message;
}
return result;
}
#endregion
}
}

@ -17,6 +17,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Extensions.Logging;
using Myshipping.Application.EDI;
using Myshipping.Application.Entity;
using Myshipping.Application.Entity.TaskManagePlat;
using Myshipping.Application.Helper;
using Myshipping.Application.Service.BookingOrder;
using Myshipping.Application.Service.BookingSlot.Dto;
@ -76,7 +77,7 @@ namespace Myshipping.Application
{
private readonly SqlSugarRepository<TaskBaseInfo> _taskBaseInfoRepository;
private readonly SqlSugarRepository<TaskSISubmitted> _taskSISubmittedRepository;
private readonly SqlSugarRepository<TaskSIFeedBackContaInfo> _taskSIFeedBackContaInfoRepository;
private readonly SqlSugarRepository<TaskSISubmittedCtn> _taskSISubmittedCtnRepository;
private readonly SqlSugarRepository<TaskBillFeeDetailInfo> _taskBillFeeDetailInfoRepository;
private readonly SqlSugarRepository<TaskFileInfo> _taskFileInfoRepository;
private readonly SqlSugarRepository<TaskEmailInfo> _taskEmailInfoRepository;
@ -140,7 +141,7 @@ namespace Myshipping.Application
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
SqlSugarRepository<TaskSISubmitted> taskSISubmittedRepository,
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
SqlSugarRepository<TaskSISubmittedCtn> taskSISubmittedCtnRepository,
SqlSugarRepository<TaskBillFeeDetailInfo> taskBillFeeDetailInfoRepository,
SqlSugarRepository<TaskFileInfo> taskFileInfoRepository,
SqlSugarRepository<TaskEmailInfo> taskEmailInfoRepository,
@ -186,7 +187,7 @@ namespace Myshipping.Application
{
_taskBaseInfoRepository = taskBaseInfoRepository;
_taskSISubmittedRepository = taskSISubmittedRepository;
_taskSIFeedBackContaInfoRepository = taskSIFeedBackContaInfoRepository;
_taskSISubmittedCtnRepository = taskSISubmittedCtnRepository;
_taskBillFeeDetailInfoRepository = taskBillFeeDetailInfoRepository;
_taskFileInfoRepository = taskFileInfoRepository;
_taskEmailInfoRepository = taskEmailInfoRepository;
@ -339,26 +340,37 @@ namespace Myshipping.Application
//如果大简云用户ID不为空接收人为空时通过大简云用户ID关联订舱人ID
if (UserManager.UserId != null)
{
userTendInfo = new UserTendDto
//这里只有派车不是公共任务,其他基本都是公共任务
if (info.Main.TaskType == TaskBaseTypeEnum.TRUCK_DISPATCH)
{
userId = UserManager.UserId,
userName = UserManager.Name,
tendId = UserManager.TENANT_ID,
tenantName = UserManager.TENANT_NAME
};
userTendInfo = GetUserTendInfo(info.Main.RecvUserId);
taskInfo.IS_PUBLIC = 1;
taskInfo.IS_PUBLIC = 0;
}
else
{
userTendInfo = new UserTendDto
{
userId = UserManager.UserId,
userName = UserManager.Name,
tendId = UserManager.TENANT_ID,
tenantName = UserManager.TENANT_NAME
};
taskInfo.IS_PUBLIC = 1;
}
}
else if (!string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId))
{
userTendInfo = GetUserTendInfoByDJYUserId(info.Main.DJYRecvUserId, info.Main.DJYRecvUserEmail);
if(userTendInfo != null)
if (userTendInfo != null)
{
taskInfo.IS_PUBLIC = 0;
}
}
else if(string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId) &&
else if (string.IsNullOrWhiteSpace(info.Main.DJYRecvUserId) && string.IsNullOrWhiteSpace(info.Main.TaskUserId) &&
!string.IsNullOrWhiteSpace(info.Main.TaskRecvEmail) && info.Main.TaskTenatId.HasValue && info.Main.TaskTenatId.Value > 0)
{
userTendInfo = GetUserTendInfoByEmail(info.Main.TaskTenatId.Value, info.Main.TaskRecvEmail);
@ -435,6 +447,12 @@ namespace Myshipping.Application
fileCategory = TaskFileCategoryEnum.DRAFT.ToString();
}
else if (TaskBaseTypeEnum.SI_FEEDBACK.ToString() == taskInfo.TASK_BASE_TYPE)
{
attachFileType = "sisubmittedfiles";
fileCategory = TaskFileCategoryEnum.SI_SUBMITTED.ToString();
}
var noExtensionFileName = Path.GetFileNameWithoutExtension(file.FileName);
var fileFullName = await FileAttachHelper.SaveFile(taskInfo.PK_ID, bytes, batchNo, noExtensionFileName,
@ -618,18 +636,18 @@ namespace Myshipping.Application
taskSISubmitted.TenantId = taskInfo.TenantId;
taskSISubmitted.TenantName = taskInfo.TenantName;
await _taskSISubmittedRepository.InsertAsync(taskSISubmitted);
_taskSISubmittedRepository.Insert(taskSISubmitted);
/*
//SI反馈箱信息入库
if (info.Main.SIFeedBack.ContaList != null && info.Main.SIFeedBack.ContaList.Count > 0)
{
info.Main.SIFeedBack.ContaList.ForEach(async ctn =>
{
var contaInfo = ctn.Adapt<TaskSIFeedBackContaInfo>();
var contaInfo = ctn.Adapt<TaskSISubmittedCtn>();
contaInfo.PK_ID = IDGen.NextID().ToString();
contaInfo.P_PKID = taskSIFeedBackInfo.PK_ID;
contaInfo.P_PKID = taskSISubmitted.PK_ID;
contaInfo.CreatedTime = taskInfo.CreatedTime;
contaInfo.UpdatedTime = taskInfo.CreatedTime;
@ -639,9 +657,11 @@ namespace Myshipping.Application
contaInfo.TenantId = taskInfo.TenantId;
contaInfo.TenantName = taskInfo.TenantName;
await _taskSIFeedBackContaInfoRepository.InsertAsync(contaInfo);
_taskSISubmittedCtnRepository.Insert(contaInfo);
});
}*/
}
//这里入库完成后执行SI的处理
}
#endregion

Loading…
Cancel
Save