From a8a1b537946eb1c439b6a385e7e99e1b86a07337 Mon Sep 17 00:00:00 2001 From: czx <28353131@qq.com> Date: Fri, 15 Jan 2021 10:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=97=85=E6=82=A3=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=B0=86=E5=8A=A0=E9=A4=90=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/fantang/mapper/FtFoodDemandDaoMapper.java | 4 ++++ .../fantang/service/impl/FtFoodDemandDaoServiceImpl.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtFoodDemandDaoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtFoodDemandDaoMapper.java index 377e8630d..6a3f32aa1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtFoodDemandDaoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtFoodDemandDaoMapper.java @@ -7,6 +7,7 @@ import com.ruoyi.system.fantang.domain.FtReportMealsDao; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import java.util.List; @@ -58,4 +59,7 @@ public interface FtFoodDemandDaoMapper extends BaseMapper { "\ta.type,\n" + "\tc.depart_name") List getStatisticsFoodDemand(); + + @Update("UPDATE ft_food_demand set flag = 0 where patient_id = #{patientId} and type = 4 ") + void updateExtraByPatientId(@Param("patientId") Long patientId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtFoodDemandDaoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtFoodDemandDaoServiceImpl.java index 61c6d391b..c0ea29bd5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtFoodDemandDaoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtFoodDemandDaoServiceImpl.java @@ -32,7 +32,10 @@ public class FtFoodDemandDaoServiceImpl extends ServiceImpl newPatients = this.baseMapper.getNewPatientNotDemand(); for (Long patientId : newPatients) { + // 先创建四个用餐信息 this.baseMapper.GenerateOrderByPatientId(patientId); + // 更新加餐信息为禁用状态 + this.baseMapper.updateExtraByPatientId(patientId); } return newPatients.size(); }