规范代码格式
This commit is contained in:
parent
e29e7aa6e3
commit
9b36ba3feb
|
@ -115,7 +115,7 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
if (_userLists == null)
|
if (_userLists == null)
|
||||||
{
|
{
|
||||||
_userLists = SqlSugarHelper.Db.Queryable<UserList>().Where(us => us.MachineId == (ConfigurationManager.AppSettings["machineId"] ??"DM5")).Select(us => new BindUserList() { UserId = Convert.ToInt32(us.UserBarcode), UserName = us.Nickname }).ToList();
|
_userLists = SqlSugarHelper.Db.Queryable<UserList>().Where(us => us.MachineId == (ConfigurationManager.AppSettings["machineId"] ?? "DM5")).Select(us => new BindUserList() { UserId = Convert.ToInt32(us.UserBarcode), UserName = us.Nickname }).ToList();
|
||||||
_userListSelectedItem = _userLists[0];
|
_userListSelectedItem = _userLists[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ namespace DM_Weight.ViewModels
|
||||||
Type = 55,
|
Type = 55,
|
||||||
InvoiceId = $"打开{DrawerNo}号药箱",
|
InvoiceId = $"打开{DrawerNo}号药箱",
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
ModbusHelper.GetInstance().OpenBoxDoor(DrawerNo-1);
|
ModbusHelper.GetInstance().OpenBoxDoor(DrawerNo - 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -209,19 +209,19 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
if (DrawerNo > 0)
|
if (DrawerNo > 0)
|
||||||
{
|
{
|
||||||
ChannelList channelList=SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs=>cs.DrawerNo== DrawerNo&&cs.MachineId=="DM5").First();
|
ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.DrawerNo == DrawerNo && cs.MachineId == "DM5").First();
|
||||||
if(BoxTypeSelectedItem!=null)
|
if (BoxTypeSelectedItem != null)
|
||||||
{
|
{
|
||||||
if(BoxTypeSelectedItem.TypeValue==0&&UserListSelectedItem!=null)
|
if (BoxTypeSelectedItem.TypeValue == 0 && UserListSelectedItem != null)
|
||||||
{
|
{
|
||||||
//药箱 归属药师
|
//药箱 归属药师
|
||||||
|
|
||||||
SqlSugarHelper.Db.Updateable(new ChannelList() {BelongUser= UserListSelectedItem.UserId.ToString(),DrawerType= BoxTypeSelectedItem.TypeValue ,Id= channelList.Id }).UpdateColumns(cl=>new {cl.BelongUser,cl.DrawerType}).ExecuteCommand();
|
SqlSugarHelper.Db.Updateable(new ChannelList() { BelongUser = UserListSelectedItem.UserId.ToString(), DrawerType = BoxTypeSelectedItem.TypeValue, Id = channelList.Id }).UpdateColumns(cl => new { cl.BelongUser, cl.DrawerType }).ExecuteCommand();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//药箱属于公共药箱
|
//药箱属于公共药箱
|
||||||
SqlSugarHelper.Db.Updateable(new ChannelList() {DrawerType= BoxTypeSelectedItem.TypeValue ,Id= channelList.Id }).UpdateColumns(cl=>new {cl.DrawerType}).ExecuteCommand();
|
SqlSugarHelper.Db.Updateable(new ChannelList() { DrawerType = BoxTypeSelectedItem.TypeValue, Id = channelList.Id }).UpdateColumns(cl => new { cl.DrawerType }).ExecuteCommand();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,8 +233,8 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
Message = $"未选择药箱,请先选择药箱",
|
Message = $"未选择药箱,请先选择药箱",
|
||||||
Type = MsgType.ERROR
|
Type = MsgType.ERROR
|
||||||
};
|
};
|
||||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue