diff --git a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs
index 474b35e9..6df8726a 100644
--- a/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs
+++ b/Myshipping.Application/Entity/Para/ParaContractNoInfo.cs
@@ -30,5 +30,25 @@ namespace Myshipping.Application
/// 合约号备注
///
public string CONTRACT_NOTE { get; set; }
+
+ ///
+ /// 航线代码
+ ///
+ public string LANE_CODE { get; set; }
+
+ ///
+ /// 航线中文
+ ///
+ public string LANE_CNAME { get; set; }
+
+ ///
+ /// 目的港代码
+ ///
+ public string POD_CODE { get; set; }
+
+ ///
+ /// 船公司代码
+ ///
+ public string CARRIER_CODE { get; set; }
}
}
diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index 1cd2102f..06388793 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -495,7 +495,7 @@ namespace Myshipping.Application
{
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.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(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)
.WhereIF(!input.ISDel, x => x.IsDeleted == false)
.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) //台账只查询主单!!
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
.WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO))
@@ -6367,12 +6367,12 @@ namespace Myshipping.Application
}
//截单
- if(model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase))
+ if (model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase))
{
//如果是截单需最后推送货物状态
await SetGoodsStatus("JD", model.Id);
}
-
+
}
diff --git a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs
index f6296446..8f41a5a2 100644
--- a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs
+++ b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs
@@ -31,6 +31,29 @@ namespace Myshipping.Application
///
/// 测试1
public string ContractNote { get; set; }
+
+ ///
+ /// 航线代码
+ ///
+ /// 测试1
+ public string LaneCode { get; set; }
+
+ ///
+ /// 航线中文
+ ///
+ /// 测试1
+ public string LaneCName { get; set; }
+
+ ///
+ /// 目的港代码
+ ///
+ /// 测试1
+ public string PODCode { get; set; }
+
+ ///
+ /// 船公司代码
+ ///
+ public string CarrierCode { get; set;}
}
diff --git a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs
index 354887af..a48278a9 100644
--- a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs
+++ b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs
@@ -75,7 +75,11 @@ namespace Myshipping.Application
.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);
+ .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()
.Map(dest => dest.Id, src => src.Id)
@@ -87,14 +91,22 @@ namespace Myshipping.Application
.Map(dest => dest.CreateTime, src => src.CreatedTime)
.Map(dest => dest.UpdateUserId, src => src.UpdatedUserId)
.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()
.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_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);
}
}
}
diff --git a/Myshipping.Application/Service/Para/Interface/IParaService.cs b/Myshipping.Application/Service/Para/Interface/IParaService.cs
index 0383d7cc..774c6091 100644
--- a/Myshipping.Application/Service/Para/Interface/IParaService.cs
+++ b/Myshipping.Application/Service/Para/Interface/IParaService.cs
@@ -101,8 +101,13 @@ namespace Myshipping.Application
///
/// 检索值
/// 默认最大行数
+ /// 船公司代码
+ /// 航线代码
+ /// 航线中文
+ /// 目的港代码
/// 返回回执
- Task> QuerytParaContractNoInfo(string queryItem, int top = 10);
+ Task> QuerytParaContractNoInfo(string queryItem, int top = 10,
+ string carrier = "", string lane = "", string lanecname = "", string pod = "");
///
/// 作废约号参数
diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs
index 25d9e810..9378cb58 100644
--- a/Myshipping.Application/Service/Para/ParaService.cs
+++ b/Myshipping.Application/Service/Para/ParaService.cs
@@ -609,6 +609,9 @@ namespace Myshipping.Application
info.CONTRACT_NO = model.ContractNo?.Trim();
info.CONTRACT_NAME = model.ContractName?.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
{
@@ -671,14 +674,20 @@ namespace Myshipping.Application
///
/// 检索值
/// 默认最大行数
+ /// 船公司代码
+ /// 航线代码
+ /// 航线中文
+ /// 目的港代码
/// 返回回执
[HttpGet("/Para/QuerytParaContractNoInfo")]
- public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
+ public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10,
+ [FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string lanecname = "", [FromQuery] string pod = "")
{
List list = new List();
try
{
+
var query = _paraContractNoInfoRepository.AsQueryable();
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");
var currList = await query.Take(top).ToListAsync();