修复病人配餐查询
This commit is contained in:
parent
99abbdb015
commit
3bb9e8a105
@ -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);
|
||||
|
@ -115,4 +115,6 @@ public class FtFoodDemandDao extends BasePatient implements Serializable {
|
||||
*/
|
||||
@Excel(name = "启用状态")
|
||||
private Boolean flag;
|
||||
|
||||
private Long departId;
|
||||
}
|
||||
|
@ -1,30 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtFoodDemandDaoMapper">
|
||||
|
||||
<resultMap type="FtFoodDemandDao" id="FtFoodDemandDaoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="foods" column="foods" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateAt" column="update_at" />
|
||||
<result property="vegetables" column="vegetables" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="meat" column="meat" />
|
||||
<result property="updateFrom" column="update_from" />
|
||||
<result property="rice" column="rice" />
|
||||
<result property="egg" column="egg" />
|
||||
<result property="orderInfo" column="order_info" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="foods" column="foods"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="createAt" column="create_at"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateAt" column="update_at"/>
|
||||
<result property="vegetables" column="vegetables"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="meat" column="meat"/>
|
||||
<result property="updateFrom" column="update_from"/>
|
||||
<result property="rice" column="rice"/>
|
||||
<result property="egg" column="egg"/>
|
||||
<result property="orderInfo" column="order_info"/>
|
||||
<result property="flag" column="flag"/>
|
||||
</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>
|
@ -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
|
||||
@ -93,7 +94,7 @@
|
||||
<el-table-column label="加菜" align="center" prop="vegetables" width="80px" :formatter="formatVegetables"/>
|
||||
<el-table-column label="加肉" align="center" prop="meat" width="80px" :formatter="formatMeat"/>
|
||||
<el-table-column label="加饭" align="center" prop="rice" width="80px" :formatter="formatRice"/>
|
||||
<el-table-column label="加蛋" align="center" prop="egg" width="80px" />
|
||||
<el-table-column label="加蛋" align="center" prop="egg" width="80px"/>
|
||||
<el-table-column label="营养配餐" align="center" prop="nutritionFood" width="120px"/>
|
||||
<!-- <el-table-column label="更新日期" align="center" prop="updateAt" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
@ -191,13 +192,15 @@ 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 {
|
||||
foodList:[],
|
||||
departOptions:[],
|
||||
foodList: [],
|
||||
flagOptions: [{
|
||||
value: 1,
|
||||
label: '启用'
|
||||
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user