mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
优化:切换科室时,筛选所有没有配置营养配餐的病患列表;
This commit is contained in:
parent
1859407349
commit
3028d74ac9
@ -156,6 +156,7 @@ public class ClientPatientController extends BaseController {
|
||||
public AjaxResult getFoodPrice() {
|
||||
QueryWrapper<FtFoodDao> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("type", 1);
|
||||
wrapper.gt("dinner_type", 0);
|
||||
return AjaxResult.success(iftFoodDaoService.list(wrapper));
|
||||
}
|
||||
|
||||
|
||||
@ -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<FtPatientDao> list = iFtPatientDaoService.selectNoCateringByDepartId(departId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据 patientId 查询病人床号
|
||||
*/
|
||||
|
||||
@ -55,4 +55,7 @@ public interface FtPatientDaoMapper extends BaseMapper<FtPatientDao> {
|
||||
List<FtPatientVo> getReportMealsToday(@Param("createAt") String createAt, @Param("patientId") Long patientId);
|
||||
|
||||
List<FtPatientVo> 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<FtPatientDao> selectNoCateringByDepartId(@Param("departId") Long departId);
|
||||
}
|
||||
|
||||
@ -19,4 +19,6 @@ public interface IFtPatientDaoService extends IService<FtPatientDao> {
|
||||
AjaxResult getReportMealsToday(String createAt, Long patientId);
|
||||
|
||||
List<FtPatientVo> getReportMealsByDepart(Long departId, String createAt);
|
||||
|
||||
List<FtPatientDao> selectNoCateringByDepartId(Long departId);
|
||||
}
|
||||
|
||||
@ -29,4 +29,9 @@ public class FtPatientDaoServiceImpl extends ServiceImpl<FtPatientDaoMapper, FtP
|
||||
public List<FtPatientVo> getReportMealsByDepart(Long departId, String createAt) {
|
||||
return this.baseMapper.getReportMealsByDepart(departId,createAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FtPatientDao> selectNoCateringByDepartId(Long departId) {
|
||||
return this.baseMapper.selectNoCateringByDepartId(departId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleCancel"
|
||||
v-hasPermi="['fantang:catering:remove']"
|
||||
>作废
|
||||
>暂停
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -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;
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user