wet 2 years ago
parent fcc3d919ed
commit 41f11a0ac9

@ -18,7 +18,6 @@ using djy.IService.Ams;
namespace djy_AmsApi.Controllers.AMS
{
[AllowAnonymous]
public class AmsController : ApiBase
{
IAmsService ser = IOC.AddServer<IAmsService>();
@ -129,218 +128,7 @@ namespace djy_AmsApi.Controllers.AMS
}
#endregion
#region 下拉接口
/// <summary>
/// 下拉获取国家
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCNEN>> GetCountry()
{
var result = new Response<List<CommonCNEN>>();
try
{
result.Result = ser.GetCountry();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船公司
/// </summary>
/// <returns></returns>
[HttpGet("GetCARRIER")]
public Response<List<CommonMappiCode>> GetCARRIER()
{
var result = new Response<List<CommonMappiCode>>();
try
{
result.Result = ser.GetCARRIER();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取箱型
/// </summary>
/// <returns></returns>
[HttpGet("GetCTNALL")]
public Response<List<CommonCodeValue>> GetCTNALL()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCTNALL();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取包装单位
/// </summary>
/// <returns></returns>
[HttpGet("GetPackage")]
public Response<List<CommonCodeValue>> GetPackage()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPackage();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取危品等级及 CODE
/// </summary>
/// <returns></returns>
[HttpGet("GetDangerousGoods")]
public Response<List<CodeDangerGradeDto>> GetDangerousGoods(string strlink="")
{
var result = new Response<List<CodeDangerGradeDto>>();
try
{
result.Result = ser.GetDangerousGoods(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取起运港口
/// </summary>
/// <returns></returns>
[HttpGet("GetCodePortLoad")]
public Response<List<CommonCodeValue>> GetCodePortLoad()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodePortLoad();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取港口
/// </summary>
/// <returns></returns>
[HttpGet("GetPort")]
public Response<List<CommonCodeValue>> GetPort(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPort(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船名
/// </summary>
/// <returns></returns>
[HttpGet("GetVessel")]
public Response<List<CommonCodeValue>> GetVessel(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetVessel(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取省份
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeProvince")]
public Response<List<CommonCodeValue>> GetCodeProvince()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodeProvince();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取城市 邮编
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeCity")]
public Response<List<CodeCityDto>> GetCodeCity(string provinceCode)
{
var result = new Response<List<CodeCityDto>>();
try
{
result.Result = ser.GetCodeCity(provinceCode);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
#endregion
#region pdf导出
[HttpGet("ExportPDF")]

@ -0,0 +1,228 @@
using Common.Utilities;
using djy.IService.Ams;
using djy.Model.AmsDto;
using djy.Service.Ams;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
namespace djy_AmsApi.Controllers.Common
{
public class CommonController
{
//AmsService ser = new AmsService();
IAmsService ser = IOC.AddServer<IAmsService>();
#region 下拉接口
/// <summary>
/// 下拉获取国家
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCNEN>> GetCountry()
{
var result = new Response<List<CommonCNEN>>();
try
{
result.Result = ser.GetCountry();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船公司
/// </summary>
/// <returns></returns>
[HttpGet("GetCARRIER")]
public Response<List<CommonMappiCode>> GetCARRIER()
{
var result = new Response<List<CommonMappiCode>>();
try
{
result.Result = ser.GetCARRIER();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取箱型
/// </summary>
/// <returns></returns>
[HttpGet("GetCTNALL")]
public Response<List<CommonCodeValue>> GetCTNALL()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCTNALL();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取包装单位
/// </summary>
/// <returns></returns>
[HttpGet("GetPackage")]
public Response<List<CommonCodeValue>> GetPackage()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPackage();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取危品等级及 CODE
/// </summary>
/// <returns></returns>
[HttpGet("GetDangerousGoods")]
public Response<List<CodeDangerGradeDto>> GetDangerousGoods(string strlink = "")
{
var result = new Response<List<CodeDangerGradeDto>>();
try
{
result.Result = ser.GetDangerousGoods(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取起运港口
/// </summary>
/// <returns></returns>
[HttpGet("GetCodePortLoad")]
public Response<List<CommonCodeValue>> GetCodePortLoad()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodePortLoad();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取港口
/// </summary>
/// <returns></returns>
[HttpGet("GetPort")]
public Response<List<CommonCodeValue>> GetPort(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPort(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船名
/// </summary>
/// <returns></returns>
[HttpGet("GetVessel")]
public Response<List<CommonCodeValue>> GetVessel(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetVessel(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取省份
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeProvince")]
public Response<List<CommonCodeValue>> GetCodeProvince()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodeProvince();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取城市 邮编
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeCity")]
public Response<List<CodeCityDto>> GetCodeCity(string provinceCode)
{
var result = new Response<List<CodeCityDto>>();
try
{
result.Result = ser.GetCodeCity(provinceCode);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
#endregion
}
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<ProjectGuid>84789cc9-b13d-4693-bf4f-6da3e32736a2</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<_PublishTargetUrl>C:\Project\DJYAMS\djyweb_ams\web\djy.WebApi\bin\Release\net5.0\publish\</_PublishTargetUrl>
<History>True|2022-07-05T03:23:47.7031600Z;</History>
</PropertyGroup>
</Project>

@ -0,0 +1,230 @@
using Common.Utilities;
using djy.IService.Ams;
using djy.Model.AmsDto;
using djy.Service.Ams;
using djy_IsfApi;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
namespace djy_AmsApi.Controllers.Common
{
public class CommonController
{
IAmsService ser = IOC.AddServer<IAmsService>();
#region 下拉接口
/// <summary>
/// 下拉获取国家
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCNEN>> GetCountry()
{
var result = new Response<List<CommonCNEN>>();
try
{
result.Result = ser.GetCountry();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船公司
/// </summary>
/// <returns></returns>
[HttpGet("GetCARRIER")]
public Response<List<CommonMappiCode>> GetCARRIER()
{
var result = new Response<List<CommonMappiCode>>();
try
{
result.Result = ser.GetCARRIER();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取箱型
/// </summary>
/// <returns></returns>
[HttpGet("GetCTNALL")]
public Response<List<CommonCodeValue>> GetCTNALL()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCTNALL();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取包装单位
/// </summary>
/// <returns></returns>
[HttpGet("GetPackage")]
public Response<List<CommonCodeValue>> GetPackage()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPackage();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取危品等级及 CODE
/// </summary>
/// <returns></returns>
[HttpGet("GetDangerousGoods")]
public Response<List<CodeDangerGradeDto>> GetDangerousGoods(string strlink = "")
{
var result = new Response<List<CodeDangerGradeDto>>();
try
{
result.Result = ser.GetDangerousGoods(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取起运港口
/// </summary>
/// <returns></returns>
[HttpGet("GetCodePortLoad")]
public Response<List<CommonCodeValue>> GetCodePortLoad()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodePortLoad();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取港口
/// </summary>
/// <returns></returns>
[HttpGet("GetPort")]
public Response<List<CommonCodeValue>> GetPort(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetPort(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取船名
/// </summary>
/// <returns></returns>
[HttpGet("GetVessel")]
public Response<List<CommonCodeValue>> GetVessel(string strlink = "")
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetVessel(strlink);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取省份
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeProvince")]
public Response<List<CommonCodeValue>> GetCodeProvince()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCodeProvince();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
/// <summary>
/// 下拉获取城市 邮编
/// </summary>
/// <returns></returns>
[HttpGet("GetCodeCity")]
public Response<List<CodeCityDto>> GetCodeCity(string provinceCode)
{
var result = new Response<List<CodeCityDto>>();
try
{
result.Result = ser.GetCodeCity(provinceCode);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
#endregion
}
}

@ -13,7 +13,6 @@ using System.Threading.Tasks;
namespace djy_Isfpi.Controllers.ISF
{
[AllowAnonymous]
public class IsfController : ApiBase
{

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<ProjectGuid>b9b3283e-fa06-4b06-88f1-5680ac4e5f26</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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-07-05T03:48:21.5945057Z;True|2022-07-05T11:21:19.6041212+08:00;True|2022-07-05T11:19:11.9998954+08:00;</History>
</PropertyGroup>
</Project>

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Project\DJYAMS\djyweb_ams\web\djy_IsfApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>
</Project>
Loading…
Cancel
Save