|
@@ -33,6 +33,7 @@ using wms.sqlsugar.model.fj;
|
|
|
using wms.util.Check;
|
|
|
using wms.util.Ext;
|
|
|
using static NPOI.POIFS.Crypt.CryptoFunctions;
|
|
|
+using static Org.BouncyCastle.Math.EC.ECCurve;
|
|
|
using TaskStatus = wms.dto.TaskStatus;
|
|
|
|
|
|
namespace wms.service.Service
|
|
@@ -1079,6 +1080,15 @@ namespace wms.service.Service
|
|
|
//TODO:最优验证算法
|
|
|
}
|
|
|
|
|
|
+ //判断对应仓库中是否存在指定缓存数量的空托盘
|
|
|
+ var invnowCount_1N = _billInvnowrepository.GetList(x => x.ContGrpType == FJContGrpType.Material && x.InvStateCode == InvState.InvEcecState_In.ToString() && x.WarehouseId == 1688761422269517825).Count;
|
|
|
+ var invnowCount_2N = _billInvnowrepository.GetList(x => x.ContGrpType == FJContGrpType.Material && x.InvStateCode == InvState.InvEcecState_In.ToString() && x.WarehouseId == 1703345891785707520).Count;
|
|
|
+ var taskInfoCount_1N = _taskrepository.AsQueryable().Count(x => x.Status < TaskStatus.Finish && x.BusType == FJTaskBusType.人工满托入库.GetDescription() && x.WarehouseCode == "1N");
|
|
|
+ var taskInfoCount_2N = _taskrepository.AsQueryable().Count(x => x.Status < TaskStatus.Finish && x.BusType == FJTaskBusType.人工满托入库.GetDescription() && x.WarehouseCode == "2N");
|
|
|
+ //创建对应任务
|
|
|
+ var count_1N = invnowCount_1N + taskInfoCount_1N;
|
|
|
+ var count_2N = invnowCount_2N + taskInfoCount_2N;
|
|
|
+
|
|
|
//创建入库记录
|
|
|
var createStockInWcsTaskReqest = new FJCreateStockInWcsTaskRequest
|
|
|
{
|
|
@@ -1091,7 +1101,7 @@ namespace wms.service.Service
|
|
|
Type = TaskType.EnterDepot,
|
|
|
DocCode = "",
|
|
|
WorkBench = task.WorkBench,
|
|
|
- WarehouseCode = "1N"
|
|
|
+ WarehouseCode = (count_1N <= count_2N) ? "1N" : "2N",
|
|
|
};
|
|
|
|
|
|
//下发wcs任务 - 分解方法
|