fix 88141 标协会员-编辑金额后,以下状态没有更新

This commit is contained in:
lijiarao
2024-08-07 10:46:58 +08:00
parent 5f2cfee507
commit 9126a01a2a
4 changed files with 41 additions and 1 deletions
@@ -38,6 +38,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
c.affirm_income as affirm_income
from pay_common_project c
left join sys_user su on c.principal_id = su.id
@@ -82,6 +83,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
affirm_income
from pay_working_group g
left join sys_user su on g.principal_id_a = su.id
@@ -127,6 +129,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
affirm_income
from pay_meeting meeting
left join sys_user su on meeting.director_id = su.id
@@ -172,6 +175,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
affirm_income
from pay_member_project pmp
left join sys_user su on pmp.director_id = su.id
@@ -217,6 +221,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
affirm_income
from tb_member_project tmember
left join sys_user su on tmember.director_id = su.id
@@ -264,6 +269,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
affirm_income
from tb_member_project tmember
left join sys_user su on tmember.director_id = su.id
@@ -309,6 +315,7 @@
'' as tax_rate,
'' as tax,
'' as no_tax_amount,
'' as confirm_amount,
''
FROM
pay_drafting_group g
@@ -357,6 +364,7 @@
c.tax_rate as tax_rate,
c.tax as tax,
c.no_tax_amount as no_tax_amount,
c.confirm_amount as confirm_amount,
c.income_affirm AS affirm_income
from pay_pack_company c
left join sys_user su on c.pack_principal_id = su.id
@@ -402,6 +410,7 @@
'' as tax_rate,
'' as tax,
'' as no_tax_amount,
'' as confirm_amount,
''
FROM
pay_functional_safety_center c
@@ -37,6 +37,7 @@ import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.payment.service.IPayPaymentRecordService;
import com.jero.payment.service.impl.PayConfirmPaymentRecordService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
@@ -103,6 +104,8 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
@Resource
private SafetyCenterSubitemContactsService safetyCenterSubitemContactsService;
@Resource
private PayConfirmPaymentRecordService confirmPaymentRecordService;
@Override
public ProjectDetailVO getProjectDetail(String projectId) {
@@ -512,6 +515,10 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
if(y > 0 && y <= c){
projectStatusVO.setMail(ProjectCommon.MAIL2);
}
//确认收入
BigDecimal confirmAmount = payCommonProject.getConfirmAmount();
Integer affirmIncome = confirmPaymentRecordService.getAffirmIncome(receivableAmount, confirmAmount);
projectStatusVO.setAffirmIncome(affirmIncome);
return projectStatusVO;
}
@@ -1,5 +1,6 @@
package com.jero.common.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -18,4 +19,9 @@ public class ProjectStatusVO implements Serializable {
* 邮寄((1:全额(对勾),0:0X),2>0 && <总金额(半满标志)))
*/
private Integer mail;
/**
* 确认收入((1:全额(对勾),0:0(X),2>0 && <总金额(半满标志)))
*/
private Integer affirmIncome;
}
@@ -47,6 +47,7 @@ import com.jero.pack.entity.PayPackCompanyProject;
import com.jero.pack.service.IPayPackCompanyProjectService;
import com.jero.payment.entity.PayConfirmPaymentRecord;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.payment.service.IPayPaymentCheckService;
import com.jero.payment.service.IPayPaymentRecordService;
import com.jero.payment.service.impl.PayConfirmPaymentRecordService;
import com.jero.project.common.PayProjectCommon;
@@ -126,6 +127,8 @@ public class ITbMemberProjectSubitemService extends ServiceImpl<TbMemberProjectS
private IPayContactsManagementTemporaryService payContactsManagementTemporaryService;
@Autowired
private ProjectDetailService projectDetailService;
@Resource
private IPayPaymentCheckService payPaymentCheckService;
/**
* 保存
*/
@@ -445,7 +448,22 @@ public class ITbMemberProjectSubitemService extends ServiceImpl<TbMemberProjectS
setSubitemEdit(tbMemberProjectSubitem,subitemOld,annualDataLocking);
// 变更待确收金额,重新校验状态
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(subitemId,tbMemberProjectSubitem.getAmountReceivable(),tbMemberProjectSubitem.getInvoiceRequirements());
if(!Objects.isNull(projectStatusVO)){
if(!Objects.isNull(projectStatusVO.getInAccount())){
tbMemberProjectSubitem.setInAccount(projectStatusVO.getInAccount());
}
if(!Objects.isNull(projectStatusVO.getMakeInvoice())){
tbMemberProjectSubitem.setMakeInvoice(projectStatusVO.getMakeInvoice());
}
if(!Objects.isNull(projectStatusVO.getMail())){
tbMemberProjectSubitem.setMail(projectStatusVO.getMail());
}
if(!Objects.isNull(projectStatusVO.getAffirmIncome())){
tbMemberProjectSubitem.setAffirmIncome(projectStatusVO.getAffirmIncome());
}
}
String paymentStatus = payPaymentCheckService.getPaymentStatus(tbMemberProjectSubitem.getAmountReceivable(), tbMemberProjectSubitem.getPaidAmount(), tbMemberProjectSubitem.getPaymentStatus(), false);
tbMemberProjectSubitem.setPaymentStatus(paymentStatus);
// 校验项目是否已关联合同
PayIncomeContract payIncomeContract = payIncomeContractService.checkPayIncomeContractAssociated(subitemId);
if (!Objects.isNull(payIncomeContract)) {