|
|
|
@ -7,6 +7,7 @@ import java.util.*; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
@ -44,9 +45,10 @@ import cn.hutool.core.codec.Base64; |
|
|
|
|
* @author dxhy |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings("AlibabaMethodTooLong") |
|
|
|
|
@Slf4j |
|
|
|
|
@Service |
|
|
|
|
public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExportInvoiceDao, TdxExportInvoice> |
|
|
|
|
implements DomesticExportInvoiceCkService { |
|
|
|
|
implements DomesticExportInvoiceCkService { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private DomesticTaxCurrentService domesticTaxCurrentService; |
|
|
|
@ -62,7 +64,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
@Override |
|
|
|
|
public String queryVatSgrz(Page page, TdxExportInvoiceModelDTO dto, UserInfo userInfo) throws Exception { |
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
dto.setParam(page, userInfo); |
|
|
|
|
|
|
|
|
|
ResultData<Object> resultData = new ResultData<>(); |
|
|
|
@ -89,27 +91,29 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
for (int i = 0; i < page.getRecords().size(); i++) { |
|
|
|
|
Map<String, Object> map = result.getRecords().get(i); |
|
|
|
|
|
|
|
|
|
String invoiceStatus = (String)map.get("invoiceStatus"); |
|
|
|
|
String invoiceStatus = (String) map.get("invoiceStatus"); |
|
|
|
|
|
|
|
|
|
map.put("xh", |
|
|
|
|
String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); |
|
|
|
|
map.put("xh", String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); |
|
|
|
|
if (map.get("invoiceDate") != null) { |
|
|
|
|
map.put("invoiceDate", sdf.format(map.get("invoiceDate"))); |
|
|
|
|
String invoiceDate = map.get("invoiceDate").toString(); |
|
|
|
|
log.info("invoiceDate={}", invoiceDate); |
|
|
|
|
if (invoiceDate != null && StringUtils.isNotBlank(invoiceDate)) |
|
|
|
|
map.put("invoiceDate", sdf.format(invoiceDate)); |
|
|
|
|
} |
|
|
|
|
map.put("invoiceStatus", dictdetaServcice.queryDictName(DictConstant.INVOICE_STATUS, invoiceStatus)); |
|
|
|
|
|
|
|
|
|
map.put("exportAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportAmount")).toPlainString()))); |
|
|
|
|
map.put("exportTaxAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
map.put("exportYxse", MathUtil.round(((BigDecimal)map.get("exportYxse")).toPlainString())); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
map.put("exportYxse", MathUtil.round(((BigDecimal) map.get("exportYxse")).toPlainString())); |
|
|
|
|
map.put("select", true); |
|
|
|
|
map.put("upgradeStatus", "1"); |
|
|
|
|
|
|
|
|
|
TdxDkCount tDxDkCount; |
|
|
|
|
TdxTaxCurrent tDxTaxCurrent; |
|
|
|
|
List<TdxTaxCurrent> tdxTaxCurrents = domesticTaxCurrentService |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, map.get("gfTaxNo"))); |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, map.get("gfTaxNo"))); |
|
|
|
|
|
|
|
|
|
if (tdxTaxCurrents == null || tdxTaxCurrents.size() == 0) { |
|
|
|
|
map.put("select", false); |
|
|
|
@ -117,8 +121,8 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
tDxTaxCurrent = tdxTaxCurrents.get(0); |
|
|
|
|
List<TdxDkCount> tdxDkCounts = domesticDkCountService |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, map.get("gfTaxNo")) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, map.get("gfTaxNo")) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
|
|
|
|
|
if (tdxDkCounts == null || tdxDkCounts.size() == 0) { |
|
|
|
|
map.put("select", false); |
|
|
|
@ -128,7 +132,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
tDxDkCount = tdxDkCounts.get(0); |
|
|
|
|
|
|
|
|
|
if (!DateUtil.isInTwoDate(tDxTaxCurrent.getSelectStartDate(), tDxTaxCurrent.getSelectEndDate(), |
|
|
|
|
(String)map.get("invoiceDate"))) { |
|
|
|
|
(String) map.get("invoiceDate"))) { |
|
|
|
|
map.put("select", false); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -180,7 +184,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
|
|
|
|
|
// 1.查询数据
|
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
List<TdxExportInvoice> records = new ArrayList<>(); |
|
|
|
|
// 2.校验
|
|
|
|
|
List<String> dkList = new ArrayList<>(); |
|
|
|
@ -207,20 +211,20 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
TdxTaxCurrent tDxTaxCurrent; |
|
|
|
|
TdxDkCount tDxDkCount; |
|
|
|
|
List<TdxTaxCurrent> tdxTaxCurrents = domesticTaxCurrentService |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, record.getGfTaxNo())); |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, record.getGfTaxNo())); |
|
|
|
|
|
|
|
|
|
tDxTaxCurrent = tdxTaxCurrents.get(0); |
|
|
|
|
|
|
|
|
|
List<TdxDkCount> tdxDkCounts = domesticDkCountService |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, record.getGfTaxNo()) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, record.getGfTaxNo()) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
|
|
|
|
|
tDxDkCount = tdxDkCounts.get(0); |
|
|
|
|
InvoiceLog invoiceLog = new InvoiceLog(); |
|
|
|
|
// 认证抵扣
|
|
|
|
|
if ("1".equals(dto.getRzlx())) { |
|
|
|
|
if (Double.parseDouble(yxTaxAmount) <= 0 |
|
|
|
|
|| Double.parseDouble(yxTaxAmount) > record.getExportTaxAmount().doubleValue()) { |
|
|
|
|
|| Double.parseDouble(yxTaxAmount) > record.getExportTaxAmount().doubleValue()) { |
|
|
|
|
sb.append(record.getInvoiceNo()).append(" \n "); |
|
|
|
|
flag = true; |
|
|
|
|
continue; |
|
|
|
@ -246,7 +250,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
|
|
|
|
|
// 判断抵扣限额
|
|
|
|
|
if (tDxTaxCurrent.getLimitDkse() != null |
|
|
|
|
&& tDxTaxCurrent.getLimitDkse().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
|
&& tDxTaxCurrent.getLimitDkse().compareTo(BigDecimal.ZERO) != 0) { |
|
|
|
|
if (!dkList.contains(record.getGfTaxNo())) { |
|
|
|
|
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16); |
|
|
|
@ -332,7 +336,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
// 3.更新数据
|
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_WRITE); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_WRITE); |
|
|
|
|
if (!flag && !flag1 && !flag2 && !flag3) { |
|
|
|
|
for (TdxExportInvoice record : records) { |
|
|
|
|
|
|
|
|
@ -358,11 +362,11 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
resultMap.put("total", AmountFormatUtil.fmtMicrometer(String.valueOf(total))); |
|
|
|
|
resultMap.put("hjje", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjje.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjje.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
resultMap.put("hjse", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
resultMap.put("hjyxse", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjyxse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjyxse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
resultMap.put("message", message); |
|
|
|
|
if (logList.size() > 0) { |
|
|
|
|
invoiceLogService.toInvoiceLog(logList); |
|
|
|
@ -373,7 +377,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
@Override |
|
|
|
|
public String queryVatBdk(Page page, TdxExportInvoiceModelDTO dto, UserInfo userInfo) throws Exception { |
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
dto.setParam(page, userInfo); |
|
|
|
|
|
|
|
|
|
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(dto.getCompany(), dto.getMenuId()); |
|
|
|
@ -400,15 +404,19 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
for (int i = 0; i < page.getRecords().size(); i++) { |
|
|
|
|
Map<String, Object> map = result.getRecords().get(i); |
|
|
|
|
|
|
|
|
|
String authStatus = (String)map.get("authStatus"); |
|
|
|
|
String cxbdkStatus = (String)map.get("cxbdkStatus"); |
|
|
|
|
String invoiceStatus = (String)map.get("invoiceStatus"); |
|
|
|
|
String bdkStatus = (String)map.get("bdkStatus"); |
|
|
|
|
String authStatus = (String) map.get("authStatus"); |
|
|
|
|
String cxbdkStatus = (String) map.get("cxbdkStatus"); |
|
|
|
|
String invoiceStatus = (String) map.get("invoiceStatus"); |
|
|
|
|
String bdkStatus = (String) map.get("bdkStatus"); |
|
|
|
|
|
|
|
|
|
map.put("xh", |
|
|
|
|
String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); |
|
|
|
|
map.put("xh", String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); |
|
|
|
|
if (map.get("invoiceDate") != null) { |
|
|
|
|
map.put("invoiceDate", sdf.format(map.get("invoiceDate"))); |
|
|
|
|
String invoiceDate = map.get("invoiceDate").toString(); |
|
|
|
|
if (invoiceDate.length() > 10) |
|
|
|
|
invoiceDate = invoiceDate.substring(0, 10); |
|
|
|
|
log.info("invoiceDate={}", invoiceDate); |
|
|
|
|
if (invoiceDate != null && StringUtils.isNotBlank(invoiceDate)) |
|
|
|
|
map.put("invoiceDate", sdf.format(invoiceDate)); |
|
|
|
|
} |
|
|
|
|
// 字典转换
|
|
|
|
|
map.put("invoiceStatus", dictdetaServcice.queryDictName(DictConstant.INVOICE_STATUS, invoiceStatus)); |
|
|
|
@ -416,17 +424,17 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
map.put("cxbdkStatus", dictdetaServcice.queryDictName(DictConstant.BDK_UNDO_STATUS, cxbdkStatus)); |
|
|
|
|
|
|
|
|
|
map.put("exportAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportAmount")).toPlainString()))); |
|
|
|
|
map.put("exportTaxAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
map.put("exportYxse", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportYxse")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportYxse")).toPlainString()))); |
|
|
|
|
map.put("select", true); |
|
|
|
|
|
|
|
|
|
TdxDkCount tDxDkCount; |
|
|
|
|
TdxTaxCurrent tDxTaxCurrent; |
|
|
|
|
List<TdxTaxCurrent> tdxTaxCurrents = domesticTaxCurrentService |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, map.get("gfTaxNo"))); |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, map.get("gfTaxNo"))); |
|
|
|
|
|
|
|
|
|
if (tdxTaxCurrents == null || tdxTaxCurrents.size() == 0) { |
|
|
|
|
map.put("select", false); |
|
|
|
@ -434,8 +442,8 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
tDxTaxCurrent = tdxTaxCurrents.get(0); |
|
|
|
|
List<TdxDkCount> tdxDkCounts = domesticDkCountService |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, map.get("gfTaxNo")) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, map.get("gfTaxNo")) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
|
|
|
|
|
if (tdxDkCounts == null || tdxDkCounts.size() == 0) { |
|
|
|
|
map.put("select", false); |
|
|
|
@ -447,7 +455,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
// 认证不抵扣
|
|
|
|
|
if ("0".equals(dto.getSfDkStatus())) { |
|
|
|
|
if (!"0".equals(authStatus) && !"4".equals(authStatus) && !"5".equals(authStatus) |
|
|
|
|
&& !"6".equals(authStatus)) { |
|
|
|
|
&& !"6".equals(authStatus)) { |
|
|
|
|
map.put("select", false); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -463,9 +471,9 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String invoiceDate = (String)map.get("invoiceDate"); |
|
|
|
|
String invoiceDate = (String) map.get("invoiceDate"); |
|
|
|
|
if (!DateUtil.isInTwoDate(tDxTaxCurrent.getSelectStartDate(), tDxTaxCurrent.getSelectEndDate(), |
|
|
|
|
invoiceDate)) { |
|
|
|
|
invoiceDate)) { |
|
|
|
|
map.put("select", false); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
@ -514,11 +522,11 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
for (int i = 0; i < page.getRecords().size(); i++) { |
|
|
|
|
Map<String, Object> map = result.getRecords().get(i); |
|
|
|
|
|
|
|
|
|
String bdkStatus = (String)map.get("bdkStatus"); |
|
|
|
|
String cxrzStatus = (String)map.get("cxrzStatus"); |
|
|
|
|
String rzhYesorno = (String)map.get("rzhYesorno"); |
|
|
|
|
String invoiceStatus = (String)map.get("invoiceStatus"); |
|
|
|
|
String authStatus = (String)map.get("authStatus"); |
|
|
|
|
String bdkStatus = (String) map.get("bdkStatus"); |
|
|
|
|
String cxrzStatus = (String) map.get("cxrzStatus"); |
|
|
|
|
String rzhYesorno = (String) map.get("rzhYesorno"); |
|
|
|
|
String invoiceStatus = (String) map.get("invoiceStatus"); |
|
|
|
|
String authStatus = (String) map.get("authStatus"); |
|
|
|
|
|
|
|
|
|
map.put("xh", |
|
|
|
|
String.valueOf((((page.getCurrent() == 0 ? 1 : page.getCurrent()) - 1) * page.getSize()) + i + 1)); |
|
|
|
@ -539,11 +547,11 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
map.put("bdkStatusBak", bdkStatus); |
|
|
|
|
|
|
|
|
|
map.put("exportAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportAmount")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportAmount")).toPlainString()))); |
|
|
|
|
map.put("exportTaxAmount", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportTaxAmount")).toPlainString()))); |
|
|
|
|
map.put("exportYxse", AmountFormatUtil |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal)map.get("exportYxse")).toPlainString()))); |
|
|
|
|
.fmtMicrometer(MathUtil.round(((BigDecimal) map.get("exportYxse")).toPlainString()))); |
|
|
|
|
map.put("select", true); |
|
|
|
|
|
|
|
|
|
TdxDkCount tDxDkCount; |
|
|
|
@ -618,7 +626,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
|
|
|
|
|
// 1.查询数据
|
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_READ); |
|
|
|
|
List<TdxExportInvoice> records = new ArrayList<>(); |
|
|
|
|
List<InvoiceLog> logList = new ArrayList<>(); |
|
|
|
|
// 2.校验
|
|
|
|
@ -632,13 +640,13 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
TdxTaxCurrent tDxTaxCurrent; |
|
|
|
|
TdxDkCount tDxDkCount; |
|
|
|
|
List<TdxTaxCurrent> tdxTaxCurrents = domesticTaxCurrentService |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, record.getGfTaxNo())); |
|
|
|
|
.list(Wrappers.<TdxTaxCurrent>query().lambda().eq(TdxTaxCurrent::getTaxno, record.getGfTaxNo())); |
|
|
|
|
|
|
|
|
|
tDxTaxCurrent = tdxTaxCurrents.get(0); |
|
|
|
|
|
|
|
|
|
List<TdxDkCount> tdxDkCounts = domesticDkCountService |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, record.getGfTaxNo()) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
.list(Wrappers.<TdxDkCount>query().lambda().eq(TdxDkCount::getTaxno, record.getGfTaxNo()) |
|
|
|
|
.eq(TdxDkCount::getSkssq, tDxTaxCurrent.getCurrentTaxPeriod())); |
|
|
|
|
|
|
|
|
|
tDxDkCount = tdxDkCounts.get(0); |
|
|
|
|
|
|
|
|
@ -699,7 +707,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
// 3.更新数据
|
|
|
|
|
DynamicContextHolder |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_WRITE); |
|
|
|
|
.push(StringUtils.defaultString(userInfo.getDbName(), "business") + DbConstant.BUSINESS_WRITE); |
|
|
|
|
for (TdxExportInvoice record : records) { |
|
|
|
|
total++; |
|
|
|
|
hjje = hjje.add(record.getExportAmount()); |
|
|
|
@ -718,12 +726,12 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo |
|
|
|
|
} |
|
|
|
|
resultMap.put("total", AmountFormatUtil.fmtMicrometer(String.valueOf(total))); |
|
|
|
|
resultMap.put("hjse", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
resultMap.put("message", message); |
|
|
|
|
resultMap.put("hjje", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjje.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjje.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
resultMap.put("hjdk", |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjyxse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
AmountFormatUtil.fmtMicrometer(hjyxse.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString())); |
|
|
|
|
if (logList.size() > 0) { |
|
|
|
|
invoiceLogService.toInvoiceLog(logList); |
|
|
|
|
} |
|
|
|
|