所有出、入库页面均保存账册
This commit is contained in:
parent
d783b9c631
commit
02c626d829
|
|
@ -37,7 +37,7 @@
|
|||
<!-- 按处方还药或者按取药记录还药 1:处方(ReturnDrugWindow2)2:药品(ReturnDrugWindow)-->
|
||||
<add key="returnDrugMode" value="1" />
|
||||
<!-- 自动退出时间,单位秒,为0时不自动退出 -->
|
||||
<add key="autoExit" value="5"/>
|
||||
<add key="autoExit" value="0"/>
|
||||
|
||||
<!-- 无操作退出录像时间,单位秒,为0时不退出录像 -->
|
||||
<add key="stopRecord" value="180"/>
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ namespace DM_Weight.ViewModels
|
|||
//不够取
|
||||
ChannelStock newStock = new ChannelStock();
|
||||
//newStock.Chnguid = jiaoStock.Chnguid;
|
||||
//newStock.BaseQuantity = jiaoStock.BaseQuantity;
|
||||
newStock.BaseQuantity = jiaoStock.BaseQuantity;
|
||||
newStock.ManuNo = Jiaojie_ChannelStocks[i].ManuNo;
|
||||
newStock.EffDate = Jiaojie_ChannelStocks[i].EffDate;
|
||||
newStock.DrawerNo = Jiaojie_ChannelStocks[i].DrawerNo;
|
||||
|
|
@ -485,7 +485,7 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
ChannelStock newStock = new ChannelStock();
|
||||
//newStock.Chnguid = jiaoStock.Chnguid;
|
||||
//newStock.BaseQuantity = jiaoStock.BaseQuantity;
|
||||
newStock.BaseQuantity = jiaoStock.BaseQuantity;
|
||||
newStock.ManuNo = Jiaojie_ChannelStocks[i].ManuNo;
|
||||
newStock.EffDate = Jiaojie_ChannelStocks[i].EffDate;
|
||||
newStock.DrawerNo = Jiaojie_ChannelStocks[i].DrawerNo;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ namespace DM_Weight.ViewModels
|
|||
ChannelStocks = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Includes<ChannelList>(cs => cs.ChannelLst)
|
||||
.Includes<DrugInfo>(cs => cs.DrugInfo)
|
||||
.Where(cs => cs.MachineId == (ConfigurationManager.AppSettings["jj_machineId"] ?? "DM5") && cs.NeedNum > 0)
|
||||
.Where(cs => cs.MachineId == (ConfigurationManager.AppSettings["jj_machineId"] ?? "DM5") && (cs.NeedNum > 0 || cs.AddToJJNum > 0))
|
||||
.OrderBy(cs => cs.Chnguid)
|
||||
.OrderBy(cs => cs.DrawerNo)
|
||||
.ToList();
|
||||
|
|
@ -159,6 +159,8 @@ namespace DM_Weight.ViewModels
|
|||
channelList.channelStocks.AddRange(ChannelStocks.Where(cs => cs.DrawerNo == DrawerNoList[i]&&(cs.NeedNum>0||cs.AddToJJNum>0)).ToList());
|
||||
if (channelList != null)
|
||||
{
|
||||
if (channelList.channelStocks[0].AddToJJNum>0)
|
||||
channelList.State=1; //表示有补药
|
||||
channelLists.Add(channelList);
|
||||
}
|
||||
}
|
||||
|
|
@ -534,7 +536,7 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
AlertMsg alertMsg = new AlertMsg
|
||||
{
|
||||
Message = $"未选择药品,请先勾选要药箱号",
|
||||
Message = $"未选择药品,请先点选药箱号",
|
||||
Type = MsgType.ERROR,
|
||||
};
|
||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||
|
|
@ -606,7 +608,15 @@ namespace DM_Weight.ViewModels
|
|||
DialogServiceExtensions.ShowDialogHost(_dialogService, "AddToJiaoJieDialog", dialogParameters, DoDialogResult, "RootDialog");
|
||||
|
||||
}
|
||||
|
||||
if(_ChannelList!=null&& _ChannelList.State == 1)
|
||||
{
|
||||
AlertMsg alertMsg = new AlertMsg
|
||||
{
|
||||
Message = $"药品已取出,待入库",
|
||||
Type = MsgType.ERROR,
|
||||
};
|
||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ namespace DM_Weight.ViewModels
|
|||
List<ChannelStock> record = ChannelStocks.FindAll(it => it.AddQuantity != 0).ToList();
|
||||
if (record.Count > 0)
|
||||
{
|
||||
string InvoiceId = "DRAWER_" + CurrentTimeMillis();
|
||||
string InvoiceId = "DRAWER_Add_" + CurrentTimeMillis();
|
||||
var f = SqlSugarHelper.Db.UseTran(() =>
|
||||
{
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -253,8 +253,9 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>()
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ namespace DM_Weight.ViewModels
|
|||
logger.Info("点击完成按钮,库位数据:" + JsonConvert.SerializeObject(record));
|
||||
if (record.Count > 0)
|
||||
{
|
||||
string InvoiceId = "DRAWER_" + CurrentTimeMillis();
|
||||
string InvoiceId = "DRAWER_Take_" + CurrentTimeMillis();
|
||||
var f = SqlSugarHelper.Db.UseTran(() =>
|
||||
{
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -251,7 +251,9 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -357,7 +357,9 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -352,7 +352,10 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -375,7 +375,10 @@ namespace DM_Weight.ViewModels
|
|||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now,
|
||||
InvoiceNo = OrderInfo.OrderNo
|
||||
InvoiceNo = OrderInfo.OrderNo,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存与总结存数据
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(ChannelStock.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(ChannelStock.MachineId)|| cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(ChannelStock.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -284,7 +284,10 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -283,7 +283,9 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ namespace DM_Weight.ViewModels
|
|||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId) || cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
|
||||
.Where(cs => cs.DrugId.Equals(it.DrugId))
|
||||
.Where(cs => cs.DrawerType == 1)
|
||||
.ToList();
|
||||
|
|
@ -260,7 +260,10 @@ namespace DM_Weight.ViewModels
|
|||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
||||
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
CreateTime = DateTime.Now
|
||||
CreateTime = DateTime.Now,
|
||||
TotalStock = nowChannels.Sum(itx => itx.Quantity),
|
||||
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
|
||||
|
||||
|
||||
}).ExecuteCommand();
|
||||
//修改凌晨生成的日结存数据
|
||||
|
|
|
|||
Loading…
Reference in New Issue