修复预付费查询功能
This commit is contained in:
parent
f7b253e5d8
commit
43e075ad7d
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -71,23 +72,30 @@ public class FtPrepaymentDaoController extends BaseController {
|
||||
// 查询所有待缴费列表
|
||||
@PreAuthorize("@ss.hasPermi('fantang:prepayment:list')")
|
||||
@GetMapping("/listNoPrepay")
|
||||
public TableDataInfo listNoPrepay() {
|
||||
public TableDataInfo listNoPrepay(FtPrepaymentVo params) {
|
||||
startPage();
|
||||
return getDataTable(iFtPrepaymentDaoService.listNoPrepay());
|
||||
return getDataTable(iFtPrepaymentDaoService.listNoPrepay(params));
|
||||
}
|
||||
|
||||
// 查询所有已缴费列表
|
||||
@PreAuthorize("@ss.hasPermi('fantang:prepayment:list')")
|
||||
@GetMapping("/listPrepay")
|
||||
public AjaxResult listPrepay(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) {
|
||||
return AjaxResult.success(iFtPrepaymentDaoService.listPrepay(pageNum, pageSize));
|
||||
public TableDataInfo listPrepay(FtPrepaymentVo params) {
|
||||
startPage();
|
||||
if (params.getPrepaidAt() != null) {
|
||||
Date date = DateUtil.parse(params.getPrepaidAt().toString());
|
||||
params.setPrepaidAt(date);
|
||||
}
|
||||
return getDataTable(iFtPrepaymentDaoService.listPrepay(params));
|
||||
}
|
||||
|
||||
// 查询所有已结算列表
|
||||
@PreAuthorize("@ss.hasPermi('fantang:prepayment:list')")
|
||||
@GetMapping("/listAllPrepay")
|
||||
public TableDataInfo listAllPrepay() {
|
||||
List<FtPrepaymentVo> list = iFtPrepaymentDaoService.listAllPrepay();
|
||||
public TableDataInfo listAllPrepay(FtPrepaymentVo params) {
|
||||
startPage();
|
||||
|
||||
List<FtPrepaymentVo> list = iFtPrepaymentDaoService.listAllPrepay(params);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class FtPrepaymentDao implements Serializable {
|
||||
/**
|
||||
* 预付费时间
|
||||
*/
|
||||
@Excel(name = "预付费时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预付费时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date prepaidAt;
|
||||
}
|
||||
|
@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -18,12 +20,10 @@ import java.util.List;
|
||||
*/
|
||||
public interface FtPrepaymentDaoMapper extends BaseMapper<FtPrepaymentDao> {
|
||||
|
||||
@Select("select a.patient_id , a.name, a.hospital_id, a.bed_id, b.depart_name, b.depart_code from ft_patient a LEFT JOIN ft_depart b on a.depart_id = b.depart_id where a.patient_id not in (select patient_id from ft_prepayment )")
|
||||
List<FtPrepaymentVo> listNoPrepay();
|
||||
List<FtPrepaymentVo> listNoPrepay(FtPrepaymentVo params);
|
||||
|
||||
@Select("SELECT a.*,b.hospital_id, b.name, b.bed_id, c.depart_name from ft_prepayment a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 0")
|
||||
IPage<FtPrepaymentVo> listPrepay(Page<FtOrderDao> page);
|
||||
List<FtPrepaymentVo> listPrepay(FtPrepaymentVo params);
|
||||
|
||||
List<FtPrepaymentVo> listAllPrepay(FtPrepaymentVo params);
|
||||
|
||||
@Select("SELECT a.*,b.hospital_id, b.name, b.bed_id, c.depart_name from ft_prepayment a LEFT JOIN ft_patient b on a.patient_id = b.patient_id LEFT JOIN ft_depart c on b.depart_id = c.depart_id where a.settlement_flag = 1")
|
||||
List<FtPrepaymentVo> listAllPrepay();
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentVo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -15,11 +16,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface IFtPrepaymentDaoService extends IService<FtPrepaymentDao> {
|
||||
|
||||
List<FtPrepaymentVo> listNoPrepay();
|
||||
List<FtPrepaymentVo> listNoPrepay(FtPrepaymentVo params);
|
||||
|
||||
IPage<FtPrepaymentVo> listPrepay(Integer pageNum, Integer pageSize);
|
||||
List<FtPrepaymentVo> listPrepay(FtPrepaymentVo params);
|
||||
|
||||
List<FtPrepaymentVo> listAllPrepay();
|
||||
List<FtPrepaymentVo> listAllPrepay(FtPrepaymentVo params);
|
||||
|
||||
FtPrepaymentVo getCountById(Long patiendId);
|
||||
|
||||
|
@ -11,6 +11,7 @@ import com.ruoyi.system.fantang.mapper.FtPrepaymentDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtPrepaymentDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -23,19 +24,18 @@ import java.util.List;
|
||||
public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMapper, FtPrepaymentDao> implements IFtPrepaymentDaoService {
|
||||
|
||||
@Override
|
||||
public List<FtPrepaymentVo> listNoPrepay() {
|
||||
return this.baseMapper.listNoPrepay();
|
||||
public List<FtPrepaymentVo> listNoPrepay(FtPrepaymentVo params) {
|
||||
return this.baseMapper.listNoPrepay(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<FtPrepaymentVo> listPrepay(Integer pageNum, Integer pageSize) {
|
||||
Page<FtOrderDao> page = new Page<>(pageNum, pageSize);
|
||||
return this.baseMapper.listPrepay(page);
|
||||
public List<FtPrepaymentVo> listPrepay(FtPrepaymentVo params) {
|
||||
return this.baseMapper.listPrepay(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FtPrepaymentVo> listAllPrepay() {
|
||||
return this.baseMapper.listAllPrepay();
|
||||
public List<FtPrepaymentVo> listAllPrepay(FtPrepaymentVo params) {
|
||||
return this.baseMapper.listAllPrepay(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,6 +21,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="hospitalId" column="hospital_id" />
|
||||
<result property="departCode" column="depart_code" />
|
||||
</resultMap>
|
||||
<select id="listAllPrepay" resultType="com.ruoyi.system.fantang.domain.FtPrepaymentVo">
|
||||
SELECT a.*,b.hospital_id, b.name, b.bed_id, c.depart_name
|
||||
from ft_prepayment a
|
||||
LEFT JOIN ft_patient b on a.patient_id = b.patient_id
|
||||
LEFT JOIN ft_depart c on b.depart_id = c.depart_id
|
||||
where a.settlement_flag = 1
|
||||
<if test="name != null and name !=''">and b.name = #{name}</if>
|
||||
<if test="hospitalId != null and hospitalId !=''">and b.hospital_id = #{hospitalId}</if>
|
||||
<if test="prepaidAt != null">and a.prepaid_at = #{prepaidAt}</if>
|
||||
</select>
|
||||
<select id="listNoPrepay" resultType="com.ruoyi.system.fantang.domain.FtPrepaymentVo">
|
||||
select a.patient_id , a.name, a.hospital_id, a.bed_id, b.depart_name, b.depart_code
|
||||
from ft_patient a
|
||||
LEFT JOIN ft_depart b on a.depart_id = b.depart_id
|
||||
where a.patient_id not in (select patient_id from ft_prepayment )
|
||||
<if test="name != null and name !=''">and a.name = #{name}</if>
|
||||
<if test="hospitalId != null and hospitalId !=''">and a.hospital_id = #{hospitalId}</if>
|
||||
</select>
|
||||
<select id="listPrepay" resultType="com.ruoyi.system.fantang.domain.FtPrepaymentVo">
|
||||
SELECT a.*,b.hospital_id, b.name, b.bed_id, c.depart_name
|
||||
from ft_prepayment a
|
||||
LEFT JOIN ft_patient b on a.patient_id = b.patient_id
|
||||
LEFT JOIN ft_depart c on b.depart_id = c.depart_id
|
||||
where a.settlement_flag = 0
|
||||
<if test="name != null and name !=''">and b.name = #{name}</if>
|
||||
<if test="hospitalId != null and hospitalId !=''">and b.hospital_id = #{hospitalId}</if>
|
||||
<if test="prepaidAt != null">and to_days(a.prepaid_at) = to_days(#{prepaidAt})</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -59,7 +59,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-s-claim"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="clickSettle(scope.row)"
|
||||
v-hasPermi="['fantang:prepayment:remove']"
|
||||
v-if="scope.row.noPrepayment"
|
||||
>出院结清
|
||||
@ -95,7 +95,10 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改收费管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:modal="true">
|
||||
<el-form ref="formAddPrepayment" :model="formAddPrepayment" :rules="rules" label-width="120px">
|
||||
<el-form-item label="住院号" prop="hospitalId">
|
||||
<el-autocomplete
|
||||
@ -130,9 +133,9 @@
|
||||
placeholder="请输入预付费金额"
|
||||
style="width: 250px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预付费时间" prop="prepaidAt">
|
||||
<el-form-item label="预付费时间" prop="collectAt">
|
||||
<el-date-picker clearable size="small" style="width: 250px"
|
||||
v-model="formAddPrepayment.prepaidAt"
|
||||
v-model="formAddPrepayment.collectAt"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
readonly
|
||||
@ -142,7 +145,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitformAddPrepayment">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button @click="cancel">关 闭</el-button>
|
||||
<el-button @click="clickPrintSettle">打印收据</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -211,7 +215,13 @@ export default {
|
||||
name: null,
|
||||
},
|
||||
// 表单参数
|
||||
formAddPrepayment: {},
|
||||
formAddPrepayment: {
|
||||
hospitalId: null,
|
||||
name: null,
|
||||
prepaid: null,
|
||||
collectAt: null,
|
||||
row: null
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
prepaid: [
|
||||
@ -233,21 +243,39 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
clickPrintSettle() {
|
||||
this.handleGenerateReceiptPdf(this.formAddPrepayment.row);
|
||||
},
|
||||
|
||||
// 相应处理出院结清功能
|
||||
clickSettle(row) {
|
||||
this.open = true;
|
||||
getPrepayment(row.prepaymentId).then(response =>{
|
||||
console.log(response);
|
||||
this.formAddPrepayment.hospitalId = row.hospitalId;
|
||||
this.formAddPrepayment.name = row.name;
|
||||
this.formAddPrepayment.collectAt = response.data.prepayment = response.data.collectAt;
|
||||
this.formAddPrepayment.prepaid = response.data.prepaid;
|
||||
this.formAddPrepayment.row = row;
|
||||
});
|
||||
},
|
||||
// 获取数据列表,跟进筛选条件不同获取不同类型的数据
|
||||
getList() {
|
||||
if (this.queryParams.settlementFlag === 0) {
|
||||
// 查询已交预付费信息
|
||||
listPrepay(this.queryParams).then(response => {
|
||||
this.prepaymentList = response.data.records.map((item) => {
|
||||
console.log(response);
|
||||
this.prepaymentList = response.rows.map((item) => {
|
||||
console.log(item);
|
||||
item.noPrepayment = true;
|
||||
return item;
|
||||
});
|
||||
this.total = response.data.total;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.getDefaultNoPrepayment();
|
||||
this.getDefaultNoPrepayment(this.queryParams);
|
||||
}
|
||||
|
||||
},
|
||||
@ -291,7 +319,7 @@ export default {
|
||||
},
|
||||
|
||||
buildSuggestionList() {
|
||||
listNoPrepayment().then(response => {
|
||||
listNoPrepayment(this.queryParams).then(response => {
|
||||
console.log("aaaaaaaaaaaaa", response);
|
||||
let prepaymentList = response.rows;
|
||||
this.suggestionList = prepaymentList.map(item => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user