wet 1 year ago
commit a1cdbb74bf

@ -30,5 +30,25 @@ namespace Myshipping.Application
/// 合约号备注 /// 合约号备注
/// </summary> /// </summary>
public string CONTRACT_NOTE { get; set; } public string CONTRACT_NOTE { get; set; }
/// <summary>
/// 航线代码
/// </summary>
public string LANE_CODE { get; set; }
/// <summary>
/// 航线中文
/// </summary>
public string LANE_CNAME { get; set; }
/// <summary>
/// 目的港代码
/// </summary>
public string POD_CODE { get; set; }
/// <summary>
/// 船公司代码
/// </summary>
public string CARRIER_CODE { get; set; }
} }
} }

@ -495,7 +495,7 @@ namespace Myshipping.Application
{ {
itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId); itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId);
} }
item.IsVGM=itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault()==null?null: itgoods.Where(x => x.SystemCode == "YFVGM").Select(x=>x.FinishTime).FirstOrDefault(); item.IsVGM = itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFVGM").Select(x => x.FinishTime).FirstOrDefault();
item.IsCanDan = itgoods.Where(x => x.SystemCode == "YFCD").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFCD").Select(x => x.FinishTime).FirstOrDefault(); item.IsCanDan = itgoods.Where(x => x.SystemCode == "YFCD").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFCD").Select(x => x.FinishTime).FirstOrDefault();
item.IsZZFX = itgoods.Where(x => x.SystemCode == "ZZFX").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "ZZFX").Select(x => x.FinishTime).FirstOrDefault(); item.IsZZFX = itgoods.Where(x => x.SystemCode == "ZZFX").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "ZZFX").Select(x => x.FinishTime).FirstOrDefault();
item.GoodsStatusList = itgoods.Union<GoodsStatusList>(itconfig).OrderBy(x => x.Sort).ToList(); item.GoodsStatusList = itgoods.Union<GoodsStatusList>(itconfig).OrderBy(x => x.Sort).ToList();
@ -596,7 +596,7 @@ namespace Myshipping.Application
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID) var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID)
.WhereIF(!input.ISDel, x => x.IsDeleted == false) .WhereIF(!input.ISDel, x => x.IsDeleted == false)
.WhereIF(input.ISDel, x => x.IsDeleted == true) .WhereIF(input.ISDel, x => x.IsDeleted == true)
.WhereIF(input.firstFlag, x => x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) .WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && x.CreatedUserId == UserManager.UserId) //首次加载数据ETD前后15天且创建人是当前人
.Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!! .Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!!
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id)) .WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
.WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO)) .WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO))
@ -6367,7 +6367,7 @@ namespace Myshipping.Application
} }
//截单 //截单
if(model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase)) if (model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase))
{ {
//如果是截单需最后推送货物状态 //如果是截单需最后推送货物状态
await SetGoodsStatus("JD", model.Id); await SetGoodsStatus("JD", model.Id);

@ -31,6 +31,29 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <example>测试1</example> /// <example>测试1</example>
public string ContractNote { get; set; } public string ContractNote { get; set; }
/// <summary>
/// 航线代码
/// </summary>
/// <example>测试1</example>
public string LaneCode { get; set; }
/// <summary>
/// 航线中文
/// </summary>
/// <example>测试1</example>
public string LaneCName { get; set; }
/// <summary>
/// 目的港代码
/// </summary>
/// <example>测试1</example>
public string PODCode { get; set; }
/// <summary>
/// 船公司代码
/// </summary>
public string CarrierCode { get; set;}
} }

@ -75,7 +75,11 @@ namespace Myshipping.Application
.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)
.Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE); .Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE)
.Map(dest => dest.LaneCode, src => src.LANE_CODE)
.Map(dest => dest.LaneCName, src => src.LANE_CNAME)
.Map(dest => dest.PODCode, src => src.POD_CODE)
.Map(dest => dest.CarrierCode, src => src.CARRIER_CODE);
config.ForType<ParaContractNoInfo, ParaContractNoShowDto>() config.ForType<ParaContractNoInfo, ParaContractNoShowDto>()
.Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Id, src => src.Id)
@ -87,14 +91,22 @@ namespace Myshipping.Application
.Map(dest => dest.CreateTime, src => src.CreatedTime) .Map(dest => dest.CreateTime, src => src.CreatedTime)
.Map(dest => dest.UpdateUserId, src => src.UpdatedUserId) .Map(dest => dest.UpdateUserId, src => src.UpdatedUserId)
.Map(dest => dest.UpdateUserName, src => src.UpdatedUserName) .Map(dest => dest.UpdateUserName, src => src.UpdatedUserName)
.Map(dest => dest.UpdateTime, src => src.UpdatedTime.HasValue ? src.UpdatedTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""); .Map(dest => dest.UpdateTime, src => src.UpdatedTime.HasValue ? src.UpdatedTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "")
.Map(dest => dest.LaneCode, src => src.LANE_CODE)
.Map(dest => dest.LaneCName, src => src.LANE_CNAME)
.Map(dest => dest.PODCode, src => src.POD_CODE)
.Map(dest => dest.CarrierCode, src => src.CARRIER_CODE);
config.ForType<ParaContractNoDto, ParaContractNoInfo>() config.ForType<ParaContractNoDto, ParaContractNoInfo>()
.Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0) .Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0)
.Map(dest => dest.CONTRACT_NO, src => src.ContractNo) .Map(dest => dest.CONTRACT_NO, src => src.ContractNo)
.Map(dest => dest.CONTRACT_NAME, src => src.ContractName) .Map(dest => dest.CONTRACT_NAME, src => src.ContractName)
.Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote); .Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote)
.Map(dest => dest.LANE_CODE, src => src.LaneCode)
.Map(dest => dest.LANE_CNAME, src => src.LaneCName)
.Map(dest => dest.POD_CODE, src => src.PODCode)
.Map(dest => dest.CARRIER_CODE, src => src.CarrierCode);
} }
} }
} }

@ -101,8 +101,13 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="queryItem">检索值</param> /// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <param name="carrier">船公司代码</param>
/// <param name="lane">航线代码</param>
/// <param name="lanecname">航线中文</param>
/// <param name="pod">目的港代码</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo(string queryItem, int top = 10); Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo(string queryItem, int top = 10,
string carrier = "", string lane = "", string lanecname = "", string pod = "");
/// <summary> /// <summary>
/// 作废约号参数 /// 作废约号参数

@ -609,6 +609,9 @@ namespace Myshipping.Application
info.CONTRACT_NO = model.ContractNo?.Trim(); info.CONTRACT_NO = model.ContractNo?.Trim();
info.CONTRACT_NAME = model.ContractName?.Trim(); info.CONTRACT_NAME = model.ContractName?.Trim();
info.CONTRACT_NOTE = model.ContractNote?.Trim(); info.CONTRACT_NOTE = model.ContractNote?.Trim();
info.LANE_CODE = model.LaneCode?.Trim();
info.LANE_CNAME = model.LaneCName?.Trim();
info.POD_CODE = model.PODCode?.Trim();
await _paraContractNoInfoRepository.AsUpdateable(info).IgnoreColumns(it => new await _paraContractNoInfoRepository.AsUpdateable(info).IgnoreColumns(it => new
{ {
@ -671,14 +674,20 @@ namespace Myshipping.Application
/// </summary> /// </summary>
/// <param name="queryItem">检索值</param> /// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param> /// <param name="top">默认最大行数</param>
/// <param name="carrier">船公司代码</param>
/// <param name="lane">航线代码</param>
/// <param name="lanecname">航线中文</param>
/// <param name="pod">目的港代码</param>
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
[HttpGet("/Para/QuerytParaContractNoInfo")] [HttpGet("/Para/QuerytParaContractNoInfo")]
public async Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) public async Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10,
[FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string lanecname = "", [FromQuery] string pod = "")
{ {
List<ParaContractNoShowDto> list = new List<ParaContractNoShowDto>(); List<ParaContractNoShowDto> list = new List<ParaContractNoShowDto>();
try try
{ {
var query = _paraContractNoInfoRepository.AsQueryable(); var query = _paraContractNoInfoRepository.AsQueryable();
if (!string.IsNullOrWhiteSpace(queryItem)) if (!string.IsNullOrWhiteSpace(queryItem))
@ -690,6 +699,30 @@ namespace Myshipping.Application
); );
} }
if (!string.IsNullOrWhiteSpace(carrier))
{
query = query.Where(t => t.CARRIER_CODE.Equals(carrier));
}
//else
//{
// throw Oops.Bah($"检索约号失败,船公司不能为空");
//}
if (!string.IsNullOrWhiteSpace(lane))
{
query = query.Where(t => t.LANE_CODE.Contains(lane));
}
if (!string.IsNullOrWhiteSpace(lanecname))
{
query = query.Where(t => t.LANE_CNAME.Contains(lanecname));
}
if (!string.IsNullOrWhiteSpace(pod))
{
query = query.Where(t => t.POD_CODE.Contains(pod));
}
query = query.OrderBy("CONTRACT_NO asc"); query = query.OrderBy("CONTRACT_NO asc");
var currList = await query.Take(top).ToListAsync(); var currList = await query.Take(top).ToListAsync();

Loading…
Cancel
Save