update 提取默认税率

This commit is contained in:
lijiarao
2022-11-08 17:53:37 +08:00
parent 5fbb3ce850
commit 1bc45f6c4d
7 changed files with 23 additions and 11 deletions
+1 -2
View File
@@ -88,8 +88,7 @@ CREATE TABLE `pay_manager_management`
UNIQUE KEY `contacts_company_and_name_index` (`company_id`, `name`) USING BTREE COMMENT '企业与姓名唯一',
KEY `contacts_company_name_index` (`company_name`) USING BTREE,
KEY `contacts_name_index` (`name`) USING BTREE
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='企业管理员管理';
) COMMENT ='企业管理员管理';
alter table pay_company_management
add column link_bank_number varchar(50) null comment '联行号';
@@ -23,6 +23,13 @@ public class StaticConfig {
@Value(value = "${spring.mail.host}")
private String host;
public static String TAX_RATE;
@Value("${tax_rate}")
public void setTaxRate(String taxRate) {
StaticConfig.TAX_RATE = taxRate;
}
/*@Bean
public void initStatic() {
@@ -23,6 +23,7 @@ import com.jero.company.entity.PayContactsManagement;
import com.jero.company.mapper.PayContactsManagementMapper;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.BillingInfo;
@@ -802,7 +803,7 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
BigDecimal noTaxAmount = payMailBillProject.getNoTaxAmount();
BigDecimal tax = payMailBillProject.getTax();
if (noTaxAmount == null || tax == null){
noTaxAmount = invoiceAmount.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = invoiceAmount.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = invoiceAmount.subtract(noTaxAmount);
}
payPaymentRecordService.isTax(noTaxAmount,tax,invoiceAmount);
@@ -1138,7 +1139,7 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
BigDecimal noTaxAmount = bm.getNoTaxAmount();
BigDecimal tax = bm.getTax();
if (noTaxAmount == null || tax == null){
noTaxAmount = thisInvoiceAmount.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = thisInvoiceAmount.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = thisInvoiceAmount.subtract(noTaxAmount);
bm.setNoTaxAmount(noTaxAmount);
bm.setTax(tax);
@@ -1,6 +1,7 @@
package com.jero.payment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.mapper.PayMeetingSituationMapper;
@@ -55,7 +56,7 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
BigDecimal tax = payConfirmPaymentRecord.getTax();
BigDecimal amountReceived = payConfirmPaymentRecord.getAmountReceived();
if (noTaxAmount == null || tax == null){
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
payConfirmPaymentRecord.setNoTaxAmount(noTaxAmount);
payConfirmPaymentRecord.setTax(tax);
@@ -19,6 +19,7 @@ import com.jero.common.util.AuthenticationUtils;
import com.jero.common.util.PasswordUtil;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.mapper.PayMeetingSituationMapper;
import com.jero.member.entity.*;
@@ -564,7 +565,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
payPaymentRecord.setTax(tax);
@@ -641,7 +642,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
payPaymentRecord.setTax(tax);
@@ -25,6 +25,7 @@ import com.jero.company.entity.PayCompanyManagement;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.common.MeetingSubitemCommon;
import com.jero.meeting.entity.PayMeeting;
@@ -212,7 +213,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
BigDecimal tax1 = payPaymentRecord.getTax();
if (noTaxAmount1 == null || tax1 == null){
BigDecimal amountReceived = payPaymentRecord.getAmountReceived();
BigDecimal noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
BigDecimal noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
BigDecimal tax = amountReceived.subtract(noTaxAmount);
payPaymentRecord.setNoTaxAmount(noTaxAmount);
payPaymentRecord.setTax(tax);
@@ -366,7 +367,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
BigDecimal noTaxAmount;
List<PayContactsManagementTemporary> listId = new ArrayList<>();
BigDecimal divide = payPaymentRecord.getAmountReceived().divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
BigDecimal divide = payPaymentRecord.getAmountReceived().divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
//累加主列表实收金额
//来款条件校验
amountReceivedVerification( payPaymentRecord, flag);
@@ -641,7 +642,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
//保存税额
@@ -695,7 +696,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
//保存税额
@@ -338,3 +338,5 @@ singleSignON:
client_id: cwp
client_secret: 3a381f2432d648879ebd10ba7b54a8ae
client_url: https://iam.catarc.ac.cn
tax_rate: 1.06