缴费审核

This commit is contained in:
baozhipeng
2021-12-16 11:32:00 +08:00
parent 72d7372b8b
commit 932ec53891
2 changed files with 12 additions and 15 deletions
@@ -32,11 +32,10 @@ public class PayPaymentCheckController extends JeroController<PayPaymentRecordSu
* @return
*/
@ApiOperation(value="来款列表", notes="来款列表")
@PostMapping(value = "/amountReceivedList")
@GetMapping(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);
@@ -151,22 +151,20 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
*/
@Override
public void check(PayPaymentRecord payPaymentRecord){
//更新来款记录主表
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
payPaymentRecord.setReviewerId(sysUser.getId());
payPaymentRecord.setReviewerName(sysUser.getRealname());
payPaymentRecordMapper.updateById(payPaymentRecord);
//新增来款记录表子表
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
payPaymentRecordSub.setRecordId(payPaymentRecord.getId());
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
payPaymentCheckMapper.insert(payPaymentRecordSub);
//拒绝
if(PaymentStatusEnum.REJECTED.getCode().equals(payPaymentRecord.getPaymentStatus())){
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
payPaymentRecord.setReviewerId(sysUser.getId());
payPaymentRecord.setReviewerName(sysUser.getRealname());
//更新来款记录主表
payPaymentRecordMapper.updateById(payPaymentRecord);
//新增来款记录表子表
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
payPaymentRecordSub.setRecordId(payPaymentRecord.getId());
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
payPaymentCheckMapper.insert(payPaymentRecordSub);
return;
}