更新定时任务自动生成次日病患报餐数据,增加是否配置了营养配餐标志“open_flag"
This commit is contained in:
parent
c1b9a4adaa
commit
32e84c538d
@ -29,6 +29,11 @@ public interface FtReportMealVoMapper extends BaseMapper<FtReportMealVo> {
|
||||
// 根据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
|
||||
// 根据病患配餐表,生成次日报餐记录,并通过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 LEFT JOIN ft_patient p on p.patient_id = d.patient_id and p.off_flag = 0")
|
||||
@Insert("insert into ft_report_meals " +
|
||||
"(create_at, type, patient_id, foods, settlement_flag, dining_at, price, open_flag ) " +
|
||||
"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, open_flag 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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user