改配修改

dev
cjy 1 month ago
parent 42017e6a1b
commit e465dacee9

@ -387,15 +387,15 @@ namespace DS.WMS.Core.Op.Method
var userList = new List<long>(); var userList = new List<long>();
if (req.OrderProgress =="2") //已出号未申报 发起退舱入池任务 推给当票商务 if (req.OrderProgress =="2") //已出号未申报 发起退舱入池任务 推给当票商务
{ {
userList.Add(entity.LaneId); userList.Add((long)entity.LanerId);
var taskReq = new TaskCreationRequest() var taskReq = new TaskCreationRequest()
{ {
BusinessId = info.Id, BusinessId = newKey,
BusinessType = BusinessType.OceanShippingExport, BusinessType = BusinessType.OceanShippingExport,
TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN_POOL.ToString(), TaskTypeName = TaskBaseTypeEnum.RETURN_CABIN_POOL.ToString(),
TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}", TaskTitle = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}",
TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{info?.CustomerNo}", TaskDescription = $"【{TaskBaseTypeEnum.RETURN_CABIN_POOL.GetDescription()}】{entity?.CustomerNo}",
RecvUserIdList = userList.ToArray() RecvUserIdList = userList.ToArray(),
}; };
var result = await taskService.CreateTaskAsync(taskReq, false); var result = await taskService.CreateTaskAsync(taskReq, false);
if (!result.Succeeded) if (!result.Succeeded)
@ -423,7 +423,7 @@ namespace DS.WMS.Core.Op.Method
#endregion #endregion
await tenantDb.Ado.CommitTranAsync(); await tenantDb.Ado.CommitTranAsync();
return await Task.FromResult(DataResult.Successed("改配成功!")); return await Task.FromResult(DataResult.Successed("发起改配成功!"));
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -516,7 +516,7 @@ namespace DS.WMS.Core.Op.Method
var userList = new List<long>(); var userList = new List<long>();
if (info.OrderProgress =="2")//已出号未申报 发起退舱入池任务 推给当票商务 if (info.OrderProgress =="2")//已出号未申报 发起退舱入池任务 推给当票商务
{ {
userList.Add(info.LaneId); userList.Add((long)info.LaneId);
var taskReq = new TaskCreationRequest() var taskReq = new TaskCreationRequest()
{ {
BusinessId = info.Id, BusinessId = info.Id,

@ -1083,7 +1083,7 @@ public partial class SeaExportService : ISeaExportService
/// </summary> /// </summary>
/// <param name="id">业务Id</param> /// <param name="id">业务Id</param>
/// <returns></returns> /// <returns></returns>
public DataResult SeaExportDel(string id) public async Task<DataResult> SeaExportDel(string id)
{ {
var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var info = tenantDb.Queryable<SeaExport>().Where(x => x.Id == long.Parse(id)).First(); var info = tenantDb.Queryable<SeaExport>().Where(x => x.Id == long.Parse(id)).First();
@ -1111,12 +1111,31 @@ public partial class SeaExportService : ISeaExportService
return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock); return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock);
} }
info.Deleted = true; //info.Deleted = true;
info.DeleteTime = DateTime.Now; //info.DeleteTime = DateTime.Now;
info.DeleteBy = long.Parse(user.UserId); //info.DeleteBy = long.Parse(user.UserId);
tenantDb.Updateable(info).ExecuteCommand(); //tenantDb.Updateable(info).ExecuteCommand();
//tenantDb.Deleteable(info).IsLogic().ExecuteCommand("Deleted"); //tenantDb.Deleteable(info).IsLogic().ExecuteCommand("Deleted");
var ctns = await tenantDb.Queryable<OpCtn>().Where(x => x.BSNO == id).ToListAsync();
if (ctns.Count > 0)
await tenantDb.Deleteable(ctns).ExecuteCommandAsync();
var ctnPrices = await tenantDb.Queryable<BusinessCtnPrice>().Where(x => x.BusinessId == long.Parse(id)).ToListAsync();
if (ctnPrices.Count > 0)
await tenantDb.Deleteable(ctnPrices).ExecuteCommandAsync();
var ediInfo = await tenantDb.Queryable<SeaExportEdi>().Where(x => x.BusinessId == long.Parse(id)).FirstAsync();
if (ediInfo.IsNotNull())
await tenantDb.Deleteable(ediInfo).ExecuteCommandAsync();
var contacts = await tenantDb.Queryable<BusinessOrderContact>().Where(x => x.BusinessId == long.Parse(id)).ToListAsync();
if (contacts.Count > 0)
await tenantDb.Deleteable(contacts).ExecuteCommandAsync();
await
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
} }

Loading…
Cancel
Save