From 1d1e5582377fdd0600313ffa936f646972c7c760 Mon Sep 17 00:00:00 2001 From: czx <28353131@qq.com> Date: Thu, 28 Jan 2021 11:07:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=94=A8=E9=A4=90=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quartz/task/FtGenerateOrderTask.java | 25 ++++++++++- .../controller/ClientPatientController.java | 5 +++ .../fantang/mapper/FtReportMealVoMapper.java | 14 ++++++ ruoyi-ui/src/settings.js | 2 +- .../src/views/fantang/returnManage/index.vue | 45 ++++--------------- 5 files changed, 51 insertions(+), 40 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/FtGenerateOrderTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/FtGenerateOrderTask.java index ad1db65bf..2a6b61385 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/FtGenerateOrderTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/FtGenerateOrderTask.java @@ -3,6 +3,7 @@ package com.ruoyi.quartz.task; import com.ruoyi.system.fantang.mapper.FtReportMealVoMapper; import com.ruoyi.system.fantang.service.impl.FtFoodDemandDaoServiceImpl; import com.ruoyi.system.fantang.service.impl.FtOrderDaoServiceImpl; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -11,6 +12,7 @@ import org.springframework.stereotype.Component; * * @author ruoyi */ +@Slf4j @Component("OrderingTask") public class FtGenerateOrderTask { @@ -18,7 +20,7 @@ public class FtGenerateOrderTask { private FtFoodDemandDaoServiceImpl foodDemandDaoService; @Autowired - private FtReportMealVoMapper ftReportMealVoMapper; + private FtReportMealVoMapper reportMealVoMapper; @Autowired private FtOrderDaoServiceImpl orderDaoService; @@ -30,7 +32,7 @@ public class FtGenerateOrderTask { public void GeneratePatientTomorrowReportMeal() { System.out.println("生成次日病患报餐记录"); - ftReportMealVoMapper.insertTomorrowReportMeal(); + reportMealVoMapper.insertTomorrowReportMeal(); } // 生成次日员工订餐记录 @@ -38,4 +40,23 @@ public class FtGenerateOrderTask { System.out.println("生成次日员工订餐记录"); orderDaoService.GenerateStaffTomorrowOrder(); } + + // 更新用餐状态为用餐状态,用餐前提前2小时关闭报餐数据修改 + public void updateBreakfastDinnerFlag() { + log.info("更新早餐数:{}", reportMealVoMapper.updateBreakfastDinnerFlag()); + } + + // 更新用餐状态为用餐状态,用餐前提前2小时关闭报餐数据修改 + public void updateLunchDinnerFlag() { + log.info("更新午餐数:{}", reportMealVoMapper.updateLunchDinnerFlag()); + } + + // 更新用餐状态为用餐状态,用餐前提前2小时关闭报餐数据修改 + public void updateDinnerDinnerFlag() { + log.info("更新晚餐数:{}", reportMealVoMapper.updateDinnerDinnerFlag()); + + log.info("更新加餐数:{}", reportMealVoMapper.updateAdditionDinnerFlag()); + + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/ClientPatientController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/ClientPatientController.java index 4f8266c67..76a075d92 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/ClientPatientController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/ClientPatientController.java @@ -219,6 +219,11 @@ public class ClientPatientController extends BaseController { return AjaxResult.success(list); } + /** + * 接收病患报餐数据,更新;生成报餐日志表 + * @param list + * @return + */ @PostMapping("/tomorrowReport") public AjaxResult tomorrowReport(@RequestBody JSONArray list){ System.out.println(list); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealVoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealVoMapper.java index 7eafd90b6..d202c4cbe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealVoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealVoMapper.java @@ -5,6 +5,7 @@ import com.ruoyi.system.fantang.domain.FtReportMealsDao; import com.ruoyi.system.fantang.vo.FtReportMealVo; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; import java.util.List; @@ -36,4 +37,17 @@ public interface FtReportMealVoMapper extends BaseMapper { "where FIND_IN_SET(f.food_id,d.foods)) as price, d.open_flag, 0, d.nutrition_food_id 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(); + + @Update("UPDATE ft_report_meals set dining_flag = 1, dining_at = now() where type = 1 and create_at =CURDATE()") + Integer updateBreakfastDinnerFlag(); + + @Update("UPDATE ft_report_meals set dining_flag = 1, dining_at = now() where type = 2 and create_at =CURDATE()") + Integer updateLunchDinnerFlag(); + + @Update("UPDATE ft_report_meals set dining_flag = 1, dining_at = now() where type = 3 and create_at =CURDATE()") + Integer updateDinnerDinnerFlag(); + + @Update("UPDATE ft_report_meals set dining_flag = 1, dining_at = now() where type = 4 and open_flag = 1 and create_at =CURDATE()") + Integer updateAdditionDinnerFlag(); + } diff --git a/ruoyi-ui/src/settings.js b/ruoyi-ui/src/settings.js index b2808a5e1..31e1cafd1 100644 --- a/ruoyi-ui/src/settings.js +++ b/ruoyi-ui/src/settings.js @@ -14,7 +14,7 @@ module.exports = { /** * 是否显示 tagsView */ - tagsView: true, + tagsView: false, /** * 是否固定头部 diff --git a/ruoyi-ui/src/views/fantang/returnManage/index.vue b/ruoyi-ui/src/views/fantang/returnManage/index.vue index a68989b38..bc4631075 100644 --- a/ruoyi-ui/src/views/fantang/returnManage/index.vue +++ b/ruoyi-ui/src/views/fantang/returnManage/index.vue @@ -1,10 +1,10 @@