master
wet 3 years ago
parent 14c514fa23
commit c5b59c281c

@ -800,6 +800,102 @@
结束时间加一天
</summary>
</member>
<member name="T:Common.DJYModel.CustFee">
<summary>
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.BSNO">
<summary>
一般是业务Gid
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.MBLNO">
<summary>
业务订单编号
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.BSTYPE">
<summary>
业务类型
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.COMID">
<summary>
录入人公司ID
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.COMNAME">
<summary>
录入人公司
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.LURUREN">
<summary>
录入人
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.LURURENID">
<summary>
录入人ID
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.SENDCOM">
<summary>
发送公司
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.SENDUSER">
<summary>
发送人名
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.SENDUSERID">
<summary>
发送人ID
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.CtnrCount">
<summary>
箱量 根据 CtnrInfo计算
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.CtnrInfo">
<summary>
箱型箱量明细 尺寸*数量 多个逗号间隔
</summary>
</member>
<member name="P:Common.DJYModel.CustFee.IsCredit">
<summary>
是否可以信用支付 1 可以 0不允许 1的时候钱包金额不足可以负数
</summary>
</member>
<member name="M:Common.DJYModel.CustFee.GetCtnrcount">
<summary>
根据CtnrInfo计算箱量
</summary>
<returns></returns>
</member>
<member name="P:Common.DJYModel.CustPrice.GiftBalance">
<summary>
赠送余额
</summary>
</member>
<member name="P:Common.DJYModel.CustPrice.PRICEF">
<summary>
pricef 分单
</summary>
</member>
<member name="P:Common.DJYModel.CustPrice.PRICEFQG">
<summary>
青港主单
</summary>
</member>
<member name="P:Common.DJYModel.CustPrice.PRICEQG">
<summary>
青港分单
</summary>
</member>
<member name="T:Common.DJYModel.DataBase">
<summary>
基础基类
@ -1710,6 +1806,14 @@
</summary>
<returns></returns>
</member>
<member name="M:Common.DjyService.FinanceService.Expend(Common.DJYModel.CustFee,System.Int32)">
<summary>
</summary>
<param name="Dto"></param>
<param name="exptype">1验证是否可以扣款 2扣除操作 </param>
<returns></returns>
</member>
<member name="T:Common.DjyService.ServBase">
<summary>
服务基类
@ -1874,6 +1978,19 @@
<param name="PageKeyName">页面或后权限Key标识</param>
<returns></returns>
</member>
<member name="T:Common.Djy.IFinanceService">
<summary>
财务相关
</summary>
</member>
<member name="M:Common.Djy.IFinanceService.Expend(Common.DJYModel.CustFee,System.Int32)">
<summary>
消费扣费 并更新钱包 一定要指定 SENDUSERID 作为UserId标准
</summary>
<param name="Dto"></param>
<param name="ExpType">1判断钱包并执行扣款生成记录 2 验证钱包金额是否充足</param>
<returns></returns>
</member>
<member name="T:Common.Djy.IsBase">
<summary>
接口基类

@ -32,11 +32,12 @@ namespace djy.Paas.IService
TableData Load(AMSQuery req, string userid);
//void Delete(string ids,string userid);
List<CommonCodeValue> GetCountry();
List<CommonCodeValue> GetCountry();
List<CommonCodeValue> GetCodePortLoad();
List<CommonCodeValue> GetCARRIER();
@ -55,6 +56,6 @@ namespace djy.Paas.IService
Task<Response> SendDE(string Gid, string userid, string docType);
Response SaveReceipt(AMSReturnDto retdto,string Key);
Response SaveReceipt(string retdto);
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using djy.Model;
using Common;
using Common.Djy;
using djy.Model.AmsDto;
using Common.Utilities;
using djy.Model.Ams;
namespace djy.IService.Isf
{
public interface IIsfService : IsBase
{
}
}

@ -0,0 +1,44 @@
using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
namespace djy.Model.Ams
{
[JsonObject(MemberSerialization.OptIn), Table(Name = "CodePortLoad", DisableSyncStructure = true)]
public class CodePortLoad
{
[MaxLength(36)]
public string GID { get; set; }
[MaxLength(20)]
public string Code { get; set; }
[MaxLength(60)]
public string EnName { get; set; }
[MaxLength(100)]
public string CnName { get; set; }
[MaxLength(500)]
public string Description { get; set; }
[MaxLength(10)]
public string EdiCode { get; set; }
[MaxLength(500)]
public string Remark { get; set; }
public DateTime CreateTime { get; set; }
public DateTime? ModifyTime { get; set; }
[MaxLength(36)]
public string CreateUser { get; set; }
[MaxLength(36)]
public string ModifyUser { get; set; }
}
}

@ -0,0 +1,80 @@
using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
namespace djy.Model.Isf
{
[JsonObject(MemberSerialization.OptIn), Table(Name = "ISF_Company", DisableSyncStructure = true)]
public class ISF_Company
{
[MaxLength(50)]
public string GID { get; set; }
[MaxLength(50)]
public string PID { get; set; }
/// <summary>
/// 公司类型
/// </summary>
[MaxLength(50)]
public string CompanyType { get; set; }
/// <summary>
/// 公司名称
/// </summary>
[MaxLength(50)]
public string CompanyName { get; set; }
/// <summary>
/// id类型代码
/// </summary>
[MaxLength(50)]
public string IdTypeCode { get; set; }
/// <summary>
/// 地址
/// </summary>
[MaxLength(100)]
public string Address { get; set; }
/// <summary>
/// 城市
/// </summary>
[MaxLength(50)]
public string City { get; set; }
/// <summary>
/// 省份
/// </summary>
[MaxLength(50)]
public string Province { get; set; }
/// <summary>
/// 省份代码
/// </summary>
[MaxLength(50)]
public string ProvinceCode { get; set; }
/// <summary>
/// 国家代码
/// </summary>
[MaxLength(50)]
public string CountryCode { get; set; }
/// <summary>
/// 国家
/// </summary>
[MaxLength(50)]
public string CountryName { get; set; }
/// <summary>
/// 邮编
/// </summary>
[MaxLength(50)]
public string PostCode { get; set; }
/// <summary>
/// HSTCode多个用英文逗号隔开
/// </summary>
[MaxLength(50)]
public string HstCode { get; set; }
/// <summary>
/// 进出口类型(1.进口2.出口)
/// </summary>
[MaxLength(50)]
public string IeType { get; set; }
public bool? IsDel { get; set; }
}
}

@ -0,0 +1,94 @@
using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
namespace djy.Model.Isf
{
[JsonObject(MemberSerialization.OptIn), Table(Name = "ISF_Master", DisableSyncStructure = true)]
public class ISF_Master
{
[MaxLength(50)]
public string GID { get; set; }
[MaxLength(50)]
public string UserID { get; set; }
[MaxLength(50)]
public string UserName { get; set; }
[MaxLength(50)]
public string CompID { get; set; }
[MaxLength(100)]
public string CompName { get; set; }
/// <summary>
/// 提单号
/// </summary>
[MaxLength(50)]
public string MBLNO { get; set; }
/// <summary>
/// 类型(1.ISF5 2.ISF10)
/// </summary>
[MaxLength(50)]
public string InFoType { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
[MaxLength(50)]
public string DischargeHarbourCode { get; set; }
/// <summary>
/// 卸货港
/// </summary>
[MaxLength(50)]
public string DischargeHarbourName { get; set; }
/// <summary>
/// 交货地代码
/// </summary>
[MaxLength(50)]
public string DeliveryHarbourCode { get; set; }
/// <summary>
/// 交货地
/// </summary>
[MaxLength(50)]
public string DeliveryHarbourName { get; set; }
/// <summary>
/// 贸易类型代码
/// </summary>
[MaxLength(50)]
public string ShipmentTypeCode { get; set; }
/// <summary>
/// 贸易类型
/// </summary>
[MaxLength(50)]
public string ShipmentTypeName { get; set; }
/// <summary>
/// HSTCode多个用英文逗号隔开
/// </summary>
[MaxLength(200)]
public string HstCode { get; set; }
/// <summary>
/// 提单类型CODE
/// </summary>
[MaxLength(50)]
public string BlTypeCode { get; set; }
/// <summary>
/// 提单类型
/// </summary>
[MaxLength(50)]
public string BlTypeName { get; set; }
public DateTime CreateTime { get; set; }
public DateTime? LastUpdate { get; set; }
public bool? IsDel { get; set; }
}
}

@ -0,0 +1,14 @@
using Common.Entity;
namespace djy.Model.IsfDto
{
public class ISFQuery : PageEntity
{
/// <summary>
/// 提单号
/// </summary>
public string MBLNO { get; set; }
public string InFoType { get; set; }
}
}

@ -28,4 +28,8 @@
<ProjectReference Include="..\Djy.Common\Common.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="IsfDto\" />
</ItemGroup>
</Project>

@ -313,6 +313,22 @@ namespace djy.Service.Ams
}
}
public List<CommonCodeValue> GetCodePortLoad()
{
try
{
var List = DbBus.Get(DbList.Common).Select<CodePortLoad>().ToList().Select(x => new CommonCodeValue
{
Code = x.EdiCode,
Value = x.EnName,
}).Distinct().ToList();
return List;
}
catch (Exception e)
{
throw;
}
}
public List<CommonCodeValue> GetVessel(string strlink)
@ -393,6 +409,7 @@ namespace djy.Service.Ams
var cARRIERIDList = DbBus.Get(DbList.Common).Select<MappingCarrier>().Where(map => map.Module == "AMS").ToList();
var portList = DbBus.Get(DbList.Common).Select<CodePort>().ToList();
var CodePortLoadList = DbBus.Get(DbList.Common).Select<CodePortLoad>().ToList();
var containerTypeList = DbBus.Get(DbList.Common).Select<MappingCtn>().Where(map => map.Module == "AMS").ToList();
var packageList = DbBus.Get(DbList.Common).Select<MappingPackage>().Where(map => map.Module == "AMS").ToList();
MasterBillInfoDto dto = new MasterBillInfoDto();
@ -406,7 +423,7 @@ namespace djy.Service.Ams
masterBillInfo.requesterDea = sysOptionConfig.Webconfig.requesterDea;
masterBillInfo.consignmentType = master.ConsignmentType;
masterBillInfo.loadHarbour = master.LoadingPort;
masterBillInfo.loadHarbourCode = portList.Where(x => x.Code == master.LoadingPortCode).Select(x => x.EdiCode).FirstOrDefault();
masterBillInfo.loadHarbourCode = master.LoadingPortCode;
masterBillInfo.dischargeHarbour = master.PORTDISCHARGE;
masterBillInfo.dischargeHarbourCode = portList.Where(x => x.Code == master.PORTDISCHARGECode).Select(x => x.EdiCode).FirstOrDefault();
masterBillInfo.lastForeignHarbour = master.LastNoUsPort;
@ -632,9 +649,7 @@ namespace djy.Service.Ams
else
{
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { ReportState = "已删除", NewNotice = "删除发送成功" }).Where(w => w.GID == oid).ExecuteAffrows();
}
}
}
#endregion
@ -660,17 +675,45 @@ namespace djy.Service.Ams
public Response SaveReceipt(AMSReturnDto retdto,string Key)
public Response SaveReceipt(string msg)
{
Response req = new Response();
try
{
AMSReturnDto retdto = Json.JsonToObject<AMSReturnDto>(msg);
_LogsAdd("SaveReceipt", "post", $"AMS接口推送{msg}");
if (retdto != null)
{
if (retdto.status == "W2")
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "1" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
else if (retdto.status == "W1")
{
DbBus.Get(DbList.AMSCenter).Update<AMS_House>().Set(w => new AMS_House { State = "0" }).Where(w => w.GID == retdto.businessId).ExecuteAffrows();
}
var masterid = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => (x.IsDel == false || x.IsDel == null) && x.GID == retdto.businessId).ToList().Select(x => x.PID).FirstOrDefault();
_LogsAdd("SaveReceipt", "post", $"AMS接口推送{JsonConvert.SerializeObject(retdto)}");
var houses = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => (x.IsDel == false || x.IsDel == null) && x.PID == masterid && x.State != "1").ToList();
if (houses != null && houses.Count == 0)
{
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = "匹配成功", NewNotice = "匹配成功" }).Where(w => w.GID == masterid).ExecuteAffrows();
}
var faillist = DbBus.Get(DbList.AMSCenter).Select<AMS_House>().Where(x => (x.IsDel == false || x.IsDel == null) && x.PID == masterid && x.State == "0").ToList();
if (faillist != null && faillist.Count > 0)
{
DbBus.Get(DbList.AMSCenter).Update<AMS_Master>().Set(w => new AMS_Master { MateState = "匹配失败", NewNotice = "匹配成功" }).Where(w => w.GID == masterid).ExecuteAffrows();
}
}
else {
req.Code = 200;
req.Message = "未收到参数";
return req;
}
return req;
}
catch (Exception ex)
{

@ -195,6 +195,26 @@ namespace djy_AmsApi.Controllers
}
/// <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>
/// 下拉获取港口
@ -238,7 +258,6 @@ namespace djy_AmsApi.Controllers
}
#endregion
#region 第三方接口
[HttpGet("Send")]
@ -260,9 +279,10 @@ namespace djy_AmsApi.Controllers
[AllowAnonymous]
[HttpPost("Receipt")]
public Response SaveReceipt(AMSReturnDto retdto,string Key=null)
public Response SaveReceipt([FromForm] string msg)
{
return ser.SaveReceipt(retdto,Key);
return ser.SaveReceipt(msg);
}
#endregion

@ -0,0 +1,20 @@
using Common;
using Common.DjyService;
using Common.Utilities;
using djy.Model.Ams;
using djy.Model.AmsDto;
using djy.Service;
using djy.Service.Ams;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace djy_AmsApi.Controllers.AMS
{
public class IsfController : ApiBase
{
}
}

File diff suppressed because one or more lines are too long

@ -137,7 +137,7 @@ namespace djy_AmsApi
app.UseMiddleware<MytMiddleware>();//¹ÜµÀ
app.UseRouting();
DefaultFilesOptions defaultFiles = new DefaultFilesOptions();
defaultFiles.DefaultFileNames.Clear();

Loading…
Cancel
Save