master
zxxxf 5 months ago
parent 74abb009be
commit 37ee0fafa6

@ -872,6 +872,8 @@ namespace EntrustSettle.Api.Controllers
[HttpPost]
public async Task<MessageModel> ApplyInvoice(ApplyInvoiceDto input)
{
new ApplyInvoiceValidator().ValidateAndThrow(input);
if (input.OrderIdList?.Any() != true)
{
throw new Exception("申请列表为空");

@ -51,7 +51,11 @@ namespace EntrustSettle.Model.Validator
public ApplyInvoiceValidator()
{
RuleFor(x => x.CompanyName).NotNull().NotEmpty().WithMessage("公司全称不能为空");
//RuleFor(x=>x.)
RuleFor(x => x.Address).NotNull().NotEmpty().WithMessage("地址不能为空");
RuleFor(x => x.TaxCode).NotNull().NotEmpty().WithMessage("税号不能为空");
RuleFor(x => x.Tel).NotNull().NotEmpty().WithMessage("电话不能为空");
RuleFor(x => x.Bank).NotNull().NotEmpty().WithMessage("开户行不能为空");
RuleFor(x => x.BankAccount).NotNull().NotEmpty().WithMessage("银行账户不能为空");
}
}
}
Loading…
Cancel
Save