修复病人配餐查询

This commit is contained in:
ryoeiken 2020-12-07 16:06:10 +08:00
parent 99abbdb015
commit 3bb9e8a105
4 changed files with 49 additions and 32 deletions

View File

@ -39,7 +39,7 @@ public class FtFoodDemandDaoController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) { public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) {
startPage(); startPage();
LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao); // LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao);
// List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw); // List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.listNewFormatter(ftFoodDemandDao); List<FtFoodDemandDao> list = iFtFoodDemandDaoService.listNewFormatter(ftFoodDemandDao);
return getDataTable(list); return getDataTable(list);

View File

@ -115,4 +115,6 @@ public class FtFoodDemandDao extends BasePatient implements Serializable {
*/ */
@Excel(name = "启用状态") @Excel(name = "启用状态")
private Boolean flag; private Boolean flag;
private Long departId;
} }

View File

@ -23,8 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao"> <select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
select a.*, b.name, b.bed_id, c.depart_name, b.hospital_id from ft_food_demand a LEFT JOIN ft_patient b LEFT JOIN ft_depart c on b.depart_id = c.depart_id on a.patient_id = b.patient_id where b.off_flag = 0 select a.*, b.name, b.bed_id, c.depart_name, b.hospital_id from ft_food_demand a LEFT JOIN ft_patient b LEFT
<if test="name != null">and b.name = #{name}</if> JOIN ft_depart c on b.depart_id = c.depart_id on a.patient_id = b.patient_id where b.off_flag = 0
<if test="name != null and name !=''">and b.name = #{name}</if>
<if test="bedId != null">and b.bed_id = #{bedId}</if>
<if test="departId != null">and b.depart_id = #{departId}</if>
<if test="hospitalId != null">and b.hospital_id = #{hospitalId}</if> <if test="hospitalId != null">and b.hospital_id = #{hospitalId}</if>
<if test="flag != null">and a.flag = #{flag}</if>
</select> </select>
</mapper> </mapper>

View File

@ -19,14 +19,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="科室" prop="departName"> <el-form-item label="科室" prop="departId">
<el-input <el-select v-model="queryParams.departId" placeholder="请选择科室">
v-model="queryParams.departName" <el-option
placeholder="请输入科室" v-for="item in departOptions"
clearable :key="item.departName"
size="small" :label="item.departName"
@keyup.enter.native="handleQuery" :value="item.departId">
/> </el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="住院号" prop="hospitalId"> <el-form-item label="住院号" prop="hospitalId">
<el-input <el-input
@ -191,12 +192,14 @@ import {
updateFoodDemand updateFoodDemand
} from "@/api/fantang/foodDemand"; } from "@/api/fantang/foodDemand";
import {listFood} from "@/api/fantang/food"; import {listFood} from "@/api/fantang/food";
import {listDepart} from "@/api/fantang/depart";
export default { export default {
name: "FoodDemand", name: "FoodDemand",
components: {}, components: {},
data() { data() {
return { return {
departOptions:[],
foodList: [], foodList: [],
flagOptions: [{ flagOptions: [{
value: 1, value: 1,
@ -231,7 +234,11 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
flag: null flag: null,
name: null,
bedId: null,
departName: null,
hospitalId: null,
}, },
// //
form: {}, form: {},
@ -252,6 +259,10 @@ export default {
this.getDicts("ft_update_from").then(response => { this.getDicts("ft_update_from").then(response => {
this.updateFromOptions = response.data; this.updateFromOptions = response.data;
}); });
listDepart().then(response => {
console.log(response);
this.departOptions = response.rows;
})
}, },
beforeCreate() { beforeCreate() {