diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
index d5944d2f..6daa0a53 100644
--- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
+++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
@@ -251,5 +251,18 @@ public static class MultiLanguageConst
public const string CodeLaneImportNoData = "Code_Lane_Import_No_Data";
[Description("存在已导入的航线信息")]
public const string CodeLaneImportAlready = "Code_Lane_Import_Already";
+
+ [Description("付费方式已存在")]
+ public const string CodeFrtExist = "Code_Frt_Exist";
+ [Description("付费方式导入无数据")]
+ public const string CodeFrtImportNoData = "Code_Frt_Import_No_Data";
+ [Description("存在已导入的付费方式")]
+ public const string CodeFrtImportAlready = "Code_Frt_Import_Already";
+ [Description("结算方式已存在")]
+ public const string CodeStlModeExist = "Code_StlMode_Exist";
+ [Description("结算方式导入无数据")]
+ public const string CodeStlModeImportNoData = "Code_StlMode_Import_No_Data";
+ [Description("存在已导入的结算方式")]
+ public const string CodeStlModeImportAlready = "Code_StlMode_Import_Already";
#endregion
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs
new file mode 100644
index 00000000..5f5e9896
--- /dev/null
+++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs
@@ -0,0 +1,63 @@
+using DS.Module.Core;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Interface;
+using DS.WMS.Core.System.Dtos;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DS.WMS.AdminApi.Controllers;
+
+///
+/// 付费方式服务
+///
+public class CodeFrtController : ApiController
+{
+ private readonly ICodeFrtService _invokeService;
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ public CodeFrtController(ICodeFrtService invokeService)
+ {
+ _invokeService = invokeService;
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetCodeFrtList")]
+ public DataResult> GetCodeFrtList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetListByPage(request);
+ return res;
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("EditCodeFrt")]
+ public DataResult EditCodeFrt([FromBody] CodeFrtReq model)
+ {
+ var res = _invokeService.EditCodeFrt(model);
+ return res;
+ }
+
+ ///
+ /// 详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ [Route("GetCodeFrtInfo")]
+ public DataResult GetCodeFrtInfo([FromQuery] string id)
+ {
+ var res = _invokeService.GetCodeFrtInfo(id);
+ return res;
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs
new file mode 100644
index 00000000..150b747f
--- /dev/null
+++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs
@@ -0,0 +1,63 @@
+using DS.Module.Core;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Interface;
+using DS.WMS.Core.System.Dtos;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DS.WMS.AdminApi.Controllers;
+
+///
+/// 结算方式服务
+///
+public class CodeStlModeController : ApiController
+{
+ private readonly ICodeStlModeService _invokeService;
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ public CodeStlModeController(ICodeStlModeService invokeService)
+ {
+ _invokeService = invokeService;
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetCodeStlModeList")]
+ public DataResult> GetCodeStlModeList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetListByPage(request);
+ return res;
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("EditCodeStlMode")]
+ public DataResult EditCodeStlMode([FromBody] CodeStlModeReq model)
+ {
+ var res = _invokeService.EditCodeStlMode(model);
+ return res;
+ }
+
+ ///
+ /// 详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ [Route("GetCodeStlModeInfo")]
+ public DataResult GetCodeStlModeInfo([FromQuery] string id)
+ {
+ var res = _invokeService.GetCodeStlModeInfo(id);
+ return res;
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs
index 995a899b..e41024c0 100644
--- a/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs
+++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs
@@ -228,7 +228,7 @@ public class CommonController : ApiController
///
[HttpGet]
[Route("GetUserFieldSet")]
- public DataResult GetUserFieldSet([FromQuery] string permissionId)
+ public DataResult GetUserFieldSet([FromQuery] string permissionId)
{
var res = _invokeService.GetUserFieldSet(permissionId);
return res;
diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs
new file mode 100644
index 00000000..f215e656
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs
@@ -0,0 +1,52 @@
+using DS.Module.Core;
+using FluentValidation;
+
+namespace DS.WMS.Core.Code.Dtos;
+
+///
+/// 付费方式请求实体
+///
+public class CodeFrtReq
+{
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// 付费方式-英文名称
+ ///
+ public string FrtName { get; set; }= "";
+ ///
+ /// 中文名称
+ ///
+ public string CnName { get; set; }= "";
+
+ ///
+ /// EDI代码
+ ///
+ public string EdiCode { get; set; } = "";
+ ///
+ /// 状态 0 启用 1 禁用
+ ///
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+ ///
+ /// 备注
+ ///
+ public string Note { get; set; } = "";
+}
+
+///
+/// 验证
+///
+public class CodeFrtReqValidator : AbstractValidator
+{
+ ///
+ /// 构造函数
+ ///
+ public CodeFrtReqValidator()
+ {
+ this.RuleFor(o => o.FrtName)
+ .NotEmpty().WithName("付费方式-英文名称");
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs
new file mode 100644
index 00000000..d8dbc71e
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs
@@ -0,0 +1,39 @@
+using DS.Module.Core;
+
+namespace DS.WMS.Core.Code.Dtos;
+
+///
+/// 结算方式信息返回
+///
+public class CodeVesselRes
+{
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+ ///
+ /// 付费方式-英文名称
+ ///
+ public string FrtName { get; set; }
+ ///
+ /// 中文名称
+ ///
+ public string CnName { get; set; }
+
+ ///
+ /// EDI代码
+ ///
+ public string EdiCode { get; set; }
+ ///
+ /// 状态 0 启用 1 禁用
+ ///
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+ ///
+ /// 备注
+ ///
+ public string Note { get; set; } = "";
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs
new file mode 100644
index 00000000..cc89a95e
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs
@@ -0,0 +1,57 @@
+using DS.Module.Core;
+using FluentValidation;
+
+namespace DS.WMS.Core.Code.Dtos;
+
+///
+/// 结算方式请求实体
+///
+public class CodeStlModeReq
+{
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+ ///
+ /// 结算方式唯一代码
+ ///
+ public string StlCode { get; set; } = "";
+ ///
+ /// 结算方式名称
+ ///
+ public string StlName { get; set; } = "";
+
+ ///
+ /// 英文名称
+ ///
+ public string EnName { get; set; } = "";
+ ///
+ /// 财务软件代码
+ ///
+ public string FinanceSoftCode { get; set; } = "";
+ ///
+ /// 状态 0 启用 1 禁用
+ ///
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+ ///
+ /// 备注
+ ///
+ public string Note { get; set; } = "";
+}
+
+///
+/// 验证
+///
+public class CodeStlModeReqValidator : AbstractValidator
+{
+ ///
+ /// 构造函数
+ ///
+ public CodeStlModeReqValidator()
+ {
+ this.RuleFor(o => o.StlCode)
+ .NotEmpty().WithName("结算方式唯一代码");
+ this.RuleFor(o => o.StlName)
+ .NotEmpty().WithName("结算方式名称");
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs
new file mode 100644
index 00000000..cba078e0
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs
@@ -0,0 +1,42 @@
+using DS.Module.Core;
+
+namespace DS.WMS.Core.Code.Dtos;
+
+///
+/// 结算方式返回
+///
+public class CodeStlModeRes
+{
+ ///
+ /// 主键Id
+ ///
+ public long Id { get; set; }
+ ///
+ /// 结算方式唯一代码
+ ///
+ public string StlCode { get; set; }
+ ///
+ /// 结算方式名称
+ ///
+ public string StlName { get; set; }
+ ///
+ /// 英文名称
+ ///
+ public string EnName { get; set; }
+ ///
+ /// 财务软件代码
+ ///
+ public string FinanceSoftCode { get; set; }
+ ///
+ /// 状态 0 启用 1 禁用
+ ///
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+ ///
+ /// 备注
+ ///
+ public string Note { get; set; } = "";
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs
index 6e06f6eb..c38dd50d 100644
--- a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs
+++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs
@@ -3,9 +3,9 @@ using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
///
-/// 船名信息返回
+/// 付费方式返回
///
-public class CodeVesselRes
+public class CodeFrtRes
{
///
/// 主键Id
@@ -14,7 +14,7 @@ public class CodeVesselRes
///
/// 船名
///
- public string VesselName { get; set; } = "";
+ public string FrtName { get; set; } = "";
///
/// 中文说明
///
diff --git a/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs
new file mode 100644
index 00000000..3cfaa100
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs
@@ -0,0 +1,34 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using SqlSugar;
+
+namespace DS.WMS.Core.Code.Entity;
+///
+/// 付费方式表
+///
+[SqlSugar.SugarTable("op_code_frt","付费方式表")]
+public class CodeFrt: BaseModel
+{
+ ///
+ /// 付费方式-英文名称
+ ///
+ [SugarColumn(ColumnDescription = "付费方式-英文名称", Length = 100)]
+ public string FrtName { get; set; }
+ ///
+ /// 中文名称
+ ///
+ [SugarColumn(ColumnDescription = "中文名称", Length = 50)]
+ public string CnName { get; set; }
+
+ ///
+ /// EDI代码
+ ///
+ [SugarColumn(ColumnDescription = "EDI代码", Length = 5)]
+ public string EdiCode { get; set; }
+
+ ///
+ /// 状态 0启用 1禁用
+ ///
+ [SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs
new file mode 100644
index 00000000..ff42eb59
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs
@@ -0,0 +1,39 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using SqlSugar;
+
+namespace DS.WMS.Core.Code.Entity;
+///
+/// 结算方式表
+///
+// ReSharper disable once StringLiteralTypo
+[SqlSugar.SugarTable("op_code_stlmode","结算方式表")]
+public class CodeStlMode: BaseModel
+{
+ ///
+ /// 结算方式唯一代码
+ ///
+ [SugarColumn(ColumnDescription = "结算方式唯一代码", Length = 10)]
+ public string StlCode { get; set; }
+ ///
+ /// 结算方式名称
+ ///
+ [SugarColumn(ColumnDescription = "结算方式名称", Length = 30)]
+ public string StlName { get; set; }
+ ///
+ /// 英文名称
+ ///
+ [SugarColumn(ColumnDescription = "英文名称", Length = 100)]
+ public string EnName { get; set; }
+ ///
+ /// 财务软件代码
+ ///
+ [SugarColumn(ColumnDescription = "财务软件代码", Length = 30)]
+ public string FinanceSoftCode { get; set; }
+
+ ///
+ /// 状态 0启用 1禁用
+ ///
+ [SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
+ public StatusEnum? Status { get; set; } = StatusEnum.Enable;
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs
new file mode 100644
index 00000000..33880030
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs
@@ -0,0 +1,70 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.WMS.Core.Code.Dtos;
+
+namespace DS.WMS.Core.Code.Interface;
+
+public interface ICodeFrtService
+{
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ DataResult> GetListByPage(PageRequest request);
+
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ DataResult EditCodeFrt(CodeFrtReq req);
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ DataResult GetCodeFrtInfo(string id);
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ DataResult> GetClientListByPage(PageRequest request);
+ ///
+ /// 编辑-客户端
+ ///
+ ///
+ ///
+ DataResult EditClientCodeFrt(CodeFrtReq req);
+ ///
+ /// 获取详情 -客户端
+ ///
+ ///
+ ///
+ public DataResult GetClientCodeFrtInfo(string id);
+
+
+
+ ///
+ /// 获取付费方式列表-基础库
+ ///
+ ///
+ ///
+ DataResult> GetCodeFrtList(PageRequest request);
+ ///
+ /// 导入付费方式列表
+ ///
+ ///
+ ///
+ DataResult ImportCodeFrt(IdModel req);
+
+ ///
+ /// 获取当前租户已有的付费方式
+ ///
+ ///
+ public DataResult> GetExistCodeFrtList();
+
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs
new file mode 100644
index 00000000..7dcae15a
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs
@@ -0,0 +1,70 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.WMS.Core.Code.Dtos;
+
+namespace DS.WMS.Core.Code.Interface;
+
+public interface ICodeStlModeService
+{
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ DataResult> GetListByPage(PageRequest request);
+
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ DataResult EditCodeStlMode(CodeStlModeReq req);
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ DataResult GetCodeStlModeInfo(string id);
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ DataResult> GetClientListByPage(PageRequest request);
+ ///
+ /// 编辑-客户端
+ ///
+ ///
+ ///
+ DataResult EditClientCodeStlMode(CodeStlModeReq req);
+ ///
+ /// 获取详情 -客户端
+ ///
+ ///
+ ///
+ public DataResult GetClientCodeStlModeInfo(string id);
+
+
+
+ ///
+ /// 获取结算方式列表-基础库
+ ///
+ ///
+ ///
+ DataResult> GetCodeStlModeList(PageRequest request);
+ ///
+ /// 导入结算方式列表
+ ///
+ ///
+ ///
+ DataResult ImportCodeStlMode(IdModel req);
+
+ ///
+ /// 获取当前租户已有的结算方式
+ ///
+ ///
+ public DataResult> GetExistCodeStlModeList();
+
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs
new file mode 100644
index 00000000..67a12e96
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs
@@ -0,0 +1,169 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.Module.Core.Extensions;
+using DS.Module.SqlSugar;
+using DS.Module.UserModule;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Entity;
+using DS.WMS.Core.Code.Interface;
+using Mapster;
+using Microsoft.Extensions.DependencyInjection;
+using SqlSugar;
+
+namespace DS.WMS.Core.Code.Method;
+
+public class CodeFrtService:ICodeFrtService
+{
+ private readonly IServiceProvider _serviceProvider;
+ private readonly ISqlSugarClient db;
+ private readonly IUser user;
+ private readonly ISaasDbService saasService;
+ ///
+ ///
+ ///
+ ///
+ public CodeFrtService(IServiceProvider serviceProvider)
+ {
+ _serviceProvider = serviceProvider;
+ db = _serviceProvider.GetRequiredService();
+ user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
+ }
+
+ public DataResult> GetListByPage(PageRequest request)
+ {
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = db.Queryable()
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult EditCodeFrt(CodeFrtReq req)
+ {
+ if (req.Id == 0)
+ {
+
+ if (db.Queryable().Where(x=>x.FrtName == req.FrtName.Trim()).Any())
+ {
+ return DataResult.Failed("付费方式已存在!",MultiLanguageConst.CodeFrtExist);
+ }
+
+ var data = req.Adapt();
+
+ var entity = db.Insertable(data).ExecuteReturnEntity();
+
+ return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
+ }
+ else
+ {
+ var info = db.Queryable().Where(x => x.Id == req.Id).First();
+
+ info = req.Adapt(info);
+
+ db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
+ return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
+ }
+ }
+
+ public DataResult GetCodeFrtInfo(string id)
+ {
+ var data = db.Queryable()
+ .Where(a => a.Id == long.Parse(id))
+ .Select()
+ .First();
+ return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess);
+ }
+
+ public DataResult> GetClientListByPage(PageRequest request)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = tenantDb.Queryable()
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult EditClientCodeFrt(CodeFrtReq req)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ if (req.Id == 0)
+ {
+
+ if (tenantDb.Queryable().Where(x=>x.FrtName == req.FrtName.Trim()).Any())
+ {
+ return DataResult.Failed("付费方式已存在!",MultiLanguageConst.CodeFrtExist);
+ }
+
+ var data = req.Adapt();
+
+ var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity();
+
+ return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
+ }
+ else
+ {
+ var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First();
+
+ info = req.Adapt(info);
+
+ tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
+ return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
+ }
+ }
+
+ public DataResult GetClientCodeFrtInfo(string id)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var data = tenantDb.Queryable()
+ .Where(a => a.Id == long.Parse(id))
+ .Select()
+ .First();
+ return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess);
+ }
+
+ public DataResult> GetCodeFrtList(PageRequest request)
+ {
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = db.Queryable().Where(a=>a.Status == StatusEnum.Enable)
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult ImportCodeFrt(IdModel req)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var list = db.Queryable().Where(x =>req.Ids.Contains(x.Id) ).ToList();
+ if (list.Count == 0)
+ {
+ return DataResult.Failed("付费方式导入无数据!",MultiLanguageConst.CodeFrtImportNoData);
+ }
+
+ if (tenantDb.Queryable().Where(x =>req.Ids.Contains(x.Id) ).Any())
+ {
+ return DataResult.Failed("存在已导入的付费方式!",MultiLanguageConst.CodeFrtImportAlready);
+ }
+
+ tenantDb.Insertable(list).ExecuteCommand();
+ return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess);
+ }
+
+ ///
+ /// 获取当前租户已有的船名
+ ///
+ ///
+ public DataResult> GetExistCodeFrtList()
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var data = tenantDb.Queryable()
+ .Select(n=>n.Id.ToString())
+ .ToList();
+ return DataResult>.Success(data);
+ }
+
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs
new file mode 100644
index 00000000..7211d5f1
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs
@@ -0,0 +1,169 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.Module.Core.Extensions;
+using DS.Module.SqlSugar;
+using DS.Module.UserModule;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Entity;
+using DS.WMS.Core.Code.Interface;
+using Mapster;
+using Microsoft.Extensions.DependencyInjection;
+using SqlSugar;
+
+namespace DS.WMS.Core.Code.Method;
+
+public class CodeStlModeService:ICodeStlModeService
+{
+ private readonly IServiceProvider _serviceProvider;
+ private readonly ISqlSugarClient db;
+ private readonly IUser user;
+ private readonly ISaasDbService saasService;
+ ///
+ ///
+ ///
+ ///
+ public CodeStlModeService(IServiceProvider serviceProvider)
+ {
+ _serviceProvider = serviceProvider;
+ db = _serviceProvider.GetRequiredService();
+ user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
+ }
+
+ public DataResult> GetListByPage(PageRequest request)
+ {
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = db.Queryable()
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult EditCodeStlMode(CodeStlModeReq req)
+ {
+ if (req.Id == 0)
+ {
+
+ if (db.Queryable().Where(x=>x.StlCode == req.StlCode.Trim()).Any())
+ {
+ return DataResult.Failed("结算方式已存在!",MultiLanguageConst.CodeStlModeExist);
+ }
+
+ var data = req.Adapt();
+
+ var entity = db.Insertable(data).ExecuteReturnEntity();
+
+ return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
+ }
+ else
+ {
+ var info = db.Queryable().Where(x => x.Id == req.Id).First();
+
+ info = req.Adapt(info);
+
+ db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
+ return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
+ }
+ }
+
+ public DataResult GetCodeStlModeInfo(string id)
+ {
+ var data = db.Queryable()
+ .Where(a => a.Id == long.Parse(id))
+ .Select()
+ .First();
+ return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess);
+ }
+
+ public DataResult> GetClientListByPage(PageRequest request)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = tenantDb.Queryable()
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult EditClientCodeStlMode(CodeStlModeReq req)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ if (req.Id == 0)
+ {
+
+ if (tenantDb.Queryable().Where(x=>x.StlCode == req.StlCode.Trim()).Any())
+ {
+ return DataResult.Failed("结算方式已存在!",MultiLanguageConst.CodeStlModeExist);
+ }
+
+ var data = req.Adapt();
+
+ var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity();
+
+ return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
+ }
+ else
+ {
+ var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First();
+
+ info = req.Adapt(info);
+
+ tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
+ return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
+ }
+ }
+
+ public DataResult GetClientCodeStlModeInfo(string id)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var data = tenantDb.Queryable()
+ .Where(a => a.Id == long.Parse(id))
+ .Select()
+ .First();
+ return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess);
+ }
+
+ public DataResult> GetCodeStlModeList(PageRequest request)
+ {
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = db.Queryable().Where(a=>a.Status == StatusEnum.Enable)
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+
+ public DataResult ImportCodeStlMode(IdModel req)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var list = db.Queryable().Where(x =>req.Ids.Contains(x.Id) ).ToList();
+ if (list.Count == 0)
+ {
+ return DataResult.Failed("结算方式导入无数据!",MultiLanguageConst.CodeStlModeImportNoData);
+ }
+
+ if (tenantDb.Queryable().Where(x =>req.Ids.Contains(x.Id) ).Any())
+ {
+ return DataResult.Failed("存在已导入的结算方式!",MultiLanguageConst.CodeStlModeImportAlready);
+ }
+
+ tenantDb.Insertable(list).ExecuteCommand();
+ return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess);
+ }
+
+ ///
+ /// 获取当前租户已有的船名
+ ///
+ ///
+ public DataResult> GetExistCodeStlModeList()
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var data = tenantDb.Queryable()
+ .Select(n=>n.Id.ToString())
+ .ToList();
+ return DataResult>.Success(data);
+ }
+
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs
new file mode 100644
index 00000000..c0c6b7b1
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs
@@ -0,0 +1,17 @@
+namespace DS.WMS.Core.System.Dtos;
+
+///
+/// 租户表单设置请求实体
+///
+public class FormSetReq
+{
+ ///
+ /// 权限Id
+ ///
+ public long? PermissionId { get; set; }
+
+ ///
+ /// 字段设置
+ ///
+ public string Content { get; set; }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs
new file mode 100644
index 00000000..d7dc0210
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs
@@ -0,0 +1,17 @@
+namespace DS.WMS.Core.System.Dtos;
+
+///
+/// 租户表单设置返回实体
+///
+public class FormSetRes
+{
+ ///
+ /// 权限Id
+ ///
+ public long? PermissionId { get; set; }
+
+ ///
+ /// 字段设置
+ ///
+ public string Content { get; set; }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs
similarity index 88%
rename from ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs
rename to ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs
index 8de12dc6..8dec6030 100644
--- a/ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs
@@ -5,8 +5,8 @@ namespace DS.WMS.Core.System.Entity;
///
/// 用户字段设置
///
-[SqlSugar.SugarTable("sys_user_field")]
-public class SysUserFieldSet
+[SqlSugar.SugarTable("sys_field_set")]
+public class SysFieldSet
{
///
/// ID
diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs
new file mode 100644
index 00000000..c8b78302
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs
@@ -0,0 +1,31 @@
+using SqlSugar;
+
+namespace DS.WMS.Core.System.Entity;
+
+///
+/// 租户表单设置
+///
+[SqlSugar.SugarTable("sys_tenant_form_set")]
+public class SysFormSet
+{
+ ///
+ /// ID
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 租户id
+ ///
+ public long? TenantId { get; set; }
+
+ ///
+ /// 权限Id
+ ///
+ public long? PermissionId { get; set; }
+
+ ///
+ /// 表单设置
+ ///
+ public string Content { get; set; }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs
index b15996b3..eb44ab61 100644
--- a/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs
@@ -154,7 +154,7 @@ public interface ICommonService
///
///
///
- public DataResult GetUserFieldSet(string permissionId);
+ public DataResult GetUserFieldSet(string permissionId);
///
diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs
new file mode 100644
index 00000000..f6e935d6
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs
@@ -0,0 +1,30 @@
+using DS.Module.Core;
+using DS.WMS.Core.System.Dtos;
+using DS.WMS.Core.System.Entity;
+
+namespace DS.WMS.Core.System.Interface;
+
+public interface IFormSetService
+{
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ DataResult> GetListByPage(PageRequest request);
+
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ DataResult EditFormSet(FormSetReq model);
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ DataResult GetFormSetInfo(string id);
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs
index faea61e7..bc9122b8 100644
--- a/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs
@@ -1155,12 +1155,12 @@ public class CommonService : ICommonService
///
///
///
- public DataResult GetUserFieldSet(string permissionId)
+ public DataResult GetUserFieldSet(string permissionId)
{
- var info = db.Queryable()
+ var info = db.Queryable()
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId)).First();
- return DataResult.Success(info);
+ return DataResult.Success(info);
}
///
@@ -1170,12 +1170,12 @@ public class CommonService : ICommonService
///
public DataResult UpdateUserFieldSet(UserFieldSetUpdateReq req)
{
- var info = db.Queryable()
+ var info = db.Queryable()
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == req.PermissionId).First();
if (info.IsNull())
{
- var entity = new SysUserFieldSet
+ var entity = new SysFieldSet
{
UserId = long.Parse(user.UserId),
PermissionId = req.PermissionId,
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs b/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs
new file mode 100644
index 00000000..335a03d4
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs
@@ -0,0 +1,88 @@
+using DS.Module.Core;
+using DS.Module.Core.Extensions;
+using DS.Module.UserModule;
+using DS.WMS.Core.System.Dtos;
+using DS.WMS.Core.System.Entity;
+using DS.WMS.Core.System.Interface;
+using Mapster;
+using Microsoft.Extensions.DependencyInjection;
+using SqlSugar;
+
+namespace DS.WMS.Core.System.Method;
+
+public class FormSetService : IFormSetService
+{
+ private readonly IServiceProvider _serviceProvider;
+ private readonly ISqlSugarClient db;
+ private readonly IUser user;
+
+ ///
+ ///
+ ///
+ ///
+ public FormSetService(IServiceProvider serviceProvider)
+ {
+ _serviceProvider = serviceProvider;
+ db = _serviceProvider.GetRequiredService();
+ user = _serviceProvider.GetRequiredService();
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ public DataResult> GetListByPage(PageRequest request)
+ {
+ //序列化查询条件
+ var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
+ var data = db.Queryable()
+ .LeftJoin((a, b) => a.PermissionId == b.Id)
+ .Where(whereList)
+ .Select().ToQueryPage(request.PageCondition);
+ return data;
+ }
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ public DataResult EditFormSet(FormSetReq req)
+ {
+ var info = db.Queryable()
+ .Where(x => x.TenantId == long.Parse(user.TenantId) && x.PermissionId == req.PermissionId).First();
+
+ if (info.IsNull())
+ {
+ var entity = new SysFormSet
+ {
+ TenantId = long.Parse(user.TenantId),
+ PermissionId = req.PermissionId,
+ Content = req.Content
+ };
+ db.Insertable(entity).ExecuteCommand();
+ }
+ else
+ {
+ info.Content = req.Content;
+ db.Updateable(info).ExecuteCommand();
+ }
+
+ return DataResult.Successed("更新成功",MultiLanguageConst.DataUpdateSuccess);
+
+ }
+ ///
+ /// 详情
+ ///
+ ///
+ ///
+ public DataResult GetFormSetInfo(string permissionId)
+ {
+ var data = db.Queryable()
+ .LeftJoin((a, b) => a.PermissionId == b.Id)
+ .Where(x => x.TenantId == long.Parse(user.TenantId) && x.PermissionId == long.Parse(permissionId))
+ .Select()
+ .First();
+ return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess);
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs
index ff9741d6..4d684f83 100644
--- a/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs
@@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Log;
+using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@@ -16,7 +17,7 @@ public class LogAuditService : ILogAuditService
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
-
+ private readonly ISaasDbService saasService;
///
///
///
@@ -26,13 +27,14 @@ public class LogAuditService : ILogAuditService
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService();
user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
}
public DataResult> GetAuditLogList(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(whereList)
.Select().ToQueryPage(request.PageCondition);
return data;
@@ -40,7 +42,7 @@ public class LogAuditService : ILogAuditService
public DataResult GetAuditLogInfo(string id)
{
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(a => a.Id == long.Parse(id))
.Select()
.First();
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs
index 09478064..cf1fa2d9 100644
--- a/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs
@@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Log;
+using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@@ -16,7 +17,7 @@ public class LogExceptionService : ILogExceptionService
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
-
+ private readonly ISaasDbService saasService;
///
///
///
@@ -26,13 +27,14 @@ public class LogExceptionService : ILogExceptionService
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService();
user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
}
public DataResult> GetExceptionLogList(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(whereList)
.Select().ToQueryPage(request.PageCondition);
return data;
@@ -40,7 +42,7 @@ public class LogExceptionService : ILogExceptionService
public DataResult GetExceptionLogInfo(string id)
{
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(a => a.Id == long.Parse(id))
.Select()
.First();
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs
index c1c8bf3f..b706dddf 100644
--- a/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs
@@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Log;
+using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@@ -16,7 +17,7 @@ public class LogOperationService : ILogOperationService
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
-
+ private readonly ISaasDbService saasService;
///
///
///
@@ -26,13 +27,14 @@ public class LogOperationService : ILogOperationService
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService();
user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
}
public DataResult> GetOperationLogList(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(whereList)
.Select().ToQueryPage(request.PageCondition);
return data;
@@ -40,7 +42,7 @@ public class LogOperationService : ILogOperationService
public DataResult GetOperationLogInfo(string id)
{
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(a => a.Id == long.Parse(id))
.Select()
.First();
diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs
index bee686bc..0a21e49c 100644
--- a/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs
+++ b/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs
@@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Log;
+using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@@ -16,7 +17,7 @@ public class LogVisitService : ILogVisitService
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
-
+ private readonly ISaasDbService saasService;
///
///
///
@@ -26,13 +27,14 @@ public class LogVisitService : ILogVisitService
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService();
user = _serviceProvider.GetRequiredService();
+ saasService = _serviceProvider.GetRequiredService();
}
public DataResult> GetVisitLogList(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(whereList)
.Select().ToQueryPage(request.PageCondition);
return data;
@@ -40,7 +42,7 @@ public class LogVisitService : ILogVisitService
public DataResult GetVisitLogInfo(string id)
{
- var data = db.Queryable().Filter(null,true)
+ var data = saasService.GetLogDb().Queryable().Filter(null,true)
.Where(a => a.Id == long.Parse(id))
.Select()
.First();
diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs
new file mode 100644
index 00000000..1bfc1b86
--- /dev/null
+++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs
@@ -0,0 +1,100 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Interface;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DS.WMS.MainApi.Controllers;
+
+///
+/// 付费方式服务
+///
+public class CodeFrtController : ApiController
+{
+ private readonly ICodeFrtService _invokeService;
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ public CodeFrtController(ICodeFrtService invokeService)
+ {
+ _invokeService = invokeService;
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetCodeFrtList")]
+ public DataResult> GetCodeFrtList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetClientListByPage(request);
+ return res;
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("EditCodeFrt")]
+ public DataResult EditCodeFrt([FromBody] CodeFrtReq model)
+ {
+ var res = _invokeService.EditClientCodeFrt(model);
+ return res;
+ }
+
+ ///
+ /// 详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ [Route("GetCodeFrtInfo")]
+ public DataResult GetCodeFrtInfo([FromQuery] string id)
+ {
+ var res = _invokeService.GetClientCodeFrtInfo(id);
+ return res;
+ }
+
+ ///
+ /// 获取付费方式列表-基础库
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetBasicsCodeFrtList")]
+ public DataResult> GetBasicsCodeFrtList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetCodeFrtList(request);
+ return res;
+ }
+ ///
+ /// 导入付费方式类型-基础库
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("ImportCodeFrt")]
+ public DataResult ImportCodeFrt([FromBody] IdModel req)
+ {
+ var res = _invokeService.ImportCodeFrt(req);
+ return res;
+ }
+
+ ///
+ /// 获取当前租户已有的付费方式
+ ///
+ ///
+ [HttpGet]
+ [Route("GetExistCodeFrtList")]
+ public DataResult> GetExistCodeFrtList()
+ {
+ var res = _invokeService.GetExistCodeFrtList();
+ return res;
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs
new file mode 100644
index 00000000..f9ee33a4
--- /dev/null
+++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs
@@ -0,0 +1,100 @@
+using DS.Module.Core;
+using DS.Module.Core.Data;
+using DS.WMS.Core.Code.Dtos;
+using DS.WMS.Core.Code.Interface;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DS.WMS.MainApi.Controllers;
+
+///
+/// 结算方式服务
+///
+public class CodeStlModeController : ApiController
+{
+ private readonly ICodeStlModeService _invokeService;
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ public CodeStlModeController(ICodeStlModeService invokeService)
+ {
+ _invokeService = invokeService;
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetCodeStlModeList")]
+ public DataResult> GetCodeStlModeList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetClientListByPage(request);
+ return res;
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("EditCodeStlMode")]
+ public DataResult EditCodeStlMode([FromBody] CodeStlModeReq model)
+ {
+ var res = _invokeService.EditClientCodeStlMode(model);
+ return res;
+ }
+
+ ///
+ /// 详情
+ ///
+ ///
+ ///
+ [HttpGet]
+ [Route("GetCodeStlModeInfo")]
+ public DataResult GetCodeStlModeInfo([FromQuery] string id)
+ {
+ var res = _invokeService.GetClientCodeStlModeInfo(id);
+ return res;
+ }
+
+ ///
+ /// 获取结算方式列表-基础库
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetBasicsCodeStlModeList")]
+ public DataResult> GetBasicsCodeStlModeList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetCodeStlModeList(request);
+ return res;
+ }
+ ///
+ /// 导入结算方式类型-基础库
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("ImportCodeStlMode")]
+ public DataResult ImportCodeStlMode([FromBody] IdModel req)
+ {
+ var res = _invokeService.ImportCodeStlMode(req);
+ return res;
+ }
+
+ ///
+ /// 获取当前租户已有的结算方式
+ ///
+ ///
+ [HttpGet]
+ [Route("GetExistCodeStlModeList")]
+ public DataResult> GetExistCodeStlModeList()
+ {
+ var res = _invokeService.GetExistCodeStlModeList();
+ return res;
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs
index 6c9d99af..810dd9f3 100644
--- a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs
+++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs
@@ -318,7 +318,7 @@ public class CommonController : ApiController
///
[HttpGet]
[Route("GetUserFieldSet")]
- public DataResult GetUserFieldSet([FromQuery] string permissionId)
+ public DataResult GetUserFieldSet([FromQuery] string permissionId)
{
var res = _invokeService.GetUserFieldSet(permissionId);
return res;
diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs
new file mode 100644
index 00000000..71db803a
--- /dev/null
+++ b/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs
@@ -0,0 +1,62 @@
+using DS.Module.Core;
+using DS.WMS.Core.System.Dtos;
+using DS.WMS.Core.System.Interface;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DS.WMS.MainApi.Controllers;
+
+///
+/// 表单设置 模块
+///
+public class FormSetController : ApiController
+{
+ private readonly IFormSetService _invokeService;
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ public FormSetController(IFormSetService invokeService)
+ {
+ _invokeService = invokeService;
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetFormSetList")]
+ public DataResult> GetFormSetList([FromBody] PageRequest request)
+ {
+ var res = _invokeService.GetListByPage(request);
+ return res;
+ }
+
+ ///
+ /// 编辑
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("EditFormSet")]
+ public DataResult EditFormSet([FromBody] FormSetReq req)
+ {
+ var res = _invokeService.EditFormSet(req);
+ return res;
+ }
+
+ ///
+ /// 详情
+ ///
+ /// 权限Id
+ ///
+ [HttpGet]
+ [Route("GetFormSetInfo")]
+ public DataResult GetFormSetInfo([FromQuery] string permissionId)
+ {
+ var res = _invokeService.GetFormSetInfo(permissionId);
+ return res;
+ }
+}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt
index 1f511868..d552f53d 100644
--- a/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt
+++ b/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt
@@ -817,3 +817,10 @@
2024-03-11 09:31:30.7954 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-03-11 09:31:30.8281 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-11 09:31:30.9202 Info Configuration initialized.
+2024-03-11 09:49:09.6281 Info Registered target NLog.Targets.FileTarget(Name=allfile)
+2024-03-11 09:49:09.7189 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
+2024-03-11 09:49:09.8504 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
+2024-03-11 09:49:09.9075 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-03-11 09:49:09.9837 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-03-11 09:49:10.0201 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
+2024-03-11 09:49:10.0928 Info Configuration initialized.