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