bms2相关修改;
This commit is contained in:
+10
-2
@@ -220,7 +220,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
for (BmsMakeOutInvoiceItem item1 : bmsMakeOutInvoiceItems) {
|
||||
if(item1.getInvoiceValue().compareTo(BigDecimal.ZERO)>0){
|
||||
Ysitem item=new Ysitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
@@ -478,7 +482,11 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
makerCodeNc=documentPreparerNcCode;
|
||||
SKitem item=new SKitem();
|
||||
item.setSo_deptid("NG0408");
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setSo_deptid(deptValue);
|
||||
} else {
|
||||
item.setSo_deptid("NG0408");
|
||||
}
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
item.setPk_deptid(deptValue);
|
||||
} else {
|
||||
|
||||
@@ -256,4 +256,9 @@ public class BillManageDO extends BaseVOEntity{
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
private String receivablePushTimeEnd;
|
||||
private String receivablePushTimeStart;
|
||||
private String paymentPushTimeEnd;
|
||||
private String paymentPushTimeStart;
|
||||
|
||||
}
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.mhd.bms.domain.billingRules.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.bms.domain.billingRules.entity.BillingParams;
|
||||
import com.mhd.bms.domain.billingRules.repository.facade.IBillingParamsService;
|
||||
import com.mhd.bms.domain.billingRules.repository.po.BillingParamsPO;
|
||||
@@ -121,7 +122,8 @@ public class BillingParamsDomainService {
|
||||
}
|
||||
billingParamsList.add(billingParams);
|
||||
}
|
||||
return billingParamsService.saveOrUpdateBatch(billingParamsList);
|
||||
billingParamsService.remove(new LambdaQueryWrapper<BillingParams>().eq(BillingParams::getBillingRulesId, billingRulesDO.getBillingRulesId()));
|
||||
return billingParamsService.saveBatch(billingParamsList);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,4 +138,4 @@ public class BillingParamsDomainService {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+33
-1
@@ -12,6 +12,7 @@ import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||
import com.mhd.bms.domain.billManage.service.BillManageDomainService;
|
||||
import com.mhd.bms.domain.billingStatement.entity.BillingStatement;
|
||||
import com.mhd.bms.domain.billingStatement.repository.facade.IBillingStatementService;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementADDVO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementCollectPO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.po.BillingStatementPO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementCollectDO;
|
||||
@@ -37,6 +38,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -265,7 +267,29 @@ public class BillingStatementDomainService {
|
||||
updateWrapper.set(BillingStatement::getUpdateTime,new Date());
|
||||
updateWrapper.set(BillingStatement::getUpdateByName,loginUser.getUserPo().getUserName());
|
||||
updateWrapper.set(BillingStatement::getBillManageId,billingStatementDTO.getBillManageId());
|
||||
return billingStatementService.update(updateWrapper);
|
||||
boolean update = billingStatementService.update(updateWrapper);
|
||||
List<BillingStatementADDVO> billingStatementList = billingStatementDTO.getBillingStatementList();
|
||||
for (BillingStatementADDVO billingStatementADDVO : billingStatementList) {
|
||||
String billingStatementIds = billingStatementADDVO.getBillingStatementId();
|
||||
Set<String> billings = Stream.of(billingStatementIds.split(",")).collect(Collectors.toSet());
|
||||
if (billings != null && billings.size() > 0) {
|
||||
for (String billing : billings) {
|
||||
Long billingStatementId = Long.valueOf(billing);
|
||||
Double taxRate = billingStatementADDVO.getTaxRate();
|
||||
BillingStatement billingStatement = billingStatementService.getById(billingStatementId);
|
||||
if (billingStatement != null) {
|
||||
BigDecimal billingAmount = billingStatement.getBillingAmount();
|
||||
BigDecimal taxAmount = billingAmount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = billingAmount.subtract(taxAmount);
|
||||
billingStatement.setTaxAmount(taxAmount);
|
||||
billingStatement.setTaxFreeFee(taxFreeFee);
|
||||
billingStatement.setTaxRate(taxRate);
|
||||
billingStatementService.updateById(billingStatement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
|
||||
@@ -390,6 +414,14 @@ public class BillingStatementDomainService {
|
||||
billingStatementDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
billingStatementDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
billingStatementDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
|
||||
BigDecimal billingAmount = billingStatementDO.getBillingAmount();
|
||||
Double taxRate = billingStatementDO.getTaxRate() != null ? billingStatementDO.getTaxRate() : 0.0;
|
||||
BigDecimal taxAmount = billingAmount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal taxFreeFee = billingAmount.subtract(taxAmount);
|
||||
billingStatementDO.setTaxAmount(taxAmount);
|
||||
billingStatementDO.setTaxFreeFee(taxFreeFee);
|
||||
|
||||
//处理数据
|
||||
handleData(billingStatementDO);
|
||||
return this.insert(billingStatementDO);
|
||||
|
||||
+1
@@ -138,4 +138,5 @@ public class BmsInvoiceListQueryDTO implements Serializable {
|
||||
@ApiModelProperty(value = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
private String billNumber;
|
||||
}
|
||||
+2
-1
@@ -176,5 +176,6 @@ public class BusinessDocument extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
+2
@@ -181,4 +181,6 @@ public class BusinessDocumentPO extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
+2
@@ -201,4 +201,6 @@ public class BusinessDocumentDO extends BaseVOEntity{
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("税率")
|
||||
private String taxRate;
|
||||
}
|
||||
@@ -58,6 +58,10 @@ public class PaymentWallet extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -71,4 +75,4 @@ public class PaymentWallet extends BaseVOEntity{
|
||||
private Long paymentManageId;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -57,6 +57,10 @@ public class PaymentWalletPO extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -71,4 +75,4 @@ public class PaymentWalletPO extends BaseVOEntity{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -57,6 +57,10 @@ public class PaymentWalletDO extends BaseVOEntity{
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
@Excel(name = "银行卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ApiModelProperty("支付方式编码")
|
||||
@Excel(name = "支付方式编码")
|
||||
private String paymentMethodCode;
|
||||
@@ -74,4 +78,4 @@ public class PaymentWalletDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user