来款审核
This commit is contained in:
+3
@@ -110,4 +110,7 @@ public class PayPaymentRecordSub implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "审核说明")
|
||||
private String reviewInstructions;
|
||||
|
||||
@ApiModelProperty(value = "删除标记(1删除,0没删除)")
|
||||
private Integer delFlag;
|
||||
}
|
||||
|
||||
+7
-2
@@ -106,10 +106,10 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
*/
|
||||
@Override
|
||||
public Map<String,Object> amountReceivedList(String id, String projectType){
|
||||
//列表
|
||||
LambdaQueryWrapper<PayPaymentRecordSub> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayPaymentRecordSub::getProjectId, id);
|
||||
wrapper.eq(PayPaymentRecordSub::getLastSign, LastSignEnum.LAST.getCode());//只查每个阶段最新的那条
|
||||
wrapper.eq(PayPaymentRecordSub::getDelFlag, PayProjectCommon.NO);
|
||||
wrapper.orderByAsc(PayPaymentRecordSub::getPaymentDate);
|
||||
List<PayPaymentRecordSub> list = payPaymentCheckService.list(wrapper);
|
||||
list.forEach(p-> {
|
||||
@@ -253,6 +253,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
||||
payPaymentRecordSub.setId(null);
|
||||
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||
|
||||
//发消息
|
||||
@@ -267,7 +268,10 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
if(!PaymentStatusEnum.REJECTED.getCode().equals(payPaymentRecord.getPaymentStatus())){
|
||||
throw new JeroBootException("只有拒绝的才可删除");
|
||||
}
|
||||
payPaymentRecordMapper.deleteById(payPaymentRecord.getId());
|
||||
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||
payPaymentRecordSub.setId(payPaymentRecord.getId());
|
||||
payPaymentRecordSub.setDelFlag(PayProjectCommon.YES);
|
||||
payPaymentCheckMapper.updateById(payPaymentRecordSub);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -344,6 +348,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
||||
|
||||
payPaymentRecordSub.setId(null);
|
||||
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||
|
||||
//将之前的那条置为OLD
|
||||
|
||||
+15
@@ -9,6 +9,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.common.ProjectCommon;
|
||||
import com.jero.common.dto.SendMessageDTO;
|
||||
import com.jero.common.enums.CompanyMessageEnums;
|
||||
import com.jero.common.enums.LastSignEnum;
|
||||
import com.jero.common.enums.ManagementMessageEnums;
|
||||
import com.jero.common.enums.PaymentStatusEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
@@ -34,6 +35,7 @@ import com.jero.member.service.ITbMemberProjectService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.payment.entity.PayPaymentRecord;
|
||||
import com.jero.payment.entity.PayPaymentRecordSub;
|
||||
import com.jero.payment.mapper.PayPaymentRecordMapper;
|
||||
import com.jero.payment.service.IPayPaymentCheckService;
|
||||
import com.jero.payment.service.IPayPaymentRecordService;
|
||||
@@ -134,6 +136,13 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
payCommonProject.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payCommonProject.getChargeCompanyTemporaryName()));
|
||||
}
|
||||
List<PayCommonProject> list = payPaymentRecordMapper.mainList(page, payCommonProject,projectType, paymentDate,paidInvoicStatus);
|
||||
|
||||
//查审核记录表,每阶段最新的一条
|
||||
LambdaQueryWrapper<PayPaymentRecordSub> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayPaymentRecordSub::getLastSign, LastSignEnum.LAST.getCode());
|
||||
wrapper.eq(PayPaymentRecordSub::getDelFlag, PayProjectCommon.NO);
|
||||
List<PayPaymentRecordSub> RecordSubList = payPaymentCheckService.list(wrapper);
|
||||
|
||||
for (PayCommonProject commonProject : list) {
|
||||
//如果是会议类型,就查询会议的具体类型
|
||||
if (commonProject.getProjectType().equals(Integer.parseInt(ProjectCommon.PROJECT_TYPE3))) {
|
||||
@@ -142,6 +151,12 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
commonProject.setMeetingType(payMeeting.getMeetingType());
|
||||
commonProject.setSituationId(id);
|
||||
}
|
||||
//插入审核状态,供前端判断是否显示审核按钮
|
||||
for(PayPaymentRecordSub recordSub : RecordSubList){
|
||||
if(commonProject.getId().equals(recordSub.getProjectId())){
|
||||
commonProject.setCheckPaymentStatus(recordSub.getPaymentStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -241,4 +241,9 @@ public class PayCommonProject implements Serializable {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String situationId;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String checkPaymentStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user