Compare commits
	
		
			No commits in common. "21082a6e171d7cd50da04608603f4286c7b86121" and "9b36ba3febdb1442fbace284f3a400d954e74c22" have entirely different histories.
		
	
	
		
			21082a6e17
			...
			9b36ba3feb
		
	
		| 
						 | 
				
			
			@ -360,5 +360,4 @@ MigrationBackup/
 | 
			
		|||
.ionide/
 | 
			
		||||
 | 
			
		||||
# Fody - auto-generated XML schema
 | 
			
		||||
FodyWeavers.xsd
 | 
			
		||||
/win-x64 (2024-11-4_6湘乡交接柜).zip
 | 
			
		||||
FodyWeavers.xsd
 | 
			
		||||
| 
						 | 
				
			
			@ -436,7 +436,7 @@ namespace DM_Weight.ViewModels
 | 
			
		|||
                    {
 | 
			
		||||
                        SetBtnEnable(chl.DrawerNo);
 | 
			
		||||
                    }
 | 
			
		||||
                    if (!string.IsNullOrEmpty(chl.BelongUser)&& chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
 | 
			
		||||
                    if (chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
 | 
			
		||||
                    {
 | 
			
		||||
                        SetBtnEnable(chl.DrawerNo);
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -159,21 +159,9 @@ namespace DM_Weight.ViewModels
 | 
			
		|||
                            //药箱归属药师,把药师信息显示出来
 | 
			
		||||
                            UserStatus = Visibility.Visible;
 | 
			
		||||
                            UserListSelectedItem = _userLists.Where(sul => sul.UserId.ToString() == cnl.BelongUser).FirstOrDefault();
 | 
			
		||||
                            if (UserListSelectedItem == null)
 | 
			
		||||
                            if (UserListSelectedItem == null && _userLists != null)
 | 
			
		||||
                            {
 | 
			
		||||
                                if (UserLists.Where(us => us.UserName == "请选择药师").Count() <= 0)
 | 
			
		||||
                                {
 | 
			
		||||
                                    BindUserList nullBind = new BindUserList();
 | 
			
		||||
                                    nullBind.UserId = 0;
 | 
			
		||||
                                    nullBind.UserName = "请选择药师";
 | 
			
		||||
                                    _userLists.Add(nullBind);
 | 
			
		||||
 | 
			
		||||
                                }
 | 
			
		||||
                                UserListSelectedItem = UserLists.Where(us => us.UserName == "请选择药师").FirstOrDefault();
 | 
			
		||||
                            }
 | 
			
		||||
                            else
 | 
			
		||||
                            {
 | 
			
		||||
                                UserListSelectedItem = UserLists[0];
 | 
			
		||||
                                UserListSelectedItem = _userLists[0];
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
| 
						 | 
				
			
			@ -224,41 +212,18 @@ namespace DM_Weight.ViewModels
 | 
			
		|||
                    ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.DrawerNo == DrawerNo && cs.MachineId == "DM5").First();
 | 
			
		||||
                    if (BoxTypeSelectedItem != null)
 | 
			
		||||
                    {
 | 
			
		||||
                        int iUpdate = 0;
 | 
			
		||||
                        if (BoxTypeSelectedItem.TypeValue == 0 && UserListSelectedItem != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            //药箱 归属药师
 | 
			
		||||
 | 
			
		||||
                            iUpdate=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
 | 
			
		||||
                        {
 | 
			
		||||
                            //药箱属于公共药箱
 | 
			
		||||
                            iUpdate=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();
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                        if(iUpdate>0)
 | 
			
		||||
                        {
 | 
			
		||||
                            //提示请选择药箱
 | 
			
		||||
                            AlertMsg alertMsg = new AlertMsg
 | 
			
		||||
                            {
 | 
			
		||||
                                Message = $"保存完成",
 | 
			
		||||
                                Type = MsgType.INFO
 | 
			
		||||
                            };
 | 
			
		||||
                            _eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
 | 
			
		||||
 | 
			
		||||
                        }
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
 | 
			
		||||
                            //提示请选择药箱
 | 
			
		||||
                            AlertMsg alertMsg = new AlertMsg
 | 
			
		||||
                            {
 | 
			
		||||
                                Message = $"保存失败",
 | 
			
		||||
                                Type = MsgType.ERROR
 | 
			
		||||
                            };
 | 
			
		||||
                            _eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue