病患默认配餐配置表,报餐表添加营养配餐开通标志字段
This commit is contained in:
parent
e940708d52
commit
d0f5c425b2
@ -190,18 +190,13 @@ public class FtCateringDaoController extends BaseController {
|
|||||||
@PutMapping("/paste")
|
@PutMapping("/paste")
|
||||||
public AjaxResult paste(@RequestBody JSONObject params) {
|
public AjaxResult paste(@RequestBody JSONObject params) {
|
||||||
|
|
||||||
System.out.println(params);
|
|
||||||
|
|
||||||
List<Long> ids = params.getJSONArray("ids").toJavaList(Long.class);
|
List<Long> ids = params.getJSONArray("ids").toJavaList(Long.class);
|
||||||
|
|
||||||
List<FtCateringDao> ftCateringDaoList = params.getJSONArray("copyItem").toJavaList(FtCateringDao.class);
|
List<FtCateringDao> ftCateringDaoList = params.getJSONArray("copyItem").toJavaList(FtCateringDao.class);
|
||||||
|
|
||||||
|
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
iFtCateringDaoService.paste(id,ftCateringDaoList);
|
iFtCateringDaoService.paste(id,ftCateringDaoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return AjaxResult.success("已修改");
|
return AjaxResult.success("已修改");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,4 +132,6 @@ public class FtFoodDemandDao extends BasePatient implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String nutritionFood;
|
private String nutritionFood;
|
||||||
|
|
||||||
|
private Boolean openFlag;
|
||||||
}
|
}
|
||||||
|
@ -136,4 +136,6 @@ public class FtReportMealsDao implements Serializable {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer total;
|
private Integer total;
|
||||||
|
|
||||||
|
private Boolean openFlag;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, F
|
|||||||
|
|
||||||
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
||||||
foodDemandDao.setNutritionFoodFlag(false);
|
foodDemandDao.setNutritionFoodFlag(false);
|
||||||
|
foodDemandDao.setOpenFlag(false);
|
||||||
|
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
UpdateWrapper<FtCateringDao> wrapper = new UpdateWrapper<>();
|
UpdateWrapper<FtCateringDao> wrapper = new UpdateWrapper<>();
|
||||||
@ -152,6 +153,7 @@ public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, F
|
|||||||
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
||||||
foodDemandDao.setNutritionFoodId(cateringDao.getNumber());
|
foodDemandDao.setNutritionFoodId(cateringDao.getNumber());
|
||||||
foodDemandDao.setNutritionFoodFlag(true);
|
foodDemandDao.setNutritionFoodFlag(true);
|
||||||
|
foodDemandDao.setOpenFlag(true);
|
||||||
QueryWrapper<FtFoodDemandDao> wrapper = new QueryWrapper<>();
|
QueryWrapper<FtFoodDemandDao> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("patient_id", patientId);
|
wrapper.eq("patient_id", patientId);
|
||||||
wrapper.eq("type", cateringDao.getType());
|
wrapper.eq("type", cateringDao.getType());
|
||||||
@ -169,10 +171,20 @@ public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, F
|
|||||||
ftCateringDao.setUpdateAt(new Date());
|
ftCateringDao.setUpdateAt(new Date());
|
||||||
ftCateringDao.setSuspendFlag(true);
|
ftCateringDao.setSuspendFlag(true);
|
||||||
|
|
||||||
|
FtFoodDemandDao ftFoodDemandDao = new FtFoodDemandDao();
|
||||||
|
ftFoodDemandDao.setOpenFlag(true);
|
||||||
|
ftFoodDemandDao.setUpdateAt(new Date());
|
||||||
|
|
||||||
|
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
UpdateWrapper<FtCateringDao> wrapper = new UpdateWrapper<>();
|
UpdateWrapper<FtCateringDao> wrapper = new UpdateWrapper<>();
|
||||||
wrapper.eq("patient_id", id);
|
wrapper.eq("patient_id", id);
|
||||||
rows += this.baseMapper.update(ftCateringDao, wrapper);
|
rows += this.baseMapper.update(ftCateringDao, wrapper);
|
||||||
|
|
||||||
|
// 更新该病患的报餐配置记录
|
||||||
|
UpdateWrapper<FtFoodDemandDao> foodDemandWrapper = new UpdateWrapper<>();
|
||||||
|
foodDemandWrapper.eq("patient_id", id);
|
||||||
|
foodDemandDaoService.update(ftFoodDemandDao, foodDemandWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rows;
|
return rows;
|
||||||
@ -202,6 +214,7 @@ public class FtCateringDaoServiceImpl extends ServiceImpl<FtCateringDaoMapper, F
|
|||||||
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
FtFoodDemandDao foodDemandDao = new FtFoodDemandDao();
|
||||||
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
foodDemandDao.setNutritionFoodId(ftCateringDao.getNumber());
|
||||||
foodDemandDao.setNutritionFoodFlag(ftCateringDao.getFlag());
|
foodDemandDao.setNutritionFoodFlag(ftCateringDao.getFlag());
|
||||||
|
foodDemandDao.setOpenFlag(ftCateringDao.getSuspendFlag());
|
||||||
QueryWrapper<FtFoodDemandDao> foodDemandWrapper = new QueryWrapper<>();
|
QueryWrapper<FtFoodDemandDao> foodDemandWrapper = new QueryWrapper<>();
|
||||||
foodDemandWrapper.eq("patient_id", id);
|
foodDemandWrapper.eq("patient_id", id);
|
||||||
foodDemandWrapper.eq("type", i + 1);
|
foodDemandWrapper.eq("type", i + 1);
|
||||||
|
@ -88,6 +88,7 @@ public class FtFoodDemandDaoServiceImpl extends ServiceImpl<FtFoodDemandDaoMappe
|
|||||||
FtFoodDemandDao foodDemand = foodDemandList.get(i);
|
FtFoodDemandDao foodDemand = foodDemandList.get(i);
|
||||||
foodDemand.setNutritionFoodId(ftCateringList.get(i).getNumber());
|
foodDemand.setNutritionFoodId(ftCateringList.get(i).getNumber());
|
||||||
foodDemand.setNutritionFoodFlag(ftCateringList.get(i).getFlag());
|
foodDemand.setNutritionFoodFlag(ftCateringList.get(i).getFlag());
|
||||||
|
foodDemand.setOpenFlag(true);
|
||||||
foodDemand.setUpdateAt(new Date());
|
foodDemand.setUpdateAt(new Date());
|
||||||
rows += this.baseMapper.updateById(foodDemand);
|
rows += this.baseMapper.updateById(foodDemand);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<result property="flag" column="flag"/>
|
<result property="flag" column="flag"/>
|
||||||
<result property="nutritionFoodId" column="nutrition_food_id"/>
|
<result property="nutritionFoodId" column="nutrition_food_id"/>
|
||||||
<result property="nutritionFoodFlag" column="nutrition_food_flag"/>
|
<result property="nutritionFoodFlag" column="nutrition_food_flag"/>
|
||||||
|
<result property="openFlag" column="open_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
|
<select id="listNewFormatter" resultType="com.ruoyi.system.fantang.domain.FtFoodDemandDao">
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<result property="meat" column="meat"/>
|
<result property="meat" column="meat"/>
|
||||||
<result property="rice" column="rice"/>
|
<result property="rice" column="rice"/>
|
||||||
<result property="egg" column="egg"/>
|
<result property="egg" column="egg"/>
|
||||||
|
<result property="openFlag" column="open_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="listMealsWithInSettle" resultType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
|
<select id="listMealsWithInSettle" resultType="com.ruoyi.system.fantang.domain.FtReportMealsDao">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user