change - 出库逻辑添加在途数量

foamRearStore
wenjy 1 year ago
parent d59df76b5f
commit bf5dfe5c10

Binary file not shown.

@ -272,8 +272,8 @@ namespace Aucma.Scada.Business
//{
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
//}
//_spaceInfoService.UpdateSpaceInfo(spaceInfo);
spaceInfo.outRouteAmount += 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
}
#region 轮询获取出库任务下发至PLC等待PLC执行反馈完成后再次下发
@ -448,6 +448,7 @@ namespace Aucma.Scada.Business
//读取PLC获取货道信息存放数量、在途数量
//spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock -= 1;
spaceInfo.outRouteAmount -= 1;
if (spaceInfo.spaceStock == 0)
{
spaceInfo.materialType = string.Empty;

@ -74,6 +74,12 @@ namespace Aucma.Scada.Model.domain
[SugarColumn(ColumnName = "ONROUTE_AMOUNT")]
public int onRouteAmount { get; set; }
/// <summary>
/// 出库数量
/// </summary>
[SugarColumn(ColumnName = "OUTROUTE_AMOUNT")]
public int outRouteAmount { get; set; }
/// <summary>
/// 入库标识:1-允许入库2-禁止入库
/// </summary>

@ -110,7 +110,7 @@ namespace HighWayIot.Repository.service.Impl
try
{
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.storeCode == store && x.materialType == materialType && x.spaceStatus == 1 && x.spaceStock > 0); //相同型号、启用状态、库存不为空的货道信息
exp = exp.And(x => x.storeCode == store && x.materialType == materialType && x.spaceStatus == 1 && x.spaceStock - x.outRouteAmount > 0); //相同型号、启用状态、库存不为空的货道信息
spaceInfos = _mesRepository.GetList(exp);

Loading…
Cancel
Save