# Conflicts:
#	Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
optimize
wet 2 years ago
commit 34c41e1494

@ -31,5 +31,13 @@ namespace Myshipping.Application.Entity
/// 租户名称
/// </summary>
public string TenantName { get; set; }
/// <summary>
/// 主单
/// </summary>
public bool IsMain { get; set; }
/// <summary>
/// 分单
/// </summary>
public bool IsSub { get; set; }
}
}

File diff suppressed because it is too large Load Diff

@ -55,6 +55,7 @@ using System.Net;
using Furion.DistributedIDGenerator;
using System.Linq.Expressions;
using Myshipping.Core.Extension;
using System.Text.RegularExpressions;
namespace Myshipping.Application
{
@ -1636,8 +1637,12 @@ namespace Myshipping.Application
.Where(d => d.TenantId == UserManager.TENANT_ID)
.Select(d => new
{
d.TypeCode,
d.TypeName
d.TypeName,
d.IsMain,
d.IsSub
})
.ToListAsync();
@ -2518,9 +2523,12 @@ namespace Myshipping.Application
contaModel.CTNALLCODE = currConta.MapCode;
if (string.IsNullOrWhiteSpace(conta.KINDPKGS))
throw Oops.Oh($"集装箱包装不能为空");
var curContaBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(conta.KINDPKGS, StringComparison.OrdinalIgnoreCase));
if (curBasePkgs == null)
if (curContaBasePkgs == null)
throw Oops.Bah($"包装{conta.KINDPKGS}的基础数据代码未找到");
//EDI包装
@ -2547,7 +2555,15 @@ namespace Myshipping.Application
cargoModel.CNTRNO = contaList.FirstOrDefault(a => a.Id == cargo.CTNID.Value).CNTRNO;
var ediDetailPkgs = ediPkgsList.FirstOrDefault(x => x.Code.Equals(cargo.KINDPKGS, StringComparison.OrdinalIgnoreCase));
if (string.IsNullOrWhiteSpace(cargo.KINDPKGS))
throw Oops.Oh($"多品名包装不能为空");
var curCargoBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(cargo.KINDPKGS, StringComparison.OrdinalIgnoreCase));
if (curCargoBasePkgs == null)
throw Oops.Bah($"包装{cargo.KINDPKGS}的基础数据代码未找到");
var ediDetailPkgs = ediPkgsList.FirstOrDefault(x => x.Code.Equals(curCargoBasePkgs.Code, StringComparison.OrdinalIgnoreCase));
if (ediDetailPkgs == null)
throw Oops.Oh($"货明细的包装{cargo.KINDPKGS}的EDI代码未找到");
@ -2744,7 +2760,14 @@ namespace Myshipping.Application
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
var currRlt = PILEdiHelper.CreateEdiPIL(ediModel);
#endregion
@ -2759,7 +2782,14 @@ namespace Myshipping.Application
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
CommonWebApiResult currRlt = new CommonWebApiResult();
@ -2784,7 +2814,13 @@ namespace Myshipping.Application
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\\r\\n");
//}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
var currRlt = WYEdiHelper.CreateEdiWY(ediModel);
#endregion
@ -2800,7 +2836,9 @@ namespace Myshipping.Application
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
CommonWebApiResult currRlt = new CommonWebApiResult();
@ -2825,7 +2863,15 @@ namespace Myshipping.Application
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
//if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
//{
// strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "</br>");
//}
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
}
CommonWebApiResult currRlt = YTEdiHelper.CreateEdiYT(ediModel);
#endregion

@ -29,6 +29,15 @@ namespace Myshipping.Application
/// </summary>
public string TenantName { get; set; }
/// <summary>
/// 主单
/// </summary>
public bool IsMain { get; set; }
/// <summary>
/// 分单
/// </summary>
public bool IsSub { get; set; }
}
/// <summary>

@ -52,11 +52,11 @@ namespace Myshipping.Application
[HttpPost("/BookingTemplate/add")]
public async Task Add(AddBookingTemplateInput input)
{
var c = _rep.Count(x => x.Type.Contains(input.Type) && x.Title == input.Title);
if (c > 0)
{
throw Oops.Oh(BookingErrorCode.BOOK101);
}
//var c = _rep.Count(x => x.Type.Contains(input.Type) && x.Title == input.Title);
//if (c > 0)
//{
// throw Oops.Oh(BookingErrorCode.BOOK101);
//}
var entity = input.Adapt<BookingTemplate>();
await _rep.InsertAsync(entity);

Loading…
Cancel
Save