优化:切换科室时,筛选所有没有配置营养配餐的病患列表;

This commit is contained in:
czx 2021-01-18 10:38:46 +08:00
parent 1859407349
commit 3028d74ac9
7 changed files with 38 additions and 6 deletions

View File

@ -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));
}

View File

@ -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 查询病人床号
*/

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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({

View File

@ -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;
});