修复病人配餐查询

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")
public TableDataInfo list(FtFoodDemandDao ftFoodDemandDao) {
startPage();
LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao);
// LambdaQueryWrapper<FtFoodDemandDao> lqw = Wrappers.lambdaQuery(ftFoodDemandDao);
// List<FtFoodDemandDao> list = iFtFoodDemandDaoService.list(lqw);
List<FtFoodDemandDao> list = iFtFoodDemandDaoService.listNewFormatter(ftFoodDemandDao);
return getDataTable(list);

View File

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

View File

@ -23,8 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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
<if test="name != null">and b.name = #{name}</if>
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
<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="flag != null">and a.flag = #{flag}</if>
</select>
</mapper>

View File

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