防止预付费重复收款
This commit is contained in:
parent
1f89abf51d
commit
81a2e5578e
8
pom.xml
8
pom.xml
@ -117,7 +117,13 @@
|
|||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
<version>${swagger.version}</version>
|
<version>${swagger.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 增加热部署依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖该项目的项目如果想要使用devtools,需要重新引入 -->
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
<!--io常用工具类 -->
|
<!--io常用工具类 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
|
@ -36,7 +36,8 @@ public class FtPrepaymentDaoController extends BaseController {
|
|||||||
|
|
||||||
@GetMapping("/getCountById/{patientId}")
|
@GetMapping("/getCountById/{patientId}")
|
||||||
public AjaxResult getCountById(@PathVariable("patientId") Long patiendId) {
|
public AjaxResult getCountById(@PathVariable("patientId") Long patiendId) {
|
||||||
return AjaxResult.success(iFtPrepaymentDaoService.getCountById(patiendId));
|
FtPrepaymentVo dao = iFtPrepaymentDaoService.getCountById(patiendId);
|
||||||
|
return AjaxResult.success("操作成功", dao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -128,9 +129,6 @@ public class FtPrepaymentDaoController extends BaseController {
|
|||||||
Long patientId = ftPrepaymentDao.getPatientId();
|
Long patientId = ftPrepaymentDao.getPatientId();
|
||||||
QueryWrapper<FtPrepaymentVo> wrapper = new QueryWrapper<>();
|
QueryWrapper<FtPrepaymentVo> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("patient_id", patientId);
|
wrapper.eq("patient_id", patientId);
|
||||||
if (iFtPrepaymentDaoService.getOne(wrapper).getSettlementFlag() == 1) {
|
|
||||||
return AjaxResult.error("该病人已付费");
|
|
||||||
}
|
|
||||||
|
|
||||||
ftPrepaymentDao.setCollectAt(new Date());
|
ftPrepaymentDao.setCollectAt(new Date());
|
||||||
ftPrepaymentDao.setSettlementFlag(0);
|
ftPrepaymentDao.setSettlementFlag(0);
|
||||||
|
@ -19,5 +19,5 @@ public interface IFtPrepaymentDaoService extends IService<FtPrepaymentVo> {
|
|||||||
|
|
||||||
List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listAllPrepay();
|
List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listAllPrepay();
|
||||||
|
|
||||||
int getCountById(Long patiendId);
|
FtPrepaymentVo getCountById(Long patiendId);
|
||||||
}
|
}
|
||||||
|
@ -34,10 +34,10 @@ public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCountById(Long patiendId) {
|
public FtPrepaymentVo getCountById(Long patiendId) {
|
||||||
QueryWrapper<FtPrepaymentVo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<FtPrepaymentVo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("patiendId",patiendId);
|
queryWrapper.eq("patient_Id",patiendId);
|
||||||
return this.baseMapper.selectCount(queryWrapper);
|
return this.baseMapper.selectOne(queryWrapper);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public class FtPrepaymentVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 收款员
|
* 收款员
|
||||||
*/
|
*/
|
||||||
private Long collectBy;
|
private String collectBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算时间
|
* 结算时间
|
||||||
|
@ -7,6 +7,7 @@ export function listNoPrepayment() {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询所有已缴预付费病人列表
|
// 查询所有已缴预付费病人列表
|
||||||
export function listPrepay() {
|
export function listPrepay() {
|
||||||
return request({
|
return request({
|
||||||
@ -23,7 +24,14 @@ export function listAllPrepay() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询该用户是否已经收取预付伙食费
|
/**
|
||||||
|
* 查询该用户是否已经收取预付伙食费
|
||||||
|
* 作者: 陈智兴
|
||||||
|
* 日期: 2020年12月2日
|
||||||
|
* 功能: 前端调用查询
|
||||||
|
* @param patientId
|
||||||
|
*/
|
||||||
|
//
|
||||||
export function getCountById(patientId) {
|
export function getCountById(patientId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/fantang/prepayment/getCountById/' + patientId,
|
url: '/fantang/prepayment/getCountById/' + patientId,
|
||||||
@ -40,6 +48,7 @@ export function listPrepayment(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 查询收费管理详细
|
// 查询收费管理详细
|
||||||
export function getPrepayment(prepaymentId) {
|
export function getPrepayment(prepaymentId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -195,7 +195,7 @@
|
|||||||
listNoPrepayment,
|
listNoPrepayment,
|
||||||
updatePrepayment
|
updatePrepayment
|
||||||
} from "@/api/fantang/prepayment";
|
} from "@/api/fantang/prepayment";
|
||||||
import {listAllPrepay, listPrepay} from "../../../api/fantang/prepayment";
|
import {getCountById, listAllPrepay, listPrepay} from "../../../api/fantang/prepayment";
|
||||||
import {getUserProfile} from "../../../api/system/user";
|
import {getUserProfile} from "../../../api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -204,7 +204,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 权限相关的参数
|
// 权限相关的参数
|
||||||
userName: null,
|
user: null,
|
||||||
roleGroup: null,
|
roleGroup: null,
|
||||||
postGroup: null,
|
postGroup: null,
|
||||||
|
|
||||||
@ -275,7 +275,7 @@
|
|||||||
// 获取用户相关信息
|
// 获取用户相关信息
|
||||||
myGetUser() {
|
myGetUser() {
|
||||||
getUserProfile().then(response => {
|
getUserProfile().then(response => {
|
||||||
this.userName = response.data;
|
this.user = response.data;
|
||||||
this.roleGroup = response.roleGroup;
|
this.roleGroup = response.roleGroup;
|
||||||
this.postGroup = response.postGroup;
|
this.postGroup = response.postGroup;
|
||||||
});
|
});
|
||||||
@ -428,7 +428,7 @@
|
|||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitformAddPrepayment() {
|
submitformAddPrepayment() {
|
||||||
let hospitalId = this.formAddPrepayment.hospitalId;
|
let hospitalId = this.formAddPrepayment.hospitalId;
|
||||||
this.formAddPrepayment.collectBy = this.userName;
|
this.formAddPrepayment.collectBy = this.user.userName;
|
||||||
this.$refs["formAddPrepayment"].validate(valid => {
|
this.$refs["formAddPrepayment"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.NoPrepayments.find(function(x) {
|
if (!this.NoPrepayments.find(function(x) {
|
||||||
@ -438,6 +438,10 @@
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCountById(this.formAddPrepayment.patientId).then(response => {
|
||||||
|
console.log("getCountbyId", response);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.formAddPrepayment.prepaidAt = null;
|
this.formAddPrepayment.prepaidAt = null;
|
||||||
console.log("form -->", this.formAddPrepayment)
|
console.log("form -->", this.formAddPrepayment)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user