From 753bcd5fada215227a1b79d6fb114f88d4ca603a Mon Sep 17 00:00:00 2001 From: wet Date: Mon, 27 Jun 2022 22:56:04 +0800 Subject: [PATCH] ISF --- ams/Djy.Common/DjyService/ApiBase.cs | 6 +- ams/Djy.Common/DjyService/ServBase.cs | 4 + ams/djy.Model/IsfDto/IsfInfo.cs | 104 ++++++++++++++------------ ams/djy.Service/ISF/IsfService.cs | 57 ++++++++------ 4 files changed, 98 insertions(+), 73 deletions(-) diff --git a/ams/Djy.Common/DjyService/ApiBase.cs b/ams/Djy.Common/DjyService/ApiBase.cs index 072fd80..7c0b58a 100644 --- a/ams/Djy.Common/DjyService/ApiBase.cs +++ b/ams/Djy.Common/DjyService/ApiBase.cs @@ -175,18 +175,18 @@ namespace Common.DjyService /// /// 获取登录名称 /// - protected string GetLoginName { get { return GetClaimsValue("loginname"); } } + protected string GetLoginName { get { return GetClaimsValue("showname"); } } /// /// 获取登录公司名称 /// - protected string GetLoginComptName { get { return GetClaimsValue("COMNAME"); } } + protected string GetLoginComptName { get { return GetClaimsValue("comname"); } } /// /// 获取登录公司id /// - protected string GetLoginCompId { get { return GetClaimsValue("CompayId"); } } + protected string GetLoginCompId { get { return GetClaimsValue("compayid"); } } /// /// 获取登录类型 diff --git a/ams/Djy.Common/DjyService/ServBase.cs b/ams/Djy.Common/DjyService/ServBase.cs index 0c68d98..b09763d 100644 --- a/ams/Djy.Common/DjyService/ServBase.cs +++ b/ams/Djy.Common/DjyService/ServBase.cs @@ -494,4 +494,8 @@ namespace Common.DjyService } + + + + } diff --git a/ams/djy.Model/IsfDto/IsfInfo.cs b/ams/djy.Model/IsfDto/IsfInfo.cs index e942097..63bbc1b 100644 --- a/ams/djy.Model/IsfDto/IsfInfo.cs +++ b/ams/djy.Model/IsfDto/IsfInfo.cs @@ -8,117 +8,123 @@ namespace djy.Model.IsfDto public class Info { /// - /// 提单号 + /// 提单类型CODE /// - public string masterBillNo { get; set; } + public string blTypeCode { get; set; } /// - /// 类型(1.ISF5 2.ISF10) + /// 交货地代码 /// - public string infoType { get; set; } + public string deliveryHarbourCode { get; set; } /// /// 卸货港代码 /// public string dischargeHarbourCode { get; set; } + + /// - /// 交货地代码 + /// HSTCode多个用英文逗号隔开 /// - public string deliveryHarbourCode { get; set; } + public string hstCode { get; set; } /// - /// 贸易类型代码 + /// 类型(1.ISF5 2.ISF10) /// - public string shipmentTypeCode { get; set; } + public string infoType { get; set; } + /// - /// HSTCode多个用英文逗号隔开 + /// 提单号 /// - public string hstCode { get; set; } + public string masterBillNo { get; set; } /// /// 备注 /// public string memo { get; set; } /// - /// 提单类型CODE - /// - public string blTypeCode { get; set; } - /// /// 业务id /// public string refId { get; set; } + + /// + /// 贸易类型代码 + /// + public string shipmentTypeCode { get; set; } } public class CompanyList { /// - /// 公司类型 + /// 地址 /// - public string companyType { get; set; } + public string address { get; set; } /// - /// 公司名称 + /// 城市 /// - public string companyName { get; set; } + public string city { get; set; } + /// /// 公司ID /// public string companyId { get; set; } + /// - /// id类型代码 + /// 公司名称 /// - public string idTypeCode { get; set; } + public string companyName { get; set; } /// - /// 地址 + /// 公司类型 /// - public string address { get; set; } + public string companyType { get; set; } /// - /// 城市 + /// 国家代码 /// - public string city { get; set; } + public string countryCode { get; set; } /// - /// 省份 + /// HSTCode多个用英文逗号隔开 /// - public string province { get; set; } + public string hstCode { get; set; } /// - /// 省份代码 + /// id类型代码 /// - public string provinceCode { get; set; } + public string idTypeCode { get; set; } + /// - /// 国家代码 + /// 进出口类型(1.进口2.出口) /// - public string countryCode { get; set; } + public string ieType { get; set; } /// /// 邮编 /// public string postcode { get; set; } /// - /// HSTCode多个用英文逗号隔开 + /// 省份 /// - public string hstCode { get; set; } + public string province { get; set; } /// - /// 进出口类型(1.进口2.出口) + /// 省份代码 /// - public string ieType { get; set; } + public string provinceCode { get; set; } + + + + } public class IsfInfo { - - public Info info { get; set; } - public List companyList { get; set; } - /// - /// 类型1.原始2.修改3.删除4.重发 - /// - public int msgType { get; set; } - /// - /// 用户id - /// - public string user_id { get; set; } + + public string format { get; set; } + + public Info info { get; set; } + /// /// 服务名称,值为:eportyun.manifest.isf.sendBill /// public string method { get; set; } /// - /// json + /// 类型1.原始2.修改3.删除4.重发 /// - public string format { get; set; } + public int msgType { get; set; } + /// /// 加密 /// @@ -128,6 +134,10 @@ namespace djy.Model.IsfDto /// public DateTime timestamp { get; set; } /// + /// 用户id + /// + public string user_id { get; set; } + /// /// 2.0 /// public string version { get; set; } diff --git a/ams/djy.Service/ISF/IsfService.cs b/ams/djy.Service/ISF/IsfService.cs index 935eb26..172ef5e 100644 --- a/ams/djy.Service/ISF/IsfService.cs +++ b/ams/djy.Service/ISF/IsfService.cs @@ -6,6 +6,7 @@ using djy.IService.Isf; using djy.Model.Ams; using djy.Model.Isf; using djy.Model.IsfDto; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -243,28 +244,28 @@ namespace djy.Service.ISF req.Message = "当前状态不能重发!如有疑问,请联系相关客服!"; return req; } - if (msgType == "1" || msgType == "4") - { - ///扣费接口 - var getfinrs = fin.Expend(new CustFee - { - SENDUSERID = userid, - LURURENID = userid, - CtnrCount = 1, - CtnrInfo = string.Empty, - BSTYPE = 16, - SENDTYPE = 0, - BSNO = oid.ToString(), - MBLNO = master.MBLNO.ToString(), - } - , 0); - if (!getfinrs.Status) - { - req.Code = 200; - req.Message = getfinrs.Message; - return req; - } - } + //if (msgType == "1" || msgType == "4") + //{ + // ///扣费接口 + // var getfinrs = fin.Expend(new CustFee + // { + // SENDUSERID = userid, + // LURURENID = userid, + // CtnrCount = 1, + // CtnrInfo = string.Empty, + // BSTYPE = 16, + // SENDTYPE = 0, + // BSNO = oid.ToString(), + // MBLNO = master.MBLNO.ToString(), + // } + // , 0); + // if (!getfinrs.Status) + // { + // req.Code = 200; + // req.Message = getfinrs.Message; + // return req; + // } + //} var portList = DbBus.Get(DbList.Common).Select().ToList(); var CodePortLoadList = DbBus.Get(DbList.Common).Select().ToList(); Info info = new Info(); @@ -296,7 +297,17 @@ namespace djy.Service.ISF ieType=item.IeType }); } - companyList.Sort(); + + + IsfInfo isfinfo = new IsfInfo(); + isfinfo.companyList = companyList; + isfinfo.format = "json"; + isfinfo.info = info; + isfinfo.method = "1"; + var str = JsonConvert.SerializeObject(isfinfo); + + + } } }