From af6b5546c9fd4e2c50c07a2445b80aba941a2dcd Mon Sep 17 00:00:00 2001 From: czx <28353131@qq.com> Date: Tue, 1 Dec 2020 15:26:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FtReportMealsDaoController.java | 1 + .../fantang/mapper/FtReportMealVoMapper.java | 6 +- .../system/fantang/vo/FtReportMealVo.java | 8 -- ruoyi-ui/src/api/fantang/meals.js | 9 ++ ruoyi-ui/src/views/fantang/settle/index.vue | 104 +++++++++++++++++- 5 files changed, 113 insertions(+), 15 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtReportMealsDaoController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtReportMealsDaoController.java index 06356abb6..87ac42843 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtReportMealsDaoController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtReportMealsDaoController.java @@ -61,6 +61,7 @@ public class FtReportMealsDaoController extends BaseController { @GetMapping("/listPayoff") public TableDataInfo listPayoff(FtReportMealVo ftReportMealsDao) { startPage(); + List list = iFtReportMealsDaoService.listPayoff(); return getDataTable(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 310cabf7e..57903054e 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 @@ -16,12 +16,12 @@ import java.util.List; */ @Repository public interface FtReportMealVoMapper extends BaseMapper { - @Select("select a.*, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id") + @Select("select a.price, a.patient_id, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id") public List listAll(); - @Select("select a.*, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 0") + @Select("select sum(a.price) as price, a.patient_id, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 0 GROUP BY a.patient_id") public List listNoPay(); - @Select("select a.*, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 1") + @Select("select sum(a.price) as price, a.patient_id, b.hospital_id, b.bed_id, b.`name`, c.depart_name, c.depart_code from ft_report_meals a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 1 GROUP BY a.patient_id") public List listPayoff(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/vo/FtReportMealVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/vo/FtReportMealVo.java index bae11ef90..abf4563dc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/vo/FtReportMealVo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/vo/FtReportMealVo.java @@ -1,9 +1,5 @@ package com.ruoyi.system.fantang.vo; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; import com.ruoyi.system.fantang.domain.FtReportMealsDao; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,10 +7,6 @@ import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.Accessors; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - /** * 收费管理对象 ft_prepayment * diff --git a/ruoyi-ui/src/api/fantang/meals.js b/ruoyi-ui/src/api/fantang/meals.js index 2ab301c70..47eb60154 100644 --- a/ruoyi-ui/src/api/fantang/meals.js +++ b/ruoyi-ui/src/api/fantang/meals.js @@ -78,3 +78,12 @@ export function exportMeals(query) { params: query }) } + + +// 获取最后结算日期 +export function getLastSettlementDate(patientId) { + return request({ + url: '/fantang/meals/getLastSettlementDate/' + patientId, + method: 'get', + }) +} diff --git a/ruoyi-ui/src/views/fantang/settle/index.vue b/ruoyi-ui/src/views/fantang/settle/index.vue index f4faec07e..8dc4f430f 100644 --- a/ruoyi-ui/src/views/fantang/settle/index.vue +++ b/ruoyi-ui/src/views/fantang/settle/index.vue @@ -110,14 +110,27 @@ {{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }} - - -