任务预任务,新增批量删除工嗯呢
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
public class TaskBatchDelInput
|
||||||
|
{
|
||||||
|
public List<string> ids { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Entities.Entity;
|
using Tnb.WarehouseMgr.Entities.Entity;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
@@ -48,5 +50,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> BatchDelete(TaskBatchDelInput input)
|
||||||
|
{
|
||||||
|
return await _db.Deleteable<T>().Where(it => input.ids.Contains(it.id)).ExecuteCommandHasChangeAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -451,17 +451,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
task.device_id = e.device_id;
|
task.device_id = e.device_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*foreach (var at in agvDTTasks)
|
|
||||||
{
|
|
||||||
var ele = elevatorList.Find(x => x.location_code == at.endlocation_code);
|
|
||||||
Logger.Information($"ele.elevator_id:{ele?.elevator_id},elevator_code:{ele?.elevator_code}");
|
|
||||||
if (ele != null)
|
|
||||||
{
|
|
||||||
at.device_id = ele.elevator_id;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
List<(string endlocation_code, string device_id, string id, int start_floor)> endLocCodes = agvDTTasks
|
List<(string endlocation_code, string device_id, string id, int start_floor)> endLocCodes = agvDTTasks
|
||||||
.Select(it => (it.endlocation_code, it.device_id, it.id, it.start_floor)).ToList();
|
.Select(it => (it.endlocation_code, it.device_id, it.id, it.start_floor)).ToList();
|
||||||
var callLiftCnt = endLocCodes?.Count ?? 0;
|
var callLiftCnt = endLocCodes?.Count ?? 0;
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ using Tnb.WarehouseMgr.Entities.Consts;
|
|||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
{
|
{
|
||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSDISTASK_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSDISTASK_ID)]
|
||||||
public class WmsDistaskService : BaseWareHouseService
|
public class WmsDistaskService : TaskManagerDelBase<WmsDistaskH>
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
|
|
||||||
public WmsDistaskService(ISqlSugarRepository<WmsDistaskH> repository)
|
public WmsDistaskService(ISqlSugarRepository<WmsDistaskH> repository):base(repository.AsSugarClient())
|
||||||
{
|
{
|
||||||
_db = repository.AsSugarClient();
|
_db = repository.AsSugarClient();
|
||||||
OverideFuncs.DeleteAsync = Delete;
|
OverideFuncs.DeleteAsync = Delete;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
|
|
||||||
@@ -11,5 +12,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user