推到标协
This commit is contained in:
+24
-12
@@ -414,24 +414,28 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
//来款条件校验
|
//来款条件校验
|
||||||
payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
payPaymentRecordService.amountReceivedVerification( payPaymentRecord, ProjectCommon.PAYMENT_FLAG2);
|
||||||
|
|
||||||
//更新来款记录主表
|
|
||||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||||
payPaymentRecord.setReviewerId(sysUser.getId());
|
payPaymentRecord.setReviewerId(sysUser.getId());
|
||||||
payPaymentRecord.setReviewerName(sysUser.getRealname());
|
payPaymentRecord.setReviewerName(sysUser.getRealname());
|
||||||
payPaymentRecord.setReviewTime(new Date());
|
payPaymentRecord.setReviewTime(new Date());
|
||||||
|
|
||||||
payPaymentRecordMapper.updateById(payPaymentRecord);
|
if(PayIncomeContractCommon.PROJECT_TYPE1.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
||||||
//更新来款记录表子表
|
PayIncomeContractCommon.PROJECT_TYPE2.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
||||||
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
PayIncomeContractCommon.PROJECT_TYPE4.equals(String.valueOf(payPaymentRecord.getProjectType()))){
|
||||||
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
//更新来款记录主表
|
||||||
|
payPaymentRecordMapper.updateById(payPaymentRecord);
|
||||||
|
//更新来款记录表子表
|
||||||
|
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||||
|
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
||||||
|
|
||||||
payPaymentRecordSub.setId(null);
|
payPaymentRecordSub.setId(null);
|
||||||
LambdaUpdateWrapper<PayPaymentRecordSub> wrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<PayPaymentRecordSub> wrapper = new LambdaUpdateWrapper<>();
|
||||||
wrapper.eq(PayPaymentRecordSub::getRecordId,payPaymentRecord.getId());
|
wrapper.eq(PayPaymentRecordSub::getRecordId,payPaymentRecord.getId());
|
||||||
wrapper.eq(PayPaymentRecordSub::getProjectId,payPaymentRecord.getProjectId());
|
wrapper.eq(PayPaymentRecordSub::getProjectId,payPaymentRecord.getProjectId());
|
||||||
wrapper.orderByDesc(PayPaymentRecordSub::getCreateTime);
|
wrapper.orderByDesc(PayPaymentRecordSub::getCreateTime);
|
||||||
wrapper.last("limit 1");
|
wrapper.last("limit 1");
|
||||||
payPaymentCheckMapper.update(payPaymentRecordSub,wrapper);
|
payPaymentCheckMapper.update(payPaymentRecordSub,wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
BigDecimal newPaidAmount;
|
BigDecimal newPaidAmount;
|
||||||
Integer inAccount;
|
Integer inAccount;
|
||||||
@@ -527,6 +531,10 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
tbMember.setInAccount(inAccount);
|
tbMember.setInAccount(inAccount);
|
||||||
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||||
|
|
||||||
|
//插入来款记录表
|
||||||
|
payPaymentRecord.setPaymentStatus(PaymentStatusEnum.COMPLETED.getCode());
|
||||||
|
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||||
|
|
||||||
tbCheckVo.setCheckResult(PayProjectCommon.YES);
|
tbCheckVo.setCheckResult(PayProjectCommon.YES);
|
||||||
}else{
|
}else{
|
||||||
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), tbMember.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), tbMember.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
||||||
@@ -564,6 +572,10 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
tbMemberCertificate.setInAccount(inAccount);
|
tbMemberCertificate.setInAccount(inAccount);
|
||||||
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||||
|
|
||||||
|
//插入来款记录表
|
||||||
|
payPaymentRecord.setPaymentStatus(PaymentStatusEnum.COMPLETED.getCode());
|
||||||
|
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||||
|
|
||||||
tbCheckCerVo.setCheckResult(PayProjectCommon.YES);
|
tbCheckCerVo.setCheckResult(PayProjectCommon.YES);
|
||||||
}else{
|
}else{
|
||||||
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), tbMemberCertificate.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), tbMemberCertificate.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
||||||
|
|||||||
Reference in New Issue
Block a user