接口相关

master
ZR20090193-陈敬勇 8 months ago
parent 3abf68be5d
commit b318631950

@ -258,6 +258,13 @@ public static class MultiLanguageConst
public const string CodeFrtImportNoData = "Code_Frt_Import_No_Data"; public const string CodeFrtImportNoData = "Code_Frt_Import_No_Data";
[Description("存在已导入的付费方式")] [Description("存在已导入的付费方式")]
public const string CodeFrtImportAlready = "Code_Frt_Import_Already"; public const string CodeFrtImportAlready = "Code_Frt_Import_Already";
[Description("运输条款已存在")]
public const string CodeServiceExist = "Code_Service_Exist";
[Description("运输条款导入无数据")]
public const string CodeServiceImportNoData = "Code_Service_Import_No_Data";
[Description("存在已导入的运输条款")]
public const string CodeServiceImportAlready = "Code_Service_Import_Already";
[Description("结算方式已存在")] [Description("结算方式已存在")]
public const string CodeStlModeExist = "Code_StlMode_Exist"; public const string CodeStlModeExist = "Code_StlMode_Exist";
[Description("结算方式导入无数据")] [Description("结算方式导入无数据")]

@ -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;
/// <summary>
/// 运输条款服务
/// </summary>
public class CodeServiceController : ApiController
{
private readonly ICodeServiceService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CodeServiceController(ICodeServiceService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCodeServiceList")]
public DataResult<List<CodeServiceRes>> GetCodeServiceList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditCodeService")]
public DataResult EditCodeService([FromBody] CodeServiceReq model)
{
var res = _invokeService.EditCodeService(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCodeServiceInfo")]
public DataResult<CodeServiceRes> GetCodeServiceInfo([FromQuery] string id)
{
var res = _invokeService.GetCodeServiceInfo(id);
return res;
}
}

@ -0,0 +1,57 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 集装箱信息选择返回
/// </summary>
public class CodeCtnSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 集装箱尺寸
/// </summary>
public string CtnSize { get; set; } = "";
/// <summary>
/// 集装箱类型
/// </summary>
public string CtnType { get; set; }= "";
/// <summary>
/// 表现形式
/// </summary>
public string CtnName { get; set; }= "";
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }= "";
/// <summary>
/// 箱皮重
/// </summary>
public decimal CtnWeight { get; set; }= 0;
/// <summary>
/// 中文说明
/// </summary>
public string CnExplain { get; set; }= "";
/// <summary>
/// 英文说明
/// </summary>
public string EnExplain { get; set; }= "";
/// <summary>
/// AFR代码
/// </summary>
public string AfrCode { get; set; }= "";
/// <summary>
/// 默认限重
/// </summary>
public decimal LimitWeight { get; set; } = 0;
/// <summary>
/// TEU
/// </summary>
public decimal TEU { get; set; }= 0;
}

@ -17,7 +17,10 @@ public class CodeFormCopyReq
/// 权限Id /// 权限Id
/// </summary> /// </summary>
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 字段复制设置 /// 字段复制设置
/// </summary> /// </summary>

@ -16,7 +16,10 @@ public class CodeFormCopyRes
/// 权限Id /// 权限Id
/// </summary> /// </summary>
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 字段设置 /// 字段设置
/// </summary> /// </summary>

@ -17,7 +17,10 @@ public class CodeFormSetReq
/// 权限Id /// 权限Id
/// </summary> /// </summary>
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 模板名称 /// 模板名称
/// </summary> /// </summary>

@ -16,7 +16,10 @@ public class CodeFormSetRes
/// 权限Id /// 权限Id
/// </summary> /// </summary>
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 字段设置 /// 字段设置
/// </summary> /// </summary>

@ -3,9 +3,9 @@ using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos; namespace DS.WMS.Core.Code.Dtos;
/// <summary> /// <summary>
/// 结算方式信息返回 /// 付费方式信息返回
/// </summary> /// </summary>
public class CodeVesselRes public class CodeFrtRes
{ {
/// <summary> /// <summary>
/// 主键Id /// 主键Id

@ -0,0 +1,31 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 付费方式信息返回
/// </summary>
public class CodeFrtSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 付费方式-英文名称
/// </summary>
public string FrtName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}

@ -0,0 +1,30 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 包装类型信息选择返回
/// </summary>
public class CodePackageSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 包装类型
/// </summary>
public string PackageName { get; set; }
/// <summary>
/// 中文说明
/// </summary>
public string CnExplain { get; set; }
/// <summary>
/// AFR代码
/// </summary>
public string AfrCode { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
}

@ -0,0 +1,48 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 运输条款请求实体
/// </summary>
public class CodeServiceReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 运输条款-英文名称
/// </summary>
public string ServiceName { get; set; }= "";
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }= "";
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class CodeServiceReqValidator : AbstractValidator<CodeServiceReq>
{
/// <summary>
/// 构造函数
/// </summary>
public CodeServiceReqValidator()
{
this.RuleFor(o => o.ServiceName)
.NotEmpty().WithName("运输条款-英文名称");
}
}

@ -0,0 +1,36 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 运输条款信息返回
/// </summary>
public class CodeServiceRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 运输条款-英文名称
/// </summary>
public string ServiceName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}

@ -0,0 +1,28 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 运输条款信息返回
/// </summary>
public class CodeServiceSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 运输条款-英文名称
/// </summary>
public string ServiceName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}

@ -0,0 +1,31 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 业务来源明细信息选择返回
/// </summary>
public class CodeSourceDetailSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务来源Id
/// </summary>
public long SourceId { get; set; }
/// <summary>
/// 来源明细名称
/// </summary>
public string DetailName { get; set; }= "";
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; } = "";
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}

@ -0,0 +1,30 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 业务来源信息选择返回
/// </summary>
public class CodeSourceSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务来源唯一代码
/// </summary>
public string SourceCode { get; set; }
/// <summary>
/// 业务来源名称
/// </summary>
public string SourceName { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}

@ -0,0 +1,34 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 结算方式选择返回
/// </summary>
public class CodeStlModeSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 结算方式唯一代码
/// </summary>
public string StlCode { get; set; }
/// <summary>
/// 结算方式名称
/// </summary>
public string StlName { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}

@ -3,9 +3,9 @@ using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos; namespace DS.WMS.Core.Code.Dtos;
/// <summary> /// <summary>
/// 付费方式返回 /// 船名返回
/// </summary> /// </summary>
public class CodeFrtRes public class CodeVesselRes
{ {
/// <summary> /// <summary>
/// 主键Id /// 主键Id
@ -14,7 +14,7 @@ public class CodeFrtRes
/// <summary> /// <summary>
/// 船名 /// 船名
/// </summary> /// </summary>
public string FrtName { get; set; } = ""; public string VesselName { get; set; } = "";
/// <summary> /// <summary>
/// 中文说明 /// 中文说明
/// </summary> /// </summary>

@ -0,0 +1,36 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 船名选择返回
/// </summary>
public class CodeVesselSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 船名
/// </summary>
public string VesselName { get; set; } = "";
/// <summary>
/// 中文说明
/// </summary>
public string CnName { get; set; }= "";
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船运代理
/// </summary>
public string ShipAgency { get; set; }= "";
/// <summary>
/// EDI代码-船舶呼号
/// </summary>
public string EdiCode { get; set; } = "";
}

@ -0,0 +1,60 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 航次信息选择返回
/// </summary>
public class CodeVoynoSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 船名Id
/// </summary>
public long VesselId { get; set; }
/// <summary>
/// 船名
/// </summary>
public string VesselName { get; set; }
/// <summary>
/// 航次
/// </summary>
public string VoyNo { get; set; } = "";
/// <summary>
/// 装货港
/// </summary>
public string LoadPort { get; set; }= "";
/// <summary>
/// 中转港
/// </summary>
public string EnterPort { get; set; }= "";
/// <summary>
/// 卸货港
/// </summary>
public string DischargePort { get; set; }= "";
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 预抵日期
/// </summary>
public DateTime? ETA { get; set; }
/// <summary>
/// ATD
/// </summary>
public DateTime? ATD { get; set; }
/// <summary>
/// 截单时间
/// </summary>
public DateTime? CloseDoDate { get; set; }
/// <summary>
/// 默认场站码头Id
/// </summary>
public long YardId { get; set; }
}

@ -0,0 +1,31 @@
using DS.Module.Core;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 签单方式信息选择返回
/// </summary>
public class IssueTypeSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 签单方式
/// </summary>
public string BillType { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 正本份数
/// </summary>
public string NoBill { get; set; }
/// <summary>
/// 副本份数
/// </summary>
public string CopyNoBill { get; set; }
}

@ -15,6 +15,11 @@ public class CodeFormCopy : BaseOrgModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "权限Id", IsNullable = false)] [SugarColumn(ColumnDescription = "权限Id", IsNullable = false)]
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
[SugarColumn(ColumnDescription = "权限模块名称", IsNullable = false,Length = 50)]
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 模板名称 /// 模板名称

@ -15,7 +15,11 @@ public class CodeFormSet : BaseOrgModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "权限Id", IsNullable = false)] [SugarColumn(ColumnDescription = "权限Id", IsNullable = false)]
public long? PermissionId { get; set; } public long? PermissionId { get; set; }
/// <summary>
/// 权限模块名称
/// </summary>
[SugarColumn(ColumnDescription = "权限模块名称", IsNullable = false,Length = 50)]
public string PermissionName { get; set; }
/// <summary> /// <summary>
/// 表单设置 /// 表单设置
/// </summary> /// </summary>

@ -0,0 +1,29 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Code.Entity;
/// <summary>
/// 运输条款表
/// </summary>
[SqlSugar.SugarTable("op_code_service","运输条款表")]
public class CodeService: BaseModel<long>
{
/// <summary>
/// 运输条款-英文名称
/// </summary>
[SugarColumn(ColumnDescription = "运输条款-英文名称", Length = 100)]
public string ServiceName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
[SugarColumn(ColumnDescription = "中文名称", Length = 50,IsNullable = true)]
public string CnName { get; set; }
/// <summary>
/// 状态 0启用 1禁用
/// </summary>
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
}

@ -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 ICodeServiceService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<CodeServiceRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
DataResult EditCodeService(CodeServiceReq req);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<CodeServiceRes> GetCodeServiceInfo(string id);
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<CodeServiceRes>> GetClientListByPage(PageRequest request);
/// <summary>
/// 编辑-客户端
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
DataResult EditClientCodeService(CodeServiceReq req);
/// <summary>
/// 获取详情 -客户端
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public DataResult<CodeServiceRes> GetClientCodeServiceInfo(string id);
/// <summary>
/// 获取运输条款列表-基础库
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<CodeServiceRes>> GetCodeServiceList(PageRequest request);
/// <summary>
/// 导入运输条款列表
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
DataResult ImportCodeService(IdModel req);
/// <summary>
/// 获取当前租户已有的运输条款
/// </summary>
/// <returns></returns>
public DataResult<List<string>> GetExistCodeServiceList();
}

@ -40,10 +40,13 @@ public class CodeFormCopyService : IFormCopyService
public DataResult<List<CodeFormCopyRes>> GetListByPage(PageRequest request) public DataResult<List<CodeFormCopyRes>> GetListByPage(PageRequest request)
{ {
var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var permissions = db.Queryable<SysPermission>();
//序列化查询条件 //序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<CodeFormCopy>() var data = tenantDb.Queryable<CodeFormCopy>()
.LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id) // .LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id)
// .LeftJoin(saasService.GetMasterDb().Queryable<SysPermission>().AsWithAttr(),(a, b) => a.PermissionId == b.Id)
.Where(whereList) .Where(whereList)
.Select<CodeFormCopyRes>().ToQueryPage(request.PageCondition); .Select<CodeFormCopyRes>().ToQueryPage(request.PageCondition);
return data; return data;
@ -91,7 +94,7 @@ public class CodeFormCopyService : IFormCopyService
{ {
var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeFormCopy>() var data = tenantDb.Queryable<CodeFormCopy>()
.LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id) // .LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id)
.Where(x => x.Id == long.Parse(id)) .Where(x => x.Id == long.Parse(id))
.Select<CodeFormCopyRes>() .Select<CodeFormCopyRes>()
.First(); .First();

@ -43,7 +43,6 @@ public class CodeFormSetService : IFormSetService
//序列化查询条件 //序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<CodeFormSet>() var data = tenantDb.Queryable<CodeFormSet>()
.LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id)
.Where(whereList) .Where(whereList)
.Select<CodeFormSetRes>().ToQueryPage(request.PageCondition); .Select<CodeFormSetRes>().ToQueryPage(request.PageCondition);
return data; return data;
@ -91,7 +90,6 @@ public class CodeFormSetService : IFormSetService
{ {
var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeFormSet>() var data = tenantDb.Queryable<CodeFormSet>()
.LeftJoin<SysPermission>((a, b) => a.PermissionId == b.Id)
.Where(x => x.Id == long.Parse(id)) .Where(x => x.Id == long.Parse(id))
.Select<CodeFormSetRes>() .Select<CodeFormSetRes>()
.First(); .First();

@ -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 CodeServiceService:ICodeServiceService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public CodeServiceService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
public DataResult<List<CodeServiceRes>> GetListByPage(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = db.Queryable<CodeService>()
.Where(whereList)
.Select<CodeServiceRes>().ToQueryPage(request.PageCondition);
return data;
}
public DataResult EditCodeService(CodeServiceReq req)
{
if (req.Id == 0)
{
if (db.Queryable<CodeService>().Where(x=>x.ServiceName == req.ServiceName.Trim()).Any())
{
return DataResult.Failed("运输条款已存在!",MultiLanguageConst.CodeServiceExist);
}
var data = req.Adapt<CodeService>();
var entity = db.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = db.Queryable<CodeService>().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<CodeServiceRes> GetCodeServiceInfo(string id)
{
var data = db.Queryable<CodeService>()
.Where(a => a.Id == long.Parse(id))
.Select<CodeServiceRes>()
.First();
return DataResult<CodeServiceRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
}
public DataResult<List<CodeServiceRes>> GetClientListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<CodeService>()
.Where(whereList)
.Select<CodeServiceRes>().ToQueryPage(request.PageCondition);
return data;
}
public DataResult EditClientCodeService(CodeServiceReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<CodeService>().Where(x=>x.ServiceName == req.ServiceName.Trim()).Any())
{
return DataResult.Failed("运输条款已存在!",MultiLanguageConst.CodeServiceExist);
}
var data = req.Adapt<CodeService>();
var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<CodeService>().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<CodeServiceRes> GetClientCodeServiceInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeService>()
.Where(a => a.Id == long.Parse(id))
.Select<CodeServiceRes>()
.First();
return DataResult<CodeServiceRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
}
public DataResult<List<CodeServiceRes>> GetCodeServiceList(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = db.Queryable<CodeService>().Where(a=>a.Status == StatusEnum.Enable)
.Where(whereList)
.Select<CodeServiceRes>().ToQueryPage(request.PageCondition);
return data;
}
public DataResult ImportCodeService(IdModel req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = db.Queryable<CodeService>().Where(x =>req.Ids.Contains(x.Id) ).ToList();
if (list.Count == 0)
{
return DataResult.Failed("运输条款导入无数据!",MultiLanguageConst.CodeServiceImportNoData);
}
if (tenantDb.Queryable<CodeService>().Where(x =>req.Ids.Contains(x.Id) ).Any())
{
return DataResult.Failed("存在已导入的运输条款!",MultiLanguageConst.CodeServiceImportAlready);
}
tenantDb.Insertable(list).ExecuteCommand();
return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess);
}
/// <summary>
/// 获取当前租户已有的运输条款
/// </summary>
/// <returns></returns>
public DataResult<List<string>> GetExistCodeServiceList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeService>()
.Select(n=>n.Id.ToString())
.ToList();
return DataResult<List<string>>.Success(data);
}
}

@ -0,0 +1,30 @@
namespace DS.WMS.Core.Info.Dtos;
/// <summary>
/// 客户下拉实体
/// </summary>
public class ClientSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// Desc:客户代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// Desc:客户简称
/// </summary>
public string ShortName { get; set; }
/// <summary>
/// Desc:英文简称
/// </summary>
public string EnShortName { get; set; }
}

@ -51,7 +51,7 @@ public class SeaExportReq
/// <summary> /// <summary>
/// 财务日期 /// 财务日期
/// </summary> /// </summary>
public DateTime AccountDate { get; set; } = DateTime.Now; public string AccountDate { get; set; }
/// <summary> /// <summary>
/// 主提单号 /// 主提单号
@ -967,8 +967,7 @@ public class SeaExportReq
/// 备注 /// 备注
/// </summary> /// </summary>
public string Note { get; set; } = ""; public string Note { get; set; } = "";
} }
/// <summary> /// <summary>

@ -50,7 +50,7 @@ public class SeaExportRes
/// <summary> /// <summary>
/// 财务日期 /// 财务日期
/// </summary> /// </summary>
public DateTime AccountDate { get; set; } = DateTime.Now; public string AccountDate { get; set; }
/// <summary> /// <summary>
/// 主提单号 /// 主提单号
@ -972,4 +972,17 @@ public class SeaExportRes
/// 创建时间 /// 创建时间
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
/// <summary>
/// Desc:提单签发状态
/// </summary>
public int BLIssueStatus { get; set; }
/// <summary>
/// Desc:整票提交状态
/// </summary>
public int BillSubmitStatus { get; set; }
} }

@ -54,8 +54,8 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 财务日期 /// 财务日期
/// </summary> /// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "财务日期", IsNullable = false, Length = 7)] [SqlSugar.SugarColumn(ColumnDescription = "财务日期", IsNullable = false,Length = 7)]
public DateTime AccountDate { get; set; } = DateTime.Now; public string AccountDate { get; set; }
/// <summary> /// <summary>
/// 主提单号 /// 主提单号
@ -319,13 +319,13 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 唛头 N/M /// 唛头 N/M
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "唛头", IsNullable = true, Length = 3000)] [SugarColumn(ColumnDescription = "唛头", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
public string Marks { get; set; } public string Marks { get; set; }
/// <summary> /// <summary>
/// 箱号封号 /// 箱号封号
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "箱号封号", IsNullable = true, Length = 4000)] [SugarColumn(ColumnDescription = "箱号封号", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
public string CntrSealNo { get; set; } public string CntrSealNo { get; set; }
/// <summary> /// <summary>
@ -337,7 +337,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// 货物描述 /// 货物描述
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "货物描述", IsNullable = true, Length = 2000)] [SugarColumn(ColumnDescription = "货物描述", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
public string Description { get; set; } public string Description { get; set; }
/// <summary> /// <summary>
@ -662,7 +662,7 @@ public class SeaExport : BaseOrgModel<long>
/// <summary> /// <summary>
/// Desc:备注 /// Desc:备注
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 4000)] [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary> /// <summary>
@ -1174,4 +1174,21 @@ public class SeaExport : BaseOrgModel<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "", IsNullable = true, DefaultValue = "0")] [SugarColumn(ColumnDescription = "", IsNullable = true, DefaultValue = "0")]
public int WarnCount { get; set; } = 0; public int WarnCount { get; set; } = 0;
/// <summary>
/// Desc:提单签发状态
/// </summary>
[SugarColumn(ColumnDescription = "提单签发状态", IsNullable = true, DefaultValue = "0")]
public int BLIssueStatus { get; set; }
/// <summary>
/// Desc:整票提交状态
/// </summary>
[SugarColumn(ColumnDescription = "整票提交状态", IsNullable = true, DefaultValue = "0")]
public int BillSubmitStatus { get; set; }
} }

@ -0,0 +1,18 @@
namespace DS.WMS.Core.System.Dtos;
/// <summary>
/// 部门选择
/// </summary>
public class DeptSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 机构名称
/// </summary>
public string OrgName { get; set; }
}

@ -90,6 +90,53 @@ public class UserReq
/// 用戶机构 /// 用戶机构
/// </summary> /// </summary>
public long?[] OrgIds { get; set; } public long?[] OrgIds { get; set; }
/// <summary>
/// 是否操作
/// </summary>
public bool IsOperator { get; set; } = false;
/// <summary>
/// 是否单证
/// </summary>
public bool IsVouchingClerk { get; set; } = false;
/// <summary>
/// 是否销售
/// </summary>
public bool IsSale { get; set; } = false;
/// <summary>
/// 是否报关员
/// </summary>
public bool IsCustom { get; set; } = false;
/// <summary>
/// 是否财务
/// </summary>
public bool IsFinancialStaff { get; set; } = false;
/// <summary>
/// 是否客服
/// </summary>
public bool IsCustomerService { get; set; } = false;
/// <summary>
/// 是否司机
/// </summary>
public bool IsDriver { get; set; } = false;
/// <summary>
/// 是否派车调度人员
/// </summary>
public bool IsDispatcher { get; set; } = false;
/// <summary>
/// 默认部门Id
/// </summary>
public long DeptId { get; set; } = 0;
/// <summary>
/// 默认机构Id
/// </summary>
public long DefaultOrgId { get; set; } = 0;
} }
/// <summary> /// <summary>

@ -0,0 +1,22 @@
namespace DS.WMS.Core.System.Dtos;
/// <summary>
/// 用户下拉选择
/// </summary>
public class UserSelectRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 登陆账号
/// </summary>
public string UserCode { get; set; }
/// <summary>
///姓名
/// </summary>
public string UserName { get; set; }
}

@ -99,4 +99,49 @@ public class UserViewModel
/// </summary> /// </summary>
public long?[] OrgIds { get; set; } public long?[] OrgIds { get; set; }
// public string[] RoleIds { get; set; } // public string[] RoleIds { get; set; }
/// <summary>
/// 是否操作
/// </summary>
public bool IsOperator { get; set; } = false;
/// <summary>
/// 是否单证
/// </summary>
public bool IsVouchingClerk { get; set; } = false;
/// <summary>
/// 是否销售
/// </summary>
public bool IsSale { get; set; } = false;
/// <summary>
/// 是否报关员
/// </summary>
public bool IsCustom { get; set; } = false;
/// <summary>
/// 是否财务
/// </summary>
public bool IsFinancialStaff { get; set; } = false;
/// <summary>
/// 是否客服
/// </summary>
public bool IsCustomerService { get; set; } = false;
/// <summary>
/// 是否司机
/// </summary>
public bool IsDriver { get; set; } = false;
/// <summary>
/// 是否派车调度人员
/// </summary>
public bool IsDispatcher { get; set; } = false;
/// <summary>
/// 默认部门Id
/// </summary>
public long DeptId { get; set; }
/// <summary>
/// 默认机构Id
/// </summary>
public long DefaultOrgId { get; set; }
} }

@ -111,15 +111,67 @@ public class SysUser : UserTenantModel<long>
[Description("公司Id")] [Description("公司Id")]
public string CompanyId { get; set; } public string CompanyId { get; set; }
/// <summary> /// <summary>
/// ClientId /// 默认机构Id
/// </summary> /// </summary>
[Description("客户Id")] [Description("默认机构Id")]
public string ClientId { get; set; } public long DefaultOrgId { get; set; }
/// <summary>
/// DeptId
/// </summary>
[Description("默认部门Id")]
public long DeptId { get; set; }
/// <summary> /// <summary>
/// 是否限制客户 /// 是否限制客户
/// </summary> /// </summary>
[Description("是否限制客户")] [Description("是否限制客户")]
public bool IsLimitClient { get; set; } public bool IsLimitClient { get; set; }
/// <summary>
/// 是否操作
/// </summary>
[Description("是否操作")]
public bool IsOperator { get; set; } = false;
/// <summary>
/// 是否单证
/// </summary>
[Description("是否单证")]
public bool IsVouchingClerk { get; set; } = false;
/// <summary>
/// 是否销售
/// </summary>
[Description("是否销售")]
public bool IsSale { get; set; } = false;
/// <summary>
/// 是否报关员
/// </summary>
[Description("是否报关员")]
public bool IsCustom { get; set; } = false;
/// <summary>
/// 是否财务
/// </summary>
[Description("是否财务")]
public bool IsFinancialStaff { get; set; } = false;
/// <summary>
/// 是否客服
/// </summary>
[Description("是否客服")]
public bool IsCustomerService { get; set; } = false;
/// <summary>
/// 是否司机
/// </summary>
[Description("是否司机")]
public bool IsDriver { get; set; } = false;
/// <summary>
/// 是否派车调度人员
/// </summary>
[Description("是否派车调度人员")]
public bool IsDispatcher { get; set; } = false;
} }

@ -0,0 +1,228 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using SqlSugar;
namespace DS.WMS.Core.System.Interface;
/// <summary>
///
/// </summary>
public interface IClientCommonService
{
/// <summary>
/// 获取船公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetCarrierClientList();
/// <summary>
/// 获取场站下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetYardClientList();
/// <summary>
/// 获取订舱公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetBookingClientList();
/// <summary>
/// 获取车队下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetTruckClientList();
/// <summary>
/// 获取委托单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetControllerClientList();
/// <summary>
/// 获取报关行下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetCustomClientList();
/// <summary>
/// 获取代理(国外)下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAgentClientList();
/// <summary>
/// 获取代理(国内)下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAgentCnClientList();
/// <summary>
/// 获取快递公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetExpressClientList();
/// <summary>
/// 获取航空公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAirLinesClientList();
/// <summary>
/// 获取发货人下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetShipperClientList();
/// <summary>
/// 获取收货人下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetConsigneeClientList();
/// <summary>
/// 获取通知人下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetNotifyPartyClientList();
/// <summary>
/// 获取仓库下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetWareHouseClientList();
/// <summary>
/// 获取码头下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetWharfClientList();
/// <summary>
/// 获取保险公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetInsurerClientList();
/// <summary>
/// 获取租箱公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetLeasingClientList();
/// <summary>
/// 获取贸易代理下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetTradingAgencyClientList();
/// <summary>
/// 获取船代下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetShipAgencyClientList();
/// <summary>
/// 获取经营单位下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetEnterpriseClientList();
/// <summary>
/// 获取部门列表
/// </summary>
/// <param name="orgId">机构id</param>
/// <returns></returns>
public DataResult<List<DeptSelectRes>> GetDeptList(string orgId = "");
/// <summary>
/// 获取操作员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetOperatorUserList();
/// <summary>
/// 获取单证员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetVouchingClerkList();
/// <summary>
/// 获取销售员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetSaleUserList();
/// <summary>
/// 获取报关员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetCustomUserList();
/// <summary>
/// 获取财务员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetFinancialStaffList();
/// <summary>
/// 获取客服列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetCustomerServiceList();
/// <summary>
/// 获取司机列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetDiverList();
/// <summary>
/// 获取派车调度人员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetDispatcherList();
/// <summary>
/// 获取签单方式下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<IssueTypeSelectRes>> GetIssueTypeSelectList();
/// <summary>
/// 获取集装箱下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeCtnSelectRes>> GetCtnSelectList();
/// <summary>
/// 获取包装类型下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList();
/// <summary>
/// 获取船名下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeVesselSelectRes>> GetVesselSelectList();
/// <summary>
/// 获取航次下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeVoynoSelectRes>> GetVoynoSelectList();
/// <summary>
/// 获取运输条款下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeServiceSelectRes>> GetServiceSelectList();
}

@ -216,5 +216,28 @@ public interface ICommonService
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public DataResult<List<CodePortSelectRes>> GetClientPortSelectList(); public DataResult<List<CodePortSelectRes>> GetClientPortSelectList();
/// <summary>
/// 获取付费方式下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeFrtSelectRes>> GetClientFrtSelectList();
/// <summary>
/// 获取结算方式下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeStlModeSelectRes>> GetClientStlModeSelectList();
/// <summary>
/// 获取业务来源下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceSelectRes>> GetClientSourceSelectList();
/// <summary>
/// 获取业务来源明细下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceDetailSelectRes>> GetClientSourceDetailSelectList(string id);
} }

@ -0,0 +1,684 @@
using DS.Module.Core;
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.Info.Dtos;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.System.Interface;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
namespace DS.WMS.Core.System.Method;
public class ClientCommonService : IClientCommonService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public ClientCommonService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
/// <summary>
/// 获取船公司下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetCarrierClientList()
{
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() && b.IsCarrier == 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>> GetYardClientList()
{
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() && b.IsYard == 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>> GetBookingClientList()
{
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() && b.IsBooking == 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>> GetTruckClientList()
{
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() && b.IsTruck == 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>> GetControllerClientList()
{
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() && b.IsController == 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>> GetCustomClientList()
{
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() && b.IsCustom == 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>> GetAgentClientList()
{
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() && b.IsAgent == 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>> GetAgentCnClientList()
{
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() && b.IsAgentCn == 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>> GetExpressClientList()
{
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() && b.IsExpress == 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>> GetAirLinesClientList()
{
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() && b.IsAirLines == 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>> GetShipperClientList()
{
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() && b.IsShipper == 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>> GetConsigneeClientList()
{
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() && b.IsConsignee == 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>> GetNotifyPartyClientList()
{
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() && b.IsNotifyParty == 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>> GetWareHouseClientList()
{
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() && b.IsWareHouse == 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>> GetWharfClientList()
{
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() && b.IsWharf == 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>> GetInsurerClientList()
{
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() && b.IsInsurer == 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>> GetLeasingClientList()
{
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() && b.IsLeasing == 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>> GetTradingAgencyClientList()
{
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() && b.IsTradingAgency == 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>> GetShipAgencyClientList()
{
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() && b.IsShipAgency == 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>> GetEnterpriseClientList()
{
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() && 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<IssueTypeSelectRes>> GetIssueTypeSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<InfoClient>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt())
.Select<IssueTypeSelectRes>().ToList();
return DataResult<List<IssueTypeSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取集装箱下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeCtnSelectRes>> GetCtnSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeCtn>()
.Where(a => a.Status == StatusEnum.Enable)
.Select<CodeCtnSelectRes>().ToList();
return DataResult<List<CodeCtnSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取包装类型下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodePackage>()
.Where(a => a.Status == StatusEnum.Enable)
.Select<CodePackageSelectRes>().ToList();
return DataResult<List<CodePackageSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取船名下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeVesselSelectRes>> GetVesselSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeVessel>()
.Where(a => a.Status == StatusEnum.Enable)
.Select<CodeVesselSelectRes>().ToList();
return DataResult<List<CodeVesselSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取航次下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeVoynoSelectRes>> GetVoynoSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeVoyno>()
.Where(a => a.Status == StatusEnum.Enable)
.Select<CodeVoynoSelectRes>().ToList();
return DataResult<List<CodeVoynoSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取运输条款下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodeServiceSelectRes>> GetServiceSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeService>()
.Where(a => a.Status == StatusEnum.Enable)
.Select<CodeServiceSelectRes>().ToList();
return DataResult<List<CodeServiceSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取部门列表
/// </summary>
/// <param name="orgId">机构id</param>
/// <returns></returns>
public DataResult<List<DeptSelectRes>> GetDeptList(string orgId = "")
{
var list = db.Queryable<SysOrg>()
.WhereIF(orgId.IsNotEmptyOrNull(), a => a.ParentId == long.Parse(orgId))
.Where(a => a.Status == StatusEnum.Enable && a.IsDepartment == true)
.Select<DeptSelectRes>()
.ToList();
return DataResult<List<DeptSelectRes>>.Success("获取数据成功!", list);
}
/// <summary>
/// 获取操作员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetOperatorUserList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsOperator == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取单证员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetVouchingClerkList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsVouchingClerk == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取销售员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetSaleUserList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsSale == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取报关员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetCustomUserList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsCustom == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取财务员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetFinancialStaffList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsFinancialStaff == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取客服列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetCustomerServiceList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsCustomerService == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取司机列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetDiverList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsDriver == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 获取派车调度人员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetDispatcherList()
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsDispatcher == true)
.Select(a => new UserSelectRes
{
Id = a.Id,
UserCode= a.UserCode,
UserName = a.UserName,
}
).ToList();
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
}

@ -108,7 +108,7 @@ public class CommonService : ICommonService
TenantId = tenantId, TenantId = tenantId,
UserType = a.UserType, UserType = a.UserType,
CompanyId = a.CompanyId, CompanyId = a.CompanyId,
ClientId = a.ClientId, // ClientId = a.ClientId,
IsLimitClient = a.IsLimitClient, IsLimitClient = a.IsLimitClient,
RefreshToken = refreshToken, RefreshToken = refreshToken,
// OrgId = a.OrgId.ToString(), CompanyName = a.CustomerName // OrgId = a.OrgId.ToString(), CompanyName = a.CustomerName
@ -427,7 +427,7 @@ public class CommonService : ICommonService
TenantId = tenantId, TenantId = tenantId,
UserType = a.UserType, UserType = a.UserType,
CompanyId = a.CompanyId, CompanyId = a.CompanyId,
ClientId = a.ClientId, // ClientId = a.ClientId,
IsLimitClient = a.IsLimitClient, IsLimitClient = a.IsLimitClient,
RefreshToken = refreshToken, RefreshToken = refreshToken,
// UserOrgs = orgRelations, // UserOrgs = orgRelations,
@ -1469,4 +1469,61 @@ public class CommonService : ICommonService
} }
#endregion #endregion
#region 租户下拉信息
/// <summary>
/// 获取付费方式下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeFrtSelectRes>> GetClientFrtSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = tenantDb.Queryable<CodeFrt>()
.Where(x => x.Status == StatusEnum.Enable)
.Select<CodeFrtSelectRes>()
.ToList();
return DataResult<List<CodeFrtSelectRes>>.Success("获取数据成功!", list);
}
/// <summary>
/// 获取结算方式下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeStlModeSelectRes>> GetClientStlModeSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = tenantDb.Queryable<CodeStlMode>()
.Where(x => x.Status == StatusEnum.Enable)
.Select<CodeStlModeSelectRes>()
.ToList();
return DataResult<List<CodeStlModeSelectRes>>.Success("获取数据成功!", list);
}
/// <summary>
/// 获取业务来源下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceSelectRes>> GetClientSourceSelectList()
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = tenantDb.Queryable<CodeSource>()
.Where(x => x.Status == StatusEnum.Enable)
.Select<CodeSourceSelectRes>()
.ToList();
return DataResult<List<CodeSourceSelectRes>>.Success("获取数据成功!", list);
}
/// <summary>
/// 获取业务来源明细下拉列表-客户端
/// </summary>
/// <returns></returns>
public DataResult<List<CodeSourceDetailSelectRes>> GetClientSourceDetailSelectList(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = tenantDb.Queryable<CodeSourceDetail>()
.Where(x => x.Status == StatusEnum.Enable && x.SourceId == long.Parse(id))
.Select<CodeSourceDetailSelectRes>()
.ToList();
return DataResult<List<CodeSourceDetailSelectRes>>.Success("获取数据成功!", list);
}
#endregion
} }

@ -0,0 +1,420 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.System.Interface;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace DS.WMS.MainApi.Controllers;
/// <summary>
/// 公共模块-客户端
/// </summary>
public class ClientCommonController : ApiController
{
private readonly IClientCommonService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public ClientCommonController(IClientCommonService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 获取船公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCarrierClientList")]
public DataResult<List<ClientSelectRes>> GetCarrierClientList()
{
var res = _invokeService.GetCarrierClientList();
return res;
}
/// <summary>
/// 获取场站下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetYardClientList")]
public DataResult<List<ClientSelectRes>> GetYardClientList()
{
var res = _invokeService.GetYardClientList();
return res;
}
/// <summary>
/// 获取订舱公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetBookingClientList")]
public DataResult<List<ClientSelectRes>> GetBookingClientList()
{
var res = _invokeService.GetBookingClientList();
return res;
}
/// <summary>
/// 获取车队下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetTruckClientList")]
public DataResult<List<ClientSelectRes>> GetTruckClientList()
{
var res = _invokeService.GetTruckClientList();
return res;
}
/// <summary>
/// 获取委托单位下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetControllerClientList")]
public DataResult<List<ClientSelectRes>> GetControllerClientList()
{
var res = _invokeService.GetControllerClientList();
return res;
}
/// <summary>
/// 获取报关行下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCustomClientList")]
public DataResult<List<ClientSelectRes>> GetCustomClientList()
{
var res = _invokeService.GetCustomClientList();
return res;
}
/// <summary>
/// 获取代理(国外)下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetAgentClientList")]
public DataResult<List<ClientSelectRes>> GetAgentClientList()
{
var res = _invokeService.GetAgentClientList();
return res;
}
/// <summary>
/// 获取代理(国内)下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetAgentCnClientList")]
public DataResult<List<ClientSelectRes>> GetAgentCnClientList()
{
var res = _invokeService.GetAgentCnClientList();
return res;
}
/// <summary>
/// 获取快递公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetExpressClientList")]
public DataResult<List<ClientSelectRes>> GetExpressClientList()
{
var res = _invokeService.GetExpressClientList();
return res;
}
/// <summary>
/// 获取航空公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetAirLinesClientList")]
public DataResult<List<ClientSelectRes>> GetAirLinesClientList()
{
var res = _invokeService.GetAirLinesClientList();
return res;
}
/// <summary>
/// 获取发货人下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetShipperClientList")]
public DataResult<List<ClientSelectRes>> GetShipperClientList()
{
var res = _invokeService.GetShipperClientList();
return res;
}
/// <summary>
/// 获取收货人下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetConsigneeClientList")]
public DataResult<List<ClientSelectRes>> GetConsigneeClientList()
{
var res = _invokeService.GetConsigneeClientList();
return res;
}
/// <summary>
/// 获取通知人下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetNotifyPartyClientList")]
public DataResult<List<ClientSelectRes>> GetNotifyPartyClientList()
{
var res = _invokeService.GetNotifyPartyClientList();
return res;
}
/// <summary>
/// 获取仓库下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetWareHouseClientList")]
public DataResult<List<ClientSelectRes>> GetWareHouseClientList()
{
var res = _invokeService.GetWareHouseClientList();
return res;
}
/// <summary>
/// 获取保险公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetInsurerClientList")]
public DataResult<List<ClientSelectRes>> GetInsurerClientList()
{
var res = _invokeService.GetInsurerClientList();
return res;
}
/// <summary>
/// 获取租箱公司下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetLeasingClientList")]
public DataResult<List<ClientSelectRes>> GetLeasingClientList()
{
var res = _invokeService.GetLeasingClientList();
return res;
}
/// <summary>
/// 获取贸易代理下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetTradingAgencyClientList")]
public DataResult<List<ClientSelectRes>> GetTradingAgencyClientList()
{
var res = _invokeService.GetTradingAgencyClientList();
return res;
}
/// <summary>
/// 获取船代下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetShipAgencyClientList")]
public DataResult<List<ClientSelectRes>> GetShipAgencyClientList()
{
var res = _invokeService.GetShipAgencyClientList();
return res;
}
/// <summary>
/// 获取经营单位下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetEnterpriseClientList")]
public DataResult<List<ClientSelectRes>> GetEnterpriseClientList()
{
var res = _invokeService.GetEnterpriseClientList();
return res;
}
/// <summary>
/// 获取码头下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetWharfClientList")]
public DataResult<List<ClientSelectRes>> GetWharfClientList()
{
var res = _invokeService.GetWharfClientList();
return res;
}
/// <summary>
/// 获取部门列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetDeptList")]
public DataResult<List<DeptSelectRes>> GetDeptList([FromQuery]string orgId = "")
{
var res = _invokeService.GetDeptList(orgId);
return res;
}
/// <summary>
/// 获取操作员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetOperatorUserList")]
public DataResult<List<UserSelectRes>> GetOperatorUserList()
{
var res = _invokeService.GetOperatorUserList();
return res;
}
/// <summary>
/// 获取单证员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetVouchingClerkList")]
public DataResult<List<UserSelectRes>> GetVouchingClerkList()
{
var res = _invokeService.GetVouchingClerkList();
return res;
}
/// <summary>
/// 获取销售员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetSaleUserList")]
public DataResult<List<UserSelectRes>> GetSaleUserList()
{
var res = _invokeService.GetSaleUserList();
return res;
}
/// <summary>
/// 获取报关员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCustomUserList")]
public DataResult<List<UserSelectRes>> GetCustomUserList()
{
var res = _invokeService.GetCustomUserList();
return res;
}
/// <summary>
/// 获取财务人员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetFinancialStaffList")]
public DataResult<List<UserSelectRes>> GetFinancialStaffList()
{
var res = _invokeService.GetFinancialStaffList();
return res;
}
/// <summary>
/// 获取客服列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCustomerServiceList")]
public DataResult<List<UserSelectRes>> GetCustomerServiceList()
{
var res = _invokeService.GetCustomerServiceList();
return res;
}
/// <summary>
/// 获取司机列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetDiverList")]
public DataResult<List<UserSelectRes>> GetDiverList()
{
var res = _invokeService.GetDiverList();
return res;
}
/// <summary>
/// 获取派车调度人员列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetDispatcherList")]
public DataResult<List<UserSelectRes>> GetDispatcherList()
{
var res = _invokeService.GetDispatcherList();
return res;
}
/// <summary>
/// 获取签单方式下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetIssueTypeSelectList")]
public DataResult<List<IssueTypeSelectRes>> GetIssueTypeSelectList()
{
var res = _invokeService.GetIssueTypeSelectList();
return res;
}
/// <summary>
/// 获取集装箱下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCtnSelectList")]
public DataResult<List<CodeCtnSelectRes>> GetCtnSelectList()
{
var res = _invokeService.GetCtnSelectList();
return res;
}
/// <summary>
/// 获取包装类型下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetPackageSelectList")]
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList()
{
var res = _invokeService.GetPackageSelectList();
return res;
}
/// <summary>
/// 获取船名下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetVesselSelectList")]
public DataResult<List<CodeVesselSelectRes>> GetVesselSelectList()
{
var res = _invokeService.GetVesselSelectList();
return res;
}
/// <summary>
/// 获取航次下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetVoynoSelectList")]
public DataResult<List<CodeVoynoSelectRes>> GetVoynoSelectList()
{
var res = _invokeService.GetVoynoSelectList();
return res;
}
/// <summary>
/// 获取运输条款下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetServiceSelectList")]
public DataResult<List<CodeServiceSelectRes>> GetServiceSelectList()
{
var res = _invokeService.GetServiceSelectList();
return res;
}
}

@ -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;
/// <summary>
/// 运输条款服务
/// </summary>
public class CodeServiceController : ApiController
{
private readonly ICodeServiceService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CodeServiceController(ICodeServiceService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCodeServiceList")]
public DataResult<List<CodeServiceRes>> GetCodeServiceList([FromBody] PageRequest request)
{
var res = _invokeService.GetClientListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditCodeService")]
public DataResult EditCodeService([FromBody] CodeServiceReq model)
{
var res = _invokeService.EditClientCodeService(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCodeServiceInfo")]
public DataResult<CodeServiceRes> GetCodeServiceInfo([FromQuery] string id)
{
var res = _invokeService.GetClientCodeServiceInfo(id);
return res;
}
/// <summary>
/// 获取运输条款列表-基础库
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetBasicsCodeServiceList")]
public DataResult<List<CodeServiceRes>> GetBasicsCodeServiceList([FromBody] PageRequest request)
{
var res = _invokeService.GetCodeServiceList(request);
return res;
}
/// <summary>
/// 导入运输条款类型-基础库
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("ImportCodeService")]
public DataResult ImportCodeService([FromBody] IdModel req)
{
var res = _invokeService.ImportCodeService(req);
return res;
}
/// <summary>
/// 获取当前租户已有的运输条款
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetExistCodeServiceList")]
public DataResult<List<string>> GetExistCodeServiceList()
{
var res = _invokeService.GetExistCodeServiceList();
return res;
}
}

@ -223,6 +223,50 @@ public class CommonController : ApiController
return res; return res;
} }
/// <summary> /// <summary>
/// 获取付费方式下拉列表-客户端
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetClientFrtSelectList")]
public DataResult<List<CodeFrtSelectRes>> GetClientFrtSelectList()
{
var res = _invokeService.GetClientFrtSelectList();
return res;
}
/// <summary>
/// 获取结算方式下拉列表-客户端
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetClientStlModeSelectList")]
public DataResult<List<CodeStlModeSelectRes>> GetClientStlModeSelectList()
{
var res = _invokeService.GetClientStlModeSelectList();
return res;
}
/// <summary>
/// 获取业务来源下拉列表-客户端
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetClientSourceSelectList")]
public DataResult<List<CodeSourceSelectRes>> GetClientSourceSelectList()
{
var res = _invokeService.GetClientSourceSelectList();
return res;
}
/// <summary>
/// 获取业务来源明细下拉列表-客户端
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetClientSourceDetailSelectList")]
public DataResult<List<CodeSourceDetailSelectRes>> GetClientSourceDetailSelectList([FromQuery] string id)
{
var res = _invokeService.GetClientSourceDetailSelectList(id);
return res;
}
/// <summary>
/// 修改密码 /// 修改密码
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>

@ -852,3 +852,66 @@
2024-03-12 17:23:44.4645 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-12 17:23:44.4645 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-12 17:23:44.4834 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-03-12 17:23:44.4834 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-12 17:23:44.5366 Info Configuration initialized. 2024-03-12 17:23:44.5366 Info Configuration initialized.
2024-03-20 10:37:25.1210 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 10:37:25.1774 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 10:37:25.2210 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 10:37:25.2582 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-20 10:37:25.3190 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-20 10:37:25.3443 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 10:37:25.4156 Info Configuration initialized.
2024-03-20 11:01:01.9675 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:01:01.9922 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:01:02.0094 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:01:02.0348 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-20 11:01:02.0592 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-20 11:01:02.0691 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:01:02.0935 Info Configuration initialized.
2024-03-20 11:01:50.2035 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:01:50.2310 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:01:50.2506 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:01:50.2690 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-20 11:01:50.2940 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-20 11:01:50.3041 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:01:50.3241 Info Configuration initialized.
2024-03-20 11:04:42.4079 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:04:42.4259 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:04:42.4357 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:04:42.4357 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-20 11:04:42.4632 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-20 11:04:42.4707 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:04:42.4873 Info Configuration initialized.
2024-03-20 11:06:55.5478 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:06:55.5796 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:06:55.6021 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:06:55.6200 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-20 11:06:55.6467 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-20 11:06:55.6600 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:06:55.6896 Info Configuration initialized.
2024-03-20 11:45:26.2534 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:45:26.2706 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:45:26.2901 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:45:26.3092 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-20 11:45:26.3361 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-20 11:45:26.3463 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:45:26.3670 Info Configuration initialized.
2024-03-20 11:49:20.6178 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:49:20.6349 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:49:20.6487 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:49:20.6637 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-20 11:49:20.6817 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-20 11:49:20.6898 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:49:20.7081 Info Configuration initialized.
2024-03-20 11:50:28.9010 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:50:28.9312 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:50:28.9515 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:50:28.9719 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-20 11:50:28.9970 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-20 11:50:29.0107 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:50:29.0548 Info Configuration initialized.
2024-03-20 11:57:03.1428 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-03-20 11:57:03.1724 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-03-20 11:57:03.1893 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-03-20 11:57:03.2253 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-20 11:57:03.2639 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-20 11:57:03.2639 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-03-20 11:57:03.3249 Info Configuration initialized.

@ -27,7 +27,7 @@ public class SaasTest
{ {
Type[] types= Assembly Type[] types= Assembly
.LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
.GetTypes().Where(it=>it.FullName.Contains("DS.WMS.Core.Code.Entity.")||it.FullName.Contains("DS.WMS.Core.Info.Entity."))//命名空间过滤,当然你也可以写其他条件过滤 .GetTypes().Where(it=>it.FullName.Contains("DS.WMS.Core.Code.Entity.")||it.FullName.Contains("DS.WMS.Core.Info.Entity.")||it.FullName.Contains("DS.WMS.Core.Sea.Entity."))//命名空间过滤,当然你也可以写其他条件过滤
.ToArray(); .ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
// var temp = tenantDb.CodeFirst.GetDifferenceTables(types); // var temp = tenantDb.CodeFirst.GetDifferenceTables(types);

Loading…
Cancel
Save