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}') }} - - -