修复 日常收费 - 收费 弹出层错误
This commit is contained in:
parent
ef75dedb13
commit
f0ac254e43
@ -10,8 +10,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.service.IFtPrepaymentDaoService;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
|
||||
import com.ruoyi.system.fantang.service.IFtPrepaymentDaoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -48,15 +48,21 @@ public class FtPrepaymentDaoController extends BaseController {
|
||||
* 作者:陈智兴
|
||||
* 日期:2020年12月2日
|
||||
* 功能: 前端查询预付款情况
|
||||
*
|
||||
* @param patientId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getPrepaymentByPatientId/{patientId}")
|
||||
public AjaxResult getPrepaymentByPatientId(@PathVariable("patientId") Long patientId) {
|
||||
FtPrepaymentVo dao = iFtPrepaymentDaoService.getCountById(patientId);
|
||||
if (dao == null)
|
||||
// FtPrepaymentVo dao = iFtPrepaymentDaoService.getCountById(patientId);
|
||||
// if (dao == null)
|
||||
// return AjaxResult.error("无该记录");
|
||||
// return AjaxResult.success("操作成功", dao);
|
||||
FtPrepaymentDao ftPrepaymentDao = iFtPrepaymentDaoService.getByPatientId(patientId);
|
||||
if (ftPrepaymentDao == null){
|
||||
return AjaxResult.error("无该记录");
|
||||
return AjaxResult.success("操作成功", dao);
|
||||
}
|
||||
return AjaxResult.success("操作成功", ftPrepaymentDao);
|
||||
}
|
||||
|
||||
// 查询所有待缴费列表
|
||||
|
@ -21,4 +21,6 @@ public interface IFtPrepaymentDaoService extends IService<FtPrepaymentDao> {
|
||||
List<FtPrepaymentVo> listAllPrepay();
|
||||
|
||||
FtPrepaymentVo getCountById(Long patiendId);
|
||||
|
||||
FtPrepaymentDao getByPatientId(Long patientId);
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ package com.ruoyi.system.fantang.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
|
||||
import com.ruoyi.system.fantang.mapper.FtPrepaymentDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtPrepaymentDaoService;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@ -37,9 +37,16 @@ public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMappe
|
||||
@Override
|
||||
public FtPrepaymentVo getCountById(Long patiendId) {
|
||||
QueryWrapper<FtPrepaymentDao> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("patient_Id",patiendId);
|
||||
queryWrapper.eq("patient_Id", patiendId);
|
||||
FtPrepaymentDao prepaymentDao = this.baseMapper.selectOne(queryWrapper);
|
||||
return (FtPrepaymentVo)prepaymentDao;
|
||||
return (FtPrepaymentVo) prepaymentDao;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public FtPrepaymentDao getByPatientId(Long patientId) {
|
||||
QueryWrapper<FtPrepaymentDao> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("patient_Id", patientId);
|
||||
return this.baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user