diff --git a/DM_Weight/ViewModels/ChangeShiftsDialogViewModel.cs b/DM_Weight/ViewModels/ChangeShiftsDialogViewModel.cs index 75d93f9..ab963bf 100644 --- a/DM_Weight/ViewModels/ChangeShiftsDialogViewModel.cs +++ b/DM_Weight/ViewModels/ChangeShiftsDialogViewModel.cs @@ -228,7 +228,7 @@ namespace DM_Weight.ViewModels //交接班表里只显示值班柜(row_no:1,2)的不显示周转柜 - string strSql = @"SELECT di.drug_name as DrugName,di.drug_spec as DrugSpec,di.small_unit,sum(if(cs.drawer_type=1,cs.quantity,0)) stockQuantity, + string strSql = @"SELECT di.drug_name as DrugName,di.drug_spec as DrugSpec,di.small_unit as PackdUnit,sum(if(cs.drawer_type=1,cs.quantity,0)) stockQuantity, sum(if(cs.drawer_type=2,cs.quantity,0)) EmptyQuantity FROM channel_stock cs inner join drug_info di on cs.drug_id=di.drug_id WHERE (row_no<=8 or drawer_type=2) and machine_id =@machineId GROUP BY cs.drug_id ORDER BY cs.Drug_ID"; List shiftsReports = SqlSugarHelper.Db.SqlQueryable(strSql)