病人配餐设置页面改造
This commit is contained in:
parent
d04a9c5cbb
commit
4bec2d207f
@ -97,6 +97,7 @@ public class FtCateringDaoController extends BaseController {
|
|||||||
foodDemandDao.setType(type);
|
foodDemandDao.setType(type);
|
||||||
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
||||||
foodDemandDao.setCreateAt(new Date());
|
foodDemandDao.setCreateAt(new Date());
|
||||||
|
foodDemandDao.setNutritionFoodFlag(0);
|
||||||
iFtFoodDemandDaoService.save(foodDemandDao);
|
iFtFoodDemandDaoService.save(foodDemandDao);
|
||||||
} else {
|
} else {
|
||||||
QueryWrapper<FtFoodDemandDao> wrapper = new QueryWrapper<>();
|
QueryWrapper<FtFoodDemandDao> wrapper = new QueryWrapper<>();
|
||||||
@ -105,6 +106,7 @@ public class FtCateringDaoController extends BaseController {
|
|||||||
FtFoodDemandDao foodDemandDao = iFtFoodDemandDaoService.getOne(wrapper);
|
FtFoodDemandDao foodDemandDao = iFtFoodDemandDaoService.getOne(wrapper);
|
||||||
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
||||||
foodDemandDao.setUpdateAt(new Date());
|
foodDemandDao.setUpdateAt(new Date());
|
||||||
|
foodDemandDao.setNutritionFoodFlag(0);
|
||||||
iFtFoodDemandDaoService.updateById(foodDemandDao);
|
iFtFoodDemandDaoService.updateById(foodDemandDao);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.system.fantang.domain;
|
package com.ruoyi.system.fantang.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@ -125,4 +126,10 @@ public class FtFoodDemandDao extends BasePatient implements Serializable {
|
|||||||
* 营养餐标志
|
* 营养餐标志
|
||||||
**/
|
**/
|
||||||
private Integer nutritionFoodFlag;
|
private Integer nutritionFoodFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养餐名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nutritionFood;
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,37 @@
|
|||||||
</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
|
SELECT
|
||||||
JOIN ft_depart c on b.depart_id = c.depart_id on a.patient_id = b.patient_id where b.off_flag = 0
|
a.*,
|
||||||
|
b.`name`,
|
||||||
|
b.bed_id,
|
||||||
|
c.depart_name,
|
||||||
|
b.hospital_id,
|
||||||
|
d.`name` AS nutrition_food
|
||||||
|
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
|
||||||
|
LEFT JOIN ft_nutrition_food d ON d.id = a.nutrition_food_id
|
||||||
|
WHERE
|
||||||
|
b.off_flag = 0
|
||||||
<if test="name != null and name !=''">and b.name = #{name}</if>
|
<if test="name != null and name !=''">and b.name = #{name}</if>
|
||||||
<if test="bedId != null">and b.bed_id = #{bedId}</if>
|
<if test="bedId != null">and b.bed_id = #{bedId}</if>
|
||||||
<if test="departId != null">and b.depart_id = #{departId}</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>
|
<if test="flag != null">and a.flag = #{flag}</if>
|
||||||
|
ORDER BY
|
||||||
|
patient_id ASC,
|
||||||
|
type ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByIdNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
|
<select id="getByIdNewFormatter" 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
|
select a.*, b.name, b.bed_id, c.depart_name, b.hospital_id
|
||||||
JOIN ft_depart c on b.depart_id = c.depart_id on a.patient_id = b.patient_id where b.off_flag = 0 and a.id =
|
from ft_food_demand a
|
||||||
#{id}
|
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
|
||||||
|
and a.id =
|
||||||
|
#{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user