fix 81955 管理端到账开票中 撤销来款信息后,企业端-到账开票页面的数据没有删除
This commit is contained in:
+2
-2
@@ -88,9 +88,9 @@ public class PayPaymentCheckController extends JeroController<PayPaymentRecordSu
|
||||
|
||||
@ApiOperation(value="编辑", notes="编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayPaymentRecord payPaymentRecord) {
|
||||
public Result<?> edit(@RequestBody PayPaymentRecordSub paymentRecordSub) {
|
||||
try{
|
||||
payPaymentCheckService.edit(payPaymentRecord);
|
||||
payPaymentCheckService.edit(paymentRecordSub);
|
||||
}catch (Exception e){
|
||||
log.error("编辑异常",e);
|
||||
return Result.error(e.getMessage());
|
||||
|
||||
@@ -166,4 +166,8 @@ public class PayPaymentRecord implements Serializable {
|
||||
@ApiModelProperty(value = "联行号")
|
||||
@TableField(exist = false)
|
||||
private String linkBankNumber;
|
||||
/**recordId*/
|
||||
@ApiModelProperty(value = "recordId")
|
||||
@TableField(exist = false)
|
||||
private String recordId;
|
||||
}
|
||||
|
||||
+2
-2
@@ -36,9 +36,9 @@ public interface IPayPaymentCheckService extends IService<PayPaymentRecordSub> {
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param payPaymentRecord
|
||||
* @param paymentRecordSub
|
||||
*/
|
||||
void edit(PayPaymentRecord payPaymentRecord);
|
||||
void edit(PayPaymentRecordSub paymentRecordSub);
|
||||
|
||||
/**
|
||||
* 审核
|
||||
|
||||
+22
-9
@@ -3,6 +3,7 @@ package com.jero.payment.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.common.ProjectCommon;
|
||||
import com.jero.common.common.RoleCommon;
|
||||
@@ -291,6 +292,8 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||
payPaymentRecordSub.setRecordId(payPaymentRecordSub.getId());
|
||||
payPaymentCheckMapper.updateById(payPaymentRecordSub);
|
||||
|
||||
//发消息
|
||||
uploadSendMessage(principalId,payPaymentRecord.getProjectId(), project,String.valueOf(payPaymentRecord.getProjectType()));
|
||||
@@ -313,16 +316,18 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param payPaymentRecord
|
||||
* @param paymentRecordSub
|
||||
*/
|
||||
@Override
|
||||
public void edit(PayPaymentRecord payPaymentRecord){
|
||||
if(!PaymentStatusEnum.REJECTED.getCode().equals(payPaymentRecord.getPaymentStatus())){
|
||||
public void edit(PayPaymentRecordSub paymentRecordSub){
|
||||
if(!PaymentStatusEnum.REJECTED.getCode().equals(paymentRecordSub.getPaymentStatus())){
|
||||
throw new JeroBootException("只有拒绝的才可编辑");
|
||||
}
|
||||
|
||||
String principalId="";
|
||||
String project="";
|
||||
PayPaymentRecord payPaymentRecord = new PayPaymentRecord();
|
||||
BeanUtils.copyProperties(paymentRecordSub, payPaymentRecord);
|
||||
switch (String.valueOf(payPaymentRecord.getProjectType())){
|
||||
// 普通项目
|
||||
case PayIncomeContractCommon.PROJECT_TYPE1:
|
||||
@@ -395,15 +400,16 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
|
||||
//新增子表
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
payPaymentRecord.setApplicantName(sysUser.getRealname());
|
||||
payPaymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_REVIEWED.getCode());
|
||||
payPaymentRecord.setCreateBy(sysUser.getUsername());
|
||||
payPaymentRecord.setCreateTime(new Date());
|
||||
|
||||
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
||||
BeanUtils.copyProperties(paymentRecordSub, payPaymentRecordSub);
|
||||
payPaymentRecordSub.setId(null);
|
||||
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||
payPaymentRecordSub.setApplicantName(sysUser.getRealname());
|
||||
payPaymentRecordSub.setPaymentStatus(PaymentStatusEnum.TO_BE_REVIEWED.getCode());
|
||||
payPaymentRecordSub.setCreateBy(sysUser.getUsername());
|
||||
payPaymentRecordSub.setCreateTime(new Date());
|
||||
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||
|
||||
//将之前的那条置为OLD
|
||||
@@ -716,8 +722,15 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
sub.setReviewerName(payPaymentRecord.getReviewerName());
|
||||
sub.setReviewTime(payPaymentRecord.getReviewTime());
|
||||
sub.setReviewInstructions(payPaymentRecord.getReviewInstructions());
|
||||
sub.setRecordId(payPaymentRecord.getId());
|
||||
//sub.setRecordId(payPaymentRecord.getId());
|
||||
payPaymentCheckMapper.updateById(sub);
|
||||
|
||||
if(PaymentStatusEnum.COMPLETED.getCode().equals(payPaymentRecord.getPaymentStatus())) {
|
||||
LambdaUpdateWrapper<PayPaymentRecordSub> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.set(PayPaymentRecordSub::getRecordId,payPaymentRecord.getId());
|
||||
updateWrapper.eq(PayPaymentRecordSub::getRecordId,payPaymentRecord.getRecordId());
|
||||
this.update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user