change - 出库添加在途数量

collectionStore
wenjy 11 months ago
parent b027c40cb1
commit d2607b430e

Binary file not shown.

@ -171,7 +171,15 @@ namespace Aucma.Scada.Business
{
PrintLogInfoMessage($"匹配货道:{spaceInfo.spaceName}");
// RefreshScanMateriaCodeEvent?.Invoke(materiaclCode, materialType, spaceInfo.spaceName, storeCode); //刷新界面扫码信息
CreateOutStoreTask(spaceInfo, planCode, taskCode); //创建出库任务
bool result = CreateOutStoreTask(spaceInfo, planCode, taskCode); //创建出库任务
if (result)
{
PrintLogInfoMessage("出库任务创建成功");
}
else
{
PrintLogInfoMessage("出库任务创建失败");
}
}
else
{
@ -283,7 +291,7 @@ namespace Aucma.Scada.Business
//{
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
//}
spaceInfo.outRouteAmount += 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
}
@ -519,6 +527,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