删除交接库数据时根据药箱号、药品、数量<=0

This commit is contained in:
maqiao 2024-12-02 11:37:24 +08:00
parent 2a03fa05bf
commit cc13b60ce8
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ namespace DM_Weight.ViewModels
//List<ChannelStock> stockManuList = jiaojieStock.Where(cs => cs.ManuNo == it.ManuNo).ToList();
if (searchStock == null || searchStock.Count <= 0)
{
SqlSugarHelper.Db.Deleteable<ChannelStock>().Where(cs=>cs.DrawerNo== jiaojieStock[j].DrawerNo&&cs.DrugId== jiaojieStock[j].DrugId&&cs.ManuNo==null).ExecuteCommand();
SqlSugarHelper.Db.Deleteable<ChannelStock>().Where(cs=>cs.DrawerNo== jiaojieStock[j].DrawerNo&&cs.DrugId== jiaojieStock[j].DrugId&&cs.Quantity<=0).ExecuteCommand();
jiaojieStock[j].ManuNo = it.ManuNo;
jiaojieStock[j].Id = Guid.NewGuid().ToString();
SqlSugarHelper.Db.Insertable(jiaojieStock).ExecuteCommand();