|
|
|
@ -54,6 +54,7 @@ namespace djy.Service.Ams
|
|
|
|
|
}
|
|
|
|
|
var dto = DbBus.Get(DbList.AMSCenter).Select<AMS_Master>()
|
|
|
|
|
.Where(x => x.IsDel != true)
|
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(req.Mid), x => x.GID == req.Mid)
|
|
|
|
|
.WhereIf(aut.CompayId != null, x => x.CompID == aut.CompayId.ToString())
|
|
|
|
|
.WhereIf(aut.UserId != null, x => x.UserID == aut.UserId.ToString())
|
|
|
|
|
.WhereIf(req.MBLNO != null, x => x.MBLNO.Contains(req.MBLNO.Trim()))
|
|
|
|
@ -71,6 +72,7 @@ namespace djy.Service.Ams
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var hodto = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => x.IsDel != true && x.PID == item.GID)
|
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(req.Hid), x => x.GID == req.Hid)
|
|
|
|
|
.WhereIf(req.HBLNo != null, x => x.HBLNo.Contains(req.HBLNo.Trim()))
|
|
|
|
|
.WhereIf(req.ReportState == "0", x => x.ReportState == "未申报" || x.ReportState == "接收失败")
|
|
|
|
|
.WhereIf(req.ReportState == "1", x => !(x.ReportState == "未申报" || x.ReportState == "接收失败"))
|
|
|
|
@ -1352,17 +1354,32 @@ namespace djy.Service.Ams
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 下拉接口
|
|
|
|
|
public List<CommonCNEN> GetCountry()
|
|
|
|
|
public List<CommonCNEN> GetCountry(string strlink, int page, int limit)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCountry>().ToList().Select(x => new CommonCNEN
|
|
|
|
|
if (page == 0 && limit == 0)
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
ENName = x.EnName,
|
|
|
|
|
CNName = x.CnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCountry>().ToList().Select(x => new CommonCNEN
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
ENName = x.EnName,
|
|
|
|
|
CNName = x.CnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCountry>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())|| x.CnName.Contains(strlink.Trim()) ).Page(page, limit).ToList().Select(x => new CommonCNEN
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
ENName = x.EnName,
|
|
|
|
|
CNName = x.CnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
@ -1441,16 +1458,30 @@ namespace djy.Service.Ams
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<CommonCodeValue> GetPort(string strlink)
|
|
|
|
|
public List<CommonCodeValue> GetPort(string strlink, int page, int limit)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodePort>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
if (page == 0 && limit == 0)
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
Value = x.EnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodePort>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
Value = x.EnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodePort>().WhereIf(strlink != "", x => x.Code.Contains(strlink.Trim()) || x.EnName.Contains(strlink.Trim())).Page(page, limit).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
{
|
|
|
|
|
Code = x.Code,
|
|
|
|
|
Value = x.EnName,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
@ -1476,16 +1507,27 @@ namespace djy.Service.Ams
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<CommonCodeValue> GetVessel(string strlink)
|
|
|
|
|
public List<CommonCodeValue> GetVessel(string strlink,int page,int limit)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
if (page == 0 && limit == 0)
|
|
|
|
|
{
|
|
|
|
|
Code = x.Name,
|
|
|
|
|
Value = x.Name,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
{
|
|
|
|
|
Code = x.Name,
|
|
|
|
|
Value = x.Name,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeVessel>().WhereIf(strlink != "", x => x.Name.Contains(strlink.Trim())).Page(page,limit).ToList().Select(x => new CommonCodeValue
|
|
|
|
|
{
|
|
|
|
|
Code = x.Name,
|
|
|
|
|
Value = x.Name,
|
|
|
|
|
}).Distinct().ToList();
|
|
|
|
|
return List;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|