防止预付费重复收款

This commit is contained in:
czx 2020-12-02 09:50:23 +08:00
parent 1f89abf51d
commit 81a2e5578e
7 changed files with 32 additions and 15 deletions

View File

@ -117,7 +117,13 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- 增加热部署依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!-- optional=true,依赖不会传递该项目依赖devtools之后依赖该项目的项目如果想要使用devtools需要重新引入 -->
<optional>true</optional>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>

View File

@ -36,7 +36,8 @@ public class FtPrepaymentDaoController extends BaseController {
@GetMapping("/getCountById/{patientId}")
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();
QueryWrapper<FtPrepaymentVo> wrapper = new QueryWrapper<>();
wrapper.eq("patient_id", patientId);
if (iFtPrepaymentDaoService.getOne(wrapper).getSettlementFlag() == 1) {
return AjaxResult.error("该病人已付费");
}
ftPrepaymentDao.setCollectAt(new Date());
ftPrepaymentDao.setSettlementFlag(0);

View File

@ -19,5 +19,5 @@ public interface IFtPrepaymentDaoService extends IService<FtPrepaymentVo> {
List<com.ruoyi.system.fantang.vo.FtPrepaymentVo> listAllPrepay();
int getCountById(Long patiendId);
FtPrepaymentVo getCountById(Long patiendId);
}

View File

@ -34,10 +34,10 @@ public class FtPrepaymentDaoServiceImpl extends ServiceImpl<FtPrepaymentDaoMappe
}
@Override
public int getCountById(Long patiendId) {
public FtPrepaymentVo getCountById(Long patiendId) {
QueryWrapper<FtPrepaymentVo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("patiendId",patiendId);
return this.baseMapper.selectCount(queryWrapper);
queryWrapper.eq("patient_Id",patiendId);
return this.baseMapper.selectOne(queryWrapper);
}
}

View File

@ -66,7 +66,7 @@ public class FtPrepaymentVo implements Serializable {
/**
* 收款员
*/
private Long collectBy;
private String collectBy;
/**
* 结算时间

View File

@ -7,6 +7,7 @@ export function listNoPrepayment() {
method: 'get',
})
}
// 查询所有已缴预付费病人列表
export function listPrepay() {
return request({
@ -23,7 +24,14 @@ export function listAllPrepay() {
})
}
// 查询该用户是否已经收取预付伙食费
/**
* 查询该用户是否已经收取预付伙食费
* 作者 陈智兴
* 日期 2020年12月2日
* 功能 前端调用查询
* @param patientId
*/
//
export function getCountById(patientId) {
return request({
url: '/fantang/prepayment/getCountById/' + patientId,
@ -40,6 +48,7 @@ export function listPrepayment(query) {
})
}
// 查询收费管理详细
export function getPrepayment(prepaymentId) {
return request({

View File

@ -195,7 +195,7 @@
listNoPrepayment,
updatePrepayment
} 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";
export default {
@ -204,7 +204,7 @@
data() {
return {
//
userName: null,
user: null,
roleGroup: null,
postGroup: null,
@ -275,7 +275,7 @@
//
myGetUser() {
getUserProfile().then(response => {
this.userName = response.data;
this.user = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
});
@ -428,7 +428,7 @@
/** 提交按钮 */
submitformAddPrepayment() {
let hospitalId = this.formAddPrepayment.hospitalId;
this.formAddPrepayment.collectBy = this.userName;
this.formAddPrepayment.collectBy = this.user.userName;
this.$refs["formAddPrepayment"].validate(valid => {
if (valid) {
if (!this.NoPrepayments.find(function(x) {
@ -438,6 +438,10 @@
return ;
}
getCountById(this.formAddPrepayment.patientId).then(response => {
console.log("getCountbyId", response);
});
this.formAddPrepayment.prepaidAt = null;
console.log("form -->", this.formAddPrepayment)