构建生成次日报餐记录的sql脚本
This commit is contained in:
parent
832ab863a2
commit
e59cb4ee64
@ -29,6 +29,6 @@ public interface FtReportMealVoMapper extends BaseMapper<FtReportMealVo> {
|
|||||||
// 根据foods列表和ft_food 的价格,计算列表中菜单的总价
|
// 根据foods列表和ft_food 的价格,计算列表中菜单的总价
|
||||||
// select d.*, (select sum(price) from ft_food f where FIND_IN_SET(f.food_id,d.foods)) as price from ft_food_demand d
|
// select d.*, (select sum(price) from ft_food f where FIND_IN_SET(f.food_id,d.foods)) as price from ft_food_demand d
|
||||||
// 根据病患配餐表,生成次日报餐记录,并通过ft_food 菜品价格计算菜单总价
|
// 根据病患配餐表,生成次日报餐记录,并通过ft_food 菜品价格计算菜单总价
|
||||||
@Insert("insert into ft_report_meals (create_at, type, patient_id, foods, settlement_flag, dining_at, price ) select date_add(now(), interval 1 day), d.type, d.patient_id , d.foods, 0 , date_add(now(), interval 1 day), (select sum(price) from ft_food f where FIND_IN_SET(f.food_id,d.foods)) as price from ft_food_demand d")
|
@Insert("insert into ft_report_meals (create_at, type, patient_id, foods, settlement_flag, dining_at, price ) select date_add(now(), interval 1 day), d.type, d.patient_id , d.foods, 0 , date_add(now(), interval 1 day), (select sum(price) from ft_food f where FIND_IN_SET(f.food_id,d.foods)) as price from ft_food_demand d LEFT JOIN ft_patient p on p.patient_id = d.patient_id and p.off_flag = 0")
|
||||||
public void insertTomorrowReportMeal();
|
public void insertTomorrowReportMeal();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user