缴费审核
This commit is contained in:
+6
@@ -376,6 +376,12 @@ public class PayMeetingSituation implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+6
@@ -248,6 +248,12 @@ public class PayMemberProjectSubitem implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+6
@@ -130,6 +130,12 @@ public class TbCertificatePayment implements Serializable {
|
||||
/**缴费状态*/
|
||||
@Excel(name = "缴费状态", width = 15)
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+6
@@ -188,6 +188,12 @@ public class TbMemberProjectSubitem implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+23
@@ -1,16 +1,21 @@
|
||||
package com.jero.payment.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.enums.PaymentStatusEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.payment.entity.PayPaymentRecordSub;
|
||||
import com.jero.payment.entity.PayPaymentRecord;
|
||||
import com.jero.payment.service.IPayPaymentCheckService;
|
||||
import com.jero.payment.service.IPayPaymentRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(tags="到账审核")
|
||||
@RestController
|
||||
@@ -19,6 +24,24 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class PayPaymentCheckController extends JeroController<PayPaymentRecordSub, IPayPaymentCheckService> {
|
||||
@Autowired
|
||||
private IPayPaymentCheckService payPaymentCheckService;
|
||||
@Autowired
|
||||
private IPayPaymentRecordService payPaymentRecordService;
|
||||
|
||||
/**
|
||||
* 来款列表
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="来款列表", notes="来款列表")
|
||||
@PostMapping(value = "/amountReceivedList")
|
||||
public Result<?> amountReceivedList(String id) {
|
||||
LambdaQueryWrapper<PayPaymentRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayPaymentRecord::getProjectId, id);
|
||||
wrapper.eq(PayPaymentRecord::getPaymentStatus, PaymentStatusEnum.COMPLETED.getCode());
|
||||
wrapper.orderByAsc(PayPaymentRecord::getPaymentDate);
|
||||
List<PayPaymentRecord> list = payPaymentRecordService.list(wrapper);
|
||||
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value="申请", notes="申请")
|
||||
@PostMapping(value = "/applicant")
|
||||
|
||||
+3
-1
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.common.ProjectCommon;
|
||||
import com.jero.common.enums.PaymentStatusEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -134,7 +135,8 @@ public class PayPaymentRecordController extends JeroController<PayPaymentRecord,
|
||||
public Result<?> amountReceivedList(String id) {
|
||||
LambdaQueryWrapper<PayPaymentRecord> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayPaymentRecord::getProjectId, id);
|
||||
wrapper.orderByDesc(PayPaymentRecord::getPaymentDate);
|
||||
wrapper.eq(PayPaymentRecord::getPaymentStatus, PaymentStatusEnum.COMPLETED.getCode());
|
||||
wrapper.orderByAsc(PayPaymentRecord::getPaymentDate);
|
||||
List<PayPaymentRecord> list = payPaymentRecordService.list(wrapper);
|
||||
|
||||
return Result.OK(list);
|
||||
|
||||
@@ -83,6 +83,11 @@ public class PayPaymentRecord implements Serializable {
|
||||
@ApiModelProperty(value = "申请人名字")
|
||||
private String applicantName;
|
||||
|
||||
/**
|
||||
* TO_BE_REVIEWED("toBeReviewed"),//待审核
|
||||
* REJECTED("rejected"),//已拒绝
|
||||
* COMPLETED("completed");//已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+6
@@ -81,6 +81,12 @@ public class PayPaymentRecordSub implements Serializable {
|
||||
@ApiModelProperty(value = "申请人名字")
|
||||
private String applicantName;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
private String paymentStatus;
|
||||
|
||||
|
||||
+34
-15
@@ -216,15 +216,20 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
break;
|
||||
//会议项目
|
||||
case PayIncomeContractCommon.PROJECT_TYPE3:
|
||||
// //来款条件校验
|
||||
// payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
||||
//
|
||||
// PayMeetingSituation meeting = payMeetingSituationMapper.selectById(payPaymentRecord.getProjectId());
|
||||
//
|
||||
// PayMeetingSituation meeting = new PayMeetingSituation();
|
||||
// meeting.setId(payPaymentRecord.getProjectId());
|
||||
// meeting.setPaymentStatus(PaymentStatusEnum.TO_BE_REVIEWED.getCode());
|
||||
// payMeetingSituationMapper.updateById(meeting);
|
||||
//来款条件校验
|
||||
payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
||||
|
||||
PayMeetingSituation meeting = payMeetingSituationMapper.selectById(payPaymentRecord.getProjectId());
|
||||
|
||||
newPaidAmount =payPaymentRecordService.addPaidAmount(meeting.getPaidAmount(),payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = payPaymentRecordService.getInAccount(meeting.getAmountReceivable(), newPaidAmount);//到账状态
|
||||
paymentStatus = getPaymentStatus(meeting.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||
|
||||
//更新主列表
|
||||
meeting.setPaidAmount(newPaidAmount);
|
||||
meeting.setInAccount(inAccount);
|
||||
meeting.setPaymentStatus(paymentStatus);
|
||||
payMeetingSituationMapper.updateById(meeting);
|
||||
|
||||
break;
|
||||
//会员项目
|
||||
@@ -232,9 +237,16 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
//来款条件校验
|
||||
payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
||||
|
||||
PayMemberProjectSubitem member = new PayMemberProjectSubitem();
|
||||
member.setId(payPaymentRecord.getProjectId());
|
||||
member.setPaymentStatus(PaymentStatusEnum.TO_BE_REVIEWED.getCode());
|
||||
PayMemberProjectSubitem member = payMemberProjectSubitemMapper.selectById(payPaymentRecord.getProjectId());
|
||||
|
||||
newPaidAmount =payPaymentRecordService.addPaidAmount(member.getPaidAmount(),payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = payPaymentRecordService.getInAccount(member.getAmountReceivable(), newPaidAmount);//到账状态
|
||||
paymentStatus = getPaymentStatus(member.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||
|
||||
//更新主列表
|
||||
member.setPaidAmount(newPaidAmount);
|
||||
member.setInAccount(inAccount);
|
||||
member.setPaymentStatus(paymentStatus);
|
||||
payMemberProjectSubitemMapper.updateById(member);
|
||||
|
||||
break;
|
||||
@@ -245,9 +257,16 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
//来款条件校验
|
||||
payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
||||
|
||||
TbMemberProjectSubitem tbMember= new TbMemberProjectSubitem();
|
||||
tbMember.setId(payPaymentRecord.getProjectId());
|
||||
tbMember.setPaymentStatus(PaymentStatusEnum.TO_BE_REVIEWED.getCode());
|
||||
TbMemberProjectSubitem tbMember = tbMemberProjectSubitemMapper.selectById(payPaymentRecord.getProjectId());
|
||||
|
||||
newPaidAmount =payPaymentRecordService.addPaidAmount(tbMember.getPaidAmount(),payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = payPaymentRecordService.getInAccount(tbMember.getAmountReceivable(), newPaidAmount);//到账状态
|
||||
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||
|
||||
//更新主列表
|
||||
tbMember.setPaidAmount(newPaidAmount);
|
||||
tbMember.setInAccount(inAccount);
|
||||
tbMember.setPaymentStatus(paymentStatus);
|
||||
tbMemberProjectSubitemMapper.updateById(tbMember);
|
||||
|
||||
break;
|
||||
|
||||
+9
-2
@@ -531,11 +531,18 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
if(paidAmount == null){
|
||||
paidAmount = new BigDecimal("0");
|
||||
}
|
||||
|
||||
//欠款
|
||||
BigDecimal debt = receivableAmount.subtract(paidAmount).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
if(amountReceived.compareTo(debt) == 1){
|
||||
throw new JeroBootException("到账金额大于当前款金额,不可提交!");
|
||||
throw new JeroBootException("到账金额大于当前欠款金额,不可提交!");
|
||||
}
|
||||
|
||||
//累加实收
|
||||
BigDecimal newPaidAmount = paidAmount.add(amountReceived).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
// 实收<0
|
||||
if( newPaidAmount.compareTo(new BigDecimal("0"))==-1){
|
||||
throw new JeroBootException("此项目的实收金额不可小于0");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,12 @@ public class PayCommonProject implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
@Dict(dicCode = "payment_status")
|
||||
private String paymentStatus;
|
||||
|
||||
+6
@@ -207,6 +207,12 @@ public class PayWorkingGroupSubItem implements Serializable {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* toBeUploaded 待上传
|
||||
* toBeReviewed 待审核
|
||||
* rejected 已拒绝
|
||||
* completed 已完结
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态")
|
||||
@Dict(dicCode = "payment_status")
|
||||
private String paymentStatus;
|
||||
|
||||
Reference in New Issue
Block a user