change-找出库申请单添加operition为0的条件

master
liuwf 1 year ago
parent 0c16b9532b
commit a79ceaab23

@ -134,6 +134,7 @@ namespace Khd.Core.Wcs.Wcs
.Where(t => t.executeStatus == "0")
.Where(t => t.outstockAmount > t.realOutstockAmount)
.Where(t => t.taskType == "5")
.Where(t => t.operationType =="0")
.Where(t => t.auditStatus == "1")
.ToList();
@ -2103,6 +2104,7 @@ namespace Khd.Core.Wcs.Wcs
.Where(t => t.outstockQty < t.applyQty)
.Where(t => t.auditStatus == "1")
.Where(t => t.warehouseId == 231)
.Where(t => t.operationType == "0");
.Where(t => t.productType == "3")
.Where(t => t.executeStatus == "0" || t.executeStatus == "1").ToList();
//获取最早入库时间
@ -2373,6 +2375,7 @@ namespace Khd.Core.Wcs.Wcs
var rawOutStock = dbContext.WmsRawOutstock
.Where(t => t.executeStatus == "0" || t.executeStatus == "1")
.Where(t => t.outstockAmount > t.realOutstockAmount)
.Where(x => x.operationType == "0")
.Where(t => taskType.Contains(t.taskType))
.Where(t => t.auditStatus == "1")
.ToList();
@ -2554,6 +2557,7 @@ namespace Khd.Core.Wcs.Wcs
{
//原材料库存
var rawStock = dbContext.WmsRawStock
.Where(t => t.activeFlag == "1").ToList();
BaseEquip endStationCodeEquip = dbContext.BaseEquip.First(t => t.objid == 10);
if (!string.IsNullOrEmpty(endStationCodeEquip.endStationCode) && endStationCodeEquip.IsOut == 1)
@ -2566,7 +2570,9 @@ namespace Khd.Core.Wcs.Wcs
bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 11).Any();
if (!hasTask)
{
var orderList = rawOutStock.Where(t => endStationCodeEquip.endStationCode.Contains(t.endStationCode)).ToList();
List<WcsTask> tasks = new();
List<long?> canOut = orderList.Select(t => t.saleOrderId).ToList();
rawStock = rawStock.Where(t => canOut.Contains(t.saleOrderId)).OrderByDescending(t => t.saleOrderId).ToList();

Loading…
Cancel
Save