# Conflicts:
#	Myshipping.Application/Myshipping.Application.xml
#	Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs
optimize
wanghaomei 2 years ago
commit eace5ca321

@ -743,6 +743,18 @@ namespace Myshipping.Application.Entity
/// </summary> /// </summary>
[Description("付款方")] [Description("付款方")]
public string FREIGHTPAYER { get; set; } public string FREIGHTPAYER { get; set; }
/// <summary>
/// 品名代码
/// </summary>
[Description("品名代码")]
public string GOODSCODE { get; set; }
/// <summary>
/// 品名
/// </summary>
[Description("品名")]
public string GOODSNAME { get; set; }
/// <summary> /// <summary>
/// 租户名称 /// 租户名称
/// </summary> /// </summary>

@ -61,6 +61,7 @@ using Microsoft.IdentityModel.Tokens;
using Myshipping.Application.EDI.ESL; using Myshipping.Application.EDI.ESL;
using NPOI.HSSF.UserModel; using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.SS.Formula.Functions;
namespace Myshipping.Application namespace Myshipping.Application
{ {
@ -2639,12 +2640,12 @@ namespace Myshipping.Application
//集装箱型 //集装箱型
var ediCtnList = _cache.GetAllMappingCtn().GetAwaiter().GetResult() var ediCtnList = _cache.GetAllMappingCtn().GetAwaiter().GetResult()
.Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)
&& t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList();
//包装 //包装
var ediPkgsList = _cache.GetAllMappingPackage().GetAwaiter().GetResult() var ediPkgsList = _cache.GetAllMappingPackage().GetAwaiter().GetResult()
.Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)
&& t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList();
//包装基础数据 //包装基础数据
var basePkgsList = _cache.GetAllCodePackage().GetAwaiter().GetResult(); var basePkgsList = _cache.GetAllCodePackage().GetAwaiter().GetResult();
@ -2662,7 +2663,7 @@ namespace Myshipping.Application
var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult() var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult()
.FirstOrDefault(a => a.EDICODE.Equals(ediRouteEnum.ToString(), StringComparison.OrdinalIgnoreCase) .FirstOrDefault(a => a.EDICODE.Equals(ediRouteEnum.ToString(), StringComparison.OrdinalIgnoreCase)
&& a.TenantId == order.TenantId && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)); && a.TenantId == order.TenantId && !string.IsNullOrWhiteSpace(a.CARRIERID) && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase));
if (ftpSet == null) if (ftpSet == null)
throw Oops.Bah($"获取EDICODE={ediRouteEnum.ToString()}的EDI参数设置失败"); throw Oops.Bah($"获取EDICODE={ediRouteEnum.ToString()}的EDI参数设置失败");
@ -2986,7 +2987,7 @@ namespace Myshipping.Application
var fileInfo = new FileInfo(filePath); var fileInfo = new FileInfo(filePath);
Log.Information($"准备请求发送ftp{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}"); _logger.LogInformation($"准备请求发送ftp{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}");
string strJoin = System.IO.File.ReadAllText(filePath); string strJoin = System.IO.File.ReadAllText(filePath);

@ -612,5 +612,15 @@ namespace Myshipping.Application
/// EDI扩展信息 /// EDI扩展信息
/// </summary> /// </summary>
public BookingEDIExtDto BookingEDIExt { get; set; } public BookingEDIExtDto BookingEDIExt { get; set; }
/// <summary>
/// 品名代码
/// </summary>
public string GOODSCODE { get; set; }
/// <summary>
/// 品名
/// </summary>
public string GOODSNAME { get; set; }
} }
} }

@ -147,6 +147,10 @@ namespace Myshipping.Application
/// 分类名称 /// 分类名称
/// </summary> /// </summary>
public virtual string CateName { get; set; } public virtual string CateName { get; set; }
/// <summary>
/// 类型FastReport、Excel模板等
/// </summary>
public virtual string Type { get; set; }
/// <summary> /// <summary>

@ -31,7 +31,11 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <example>测试1</example> /// <example>测试1</example>
public string ContractNote { get; set; } public string ContractNote { get; set; }
}
public class ParaContractNoShowDto: ParaContractNoDto
{
/// <summary> /// <summary>
/// 创建时间 /// 创建时间
/// </summary> /// </summary>

@ -14,6 +14,16 @@ namespace Myshipping.Application
public void Register(TypeAdapterConfig config) public void Register(TypeAdapterConfig config)
{ {
config.ForType<ParaGoodsInfo, ParaGoodsDto>() config.ForType<ParaGoodsInfo, ParaGoodsDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.GoodsCode, src => src.GOODS_CODE)
.Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN)
.Map(dest => dest.GoodsNameEN, src => src.GOODS_NAME_EN)
.Map(dest => dest.GoodsDesp, src => src.GOODS_DESP)
.Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY)
.Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME);
config.ForType<ParaGoodsInfo, ParaGoodsShowDto>()
.Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.GoodsCode, src => src.GOODS_CODE) .Map(dest => dest.GoodsCode, src => src.GOODS_CODE)
.Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN) .Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN)
@ -39,6 +49,11 @@ namespace Myshipping.Application
config.ForType<ParaGoodsCategoryInfo, ParaGoodsCategoryDto>() config.ForType<ParaGoodsCategoryInfo, ParaGoodsCategoryDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY)
.Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME);
config.ForType<ParaGoodsCategoryInfo, ParaGoodsCategoryShowDto>()
.Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY)
.Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME) .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME)
@ -57,6 +72,12 @@ namespace Myshipping.Application
config.ForType<ParaContractNoInfo, ParaContractNoDto>() config.ForType<ParaContractNoInfo, ParaContractNoDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.ContractNo, src => src.CONTRACT_NO)
.Map(dest => dest.ContractName, src => src.CONTRACT_NAME)
.Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE);
config.ForType<ParaContractNoInfo, ParaContractNoShowDto>()
.Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.ContractNo, src => src.CONTRACT_NO) .Map(dest => dest.ContractNo, src => src.CONTRACT_NO)
.Map(dest => dest.ContractName, src => src.CONTRACT_NAME) .Map(dest => dest.ContractName, src => src.CONTRACT_NAME)

@ -23,7 +23,10 @@ namespace Myshipping.Application
/// 品名分类名称 /// 品名分类名称
/// </summary> /// </summary>
public string GoodsCategoryName { get; set; } public string GoodsCategoryName { get; set; }
}
public class ParaGoodsCategoryShowDto: ParaGoodsCategoryDto
{
/// <summary> /// <summary>
/// 创建时间 /// 创建时间
/// </summary> /// </summary>

@ -51,7 +51,11 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <example>红酒</example> /// <example>红酒</example>
public string GoodsCategoryName { get; set; } public string GoodsCategoryName { get; set; }
}
public class ParaGoodsShowDto: ParaGoodsDto
{
/// <summary> /// <summary>
/// 创建时间 /// 创建时间
/// </summary> /// </summary>

@ -27,7 +27,7 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="Id">品名主键</param> /// <param name="Id">品名主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<ParaGoodsDto> GetParaGoodsInfo(long Id); Task<ParaGoodsShowDto> GetParaGoodsInfo(long Id);
/// <summary> /// <summary>
/// 检索品名参数 /// 检索品名参数
@ -35,7 +35,7 @@ namespace Myshipping.Application
/// <param name="queryItem">检索值</param> /// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<List<ParaGoodsDto>> QueryParaGoodsInfo(string queryItem, int top = 10); Task<List<ParaGoodsShowDto>> QueryParaGoodsInfo(string queryItem, int top = 10);
/// <summary> /// <summary>
/// 品名参数台账查询 /// 品名参数台账查询
@ -56,7 +56,7 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="Id">品名分类主键</param> /// <param name="Id">品名分类主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<ParaGoodsCategoryDto> GetParaGoodsCategoryInfo(long Id); Task<ParaGoodsCategoryShowDto> GetParaGoodsCategoryInfo(long Id);
/// <summary> /// <summary>
/// 检索品名分类参数 /// 检索品名分类参数
@ -64,7 +64,7 @@ namespace Myshipping.Application
/// <param name="queryItem">检索值</param> /// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<List<ParaGoodsCategoryDto>> QueryParaGoodsCategoryInfo(string queryItem, int top = 10); Task<List<ParaGoodsCategoryShowDto>> QueryParaGoodsCategoryInfo(string queryItem, int top = 10);
/// <summary> /// <summary>
/// 作废品名分类参数 /// 作废品名分类参数
@ -93,7 +93,7 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="Id">约号主键</param> /// <param name="Id">约号主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<ParaContractNoDto> GetParaContractNoInfo(long Id); Task<ParaContractNoShowDto> GetParaContractNoInfo(long Id);
/// <summary> /// <summary>
/// 检索约号参数 /// 检索约号参数
@ -101,7 +101,7 @@ namespace Myshipping.Application
/// <param name="queryItem">检索值</param> /// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<List<ParaContractNoDto>> QuerytParaContractNoInfo(string queryItem, int top = 10); Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo(string queryItem, int top = 10);
/// <summary> /// <summary>
/// 作废约号参数 /// 作废约号参数

@ -170,9 +170,9 @@ namespace Myshipping.Application
/// <param name="Id">品名主键</param> /// <param name="Id">品名主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/GetParaGoodsInfo")] [HttpGet("/Para/GetParaGoodsInfo")]
public async Task<ParaGoodsDto> GetParaGoodsInfo([FromQuery]long Id) public async Task<ParaGoodsShowDto> GetParaGoodsInfo([FromQuery]long Id)
{ {
ParaGoodsDto model = null; ParaGoodsShowDto model = null;
try try
{ {
@ -182,7 +182,7 @@ namespace Myshipping.Application
throw Oops.Oh($"获取品名参数失败"); throw Oops.Oh($"获取品名参数失败");
model = info.Adapt<ParaGoodsDto>(); model = info.Adapt<ParaGoodsShowDto>();
} }
catch (Exception ex) catch (Exception ex)
@ -200,9 +200,9 @@ namespace Myshipping.Application
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/QueryParaGoodsInfo")] [HttpGet("/Para/QueryParaGoodsInfo")]
public async Task<List<ParaGoodsDto>> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10) public async Task<List<ParaGoodsShowDto>> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
{ {
List<ParaGoodsDto> list = new List<ParaGoodsDto>(); List<ParaGoodsShowDto> list = new List<ParaGoodsShowDto>();
try try
{ {
@ -224,7 +224,7 @@ namespace Myshipping.Application
var goodsList = await query.Take(top).ToListAsync(); var goodsList = await query.Take(top).ToListAsync();
if (goodsList.Count > 0) if (goodsList.Count > 0)
list = goodsList.Select(t => t.Adapt<ParaGoodsDto>()).ToList(); list = goodsList.Select(t => t.Adapt<ParaGoodsShowDto>()).ToList();
} }
catch (Exception ex) catch (Exception ex)
@ -281,7 +281,7 @@ namespace Myshipping.Application
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段 //这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsDto, ParaGoodsInfo>(QuerySearch.SortField); entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsShowDto, ParaGoodsInfo>(QuerySearch.SortField);
var entities = await _paraGoodsInfoRepository.AsQueryable().Filter(null, true) var entities = await _paraGoodsInfoRepository.AsQueryable().Filter(null, true)
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCode), t => t.GOODS_CODE.Contains(QuerySearch.GoodsCode.Trim(), StringComparison.OrdinalIgnoreCase)) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCode), t => t.GOODS_CODE.Contains(QuerySearch.GoodsCode.Trim(), StringComparison.OrdinalIgnoreCase))
@ -303,7 +303,7 @@ namespace Myshipping.Application
PageSize = entities.PageSize, PageSize = entities.PageSize,
TotalPage = entities.TotalPages, TotalPage = entities.TotalPages,
TotalRows = entities.TotalCount, TotalRows = entities.TotalCount,
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsDto>()).ToList() Rows = entities.Items.Select(t => t.Adapt<ParaGoodsShowDto>()).ToList()
}; };
} }
@ -376,9 +376,9 @@ namespace Myshipping.Application
/// <param name="Id">品名分类主键</param> /// <param name="Id">品名分类主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/GetParaGoodsCategoryInfo")] [HttpGet("/Para/GetParaGoodsCategoryInfo")]
public async Task<ParaGoodsCategoryDto> GetParaGoodsCategoryInfo(long Id) public async Task<ParaGoodsCategoryShowDto> GetParaGoodsCategoryInfo(long Id)
{ {
ParaGoodsCategoryDto model = null; ParaGoodsCategoryShowDto model = null;
try try
{ {
@ -388,7 +388,7 @@ namespace Myshipping.Application
throw Oops.Oh($"获取品名分类参数失败"); throw Oops.Oh($"获取品名分类参数失败");
model = info.Adapt<ParaGoodsCategoryDto>(); model = info.Adapt<ParaGoodsCategoryShowDto>();
} }
catch (Exception ex) catch (Exception ex)
@ -406,9 +406,9 @@ namespace Myshipping.Application
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/QueryParaGoodsCategoryInfo")] [HttpGet("/Para/QueryParaGoodsCategoryInfo")]
public async Task<List<ParaGoodsCategoryDto>> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10) public async Task<List<ParaGoodsCategoryShowDto>> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
{ {
List<ParaGoodsCategoryDto> list = new List<ParaGoodsCategoryDto>(); List<ParaGoodsCategoryShowDto> list = new List<ParaGoodsCategoryShowDto>();
try try
{ {
@ -427,7 +427,7 @@ namespace Myshipping.Application
var currList = await query.Take(top).ToListAsync(); var currList = await query.Take(top).ToListAsync();
if (currList.Count > 0) if (currList.Count > 0)
list = currList.Select(t => t.Adapt<ParaGoodsCategoryDto>()).ToList(); list = currList.Select(t => t.Adapt<ParaGoodsCategoryShowDto>()).ToList();
} }
catch (Exception ex) catch (Exception ex)
@ -549,7 +549,7 @@ namespace Myshipping.Application
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段 //这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsCategoryDto, ParaGoodsCategoryInfo>(QuerySearch.SortField); entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsCategoryShowDto, ParaGoodsCategoryInfo>(QuerySearch.SortField);
var entities = await _paraGoodsCategoryInfoRepository.AsQueryable().Filter(null, true) var entities = await _paraGoodsCategoryInfoRepository.AsQueryable().Filter(null, true)
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategory), t => t.GOODS_CATEGORY.Contains(QuerySearch.GoodsCategory.Trim(), StringComparison.OrdinalIgnoreCase)) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategory), t => t.GOODS_CATEGORY.Contains(QuerySearch.GoodsCategory.Trim(), StringComparison.OrdinalIgnoreCase))
@ -568,7 +568,7 @@ namespace Myshipping.Application
PageSize = entities.PageSize, PageSize = entities.PageSize,
TotalPage = entities.TotalPages, TotalPage = entities.TotalPages,
TotalRows = entities.TotalCount, TotalRows = entities.TotalCount,
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsCategoryDto>()).ToList() Rows = entities.Items.Select(t => t.Adapt<ParaGoodsCategoryShowDto>()).ToList()
}; };
} }
#endregion #endregion
@ -633,9 +633,9 @@ namespace Myshipping.Application
/// <param name="Id">约号主键</param> /// <param name="Id">约号主键</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/GetParaContractNoInfo")] [HttpGet("/Para/GetParaContractNoInfo")]
public async Task<ParaContractNoDto> GetParaContractNoInfo(long Id) public async Task<ParaContractNoShowDto> GetParaContractNoInfo(long Id)
{ {
ParaContractNoDto model = null; ParaContractNoShowDto model = null;
try try
{ {
@ -645,7 +645,7 @@ namespace Myshipping.Application
throw Oops.Oh($"获取约号参数失败"); throw Oops.Oh($"获取约号参数失败");
model = info.Adapt<ParaContractNoDto>(); model = info.Adapt<ParaContractNoShowDto>();
} }
catch (Exception ex) catch (Exception ex)
@ -665,9 +665,9 @@ namespace Myshipping.Application
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/QuerytParaContractNoInfo")] [HttpGet("/Para/QuerytParaContractNoInfo")]
public async Task<List<ParaContractNoDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) public async Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
{ {
List<ParaContractNoDto> list = new List<ParaContractNoDto>(); List<ParaContractNoShowDto> list = new List<ParaContractNoShowDto>();
try try
{ {
@ -687,7 +687,7 @@ namespace Myshipping.Application
var currList = await query.Take(top).ToListAsync(); var currList = await query.Take(top).ToListAsync();
if (currList.Count > 0) if (currList.Count > 0)
list = currList.Select(t => t.Adapt<ParaContractNoDto>()).ToList(); list = currList.Select(t => t.Adapt<ParaContractNoShowDto>()).ToList();
} }
catch (Exception ex) catch (Exception ex)
@ -803,7 +803,7 @@ namespace Myshipping.Application
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段 //这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaContractNoDto, ParaContractNoInfo>(QuerySearch.SortField); entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaContractNoShowDto, ParaContractNoInfo>(QuerySearch.SortField);
var entities = await _paraContractNoInfoRepository.AsQueryable().Filter(null, true) var entities = await _paraContractNoInfoRepository.AsQueryable().Filter(null, true)
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNo), t => t.CONTRACT_NO.Contains(QuerySearch.ContractNo.Trim(), StringComparison.OrdinalIgnoreCase)) .WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNo), t => t.CONTRACT_NO.Contains(QuerySearch.ContractNo.Trim(), StringComparison.OrdinalIgnoreCase))
@ -823,7 +823,7 @@ namespace Myshipping.Application
PageSize = entities.PageSize, PageSize = entities.PageSize,
TotalPage = entities.TotalPages, TotalPage = entities.TotalPages,
TotalRows = entities.TotalCount, TotalRows = entities.TotalCount,
Rows = entities.Items.Select(t => t.Adapt<ParaContractNoDto>()).ToList() Rows = entities.Items.Select(t => t.Adapt<ParaContractNoShowDto>()).ToList()
}; };
} }
#endregion #endregion

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 提单纸计算
/// </summary>
public class LaraPaperCalcInfo
{
/// <summary>
/// 顺序号
/// </summary>
public int Indx { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBLNo { get; set; }
/// <summary>
/// DRAFT页数
/// </summary>
public int DraftNum { get; set; }
/// <summary>
/// 提单用纸数
/// </summary>
public int PaperNum { get; set; }
}
}

@ -70,5 +70,13 @@ namespace Myshipping.Application
/// <returns>返回结果</returns> /// <returns>返回结果</returns>
Task<TaskManageOrderResultDto> PendingTask(string[] PKIds); Task<TaskManageOrderResultDto> PendingTask(string[] PKIds);
/// <summary>
/// 提单纸页数计算
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
Task<List<LaraPaperCalcInfo>> LaraPaperCalc(string[] PKIds);
} }
} }

@ -1098,6 +1098,42 @@ namespace Myshipping.Application
return result; return result;
} }
#endregion #endregion
/// <summary>
/// 提单纸页数计算
/// </summary>
/// <param name="PKIds">任务主键数组</param>
/// <returns>返回结果</returns>
public async Task<List<LaraPaperCalcInfo>> LaraPaperCalc(string[] PKIds)
{
List<LaraPaperCalcInfo> list = new List<LaraPaperCalcInfo>();
string batchNo = IDGen.NextID().ToString();
_logger.LogInformation("批次={no} ids={ids} 提单纸页数计算开始", batchNo, string.Join(",", PKIds));
try
{
//_taskBaseInfoRepository.AsQueryable().LeftJoin(_taskFileInfoRepository.AsQueryable(),)
//var taskList = _taskBaseInfoRepository.AsQueryable().Where(t => PKIds.Contains(t.PK_ID)).ToList();
//_logger.LogInformation("批次={no} 获取任务完成Num={Num}", batchNo, taskList.Count);
//taskList.ForEach(async tsk => {
// await InnerManualTask(batchNo, tsk, TaskOperTypeEnum.PENDING_TASK);
//});
}
catch (Exception ex)
{
throw Oops.Bah($"完成任务异常,{0}", ex.Message);
}
return list;
}
} }
} }

@ -10682,7 +10682,7 @@
</member> </member>
<member name="T:Myshipping.Core.Service.DjyTenantConfigService"> <member name="T:Myshipping.Core.Service.DjyTenantConfigService">
<summary> <summary>
公司默认值 租户配置
</summary> </summary>
</member> </member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Page(Myshipping.Core.Service.QueryDjyTenantConfigInput)"> <member name="M:Myshipping.Core.Service.DjyTenantConfigService.Page(Myshipping.Core.Service.QueryDjyTenantConfigInput)">

@ -114,10 +114,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var list = await _sysCacheService.GetAllCodeCarrier(); var list = await _sysCacheService.GetAllCodeCarrier();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList(); return queryList.OrderBy(x => x.Sort).ToList();
} }
@ -384,12 +380,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
public async Task<dynamic> YardList([FromQuery] NameQueryDto input) public async Task<dynamic> YardList([FromQuery] NameQueryDto input)
{ {
List<CodeYard> list = await _sysCacheService.GetAllCodeYard(); List<CodeYard> list = await _sysCacheService.GetAllCodeYard();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList(); return queryList.OrderBy(x => x.Sort).ToList();
} }
/// <summary> /// <summary>
@ -722,10 +713,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x=>x.Sort).ToList(); return queryList.OrderBy(x=>x.Sort).ToList();
} }
/// <summary> /// <summary>
@ -938,10 +925,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderByDescending(x=>x.CreateTime); || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderByDescending(x=>x.CreateTime);
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList(); return queryList.OrderBy(x => x.Sort).ToList();
} }
@ -1169,10 +1152,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList(); return queryList.OrderBy(x => x.Sort).ToList();
} }

@ -11,7 +11,7 @@ using Myshipping.Core.Entity;
namespace Myshipping.Core.Service namespace Myshipping.Core.Service
{ {
/// <summary> /// <summary>
/// 公司默认值 /// 租户配置
/// </summary> /// </summary>
[ApiDescriptionSettings(Name = "DjyTenantConfig", Order = 1)] [ApiDescriptionSettings(Name = "DjyTenantConfig", Order = 1)]
public class DjyTenantConfigService : IDjyTenantConfigService, IDynamicApiController, ITransient public class DjyTenantConfigService : IDjyTenantConfigService, IDynamicApiController, ITransient

@ -36,7 +36,7 @@ namespace Myshipping.Core.Service
public async Task<dynamic> GetListPage([FromQuery] string KeyWord) public async Task<dynamic> GetListPage([FromQuery] string KeyWord)
{ {
return await _rep.AsQueryable().Filter(null, true).Where(x=>x.TenantId==UserManager.TENANT_ID). return await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID).
WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord) WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord)
|| x.CARRIER.Contains(KeyWord) || x.Voyno.Contains(KeyWord) || x.PortLoading.Contains(KeyWord) || x.PortTransit.Contains(KeyWord) || || x.CARRIER.Contains(KeyWord) || x.Voyno.Contains(KeyWord) || x.PortLoading.Contains(KeyWord) || x.PortTransit.Contains(KeyWord) ||
x.PortDischarge.Contains(KeyWord) || x.VoynoInside.Contains(KeyWord) x.PortDischarge.Contains(KeyWord) || x.VoynoInside.Contains(KeyWord)
@ -91,13 +91,13 @@ namespace Myshipping.Core.Service
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet("/DjyVesselInfoService/GetList")] [HttpGet("/DjyVesselInfoService/GetList")]
public async Task<dynamic> GetList([FromQuery] string CarrierID, string KeyWord = "") public async Task<dynamic> GetList([FromQuery] string CarrierID, string KeyWord = "")
{ {
//获取船名 //获取船名
List<CodeVessel> list = await _sysCacheService.GetAllCodeVessel(); List<CodeVessel> list = await _sysCacheService.GetAllCodeVessel();
var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.Contains(KeyWord)). var tlist = await _rep.AsQueryable().Filter(null, true).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Vessel.StartsWith(KeyWord)).
Where(x=> x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7)&&x.TenantId==UserManager.TENANT_ID). Where(x => x.CARRIERID == CarrierID && x.ETD > DateTime.Now.AddDays(-7) && x.TenantId == UserManager.TENANT_ID).
Select(x => new Select(x => new
{ {
Voyno = x.Voyno, Voyno = x.Voyno,
@ -108,22 +108,22 @@ namespace Myshipping.Core.Service
}).Take(20). }).Take(20).
ToListAsync(); ToListAsync();
if (tlist.Count() == 0) var ves = tlist.Select(x => x.Vessel).ToList();
var all = list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.StartsWith(KeyWord)).
Select(x => new
{ {
return list.WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.Name.Contains(KeyWord)).Select(x => new
{
Voyno = "", Voyno = "",
VoynoInside = "", VoynoInside = "",
Vessel = x.Name, Vessel = x.Name,
ETD = "", ETD = "",
ATD = "", ATD = "",
}).Take(20).ToList(); }).Take(20).ToList();
} foreach (var item in ves)
else
{ {
return tlist; all.RemoveAll(x => x.Vessel.StartsWith(item));
} }
return tlist.Union<dynamic>(all);
} }
} }
} }

Loading…
Cancel
Save