|
|
@@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import io.seata.spring.annotation.GlobalTransactional;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
@@ -49,7 +48,6 @@ import org.springblade.los.finance.invoices.service.IFinInvoiceItemDetailService
|
|
|
import org.springblade.los.finance.invoices.service.IFinInvoicesItemsService;
|
|
|
import org.springblade.los.finance.invoices.service.IFinInvoicesService;
|
|
|
import org.springblade.los.finance.invoices.vo.FinInvoicesVO;
|
|
|
-import org.springblade.los.finance.stl.entity.FinStlBillsItems;
|
|
|
import org.springblade.system.feign.ISysClient;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -161,7 +159,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
item.setCurrentAmountLoc(item.getCurrentAmount());
|
|
|
item.setCurrentAmountEx(item.getCurrentAmount());
|
|
|
} else {
|
|
|
- item.setCurrentAmountLoc(bCurrencyService.converterCny(item.getCurrentCurCode(), item.getCurrentAmount(), "","2"));
|
|
|
+ item.setCurrentAmountLoc(bCurrencyService.converterCny(item.getCurrentCurCode(), item.getCurrentAmount(), "", "2"));
|
|
|
if (1 == finInvoices.getIsExchangeToCny()) {
|
|
|
item.setCurrentAmountEx(item.getCurrentAmount().multiply(finInvoices.getExrate()));
|
|
|
} else {
|
|
|
@@ -179,7 +177,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
item.setCurrentAmountTax(amountTax);
|
|
|
item.setCurrentAmountNet(amountNet);
|
|
|
item.setPid(finInvoices.getId());
|
|
|
- if (ObjectUtils.isNull(item.getBusinessType())){
|
|
|
+ if (ObjectUtils.isNull(item.getBusinessType())) {
|
|
|
item.setBusinessType(finInvoices.getBusinessTypes());
|
|
|
}
|
|
|
if (item.getId() == null) {
|
|
|
@@ -229,7 +227,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
finInvoices.setAmountUsd(amountUsdD.subtract(amountUsdC));
|
|
|
finInvoices.setAmountTax(amountTaxD.subtract(amountTaxC).abs());
|
|
|
finInvoices.setAmountSub(amountCnyD.subtract(amountCnyC));
|
|
|
- finInvoices.setAmountLoc(finInvoices.getAmountCny().add(bCurrencyService.converterCny("USD", finInvoices.getAmountUsd(), "","2")));
|
|
|
+ finInvoices.setAmountLoc(finInvoices.getAmountCny().add(bCurrencyService.converterCny("USD", finInvoices.getAmountUsd(), "", "2")));
|
|
|
finInvoices.setAmountSubLocNet(finInvoices.getAmountLoc());
|
|
|
finInvoices.setAmountSubUsd(amountUsdD.subtract(amountUsdC));
|
|
|
} else {
|
|
|
@@ -378,7 +376,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
}
|
|
|
feeCenter.setUninvoicedAmount(feeCenter.getUninvoicedAmount().add(currentStlAmount));
|
|
|
currentStlAmount = new BigDecimal("0.00");
|
|
|
- } else if (feeCenter.getAmount().subtract(feeCenter.getStlTtlAmount()).compareTo(currentStlAmount) == 0) {
|
|
|
+ } else if (feeCenter.getAmount().subtract(feeCenter.getUninvoicedAmount()).compareTo(currentStlAmount) == 0) {
|
|
|
if (ObjectUtils.isNotNull(item.getApplySrcId())) {
|
|
|
feeCenter.setAppliedInvoiceAmountStl(feeCenter.getAmount());
|
|
|
}
|
|
|
@@ -420,7 +418,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
}
|
|
|
feeCenterService.saveOrUpdateBatch(feeCenterList);
|
|
|
finAccBillsService.saveOrUpdateBatch(finAccBillsList);
|
|
|
- updateBillsStatus(finInvoices.getFinInvoicesItemsList());
|
|
|
+ updateBillsStatus(finInvoices.getFinInvoicesItemsList(),feeCenterList);
|
|
|
} else {
|
|
|
throw new RuntimeException("请选择明细");
|
|
|
}
|
|
|
@@ -438,7 +436,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
return R.data(detail);
|
|
|
}
|
|
|
|
|
|
- private void updateBillsStatus(List<FinInvoicesItems> finStlBillsItemsList) {
|
|
|
+ /*private void updateBillsStatus(List<FinInvoicesItems> finStlBillsItemsList) {
|
|
|
String billNoHYD = finStlBillsItemsList.stream()
|
|
|
.filter(e -> ("SE".equals(e.getBusinessType()) || "SI".equals(e.getBusinessType()))
|
|
|
&& "D".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
@@ -449,8 +447,8 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
.apply("find_in_set(business_type,'" + billNoHYD + "')"));
|
|
|
for (Bills item : billsList) {
|
|
|
- item.setInvoiceDrStatus(9);
|
|
|
- item.setInvoiceDrStatusDescr("全开");
|
|
|
+ item.setInvoiceDrStatus(9);
|
|
|
+ item.setInvoiceDrStatusDescr("全开");
|
|
|
billsMapper.updateById(item);
|
|
|
}
|
|
|
}
|
|
|
@@ -531,6 +529,179 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
customsDeclarationMapper.updateById(item);
|
|
|
}
|
|
|
}
|
|
|
+ }*/
|
|
|
+
|
|
|
+ private void updateBillsStatus(List<FinInvoicesItems> finStlBillsItemsList, List<FeeCenter> feeCenters) {
|
|
|
+ String billNoHYD = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("SE".equals(e.getBusinessType()) || "SI".equals(e.getBusinessType()))
|
|
|
+ && "D".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoHYD)) {
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoHYD + "')"));
|
|
|
+ for (Bills item : billsList) {
|
|
|
+ if (!feeCenters.isEmpty()) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "D".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceDrStatus(9);
|
|
|
+ item.setInvoiceDrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceDrStatus(3);
|
|
|
+ item.setInvoiceDrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceDrStatus(0);
|
|
|
+ item.setInvoiceDrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ billsMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String billNoHYC = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("SE".equals(e.getBusinessType()) || "SI".equals(e.getBusinessType()))
|
|
|
+ && "C".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoHYC)) {
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoHYC + "')"));
|
|
|
+ for (Bills item : billsList) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "C".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceCrStatus(9);
|
|
|
+ item.setInvoiceCrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceCrStatus(3);
|
|
|
+ item.setInvoiceCrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceCrStatus(0);
|
|
|
+ item.setInvoiceCrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ billsMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String billNoKYD = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("AE".equals(e.getBusinessType()) || "AI".equals(e.getBusinessType()))
|
|
|
+ && "D".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoKYD)) {
|
|
|
+ List<AeaBills> billsList = aeaBillsMapper.selectList(new LambdaQueryWrapper<AeaBills>()
|
|
|
+ .eq(AeaBills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(AeaBills::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoKYD + "')"));
|
|
|
+ for (AeaBills item : billsList) {
|
|
|
+ if (!feeCenters.isEmpty()) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "D".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceDrStatus(9);
|
|
|
+ item.setInvoiceDrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceDrStatus(3);
|
|
|
+ item.setInvoiceDrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceDrStatus(0);
|
|
|
+ item.setInvoiceDrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ aeaBillsMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String billNoKYC = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("AE".equals(e.getBusinessType()) || "AI".equals(e.getBusinessType()))
|
|
|
+ && "C".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoKYC)) {
|
|
|
+ List<AeaBills> billsList = aeaBillsMapper.selectList(new LambdaQueryWrapper<AeaBills>()
|
|
|
+ .eq(AeaBills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(AeaBills::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoKYC + "')"));
|
|
|
+ for (AeaBills item : billsList) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "C".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceCrStatus(9);
|
|
|
+ item.setInvoiceCrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceCrStatus(3);
|
|
|
+ item.setInvoiceCrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceCrStatus(0);
|
|
|
+ item.setInvoiceCrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ aeaBillsMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String billNoBGD = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("BGSE".equals(e.getBusinessType()) || "BGAE".equals(e.getBusinessType())
|
|
|
+ || "BGAI".equals(e.getBusinessType()) || "BGSI".equals(e.getBusinessType()))
|
|
|
+ && "D".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoBGD)) {
|
|
|
+ List<CustomsDeclaration> billsList = customsDeclarationMapper.selectList(new LambdaQueryWrapper<CustomsDeclaration>()
|
|
|
+ .eq(CustomsDeclaration::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(CustomsDeclaration::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoBGD + "')"));
|
|
|
+ for (CustomsDeclaration item : billsList) {
|
|
|
+ if (!feeCenters.isEmpty()) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "D".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceDrStatus(9);
|
|
|
+ item.setInvoiceDrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceDrStatus(3);
|
|
|
+ item.setInvoiceDrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceDrStatus(0);
|
|
|
+ item.setInvoiceDrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ customsDeclarationMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String billNoBGC = finStlBillsItemsList.stream()
|
|
|
+ .filter(e -> ("BGSE".equals(e.getBusinessType()) || "BGAE".equals(e.getBusinessType())
|
|
|
+ || "BGAI".equals(e.getBusinessType()) || "BGSI".equals(e.getBusinessType()))
|
|
|
+ && "C".equals(e.getDc())).map(FinInvoicesItems::getBillNo)
|
|
|
+ .distinct().collect(Collectors.joining(","));
|
|
|
+ if (ObjectUtils.isNotNull(billNoBGC)) {
|
|
|
+ List<CustomsDeclaration> billsList = customsDeclarationMapper.selectList(new LambdaQueryWrapper<CustomsDeclaration>()
|
|
|
+ .eq(CustomsDeclaration::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(CustomsDeclaration::getIsDeleted, 0)
|
|
|
+ .apply("find_in_set(bill_no,'" + billNoBGC + "')"));
|
|
|
+ for (CustomsDeclaration item : billsList) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getPid().equals(item.getId())
|
|
|
+ && "C".equals(e.getDc())).collect(Collectors.toList());
|
|
|
+ BigDecimal amount = feeCenterList.stream().map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal amountStl = feeCenterList.stream().map(FeeCenter::getUninvoicedAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ if (amountStl.compareTo(amount) == 0) {
|
|
|
+ item.setInvoiceCrStatus(9);
|
|
|
+ item.setInvoiceCrStatusDescr("全开");
|
|
|
+ } else if (amountStl.compareTo(amount) < 0 && amountStl.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
+ item.setInvoiceCrStatus(3);
|
|
|
+ item.setInvoiceCrStatusDescr("部分");
|
|
|
+ } else {
|
|
|
+ item.setInvoiceCrStatus(0);
|
|
|
+ item.setInvoiceCrStatusDescr("未开");
|
|
|
+ }
|
|
|
+ customsDeclarationMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private Bills reconciliation(Bills item, BigDecimal countD, BigDecimal divideIdsD, BigDecimal countC, BigDecimal divideIdsC, BigDecimal idsD, BigDecimal idsC, String type) {
|
|
|
@@ -641,31 +812,30 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
.eq(FeeCenter::getAccStatus, 1)
|
|
|
.apply("uninvoiced_amount != 0")
|
|
|
.eq(FeeCenter::getIsDeleted, 0));
|
|
|
- BigDecimal currentStlAmount = detail.getAmountLoc();
|
|
|
+ BigDecimal currentStlAmount = item.getCurrentAmount();
|
|
|
for (FeeCenter feeCenter : feeCenters) {
|
|
|
- feeCenter.setInvoiceBillId(detail.getId() + "");
|
|
|
- feeCenter.setInvoiceBillNo(detail.getBillNo());
|
|
|
- feeCenter.setInvoiceNo(detail.getInvoiceNo());
|
|
|
- feeCenter.setInvoiceDate(feeCenter.getBillDate());
|
|
|
- feeCenter.setInvoiceStatus(2);
|
|
|
- feeCenter.setInvoiceCurCode(detail.getCurCode());
|
|
|
- feeCenter.setInvoiceExrate(detail.getExrate());
|
|
|
+ feeCenter.setInvoiceBillId("");
|
|
|
+ feeCenter.setInvoiceBillNo("");
|
|
|
+ feeCenter.setInvoiceNo("");
|
|
|
+ feeCenter.setInvoiceDate(null);
|
|
|
+ feeCenter.setInvoiceStatus(0);
|
|
|
+ feeCenter.setInvoiceCurCode("");
|
|
|
+ feeCenter.setInvoiceExrate(new BigDecimal("0.00"));
|
|
|
if ("CNY".equals(detail.getCurCode())) {
|
|
|
- feeCenter.setInvoiceAmount(detail.getAmountCny());
|
|
|
+ feeCenter.setInvoiceAmount(new BigDecimal("0.00"));
|
|
|
} else {
|
|
|
- feeCenter.setInvoiceAmount(detail.getAmountUsd());
|
|
|
+ feeCenter.setInvoiceAmount(new BigDecimal("0.00"));
|
|
|
}
|
|
|
- feeCenter.setInvoiceAmountLoc(detail.getAmountLoc());
|
|
|
- feeCenter.setUninvoicedAmount(feeCenter.getUninvoicedAmount().add(new BigDecimal("0.00").subtract(detail.getAmountLoc())));
|
|
|
- feeCenter.setInvoiceById(detail.getCreateUser());
|
|
|
- feeCenter.setInvoiceByName(detail.getCreateUserName());
|
|
|
+ feeCenter.setInvoiceAmountLoc(new BigDecimal("0.00"));
|
|
|
+ feeCenter.setInvoiceById(0L);
|
|
|
+ feeCenter.setInvoiceByName("");
|
|
|
if (feeCenter.getUninvoicedAmount().compareTo(currentStlAmount) > 0) {
|
|
|
if (ObjectUtils.isNotNull(item.getApplySrcId())) {
|
|
|
feeCenter.setAppliedInvoiceAmountStl(feeCenter.getAppliedInvoiceAmountStl().subtract(currentStlAmount));
|
|
|
}
|
|
|
feeCenter.setUninvoicedAmount(feeCenter.getUninvoicedAmount().subtract(currentStlAmount));
|
|
|
currentStlAmount = new BigDecimal("0.00");
|
|
|
- } else if (feeCenter.getStlTtlAmount().compareTo(currentStlAmount) == 0) {
|
|
|
+ } else if (feeCenter.getUninvoicedAmount().compareTo(currentStlAmount) == 0) {
|
|
|
if (ObjectUtils.isNotNull(item.getApplySrcId())) {
|
|
|
feeCenter.setAppliedInvoiceAmountStl(feeCenter.getAppliedInvoiceAmountStl().subtract(currentStlAmount));
|
|
|
}
|
|
|
@@ -700,6 +870,7 @@ public class FinInvoicesServiceImpl extends ServiceImpl<FinInvoicesMapper, FinIn
|
|
|
}
|
|
|
feeCenterService.saveOrUpdateBatch(feeCenterList);
|
|
|
finAccBillsService.saveOrUpdateBatch(finAccBillsList);
|
|
|
+ updateBillsStatus(finInvoices.getFinInvoicesItemsList(),feeCenterList);
|
|
|
} else {
|
|
|
throw new RuntimeException("请选择明细");
|
|
|
}
|