|
|
|
@ -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();
|
|
|
|
|