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

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

@ -110,7 +110,7 @@ namespace HighWayIot.Repository.service.Impl
try try
{ {
Expression<Func<BaseSpaceInfo, bool>> exp = s1 => true; 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); spaceInfos = _mesRepository.GetList(exp);

Loading…
Cancel
Save