绑定药品时关联channel_list表

This commit is contained in:
maqiao 2024-08-07 14:07:20 +08:00
parent aa123547ca
commit 5b33ebd883
1 changed files with 2 additions and 0 deletions

View File

@ -190,8 +190,10 @@ namespace DM_Weight.ViewModels
}
var f = SqlSugarHelper.Db.UseTran(() =>
{
string chnguid=SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.MachineId == ConfigurationManager.AppSettings[""].ToString()&&cs.DrawerNo==DrawerNo).Select(cs=>cs.Id).First();
SqlSugarHelper.Db.Insertable(new ChannelStock()
{
Chnguid=chnguid,
DrawerNo = DrawerNo,
DrugId = DrugInfo.DrugId.ToString(),
BaseQuantity = baseQuantity,