zhangxiaofeng 3 months ago
commit d4f4d85be4

@ -680,6 +680,9 @@ public static class MultiLanguageConst
[Description("未配置开票API请求地址请联系管理员")]
public const string InvoiceAPIUrlNull = "Invoice_API_Url_Null";
[Description("开票信息不完整,请检查每张发票是否添加了费用明细")]
public const string InvoiceIncomplete = "Invoice_Incomplete";
#endregion
#region 预订舱API

@ -6,6 +6,8 @@ using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using Microsoft.Extensions.DependencyInjection;
namespace DS.WMS.Core.Application.Method
@ -22,6 +24,7 @@ namespace DS.WMS.Core.Application.Method
public abstract TaskBaseTypeEnum AuditType { get; }
readonly IClientFlowInstanceService flowService;
readonly ITaskService taskService;
/// <summary>
/// 初始化
@ -30,6 +33,7 @@ namespace DS.WMS.Core.Application.Method
public ApplicationAuditService(IServiceProvider serviceProvider) : base(serviceProvider)
{
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
taskService = serviceProvider.GetRequiredService<ITaskService>();
}
/// <summary>
@ -69,23 +73,41 @@ namespace DS.WMS.Core.Application.Method
if (!result.Succeeded)
return result;
var flows = await flowService.GetInstanceByBSIdAsync(AuditType, null, request.Ids);
if (flows.Count != request.Ids.Length)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FlowNotFound));
List<string> list = [];
foreach (var item in flows)
bool hasAuthorized = await taskService.HasAuthorizedAsync();
if (hasAuthorized)
{
result = flowService.AuditFlowInstance(new FlowAuditInfo
result = await taskService.AuditAsync(new TaskAuditRequest
{
Instance = item,
Status = request.Result,
AuditNote = request.Remark
Ids = request.Ids,
Remark = request.Remark,
Result = request.Result,
TaskTypeName = AuditType.ToString()
});
if (!result.Succeeded)
return result;
}
else
{
var flows = await flowService.GetInstanceByBSIdAsync(AuditType, null, request.Ids);
if (flows.Count != request.Ids.Length)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FlowNotFound));
List<string> list = [];
foreach (var item in flows)
{
result = flowService.AuditFlowInstance(new FlowAuditInfo
{
Instance = item,
Status = request.Result,
AuditNote = request.Remark
});
if (!result.Succeeded)
return result;
}
}
return DataResult.Success;
}

@ -22,9 +22,14 @@ namespace DS.WMS.Core.Application.Method
/// 申请单基础实现
/// </summary>
/// <typeparam name="TEntity">实体的类型声明</typeparam>
public class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
public abstract class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
where TEntity : ApplicationForm, new()
{
/// <summary>
/// 适用于当前申请单的审核类型
/// </summary>
public abstract TaskBaseTypeEnum AuditType { get; }
readonly IClientFlowInstanceService flowService;
readonly Lazy<ICommonService> commonService;
readonly ITaskService taskService;
@ -411,7 +416,7 @@ namespace DS.WMS.Core.Application.Method
if (!result.Succeeded)
return result;
List<TEntity> entities = new List<TEntity>(idArray.Length);
List<TEntity> entities = new(idArray.Length);
bool hasAuthorized = await taskService.HasAuthorizedAsync();
await TenantDb.Ado.BeginTranAsync();
try
@ -515,15 +520,32 @@ namespace DS.WMS.Core.Application.Method
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
DataResult result;
bool hasAuthorized = await taskService.HasAuthorizedAsync();
try
{
result = await flowService.WithdrawAsync(ids);
if (!result.Succeeded)
return result;
if (hasAuthorized)
{
foreach (var item in list)
{
result = await taskService.WithdrawAsync(new TaskRequest
{
BusinessId = item.Id,
TaskTypeName = AuditType.ToString()
}, false);
foreach (var item in list)
OnWithdraw(item);
}
}
else
{
OnWithdraw(item);
result = await flowService.WithdrawAsync(ids);
if (!result.Succeeded)
return result;
foreach (var item in list)
{
OnWithdraw(item);
}
}
await TenantDb.Updateable(list).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();

@ -19,6 +19,8 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
public class InvoiceApplicationService : ApplicationService<InvoiceApplication>, IInvoiceApplicationService
{
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_INVOICE_AUDIT;
/// <summary>
/// 初始化
/// </summary>

@ -19,6 +19,8 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
public class PaymentApplicationService : ApplicationService<PaymentApplication>, IPaymentApplicationService
{
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_PAYMENT_AUDIT;
/// <summary>
/// 初始化
/// </summary>

@ -40,7 +40,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
public string? CustomerType { get; set; }
/// <summary>
/// 名称

@ -41,7 +41,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
public string? CustomerType { get; set; }
/// <summary>
/// 费用Id

@ -60,27 +60,28 @@ namespace DS.WMS.Core.Fee.Method
{
x.Id,
x.Condition,
Details = SqlFunc.Subqueryable<FeeCustTemplateDetail>().Where(y => y.TemplateId == x.Id).ToList(y => new
{
y.CustomerId,
y.CustomerName,
y.CustomerType,
y.FeeId,
y.FeeCode,
y.FeeName,
y.FeeType,
y.Unit,
y.IsCtn,
y.Currency,
y.UnitPrice,
y.ExchangeRate,
y.TaxRate,
y.AccTaxRate,
y.Tax,
y.TaxUnitPrice,
y.IsInvoice,
y.IsAdvancedPay
})
Details = SqlFunc.Subqueryable<FeeCustTemplateDetail>().Where(y =>
y.TemplateId == x.Id && y.CustomerId == order.CustomerId).ToList(y => new
{
y.CustomerId,
y.CustomerName,
y.CustomerType,
y.FeeId,
y.FeeCode,
y.FeeName,
y.FeeType,
y.Unit,
y.IsCtn,
y.Currency,
y.UnitPrice,
y.ExchangeRate,
y.TaxRate,
y.AccTaxRate,
y.Tax,
y.TaxUnitPrice,
y.IsInvoice,
y.IsAdvancedPay
})
}).ToListAsync();
if (list.Count == 0)
@ -176,8 +177,10 @@ namespace DS.WMS.Core.Fee.Method
/// <returns></returns>
public async Task<DataResult<FeeCustTemplate>> GetAsync(long id)
{
var data = await TenantDb.Queryable<FeeCustTemplate>().Where(x => x.Id == id)
.Includes(x => x.Details).FirstAsync();
var data = await TenantDb.Queryable<FeeCustTemplate>().Where(x => x.Id == id).FirstAsync();
if (data != null)
data.Details = await TenantDb.Queryable<FeeCustTemplateDetail>().Where(x => x.TemplateId == data.Id).ToListAsync();
return DataResult<FeeCustTemplate>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
@ -207,19 +210,30 @@ namespace DS.WMS.Core.Fee.Method
}
}
bool flag;
if (model.Id == 0)
await TenantDb.Ado.BeginTranAsync();
try
{
flag = await TenantDb.InsertNav(model).Include(x => x.Details).ExecuteCommandAsync();
if (model.Id == 0)
{
await TenantDb.InsertNav(model).Include(x => x.Details).ExecuteCommandAsync();
}
else
{
await TenantDb.Updateable(model).ExecuteCommandAsync();
if (model.Details.Count > 0)
await TenantDb.Storageable(model.Details).DefaultAddElseUpdate().ExecuteCommandAsync();
}
await TenantDb.Ado.CommitTranAsync();
return DataResult.Successed("提交成功", model.Id, MultiLanguageConst.DataCreateSuccess);
}
else
catch (Exception ex)
{
flag = await TenantDb.Updateable(model).ExecuteCommandAsync() > 0;
flag = await TenantDb.Storageable(model.Details).DefaultAddElseUpdate().ExecuteCommandAsync() > 0;
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
return flag ? DataResult.Successed("添加成功!", model.Id, MultiLanguageConst.DataCreateSuccess)
: DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
}
/// <summary>

@ -26,7 +26,7 @@ namespace DS.WMS.Core.Invoice.Method
BaseUri = new Uri(config.GetValue<string>("InvoiceApi:BaseUrl"));
UserKey = config.GetValue<string>("InvoiceApi:UserKey");
string? us = config.GetValue<string>("InvoiceApi:UserSecret");
var us = config.GetValue<string>("InvoiceApi:UserSecret");
if (!us.IsNullOrEmpty())
{
UserSecret = new SecureString();

@ -3,6 +3,7 @@ using DS.WMS.Core.Application.Method;
using DS.WMS.Core.Invoice.Dtos;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
namespace DS.WMS.Core.Invoice.Method
{
@ -26,52 +27,59 @@ namespace DS.WMS.Core.Invoice.Method
/// <summary>
/// 发起开票请求
/// </summary>
/// <param name="invoices">开票的发票信息</param>
/// <param name="ids">开票的发票ID</param>
/// <returns></returns>
public async Task<DataResult<string>> InitiateAsync(params Entity.Invoice[] invoices)
public async Task<DataResult<string>> InitiateAsync(params long[] ids)
{
ArgumentNullException.ThrowIfNull(ids, nameof(ids));
//请求参数设置
InvoiceIssuanceRequest request = new();
request.order = invoices.Select(x => new InvoiceInfo
InvoiceIssuanceRequest request = new()
{
invoiceType = ((int)x.Type).ToString(),
orderNo = x.BillNO,
email = x.Email,
buyerTaxNum = x.TaxID,
buyerName = x.InvoiceHeader,
buyerAddress = x.CustomerAddress,
buyerTel = x.CustomerPhone,
gmfkhh = x.CustomerBankName,
gmfzh = x.CustomerAccount,
skyhmc = x.BankName,
skyhzh = x.Account,
checker = x.Checker,
payee = x.Payee,
//---------金额项---------
hjse = x.InvoiceAmount * x.TaxRate,
hjje = x.InvoiceAmount - x.InvoiceAmount * x.TaxRate,
jshj = x.InvoiceAmount,
clerk = x.CreateUserName, //开票人
kprzjhm = "", //证件号
kprzjlx = "201", //身份证,
//---------发票明细---------
invoiceDetail = x.InvoiceDetails.Select(y => new InvoiceDetailInfo
order = await TenantDb.Queryable<Entity.Invoice>().Where(x => ids.Contains(x.Id)).Select(x => new InvoiceInfo
{
mxxh = x.InvoiceDetails.IndexOf(y) + 1,
xmmc = y.Name,
spfwjc = string.Empty,
specType = y.Specification,
unit = y.Unit,
num = y.Quantity.ToString(),
taxExcludedAmount = y.UnitPrice,
taxRate = y.TaxRate.ToString(),
tax = y.TaxAmount,
taxIncludedAmount = y.TaxUnitPrice,
goodsCode = "", //商品和服务税收分类合并编码
invoiceLineProperty = "00"
}).ToList()
invoiceType = ((int)x.Type).ToString(),
orderNo = x.BillNO,
email = x.Email,
buyerTaxNum = x.TaxID,
buyerName = x.InvoiceHeader,
buyerAddress = x.CustomerAddress,
buyerTel = x.CustomerPhone,
gmfkhh = x.CustomerBankName,
gmfzh = x.CustomerAccount,
skyhmc = x.BankName,
skyhzh = x.Account,
checker = x.Checker,
payee = x.Payee,
//---------金额项---------
hjse = x.InvoiceAmount * x.TaxRate,
hjje = x.InvoiceAmount - x.InvoiceAmount * x.TaxRate,
jshj = x.InvoiceAmount,
clerk = x.CreateUserName, //开票人
kprzjhm = "", //证件号
kprzjlx = "201", //身份证,
//---------发票明细---------
invoiceDetail = x.InvoiceDetails.Select(y => new InvoiceDetailInfo
{
mxxh = SqlFunc.RowNumber(y.Id), //x.InvoiceDetails.IndexOf(y) + 1,
xmmc = y.Name,
spfwjc = string.Empty,
specType = y.Specification,
unit = y.Unit,
num = y.Quantity.ToString(),
taxExcludedAmount = y.UnitPrice,
taxRate = y.TaxRate.ToString(),
tax = y.TaxAmount,
taxIncludedAmount = y.TaxUnitPrice,
goodsCode = "", //商品和服务税收分类合并编码
invoiceLineProperty = "00"
}).ToList()
}).ToListAsync()
};
}).ToList();
if (request.order.Count == 0 || request.order.Any(x => x.invoiceDetail.Count == 0))
return DataResult<string>.FailedWithDesc(MultiLanguageConst.InvoiceIncomplete);
var result = await api.PostAsync<InvoiceIssuanceResult<string>>("/api/Invoice/services", request);
if (!result.Succeeded)
@ -80,14 +88,12 @@ namespace DS.WMS.Core.Invoice.Method
var invResult = result.Data;
if (invResult.Success)
{
return DataResult<string>.Success(invResult.Data);
}
else
{
if (invResult.Code == 1)
return await InitiateAsync(invoices);
return await InitiateAsync(ids);
return DataResult<string>.Failed(invResult.Message);
}

@ -167,7 +167,7 @@ namespace DS.WMS.Core.Invoice.Method
#pragma warning disable CS4014
/// <summary>
/// 提交发票开票
/// 提交
/// </summary>
/// <param name="request">请求参数</param>
/// <returns></returns>

@ -32,5 +32,15 @@ namespace DS.WMS.Core.Op.Dtos
/// </summary>
public BookingGenerateDto generateModel { get; set; }
/// <summary>
/// 海运订舱详情
/// </summary>
public SeaExportRes orderInfo { get; set; }
/// <summary>
/// 是否订单引入
/// </summary>
public bool isOrderImport { get; set; }
}
}

@ -1455,7 +1455,7 @@ public class SeaExportRes
public int SplitOrMergeFlag { get; set; }
/// <summary>
/// 服务项目
///
/// </summary>
public string? ServiceItem { get; set; }
public long OrgId { get; set; }
}

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
namespace DS.WMS.Core.Op.Interface.TaskInteraction
@ -9,6 +10,15 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction
/// </summary>
public interface ITaskMailService
{
/// <summary>
/// 渲染模板
/// </summary>
/// <param name="docType">单据类型</param>
/// <param name="bsId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
Task<DataResult<string>> RenderTemplateAsync(DocumentType docType, long bsId, BusinessType businessType);
/// <summary>
/// 获取分页列表
/// </summary>

@ -56,6 +56,7 @@ using DS.WMS.Core.TaskPlat.Entity;
using Microsoft.VisualBasic.FileIO;
using Microsoft.Extensions.Logging;
using AnyDiff.Extensions;
using DS.WMS.Core.Sys.Entity;
namespace DS.WMS.Core.Op.Method
{
@ -2678,6 +2679,40 @@ namespace DS.WMS.Core.Op.Method
var slotIdList = model.slots.Select(s => s.Id).ToList();
List<BookingSlotBase> latestSlotList = tenantDb.Queryable<BookingSlotBase>().Where(b => slotIdList.Contains(b.Id)).ToList();
//(订单引入现舱时)需要对订单数据进行比对(约号、启运港、目的港、船名航次和现舱的上述信息做比对,如果不一致终止并提示)
if (model.isOrderImport)
{
if (model.orderInfo == null)
{
return DataResult<string>.FailedData("当前引入现舱时,无法获取订单信息");
}
//比约号
if (!string.IsNullOrWhiteSpace(model.orderInfo.ContractNo) && latestSlotList.Any(a => !string.IsNullOrWhiteSpace(a.ContractNo) && !a.ContractNo.Equals(model.orderInfo.ContractNo)))
{
return DataResult<string>.FailedData($"引入校验失败,订单约号【{model.orderInfo.ContractNo}】 与舱位约号【{latestSlotList.FirstOrDefault(a => !string.IsNullOrWhiteSpace(a.ContractNo)).ContractNo}】 不一致");
}
//船名航次
if (!string.IsNullOrWhiteSpace(model.orderInfo.Vessel) && !string.IsNullOrWhiteSpace(model.orderInfo.Voyno) && latestSlotList.Any(a => $"{a.Vessel?.Trim()}/{a.Voyno?.Trim()}".Equals($"{model.orderInfo.Vessel?.Trim()}/{model.orderInfo.Voyno?.Trim()}")))
{
return DataResult<string>.FailedData($"引入校验失败,船名航次【{model.orderInfo.Vessel?.Trim()}/{model.orderInfo.Voyno?.Trim()}】 与舱位船名航次【{latestSlotList.FirstOrDefault().Vessel?.Trim()}/{latestSlotList.FirstOrDefault().Voyno?.Trim()}】 不一致");
}
//比对装货港
if (model.orderInfo.LoadPortId > 0 && latestSlotList.Any(a => a.PortLoadId.HasValue && a.PortLoadId.Value != model.orderInfo.LoadPortId))
{
return DataResult<string>.FailedData($"引入校验失败,订单装货港【{model.orderInfo.LoadPort}】 与舱位装货港【{latestSlotList.FirstOrDefault(a=>a.PortLoadId.HasValue).PortLoad}】 不一致");
}
//比对卸货港
if (model.orderInfo.DischargePortId > 0 && latestSlotList.Any(a => a.PortDischargeId.HasValue && a.PortDischargeId.Value != model.orderInfo.DischargePortId))
{
return DataResult<string>.FailedData($"引入校验失败,订单卸货港【{model.orderInfo.DischargePort}】 与舱位卸货港【{latestSlotList.FirstOrDefault(a => a.PortDischargeId.HasValue).PortDischarge}】 不一致");
}
}
foreach (var inSlotItem in model.slots)
{
var latestSlot = latestSlotList.First(b => b.Id == inSlotItem.Id);
@ -2778,6 +2813,8 @@ namespace DS.WMS.Core.Op.Method
file.LinkId = model.bookingOrderId;
tenantDb.Insertable<OpFile>(file).ExecuteCommand();
}
//推送计算舱位库存
_bookingSlotStockService.BookingSlotStock(new BookingSlotStockUpdateModel
{
BookingSlotType = latestSlot.BookingSlotType,
@ -4280,6 +4317,7 @@ namespace DS.WMS.Core.Op.Method
1
2
*/
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (model.seaExportId == 0)
{
@ -4320,13 +4358,97 @@ namespace DS.WMS.Core.Op.Method
generateDto.NewSubBlNo = orderInfo.HBLNO;
}
/*
1
2
3BC
4
5SHIPPER
*/
var slotId = model.slots.FirstOrDefault().Id;
var useToList = tenantDb.Queryable<BookingSlotUseTo>().Where(a => a.SlotId == slotId).ToList();
if (useToList.Count > 0)
{
//ASSIGN_FORWARDER-指定货
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.ASSIGN_FORWARDER.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.ASSIGN_FORWARDER.ToString(), StringComparison.OrdinalIgnoreCase));
if (orderInfo.AgentId.HasValue && !currUseTo.UseToVal.Equals(orderInfo.AgentId.Value.ToString()))
{
throw new Exception($"舱位用途验证失败,指定货【{currUseTo.UseToValShow}】与订单的国外代理【{orderInfo.Agent}】不一致");
}
}
//GUEST_ONLY-专属客户
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.GUEST_ONLY.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.GUEST_ONLY.ToString(), StringComparison.OrdinalIgnoreCase));
if (orderInfo.CustomerId > 0 && !currUseTo.UseToVal.Equals(orderInfo.CustomerId.ToString()))
{
throw new Exception($"舱位用途验证失败,专属客户【{currUseTo.UseToValShow}】与订单的委托单位【{orderInfo.CustomerName}】不一致");
}
}
//SALEER_ONLY-专属销售
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.SALEER_ONLY.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.SALEER_ONLY.ToString(), StringComparison.OrdinalIgnoreCase));
if (orderInfo.SaleId > 0 && !currUseTo.UseToVal.Equals(orderInfo.SaleId.ToString()))
{
throw new Exception($"舱位用途验证失败,专属销售【{currUseTo.UseToValShow}】与订单的揽货人【{orderInfo.Sale}】不一致");
}
}
//COMPANY_ONLY-专属公司
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.COMPANY_ONLY.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.COMPANY_ONLY.ToString(), StringComparison.OrdinalIgnoreCase));
if (orderInfo.OrgId > 0 && !currUseTo.UseToVal.Equals(orderInfo.OrgId.ToString()))
{
long useToVal = long.Parse(currUseTo.UseToVal);
var origList = db.Queryable<SysOrg>().Where(a => a.Status == StatusEnum.Enable && (orderInfo.OrgId == a.Id || useToVal == a.Id)).ToList();
throw new Exception($"舱位用途验证失败,专属公司【{origList.FirstOrDefault(a=>a.Id == useToVal)?.OrgName}】与订单的揽货人【{origList.FirstOrDefault(a=>a.Id == orderInfo.OrgId)?.OrgName}】不一致");
}
}
//GOODS-品名大类
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.GOODS.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.GOODS.ToString(), StringComparison.OrdinalIgnoreCase));
if (orderInfo.GoodsId > 0 && !currUseTo.UseToVal.Equals(orderInfo.GoodsId.ToString()))
{
throw new Exception($"舱位用途验证失败,品名大类【{currUseTo.UseToValShow}】与订单的品名【{orderInfo.GoodsName}】不一致");
}
}
//HSCODE-品名大类
if (useToList.Any(b => b.UseTo.Equals(BookingSlotUseToEnum.HSCODE.ToString(), StringComparison.OrdinalIgnoreCase)))
{
var currUseTo = useToList.FirstOrDefault(b => b.UseTo.Equals(BookingSlotUseToEnum.HSCODE.ToString(), StringComparison.OrdinalIgnoreCase));
if (!currUseTo.UseToVal.Equals(orderInfo.HSCode))
{
throw new Exception($"舱位用途验证失败HSCODE【{currUseTo.UseToValShow}】与订单的HSCODE【{orderInfo.HSCode}】不一致");
}
}
}
return await ImportSlots(new ImportSlotsDto
{
slots = model.slots,
isCheck = false,
bookingOrderId = model.seaExportId,
generateModel = generateDto
generateModel = generateDto,
orderInfo = orderInfo,
isOrderImport = true
});
}
#endregion

@ -41,7 +41,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
Db.QueryFilter.Clear<ITenantId>();
}
static async Task<string> RenderTemplateAsync(string name, string templateText, object model, IRazorEngine? razorEngine = null)
internal static async Task<string> RenderTemplateAsync(string name, string templateText, object model, IRazorEngine? razorEngine = null)
{
int hashCode = name.GetHashCode();

@ -1,8 +1,10 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using Microsoft.Extensions.DependencyInjection;
namespace DS.WMS.Core.Op.Method.TaskInteraction
{
@ -11,12 +13,41 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// </summary>
public class TaskMailService : ServiceBase, ITaskMailService
{
Lazy<IActionManagerService> actionService;
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public TaskMailService(IServiceProvider provider) : base(provider)
{
actionService = new Lazy<IActionManagerService>(provider.GetRequiredService<IActionManagerService>());
}
/// <summary>
/// 渲染模板
/// </summary>
/// <param name="docType">单据类型</param>
/// <param name="bsId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
public async Task<DataResult<string>> RenderTemplateAsync(DocumentType docType, long bsId, BusinessType businessType)
{
var taskMail = await TenantDb.Queryable<BusinessTaskMail>()
.Where(x => x.DocumentType == docType).OrderByDescending(x => x.CreateTime).FirstAsync();
if (taskMail == null)
return DataResult<string>.FailedWithDesc(MultiLanguageConst.EmptyData);
if (string.IsNullOrEmpty(taskMail.Content))
return DataResult<string>.Success(taskMail.Content);
var order = await actionService.Value.GetBusinessDataAsync(bsId, businessType);
if (order == null)
return DataResult<string>.FailedWithDesc(MultiLanguageConst.EmptyData);
var model = new MailTemplateModel { Primary = order };
string content = await MailService.RenderTemplateAsync(docType.ToString(), taskMail.Content, model);
return DataResult<string>.Success(content);
}
/// <summary>

@ -1,9 +0,0 @@
using RazorEngineCore;
namespace DS.WMS.Core.Op.Method.TaskInteraction
{
internal class TemplateTranslator
{
}
}

@ -0,0 +1,66 @@
@* @model DS.WMS.Core.Op.Entity.MailTemplateModel<DS.WMS.Core.TaskPlat.Dtos.TaskPOLContainerNotPickUpShowDto> *@
@{
var item = Model.Primary;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title class="head-title">邮件模板</title>
</head>
<body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#EDF9F5" style="font-size: 12px;font-family: Arial;">
<tr>
<td height="30"></td>
</tr>
<tr>
<td>
<table class="out-table" border="0" cellpadding="8" cellspacing="0" width="800" bgcolor="#FFFFFF" align="center" style="font-size: 12px;font-family: Arial;">
<tr>
<td>
<p>尊敬的客户,</p>
</td>
</tr>
<tr>
<td>
<table class="base-table" border="1" cellpadding="8" cellspacing="0" width="100%" align="center" style="border-collapse: collapse;border-color: #ebeef5;font-size: 12px;font-family: Arial;">
<tr>
<td class="billno-label" width="120px;">船名/航次:</td>
<td class="billno-val">@item.Vessel/@item.Voyno</td>
</tr>
<tr>
<td class="billno-label" width="120px;">定舱号码:</td>
<td class="billno-val">@item.MBlNo</td>
</tr>
</table>
</td>
</tr>
<tr class="email-noreply">
<td>
<p class="dynamic-val"></p>
<p class="notice1-val">以上是贵司还未提柜记录的定舱现已接近截箱时间请参考如下信息操作否则您的订舱将在CY cut-off deadline取消</p>
<p class="notice1-val">A. 推下一航次,请&lt;在CY&nbsp;Closing&nbsp;-&nbsp;1&nbsp;天之前&gt;提交更改</p>
<p class="notice1-val">B. <font style="color: #4051f0; font-weight: 500;">已提柜,且于马士基网站未查询到柜号,<font style="background-color: #f1de2f; font-weight: 500;">请立即联系 @Model.Sender.DisplayName邮箱 @Model.Sender.MailAddress电话 @Model.Sender.Phone</font></font>告知柜号。若网站已有完整柜号且确认正常出运,请自行安排,无需再回复邮件,<font style="color: #f70f0f; font-weight: 500;">目前Maersk不接受未提供明确柜号而保留订舱的要求。</font></p>
<p class="notice1-val">
鉴于船舶配载方面的要求Maersk将在配载前将所有没有提柜记录以Maersk EDI记录为准的定舱视为无效定舱,并统一在取消,因此,<font style="background-color: #5bcef1; font-weight: 500;">友情提醒:请尽快提柜并告知柜号,以免产生不必要的工作和费用。</font>
如果上方的单号需要取消订舱, 或已经提交过取消操作, 无需回复邮件。
如有任何疑问,欢迎垂询我司操作。
</p>
<p class="notice2-val"><font style="color: #4051f0; font-weight: 500;">请不要回复此邮箱(自动发送邮箱无人处理邮件),如有疑问,</font><font style="background-color: #f1de2f; font-weight: 500;">请联系 @Model.Sender.DisplayName邮箱 @Model.Sender.MailAddress电话 @Model.Sender.Phone谢谢</font></p>
<p>顺祝</p>
<p>商祺</p>
<p class="notice-comp-val">@item.TenantCompanyName</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

@ -0,0 +1,66 @@
@* @model DS.WMS.Core.Op.Entity.MailTemplateModel<DS.WMS.Core.TaskPlat.Dtos.TaskPOLContainerNotPickUpShowDto> *@
@{
var item = Model.Primary;
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title class="head-title">邮件模板</title>
</head>
<body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#EDF9F5" style="font-size: 12px;font-family: Arial;">
<tr>
<td height="30"></td>
</tr>
<tr>
<td>
<table class="out-table" border="0" cellpadding="8" cellspacing="0" width="800" bgcolor="#FFFFFF" align="center" style="font-size: 12px;font-family: Arial;">
<tr>
<td>
<p>尊敬的客户,</p>
</td>
</tr>
<tr>
<td>
<table class="base-table" border="1" cellpadding="8" cellspacing="0" width="100%" align="center" style="border-collapse: collapse;border-color: #ebeef5;font-size: 12px;font-family: Arial;">
<tr>
<td class="billno-label" width="120px;">船名/航次:</td>
<td class="billno-val">@item.Vessel/@item.Voyno</td>
</tr>
<tr>
<td class="billno-label" width="120px;">定舱号码:</td>
<td class="billno-val">@item.MBlNo</td>
</tr>
</table>
</td>
</tr>
<tr class="email-noreply">
<td>
<p class="dynamic-val"></p>
<p class="notice1-val">以上是贵司还未提柜记录的定舱现已接近截箱时间请参考如下信息操作否则您的订舱将在CY cut-off deadline取消</p>
<p class="notice1-val">A. 推下一航次,请&lt;在CY&nbsp;Closing&nbsp;-&nbsp;1&nbsp;天之前&gt;提交更改</p>
<p class="notice1-val">B. <font style="color: #4051f0; font-weight: 500;">已提柜,且于马士基网站未查询到柜号,<font style="background-color: #f1de2f; font-weight: 500;">请立即联系 @Model.Sender.DisplayName邮箱 @Model.Sender.MailAddress电话 @Model.Sender.Phone</font></font>告知柜号。若网站已有完整柜号且确认正常出运,请自行安排,无需再回复邮件,<font style="color: #f70f0f; font-weight: 500;">目前Maersk不接受未提供明确柜号而保留订舱的要求。</font></p>
<p class="notice1-val">
鉴于船舶配载方面的要求Maersk将在配载前将所有没有提柜记录以Maersk EDI记录为准的定舱视为无效定舱,并统一在取消,因此,<font style="background-color: #5bcef1; font-weight: 500;">友情提醒:请尽快提柜并告知柜号,以免产生不必要的工作和费用。</font>
如果上方的单号需要取消订舱, 或已经提交过取消操作, 无需回复邮件。
如有任何疑问,欢迎垂询我司操作。
</p>
<p class="notice2-val"><font style="color: #4051f0; font-weight: 500;">请不要回复此邮箱(自动发送邮箱无人处理邮件),如有疑问,</font><font style="background-color: #f1de2f; font-weight: 500;">请联系 @Model.Sender.DisplayName邮箱 @Model.Sender.MailAddress电话 @Model.Sender.Phone谢谢</font></p>
<p>顺祝</p>
<p>商祺</p>
<p class="notice-comp-val">@item.TenantCompanyName</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

@ -205,6 +205,12 @@ public class UserReq
/// 是否允许使用本系统
/// </summary>
public bool IsUseSystem { get; set; } = false;
/// <summary>
/// 身份证号
/// </summary>
[Description("身份证号")]
public string IdCardNo { get; set; }
}
/// <summary>

@ -222,4 +222,10 @@ public class UserViewModel
/// 是否允许使用本系统
/// </summary>
public bool IsUseSystem { get; set; } = false;
/// <summary>
/// 身份证号
/// </summary>
[Description("身份证号")]
public string IdCardNo { get; set; }
}

@ -239,5 +239,11 @@ public class SysUser : UserTenantModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "首页地址", Length = 255, IsNullable = true)]
public string? HomePath { get; set; }
/// <summary>
/// 身份证号
/// </summary>
[Description("身份证号")]
public string IdCardNo { get; set; }
}

@ -57,4 +57,13 @@ public interface IUserService
/// </summary>
/// <returns></returns>
public Task<DataResult<List<RouteItem>>> GetClientUserPermissions();
/// <summary>
/// 根据权限模块获取数据范围列表
/// </summary>
/// <param name="permissionId"></param>
/// <returns></returns>
public Task<DataResult<List<DataRuleRes>>> GetDataRuleListByPermission(string permissionId);
}

@ -400,22 +400,18 @@ public class UserService : IUserService
/// <summary>
/// 根据权限模块获取表单设置列表
/// 根据权限模块获取数据范围列表
/// </summary>
/// <param name="permissionId"></param>
/// <returns></returns>
public async Task<DataResult<DataRuleRes>> GetDataRuleByUser(string permissionId)
public async Task<DataResult<List<DataRuleRes>>> GetDataRuleListByPermission(string permissionId)
{
var res = new DataRuleRes();
//var userId = long.Parse(user.UserId);
//var ruleUser = db.Queryable<SysRuleUser>().Where(x => x.UserId == userId && x.r).Select(n => n.UserId)
var data = await db.Queryable<SysDataRule>()
.Where(x => x.PermissionId == long.Parse(permissionId) && x.Status == StatusEnum.Enable)
.Select<DataRuleRes>()
.FirstAsync();
return await Task.FromResult(DataResult<DataRuleRes>.Success(data, MultiLanguageConst.DataQuerySuccess));
.ToListAsync();
return await Task.FromResult(DataResult<List<DataRuleRes>>.Success(data, MultiLanguageConst.DataQuerySuccess));
}
/// <summary>
/// 按Excel导入用户信息

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-09-03T08:41:23.7516960Z||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;</History>
<History>True|2024-09-04T02:07:38.3707398Z||;True|2024-09-04T09:52:47.0574599+08:00||;True|2024-09-03T16:41:23.7516960+08:00||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -110,4 +110,17 @@ public class UserController : ApiController
var res = await _invokeService.GetClientUserPermissions();
return res;
}
/// <summary>
/// 根据权限模块获取数据范围列表
/// </summary>
/// <param name="permissionId"></param>
/// <returns></returns>
[HttpGet]
[Route("GetDataRuleListByPermission")]
public async Task<DataResult<List<DataRuleRes>>> GetDataRuleListByPermission([FromQuery] string permissionId)
{
var res = await _invokeService.GetDataRuleListByPermission(permissionId);
return res;
}
}

@ -1,4 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Entity.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using Microsoft.AspNetCore.Mvc;
@ -21,6 +23,19 @@ namespace DS.WMS.OpApi.Controllers
this.service = service;
}
/// <summary>
/// 渲染模板
/// </summary>
/// <param name="docType">单据类型</param>
/// <param name="bsId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
[HttpGet, Route("RenderTemplate")]
public async Task<DataResult<string>> RenderTemplateAsync(DocumentType docType, long bsId, BusinessType businessType)
{
return await service.RenderTemplateAsync(docType, bsId, businessType);
}
/// <summary>
/// 获取分页列表
/// </summary>
@ -59,5 +74,16 @@ namespace DS.WMS.OpApi.Controllers
return await service.EditAsync(taskMail);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="idModel"></param>
/// <returns></returns>
[HttpPost, Route("Delete")]
public async Task<DataResult> DeleteAsync(IdModel idModel)
{
return await service.DeleteAsync(idModel);
}
}
}

Loading…
Cancel
Save