用户代码

optimize
wanghaomei 1 year ago
parent 07360f08a5
commit 6daf565616

@ -1145,7 +1145,9 @@ namespace Myshipping.Application
it.MiddleETD,
it.MiddleATA,
it.MiddleATD,
it.ATA
it.ATA,
it.TRUCKERID,
it.TRUCKER
}).ExecuteCommandAsync();
if (!string.IsNullOrEmpty(reqId))
@ -5792,7 +5794,7 @@ namespace Myshipping.Application
throw Oops.Bah($"当前船公司没有对应的请求路由配置");
//这里船公司VOL的单子不能走此通道发送
if(ediRouteEnum == EDIRouteEnum.VOL)
if (ediRouteEnum == EDIRouteEnum.VOL)
throw Oops.Bah($"当前船公司VOL不能执行标准发送");
//集装箱型
@ -9966,7 +9968,7 @@ namespace Myshipping.Application
throw Oops.Bah("当前订单的船公司不是VOL(沃尔塔航运)不能发送VOLTA截单EDI");
}
if(string.IsNullOrWhiteSpace(order.MBLNO))
if (string.IsNullOrWhiteSpace(order.MBLNO))
throw Oops.Bah($"提单号不能为空");
if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL"))
@ -10038,7 +10040,7 @@ namespace Myshipping.Application
if (ediPkgs == null || string.IsNullOrWhiteSpace(ediPkgs.MapCode))
pkgsBuilder.AppendLine($"包装{x.Pkgs}的EDI代码未找到");
if(ediPkgs != null)
if (ediPkgs != null)
{
x.EdiPkgs = ediPkgs.MapCode?.Trim();
}
@ -10051,13 +10053,13 @@ namespace Myshipping.Application
});
}
if(pkgsBuilder.Length > 0)
if (pkgsBuilder.Length > 0)
{
_logger.LogInformation("批次={no}获取请求VOLTA截单详情有错误 {msg}", batchNo, JSON.Serialize(model));
result.msg = pkgsBuilder.ToString();
}
result.succ = true;
result.extra = voltaModel;
@ -10104,7 +10106,7 @@ namespace Myshipping.Application
/// <param name="isSend">是否直接发送VOLTA申报截单</param>
/// <returns>返回回执</returns>
[NonAction]
public async Task<dynamic> InnerVOLTAEDI(VOLTAEDIBaseModel model,bool isSend = false)
public async Task<dynamic> InnerVOLTAEDI(VOLTAEDIBaseModel model, bool isSend = false)
{
CommonWebApiResult result = new CommonWebApiResult();
@ -10182,7 +10184,7 @@ namespace Myshipping.Application
if (isSend)
{
//这里发送配置通过提单号的前3个英文字母判断
string ediCode = order.MBLNO.Substring(0,3).ToUpper();
string ediCode = order.MBLNO.Substring(0, 3).ToUpper();
var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult()
.FirstOrDefault(a => a.EDICODE.Equals(ediCode, StringComparison.OrdinalIgnoreCase)
@ -10228,12 +10230,12 @@ namespace Myshipping.Application
if (isSendEmail)
{
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == UserManager.UserId
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == UserManager.UserId
&& x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
//推送订舱邮件
sendStatus = await InnerSendToEmailByUserEmail(mailAcc, result.extra.ToString(),result.extra2.ToString(), ftpSet);
sendStatus = await InnerSendToEmailByUserEmail(mailAcc, result.extra.ToString(), result.extra2.ToString(), ftpSet);
}
DateTime eDate = DateTime.Now;
@ -10284,7 +10286,7 @@ namespace Myshipping.Application
/// <param name="location">内容定位name-名称addr-地址)</param>
/// <returns>返回截取字符</returns>
[NonAction]
private string GetShipCneeNotifyDetail(string name,string location = "name")
private string GetShipCneeNotifyDetail(string name, string location = "name")
{
string result = string.Empty;
@ -10300,15 +10302,15 @@ namespace Myshipping.Application
result = name.Replace(s, "");
if(Regex.IsMatch(result,"^\\n"))
if (Regex.IsMatch(result, "^\\n"))
{
result = Regex.Replace(result, "^\\n", "");
}
//result = Regex.Match(name, $"(?<={s}).*").Value;
}
}
catch(Exception ex)
catch (Exception ex)
{
_logger.LogInformation($"{nameof(GetShipCneeNotifyDetail)} 提取收、发、通详情异常,原因:{ex.Message}");
}
@ -10359,7 +10361,7 @@ namespace Myshipping.Application
string fileName = Path.GetFileName(filePath);
try
{
var sendResult = await MailSendHelper.SendMail(userEmailAccount, emailTopic, emailTopic, ediCfg.RECEIVEEMAIL,
var sendResult = await MailSendHelper.SendMail(userEmailAccount, emailTopic, emailTopic, ediCfg.RECEIVEEMAIL,
new KeyValuePair<string, byte[]>(fileName, heByte));
_logger.LogInformation($"发送邮件返回:{JSON.Serialize(sendResult)}");

@ -855,6 +855,11 @@ namespace Myshipping.Application
/// 新建单据时,上传的未关联到订舱数据的临时附件
/// </summary>
public List<BookingFileTempDto> TempFiles { get; set; }
/// <summary>
/// 已修改的字段
/// </summary>
public List<string> ChangedFields { get; set; }
}
/// <summary>

@ -98,8 +98,12 @@ public class SysUser : DBEntityTenant
/// <summary>
/// 大简云userid
/// </summary>
[MaxLength(20)]
public string DjyUserId { get; set; }
/// <summary>
/// 用户代码
/// </summary>
public string Code { get; set; }
}

@ -4115,6 +4115,11 @@
大简云userid
</summary>
</member>
<member name="P:Myshipping.Core.Entity.SysUser.Code">
<summary>
用户代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity._SysUser.Account">
<summary>
账号
@ -15783,6 +15788,11 @@
租户id
</summary>
</member>
<member name="P:Myshipping.Core.Service.UserInput.Code">
<summary>
用户代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.AddUserInput.Account">
<summary>
账号
@ -15923,6 +15933,11 @@
所属租户
</summary>
</member>
<member name="P:Myshipping.Core.Service.UserOutput.Code">
<summary>
用户代码
</summary>
</member>
<member name="M:Myshipping.Core.Service.ISysUserService.QueryUserByPos(System.String,System.String)">
<summary>
通过职位获取用户信息

@ -81,6 +81,11 @@ public class UserInput : InputBase
/// 租户id
/// </summary>
public virtual long TenantId { get; set; }
/// <summary>
/// 用户代码
/// </summary>
public string Code { get; set; }
}
public class AddUserInput : UserInput

@ -74,4 +74,9 @@ public class UserOutput
public string TenantName { get; set; }
public string orgName { get; set; }
/// <summary>
/// 用户代码
/// </summary>
public string Code { get; set; }
}

Loading…
Cancel
Save