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 5770aa0e6..21828e81e 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 @@ -156,6 +156,7 @@ public class ClientPatientController extends BaseController { public AjaxResult getFoodPrice() { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("type", 1); + wrapper.gt("dinner_type", 0); return AjaxResult.success(iftFoodDaoService.list(wrapper)); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java index 74cbedf1e..490fe2439 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/controller/FtPatientDaoController.java @@ -69,6 +69,17 @@ public class FtPatientDaoController extends BaseController { return AjaxResult.success(list); } + /** + * 根据 departId 查询所有没有营养配餐的病人列表 + * @author 陈智兴 + */ + @GetMapping("/selectNoCateringByDepartId/{departId}") + public AjaxResult selectNoCateringByDepartId(@PathVariable("departId") Long departId) { + List list = iFtPatientDaoService.selectNoCateringByDepartId(departId); + return AjaxResult.success(list); + } + + /** * 根据 patientId 查询病人床号 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtPatientDaoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtPatientDaoMapper.java index 51e3916f0..1d9e6c8b2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtPatientDaoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtPatientDaoMapper.java @@ -55,4 +55,7 @@ public interface FtPatientDaoMapper extends BaseMapper { List getReportMealsToday(@Param("createAt") String createAt, @Param("patientId") Long patientId); List getReportMealsByDepart(@Param("departId") Long departId, @Param("createAt") String createAt); + + @Select("SELECT * from ft_patient where depart_id = #{departId} and patient_id not in (SELECT patient_id from ft_catering) ") + List selectNoCateringByDepartId(@Param("departId") Long departId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtPatientDaoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtPatientDaoService.java index 9b6bf8767..ad78456cb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtPatientDaoService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/IFtPatientDaoService.java @@ -19,4 +19,6 @@ public interface IFtPatientDaoService extends IService { AjaxResult getReportMealsToday(String createAt, Long patientId); List getReportMealsByDepart(Long departId, String createAt); + + List selectNoCateringByDepartId(Long departId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtPatientDaoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtPatientDaoServiceImpl.java index 6da5f0036..07cb569c3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtPatientDaoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/fantang/service/impl/FtPatientDaoServiceImpl.java @@ -29,4 +29,9 @@ public class FtPatientDaoServiceImpl extends ServiceImpl getReportMealsByDepart(Long departId, String createAt) { return this.baseMapper.getReportMealsByDepart(departId,createAt); } + + @Override + public List selectNoCateringByDepartId(Long departId) { + return this.baseMapper.selectNoCateringByDepartId(departId); + } } diff --git a/ruoyi-ui/src/api/fantang/patient.js b/ruoyi-ui/src/api/fantang/patient.js index 3b9db3a33..5596f48b8 100644 --- a/ruoyi-ui/src/api/fantang/patient.js +++ b/ruoyi-ui/src/api/fantang/patient.js @@ -17,6 +17,14 @@ export function selectPatientByDepartId(departId) { }) } +// 根据 departId 查询所有没有营养配餐的病人列表 +export function selectNoCateringByDepartId(departId) { + return request({ + url: '/fantang/patient/selectNoCateringByDepartId/' + departId, + method: 'get', + }) +} + // 根据 patientId 查询病人床号 export function getBedIdById(patientId) { return request({ diff --git a/ruoyi-ui/src/views/fantang/catering/index.vue b/ruoyi-ui/src/views/fantang/catering/index.vue index cce892b0f..7903a6459 100644 --- a/ruoyi-ui/src/views/fantang/catering/index.vue +++ b/ruoyi-ui/src/views/fantang/catering/index.vue @@ -103,7 +103,7 @@ :disabled="multiple" @click="handleCancel" v-hasPermi="['fantang:catering:remove']" - >作废 + >暂停 @@ -510,10 +510,10 @@ import { getCatering, listCatering, updateCatering -} from "@/api/fantang/catering"; -import {listDepart} from "@/api/fantang/depart"; -import {getBedIdById, selectPatientByDepartId} from "@/api/fantang/patient"; -import {listNutritionFood} from "@/api/fantang/nutritionFood"; +} from "../../../api/fantang/catering"; +import {listDepart} from "../../../api/fantang/depart"; +import {getBedIdById, selectNoCateringByDepartId} from "../../../api/fantang/patient"; +import {listNutritionFood} from "../../../api/fantang/nutritionFood"; import {cancelCatering, copyAndAdd, getByPatient} from "../../../api/fantang/catering"; export default { @@ -656,6 +656,7 @@ export default { }) }, methods: { + // 格式化数据列“用法”显示文本 cateringUsageFormat(row) { if (row.cateringUsage === 1 || row.cateringUsage === '1') { return "鼻饲"; @@ -666,6 +667,7 @@ export default { } }, + // 格式化数据列“启用”显示文本 formatFlag(row) { if (row.flag === true) { return "启用"; @@ -759,7 +761,7 @@ export default { // 响应科室信息切换 changeDepart(value) { const _this = this; - selectPatientByDepartId(value).then(response => { + selectNoCateringByDepartId(value).then(response => { _this.patientOptions = response.data; _this.form.patientId = null; });