master
wet 3 years ago
parent f06840f1a5
commit 6d64934a38

@ -53,6 +53,9 @@ namespace Common
return Conn.Query<T>(SPName, null, null, true, 0, CommandType.StoredProcedure).AsList();
}
}
/// <summary>
///
/// </summary>
@ -438,10 +441,9 @@ namespace Common
}
}
/// <summary>
/// 执行中包含事务sql
/// </summary>
@ -521,10 +523,13 @@ namespace Common
return Conn.Update<T>(model);
}
}
public List<T> Query<T>(String sql, object param = null)
{
using (IDbConnection Conn = GetConn())
{
return Query<T>(sql, param);
}
}
}
}

@ -33,5 +33,8 @@ namespace djy.Paas.IService
void Delete(string ids);
List<CommonCodeValue> GetCountry();
}
}

@ -97,5 +97,29 @@ namespace djy.Model.Ams
public string IsDel { get; set; }
/// <summary>
/// 包装code
/// </summary>
public string KINDPKGSCode { get; set; }
/// <summary>
/// 原产国
/// </summary>
public string OriginCountry { get; set; }
/// <summary>
/// 原产国代码
/// </summary>
public string OriginCountryCode { get; set; }
/// <summary>
/// 危品联系人电话(选填)
/// </summary>
public string LINKMANTel { get; set; }
/// <summary>
/// 危品等级(条件必填)
/// </summary>
public string DangerGrade { get; set; }
}
}

@ -5,9 +5,6 @@ namespace djy.Model.Ams
[Table("AMS_House")]
public class AMS_House
{
public AMS_House(){
this.IsDel = "0";
@ -54,7 +51,7 @@ namespace djy.Model.Ams
/// <summary>
/// 收货人名称
/// </summary>
public string CONSIGNEE { get; set; }
public string CONSIGNEEName { get; set; }
/// <summary>
@ -89,5 +86,56 @@ namespace djy.Model.Ams
/// </summary>
public string NOTIFYPARTYTEL { get; set; }
public string IsDel { get; set; }
/// <summary>
/// 货代单运编号(选填)
/// </summary>
public string ShippingNo { get; set; }
/// <summary>
/// 发货人国家
/// </summary>
public string SHIPPERCountry { get; set; }
/// <summary>
/// 发货人国家code
/// </summary>
public string SHIPPERCountryCode { get; set; }
/// <summary>
/// 发货人城市
/// </summary>
public string SHIPPERCity { get; set; }
/// <summary>
/// 收货人国家
/// </summary>
public string CONSIGNEECountry { get; set; }
/// <summary>
/// 收货人国家code
/// </summary>
public string CONSIGNEECode { get; set; }
/// <summary>
/// 收货人城市
/// </summary>
public string CONSIGNEECity { get; set; }
/// <summary>
/// 通知人国家
/// </summary>
public string NOTIFYPARTYCountry { get; set; }
/// <summary>
/// 通知人国家code
/// </summary>
public string NOTIFYPARTYCode { get; set; }
/// <summary>
/// 通知人城市
/// </summary>
public string NOTIFYPARTYCity { get; set; }
}
}

@ -85,7 +85,7 @@ namespace djy.Model.Ams
public string LoadingPort { get; set; }
/// <summary>
/// 最后一个非美港
/// 最后一个非美港/中转港
/// </summary>
public string LastNoUsPort { get; set; }
@ -109,5 +109,30 @@ namespace djy.Model.Ams
public DateTime? CreateTime { get; set; }
public DateTime? LastUpdate { get; set; }
public string IsDel { get; set; }
/// <summary>
/// 船东单运编号(选填)
/// </summary>
public string ShippingNo { get; set; }
/// <summary>
/// 整箱/拼箱 FCL整箱 LCL拼箱
/// </summary>
public string ConsignmentType { get; set; }
/// <summary>
/// 装货港code
/// </summary>
public string LoadingPortCode { get; set; }
/// <summary>
/// 卸货港code
/// </summary>
public string PORTDISCHARGECode { get; set; }
/// <summary>
/// 最后一个非美港/中转港Code
/// </summary>
public string LastNoUsPortCode { get; set; }
}
}

@ -4,14 +4,13 @@ using System.Collections.Generic;
namespace djy.Model.AmsDto
{
public class AMSDto
{
/// <summary>
/// 主键
/// </summary>
public string GID { get; set; }
/// <summary>
@ -81,7 +80,7 @@ namespace djy.Model.AmsDto
public string LoadingPort { get; set; }
/// <summary>
/// 最后一个非美港
/// 最后一个非美港/中转港
/// </summary>
public string LastNoUsPort { get; set; }
@ -104,6 +103,32 @@ namespace djy.Model.AmsDto
public DateTime? CreateTime { get; set; }
public DateTime? LastUpdate { get; set; }
public string IsDel { get; set; }
/// <summary>
/// 船东单运编号(选填)
/// </summary>
public string ShippingNo { get; set; }
/// <summary>
/// 整箱/拼箱 FCL整箱 LCL拼箱
/// </summary>
public string ConsignmentType { get; set; }
/// <summary>
/// 装货港code
/// </summary>
public string LoadingPortCode { get; set; }
/// <summary>
/// 卸货港code
/// </summary>
public string PORTDISCHARGECode { get; set; }
/// <summary>
/// 最后一个非美港/中转港Code
/// </summary>
public string LastNoUsPortCode { get; set; }
public List<AMS_HouseDto> HouseDto { get; set; } = new List<AMS_HouseDto>();
}
@ -150,7 +175,7 @@ namespace djy.Model.AmsDto
/// <summary>
/// 收货人名称
/// </summary>
public string CONSIGNEE { get; set; }
public string CONSIGNEEName { get; set; }
/// <summary>
@ -184,8 +209,59 @@ namespace djy.Model.AmsDto
/// 通知人电话
/// </summary>
public string NOTIFYPARTYTEL { get; set; }
public List<AMS_Cntrno> CntrnoDto { get; set; }
public string IsDel { get; set; }
/// <summary>
/// 货代单运编号(选填)
/// </summary>
public string ShippingNo { get; set; }
/// <summary>
/// 发货人国家
/// </summary>
public string SHIPPERCountry { get; set; }
/// <summary>
/// 发货人国家code
/// </summary>
public string SHIPPERCountryCode { get; set; }
/// <summary>
/// 发货人城市
/// </summary>
public string SHIPPERCity { get; set; }
/// <summary>
/// 收货人国家
/// </summary>
public string CONSIGNEECountry { get; set; }
/// <summary>
/// 收货人国家code
/// </summary>
public string CONSIGNEECode { get; set; }
/// <summary>
/// 收货人城市
/// </summary>
public string CONSIGNEECity { get; set; }
/// <summary>
/// 通知人国家
/// </summary>
public string NOTIFYPARTYCountry { get; set; }
/// <summary>
/// 通知人国家code
/// </summary>
public string NOTIFYPARTYCode { get; set; }
/// <summary>
/// 通知人城市
/// </summary>
public string NOTIFYPARTYCity { get; set; }
public List<AMS_Cntrno> CntrnoDto { get; set; }
}
}

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace djy.Model.AmsDto
{
public class CommonCodeValue
{
public string Code { get; set; }
public string Value { get; set; }
}
}

@ -26,8 +26,6 @@ namespace djy.Service.Ams
{
DapperDBBase dapper = new DapperDBBase();
public TableData Load(AMSQuery req, string userid)
{
var result = new TableData();
@ -55,7 +53,6 @@ namespace djy.Service.Ams
public void Delete(string ids)
{
string[] id = ids.Split(',');
using (var transaction = new TransactionScope())
{
@ -86,8 +83,6 @@ namespace djy.Service.Ams
}
public async void SaveInfo(AMSDto dto, string userid)
{
if (dto.GID.IsNull())
@ -183,8 +178,6 @@ namespace djy.Service.Ams
connection.Close();
}
}
}
@ -193,5 +186,20 @@ namespace djy.Service.Ams
}
}
public List<CommonCodeValue> GetCountry()
{
try
{
var List = dapper.Query<CommonCodeValue>("select Code,Value from AMS_SysCARRIER order by value");
return List;
}
catch (Exception e)
{
throw;
}
}
}
}

@ -8,15 +8,17 @@ using djy.Service.Ams;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
namespace djy_AmsApi.Controllers
{
[AllowAnonymous]
public class AmsController : ApiBase
{
AmsService ser =new AmsService();
[HttpPost("AddOrUpdate")]
public Response AddOrUpdate(AMSDto Dto)
{
@ -32,9 +34,11 @@ namespace djy_AmsApi.Controllers
result.Message = "无效数据!";
}
ser.SaveInfo(Dto, GetLoginId.ToString());
return result;
}
[HttpGet("Load")]
public object Load([FromQuery] AMSQuery request)
{
@ -45,10 +49,10 @@ namespace djy_AmsApi.Controllers
result.Message = "登录过期,请重新登录!";
return result;
}
return ser.Load(request, GetLoginId.ToString());
}
[HttpGet("Del")]
public Response Delete(string ids)
{
@ -67,7 +71,31 @@ namespace djy_AmsApi.Controllers
return result;
}
/// <summary>
/// 下拉获取国家
/// </summary>
/// <returns></returns>
[HttpGet("GetCountry")]
public Response<List<CommonCodeValue>> GetCountry()
{
var result = new Response<List<CommonCodeValue>>();
try
{
result.Result = ser.GetCountry();
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.InnerException?.Message ?? ex.Message;
}
return result;
}
}
}
}

Loading…
Cancel
Save