回收箱值班跟周转都可以操作,回收箱查状态间隔100ms

This commit is contained in:
maqiao 2025-01-17 11:03:11 +08:00
parent f6982af384
commit aadc0be0ab
2 changed files with 4 additions and 4 deletions

View File

@ -545,7 +545,7 @@ namespace DM_Weight.Port
} }
else else
{ {
Thread.Sleep(50); Thread.Sleep(100);
// 灯在闪烁继续监听状态 // 灯在闪烁继续监听状态
GetBackDoorState(); GetBackDoorState();
} }
@ -582,7 +582,7 @@ namespace DM_Weight.Port
}); });
logger.Info($"储物箱打开成功"); logger.Info($"储物箱打开成功");
} }
Thread.Sleep(50); Thread.Sleep(100);
// 灯在闪烁继续监听状态 // 灯在闪烁继续监听状态
GetBackDoorState(); GetBackDoorState();
} }

View File

@ -105,8 +105,8 @@ namespace DM_Weight.ViewModels
Channels = SqlSugarHelper.Db.Queryable<ChannelStock>() Channels = SqlSugarHelper.Db.Queryable<ChannelStock>()
.LeftJoin<DrugInfo>((cs,di) => cs.DrugId == di.DrugId.ToString()) .LeftJoin<DrugInfo>((cs,di) => cs.DrugId == di.DrugId.ToString())
.Where((cs) => cs.DrawerType != 1) .Where((cs) => cs.DrawerType != 1)
.WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉双人登录开后8个抽屉 //.WhereIF(App.SingleModel, cs => cs.DrawerNo <= 2) //单人登录开前8个抽屉双人登录开后8个抽屉
.WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2) //.WhereIF(!(App.SingleModel), cs => cs.DrawerNo > 2)
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")) .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
.Select((cs, di) => new ChannelStock{ .Select((cs, di) => new ChannelStock{
CanReturnQuantity = SqlFunc.Subqueryable<MachineRecord>().Where(mr => mr.DrugId == cs.DrugId&&mr.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) , CanReturnQuantity = SqlFunc.Subqueryable<MachineRecord>().Where(mr => mr.DrugId == cs.DrugId&&mr.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) ,