dengyu 1 week ago
commit d2edf31a56

@ -58,8 +58,8 @@ public class ClientBankService : ServiceBase, IClientBankService
{
if (req.Id == 0)
{
if (await TenantDb.Queryable<InfoClientBank>().Where(x => x.CodeName == req.CodeName).AnyAsync())
return DataResult.Failed("客户银行信息已存在!", MultiLanguageConst.ClientBankExist);
//if (await TenantDb.Queryable<InfoClientBank>().Where(x => x.CodeName == req.CodeName).AnyAsync())
// return DataResult.Failed("客户银行信息已存在!", MultiLanguageConst.ClientBankExist);
var data = req.Adapt<InfoClientBank>();
var entity = await TenantDb.InsertNav(data).Include(x => x.InvoiceHeaders).ExecuteReturnEntityAsync();

@ -926,7 +926,9 @@ public partial class SeaExportService : ISeaExportService
//{
// return DataResult.Failed(sequence.Message, MultiLanguageConst.SequenceSetNotExist);
//}
var edi = tenantDb.Queryable<SeaExportEdi>().First(x => x.BusinessId == long.Parse(id));
var data = new SeaExport();
if (template.IsNullOrEmpty())
{
@ -939,7 +941,13 @@ public partial class SeaExportService : ISeaExportService
data.BusinessStatusName = "";
data.CustomerNo = "";
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
if (edi.IsNotNull())
{
var ediEntity = edi.Adapt<SeaExportEdiRes>();
ediEntity.Id = 0;
ediEntity.BusinessId = entity.Id;
tenantDb.Insertable(ediEntity).ExecuteReturnEntity();
}
#region 初始化费用状态表
var feeStatus = BusinessFeeStatus.Init(entity.Id);
@ -971,6 +979,14 @@ public partial class SeaExportService : ISeaExportService
var insertColumns = list1.ToArray();
//insertColumns.AddRange(["Id", "ParentId", "IsBusinessLocking", "IsFeeLocking", "CustomerNo"]);
var entity = tenantDb.Insertable(data).InsertColumns(insertColumns).ExecuteReturnEntity();
if (edi.IsNotNull())
{
var ediEntity = edi.Adapt<SeaExportEdiRes>();
ediEntity.Id = 0;
ediEntity.BusinessId = entity.Id;
tenantDb.Insertable(ediEntity).ExecuteReturnEntity();
}
#region 初始化费用状态表
var feeStatus = BusinessFeeStatus.Init(entity.Id);
tenantDb.Insertable(feeStatus).ExecuteCommand();

Loading…
Cancel
Save