修复修改病人配餐不能读取病人信息 bug

This commit is contained in:
ryoeiken 2020-12-07 23:23:37 +08:00
parent 92e53c810a
commit 42d10696c3
6 changed files with 17 additions and 3 deletions

View File

@ -64,7 +64,8 @@ public class FtFoodDemandDaoController extends BaseController {
@PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')") @PreAuthorize("@ss.hasPermi('fantang:foodDemand:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(iFtFoodDemandDaoService.getById(id)); FtFoodDemandDao ftFoodDemandDao = iFtFoodDemandDaoService.getByIdNewFormatter(id);
return AjaxResult.success(ftFoodDemandDao);
} }
/** /**

View File

@ -23,4 +23,6 @@ public interface FtFoodDemandDaoMapper extends BaseMapper<FtFoodDemandDao> {
public List<Long> getNewPatientNotDemand(); public List<Long> getNewPatientNotDemand();
List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao); List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao);
FtFoodDemandDao getByIdNewFormatter(Long id);
} }

View File

@ -18,4 +18,6 @@ public interface IFtFoodDemandDaoService extends IService<FtFoodDemandDao> {
public Integer GenerateOrderForNewPatient() ; public Integer GenerateOrderForNewPatient() ;
List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao); List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao);
FtFoodDemandDao getByIdNewFormatter(Long id);
} }

View File

@ -1,6 +1,5 @@
package com.ruoyi.system.fantang.service.impl; package com.ruoyi.system.fantang.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.fantang.domain.FtFoodDemandDao; import com.ruoyi.system.fantang.domain.FtFoodDemandDao;
import com.ruoyi.system.fantang.mapper.FtFoodDemandDaoMapper; import com.ruoyi.system.fantang.mapper.FtFoodDemandDaoMapper;
@ -38,4 +37,9 @@ public class FtFoodDemandDaoServiceImpl extends ServiceImpl<FtFoodDemandDaoMappe
public List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao) { public List<FtFoodDemandDao> listNewFormatter(FtFoodDemandDao ftFoodDemandDao) {
return this.baseMapper.listNewFormatter(ftFoodDemandDao); return this.baseMapper.listNewFormatter(ftFoodDemandDao);
} }
@Override
public FtFoodDemandDao getByIdNewFormatter(Long id) {
return this.baseMapper.getByIdNewFormatter(id);
}
} }

View File

@ -31,4 +31,10 @@
<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>
</select> </select>
<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
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>
</mapper> </mapper>

View File

@ -260,7 +260,6 @@ export default {
this.updateFromOptions = response.data; this.updateFromOptions = response.data;
}); });
listDepart().then(response => { listDepart().then(response => {
console.log(response);
this.departOptions = response.rows; this.departOptions = response.rows;
}) })
}, },