diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportRefundService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportRefundService.cs index 6aaaa16f..06f94a69 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportRefundService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportRefundService.cs @@ -387,15 +387,15 @@ namespace DS.WMS.Core.Op.Method var userList = new List(); if (req.OrderProgress =="2") //已出号未申报 发起退舱入池任务 推给当票商务 { - userList.Add(entity.LaneId); + userList.Add((long)entity.LanerId); var taskReq = new TaskCreationRequest() { - BusinessId = info.Id, + BusinessId = newKey, BusinessType = BusinessType.OceanShippingExport, TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN_POOL.ToString(), - TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}", - TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}", - RecvUserIdList = userList.ToArray() + TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}", + TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}", + RecvUserIdList = userList.ToArray(), }; var result = await taskService.CreateTaskAsync(taskReq, false); if (!result.Succeeded) @@ -423,7 +423,7 @@ namespace DS.WMS.Core.Op.Method #endregion await tenantDb.Ado.CommitTranAsync(); - return await Task.FromResult(DataResult.Successed("改配成功!")); + return await Task.FromResult(DataResult.Successed("发起改配成功!")); } catch (Exception ex) { @@ -516,7 +516,7 @@ namespace DS.WMS.Core.Op.Method var userList = new List(); if (info.OrderProgress =="2")//已出号未申报 发起退舱入池任务 推给当票商务 { - userList.Add(info.LaneId); + userList.Add((long)info.LaneId); var taskReq = new TaskCreationRequest() { BusinessId = info.Id, diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs index b26cebca..36b4ae79 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs @@ -1083,7 +1083,7 @@ public partial class SeaExportService : ISeaExportService /// /// 业务Id /// - public DataResult SeaExportDel(string id) + public async Task SeaExportDel(string id) { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var info = tenantDb.Queryable().Where(x => x.Id == long.Parse(id)).First(); @@ -1111,12 +1111,31 @@ public partial class SeaExportService : ISeaExportService return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock); } - info.Deleted = true; - info.DeleteTime = DateTime.Now; - info.DeleteBy = long.Parse(user.UserId); - tenantDb.Updateable(info).ExecuteCommand(); + //info.Deleted = true; + //info.DeleteTime = DateTime.Now; + //info.DeleteBy = long.Parse(user.UserId); + //tenantDb.Updateable(info).ExecuteCommand(); //tenantDb.Deleteable(info).IsLogic().ExecuteCommand("Deleted"); + + var ctns = await tenantDb.Queryable().Where(x => x.BSNO == id).ToListAsync(); + if (ctns.Count > 0) + await tenantDb.Deleteable(ctns).ExecuteCommandAsync(); + + var ctnPrices = await tenantDb.Queryable().Where(x => x.BusinessId == long.Parse(id)).ToListAsync(); + if (ctnPrices.Count > 0) + await tenantDb.Deleteable(ctnPrices).ExecuteCommandAsync(); + var ediInfo = await tenantDb.Queryable().Where(x => x.BusinessId == long.Parse(id)).FirstAsync(); + if (ediInfo.IsNotNull()) + await tenantDb.Deleteable(ediInfo).ExecuteCommandAsync(); + + var contacts = await tenantDb.Queryable().Where(x => x.BusinessId == long.Parse(id)).ToListAsync(); + if (contacts.Count > 0) + await tenantDb.Deleteable(contacts).ExecuteCommandAsync(); + + await + + return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); }