改造实现输入建议内容
This commit is contained in:
parent
0d16f9158a
commit
63e2052b9a
@ -10,6 +10,7 @@ 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.vo.FtPrepaymentVo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -31,6 +32,15 @@ public class FtPrepaymentDaoController extends BaseController {
|
||||
|
||||
private final IFtPrepaymentDaoService iFtPrepaymentDaoService;
|
||||
|
||||
// 查询所有待缴费列表
|
||||
@PreAuthorize("@ss.hasPermi('fantang:prepayment:list')")
|
||||
@GetMapping("/listNoPrepay")
|
||||
public TableDataInfo listNoPrepay(FtPrepaymentDao ftPrepaymentDao) {
|
||||
List<FtPrepaymentVo> list = iFtPrepaymentDaoService.listNoPrepay();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询收费管理列表
|
||||
*/
|
||||
|
@ -2,6 +2,10 @@ package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.vo.FtPrepaymentVo;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收费管理Mapper接口
|
||||
@ -11,4 +15,6 @@ import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
*/
|
||||
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 )")
|
||||
public List<FtPrepaymentVo> listNoPrepay();
|
||||
}
|
||||
|
@ -2,6 +2,9 @@ package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.vo.FtPrepaymentVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收费管理Service接口
|
||||
@ -11,4 +14,5 @@ import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
*/
|
||||
public interface IFtPrepaymentDaoService extends IService<FtPrepaymentDao> {
|
||||
|
||||
List<FtPrepaymentVo> listNoPrepay();
|
||||
}
|
||||
|
@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtPrepaymentDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtPrepaymentDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtPrepaymentDaoService;
|
||||
import com.ruoyi.system.fantang.vo.FtPrepaymentVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收费管理Service业务层处理
|
||||
*
|
||||
@ -15,4 +18,8 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMapper, FtPrepaymentDao> implements IFtPrepaymentDaoService {
|
||||
|
||||
@Override
|
||||
public List<FtPrepaymentVo> listNoPrepay() {
|
||||
return this.baseMapper.listNoPrepay();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
package com.ruoyi.system.fantang.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 收费管理对象 ft_prepayment
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-11-19
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("ft_prepayment")
|
||||
public class FtPrepaymentVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* select a.patient_id , a.name, a.hospital_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 )
|
||||
*/
|
||||
private String name;
|
||||
|
||||
private String bedId;
|
||||
|
||||
private String departName;
|
||||
|
||||
private String hospitalId;
|
||||
|
||||
private String departCode;
|
||||
|
||||
/**
|
||||
* 预付费id
|
||||
*/
|
||||
@TableId(value = "prepayment_id")
|
||||
private Long prepaymentId;
|
||||
|
||||
/**
|
||||
* 病人id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 收款时间
|
||||
*/
|
||||
@Excel(name = "收款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date collectAt;
|
||||
|
||||
/**
|
||||
* 收款员
|
||||
*/
|
||||
private Long collectBy;
|
||||
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
@Excel(name = "结算时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date settlementAt;
|
||||
|
||||
/**
|
||||
* 结算员
|
||||
*/
|
||||
private Long settlementBy;
|
||||
|
||||
/**
|
||||
* 结算报表id
|
||||
*/
|
||||
private Long settlementId;
|
||||
|
||||
/**
|
||||
* 结算标志
|
||||
*/
|
||||
@Excel(name = "结算标志")
|
||||
private Long settlementFlag;
|
||||
|
||||
/**
|
||||
* 预付费金额
|
||||
*/
|
||||
@Excel(name = "预付费金额")
|
||||
private BigDecimal prepaid;
|
||||
|
||||
/**
|
||||
* 预付费时间
|
||||
*/
|
||||
@Excel(name = "预付费时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date prepaidAt;
|
||||
}
|
@ -1,5 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询所有未缴预付费病人列表
|
||||
export function listNoPrepayment() {
|
||||
return request({
|
||||
url: '/fantang/prepayment/listNoPrepay',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询收费管理列表
|
||||
export function listPrepayment(query) {
|
||||
return request({
|
||||
@ -50,4 +63,4 @@ export function exportPrepayment(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -152,8 +152,12 @@
|
||||
@click="handleIconClick">
|
||||
</i>
|
||||
<template slot-scope="{ item }">
|
||||
<div class="name">{{ item.value }}</div>
|
||||
<span class="addr">{{ item.address }}</span>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
<span class="addr">
|
||||
{{ item.departName }}
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
{{ item.bedId}}
|
||||
</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
</el-form-item>
|
||||
@ -187,6 +191,7 @@
|
||||
exportPrepayment,
|
||||
getPrepayment,
|
||||
listPrepayment,
|
||||
listNoPrepayment,
|
||||
updatePrepayment
|
||||
} from "@/api/fantang/prepayment";
|
||||
|
||||
@ -195,7 +200,8 @@
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
restaurants: [],
|
||||
suggestionList:[],
|
||||
NoPrepayments: [],
|
||||
state: '',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -245,13 +251,16 @@
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
this.restaurants = this.loadAll();
|
||||
this.loadAll();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 响应自动查询回显
|
||||
querySearch(queryString, cb) {
|
||||
var restaurants = this.restaurants;
|
||||
var restaurants = this.suggestionList;
|
||||
console.log("restaurants-->", restaurants);
|
||||
console.log("queryString", queryString)
|
||||
console.log("cb-->", cb)
|
||||
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
||||
// 调用 callback 返回建议列表的数据
|
||||
cb(results);
|
||||
@ -266,9 +275,18 @@
|
||||
|
||||
// 填充所有待缴预付伙食费的病人清单
|
||||
loadAll() {
|
||||
return [
|
||||
{ "value": "南拳妈妈龙虾盖浇饭", "address": "普陀区金沙江路1699号鑫乐惠美食广场A13" }
|
||||
];
|
||||
listNoPrepayment().then(response => {
|
||||
this.NoPrepayments = response.rows;
|
||||
this.suggestionList = this.NoPrepayments.map(item => {
|
||||
return {
|
||||
"value": item.hospitalId,
|
||||
"departName": item.departName,
|
||||
"name": item.name,
|
||||
"bedId": item.bedId,
|
||||
}
|
||||
});
|
||||
return response.rows;
|
||||
});
|
||||
},
|
||||
|
||||
// 处理自动查询列表选择的事件
|
||||
@ -286,7 +304,7 @@
|
||||
listPrepayment(this.queryParams).then(response => {
|
||||
this.prepaymentList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
this.loadAll();
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
|
Loading…
x
Reference in New Issue
Block a user