订舱截单接口

master
ZR20090193-陈敬勇 6 months ago
parent 4923ade698
commit 504f0f9e4b

@ -69,6 +69,13 @@ public static class MultiLanguageConst
[Description("箱型映射信息不存在")] [Description("箱型映射信息不存在")]
public const string MappingCtnNotExist = "MappingCtn_Not_Exist"; public const string MappingCtnNotExist = "MappingCtn_Not_Exist";
[Description("付款方式映射信息已存在")]
public const string MappingFrtExist = "MappingFrt_Exist";
[Description("付款方式映射信息不存在")]
public const string MappingFrtNotExist = "MappingFrt_Not_Exist";
[Description("包装映射信息已存在")] [Description("包装映射信息已存在")]
public const string MappingPackageExist = "MappingPackage_Exist"; public const string MappingPackageExist = "MappingPackage_Exist";

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.Module.Core
{
/// <summary>
/// 订舱或截单通道枚举
/// </summary>
public enum EDIRouteEnum
{
/// <summary>
/// 德翔
/// </summary>
TSL,
/// <summary>
/// 太平
/// </summary>
PIL,
/// <summary>
/// 阳明
/// </summary>
YML,
/// <summary>
/// 易通(适用ONE)
/// </summary>
YT,
/// <summary>
///
/// </summary>
WY,
/// <summary>
/// 未指定
/// </summary>
NULL,
/// <summary>
/// 阿联酋航运
/// </summary>
ESL,
/// <summary>
/// 玛丽亚娜
/// </summary>
MELL,
/// <summary>
/// 沃尔塔航运
/// </summary>
VOL,
/// <summary>
/// INTTRA
/// </summary>
INTTRA
}
}

@ -57,7 +57,7 @@ public static partial class Extensions
/// <param name="source">数据源</param> /// <param name="source">数据源</param>
/// <param name="keySelector">键条件</param> /// <param name="keySelector">键条件</param>
/// <returns></returns> /// <returns></returns>
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, public static IEnumerable<TSource> SqlSugarDistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector) Func<TSource, TKey> keySelector)
{ {
return source.GroupBy(keySelector).Select(gropby => gropby.First()); return source.GroupBy(keySelector).Select(gropby => gropby.First());
@ -74,7 +74,7 @@ public static partial class Extensions
public static IList<TSource> ToDistinctBy<TSource, TKey>(this IEnumerable<TSource> source, public static IList<TSource> ToDistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector) Func<TSource, TKey> keySelector)
{ {
return source.DistinctBy(keySelector).ToList(); return source.SqlSugarDistinctBy(keySelector).ToList();
} }
/// <summary> /// <summary>

@ -573,4 +573,14 @@ public static partial class Extensions
return jt as JObject; return jt as JObject;
} }
/// <summary>
/// JSON 字符串转 JObject
/// </summary>
/// <param name="json"></param>
/// <returns></returns>
public static JObject ToJObject(this string json)
{
return json == null ? JObject.Parse("{}") : JObject.Parse(json.Replace("&nbsp;", ""));
}
} }

@ -32,6 +32,8 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.8" /> <PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.8" /> <PackageReference Include="NLog.Web.AspNetCore" Version="5.3.8" />
<PackageReference Include="NPOI" Version="2.7.0" />
<PackageReference Include="Npoi.Mapper" Version="6.2.1" />
<PackageReference Include="Snowflake.Core" Version="2.0.0" /> <PackageReference Include="Snowflake.Core" Version="2.0.0" />
<PackageReference Include="Snowflake.Data" Version="2.2.0" /> <PackageReference Include="Snowflake.Data" Version="2.2.0" />
<PackageReference Include="SqlSugar.IOC" Version="2.0.0" /> <PackageReference Include="SqlSugar.IOC" Version="2.0.0" />

@ -30,7 +30,7 @@ namespace DS.WMS.Core.Code.Dtos
/// <summary> /// <summary>
/// 文件夹 /// 文件夹
/// </summary> /// </summary>
public string FOLDERNAME { get; set; } public string FolderName { get; set; }
/// <summary> /// <summary>
/// 用户名 /// 用户名
/// </summary> /// </summary>

@ -31,7 +31,7 @@ namespace DS.WMS.Core.Code.Dtos
/// <summary> /// <summary>
/// 文件夹 /// 文件夹
/// </summary> /// </summary>
public string FOLDERNAME { get; set; } public string FolderName { get; set; }
/// <summary> /// <summary>
/// 用户名 /// 用户名
/// </summary> /// </summary>

@ -1,5 +1,6 @@
using DS.Module.Core; using DS.Module.Core;
using FluentValidation; using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Code.Dtos; namespace DS.WMS.Core.Code.Dtos;
@ -29,6 +30,10 @@ public class CodeIssueTypeReq
/// </summary> /// </summary>
public string CopyNoBill { get; set; } public string CopyNoBill { get; set; }
/// <summary> /// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable; public StatusEnum? Status { get; set; } = StatusEnum.Enable;
@ -52,5 +57,7 @@ public class CodeIssueTypeReqValidator : AbstractValidator<CodeIssueTypeReq>
.NotEmpty().WithName("签单方式"); .NotEmpty().WithName("签单方式");
this.RuleFor(o => o.EnName) this.RuleFor(o => o.EnName)
.NotEmpty().WithName("英文名称"); .NotEmpty().WithName("英文名称");
this.RuleFor(o => o.EdiCode)
.NotEmpty().WithName("EDI代码");
} }
} }

@ -28,6 +28,10 @@ public class CodeIssueTypeRes
/// </summary> /// </summary>
public string CopyNoBill { get; set; } public string CopyNoBill { get; set; }
/// <summary> /// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable; public StatusEnum? Status { get; set; } = StatusEnum.Enable;

@ -21,7 +21,10 @@ public class CodeServiceReq
/// 中文名称 /// 中文名称
/// </summary> /// </summary>
public string CnName { get; set; }= ""; public string CnName { get; set; }= "";
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary> /// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>
@ -44,5 +47,7 @@ public class CodeServiceReqValidator : AbstractValidator<CodeServiceReq>
{ {
this.RuleFor(o => o.ServiceName) this.RuleFor(o => o.ServiceName)
.NotEmpty().WithName("运输条款-英文名称"); .NotEmpty().WithName("运输条款-英文名称");
this.RuleFor(o => o.EdiCode)
.NotEmpty().WithName("EDI代码");
} }
} }

@ -19,8 +19,11 @@ public class CodeServiceRes
/// 中文名称 /// 中文名称
/// </summary> /// </summary>
public string CnName { get; set; } public string CnName { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary> /// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>

@ -28,7 +28,7 @@ public class CodeEdiSet : BaseModel<long>
/// 文件夹 /// 文件夹
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "文件夹", Length = 40,IsNullable = true)] [SugarColumn(ColumnDescription = "文件夹", Length = 40,IsNullable = true)]
public string FOLDERNAME { get; set; } public string FolderName { get; set; }
/// <summary> /// <summary>
/// 用户名 /// 用户名
/// </summary> /// </summary>

@ -30,6 +30,12 @@ public class CodeIssueType: BaseModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "副本份数", Length = 5,IsNullable = true)] [SugarColumn(ColumnDescription = "副本份数", Length = 5,IsNullable = true)]
public string CopyNoBill { get; set; } public string CopyNoBill { get; set; }
/// <summary>
/// EDI代码
/// </summary>
[SugarColumn(ColumnDescription = "EDI代码", Length = 5, IsNullable = true)]
public string EdiCode { get; set; }
/// <summary> /// <summary>
/// 状态 0启用 1禁用 /// 状态 0启用 1禁用
/// </summary> /// </summary>

@ -19,8 +19,12 @@ public class CodeService: BaseModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "中文名称", Length = 50,IsNullable = true)] [SugarColumn(ColumnDescription = "中文名称", Length = 50,IsNullable = true)]
public string CnName { get; set; } public string CnName { get; set; }
/// <summary>
/// EDI代码
/// </summary>
[SugarColumn(ColumnDescription = "EDI代码", Length = 5, IsNullable = true)]
public string EdiCode { get; set; }
/// <summary> /// <summary>
/// 状态 0启用 1禁用 /// 状态 0启用 1禁用
/// </summary> /// </summary>

@ -26,6 +26,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" /> <ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />
<ProjectReference Include="..\DS.Module.Nuget\DS.Module.Nuget.csproj" /> <ProjectReference Include="..\DS.Module.Nuget\DS.Module.Nuget.csproj" />
<ProjectReference Include="..\DS.Module.PrintModule\DS.Module.PrintModule.csproj" />
<ProjectReference Include="..\DS.Module.SqlSugar\DS.Module.SqlSugar.csproj" /> <ProjectReference Include="..\DS.Module.SqlSugar\DS.Module.SqlSugar.csproj" />
<ProjectReference Include="..\DS.Module.UserModule\DS.Module.UserModule.csproj" /> <ProjectReference Include="..\DS.Module.UserModule\DS.Module.UserModule.csproj" />
</ItemGroup> </ItemGroup>

@ -0,0 +1,80 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using FluentValidation;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Map.Dtos
{
/// <summary>
/// 付款方式映射信息请求
/// </summary>
public class MappingFrtReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 关联业务id
/// </summary>
public long LinkId { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class MappingFrtReqValidator : AbstractValidator<MappingFrtReq>
{
/// <summary>
/// 构造函数
/// </summary>
public MappingFrtReqValidator()
{
this.RuleFor(o => o.LinkId)
.NotEmpty().WithName("付款方式Id");
this.RuleFor(o => o.Module)
.NotEmpty().WithName("模块");
this.RuleFor(o => o.MapCode)
.NotEmpty().WithName("映射代码");
this.RuleFor(o => o.MapName)
.NotEmpty().WithName("映射名称");
}
}
}

@ -0,0 +1,71 @@
using DS.Module.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Map.Dtos
{
/// <summary>
/// 付款方式映射信息返回
/// </summary>
public class MappingFrtRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 关联业务id
/// </summary>
public long LinkId { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 付款方式名称
/// </summary>
public string FrtName { get; set; }
/// <summary>
/// 船公司名称
/// </summary>
public string CarrierName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}

@ -42,8 +42,11 @@ namespace DS.WMS.Core.Map.Dtos
/// 映射名称 /// 映射名称
/// </summary> /// </summary>
public string MapName { get; set; } public string MapName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary> /// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>

@ -46,7 +46,10 @@ namespace DS.WMS.Core.Map.Dtos
///// 签单方式名称 ///// 签单方式名称
///// </summary> ///// </summary>
//public string IssueTypeName { get; set; } //public string IssueTypeName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary> /// <summary>
/// 状态 0 启用 1 禁用 /// 状态 0 启用 1 禁用
/// </summary> /// </summary>

@ -0,0 +1,57 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Map.Entity
{
/// <summary>
/// 付款方式映射信息
/// </summary>
[SqlSugar.SugarTable("op_map_frt", "付款方式映射信息")]
public class MappingFrt : BaseModel<long>
{
/// <summary>
/// 关联业务id
/// </summary>
public long LinkId { get; set; }
/// <summary>
/// 代码
/// </summary>
[SugarColumn(ColumnDescription = "代码", Length = 100, IsNullable = false)]
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
[SugarColumn(ColumnDescription = "模块", Length = 100, IsNullable = false)]
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
[SugarColumn(ColumnDescription = "映射代码", Length = 100, IsNullable = false)]
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
[SugarColumn(ColumnDescription = "映射名称", Length = 100, IsNullable = true)]
public string MapName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
[SugarColumn(ColumnDescription = "船司Id", IsNullable = true,DefaultValue ="0")]
public long CarrierId { get; set; }
/// <summary>
/// 状态 0启用 1禁用
/// </summary>
[SugarColumn(ColumnDescription = "状态", DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
}
}

@ -41,7 +41,12 @@ namespace DS.WMS.Core.Map.Entity
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "映射名称", Length = 100, IsNullable = true)] [SugarColumn(ColumnDescription = "映射名称", Length = 100, IsNullable = true)]
public string MapName { get; set; } public string MapName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
[SugarColumn(ColumnDescription = "船司Id", IsNullable = true, DefaultValue = "0")]
public long CarrierId { get; set; }
/// <summary> /// <summary>
/// 状态 0启用 1禁用 /// 状态 0启用 1禁用
/// </summary> /// </summary>

@ -0,0 +1,49 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Map.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Map.Interface
{
public interface IMappingFrtService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<MappingFrtRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
DataResult EditMappingFrt(MappingFrtReq req);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<MappingFrtRes> GetMappingFrtInfo(string id);
/// <summary>
/// 删除
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult DelMappingFrt(IdModel req);
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult BatchDelMappingFrt(IdModel req);
}
}

@ -0,0 +1,129 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Map.Dtos;
using DS.WMS.Core.Map.Entity;
using DS.WMS.Core.Map.Interface;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using DS.Module.Core.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Org.BouncyCastle.Ocsp;
using Mapster;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Code.Entity;
namespace DS.WMS.Core.Map.Method
{
public class MappingFrtService : IMappingFrtService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public MappingFrtService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
public DataResult BatchDelMappingFrt(IdModel req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = tenantDb.Queryable<MappingFrt>().Where(x => req.Ids.Contains(x.Id)).ToList();
;
if (list.Count > 0)
{
tenantDb.Deleteable(list).ExecuteCommand();
}
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
}
public DataResult DelMappingFrt(IdModel req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var info = tenantDb.Queryable<MappingFrt>().Where(x => x.Id == long.Parse(req.Id)).First();
if (info == null)
{
return DataResult.Failed("付款方式映射信息不存在!", MultiLanguageConst.MappingFrtNotExist);
}
tenantDb.Deleteable(info).ExecuteCommand();
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
}
public DataResult EditMappingFrt(MappingFrtReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<MappingFrt>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module).Any())
{
return DataResult.Failed("付款方式映射信息已存在!", MultiLanguageConst.MappingFrtExist);
}
var data = req.Adapt<MappingFrt>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<MappingFrt>().Where(x => x.Id == req.Id).First();
info = req.Adapt(info);
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
}
}
public DataResult<List<MappingFrtRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<MappingFrt>()
.Where(whereList)
.Select<MappingFrtRes>()
.Mapper(it =>
{
it.CarrierName = tenantDb.Queryable<InfoClient>().Where(x => x.Id == it.CarrierId).Select(n => n.ShortName).First();
it.FrtName = tenantDb.Queryable<CodeFrt>().Where(x => x.Id == it.LinkId).Select(n => n.FrtName).First();
}
).ToQueryPage(request.PageCondition);
return data;
}
public DataResult<MappingFrtRes> GetMappingFrtInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<MappingFrt>()
.Where(a => a.Id == long.Parse(id))
.Select<MappingFrtRes>()
.Mapper(it =>
{
it.CarrierName = tenantDb.Queryable<InfoClient>().Where(x => x.Id == it.CarrierId).Select(n => n.ShortName).First();
it.FrtName = tenantDb.Queryable<CodeFrt>().Where(x => x.Id == it.LinkId).Select(n => n.FrtName).First();
}
)
.First();
return DataResult<MappingFrtRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// EDI基类
/// </summary>
public class EDIBaseModel
{
/// <summary>
/// 发送方代码 M
/// </summary>
public string SENDCODE { get; set; }
/// <summary>
/// 发送方名称 M
/// </summary>
public string SENDNAME { get; set; }
/// <summary>
/// 接收方代码 M
/// </summary>
public string RECEIVECODE { get; set; }
/// <summary>
/// 文件类型 (B订舱,E SI确认)M
/// </summary>
public string filetype { get; set; }
/// <summary>
/// 文件功能 (9原始,1 更新,5 退舱 )M
/// </summary>
public string filerole { get; set; }
/// <summary>
/// 文件路径 M
/// </summary>
public string filerpath { get; set; }
/// <summary>
/// 是否使用货代代码。 M
/// </summary>
public bool UseForWarderCode { get; set; }
/// <summary>
/// 货代代码。 O
/// </summary>
public string ForWarderCode { get; set; }
/// <summary>
/// 货代名称 O
/// </summary>
public string ForWarderName { get; set; }
/// <summary>
/// 业务信息列表 M
/// </summary>
public List<SeaExportEDIBaseModel> BSLIST { get; set; }
/// <summary>
/// 发送方公司代码
/// </summary>
public string SENDCOMPANYCODE { get; set; }
/// <summary>
/// 发送方部门代码
/// </summary>
public string SENDSUBCOMPANYCODE { get; set; }
/// <summary>
/// 发送方别名代码
/// </summary>
public string ALIASSENDCODE { get; set; }
/// <summary>
/// 发货方代码
/// </summary>
public string SENDSHIPPERCODE { get; set; }
}
}

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 海运出口EDI集装箱的货物信息
/// </summary>
public class SeaExportCtnDetailEDIBaseModel
{
/// <summary>
/// 箱号 M
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// HS编码 M
/// </summary>
public string HSCODE { get; set; }
/// <summary>
/// 唛头 M
/// </summary>
public string MARKS { get; set; }
/// <summary>
/// 货物描述 M
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
/// 件数 M
/// </summary>
public Int32 PKGS { get; set; }
/// <summary>
/// 包装 M
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 包装代码 M
/// </summary>
public string KINDPKGS_EDI_CODE { get; set; }
/// <summary>
/// 重量 M
/// </summary>
public decimal KGS { get; set; }
/// <summary>
/// 体积 M
/// </summary>
public decimal CBM { get; set; }
}
}

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 海运出口EDI集装箱信息
/// </summary>
public class SeaExportCtnEDIBaseModel
{
/// <summary>
/// 箱型EDI代码 M
/// </summary>
public string CTNALLCODE { get; set; }
/// <summary>
///
/// </summary>
public Int32 CTNNUM { get; set; }
/// <summary>
///
/// </summary>
public Int32 TEU { get; set; }
/// <summary>
/// 箱号 M
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// 箱状态
/// </summary>
public string CTNSTATUS { get; set; }
/// <summary>
/// 封号 M
/// </summary>
public string SEALNO { get; set; }
/// <summary>
/// 件数 M
/// </summary>
public Int32 PKGS { get; set; }
/// <summary>
/// 包装 M
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 包装代码 M
/// </summary>
public string KINDPKGS_EDI_CODE { get; set; }
/// <summary>
/// 重量 M
/// </summary>
public decimal KGS { get; set; }
/// <summary>
/// 体积 M
/// </summary>
public decimal CBM { get; set; }
/// <summary>
/// 箱皮重
/// </summary>
public decimal TAREWEIGHT { get; set; }
/// <summary>
/// 称重重量
/// </summary>
public string WEIGHKGS { get; set; }
/// <summary>
/// 称重方式 (累加、总重)
/// </summary>
public string WEIGHTYPE { get; set; }
/// <summary>
/// 称重签名
/// </summary>
public string WEIGHSIGN { get; set; }
}
}

@ -0,0 +1,599 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 海运出口EDI主信息
/// </summary>
public class SeaExportEDIBaseModel
{
/// <summary>
/// 委托方
/// </summary>
public string WEITUO { get; set; }
/// <summary>
/// 操作英文名称 M
/// </summary>
public string OpEName { get; set; }
/// <summary>
/// 操作电话 M
/// </summary>
public string OpTel { get; set; }
/// <summary>
/// 操作邮箱 M
/// </summary>
public string OpEmail { get; set; }
/// <summary>
/// EDI联系人名称 O
/// </summary>
public string EDIATTN { get; set; }
/// <summary>
/// EDI联系人电话 O
/// </summary>
public string EDIATTNTEL { get; set; }
/// <summary>
/// EDI联系人邮箱 O
/// </summary>
public string EDIATTNEMAIL { get; set; }
/// <summary>
/// 订舱编号 O
/// </summary>
public string ORDERNO { get; set; }
/// <summary>
/// 场站 M
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 场站代码 M
/// </summary>
public string YARDEDICODE { get; set; }
/// <summary>
/// 主提单号 M
/// </summary>
public string MBLNO { get; set; }
/// <summary>
/// 付费方式代码 M
/// </summary>
public string BLFRTEDICODE { get; set; }
/// <summary>
/// 付费方式 M
/// </summary>
public string BLFRT { get; set; }
/// <summary>
/// 船名 O
/// </summary>
public string VESSEL { get; set; }
/// <summary>
/// 船舶呼号 O
/// </summary>
public string VESSELID { get; set; }
/// <summary>
/// 航次 O
/// </summary>
public string VOYNO { get; set; }
/// <summary>
/// 内部航次 O
/// </summary>
public string NVOYNO { get; set; }
/// <summary>
/// 开船日期 M
/// </summary>
public string ETD { get; set; }
/// <summary>
/// 预抵日期 M
/// </summary>
public string ETA { get; set; }
/// <summary>
/// 截港日期 O
/// </summary>
public string CLOSINGDATE { get; set; }
/// <summary>
/// EDI备注
/// </summary>
public string EDIREMARK { get; set; }
/// <summary>
/// SI备注
/// </summary>
public string SIREMARK { get; set; }
/// <summary>
/// NVO NO
/// </summary>
public string NVONO { get; set; }
/// <summary>
/// 船公司ID
/// </summary>
public string CARRIERID { get; set; }
/// <summary>
/// 船公司名称 M
/// </summary>
public string CARRIER { get; set; }
/// <summary>
/// 船公司EDI代码 M
/// </summary>
public string CARRIEREDICODE { get; set; }
/// <summary>
/// 发货人 M
/// </summary>
public string SHIPPER { get; set; }
/// <summary>
/// 收货人 M
/// </summary>
public string CONSIGNEE { get; set; }
/// <summary>
/// 通知人 M
/// </summary>
public string NOTIFYPARTY { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
public string NOTIFYPARTY2 { get; set; }
/// <summary>
/// AMS收货人
/// </summary>
public string AMSCONSIGNEE { get; set; }
/// <summary>
/// AMS通知人
/// </summary>
public string AMSNOTIFYPARTY { get; set; }
/// <summary>
/// 收货地所在国家 O
/// </summary>
public string BYCOUNTRY { get; set; }
///// <summary>
///// AMS发货人 O
///// </summary>
//public string AMSSHIPPER { get; set; }
///// <summary>
///// AMS收货人 O
///// </summary>
//public string AMSCONSIGNEE { get; set; }
///// <summary>
///// AMS通知人 O
///// </summary>
//public string AMSNOTIFYPARTY { get; set; }
/// <summary>
/// HS编码
/// </summary>
public string HSCODE { get; set; }
/// <summary>
/// MasterBOLIndicator
/// </summary>
public string MasterBOLIndicator { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string GOODSNAME { get; set; }
/// <summary>
/// 货类代码
/// </summary>
public string GOODCLASSCODE { get; set; }
/// <summary>
/// 唛头 M
/// </summary>
public string MARKS { get; set; }
/// <summary>
/// 货物描述 M
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
/// 收货地代码(每船公司可能不同)
/// </summary>
public string PLACERECEIPTID { get; set; }
/// <summary>
/// 收货地
/// </summary>
public string PLACERECEIPT { get; set; }
/// <summary>
/// 起运港代码(每船公司可能不同) M
/// </summary>
public string PORTLOADID { get; set; }
/// <summary>
/// 起运港 M
/// </summary>
public string PORTLOAD { get; set; }
/// <summary>
///卸货港代码(每船公司可能不同) M
/// </summary>
public string PORTDISCHARGEID { get; set; }
/// <summary>
/// 卸货港 M
/// </summary>
public string PORTDISCHARGE { get; set; }
/// <summary>
///中转港代码
/// </summary>
public string TRANSPORTID { get; set; }
/// <summary>
/// 中转港
/// </summary>
public string TRANSPORT { get; set; }
/// <summary>
///交货地代码M
/// </summary>
public string PLACEDELIVERYID { get; set; }
/// <summary>
/// 交货地 M
/// </summary>
public string PLACEDELIVERY { get; set; }
/// <summary>
///目的地代码(每船公司可能不同)
/// </summary>
public string DESTINATIONID { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string DESTINATION { get; set; }
/// <summary>
/// 件数 M
/// </summary>
public Int32 PKGS { get; set; }
/// <summary>
/// 包装 M
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 包装代码 M
/// </summary>
public string KINDPKGS_EDI_CODE { get; set; }
/// <summary>
/// 重量 M
/// </summary>
public decimal KGS { get; set; }
/// <summary>
/// 体积 M
/// </summary>
public decimal CBM { get; set; }
/// <summary>
/// 货物标识 M
/// </summary>
public string CARGOID { get; set; }
/// <summary>
/// 第一层包装皮重 O
/// </summary>
public decimal KINGTAREWEIGHT { get; set; }
/// <summary>
/// 危险品类别 O
/// </summary>
public string DCLASS { get; set; }
/// <summary>
/// 危险品编号 O
/// </summary>
public string DUNNO { get; set; }
/// <summary>
/// 危险品页号 C
/// </summary>
public string DPAGE { get; set; }
/// <summary>
/// 危险品标签 C
/// </summary>
public string DLABEL { get; set; }
/// <summary>
/// 设置温度 O
/// </summary>
public string TEMPSET { get; set; }
/// <summary>
/// 设置最低温度 C
/// </summary>
public string TEMPMIN { get; set; }
/// <summary>
/// 设置最高温度 C
/// </summary>
public string TEMPMAX { get; set; }
/// <summary>
/// 通风度 O
/// </summary>
public string REEFERF { get; set; }
/// <summary>
/// 湿度
/// </summary>
public string HUMIDITY { get; set; }
/// <summary>
/// 预付地点 O
/// </summary>
public string PREPARDAT { get; set; }
/// <summary>
/// 到付地点 O
/// </summary>
public string PAYABLEAT { get; set; }
/// <summary>
/// 预付地点EDI代码 O
/// </summary>
public string PREPARDATID { get; set; }
/// <summary>
/// 到付地点EDI代码 O
/// </summary>
public string PAYABLEATID { get; set; }
/// <summary>
/// 签单方式 M(SI)
/// </summary>
public string ISSUETYPE { get; set; }
/// <summary>
/// 提单份数 M(SI)
/// </summary>
public string NOBILL { get; set; }
/// <summary>
/// 签单地点 M(SI)
/// </summary>
public string ISSUEPLACE { get; set; }
/// <summary>
/// 签单日期
/// </summary>
public string ISSUEDATE { get; set; }
/// <summary>
/// 提单副本份数 M(SI)
/// </summary>
public string COPYNOBILL { get; set; }
/// <summary>
/// 签单地点EDI代码 M(SI)
/// </summary>
public string ISSUEPLACEID { get; set; }
/// <summary>
/// 运输条款 M
/// </summary>
public string SERVICE { get; set; }
/// <summary>
/// 运费协议号 M
/// </summary>
public string CONTRACTNO { get; set; }
/// <summary>
/// 服务合同号
/// </summary>
public string SERVICECONTRACTNO { get; set; }
/// <summary>
/// ESL航线代码 M
/// </summary>
public string ESLLINECODE { get; set; }
/// <summary>
/// 收货人邮编 O
/// </summary>
public string CONSIGNEEPOSTCODE { get; set; }
/// <summary>
/// 收货人国家 O
/// </summary>
public string CONSIGNEECOUNTRY { get; set; }
/// <summary>
/// 收货人税号 O
/// </summary>
public string CONSIGNEETAXNO { get; set; }
/// <summary>
/// 通知人邮编 O
/// </summary>
public string NOTIFYPARTYPOSTCODE { get; set; }
/// <summary>
/// 通知人国家 O
/// </summary>
public string NOTIFYPARTYCOUNTRY { get; set; }
/// <summary>
/// 通知人税号 O
/// </summary>
public string NOTIFYPARTYTAXNO { get; set; }
/// <summary>
/// 货物NCM编号 O
/// </summary>
public string GOODSNCM { get; set; }
/// <summary>
/// 收货人DOOR地址 O
/// </summary>
public string CONSIGNEEDOORADDR { get; set; }
/// <summary>
/// 发货人DOOR地址 O
/// </summary>
public string SHIPPERDOORADDR { get; set; }
/// <summary>
/// SCAC代码 O
/// </summary>
public string SCACCODE { get; set; }
/// <summary>
/// ITN编号 O
/// </summary>
public string ITNCODE { get; set; }
/// <summary>
/// 付费方 O
/// </summary>
public string FREIGHTPAYER { get; set; }
/// <summary>
/// AMS代码 O
/// </summary>
public string AMSCODE { get; set; }
/// <summary>
/// 是否SOC箱 O
/// </summary>
public bool ISCONTAINERSOC { get; set; }
/// <summary>
/// 拆并单列表 O
/// </summary>
public string BSNOLIST { get; set; }
/// <summary>
/// 集装箱明细 M
/// </summary>
public List<SeaExportCtnEDIBaseModel> CTNLIST { get; set; }
/// <summary>
/// 集装箱多品名明细 M
/// </summary>
public List<SeaExportCtnDetailEDIBaseModel> CTNGOODSLIST { get; set; }
/// <summary>
/// 收货人EDI代码 O
/// </summary>
public string ConsigneeEdiCode { get; set; }
/// <summary>
/// 发货人EDI代码 O
/// </summary>
public string ShipperEdiCode { get; set; }
/// <summary>
/// 太平销售的代码 M
/// </summary>
public string SalesRepCode { get; set; }
/// <summary>
/// ACI HBL O(加拿大)
/// </summary>
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C O(加拿大)
/// </summary>
public string S0CC0C { get; set; }
/// <summary>
/// '欧盟港口、伊朗港口、KHI'
/// </summary>
public string cKHI { get; set; }
/// <summary>
/// '南美东'
/// </summary>
public string cNCM { get; set; }
/// <summary>
/// '巴西线的木质包装情况'
/// </summary>
public string wNCM { get; set; }
/*
YML)
*/
/// <summary>
/// ERN CODE
/// </summary>
public string ERNCODE { get; set; }
/// <summary>
/// TAC CODE
/// </summary>
public string TACCODE { get; set; }
/// <summary>
/// VAE CODE
/// </summary>
public string VAECODE { get; set; }
/// <summary>
/// FEC CODE
/// </summary>
public string FECCODE { get; set; }
/// <summary>
/// 订舱人说明
/// </summary>
public string ORDERREMARK { get; set; }
/// <summary>
/// 运输条款EDI代码 M
/// </summary>
public string SERVICEEDICODE { get; set; }
/// <summary>
/// 商品代码
/// </summary>
public string GOODSCODE { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
}
}

@ -0,0 +1,196 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 海运出口Edi请求
/// </summary>
public class SeaExportEdiReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 委托方
/// </summary>
[Description("委托方")]
public string CustomerName { get; set; }
/// <summary>
/// 发送方EDI代码
/// </summary>
public string SendCode { get; set; }
/// <summary>
/// 接收方EDI代码
/// </summary>
public string ReceiveCode { get; set; }
/// <summary>
/// 通知方EDI代码
/// </summary>
public string NotifyCdoe { get; set; }
/// <summary>
/// 销售EDI代码
/// </summary>
public string SalerCode { get; set; }
/// <summary>
/// Master Bol Indicator
/// </summary>
public string MasterBolIndicator { get; set; }
/// <summary>
/// EMANIFEST HBL
/// </summary>
public string EmanifestHbl { get; set; }
/// <summary>
/// 收货人EDI代码
/// </summary>
public string ConsigneeEdiCode { get; set; }
/// <summary>
/// 发货人EDI代码
/// </summary>
public string ShipperEdiCode { get; set; }
/// <summary>
/// EDI联系人名称
/// </summary>
public string EDIAttn { get; set; }
/// <summary>
/// EDI联系人电话
/// </summary>
public string EDIAttnTel { get; set; }
/// <summary>
/// EDI联系人邮箱
/// </summary>
public string EDIAttnMail { get; set; }
/// <summary>
/// AMS收货人
/// </summary>
public string AMSConsignee { get; set; }
/// <summary>
/// AMS通知人
/// </summary>
public string AMSNotifyParty { get; set; }
/// <summary>
/// 操作英文名称
/// </summary>
public string OpEName { get; set; }
/// <summary>
/// 操作电话
/// </summary>
public string OpTel { get; set; }
/// <summary>
/// 操作邮箱
/// </summary>
public string OpEmail { get; set; }
/// <summary>
/// ACI HBL
/// </summary>
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C
/// </summary>
public string S0CC0C { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// Master Bol Indicator名称
/// </summary>
public string MasterBolIndicatorName { get; set; }
/// <summary>
/// 销售EDI名称
/// </summary>
public string SalerCodeName { get; set; }
/// <summary>
/// 欧盟港口、伊朗港口、KHI
/// </summary>
public string CKHI { get; set; }
/// <summary>
/// 南美东
/// </summary>
public string CNCM { get; set; }
/// <summary>
/// 巴西线的木质包装情况
/// </summary>
public string WNCM { get; set; }
/// <summary>
/// 订舱人说明
/// </summary>
public string OrderRemark { get; set; }
/// <summary>
/// 辅助字段1
/// </summary>
public string ExRemark1 { get; set; }
/// <summary>
/// 辅助字段2
/// </summary>
public string ExRemark2 { get; set; }
/// <summary>
/// 辅助字段3
/// </summary>
public string ExRemark3 { get; set; }
/// <summary>
/// 辅助字段4
/// </summary>
public string ExRemark4 { get; set; }
/// <summary>
/// 第一层包装皮重
/// </summary>
public decimal? KingTareweight { get; set; }
/// <summary>
/// 箱满仓业务员
/// </summary>
public string XMCYWY { get; set; }
/// <summary>
/// EMC Name accout
/// </summary>
public string EmcNameAccount { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
}
}

@ -0,0 +1,197 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 海运出口Edi返回
/// </summary>
public class SeaExportEdiRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 委托方
/// </summary>
[Description("委托方")]
public string CustomerName { get; set; }
/// <summary>
/// 发送方EDI代码
/// </summary>
public string SendCode { get; set; }
/// <summary>
/// 接收方EDI代码
/// </summary>
public string ReceiveCode { get; set; }
/// <summary>
/// 通知方EDI代码
/// </summary>
public string NotifyCdoe { get; set; }
/// <summary>
/// 销售EDI代码
/// </summary>
public string SalerCode { get; set; }
/// <summary>
/// Master Bol Indicator
/// </summary>
public string MasterBolIndicator { get; set; }
/// <summary>
/// EMANIFEST HBL
/// </summary>
public string EmanifestHbl { get; set; }
/// <summary>
/// 收货人EDI代码
/// </summary>
public string ConsigneeEdiCode { get; set; }
/// <summary>
/// 发货人EDI代码
/// </summary>
public string ShipperEdiCode { get; set; }
/// <summary>
/// EDI联系人名称
/// </summary>
public string EDIAttn { get; set; }
/// <summary>
/// EDI联系人电话
/// </summary>
public string EDIAttnTel { get; set; }
/// <summary>
/// EDI联系人邮箱
/// </summary>
public string EDIAttnMail { get; set; }
/// <summary>
/// AMS收货人
/// </summary>
public string AMSConsignee { get; set; }
/// <summary>
/// AMS通知人
/// </summary>
public string AMSNotifyParty { get; set; }
/// <summary>
/// 操作英文名称
/// </summary>
public string OpEName { get; set; }
/// <summary>
/// 操作电话
/// </summary>
public string OpTel { get; set; }
/// <summary>
/// 操作邮箱
/// </summary>
public string OpEmail { get; set; }
/// <summary>
/// ACI HBL
/// </summary>
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C
/// </summary>
public string S0CC0C { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// Master Bol Indicator名称
/// </summary>
public string MasterBolIndicatorName { get; set; }
/// <summary>
/// 销售EDI名称
/// </summary>
public string SalerCodeName { get; set; }
/// <summary>
/// 欧盟港口、伊朗港口、KHI
/// </summary>
public string CKHI { get; set; }
/// <summary>
/// 南美东
/// </summary>
public string CNCM { get; set; }
/// <summary>
/// 巴西线的木质包装情况
/// </summary>
public string WNCM { get; set; }
/// <summary>
/// 订舱人说明
/// </summary>
public string OrderRemark { get; set; }
/// <summary>
/// 辅助字段1
/// </summary>
public string ExRemark1 { get; set; }
/// <summary>
/// 辅助字段2
/// </summary>
public string ExRemark2 { get; set; }
/// <summary>
/// 辅助字段3
/// </summary>
public string ExRemark3 { get; set; }
/// <summary>
/// 辅助字段4
/// </summary>
public string ExRemark4 { get; set; }
/// <summary>
/// 第一层包装皮重
/// </summary>
public decimal? KingTareweight { get; set; }
/// <summary>
/// 箱满仓业务员
/// </summary>
public string XMCYWY { get; set; }
/// <summary>
/// EMC Name accout
/// </summary>
public string EmcNameAccount { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
}
}

@ -18,6 +18,12 @@ public class SeaExportReq
/// </summary> /// </summary>
public List<OpCtnReq> CtnInfo { get; set; } public List<OpCtnReq> CtnInfo { get; set; }
/// <summary>
/// Edi信息
/// </summary>
public SeaExportEdiReq EdiInfo { get; set; }
/// <summary> /// <summary>
/// 主单Id /// 主单Id
/// </summary> /// </summary>
@ -311,7 +317,10 @@ public class SeaExportReq
/// 货物描述 /// 货物描述
/// </summary> /// </summary>
public string Description { get; set; } public string Description { get; set; }
/// <summary>
/// 品名Id
/// </summary>
public long GoodsId { get; set; }
/// <summary> /// <summary>
/// 品名 t_code_goods /// 品名 t_code_goods
/// </summary> /// </summary>
@ -572,10 +581,10 @@ public class SeaExportReq
/// </summary> /// </summary>
public string BookingType { get; set; } public string BookingType { get; set; }
///// <summary> /// <summary>
///// 订舱编号 /// 订舱编号
///// </summary> /// </summary>
//public string BookingNo { get; set; } public string BookingNo { get; set; }
/// <summary> /// <summary>
/// Desc:保险人 /// Desc:保险人
@ -1053,6 +1062,23 @@ public class SeaExportReq
/// 通知人 t_info_client CUSTNAME /// 通知人 t_info_client CUSTNAME
/// </summary> /// </summary>
public string NotifyParty { get; set; } public string NotifyParty { get; set; }
/// <summary>
/// 内部航次
/// </summary>
public string InnerVoyno { get; set; }
/// <summary>
/// 第二通知人Id t_info_client CUSTNAME
/// </summary>
public long? SecondNotifyPartyId { get; set; }
/// <summary>
/// 第二通知人 t_info_client CUSTNAME
/// </summary>
public string SecondNotifyParty { get; set; }
/// <summary>
/// 第二通知人内容
/// </summary>
public string SecondNotifyPartyContent { get; set; }
} }
/// <summary> /// <summary>

@ -8,6 +8,10 @@ namespace DS.WMS.Core.Op.Dtos;
/// </summary> /// </summary>
public class SeaExportRes public class SeaExportRes
{ {
/// <summary>
/// Edi信息
/// </summary>
public SeaExportEdiRes EdiInfo { get; set; }
/// <summary> /// <summary>
/// 主键Id /// 主键Id
/// </summary> /// </summary>
@ -322,7 +326,10 @@ public class SeaExportRes
/// 品名 t_code_goods /// 品名 t_code_goods
/// </summary> /// </summary>
public string GoodsName { get; set; } public string GoodsName { get; set; }
/// <summary>
/// 品名Id
/// </summary>
public long GoodsId { get; set; }
/// <summary> /// <summary>
/// 货物毛重 /// 货物毛重
/// </summary> /// </summary>
@ -579,10 +586,10 @@ public class SeaExportRes
/// </summary> /// </summary>
public string BookingType { get; set; } public string BookingType { get; set; }
///// <summary> /// <summary>
///// 订舱编号 /// 订舱编号
///// </summary> /// </summary>
//public string BookingNo { get; set; } public string BookingNo { get; set; }
/// <summary> /// <summary>
/// Desc:保险人 /// Desc:保险人
@ -1087,4 +1094,20 @@ public class SeaExportRes
/// 通知人 t_info_client CUSTNAME /// 通知人 t_info_client CUSTNAME
/// </summary> /// </summary>
public string NotifyParty { get; set; } public string NotifyParty { get; set; }
/// <summary>
/// 内部航次
/// </summary>
public string InnerVoyno { get; set; }
/// <summary>
/// 第二通知人Id t_info_client CUSTNAME
/// </summary>
public long? SecondNotifyPartyId { get; set; }
/// <summary>
/// 第二通知人 t_info_client CUSTNAME
/// </summary>
public string SecondNotifyParty { get; set; }
/// <summary>
/// 第二通知人内容
/// </summary>
public string SecondNotifyPartyContent { get; set; }
} }

File diff suppressed because it is too large Load Diff

@ -0,0 +1,63 @@
using DS.Module.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.EDI
{
/// <summary>
/// Edi 返回
/// </summary>
public class EdiDataResult
{
/// <summary>
/// 获取 是否成功
/// </summary>
public bool Succeeded = false;
/// <summary>
/// 获取或设置 返回消息
/// </summary>
public string Message { get; set; }
/// <summary>
/// 返回
/// </summary>
public string Data { get; set; }
/// <summary>
/// 拓展数据1
/// </summary>
public string ExtraData1 { get; set; }
/// <summary>
/// 拓展数据1
/// </summary>
public string ExtraData2 { get; set; }
/// <summary>
///
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public static EdiDataResult Failed(string message)
{
return new EdiDataResult()
{
Succeeded = false,
Message = message
};
}
/// <summary>
///
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public static EdiDataResult Success(string message)
{
return new EdiDataResult()
{
Succeeded = true,
Message = message
};
}
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.EDI
{
/// <summary>
///
/// </summary>
public class EmailApiDto
{
public string SendTo { get; set; }
public string Title { get; set; }
public string Body { get; set; }
public string SmtpConfig { get; set; } = "NOREPLAY";
public bool isCallback { get; set; } = false;
public List<AttachesInfo> Attaches { get; set; }
}
public class AttachesInfo
{
public string AttachName { get; set; }
public string AttachContent { get; set; }
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,344 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Logger = NLog.Logger;
using NLog;
namespace DS.WMS.Core.Op.EDI
{
/// <summary>
/// VOLTA EDI帮助类
/// </summary>
public static class VOLTAEdiHelper
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
#region 生成VOLTA申报报文截单
/// <summary>
/// 生成VOLTA申报报文截单
/// </summary>
/// <param name="model">VOLTA申报详情</param>
/// <returns>返回回执</returns>
public static EdiDataResult CreateEdiVOLTA(VOLTAEDIBaseModel model)
{
var result = new EdiDataResult { Succeeded = false };
//日志
//var logger = Log.CreateLogger(nameof(VOLTAEdiHelper));
try
{
ValidateInput(model);
string bno = model.BookingId;
string filePath = model.FilePath + "\\" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
//预先创建目录
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
string filename = filePath + "\\" + bno + ".txt";
//如果是部署linux需要修改路径
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
filename = filename.Replace("\\", "/");
FileStream f = new FileStream(filename, FileMode.Create);
StreamWriter r = new StreamWriter(f, Encoding.Default);
DateTime nowDate = DateTime.Now;
r.WriteLine("<FROMSHIPPER>FROMSHIPPER</FROMSHIPPER>");
//订舱号
r.WriteLine("<bok>" + model.BookingId + "</bok>");
//发货人
r.WriteLine("<spr>" + model.ShpperName + "</spr>");
//发货人地址
r.WriteLine("<sad>");
r.WriteLine(model.ShpperAddr);
r.WriteLine("</sad>");
//收货人
r.WriteLine("<cne>" + model.ConsigneeName + "</cne>");
//收货人地址
r.WriteLine("<cad>");
r.WriteLine(model.ConsigneeAddr);
r.WriteLine("</cad>");
//通知人
r.WriteLine("<nfy>" + model.NotifyName + "</nfy>");
//通知人地址
r.WriteLine("<nad>");
r.WriteLine(model.NotifyAddr);
r.WriteLine("</nad>");
//通知人1
if (!string.IsNullOrWhiteSpace(model.NotifySecondName))
{
r.WriteLine("<nf1>" + model.NotifySecondName + "</nf1>");
}
else
{
r.WriteLine("<nf1></nf1>");
}
//通知人1地址
if (!string.IsNullOrWhiteSpace(model.NotifySecondName))
{
r.WriteLine("<na1>");
r.WriteLine(model.ConsigneeAddr);
r.WriteLine("</na1>");
}
else
{
r.WriteLine("<na1>");
r.WriteLine("");
r.WriteLine("</na1>");
}
//发货地
r.WriteLine("<Poo>" + model.PlaceOfOrigin + "</Poo>");
//起运港
r.WriteLine("<pol>" + model.LoadPort + "</pol>");
//卸货港
r.WriteLine("<pod>" + model.DischargePort + "</pod>");
//最终目的港
r.WriteLine("<fpd>" + model.FinalDestination + "</fpd>");
//最终交货地
r.WriteLine("<pdy>" + model.PlaceOfDelivery + "</pdy>");
//PlaceOfReceipt
r.WriteLine("<por></por>");
//提单正本份数默认3
r.WriteLine("<nob>3</nob>");
//提单状态(默认S) S-SHIPPED ON BOARD;R-RECEIVED FOR SHIPMENT;T-THRO BL
r.WriteLine("<blt>S</blt>");
//重量单位默认1 1-KGS2-TON3-QUINTAL4-MT5-CENTIMETER6-METER7-INCH
r.WriteLine("<uom>1</uom>");
//Payable At
r.WriteLine("<pat></pat>");
//Prepaid / Collect(默认P) P-PREPAIDC-COLLECT
r.WriteLine("<fst>P</fst>");
//EDNumber
r.WriteLine("<edn></edn>");
//货描
r.WriteLine("<des>");
r.WriteLine(model.CargoDescription);
r.WriteLine("</des>");
//唛头
r.WriteLine("<cmn>");
r.WriteLine(model.Marks);
r.WriteLine("</cmn>");
//模板版本号
r.WriteLine("<ver>");
r.WriteLine(model.TemplateVersion);
r.WriteLine("</ver>");
//箱明细
r.WriteLine("<cnt>");
r.Write(GetContaInfo(model.ContaList));
r.WriteLine("</cnt>");
r.Close();
f.Close();
result.Succeeded = true;
result.ExtraData1 = filename;
result.ExtraData2 = $"截单样本:{model.Vessel} {model.VoyNo} {model.BookingId}";
return result;
}
catch (Exception ex)
{
result.Succeeded = false;
result.Message = ex.Message;
return result;
}
//return result;
}
#endregion
#region 拼接箱明细报文
/// <summary>
/// 拼接箱明细报文
/// </summary>
/// <param name="contaList">箱明细</param>
/// <returns>返回拼接后字符</returns>
private static string GetContaInfo(List<VOLTAEDIContaModel> contaList)
{
StringBuilder txtBuilder = new StringBuilder();
////日志
//var logger = Log.CreateLogger(nameof(VOLTAEdiHelper));
try
{
contaList.ForEach(ctn =>
{
//箱拼接格式:序号~箱号~铅封号~Custom Seal No~毛重~净重~尺码~重量单位~~件数~~~包装
txtBuilder.AppendLine($"{ctn.SNo}~{ctn.ContaNo}~{ctn.SealNo}~~{ctn.GWt.Value.ToString("0.###")}~{(ctn.NWt.HasValue ? ctn.NWt.Value.ToString("0.###") : "")}~{ctn.CBM.Value.ToString("0.###")}~{ctn.WTUnit}~~{ctn.Qty.Value.ToString("#.###")}~~~{ctn.EdiPkgs}");
});
}
catch (Exception ex)
{
logger.Info("VOLTA拼接箱明细异常,原因:{0}", ex.Message);
throw ex;
}
return txtBuilder.ToString();
}
#endregion
#region 校验VOLTA请求参数s
/// <summary>
/// 校验VOLTA请求参数
/// </summary>
/// <param name="model">VOLTA请求参数</param>
public static void ValidateInput(VOLTAEDIBaseModel model)
{
StringBuilder msgBuilder = new StringBuilder();
if (string.IsNullOrEmpty(model.BookingId))
msgBuilder.AppendLine("提单号不能为空");
if (string.IsNullOrEmpty(model.ShpperName))
msgBuilder.AppendLine("发货人名称不能为空");
if (string.IsNullOrEmpty(model.ShpperAddr))
msgBuilder.AppendLine("发货人地址不能为空");
if (!string.IsNullOrEmpty(model.ShpperAddr))
{
if (model.ShpperAddr.Length > 450)
msgBuilder.AppendLine("发货人地址不能大于450个字符");
}
if (string.IsNullOrEmpty(model.ConsigneeName))
msgBuilder.AppendLine("收货人名称不能为空");
if (string.IsNullOrEmpty(model.ConsigneeAddr))
msgBuilder.AppendLine("收货人地址不能为空");
if (!string.IsNullOrEmpty(model.ConsigneeAddr))
{
if (model.ConsigneeAddr.Length > 450)
msgBuilder.AppendLine("收货人地址不能大于450个字符");
}
if (string.IsNullOrEmpty(model.NotifyName))
msgBuilder.AppendLine("通知人名称不能为空");
if (string.IsNullOrEmpty(model.NotifyAddr))
msgBuilder.AppendLine("通知人地址不能为空");
if (!string.IsNullOrEmpty(model.NotifyAddr))
{
if (model.NotifyAddr.Length > 450)
msgBuilder.AppendLine("通知人地址不能大于450个字符");
}
if (!string.IsNullOrEmpty(model.NotifySecondName) && string.IsNullOrEmpty(model.NotifySecondAddr))
msgBuilder.AppendLine("通知人1地址不能为空");
if (string.IsNullOrEmpty(model.NotifySecondName) && !string.IsNullOrEmpty(model.NotifySecondAddr))
msgBuilder.AppendLine("通知人1名称不能为空");
if (!string.IsNullOrEmpty(model.NotifySecondAddr))
{
if (model.NotifySecondAddr.Length > 450)
msgBuilder.AppendLine("通知人1地址不能大于450个字符");
}
if (string.IsNullOrEmpty(model.PlaceOfOrigin))
msgBuilder.AppendLine("发货地不能为空");
if (string.IsNullOrEmpty(model.LoadPort))
msgBuilder.AppendLine("起运港不能为空");
if (string.IsNullOrEmpty(model.DischargePort))
msgBuilder.AppendLine("卸货港不能为空");
if (string.IsNullOrEmpty(model.FinalDestination))
msgBuilder.AppendLine("最终目的港不能为空");
if (string.IsNullOrEmpty(model.PlaceOfDelivery))
msgBuilder.AppendLine("最终交货地不能为空");
if (string.IsNullOrEmpty(model.CargoDescription))
msgBuilder.AppendLine("品名不能为空");
if (!string.IsNullOrEmpty(model.CargoDescription))
{
if (model.CargoDescription.Length > 3000)
msgBuilder.AppendLine("品名不能大于3000个字符");
}
if (string.IsNullOrEmpty(model.Marks))
msgBuilder.AppendLine("唛头不能为空");
if (!string.IsNullOrEmpty(model.Marks))
{
if (model.Marks.Length > 1000)
msgBuilder.AppendLine("唛头不能大于1000个字符");
}
if (model.ContaList == null || model.ContaList.Count == 0)
msgBuilder.AppendLine("箱明细不能为空");
model.ContaList.ForEach(ctn =>
{
StringBuilder ctnMsgBuilder = new StringBuilder();
if (string.IsNullOrWhiteSpace(ctn.ContaNo))
{
ctnMsgBuilder.Append("箱号不能为空;");
}
else
{
if (ctn.ContaNo.Length > 11)
{
ctnMsgBuilder.Append("箱号长度不能大于11");
}
}
if (string.IsNullOrWhiteSpace(ctn.SealNo))
{
ctnMsgBuilder.Append("铅封号不能为空;");
}
if (!ctn.GWt.HasValue)
{
ctnMsgBuilder.Append("毛重不能为空;");
}
if (!ctn.CBM.HasValue)
{
ctnMsgBuilder.Append("尺寸不能为空;");
}
if (!ctn.Qty.HasValue)
{
ctnMsgBuilder.Append("件数不能为空;");
}
if (string.IsNullOrWhiteSpace(ctn.EdiPkgs))
{
ctnMsgBuilder.Append("包装不能为空;");
}
if (ctnMsgBuilder.Length > 0)
{
msgBuilder.AppendLine($"箱【{ctn.SNo}】{ctnMsgBuilder.ToString()}");
}
});
if (msgBuilder.Length > 0)
throw new Exception(msgBuilder.ToString());
}
#endregion
}
}

@ -0,0 +1,956 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.EDI
{
/// <summary>
///
/// </summary>
public class WYEdiHelper
{
public WYEdiHelper()
{
}
#region 基本函数
public static string GetBillNum2(string str)
{
if (str == "ZERO") return "00";
if (str == "ONE") return "01";
if (str == "TWO") return "02";
if (str == "THREE") return "03";
if (str == "FOUR") return "04";
if (str == "FIVE") return "05";
if (str == "SIX") return "06";
if (str == "SERVEN") return "07";
if (str == "EIGHT") return "08";
if (str == "NINE") return "09";
if (str == "TEN") return "10";
else return "";
}
public static string GetDateStr(string datestr, string dateformat)
{
var result = "";
if (datestr == null || datestr == "")
{
result = "";
}
else
{
result = Convert.ToDateTime(datestr).ToString(dateformat);
}
return result;
}
#region 判断中文字符
public static bool IsChinese(char c)
{
return (int)c > 0x80;
}
public static bool StringIsChinese(string str)
{
var result = false;
for (int i = 1; i < str.Length; i++)
{
if (IsChinese(str[i]))
{
result = true;
return result;
}
}
for (int i = 0; i < str.Length; i++)
{
string stemp = str.Substring(i, 1);
int ilen = System.Text.Encoding.Default.GetByteCount(stemp);
if (ilen == 2)
{
result = true;
return result;
}
}
return result;
}
#endregion
public static string formatListStr(List<System.String> DestList, int lineCount, bool isformat = false)
{
var result = "";
for (var i = 0; i < lineCount; i++)
{
if (DestList.Count > i)
{
if (isformat)
result = result + formatEdiStr("txt", DestList[i]);
else
result = result + DestList[i];
}
if (i != (lineCount - 1))
result = result + ":";
}
return result;
}
#region 文本字段判断每行是否符合
/// <summary>
/// edi 文本格式处理判断例如1行35个字符不超过5行
/// </summary>
/// <param name="fileType">文件类型例如txt、xml</param>
/// <param name="str">要处理的数据</param>
/// <param name="length">每行长度</param>
/// <param name="sMBLNO">主提单号</param>
/// <param name="sType">数据类型(例如:发货人内容、货描等)</param>
/// <param name="rowNum">限制录入的行数“0”代表不限制</param>
/// <param name="sSymbol">限录后多出的放到货描中的数据的连接符(例如:“*”发货人内容、“**”收件人等)</param>
/// <returns></returns>
public static System.String formatlengthError(string fileType, string str, int length, string sMBLNO, string sType, int rowNum, string sSymbol, bool isHuoMiao)
{
string error = "";
string Shipping = str;
if (fileType == "txt")
{
Shipping = formatEdiStr("txt", str);
}
else if (fileType == "xml")
{
Shipping = formatEdiStr("txt", str);
}
string[] argAGENT = Shipping.Split(new string[] { "\r\n" }, StringSplitOptions.None);
if (argAGENT.Length > 0)
{
if (argAGENT.Length == 1)
{
argAGENT = Shipping.Split(new string[] { "\n" }, StringSplitOptions.None);
if (argAGENT.Length > 0)
{
if (argAGENT.Length > rowNum && rowNum != 0)
{
if (isHuoMiao)
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 不允许录入超过" + rowNum + "行数据!";
}
else
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 不允许录入超过" + rowNum + "行数据,多余信息请手动以“" + sSymbol + "”号开头放到货物描述中!(例如:“货描内容" + sSymbol + "超出部分”)";
}
}
for (int j = 0; j < argAGENT.Length; j++)
{
//List<System.String> AgentList = formatlengthStr(argAGENT[j].ToString(), 35);
if (argAGENT[j].ToString().Length > length)
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 第" + (j + 1) + "行超过" + length + "个字符";
}
}
}
}
else
{
if (argAGENT.Length > rowNum && rowNum != 0)
{
if (isHuoMiao)
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 不允许录入超过" + rowNum + "行数据!";
}
else
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 不允许录入超过" + rowNum + "行数据,多余信息请手动以“" + sSymbol + "”号开头放到货物描述中!(例如:“货描内容" + sSymbol + "超出部分”)";
}
}
for (int j = 0; j < argAGENT.Length; j++)
{
//List<System.String> AgentList = formatlengthStr(argAGENT[j].ToString(), 35);
if (argAGENT[j].ToString().Length > length)
{
error = error + "<br />提单号:" + sMBLNO + " " + sType + " 第" + (j + 1) + "行超过" + length + "个字符";
}
}
}
}
return error;
}
#endregion
#region 字符转义
/// <summary>
/// 各种文本转义字符
/// </summary>
/// <param name="fileType">文件类型例如txt、xml</param>
/// <param name="str">文本字符串</param>
/// <returns></returns>
public static string formatEdiStr(string fileType, string str)
{
if (str == null)
str = string.Empty;
if (fileType == "txt")
{
return str.Replace("?", "??").Replace(":", "?:").Replace("+", "?+").Replace("'", "?'");
}
else if (fileType == "xml")
{
return str.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;").Replace("\"", "&quot;").Replace("'", "&apos;");
}
else if (fileType == "sitc")
{
return str.Replace("?", "??").Replace(":", "?:").Replace("'", "?'");
}
else
{
return str;
}
}
#endregion
#region 格式化每行
public static List<System.String> formatlengthStr(string str, int length, bool formatstr = false, bool nodelsp = false)
{
str = str.Replace("\r\n", "\\");
str = str.Replace("\n", "\\");
str = str.Replace("\r", " ");
string[] StrList = str.Split('\\');
var strtemp = "";
var strnewline = "";
var strtempnewline = "";
char[] spstring = { ' ', ';', ',', '.', ':', '/', '(', ')', '?', '+', '-' };
List<System.String> DestList = new List<System.String>();
for (var i = 0; i <= StrList.Length - 1; i++)
{
if (StrList[i].Length <= length)
{
if (formatstr)
DestList.Add(formatEdiStr("txt", StrList[i]));
else
DestList.Add(StrList[i]);
}
else
{
strtemp = StrList[i] + " ";
strtempnewline = "";
strnewline = "";
for (var j = 0; j < strtemp.Length; j++)
{
strtempnewline = strtempnewline + strtemp[j];
if (strtemp[j] == ' ' || strtemp[j] == ':' || strtemp[j] == ',' || strtemp[j] == '.' || strtemp[j] == ':' || strtemp[j] == '/'
|| strtemp[j] == '?' || strtemp[j] == ')' || strtemp[j] == '}' || strtemp[j] == '+' || strtemp[j] == '-')
{
if ((strnewline.Length + strtempnewline.Length) <= length)
strnewline = strnewline + strtempnewline;
else
{
if (formatstr)
DestList.Add(formatEdiStr("txt", strnewline));
else
DestList.Add(strnewline);
strnewline = strtempnewline;
}
strtempnewline = "";
}
}
if (nodelsp)
{
if (formatstr)
DestList.Add(formatEdiStr("txt", strnewline));
else DestList.Add(strnewline);
}
else if (strnewline.Trim() != "")
{
if (formatstr)
DestList.Add(formatEdiStr("txt", strnewline));
else DestList.Add(strnewline);
}
}
}
return DestList;
}
#endregion
#endregion
#region 检查
public static string IsCreateWYEDI(EDIBaseModel InttrEdi)
{
var error = "";
if (string.IsNullOrEmpty(InttrEdi.SENDCODE))
{ error = error + "<br />发送方代码不能为空"; }
if (string.IsNullOrEmpty(InttrEdi.SENDNAME))
{ error = error + "<br />发送方名称不能为空"; }
if (string.IsNullOrEmpty(InttrEdi.RECEIVECODE))
{ error = error + "<br />接收方代码不能为空"; }
//2023-03-03 确认需要增加货代名称不能为空,这里对比东胜是填的订舱代理名称,这里需要人工填写
if (string.IsNullOrEmpty(InttrEdi.ForWarderName))
{ error = error + "<br />货代称呼不能为空"; }
//if (InttrEdi.filetype == "B")
//{
// if (InttrEdi.UseForWarderCode)
// {
// if (string.IsNullOrEmpty(InttrEdi.ForWarderCode))
// { error = error + "<br />货代代码不能为空"; }
// if (string.IsNullOrEmpty(InttrEdi.ForWarderName))
// { error = error + "<br />货代称呼不能为空"; }
// }
//}
foreach (var headData in InttrEdi.BSLIST)
{
if (string.IsNullOrEmpty(headData.MBLNO))
{ error = error + "<br />主提单号不能为空"; }
if (string.IsNullOrEmpty(headData.BLFRT))
{ error = error + "<br />提单号:" + headData.MBLNO + " 付费方式不能为空"; }
if (string.IsNullOrEmpty(headData.ETD))
{
if (string.IsNullOrEmpty(headData.VESSEL))
{ error = error + "<br />提单号:" + headData.MBLNO + " 船名不能为空"; }
if (string.IsNullOrEmpty(headData.VOYNO))
{ error = error + "<br />提单号:" + headData.MBLNO + " 航次不能为空"; }
}
if (string.IsNullOrEmpty(headData.PORTLOADID) || headData.PORTLOADID.Length != 5)
{ error = error + "<br />提单号:" + headData.MBLNO + " 装货港代码不能为空或录入不正确(必须是5位代码)"; }
if (string.IsNullOrEmpty(headData.PORTLOAD))
{ error = error + "<br />提单号:" + headData.MBLNO + " 装货港不能为空"; }
if (string.IsNullOrEmpty(headData.PORTDISCHARGEID) || headData.PORTDISCHARGEID.Length != 5)
{ error = error + "<br />提单号:" + headData.MBLNO + " 卸货港代码不能为空或录入不正确(必须是5位代码)"; }
if (string.IsNullOrEmpty(headData.PORTDISCHARGE))
{ error = error + "<br />提单号:" + headData.MBLNO + " 卸货港不能为空"; }
if (string.IsNullOrEmpty(headData.PLACEDELIVERY) || headData.PLACEDELIVERYID.Length != 5)
{ error = error + "<br />提单号:" + headData.MBLNO + " 交货地代码不能为空或录入不正确(必须是5位代码)"; }
if (string.IsNullOrEmpty(headData.PLACEDELIVERY))
{ error = error + "<br />提单号:" + headData.MBLNO + " 交货地不能为空"; }
if (string.IsNullOrEmpty(headData.DESTINATION))
{
if (string.IsNullOrEmpty(headData.DESTINATIONID) || headData.DESTINATIONID.Length != 5)
{ error = error + "<br />提单号:" + headData.MBLNO + " 目的地代码不能为空或录入不正确(必须是5位代码)"; }
}
if (string.IsNullOrEmpty(headData.KINDPKGS_EDI_CODE))
{ error = error + "<br />提单号:" + headData.MBLNO + " 包装EDI代码不能为空"; }
if (headData.PKGS == 0)
{ error = error + "<br />提单号:" + headData.MBLNO + " 件数不能为0"; }
if (headData.KGS == 0)
{ error = error + "<br />提单号:" + headData.MBLNO + " 毛重不能为0"; }
if (headData.CBM == 0)
{ error = error + "<br />提单号:" + headData.MBLNO + " 尺码不能为0"; }
if (string.IsNullOrEmpty(headData.CARGOID))
{ error = error + "<br />提单号:" + headData.MBLNO + " 货物标识不能为空"; }
if (headData.CARGOID == "D")
{
if (string.IsNullOrEmpty(headData.DCLASS))
{ error = error + "<br />提单号:" + headData.MBLNO + " 危险品分类不能为空"; }
if (string.IsNullOrEmpty(headData.DUNNO))
{ error = error + "<br />提单号:" + headData.MBLNO + " 危险品编号不能为空"; }
}
if (headData.CARGOID == "R")
{
if (headData.TEMPSET == null || headData.TEMPSET == "")
{ error = error + "<br />提单号:" + headData.MBLNO + " 设置温度不能为空"; }
if (headData.REEFERF == null || headData.REEFERF == "")
{ error = error + "<br />提单号:" + headData.MBLNO + " 通风度不能为空"; }
}
if (headData.ISSUEPLACE == null || headData.ISSUEPLACE == "")
{ error = error + "<br />提单号:" + headData.MBLNO + "签单地点不能为空"; }
if (headData.CARRIEREDICODE == "APL")
if (headData.ISSUETYPE == null || headData.ISSUETYPE == "")
{ error = error + "<br />提单号:" + headData.MBLNO + "签单方式不能为空"; }
if (headData.SERVICE == "" || headData.SERVICE == null)
{ error = error + "<br />提单号:" + headData.MBLNO + "运输条款不能为空"; }
if (string.IsNullOrEmpty(headData.MARKS))
{
error = error + "<br />提单号:" + headData.MBLNO + " 唛头不能为空";
}
else
{
if (StringIsChinese(headData.MARKS))
{
error = error + "<br />提单号:" + headData.MBLNO + " 唛头含有中文或双字节字符";
}
else
{
error += formatlengthError("txt", headData.MARKS, 35, headData.MBLNO, "唛头", 0, "", false);
}
}
if (string.IsNullOrEmpty(headData.DESCRIPTION))
{
error = error + "<br />提单号:" + headData.MBLNO + " 货物描述不能为空";
}
else
{
if (StringIsChinese(headData.DESCRIPTION))
{
error = error + "<br />提单号:" + headData.MBLNO + " 货物描述含有中文或双字节字符";
}
else
{
//error += formatlengthError("txt", bill.DESCRIPTION, 35, bill.MBLNO, "货物描述", 0, "");
}
}
if (string.IsNullOrEmpty(headData.SHIPPER))
{
error = error + "<br />提单号:" + headData.MBLNO + " 发货人不能为空";
}
else
{
if (StringIsChinese(headData.SHIPPER))
{
error = error + "<br />提单号:" + headData.MBLNO + " 发货人含有中文或双字节字符";
}
else
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.SHIPPER, 35, headData.MBLNO, "发货人", 6, "-", false);
}
else
{
error += formatlengthError("txt", headData.SHIPPER, 35, headData.MBLNO, "发货人", 6, "*", false);
}
}
}
//}
if (string.IsNullOrEmpty(headData.CONSIGNEE))
{
error = error + "<br />提单号:" + headData.MBLNO + " 收货人不能为空";
}
else
{
if (StringIsChinese(headData.CONSIGNEE))
{
error = error + "<br />提单号:" + headData.MBLNO + " 收货人含有中文或双字节字符";
}
else
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "--", false);
}
else
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "**", false);
}
}
}
if (string.IsNullOrEmpty(headData.NOTIFYPARTY))
{
error = error + "<br />提单号:" + headData.MBLNO + " 通知人不能为空";
}
else
{
if (StringIsChinese(headData.NOTIFYPARTY))
{
error = error + "<br />提单号:" + headData.MBLNO + " 通知人含有中文或双字节字符";
}
else
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "---", false);
}
else
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "***", false);
}
}
}
if (!string.IsNullOrEmpty(headData.NOTIFYPARTY2))
{
error += formatlengthError("txt", headData.NOTIFYPARTY2, 35, headData.MBLNO, "第二通知人", 5, "", false);
}
var ctnlist = headData.CTNLIST;
if (ctnlist.Count == 0) { error = error + "<br />提单号:" + headData.MBLNO + " 集装箱信息不能为空"; };
#region 集装箱判断检查
if (ctnlist.Count != 0)
{
Decimal dlPKGS = 0;
Decimal dlKGS = 0;
Decimal dlCBM = 0;
foreach (var ctn in ctnlist)
{
if (string.IsNullOrEmpty(ctn.CTNALLCODE))
{ error = error + "<br />提单号:" + headData.MBLNO + " 集装箱箱型EDI代码不能为空"; }
if ((ctn.CTNALLCODE.IndexOf("RH") > 0 || ctn.CTNALLCODE.IndexOf("RF") > 0) && (headData.CARGOID != "R"))
{
{ error = error + "<br />提单号:" + headData.MBLNO + " 集装箱箱型为冻柜,货类代码请选择冻柜"; }
}
if (InttrEdi.filetype == "E")
{
if (string.IsNullOrEmpty(ctn.CNTRNO))
{ error = error + "<br />提单号:" + headData.MBLNO + " 箱号不能为空"; }
if (string.IsNullOrEmpty(ctn.SEALNO))
{ error = error + "<br />提单号:" + headData.MBLNO + " 封号不能为空"; }
if (ctn.KINDPKGS != headData.KINDPKGS)
{ error = error + "<br />提单号:" + headData.MBLNO + " 中的包装类型与集装箱的包装类型不同"; }
dlPKGS += Convert.ToDecimal(ctn.PKGS);
dlKGS += Convert.ToDecimal(ctn.KGS);
dlCBM += Convert.ToDecimal(ctn.CBM);
}
}
if (InttrEdi.filetype == "E")
{
if (dlPKGS != Convert.ToDecimal(headData.PKGS))
{ error = error + "<br />提单号:" + headData.MBLNO + " 集装箱件数合计数必须等于委托单总件数"; }
if (dlKGS != Convert.ToDecimal(headData.KGS))
{ error = error + "<br />提单号:" + headData.MBLNO + " 集装箱重量合计数必须等于委托单总重量数"; }
if (dlCBM != Convert.ToDecimal(headData.CBM))
{ error = error + "<br />提单号:" + headData.MBLNO + " 集装箱尺码合计数必须等于委托单总尺码数"; }
}
}
if (InttrEdi.filetype == "E")
{
if (headData.CTNGOODSLIST != null && headData.CTNGOODSLIST.Count > 0)
{
foreach (var ctn in ctnlist)
{
var isfind = false;
Int32 ctngoodssumpkgs = 0;
decimal ctngoodssumkgs = 0;
decimal ctngoodssumcbm = 0;
headData.CTNGOODSLIST.ForEach(i =>
{
if (i.CNTRNO == ctn.CNTRNO)
{
isfind = true;
ctngoodssumpkgs = ctngoodssumpkgs + i.PKGS;
ctngoodssumkgs = ctngoodssumkgs + i.KGS;
ctngoodssumcbm = ctngoodssumcbm + i.CBM;
}
});
if (!isfind)
{
error = error + "<br />提单号:" + headData.MBLNO + "的“" + ctn.CNTRNO + "”未添加分箱明细!";
}
else
{
if (ctngoodssumpkgs != Convert.ToDecimal(ctn.PKGS))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctn.CNTRNO + " 分箱明细件数合计数不等于集装箱件数"; }
if (ctngoodssumkgs != Convert.ToDecimal(ctn.KGS))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctn.CNTRNO + " 分箱明细毛重合计数不等于集装箱毛重"; }
if (ctngoodssumcbm != Convert.ToDecimal(ctn.CBM))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctn.CNTRNO + " 分箱明细尺码合计数不等于集装箱毛重"; }
}
}
foreach (var ctngood in headData.CTNGOODSLIST)
{
if (string.IsNullOrEmpty(ctngood.KINDPKGS))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctngood.CNTRNO + " 中的分箱明细包装类型不能为空"; }
if (string.IsNullOrEmpty(ctngood.DESCRIPTION))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctngood.CNTRNO + " 中的分箱货物描述不能为空"; }
else
{
error += formatlengthError("txt", ctngood.DESCRIPTION, 70, headData.MBLNO, "的“" + ctngood.CNTRNO + "”箱号的分箱货物描述", 0, "", false);
}
//if (string.IsNullOrEmpty(ctngood.HSCODE))
//{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctngood.CNTRNO + " 中的分箱HS编码不能为空"; }
if (string.IsNullOrEmpty(ctngood.KINDPKGS_EDI_CODE))
{ error = error + "<br />提单号:" + headData.MBLNO + ",箱号:" + ctngood.CNTRNO + " 中的分箱明细包装类型代码不能为空"; }
}
}
#endregion
}
//2023-03-03 经过测试东胜的EDI根据付费方式区分 到付-需要填到付地点不能填预付地点,预付只能填预付地点不能填到付地点
//跟韩工确认增加判断
if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("PREPAID") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,预付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,到付地点不能填写";
}
}
else if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("COLLECT") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,到付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,预付地点不能填写";
}
}
}
return error;
}
#endregion
#region 生成报文(订舱(filetype=="B"),截单(filetype=="E"))
public static EdiDataResult CreateEdiWY(EDIBaseModel InttrEdi)
{
var result = new EdiDataResult { Succeeded = false };
var filetype = "IFTMBF";
string filename = InttrEdi.filerpath + "\\" + filetype + "_" + InttrEdi.BSLIST[0].MBLNO + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".txt";
//如果是部署linux需要修改路径
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
filename = filename.Replace("\\", "/");
//if (System.IO.File.Exists(filename))
//{
// System.IO.File.Delete(filename);
//}
FileStream f = new FileStream(filename, FileMode.Create);
StreamWriter r = new StreamWriter(f, Encoding.Default);
var icount = 0;
var bsno = "";
var isfirst = true;
foreach (var bill in InttrEdi.BSLIST)
{
if (isfirst)
{
if (InttrEdi.filetype == "E")
r.WriteLine("00:IFTMBF:SI:" + InttrEdi.filerole + ":" + InttrEdi.SENDCODE + ":" + InttrEdi.RECEIVECODE + ":" + DateTime.Now.ToString("yyyyMMddHHmm") + ":2.1'");
else
r.WriteLine("00:IFTMBF:BK:" + InttrEdi.filerole + ":" + InttrEdi.SENDCODE + ":" + InttrEdi.RECEIVECODE + ":" + DateTime.Now.ToString("yyyyMMddHHmm") + ":2.1'");
isfirst = false;
icount++;
}
//2023-03-03 修改运输条款SERVICE改为EDI的映射值经过韩工确认
r.WriteLine("02"
+ ":" + bill.ORDERNO//2 REFERENCE NO. 运编号 X(35) 一般为流水号 M
+ ":" + bill.MBLNO//3 B\L NO. 提单号 X(20) 船公司的提单号 C
+ ":" + bill.SERVICEEDICODE//4 DELIVERY TERM 交货条款 X(9) CY-CY(pier-pier/port):30CY-CFS(pier/port-door):29CFS-CY(door-pier/port):28CFS-CFS(door-door):27 M
+ ":" + formatEdiStr("txt", InttrEdi.ForWarderName.Replace("\n", " ").Replace("\r", " "))//5 BOOKING PARTY 订舱人说明 X(70) 货代方企业名称或代码 C
+ ":" + InttrEdi.RECEIVECODE//6 ISSUE PARTY CODE 签单人代码 X(13) 即接受订舱的人的代码 M
+ ":"//7 ISSUE PARTY 签单人说明 X(35)   C
+ ":"//8 APPLICANT 询价单位 X(13) 向船公司询价的单位代码 C
+ ":"//9 FOB BK PARTY 国外订舱单位 X(13) 国外FOB货订舱单位的代码 C
+ ":"//10 B/L TRANSHIP ID 转船标识 X(1) Y/N C
+ ":"//11 BATCH ID 分批 X(1) Y/N C
+ ":"//12 SHIPMENT DATE 装期 9(8) CCYYMMDD C
+ ":"//13 EXPIRY DATE 效期 9(8) CCYYMMDD C
+ ":" + bill.CONTRACTNO//14 QUOTATION NO. 运费协议号 X(30) MAERSK为必选 C
+ ":"//15 CHARGE TYPE 费率本代码 X(1)   C
+ ":" //16 S/C NO. 合约号 X(30)   C
+ "'");
icount++;
var ISSUETYPE = "";
//2023-03-02 测试这里有问题,签单方式用的中文,要改成英文正本-ORIGINAL 电放-TELEX
//if (bill.ISSUETYPE == "正本")
if (bill.ISSUETYPE == "ORIGINAL")
{
ISSUETYPE = "ORI";
}
else if (bill.ISSUETYPE == "TELEX")
{
ISSUETYPE = "TER";
}
else ISSUETYPE = "EXP";
r.WriteLine("03:" + ISSUETYPE + ":" + bill.ISSUEPLACEID.Trim() + ":" + bill.ISSUEPLACE.Trim() + ":" + GetDateStr(bill.ISSUEDATE, "yyyyMMdd") + ":" + GetBillNum2(bill.NOBILL) + ":" + bill.PREPARDAT + ":" + bill.PAYABLEAT + "'");
icount++;
r.WriteLine("11:" + bill.VESSELID + ":" + bill.VESSEL + ":" + bill.VOYNO + "::" + bill.CARRIEREDICODE + ":" + bill.CARRIER + ":::::::'");
icount++;
var DESTINATIONID = bill.DESTINATIONID;
var DESTINATION = bill.DESTINATION;
if (bill.CARRIEREDICODE == "ONEY" || bill.CARRIEREDICODE == "ZIM")
{
DESTINATIONID = "";
DESTINATION = "";
}
r.WriteLine("12"
+ ":" + bill.PLACERECEIPTID//2 PLACE CODE OF RECEIPT 收货地代码 X(5) OOCL、HLC的订舱要求必选 O
+ ":" + bill.PLACERECEIPT//3 PLACE OF RECEIPT 收货地 X(35)   C
+ ":" + bill.PORTLOADID//4 LOAD PORT CODE 装货港代码 X(5) OOCL的订舱要求必选 O
+ ":" + bill.PORTLOAD//5 LOAD PORT 装货港 X(35)   C
+ ":" + bill.PORTDISCHARGEID//6 DISCHARGE PORT CODE 卸货港代码 X(5) OOCL的订舱要求必选 M
+ ":" + bill.PORTDISCHARGE//7 DISCHARGE PORT 卸货港 X(35)   C
+ ":" + bill.TRANSPORTID //8 TRANSFER PORT CODE 中转港代码 X(5)   C
+ ":" + bill.TRANSPORT//9 TRANSFER PORT 中转港 X(35)   C
+ ":" + bill.PLACEDELIVERYID//10 PLACE OF DELIVERY CODE 交货地代码 X(5) OOCL的订舱要求必选 O
+ ":" + bill.PLACEDELIVERY//11 PLACE OF DELIVERY 交货地 X(35)   C
+ ":" + DESTINATIONID//12 FINAL DESTINATION CODE 目的地代码 X(5)   C
+ ":" + DESTINATION//13 FINAL DESTINATION CODE 目的地 X(35)   C
+ ":" + bill.YARDEDICODE//14 FINAL DESTINATION CODE 目的地 X(35)   C
+ "'");
icount = icount + 1;
r.WriteLine("14:" + bill.BLFRTEDICODE + ":" + bill.BLFRT + "'");
if (InttrEdi.filetype == "E")
r.WriteLine("15:::" + bill.BLFRTEDICODE + ":" + bill.PAYABLEATID + ":::::'");
else
r.WriteLine("15:::" + bill.BLFRTEDICODE + "::::::'");
icount = icount + 2;
var Shipping = "";
if (InttrEdi.filetype == "E")
Shipping = formatEdiStr("txt", bill.SIREMARK);
else
Shipping = formatEdiStr("txt", bill.EDIREMARK);
List<System.String> ShippingList = formatlengthStr(Shipping, 70);
if (Shipping != "")
{
r.WriteLine("17:" + formatListStr(ShippingList, 5) + "'");
icount++;
}
Shipping = formatEdiStr("txt", bill.SHIPPER);
ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
r.WriteLine("18::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
Shipping = formatEdiStr("txt", bill.CONSIGNEE);
ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
r.WriteLine("19::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
r.WriteLine("20::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
Shipping = formatEdiStr("txt", InttrEdi.ForWarderName);
ShippingList = formatlengthStr(Shipping, 35);
if (Shipping != "")
{
r.WriteLine("23::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
var ctnsumlist = new List<SeaExportCtnEDIBaseModel>();
foreach (var ctn in bill.CTNLIST)
{
var isfind = false;
ctnsumlist.ForEach(i =>
{
if (i.CTNALLCODE == ctn.CTNALLCODE)
{
i.CTNNUM = i.CTNNUM + ctn.CTNNUM;
isfind = true;
}
});
if (!isfind)
{
var ctnnum = new SeaExportCtnEDIBaseModel();
ctnnum.CTNALLCODE = ctn.CTNALLCODE;
ctnnum.CTNNUM = ctn.CTNNUM;
ctnsumlist.Add(ctnnum);
}
}
foreach (var ctnsum in ctnsumlist)
{
r.WriteLine("40:" + ctnsum.CTNALLCODE + ":" + ctnsum.CTNNUM + ":F:::::N'");
icount++;
}
var cargoid = bill.CARGOID;
if (cargoid == "" || cargoid == " ") cargoid = "S";
var kingweight = bill.KINGTAREWEIGHT;
if (kingweight == 0)
kingweight = 100;
r.WriteLine("41:1:" + bill.HSCODE + ":" + cargoid + ":" + bill.PKGS.ToString() + ":" + bill.KINDPKGS_EDI_CODE + ":" + bill.KINDPKGS + ":" + kingweight.ToString("0.###") + ":"
+ bill.CBM.ToString("0.###") + "::::::" + bill.KGS.ToString("0.###") + ":::'");
icount = icount + 1;
if (cargoid == "R")
r.WriteLine("43::::::::::" + bill.REEFERF + ":C:" + bill.TEMPSET + ":" + bill.TEMPMIN + ":" + bill.TEMPMAX + ":::::'");
else if (cargoid == "D")
r.WriteLine("43:" + bill.DCLASS + ":" + bill.DPAGE + ":" + bill.DUNNO + ":" + bill.DLABEL + "::::::::::::'");
icount = icount + 1;
Shipping = formatEdiStr("txt", bill.MARKS);
ShippingList = formatlengthStr(Shipping, 35);
for (var i = 0; i < Math.Ceiling(Convert.ToDecimal(Convert.ToDecimal(ShippingList.Count) / Convert.ToDecimal(10))); i++)
{
var tempstr = "44:";
for (var z = 0; z < 10; z++)
{
if ((i * 10 + z) < ShippingList.Count)
tempstr = tempstr + ShippingList[i * 10 + z];
if (z < 9) tempstr = tempstr + ":";
}
if (tempstr != "44:")
{
r.WriteLine(tempstr + "'");
icount++;
}
}
Shipping = formatEdiStr("txt", bill.DESCRIPTION);
ShippingList = formatlengthStr(Shipping, 70);
var m = 1;
var strtemp = "";
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
for (var i = 0; i < ShippingList.Count; i++)
{
if (ShippingList[i] != "")
{
if (m <= 5)
{
if (m == 1) strtemp = "47:" + ShippingList[i] + ":";
else
{
if (m == 5)
strtemp = strtemp + ShippingList[i];
else
strtemp = strtemp + ShippingList[i] + ":";
}
}
else
{
m = 1;
r.WriteLine(strtemp + "'");
strtemp = "47:" + ShippingList[i] + ":";
icount = icount + 1;
}
m = m + 1;
}
}
}
if (strtemp != "")
{
r.WriteLine(strtemp + "'");
icount = icount + 1;
}
var ISSOC = "N";
if (bill.ISCONTAINERSOC) ISSOC = "Y";
foreach (var ctn in bill.CTNLIST)
{
r.WriteLine("51:" + ctn.CNTRNO + ":" + ctn.CTNALLCODE + ":" + ctn.SEALNO + ":::" + ctn.CTNSTATUS + ":" + ctn.PKGS.ToString() + ":" + ctn.KGS.ToString("0.###") + ":" + ctn.TAREWEIGHT.ToString("0.###") + ":" + ctn.CBM.ToString("0.###") + "'");
icount = icount + 1;
}
}
icount = icount + 1;
r.WriteLine("99:" + icount.ToString() + "'");
r.Close();
f.Close();
result.Succeeded = true;
result.ExtraData1 = filename;
return result;
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -103,7 +103,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 委托单位 t_info_client CUSTNAME /// 委托单位 t_info_client CUSTNAME
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "委托单位", IsNullable = true, Length = 20)] [SqlSugar.SugarColumn(ColumnDescription = "委托单位", IsNullable = true, Length = 50)]
public string CustomerName { get; set; } public string CustomerName { get; set; }
/// <summary> /// <summary>
@ -120,7 +120,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 发货人 t_info_client CUSTNAME /// 发货人 t_info_client CUSTNAME
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "发货人", IsNullable = true)] [SqlSugar.SugarColumn(ColumnDescription = "发货人", IsNullable = true, Length = 100)]
public string Shipper { get; set; } public string Shipper { get; set; }
/// <summary> /// <summary>
/// 收货人 t_info_client CUSTNAME /// 收货人 t_info_client CUSTNAME
@ -131,7 +131,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 收货人 t_info_client CUSTNAME /// 收货人 t_info_client CUSTNAME
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "收货人", IsNullable = true)] [SqlSugar.SugarColumn(ColumnDescription = "收货人", IsNullable = true, Length = 100)]
public string Consignee { get; set; } public string Consignee { get; set; }
/// <summary> /// <summary>
/// 通知人 t_info_client CUSTNAME /// 通知人 t_info_client CUSTNAME
@ -141,7 +141,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 通知人 t_info_client CUSTNAME /// 通知人 t_info_client CUSTNAME
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "通知人", IsNullable = true)] [SqlSugar.SugarColumn(ColumnDescription = "通知人", IsNullable = true, Length = 100)]
public string NotifyParty { get; set; } public string NotifyParty { get; set; }
/// <summary> /// <summary>
/// 国外代理人Id t_info_client CUSTNAME /// 国外代理人Id t_info_client CUSTNAME
@ -151,30 +151,30 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 国外代理人 t_info_client CUSTNAME /// 国外代理人 t_info_client CUSTNAME
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "国外代理人", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "国外代理人", IsNullable = true, Length = 100)]
public string Agent { get; set; } public string Agent { get; set; }
/// <summary> /// <summary>
/// 发货人内容 /// 发货人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "发货人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "发货人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string ShipperContent { get; set; } public string ShipperContent { get; set; }
/// <summary> /// <summary>
/// 收货人内容 /// 收货人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "收货人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "收货人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string ConsigneeContent { get; set; } public string ConsigneeContent { get; set; }
/// <summary> /// <summary>
/// 通知人内容 /// 通知人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "通知人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "通知人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string NotifyPartyContent { get; set; } public string NotifyPartyContent { get; set; }
/// <summary> /// <summary>
/// 国外代理内容 /// 国外代理内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "国外代理内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "国外代理内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string AgentContent { get; set; } public string AgentContent { get; set; }
/// <summary> /// <summary>
@ -201,11 +201,30 @@ public class SeaExport : BaseOrgModel<long>
public long VesselId { get; set; } public long VesselId { get; set; }
/// <summary> /// <summary>
/// 航次 /// 海关航次
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "航次", IsNullable = true, Length = 20)] [SqlSugar.SugarColumn(ColumnDescription = "海关航次", IsNullable = true, Length = 20)]
public string Voyno { get; set; } public string Voyno { get; set; }
/// <summary>
/// 内部航次
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "内部航次", IsNullable = true, Length = 20)]
public string InnerVoyno { get; set; }
/// <summary>
/// 第二通知人Id t_info_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "第二通知人Id", IsNullable = true)]
public long? SecondNotifyPartyId { get; set; }
/// <summary>
/// 第二通知人 t_info_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "第二通知人", IsNullable = true,Length = 100)]
public string SecondNotifyParty { get; set; }
/// <summary>
/// 第二通知人内容
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "第二通知人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string SecondNotifyPartyContent { get; set; }
/// <summary> /// <summary>
/// 开船日期 /// 开船日期
/// </summary> /// </summary>
@ -388,7 +407,11 @@ public class SeaExport : BaseOrgModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "货物描述", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] [SugarColumn(ColumnDescription = "货物描述", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
public string Description { get; set; } public string Description { get; set; }
/// <summary>
/// 品名Id
/// </summary>
[SugarColumn(ColumnDescription = "品名", IsNullable = true, DefaultValue ="0")]
public long? GoodsId { get; set; }
/// <summary> /// <summary>
/// 品名 t_code_goods /// 品名 t_code_goods
/// </summary> /// </summary>
@ -398,13 +421,13 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 货物毛重 /// 货物毛重
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "货物毛重", IsNullable = true, Length = 600)] [SugarColumn(ColumnDescription = "货物毛重", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string GrossWeight { get; set; } public string GrossWeight { get; set; }
/// <summary> /// <summary>
/// 货物尺码 /// 货物尺码
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "货物尺码", IsNullable = true, Length = 600)] [SugarColumn(ColumnDescription = "货物尺码", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string Measurement { get; set; } public string Measurement { get; set; }
/// <summary> /// <summary>
@ -440,7 +463,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 集装箱大写 /// 集装箱大写
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "集装箱大写", IsNullable = true, Length = 1000)] [SugarColumn(ColumnDescription = "集装箱大写", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string CntrNo { get; set; } public string CntrNo { get; set; }
/// <summary> /// <summary>
@ -518,7 +541,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 集装箱 /// 集装箱
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "集装箱", IsNullable = true, Length = 4000)] [SugarColumn(ColumnDescription = "集装箱", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string CntrTotal { get; set; } public string CntrTotal { get; set; }
/// <summary> /// <summary>
@ -699,11 +722,11 @@ public class SeaExport : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "订舱类型", IsNullable = true, Length = 50)] [SugarColumn(ColumnDescription = "订舱类型", IsNullable = true, Length = 50)]
public string BookingType { get; set; } public string BookingType { get; set; }
///// <summary> /// <summary>
///// 订舱编号 /// 订舱编号
///// </summary> /// </summary>
//[SugarColumn(ColumnDescription = "订舱编号", IsNullable = true, Length = 20)] [SugarColumn(ColumnDescription = "订舱编号", IsNullable = true, Length = 20)]
//public string BookingNo { get; set; } public string BookingNo { get; set; }
/// <summary> /// <summary>
/// Desc:保险人 /// Desc:保险人
@ -1123,19 +1146,19 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// Master收货人内容 /// Master收货人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "Master收货人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "Master收货人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string MasterConsigneeContent { get; set; } public string MasterConsigneeContent { get; set; }
/// <summary> /// <summary>
/// Master通知人内容 /// Master通知人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "Master通知人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "Master通知人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string MasterNotifyPartyContent { get; set; } public string MasterNotifyPartyContent { get; set; }
/// <summary> /// <summary>
/// Master发货人内容 /// Master发货人内容
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "Master发货人内容", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "Master发货人内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string MasterShipperContent { get; set; } public string MasterShipperContent { get; set; }
/// <summary> /// <summary>
@ -1172,19 +1195,7 @@ public class SeaExport : BaseOrgModel<long>
/// 是否打印小票 /// 是否打印小票
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "是否打印小票", DefaultValue = "0")] [SugarColumn(ColumnDescription = "是否打印小票", DefaultValue = "0")]
public bool IsPrintReceipt { get; set; } public bool IsPrintReceipt { get; set; }
// /// <summary>
// /// 是否取消
// /// </summary>
// [SugarColumn(ColumnDescription = "是否取消", DefaultValue = "0")]
// public bool IsCancel { get; set; }
//
// /// <summary>
// /// 是否TUI
// /// </summary>
// [SugarColumn(ColumnDescription = "是否TUI", DefaultValue = "0")]
// public bool IsTUI { get; set; }
/// <summary> /// <summary>
/// 船名 t_code_vessel /// 船名 t_code_vessel
/// </summary> /// </summary>
@ -1240,7 +1251,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 转运备注 /// 转运备注
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "转运备注", IsNullable = true, Length = 600)] [SqlSugar.SugarColumn(ColumnDescription = "转运备注", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string TransRemark { get; set; } public string TransRemark { get; set; }
/// <summary> /// <summary>

@ -0,0 +1,223 @@
using DS.Module.Core.Data;
using SqlSugar;
using System.ComponentModel;
namespace DS.WMS.Core.Op.Entity;
/// <summary>
/// 海运出口Edi信息
/// </summary>
[SqlSugar.SugarTable("op_sea_export_edi", "海运出口Edi信息")]
public class SeaExportEdi: BaseModel<long>
{
/// <summary>
/// 业务Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "业务Id", IsNullable = false, Length = 100)]
public long BusinessId { get; set; }
/// <summary>
/// 委托方
/// </summary>
[Description("委托方")]
[SqlSugar.SugarColumn(ColumnDescription = "委托方", IsNullable = false, Length = 100)]
public string CustomerName { get; set; }
/// <summary>
/// 发送方EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "发送方EDI代码", IsNullable = false, Length = 50)]
public string SendCode { get; set; }
/// <summary>
/// 接收方EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "接收方EDI代码", IsNullable = false, Length = 50)]
public string ReceiveCode { get; set; }
/// <summary>
/// 通知方EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "通知方EDI代码", IsNullable = false, Length = 50)]
public string NotifyCdoe { get; set; }
/// <summary>
/// 销售EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "销售EDI代码", IsNullable = false, Length = 50)]
public string SalerCode { get; set; }
/// <summary>
/// Master Bol Indicator
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "Master Bol Indicator", IsNullable = false, Length = 50)]
public string MasterBolIndicator { get; set; }
/// <summary>
/// EMANIFEST HBL
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "EMANIFEST HBL", IsNullable = false, Length = 50)]
public string EmanifestHbl { get; set; }
/// <summary>
/// 收货人EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "收货人EDI代码", IsNullable = false, Length = 50)]
public string ConsigneeEdiCode { get; set; }
/// <summary>
/// 发货人EDI代码
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "发货人EDI代码", IsNullable = false, Length = 50)]
public string ShipperEdiCode { get; set; }
/// <summary>
/// EDI联系人名称
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "EDI联系人名称", IsNullable = false, Length = 100)]
public string EDIAttn { get; set; }
/// <summary>
/// EDI联系人电话
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "EDI联系人电话", IsNullable = false, Length = 50)]
public string EDIAttnTel { get; set; }
/// <summary>
/// EDI联系人邮箱
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "EDI联系人邮箱", IsNullable = false, Length = 50)]
public string EDIAttnMail { get; set; }
/// <summary>
/// AMS收货人
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "AMS收货人", IsNullable = false, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string AMSConsignee { get; set; }
/// <summary>
/// AMS通知人
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "AMS通知人", IsNullable = false, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string AMSNotifyParty { get; set; }
/// <summary>
/// 操作英文名称
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "操作英文名称", IsNullable = false, Length = 50)]
public string OpEName { get; set; }
/// <summary>
/// 操作电话
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "操作电话", IsNullable = false, Length = 50)]
public string OpTel { get; set; }
/// <summary>
/// 操作邮箱
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "操作邮箱", IsNullable = false, Length = 50)]
public string OpEmail { get; set; }
/// <summary>
/// ACI HBL
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "ACI HBL", IsNullable = false, Length = 120)]
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "S0C C0C", IsNullable = false, Length = 120)]
public string S0CC0C { get; set; }
/// <summary>
/// 商品名称
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "商品名称", IsNullable = false, Length = 100)]
public string GoodsName { get; set; }
/// <summary>
/// Master Bol Indicator名称
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "Master Bol Indicator名称", IsNullable = false, Length = 50)]
public string MasterBolIndicatorName { get; set; }
/// <summary>
/// 销售EDI名称
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "销售EDI名称", IsNullable = false, Length = 50)]
public string SalerCodeName { get; set; }
/// <summary>
/// 欧盟港口、伊朗港口、KHI
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "欧盟港口、伊朗港口、KHI", IsNullable = false, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string CKHI { get; set; }
/// <summary>
/// 南美东
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "南美东", IsNullable = false, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string CNCM { get; set; }
/// <summary>
/// 巴西线的木质包装情况
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "巴西线的木质包装情况", IsNullable = false, ColumnDataType = StaticConfig.CodeFirst_BigString)]
public string WNCM { get; set; }
/// <summary>
/// 订舱人说明
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "订舱人说明", IsNullable = false, Length = 100)]
public string OrderRemark { get; set; }
/// <summary>
/// 辅助字段1
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "辅助字段1", IsNullable = false, Length = 200)]
public string ExRemark1 { get; set; }
/// <summary>
/// 辅助字段2
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "辅助字段2", IsNullable = false, Length = 200)]
public string ExRemark2 { get; set; }
/// <summary>
/// 辅助字段3
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "辅助字段3", IsNullable = false, Length = 200)]
public string ExRemark3 { get; set; }
/// <summary>
/// 辅助字段4
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "辅助字段4", IsNullable = false, Length = 200)]
public string ExRemark4 { get; set; }
/// <summary>
/// 第一层包装皮重
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "第一层包装皮重", IsNullable = false, Length = 19, DecimalDigits = 2, DefaultValue = "0")]
public decimal? KingTareweight { get; set; }
/// <summary>
/// 箱满仓业务员
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "箱满仓业务员", IsNullable = false, Length = 50)]
public string XMCYWY { get; set; }
/// <summary>
/// EMC Name accout
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "EMC Name accout", IsNullable = false, Length = 50)]
public string EmcNameAccount { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "CNPTNo", IsNullable = false, Length = 50)]
public string CNPTNo { get; set; }
}

@ -146,4 +146,10 @@ public interface ISeaExportService
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
public DataResult<VOLTAEDIBaseModel> CheckAndInitVOLTAEdi(BookingOrClosingEDIOrderReq req); public DataResult<VOLTAEDIBaseModel> CheckAndInitVOLTAEdi(BookingOrClosingEDIOrderReq req);
/// <summary>
/// 发送订舱、截单EDI
/// </summary>
/// <param name="req">订舱、截单EDI请求</param>
/// <returns>返回回执</returns>
public Task<DataResult<string>> SendBookingOrClosingEDI(BookingOrClosingEDIOrderReq req);
} }

@ -51,7 +51,7 @@ namespace DS.WMS.Core.Op.Method
{ {
if (item.Id == 0) if (item.Id == 0)
{ {
var detail = item.Adapt<OpCtnDetailReq>(); var detail = item.Adapt<OpCtnDetail>();
detail.CtnId = req.CtnId; detail.CtnId = req.CtnId;
tenantDb.Insertable(detail).ExecuteCommand(); tenantDb.Insertable(detail).ExecuteCommand();
} }

File diff suppressed because it is too large Load Diff

@ -0,0 +1,92 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Map.Dtos;
using DS.WMS.Core.Map.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers
{
/// <summary>
/// 付款方式映射信息 模块
/// </summary>
public class MappingFrtController : ApiController
{
private readonly IMappingFrtService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public MappingFrtController(IMappingFrtService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetMappingFrtList")]
public DataResult<List<MappingFrtRes>> GetMappingFrtList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("EditMappingFrt")]
public DataResult EditMappingFrt([FromBody] MappingFrtReq req)
{
var res = _invokeService.EditMappingFrt(req);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
[HttpGet]
[Route("GetMappingFrtInfo")]
public DataResult<MappingFrtRes> GetMappingFrtInfo([FromQuery] string id)
{
var res = _invokeService.GetMappingFrtInfo(id);
return res;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="req">Id</param>
/// <returns></returns>
[HttpPost]
[Route("DelMappingFrt")]
public DataResult DelMappingFrt([FromBody] IdModel req)
{
var res = _invokeService.DelMappingFrt(req);
return res;
}
/// <summary>
///批量删除
/// </summary>
/// <param name="req">Id</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelMappingFrt")]
public DataResult BatchDelMappingFrt([FromBody] IdModel req)
{
var res = _invokeService.BatchDelMappingFrt(req);
return res;
}
}
}

@ -221,4 +221,16 @@ public class SeaExportController : ApiController
{ {
return _invokeService.CheckAndInitVOLTAEdi(req); return _invokeService.CheckAndInitVOLTAEdi(req);
} }
/// <summary>
/// 发送订舱、截单EDI
/// </summary>
/// <param name="req">订舱、截单EDI请求</param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("SendBookingOrClosingEDI")]
public async Task<DataResult<string>> SendBookingOrClosingEDI([FromBody] BookingOrClosingEDIOrderReq req)
{
return await _invokeService.SendBookingOrClosingEDI(req);
}
} }

@ -68,3 +68,31 @@
2024-05-15 13:39:29.2837 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config 2024-05-15 13:39:29.2837 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-05-15 13:39:29.3013 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-05-15 13:39:29.3013 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-15 13:39:29.3325 Info Configuration initialized. 2024-05-15 13:39:29.3325 Info Configuration initialized.
2024-05-20 15:30:34.8145 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-20 15:30:34.8416 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-20 15:30:34.8416 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-20 15:30:34.8774 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-20 15:30:34.9017 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-05-20 15:30:34.9119 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-20 15:30:34.9317 Info Configuration initialized.
2024-05-20 15:33:36.4001 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-20 15:33:36.4444 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-20 15:33:36.4618 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-20 15:33:36.5052 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-20 15:33:36.5294 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-05-20 15:33:36.5294 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-20 15:33:36.5646 Info Configuration initialized.
2024-05-20 16:18:02.4625 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-20 16:18:02.5478 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-20 16:18:02.5914 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-20 16:18:02.7548 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-20 16:18:02.8232 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-05-20 16:18:02.8417 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-20 16:18:02.8731 Info Configuration initialized.
2024-05-20 16:20:35.0280 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-20 16:20:35.0938 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-20 16:20:35.1176 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-20 16:20:35.1620 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-20 16:20:35.1879 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config
2024-05-20 16:20:35.2035 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-20 16:20:35.2289 Info Configuration initialized.

@ -49,6 +49,16 @@
"RelativePath": "LinkAttach", "RelativePath": "LinkAttach",
"FileType": [ ".xls", ".xlsx", ".pdf", ".txt", ".pms" ] "FileType": [ ".xls", ".xlsx", ".pdf", ".txt", ".pms" ]
}, },
//
"PrintTemplate": {
"BasePath": "", //使
"RelativePath": "Upload/PrintTemplate",
"FileType": [ ".frx", ".xls" ]
},
"TempFile": {
"Path": "TempFiles",
"RemainHours": 2
},
"PrintService": { "PrintService": {
"IP": "60.209.125.238", "IP": "60.209.125.238",
"Port": "3009", "Port": "3009",

@ -32,11 +32,15 @@ public class SaasTest
[Fact] [Fact]
public void SaasTest1() public void SaasTest1()
{ {
//Type[] types = Assembly
// .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
// .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity.") || it.FullName.Contains("DS.WMS.Core.Info.Entity.") || it.FullName.Contains("DS.WMS.Core.Op.Entity.")
// || it.FullName.Contains("DS.WMS.Core.Fee.Entity.") || it.FullName.Contains("DS.WMS.Core.Map.Entity."))//命名空间过滤,当然你也可以写其他条件过滤
// .ToArray();
Type[] types = Assembly Type[] types = Assembly
.LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
.GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity.") || it.FullName.Contains("DS.WMS.Core.Info.Entity.") || it.FullName.Contains("DS.WMS.Core.Op.Entity.") .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Op.Entity."))//命名空间过滤,当然你也可以写其他条件过滤
|| it.FullName.Contains("DS.WMS.Core.Fee.Entity.") || it.FullName.Contains("DS.WMS.Core.Map.Entity."))//命名空间过滤,当然你也可以写其他条件过滤 .ToArray();
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
// var temp = tenantDb.CodeFirst.GetDifferenceTables(types); // var temp = tenantDb.CodeFirst.GetDifferenceTables(types);
// var diffString= tenantDb.CodeFirst.GetDifferenceTables(types).ToDiffString(); // var diffString= tenantDb.CodeFirst.GetDifferenceTables(types).ToDiffString();

Loading…
Cancel
Save