master
wet 2 years ago
parent 62612a7228
commit 4c3436c992

@ -25,7 +25,7 @@ namespace djy.IService.Ams
void Delete(string ids, User user);
List<CommonCNEN> GetCountry();
List<CommonCNEN> GetCountry(string strlink , int page , int limit);
List<CommonCodeValue> GetCodePortLoad();
@ -37,10 +37,10 @@ namespace djy.IService.Ams
List<CodeDangerGradeDto> GetDangerousGoods(string strlink);
List<CommonCodeValue> GetPort(string strlink);
List<CommonCodeValue> GetPort(string strlink, int page, int limit);
List<CommonCodeValue> GetVessel(string strlink);
List<CommonCodeValue> GetVessel(string strlink,int page, int limit);
Task<Response> SendDE(string Gid, User user, string docType,string hid);

@ -42,5 +42,14 @@ namespace djy.Model.AmsDto
public DateTime? BDate { get; set; }
public DateTime? EDate { get; set; }
/// <summary>
/// 主单id
/// </summary>
public string Mid { get; set; }
/// <summary>
/// 分单id
/// </summary>
public string Hid { get; set; }
}
}

@ -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)
{

@ -241,16 +241,17 @@ namespace djy.Service.Isf
template.IsDel = false;
DbBus.Get(DbList.AMSCenter).Insert(template).ExecuteAffrows();
guid = template.GID;
return guid;
}
else
{
ISF_CompanyTemplate template = dto.MapTo<ISF_CompanyTemplate>();
DbBus.Get(DbList.AMSCenter).Update<ISF_CompanyTemplate>().SetSource(template).ExecuteAffrows();
var i= DbBus.Get(DbList.AMSCenter).Update<ISF_CompanyTemplate>().SetSource(template).ExecuteAffrows();
return i.ToString();
}
return guid;
}
#endregion

@ -175,7 +175,7 @@ namespace djy_AmsApi.Controllers.AMS
#region 保存模板
[HttpPost("SaveTemplate")]
public Response SaveTemplate(AMS_AddrTemplate Dto)
public Response SaveTemplate([FromBody] AMS_AddrTemplate Dto)
{
var result = new Response();
if (GetUserInfo() == null)

@ -19,12 +19,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCNEN>> GetCountry()
public Response<List<CommonCNEN>> GetCountry(string strlink = "", int page = 0, int limit = 0)
{
var result = new Response<List<CommonCNEN>>();
try
{
result.Result = ser.GetCountry();
result.Result = ser.GetCountry(strlink, page, limit);
}
catch (Exception ex)
{
@ -52,7 +52,6 @@ namespace djy_AmsApi.Controllers.Common
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
@ -103,7 +102,7 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetDangerousGoods")]
public Response<List<CodeDangerGradeDto>> GetDangerousGoods(string strlink = "")
public Response<List<CodeDangerGradeDto>> GetDangerousGoods(string strlink = "",int page = 0, int limit = 0)
{
var result = new Response<List<CodeDangerGradeDto>>();
try
@ -145,12 +144,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetPort")]
public Response<List<CommonCodeValue>> GetPort(string strlink = "")
public Response<List<CommonCodeValue>> GetPort(string strlink = "", int page = 0, int limit = 0)
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPort(strlink);
result.Result = ser.GetPort(strlink, page, limit);
}
catch (Exception ex)
{
@ -166,12 +165,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetVessel")]
public Response<List<CommonCodeValue>> GetVessel(string strlink = "")
public Response<List<CommonCodeValue>> GetVessel(string strlink = "", int page = 0,int limit =0)
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetVessel(strlink);
result.Result = ser.GetVessel(strlink, page,limit);
}
catch (Exception ex)
{

@ -6,6 +6,6 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-08-16T07:41:06.8876151Z;True|2022-08-11T16:30:26.5758718+08:00;True|2022-08-11T15:57:08.7787498+08:00;True|2022-08-11T15:31:36.9253999+08:00;</History>
<History>True|2022-08-23T06:06:20.0492662Z;True|2022-08-18T14:54:28.0305650+08:00;True|2022-08-18T14:01:59.8031822+08:00;True|2022-08-16T15:41:06.8876151+08:00;True|2022-08-11T16:30:26.5758718+08:00;True|2022-08-11T15:57:08.7787498+08:00;True|2022-08-11T15:31:36.9253999+08:00;</History>
</PropertyGroup>
</Project>

@ -20,12 +20,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCNEN>> GetCountry()
public Response<List<CommonCNEN>> GetCountry(string strlink, int page, int limit)
{
var result = new Response<List<CommonCNEN>>();
try
{
result.Result = ser.GetCountry();
result.Result = ser.GetCountry( strlink, page, limit);
}
catch (Exception ex)
{
@ -146,12 +146,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetPort")]
public Response<List<CommonCodeValue>> GetPort(string strlink = "")
public Response<List<CommonCodeValue>> GetPort(int page, int limit,string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPort(strlink);
result.Result = ser.GetPort(strlink, page,limit);
}
catch (Exception ex)
{
@ -167,12 +167,12 @@ namespace djy_AmsApi.Controllers.Common
/// </summary>
/// <returns></returns>
[HttpGet("GetVessel")]
public Response<List<CommonCodeValue>> GetVessel(string strlink = "")
public Response<List<CommonCodeValue>> GetVessel(int page, int limit,string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetVessel(strlink);
result.Result = ser.GetVessel(strlink, page, limit);
}
catch (Exception ex)
{

@ -45,7 +45,7 @@ namespace djy_Isfpi.Controllers.ISF
#region 新增/编辑
[HttpPost("AddOrUpdate")]
public Response AddOrUpdate(ISFDto Dto)
public Response AddOrUpdate([FromBody] ISFDto Dto)
{
var result = new Response();
var user = GetUserInfo();
@ -128,15 +128,11 @@ namespace djy_Isfpi.Controllers.ISF
return result;
}
#endregion
#region 保存模板
[HttpPost("SaveTemplate")]
public Response SaveTemplate(ISF_CompanyTemplate Dto)
public Response SaveTemplate([FromBody] ISF_CompanyTemplate Dto)
{
var result = new Response();
var user = GetUserInfo();
@ -157,6 +153,12 @@ namespace djy_Isfpi.Controllers.ISF
result.Code = 201;
result.Message = "模板名称重复!";
}
if (result.data == "0")
{
result.Code = 201;
result.Message = "不存在此模板,无法修改";
}
return result;
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。
-->
<Project>
<PropertyGroup>
<_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-08-22T07:49:27.7983465Z;</History>
</PropertyGroup>
</Project>
Loading…
Cancel
Save