diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealsDaoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealsDaoMapper.java index 00402ff39..68b291bc2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealsDaoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealsDaoMapper.java @@ -51,4 +51,7 @@ public interface FtReportMealsDaoMapper extends BaseMapper { "where b.depart_id = #{departId} and a.dining_at BETWEEN #{beginOfDay} and #{endOfDay}\n" + "GROUP BY a.type, foods") List getStatisticsFoods(Integer departId, DateTime beginOfDay, DateTime endOfDay); + + @Select("SELECT a.patient_id,sum(a.price) as dinner_total_price , sum(a.nutrition_food_price ) as nutrition_total_price , sum(a.total_price) as sum_total_price FROM ft_report_meals a where a.patient_id = #{patientId} AND a.settlement_flag = 0 AND a.dining_flag = 1") + ReportMealsPriceEntity sumAllTotalPrice(Long patientId); }