来款审核
This commit is contained in:
+1
-1
@@ -489,7 +489,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
|||||||
payPaymentRecord.setPaymentDate(new Date());
|
payPaymentRecord.setPaymentDate(new Date());
|
||||||
payPaymentRecords.add(payPaymentRecord);
|
payPaymentRecords.add(payPaymentRecord);
|
||||||
//添加来款
|
//添加来款
|
||||||
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG1);
|
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG1,"record");
|
||||||
//非成员单位审核通过且上传的缴费凭证审核通过也发送。(即需要审核的都审核通过才发送)
|
//非成员单位审核通过且上传的缴费凭证审核通过也发送。(即需要审核的都审核通过才发送)
|
||||||
sendMessage(payMeeting, payMeetingSituation, CompanyMessageEnums.MSG6, "C_OPEN_TYPE6");
|
sendMessage(payMeeting, payMeetingSituation, CompanyMessageEnums.MSG6, "C_OPEN_TYPE6");
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@ public class PayPaymentRecordController extends JeroController<PayPaymentRecord,
|
|||||||
@PostMapping(value = "/addAmountReceived")
|
@PostMapping(value = "/addAmountReceived")
|
||||||
public Result<?> addAmountReceived(@RequestBody List<PayPaymentRecord> list) {
|
public Result<?> addAmountReceived(@RequestBody List<PayPaymentRecord> list) {
|
||||||
try{
|
try{
|
||||||
payPaymentRecordService.addAmountReceived(list, ProjectCommon.PAYMENT_FLAG2);
|
payPaymentRecordService.addAmountReceived(list, ProjectCommon.PAYMENT_FLAG2,"record");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("添加来款异常",e);
|
log.error("添加来款异常",e);
|
||||||
return Result.error(e.getMessage());
|
return Result.error(e.getMessage());
|
||||||
|
|||||||
+3
@@ -113,4 +113,7 @@ public class PayPaymentRecordSub implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "删除标记(1删除,0没删除)")
|
@ApiModelProperty(value = "删除标记(1删除,0没删除)")
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "来款记录表id")
|
||||||
|
private String recordId;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-7
@@ -4,10 +4,12 @@
|
|||||||
|
|
||||||
<!-- 到账开票主列表-->
|
<!-- 到账开票主列表-->
|
||||||
<select id="mainList" resultType="com.jero.project.entity.PayCommonProject">
|
<select id="mainList" resultType="com.jero.project.entity.PayCommonProject">
|
||||||
select p.id,p.charge_project, p.charge_use, p.principal_id,p.principal_name,p.charge_company_id,p.charge_company_temporary_name,p.receivable_amount,p.paid_amount,p.need_invoice,p.pack,p.in_account,p.make_invoice,p.mail,p.create_time,p.projectType,p.invoice_amount,p.mail_contacts_id,p.register_check_result,p.contacts_temporary_name,p.payment_status
|
select p.id,p.charge_project, p.charge_use, p.principal_id,p.principal_name,p.charge_company_id,p.charge_company_temporary_name,p.receivable_amount,p.paid_amount,p.need_invoice,p.pack,p.in_account,p.make_invoice,p.mail,p.create_time,p.projectType,
|
||||||
|
p.invoice_amount,p.mail_contacts_id,p.register_check_result,p.contacts_temporary_name,p.payment_status,p.charge_company_temporary_id
|
||||||
from
|
from
|
||||||
(<!-- 普通项目-->
|
(<!-- 普通项目-->
|
||||||
select c.id,c.charge_project, c.charge_use, c.principal_id,su.realname as principal_name,c.charge_company_id,c.charge_company_temporary_name,c.receivable_amount,c.paid_amount,c.need_invoice,c.pack,c.in_account,c.make_invoice,c.mail,c.create_time,1 as projectType,c.invoice_amount,c.mail_contacts_id,'' as register_check_result,c.contacts_temporary_name,c.payment_status
|
select c.id,c.charge_project, c.charge_use, c.principal_id,su.realname as principal_name,c.charge_company_id,c.charge_company_temporary_name,c.receivable_amount,c.paid_amount,c.need_invoice,c.pack,c.in_account,c.make_invoice,c.mail,c.create_time,1 as projectType,
|
||||||
|
c.invoice_amount,c.mail_contacts_id,'' as register_check_result,c.contacts_temporary_name,c.payment_status,c.charge_company_temporary_id
|
||||||
from pay_common_project c
|
from pay_common_project c
|
||||||
left join sys_user su on c.principal_id = su.id
|
left join sys_user su on c.principal_id = su.id
|
||||||
where
|
where
|
||||||
@@ -35,7 +37,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<!--工作组项目-->
|
<!--工作组项目-->
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.charge_company_id,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,gsub.invoice_amount,gsub.mail_contacts_id,'' as register_check_result,gsub.contacts_temporary_name_one,gsub.payment_status
|
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.charge_company_id,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,
|
||||||
|
gsub.invoice_amount,gsub.mail_contacts_id,'' as register_check_result,gsub.contacts_temporary_name_one,gsub.payment_status,gsub.charge_company_temporary_id
|
||||||
from pay_working_group g
|
from pay_working_group g
|
||||||
left join sys_user su on g.principal_id_a = su.id
|
left join sys_user su on g.principal_id_a = su.id
|
||||||
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
|
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
|
||||||
@@ -64,7 +67,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 会议项目-->
|
<!-- 会议项目-->
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, su.realname,sit.company_id,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,sit.invoice_amount,sit.post_contact_id,sit.register_check_result,sit.company_contact_name,sit.payment_status
|
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, su.realname,sit.company_id,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,
|
||||||
|
sit.invoice_amount,sit.post_contact_id,sit.register_check_result,sit.company_contact_name,sit.payment_status,sit.company_id
|
||||||
from pay_meeting meeting
|
from pay_meeting meeting
|
||||||
inner join pay_meeting_situation sit on meeting.id = sit.meeting_id
|
inner join pay_meeting_situation sit on meeting.id = sit.meeting_id
|
||||||
left join sys_user su on su.id = meeting.director_id
|
left join sys_user su on su.id = meeting.director_id
|
||||||
@@ -93,7 +97,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 会员项目-->
|
<!-- 会员项目-->
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,su.realname,msub.company_id,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,msub.invoice_amount,msub.post_contact_id,'' as register_check_result,msub.company_contact_name,msub.payment_status
|
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,su.realname,msub.company_id,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,
|
||||||
|
msub.invoice_amount,msub.post_contact_id,'' as register_check_result,msub.company_contact_name,msub.payment_status,msub.company_temporary_id
|
||||||
from pay_member_project pmp
|
from pay_member_project pmp
|
||||||
inner join pay_member_project_subitem msub on pmp.id=msub.project_id
|
inner join pay_member_project_subitem msub on pmp.id=msub.project_id
|
||||||
left join sys_user su on su.id = pmp.director_id
|
left join sys_user su on su.id = pmp.director_id
|
||||||
@@ -122,7 +127,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 标协会员项目-->
|
<!-- 标协会员项目-->
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,su.realname,tmsub.company_id,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.invoice_amount,tmsub.liaison_man_id,'' as register_check_result,tmsub.liaison_man,tmsub.payment_status
|
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,su.realname,tmsub.company_id,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,
|
||||||
|
tmsub.invoice_amount,tmsub.liaison_man_id,'' as register_check_result,tmsub.liaison_man,tmsub.payment_status,tmsub.company_id
|
||||||
from tb_member_project tmember
|
from tb_member_project tmember
|
||||||
inner join tb_member_project_subitem tmsub on tmember.id=tmsub.project_id
|
inner join tb_member_project_subitem tmsub on tmember.id=tmsub.project_id
|
||||||
left join sys_user su on su.id = tmember.director_id
|
left join sys_user su on su.id = tmember.director_id
|
||||||
@@ -151,7 +157,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<!-- 标协证书项目-->
|
<!-- 标协证书项目-->
|
||||||
UNION ALL
|
UNION ALL
|
||||||
select tcp.id,tmember.project_name,tcp.charge_use,tmember.director_id,su.realname,tcp.company_id,tcp.company_name,tcp.amount_receivable,tcp.paid_amount,tcp.invoice_requirements,tcp.pack,tcp.in_account,tcp.make_invoice,tcp.mail,tcp.create_time,6,tcp.invoice_amount,tcp.liaison_man_id,'' as register_check_result,tcp.liaison_man,tcp.payment_status
|
select tcp.id,tmember.project_name,tcp.charge_use,tmember.director_id,su.realname,tcp.company_id,tcp.company_name,tcp.amount_receivable,tcp.paid_amount,tcp.invoice_requirements,tcp.pack,tcp.in_account,tcp.make_invoice,tcp.mail,tcp.create_time,6,
|
||||||
|
tcp.invoice_amount,tcp.liaison_man_id,'' as register_check_result,tcp.liaison_man,tcp.payment_status,tcp.company_id
|
||||||
from tb_member_project tmember
|
from tb_member_project tmember
|
||||||
inner join tb_certificate_payment tcp on tmember.id=tcp.project_id
|
inner join tb_certificate_payment tcp on tmember.id=tcp.project_id
|
||||||
left join sys_user su on su.id = tmember.director_id
|
left join sys_user su on su.id = tmember.director_id
|
||||||
|
|||||||
+4
-2
@@ -34,8 +34,9 @@ public interface IPayPaymentRecordService extends IService<PayPaymentRecord> {
|
|||||||
* 添加来款
|
* 添加来款
|
||||||
* @param list
|
* @param list
|
||||||
* flag 1为会议审核来款,2为正常来款
|
* flag 1为会议审核来款,2为正常来款
|
||||||
|
* @param checkOrRecord check:企业端走审核流程来款,record:管理端直接来款
|
||||||
*/
|
*/
|
||||||
void addAmountReceived(List<PayPaymentRecord> list,Integer flag);
|
void addAmountReceived(List<PayPaymentRecord> list,Integer flag,String checkOrRecord);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来款条件校验
|
* 来款条件校验
|
||||||
@@ -47,8 +48,9 @@ public interface IPayPaymentRecordService extends IService<PayPaymentRecord> {
|
|||||||
/**
|
/**
|
||||||
* 添加一个来款
|
* 添加一个来款
|
||||||
* @param payPaymentRecord
|
* @param payPaymentRecord
|
||||||
|
* @param checkOrRecord check:企业端走审核流程来款,record:管理端直接来款
|
||||||
*/
|
*/
|
||||||
void addOneAmountReceived(PayPaymentRecord payPaymentRecord,List<TbCheckVo> typr5List,List<TbCheckVo> typr6List,Integer flag);
|
void addOneAmountReceived(PayPaymentRecord payPaymentRecord,List<TbCheckVo> typr5List,List<TbCheckVo> typr6List,Integer flag,String checkOrRecord);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标协会员添加来款
|
* 标协会员添加来款
|
||||||
|
|||||||
+20
-11
@@ -452,6 +452,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
String paymentStatus;
|
String paymentStatus;
|
||||||
String principalId="";
|
String principalId="";
|
||||||
String project="";
|
String project="";
|
||||||
|
String subId=payPaymentRecord.getId();
|
||||||
List<PayContactsManagementTemporary> listId = new ArrayList<>();
|
List<PayContactsManagementTemporary> listId = new ArrayList<>();
|
||||||
|
|
||||||
switch (String.valueOf(payPaymentRecord.getProjectType())){
|
switch (String.valueOf(payPaymentRecord.getProjectType())){
|
||||||
@@ -467,7 +468,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
}
|
}
|
||||||
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
||||||
payPaymentRecords.add(payPaymentRecord);
|
payPaymentRecords.add(payPaymentRecord);
|
||||||
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2);
|
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2,"check");
|
||||||
}else{
|
}else{
|
||||||
paymentStatus = getPaymentStatus(payCommonProject.getReceivableAmount(), payCommonProject.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(payCommonProject.getReceivableAmount(), payCommonProject.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
||||||
payCommonProject.setPaymentStatus(paymentStatus);
|
payCommonProject.setPaymentStatus(paymentStatus);
|
||||||
@@ -491,7 +492,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
}
|
}
|
||||||
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
||||||
payPaymentRecords.add(payPaymentRecord);
|
payPaymentRecords.add(payPaymentRecord);
|
||||||
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2);
|
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2,"check");
|
||||||
}else{
|
}else{
|
||||||
paymentStatus = getPaymentStatus(payWorking.getReceivableAmount(), payWorking.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(payWorking.getReceivableAmount(), payWorking.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
||||||
payWorking.setPaymentStatus(paymentStatus);
|
payWorking.setPaymentStatus(paymentStatus);
|
||||||
@@ -515,7 +516,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
}
|
}
|
||||||
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
List<PayPaymentRecord> payPaymentRecords = new ArrayList<>();
|
||||||
payPaymentRecords.add(payPaymentRecord);
|
payPaymentRecords.add(payPaymentRecord);
|
||||||
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2);
|
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG2,"check");
|
||||||
}else{
|
}else{
|
||||||
paymentStatus = getPaymentStatus(member.getAmountReceivable(), member.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(member.getAmountReceivable(), member.getPaidAmount(), PaymentStatusEnum.REJECTED.getCode());//缴费状态
|
||||||
member.setPaymentStatus(paymentStatus);
|
member.setPaymentStatus(paymentStatus);
|
||||||
@@ -554,6 +555,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMember.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||||
tbMember.setPaymentStatus(paymentStatus);
|
tbMember.setPaymentStatus(paymentStatus);
|
||||||
//插入来款记录表
|
//插入来款记录表
|
||||||
|
payPaymentRecord.setId(null);
|
||||||
payPaymentRecord.setPaymentStatus(paymentStatus);
|
payPaymentRecord.setPaymentStatus(paymentStatus);
|
||||||
payPaymentRecordMapper.insert(payPaymentRecord);
|
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||||
|
|
||||||
@@ -611,6 +613,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
paymentStatus = getPaymentStatus(tbMemberCertificate.getAmountReceivable(), newPaidAmount, PaymentStatusEnum.COMPLETED.getCode());//缴费状态
|
||||||
tbMemberCertificate.setPaymentStatus(paymentStatus);
|
tbMemberCertificate.setPaymentStatus(paymentStatus);
|
||||||
//插入来款记录表
|
//插入来款记录表
|
||||||
|
payPaymentRecord.setId(null);
|
||||||
payPaymentRecord.setPaymentStatus(paymentStatus);
|
payPaymentRecord.setPaymentStatus(paymentStatus);
|
||||||
payPaymentRecordMapper.insert(payPaymentRecord);
|
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||||
|
|
||||||
@@ -654,16 +657,9 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
if(PayIncomeContractCommon.PROJECT_TYPE1.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
if(PayIncomeContractCommon.PROJECT_TYPE1.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
||||||
PayIncomeContractCommon.PROJECT_TYPE2.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
PayIncomeContractCommon.PROJECT_TYPE2.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
||||||
PayIncomeContractCommon.PROJECT_TYPE4.equals(String.valueOf(payPaymentRecord.getProjectType()))){
|
PayIncomeContractCommon.PROJECT_TYPE4.equals(String.valueOf(payPaymentRecord.getProjectType()))){
|
||||||
//更新来款记录主表
|
|
||||||
// payPaymentRecordMapper.updateById(payPaymentRecord);
|
|
||||||
//更新来款记录表子表
|
//更新来款记录表子表
|
||||||
// LambdaUpdateWrapper<PayPaymentRecordSub> wrapper = new LambdaUpdateWrapper<>();
|
|
||||||
// wrapper.eq(PayPaymentRecordSub::getRecordId,payPaymentRecord.getId());
|
|
||||||
// wrapper.eq(PayPaymentRecordSub::getProjectId,payPaymentRecord.getProjectId());
|
|
||||||
// wrapper.orderByDesc(PayPaymentRecordSub::getCreateTime);
|
|
||||||
// PayPaymentRecordSub sub = payPaymentCheckMapper.selectList(wrapper).get(0);
|
|
||||||
PayPaymentRecordSub sub = new PayPaymentRecordSub();
|
PayPaymentRecordSub sub = new PayPaymentRecordSub();
|
||||||
sub.setId(payPaymentRecord.getId());
|
sub.setId(subId);
|
||||||
sub.setRemark(payPaymentRecord.getRemark());
|
sub.setRemark(payPaymentRecord.getRemark());
|
||||||
sub.setPaymentStatus(payPaymentRecord.getPaymentStatus());
|
sub.setPaymentStatus(payPaymentRecord.getPaymentStatus());
|
||||||
sub.setReviewerId(payPaymentRecord.getReviewerId());
|
sub.setReviewerId(payPaymentRecord.getReviewerId());
|
||||||
@@ -672,6 +668,19 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
|
|||||||
sub.setReviewInstructions(payPaymentRecord.getReviewInstructions());
|
sub.setReviewInstructions(payPaymentRecord.getReviewInstructions());
|
||||||
payPaymentCheckMapper.updateById(sub);
|
payPaymentCheckMapper.updateById(sub);
|
||||||
}
|
}
|
||||||
|
if(PayIncomeContractCommon.PROJECT_TYPE5.equals(String.valueOf(payPaymentRecord.getProjectType())) ||
|
||||||
|
PayIncomeContractCommon.PROJECT_TYPE6.equals(String.valueOf(payPaymentRecord.getProjectType()))){
|
||||||
|
if(PaymentStatusEnum.COMPLETED.getCode().equals(payPaymentRecord.getPaymentStatus())){
|
||||||
|
//新增来款记录表子表。本记录目前没用上,只有普通、工作组、会员项目在企业端会同时查看直接来款记录+审核来款记录
|
||||||
|
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||||
|
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
||||||
|
payPaymentRecordSub.setId(null);
|
||||||
|
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||||
|
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||||
|
payPaymentRecordSub.setRecordId(payPaymentRecord.getId());
|
||||||
|
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+60
-7
@@ -3,6 +3,7 @@ package com.jero.payment.service.impl;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
@@ -18,7 +19,9 @@ import com.jero.common.system.api.ISysBaseAPI;
|
|||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.PasswordUtil;
|
import com.jero.common.util.PasswordUtil;
|
||||||
import com.jero.common.util.oConvertUtils;
|
import com.jero.common.util.oConvertUtils;
|
||||||
|
import com.jero.company.entity.PayCompanyManagement;
|
||||||
import com.jero.company.entity.PayContactsManagement;
|
import com.jero.company.entity.PayContactsManagement;
|
||||||
|
import com.jero.company.service.IPayCompanyManagementService;
|
||||||
import com.jero.company.service.IPayContactsManagementService;
|
import com.jero.company.service.IPayContactsManagementService;
|
||||||
import com.jero.contract.common.PayIncomeContractCommon;
|
import com.jero.contract.common.PayIncomeContractCommon;
|
||||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||||
@@ -36,6 +39,7 @@ import com.jero.modules.system.entity.SysUser;
|
|||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.payment.entity.PayPaymentRecord;
|
import com.jero.payment.entity.PayPaymentRecord;
|
||||||
import com.jero.payment.entity.PayPaymentRecordSub;
|
import com.jero.payment.entity.PayPaymentRecordSub;
|
||||||
|
import com.jero.payment.mapper.PayPaymentCheckMapper;
|
||||||
import com.jero.payment.mapper.PayPaymentRecordMapper;
|
import com.jero.payment.mapper.PayPaymentRecordMapper;
|
||||||
import com.jero.payment.service.IPayPaymentCheckService;
|
import com.jero.payment.service.IPayPaymentCheckService;
|
||||||
import com.jero.payment.service.IPayPaymentRecordService;
|
import com.jero.payment.service.IPayPaymentRecordService;
|
||||||
@@ -50,7 +54,9 @@ import com.jero.common.util.AuthenticationUtils;
|
|||||||
import com.jero.project.service.IPayWorkingGroupService;
|
import com.jero.project.service.IPayWorkingGroupService;
|
||||||
import com.jero.project.vo.PayCommonProjectOutput;
|
import com.jero.project.vo.PayCommonProjectOutput;
|
||||||
import com.jero.standards.memberinfo.entity.MemberInfo;
|
import com.jero.standards.memberinfo.entity.MemberInfo;
|
||||||
|
import com.jero.temporary.entity.PayCompanyManagementTemporary;
|
||||||
import com.jero.temporary.entity.PayContactsManagementTemporary;
|
import com.jero.temporary.entity.PayContactsManagementTemporary;
|
||||||
|
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
|
||||||
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
|
||||||
import org.apache.commons.beanutils.PropertyUtils;
|
import org.apache.commons.beanutils.PropertyUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -59,6 +65,7 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -84,6 +91,8 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
@Resource
|
@Resource
|
||||||
private PayPaymentRecordMapper payPaymentRecordMapper;
|
private PayPaymentRecordMapper payPaymentRecordMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private PayPaymentCheckMapper payPaymentCheckMapper;
|
||||||
|
@Resource
|
||||||
private PayCommonProjectMapper payCommonProjectMapper;
|
private PayCommonProjectMapper payCommonProjectMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PayWorkingGroupSubItemMapper payWorkingGroupSubItemMapper;
|
private PayWorkingGroupSubItemMapper payWorkingGroupSubItemMapper;
|
||||||
@@ -115,6 +124,8 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
private TbCertificatePaymentMapper certificatePaymentMapper;
|
private TbCertificatePaymentMapper certificatePaymentMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPayPaymentCheckService payPaymentCheckService;
|
private IPayPaymentCheckService payPaymentCheckService;
|
||||||
|
@Resource
|
||||||
|
private IPayCompanyManagementService payCompanyManagementService;
|
||||||
|
|
||||||
@Value("${jero.path.upload}")
|
@Value("${jero.path.upload}")
|
||||||
private String upLoadPath;
|
private String upLoadPath;
|
||||||
@@ -151,14 +162,26 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
commonProject.setMeetingType(payMeeting.getMeetingType());
|
commonProject.setMeetingType(payMeeting.getMeetingType());
|
||||||
commonProject.setSituationId(id);
|
commonProject.setSituationId(id);
|
||||||
}
|
}
|
||||||
//插入审核状态,供前端判断是否显示审核按钮
|
//插入待审核状态,供前端判断是否显示审核按钮
|
||||||
for(PayPaymentRecordSub recordSub : RecordSubList){
|
for(PayPaymentRecordSub recordSub : RecordSubList){
|
||||||
if(commonProject.getId().equals(recordSub.getProjectId())){
|
if(commonProject.getId().equals(recordSub.getProjectId())){
|
||||||
commonProject.setCheckPaymentStatus(recordSub.getPaymentStatus());
|
if(PaymentStatusEnum.TO_BE_REVIEWED.getCode().equals(recordSub.getPaymentStatus())){
|
||||||
|
commonProject.setCheckPaymentStatus(recordSub.getPaymentStatus());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(commonProject.getCheckPaymentStatus())){
|
// if(StringUtils.isBlank(commonProject.getCheckPaymentStatus())){
|
||||||
commonProject.setCheckPaymentStatus(commonProject.getPaymentStatus());
|
// commonProject.setCheckPaymentStatus(commonProject.getPaymentStatus());
|
||||||
|
// }
|
||||||
|
//会议、标协会员、标协证书,来款单位拼接“未审核”
|
||||||
|
if (commonProject.getProjectType().equals(Integer.parseInt(ProjectCommon.PROJECT_TYPE3))||
|
||||||
|
commonProject.getProjectType().equals(Integer.parseInt(ProjectCommon.PROJECT_TYPE5))||
|
||||||
|
commonProject.getProjectType().equals(Integer.parseInt(ProjectCommon.PROJECT_TYPE6))) {
|
||||||
|
PayCompanyManagement payCompanyManagementMeeting = payCompanyManagementService.getById(commonProject.getChargeCompanyTemporaryId());
|
||||||
|
if(!Objects.isNull(payCompanyManagementMeeting) && payCompanyManagementMeeting.getStatus()==2 ){
|
||||||
|
commonProject.setChargeCompanyTemporaryName(commonProject.getChargeCompanyTemporaryName()+"(未审核)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@@ -166,13 +189,16 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加来款记录
|
* 添加来款记录
|
||||||
|
* @param list
|
||||||
|
* @param flag
|
||||||
|
* @param checkOrRecord check:企业端走审核流程来款,record:管理端直接来款
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addAmountReceived(List<PayPaymentRecord> list,Integer flag){
|
public void addAmountReceived(List<PayPaymentRecord> list,Integer flag,String checkOrRecord){
|
||||||
List<TbCheckVo> typr5List = new ArrayList<>();
|
List<TbCheckVo> typr5List = new ArrayList<>();
|
||||||
List<TbCheckVo> typr6List = new ArrayList<>();
|
List<TbCheckVo> typr6List = new ArrayList<>();
|
||||||
for(PayPaymentRecord payPaymentRecord : list){
|
for(PayPaymentRecord payPaymentRecord : list){
|
||||||
addOneAmountReceived(payPaymentRecord,typr5List,typr6List,flag);
|
addOneAmountReceived(payPaymentRecord,typr5List,typr6List,flag,checkOrRecord);
|
||||||
|
|
||||||
}
|
}
|
||||||
//会员到账推送到会员系统
|
//会员到账推送到会员系统
|
||||||
@@ -302,10 +328,11 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
/**
|
/**
|
||||||
* 添加一个来款记录
|
* 添加一个来款记录
|
||||||
* @param payPaymentRecord
|
* @param payPaymentRecord
|
||||||
|
* @param checkOrRecord check:企业端走审核流程来款,record:管理端直接来款
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void addOneAmountReceived(PayPaymentRecord payPaymentRecord,List<TbCheckVo> typr5List,List<TbCheckVo> typr6List,Integer flag){
|
public void addOneAmountReceived(PayPaymentRecord payPaymentRecord,List<TbCheckVo> typr5List,List<TbCheckVo> typr6List,Integer flag,String checkOrRecord){
|
||||||
|
|
||||||
BigDecimal newPaidAmount;
|
BigDecimal newPaidAmount;
|
||||||
Integer inAccount;
|
Integer inAccount;
|
||||||
@@ -498,8 +525,26 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
default:break;
|
default:break;
|
||||||
}
|
}
|
||||||
//插入来款记录表
|
//插入来款记录表
|
||||||
|
payPaymentRecord.setId(null);
|
||||||
payPaymentRecord.setPaymentStatus(PaymentStatusEnum.COMPLETED.getCode());
|
payPaymentRecord.setPaymentStatus(PaymentStatusEnum.COMPLETED.getCode());
|
||||||
payPaymentRecordMapper.insert(payPaymentRecord);
|
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||||
|
//如果是直接来的款的在需要在审核表里插入一条,在管理端走审核流程的已经插完了
|
||||||
|
if("record".equals(checkOrRecord)){
|
||||||
|
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
|
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||||
|
BeanUtils.copyProperties(payPaymentRecord, payPaymentRecordSub);
|
||||||
|
payPaymentRecordSub.setId(null);
|
||||||
|
payPaymentRecordSub.setApplicantName(sysUser.getRealname());
|
||||||
|
payPaymentRecordSub.setReviewerId(sysUser.getId());
|
||||||
|
payPaymentRecordSub.setReviewerName(sysUser.getRealname());
|
||||||
|
payPaymentRecordSub.setReviewTime(new Date());
|
||||||
|
payPaymentRecordSub.setLastSign(LastSignEnum.LAST.getCode());
|
||||||
|
payPaymentRecordSub.setDelFlag(PayProjectCommon.NO);
|
||||||
|
payPaymentRecordSub.setRecordId(payPaymentRecord.getId());
|
||||||
|
payPaymentCheckMapper.insert(payPaymentRecordSub);
|
||||||
|
}
|
||||||
|
|
||||||
// 发消息
|
// 发消息
|
||||||
sendMessage( principalId, project, payPaymentRecord, listId);
|
sendMessage( principalId, project, payPaymentRecord, listId);
|
||||||
}
|
}
|
||||||
@@ -930,6 +975,14 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
|||||||
default:break;
|
default:break;
|
||||||
}
|
}
|
||||||
payPaymentRecordMapper.updateById(payPaymentRecord);
|
payPaymentRecordMapper.updateById(payPaymentRecord);
|
||||||
|
//更新审核表
|
||||||
|
UpdateWrapper<PayPaymentRecordSub> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("record_id",payPaymentRecord.getId());
|
||||||
|
PayPaymentRecordSub payPaymentRecordSub = new PayPaymentRecordSub();
|
||||||
|
payPaymentRecordSub.setAmountReceived(payPaymentRecord.getAmountReceived());
|
||||||
|
payPaymentRecordSub.setPaymentDate(payPaymentRecord.getPaymentDate());
|
||||||
|
payPaymentRecordSub.setRemark(payPaymentRecord.getRemark());
|
||||||
|
payPaymentCheckMapper.update(payPaymentRecordSub,updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user