费用相关接口修改

master
ZR20090193-陈敬勇 7 months ago
parent e8dfdc49b4
commit ac7a048f95

@ -38,11 +38,11 @@ public class FeeCodeReq
/// <summary>
/// 默认收费客户类型
/// </summary>
public int DefaultDebit { get; set; }
public string DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
public int DefaultCredit { get; set; }
public string DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>

@ -38,11 +38,11 @@ public class FeeCodeRes
/// <summary>
/// 默认收费客户类型
/// </summary>
public int DefaultDebit { get; set; }
public string DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
public int DefaultCredit { get; set; }
public string DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>

@ -0,0 +1,106 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用代码下拉返回实体
/// </summary>
public class FeeCodeSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string Code { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 币别Id
/// </summary>
public long CurrencyId { get; set; }
/// <summary>
/// 默认计费标准
/// </summary>
public int DefaultUnit { get; set; }
/// <summary>
/// 默认收费客户类型
/// </summary>
public string DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
public string DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
public bool? IsSea { get; set; } = false;
/// <summary>
/// 空运 空运相关模块使用
/// </summary>
public bool? IsAir { get; set; } = false;
/// <summary>
/// 陆运 陆运相关模块使用
/// </summary>
public bool? IsTrucking { get; set; } = false;
/// <summary>
/// 是否陆运固定费用
/// </summary>
public bool? IsTruckingFixed { get; set; } = false;
/// <summary>
/// 仓储 仓储相关模块使用
/// </summary>
public bool? IsWms { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 默认是否机密
/// </summary>
public bool? IsOpen { get; set; } = false;
/// <summary>
/// 默认是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 费用分组 枚举可维护
/// </summary>
public string FeeGroup { get; set; }
/// <summary>
/// 费用默认FRT 枚举可维护
/// </summary>
public string FeeFrt { get; set; }
/// <summary>
/// 默认发票费用名称 发票费用名称模块可维护
/// </summary>
public string GoodName { get; set; }
/// <summary>
/// 对帐类型 枚举可维护
/// </summary>
public string CheckingType { get; set; }
/// <summary>
/// 默认币别
/// </summary>
public string DefaultCurrency { get; set; }
}

@ -0,0 +1,40 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 币别信息下拉选择返回实体
/// </summary>
public class FeeCurrencySelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 币别代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// 币别名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// 默认对人民币汇率
/// </summary>
public decimal? DefaultRate { get; set; }
}

@ -32,7 +32,7 @@ public class FeeCustTemplateDetailReq
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -32,7 +32,7 @@ public class FeeCustTemplateDetailRes
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -49,7 +49,7 @@ public class FeeRecordReq
/// <summary>
/// 费用对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 费用标准

@ -50,7 +50,7 @@ public class FeeRecordRes
/// <summary>
/// 费用对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 费用标准

@ -40,7 +40,7 @@ public class FeeTemplateDetailReq
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -40,7 +40,7 @@ public class FeeTemplateDetailRes
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -39,13 +39,13 @@ public class FeeCode : BaseModel<long>
/// <summary>
/// 默认收费客户类型
/// </summary>
[SugarColumn(ColumnDescription = "默认收费客户类型", DefaultValue = "0")]
public int DefaultDebit { get; set; }
[SugarColumn(ColumnDescription = "默认收费客户类型", IsNullable = true, Length = 50)]
public string DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
[SugarColumn(ColumnDescription = "默认付费客户类型", DefaultValue = "0")]
public int DefaultCredit { get; set; }
[SugarColumn(ColumnDescription = "默认付费客户类型", IsNullable = true ,Length =50)]
public string DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>

@ -37,8 +37,8 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = false, DefaultValue = "1")]
public int CustomerType { get; set; }
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -59,8 +59,8 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
/// 费用对象类型
/// </summary>
[SugarColumn(ColumnDescription = "费用对象类型", IsNullable = false, DefaultValue = "1")]
public int CustomerType { get; set; }
[SugarColumn(ColumnDescription = "费用对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
/// <summary>
/// 费用标准

@ -47,8 +47,8 @@ namespace DS.WMS.Core.Fee.Entity
/// <summary>
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", Length = 50, IsNullable = false, DefaultValue = "1")]
public int CustomerType { get; set; }
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true, Length = 50)]
public string CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>

@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@ -12,7 +13,26 @@ namespace DS.WMS.Core.System.Interface;
/// </summary>
public interface IClientCommonService
{
/// <summary>
/// 获取费用代码下拉选择
/// </summary>
/// <returns></returns>
public DataResult<List<FeeCodeSelectRes>> GetFeeCodeSelectList();
/// <summary>
/// 获取币别信息下拉选择
/// </summary>
/// <returns></returns>
public DataResult<List<FeeCurrencySelectRes>> GetFeeCurrencySelectList();
/// <summary>
/// 根据类型获取往来单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetClientListByCode(string code ="");
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAllClientList();
/// <summary>
/// 获取船公司下拉列表
/// </summary>

@ -4,6 +4,8 @@ using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Entity;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.System.Dtos;
@ -32,7 +34,93 @@ public class ClientCommonService : IClientCommonService
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
/// <summary>
/// 获取币别信息下拉选择
/// </summary>
/// <returns></returns>
public DataResult<List<FeeCurrencySelectRes>> GetFeeCurrencySelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCurrency>()
.Where(x=>x.Status == StatusEnum.Enable)
.Select<FeeCurrencySelectRes>()
.ToList();
return DataResult<List<FeeCurrencySelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取费用代码下拉选择
/// </summary>
/// <returns></returns>
public DataResult<List<FeeCodeSelectRes>> GetFeeCodeSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCode>()
.Where(x => x.Status == StatusEnum.Enable)
.Select<FeeCodeSelectRes>()
.ToList();
return DataResult<List<FeeCodeSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 根据类型获取往来单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetClientListByCode(string code = "")
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
code = code.ToLower();
var data = tenantDb.Queryable<InfoClient>()
.InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt())
.WhereIF(code == "carrier", (a, b) => b.IsCarrier == true)
.WhereIF(code == "yard", (a, b) => b.IsYard == true)
.WhereIF(code == "booking", (a, b) => b.IsBooking == true)
.WhereIF(code == "truck", (a, b) => b.IsTruck == true)
.WhereIF(code == "controller", (a, b) => b.IsController == true)
.WhereIF(code == "custom", (a, b) => b.IsCustom == true)
.WhereIF(code == "agent", (a, b) => b.IsAgent == true)
.WhereIF(code == "agentcn", (a, b) => b.IsAgentCn == true)
.WhereIF(code == "express", (a, b) => b.IsExpress == true)
.WhereIF(code == "airlines", (a, b) => b.IsAirLines == true)
.WhereIF(code == "shipper", (a, b) => b.IsShipper == true)
.WhereIF(code == "notifyparty", (a, b) => b.IsNotifyParty == true)
.WhereIF(code == "warehouse", (a, b) => b.IsWareHouse == true)
.WhereIF(code == "wharf", (a, b) => b.IsWharf == true)
.WhereIF(code == "insurer", (a, b) => b.IsInsurer == true)
.WhereIF(code == "leasing", (a, b) => b.IsLeasing == true)
.WhereIF(code == "tradingagency", (a, b) => b.IsTradingAgency == true)
.WhereIF(code == "shipagency", (a, b) => b.IsShipAgency == true)
.WhereIF(code == "enterprise", (a, b) => b.IsEnterprise == true)
.Select((a, b) => new ClientSelectRes
{
Id = a.Id,
CodeName = a.CodeName,
ShortName = a.ShortName,
EnShortName = a.EnShortName
}
).ToList();
return DataResult<List<ClientSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAllClientList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<InfoClient>()
.InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt())
.Select((a, b) => new ClientSelectRes
{
Id = a.Id,
CodeName = a.CodeName,
ShortName = a.ShortName,
EnShortName = a.EnShortName
}
).ToList();
return DataResult<List<ClientSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取船公司下拉列表
/// </summary>

@ -669,7 +669,7 @@ public class CommonService : ICommonService
{
var grandsons = db.Queryable<SysPermission>().Where(x =>
x.MenuType == 2 && x.ParentId == child.Id && x.IsHidden == false &&
permissions.Contains(x.Id)) //排除企业用户维护
permissions.Contains(x.Id)) //获取第三层路由
.OrderBy(x => x.SortCode)
.Select(a => new RouteItem
{

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 费用代码服务
/// </summary>
public class FeeCodeController : ApiController
{
private readonly IFeeCodeService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeCodeController(IFeeCodeService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeCodeList")]
public DataResult<List<FeeCodeRes>> GetFeeCodeList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeCode")]
public DataResult EditFeeCode([FromBody] FeeCodeReq model)
{
var res = _invokeService.EditFeeCode(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCodeInfo")]
public DataResult<FeeCodeRes> GetFeeCodeInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeCodeInfo(id);
return res;
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 费用记录服务
/// </summary>
public class FeeRecordController : ApiController
{
private readonly IFeeRecordService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeRecordController(IFeeRecordService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeRecordList")]
public DataResult<List<FeeRecordRes>> GetFeeRecordList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeRecord")]
public DataResult EditFeeRecord([FromBody] FeeRecordReq model)
{
var res = _invokeService.EditFeeRecord(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeRecordInfo")]
public DataResult<FeeRecordRes> GetFeeRecordInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeRecordInfo(id);
return res;
}
}
}

@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@ -26,7 +27,51 @@ public class ClientCommonController : ApiController
{
_invokeService = invokeService;
}
/// <summary>
/// 获取币别下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCurrencySelectList")]
public DataResult<List<FeeCurrencySelectRes>> GetFeeCurrencySelectList()
{
var res = _invokeService.GetFeeCurrencySelectList();
return res;
}
/// <summary>
/// 获取费用代码下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCodeSelectList")]
public DataResult<List<FeeCodeSelectRes>> GetFeeCodeSelectList()
{
var res = _invokeService.GetFeeCodeSelectList();
return res;
}
/// <summary>
/// 根据类型获取往来单位下拉列表
/// </summary>
/// <param name="code">单位类型</param>
/// <returns></returns>
[HttpGet]
[Route("GetClientListByCode")]
public DataResult<List<ClientSelectRes>> GetClientListByCode([FromQuery]string code = "")
{
var res = _invokeService.GetClientListByCode(code);
return res;
}
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetAllClientList")]
public DataResult<List<ClientSelectRes>> GetAllClientList()
{
var res = _invokeService.GetAllClientList();
return res;
}
/// <summary>
/// 获取船公司下拉列表
/// </summary>

@ -1265,3 +1265,17 @@
2024-04-26 16:00:39.9054 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-04-26 16:00:39.9054 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-04-26 16:00:39.9229 Info Configuration initialized.
2024-04-28 16:49:27.2448 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-04-28 16:49:27.2771 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-04-28 16:49:27.2921 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-04-28 16:49:27.3214 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-04-28 16:49:27.3503 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-04-28 16:49:27.3657 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-04-28 16:49:27.3914 Info Configuration initialized.
2024-04-28 17:04:22.7089 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-04-28 17:04:22.7573 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-04-28 17:04:22.7771 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-04-28 17:04:22.8289 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-04-28 17:04:22.8626 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-04-28 17:04:22.8762 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-04-28 17:04:22.9041 Info Configuration initialized.

Loading…
Cancel
Save