Commit c5446c98 authored by chase's avatar chase

merge档案管理代码

parent c897feee
...@@ -10,15 +10,16 @@ public class TaxesCalculateReportEnum { ...@@ -10,15 +10,16 @@ public class TaxesCalculateReportEnum {
Column_1(0, "序号"), Column_1(0, "序号"),
Column_2(1, "收入类型名称"), Column_2(1, "收入类型名称"),
Column_3(2, "税金项目"), Column_3(2, "税金项目"),
Column_4(3, "账载收入-明细"), Column_4(3, "期间"),
Column_5(4, "销项开票收入数-专票"), Column_5(4, "账载收入-明细"),
Column_6(5, "销项开票收入数-普票"), Column_6(5, "销项开票收入数-专票"),
Column_7(6, "计税基数(应税收入)"), Column_7(6, "销项开票收入数-普票"),
Column_8(7, "税率"), Column_8(7, "计税基数(应税收入)"),
Column_9(8, "税额(元)"), Column_9(8, "税率"),
Column_10(9, "收入类别"), Column_10(9, "税额(元)"),
Column_11(10, "计税方式"), Column_11(10, "收入类别"),
Column_12(11, "备注") Column_12(11, "计税方式"),
Column_13(12, "备注")
; ;
private Integer index; private Integer index;
private String name; private String name;
......
...@@ -185,7 +185,7 @@ public class TemplateController extends BaseController { ...@@ -185,7 +185,7 @@ public class TemplateController extends BaseController {
@RequestParam(name = "projectId") String projectId, @RequestParam(name = "projectId") String projectId,
HttpServletResponse response) throws URISyntaxException { HttpServletResponse response) throws URISyntaxException {
period = 0; // period = 0;
String filePath; String filePath;
File templateFile; File templateFile;
InputStream inputStream = null; InputStream inputStream = null;
......
...@@ -258,7 +258,12 @@ public class TemplateGroupServiceImpl extends AbstractService { ...@@ -258,7 +258,12 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate.setCreateTime(now); cellTemplate.setCreateTime(now);
cellTemplate.setUpdateTime(now); cellTemplate.setUpdateTime(now);
cellTemplate.setRowIndex(r); cellTemplate.setRowIndex(r);
cellTemplate.setRowName(StringUtils.EMPTY); //税金计算表单独处理
if("VAT020".equals(template.getCode())){
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
}else{
cellTemplate.setRowName(StringUtils.EMPTY);
}
cellTemplate.setColumnName(StringUtils.EMPTY); cellTemplate.setColumnName(StringUtils.EMPTY);
cellTemplate.setComment(StringUtils.EMPTY); cellTemplate.setComment(StringUtils.EMPTY);
cellTemplate.setCopyFromId(0L); cellTemplate.setCopyFromId(0L);
...@@ -407,6 +412,10 @@ public class TemplateGroupServiceImpl extends AbstractService { ...@@ -407,6 +412,10 @@ public class TemplateGroupServiceImpl extends AbstractService {
continue;//todo cell == null 如何处理 continue;//todo cell == null 如何处理
} }
CellTemplate cellTemplate = new CellTemplate(); CellTemplate cellTemplate = new CellTemplate();
//税金计算表单独处理
if("VAT020".equals(template.getCode())){
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
}
cellTemplate.setColumnIndex(c); cellTemplate.setColumnIndex(c);
cellTemplate.setCreateTime(now); cellTemplate.setCreateTime(now);
cellTemplate.setUpdateTime(now); cellTemplate.setUpdateTime(now);
......
...@@ -64,7 +64,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -64,7 +64,7 @@ public class ReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class); private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class);
private BlockingQueue<PeriodJob> queue = new LinkedBlockingQueue<>(); private BlockingQueue<PeriodJob> queue = new LinkedBlockingQueue<>();
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX", private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR","WPNAME","WPTYPE", "SUM2", "RSUMIF", "SUM"}; "JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "SUM"};
@Autowired @Autowired
private ReportGeneratorImpl reportGenerator; private ReportGeneratorImpl reportGenerator;
...@@ -380,72 +380,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -380,72 +380,7 @@ public class ReportServiceImpl extends BaseService {
if (cell == null) { if (cell == null) {
continue;//todo cell == null 如何处理 continue;//todo cell == null 如何处理
} }
//查询原来行cell是否有CellTemplate if (r <= addRowIndex) {
CellTemplateExample cellTemplateExample = new CellTemplateExample();
cellTemplateExample.createCriteria().andReportTemplateIdEqualTo(template.getId()).andRowIndexEqualTo(r - addRowIndex).andColumnIndexEqualTo(c);
List<CellTemplate> cellTemplates = cellTemplateMapper.selectByExample(cellTemplateExample);
if (CollectionUtils.isNotEmpty(cellTemplates)) {
CellTemplate cellTemplate = cellTemplates.get(0);
PeriodCellTemplate periodCellTemplate = new PeriodCellTemplate();
CommonUtils.copyProperties(cellTemplate, periodCellTemplate);
periodCellTemplate.setId(distributedIdService.nextId());
periodCellTemplate.setPeriod(period);
periodCellTemplate.setReportTemplateId(template.getId());
periodCellTemplate.setRowIndex(r);
periodCellTemplate.setRowName(cellTemplate.getRowName());
periodCellTemplate.setColumnIndex(c);
periodCellTemplate.setColumnName(cellTemplate.getColumnName());
periodCellTemplate.setComment(cellTemplate.getComment());
periodCellTemplate.setCreateTime(cellTemplate.getCreateTime());
periodCellTemplate.setUpdateTime(cellTemplate.getUpdateTime());
periodCellTemplate.setCellTemplateId(cellTemplate.getId());
periodCellTemplate.setDataType(cellTemplate.getDataType());
periodCellTemplate.setIsReadOnly(cellTemplate.getIsReadOnly() ? 1 : 0);
periodCellTemplate.setCopyFromId(cellTemplate.getCopyFromId());
periodCellTemplate.setCreateBy(StringUtils.isBlank(cellTemplate.getCreateBy()) ? "admin" : cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(StringUtils.isBlank(cellTemplate.getUpdateBy()) ? "admin" : cellTemplate.getUpdateBy());
periodCellTemplate.setProjectId(projectId);
cellTemplateList.add(periodCellTemplate);
CellTemplateConfigExample configExample = new CellTemplateConfigExample();
configExample.createCriteria().andCellTemplateIdEqualTo(cellTemplate.getId());
List<CellTemplateConfig> configs = cellTemplateConfigMapper.selectByExample(configExample);
if (CollectionUtils.isNotEmpty(configs)) {
for (CellTemplateConfig cellTemplateConfig : configs) {
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
CommonUtils.copyProperties(cellTemplateConfig, periodCellTemplateConfig);
periodCellTemplateConfig.setId(distributedIdService.nextId());
periodCellTemplateConfig.setPeriod(period);
periodCellTemplateConfig.setCellTemplateId(cellTemplateConfig.getCellTemplateId());
periodCellTemplateConfig.setReportTemplateId(template.getId());
periodCellTemplateConfig.setDataSourceType(cellTemplateConfig.getDataSourceType());
periodCellTemplateConfig.setFormula(StringUtils.isBlank(cellTemplateConfig.getFormula()) ? null : cellTemplateConfig.getFormula());
periodCellTemplateConfig.setParsedFormula(null);
periodCellTemplateConfig.setFormulaDescription(cellTemplateConfig.getFormulaDescription());
periodCellTemplateConfig.setAccountCodes(cellTemplateConfig.getAccountCodes());
periodCellTemplateConfig.setInvoiceType(cellTemplateConfig.getInvoiceType());
periodCellTemplateConfig.setTaxRate(cellTemplateConfig.getTaxRate());
periodCellTemplateConfig.setInvoiceAmountType(cellTemplateConfig.getInvoiceAmountType());
periodCellTemplateConfig.setModelIds(cellTemplateConfig.getModelIds());
periodCellTemplateConfig.setCreateBy(StringUtils.isBlank(cellTemplateConfig.getCreateBy()) ? "admin" : cellTemplateConfig.getCreateBy());
periodCellTemplateConfig.setCreateTime(cellTemplateConfig.getCreateTime());
periodCellTemplateConfig.setUpdateBy(StringUtils.isBlank(cellTemplateConfig.getUpdateBy()) ? "admin" : cellTemplateConfig.getUpdateBy());
periodCellTemplateConfig.setUpdateTime(cellTemplateConfig.getUpdateTime());
periodCellTemplateConfig.setInvoiceCategory(cellTemplateConfig.getInvoiceCategory());
periodCellTemplateConfig.setFormulaDataSource(cellTemplateConfig.getFormulaDataSource());
periodCellTemplateConfig.setValidation(cellTemplateConfig.getValidation());
periodCellTemplateConfig.setParsedValidation(null);
periodCellTemplateConfig.setValidationDescription(cellTemplateConfig.getValidationDescription());
periodCellTemplateConfig.setVoucherKeyword(cellTemplateConfig.getVoucherKeyword());
periodCellTemplateConfig.setCellTemplateConfigId(cellTemplateConfig.getId());
periodCellTemplateConfig.setKeyValueParsedFormula(null);
periodCellTemplateConfig.setProjectId(projectId);
fixedParsedFormula(periodCellTemplateConfig);
fixedAccountCode(periodCellTemplateConfig);
cellTemplateConfigList.add(periodCellTemplateConfig);
}
}
} else {
Long cellTemplateId = distributedIdService.nextId(); Long cellTemplateId = distributedIdService.nextId();
PeriodCellTemplate cellTemplate = new PeriodCellTemplate(); PeriodCellTemplate cellTemplate = new PeriodCellTemplate();
cellTemplate.setPeriod(period); cellTemplate.setPeriod(period);
...@@ -465,10 +400,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -465,10 +400,9 @@ public class ReportServiceImpl extends BaseService {
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式 //todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if (hasKeyIn(cell)) { if (hasKeyIn(cell)) {
cell.setCellValue(StringUtils.EMPTY); cell.setCellValue(StringUtils.EMPTY);
addManualConfig(template.getId(), cell, now, cellTemplateConfigList); addManualConfig(template.getId(), cellTemplateId, cell, now, cellTemplateConfigList);
} else if (!cell.getCellStyle().getLocked() && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) { } else if (!cell.getCellStyle().getLocked() && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) {
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig(); PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
periodCellTemplateConfig.setCellTemplateId(cellTemplateId);
periodCellTemplateConfig.setId(distributedIdService.nextId()); periodCellTemplateConfig.setId(distributedIdService.nextId());
periodCellTemplateConfig.setPeriod(period); periodCellTemplateConfig.setPeriod(period);
periodCellTemplateConfig.setCellTemplateId(cellTemplateId); periodCellTemplateConfig.setCellTemplateId(cellTemplateId);
...@@ -486,11 +420,76 @@ public class ReportServiceImpl extends BaseService { ...@@ -486,11 +420,76 @@ public class ReportServiceImpl extends BaseService {
fixedParsedFormula(periodCellTemplateConfig); fixedParsedFormula(periodCellTemplateConfig);
fixedAccountCode(periodCellTemplateConfig); fixedAccountCode(periodCellTemplateConfig);
cellTemplateConfigList.add(periodCellTemplateConfig); cellTemplateConfigList.add(periodCellTemplateConfig);
addManualConfig(template.getId(), cell, now, cellTemplateConfigList); addManualConfig(template.getId(), cellTemplateId, cell, now, cellTemplateConfigList);
}
} else {
//查询原来行cell是否有CellTemplate
CellTemplateExample cellTemplateExample = new CellTemplateExample();
cellTemplateExample.createCriteria().andReportTemplateIdEqualTo(template.getId()).andRowIndexEqualTo(r - addRowIndex).andColumnIndexEqualTo(c);
List<CellTemplate> cellTemplates = cellTemplateMapper.selectByExample(cellTemplateExample);
if (CollectionUtils.isNotEmpty(cellTemplates)) {
CellTemplate cellTemplate = cellTemplates.get(0);
PeriodCellTemplate periodCellTemplate = new PeriodCellTemplate();
CommonUtils.copyProperties(cellTemplate, periodCellTemplate);
periodCellTemplate.setId(distributedIdService.nextId());
periodCellTemplate.setPeriod(period);
periodCellTemplate.setReportTemplateId(template.getId());
periodCellTemplate.setRowIndex(r);
periodCellTemplate.setRowName(cellTemplate.getRowName());
periodCellTemplate.setColumnIndex(c);
periodCellTemplate.setColumnName(cellTemplate.getColumnName());
periodCellTemplate.setComment(cellTemplate.getComment());
periodCellTemplate.setCreateTime(cellTemplate.getCreateTime());
periodCellTemplate.setUpdateTime(cellTemplate.getUpdateTime());
periodCellTemplate.setCellTemplateId(cellTemplate.getId());
periodCellTemplate.setDataType(cellTemplate.getDataType());
periodCellTemplate.setIsReadOnly(cellTemplate.getIsReadOnly() ? 1 : 0);
periodCellTemplate.setCopyFromId(cellTemplate.getCopyFromId());
periodCellTemplate.setCreateBy(StringUtils.isBlank(cellTemplate.getCreateBy()) ? "admin" : cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(StringUtils.isBlank(cellTemplate.getUpdateBy()) ? "admin" : cellTemplate.getUpdateBy());
periodCellTemplate.setProjectId(projectId);
cellTemplateList.add(periodCellTemplate);
CellTemplateConfigExample configExample = new CellTemplateConfigExample();
configExample.createCriteria().andCellTemplateIdEqualTo(cellTemplate.getId());
List<CellTemplateConfig> configs = cellTemplateConfigMapper.selectByExample(configExample);
if (CollectionUtils.isNotEmpty(configs)) {
for (CellTemplateConfig cellTemplateConfig : configs) {
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
CommonUtils.copyProperties(cellTemplateConfig, periodCellTemplateConfig);
periodCellTemplateConfig.setId(distributedIdService.nextId());
periodCellTemplateConfig.setPeriod(period);
periodCellTemplateConfig.setCellTemplateId(cellTemplateConfig.getCellTemplateId());
periodCellTemplateConfig.setReportTemplateId(template.getId());
periodCellTemplateConfig.setDataSourceType(cellTemplateConfig.getDataSourceType());
periodCellTemplateConfig.setFormula(StringUtils.isBlank(cellTemplateConfig.getFormula()) ? null : cellTemplateConfig.getFormula());
periodCellTemplateConfig.setParsedFormula(null);
periodCellTemplateConfig.setFormulaDescription(cellTemplateConfig.getFormulaDescription());
periodCellTemplateConfig.setAccountCodes(cellTemplateConfig.getAccountCodes());
periodCellTemplateConfig.setInvoiceType(cellTemplateConfig.getInvoiceType());
periodCellTemplateConfig.setTaxRate(cellTemplateConfig.getTaxRate());
periodCellTemplateConfig.setInvoiceAmountType(cellTemplateConfig.getInvoiceAmountType());
periodCellTemplateConfig.setModelIds(cellTemplateConfig.getModelIds());
periodCellTemplateConfig.setCreateBy(StringUtils.isBlank(cellTemplateConfig.getCreateBy()) ? "admin" : cellTemplateConfig.getCreateBy());
periodCellTemplateConfig.setCreateTime(cellTemplateConfig.getCreateTime());
periodCellTemplateConfig.setUpdateBy(StringUtils.isBlank(cellTemplateConfig.getUpdateBy()) ? "admin" : cellTemplateConfig.getUpdateBy());
periodCellTemplateConfig.setUpdateTime(cellTemplateConfig.getUpdateTime());
periodCellTemplateConfig.setInvoiceCategory(cellTemplateConfig.getInvoiceCategory());
periodCellTemplateConfig.setFormulaDataSource(cellTemplateConfig.getFormulaDataSource());
periodCellTemplateConfig.setValidation(cellTemplateConfig.getValidation());
periodCellTemplateConfig.setParsedValidation(null);
periodCellTemplateConfig.setValidationDescription(cellTemplateConfig.getValidationDescription());
periodCellTemplateConfig.setVoucherKeyword(cellTemplateConfig.getVoucherKeyword());
periodCellTemplateConfig.setCellTemplateConfigId(cellTemplateConfig.getId());
periodCellTemplateConfig.setKeyValueParsedFormula(null);
periodCellTemplateConfig.setProjectId(projectId);
fixedParsedFormula(periodCellTemplateConfig);
fixedAccountCode(periodCellTemplateConfig);
cellTemplateConfigList.add(periodCellTemplateConfig);
}
}
} }
} }
} }
} }
List<List<PeriodCellTemplate>> tmpList = CommonUtils.subListWithLen(cellTemplateList, CommonUtils.BATCH_NUM); List<List<PeriodCellTemplate>> tmpList = CommonUtils.subListWithLen(cellTemplateList, CommonUtils.BATCH_NUM);
...@@ -504,15 +503,15 @@ public class ReportServiceImpl extends BaseService { ...@@ -504,15 +503,15 @@ public class ReportServiceImpl extends BaseService {
} }
} }
private void addManualConfig(Long templateId, Cell cell, Date now, List<PeriodCellTemplateConfig> list) { private void addManualConfig(Long templateId, Long cellTemplateId, Cell cell, Date now, List<PeriodCellTemplateConfig> list) {
PeriodCellTemplateConfig configManual = new PeriodCellTemplateConfig(); PeriodCellTemplateConfig configManual = new PeriodCellTemplateConfig();
configManual.setId(distributedIdService.nextId()); configManual.setId(distributedIdService.nextId());
// configManual.setCellTemplateId(cellTemplate.getId()); configManual.setCellTemplateId(cellTemplateId);
configManual.setReportTemplateId(templateId); configManual.setReportTemplateId(templateId);
configManual.setDataSourceType(CellDataSourceType.KeyIn.getCode()); configManual.setDataSourceType(CellDataSourceType.KeyIn.getCode());
configManual.setFormula(POIUtil.getCellFormulaString(cell)); configManual.setFormula(POIUtil.getCellFormulaString(cell));
// config.setFormula(cell.getCellFormula()); // config.setFormula(cell.getCellFormula());
// configManual.setFormulaDataSource("报表数据"); //todo KV相关 configManual.setFormulaDataSource("报表数据"); //todo KV相关
configManual.setUpdateTime(now); configManual.setUpdateTime(now);
// configManual.setUpdateBy(authUserHelper.getCurrentUserId()); // configManual.setUpdateBy(authUserHelper.getCurrentUserId());
list.add(configManual); list.add(configManual);
...@@ -668,7 +667,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -668,7 +667,7 @@ public class ReportServiceImpl extends BaseService {
Map<String, String> urlMap = null; Map<String, String> urlMap = null;
is = httpFileService.getUserTemplate(uploadDetail.getList().get(0).getViewHttpUrl()); is = httpFileService.getUserTemplate(uploadDetail.getList().get(0).getViewHttpUrl());
Workbook tWorkbook = WorkbookFactory.create(is); Workbook tWorkbook = WorkbookFactory.create(is);
tWorkbook = assembleTaxWorkBook(template,tWorkbook,projectId,period); tWorkbook = assembleTaxWorkBook(template, tWorkbook, projectId, period);
tWorkbook.write(bout); tWorkbook.write(bout);
FileUpload fileUpload = didiFileUploadService.uploadFile(bout.toByteArray(), template.getCode() + "_" + template.getName() + ".xlsx", FileUploadEnum.BizSource.PERIOD_REPORT_TEMPLATE_UPLOAD.name()); FileUpload fileUpload = didiFileUploadService.uploadFile(bout.toByteArray(), template.getCode() + "_" + template.getName() + ".xlsx", FileUploadEnum.BizSource.PERIOD_REPORT_TEMPLATE_UPLOAD.name());
periodTemplate.setPath(fileUpload.getUid()); periodTemplate.setPath(fileUpload.getUid());
...@@ -697,27 +696,30 @@ public class ReportServiceImpl extends BaseService { ...@@ -697,27 +696,30 @@ public class ReportServiceImpl extends BaseService {
Sheet sheet = tWorkbook.getSheetAt(0); Sheet sheet = tWorkbook.getSheetAt(0);
RevenueConfigExample example = new RevenueConfigExample(); RevenueConfigExample example = new RevenueConfigExample();
List<RevenueConfig> dataList = revenueConfigMapper.selectByExample(example); List<RevenueConfig> dataList = revenueConfigMapper.selectByExample(example);
List<Integer> unLockStyles = Arrays.asList();
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
int rowIndex = 1; int rowIndex = 1;
Row sourceRow = sheet.getRow(3); Row sourceRow = sheet.getRow(3);
for (RevenueConfig config : dataList) { for (RevenueConfig config : dataList) {
Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow); Row row = POIUtil.createAndCloneRow(tWorkbook, sheet, 1, sourceRow);
row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + rowIndex); row.getCell(TaxesCalculateReportEnum.Column.Column_1.getIndex()).setCellValue("1-" + rowIndex);
row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue(config.getName()); row.getCell(TaxesCalculateReportEnum.Column.Column_3.getIndex()).setCellValue(config.getName());
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("YYYY-MM"); row.getCell(TaxesCalculateReportEnum.Column.Column_2.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue("PC(\"VAT020\",\"C\",\"增值税进项税\",\"G\")");
row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_6.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_6.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_7.getIndex()).setCellValue(""); row.getCell(TaxesCalculateReportEnum.Column.Column_7.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("BB(\"VAT005\",\"M\",8,0,0)"); row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"C\",\"增值税进项税\",\"G\")");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue(config.getTaxRate().multiply(new BigDecimal(100)).intValue() + "%"); row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue(config.getTaxRate().multiply(new BigDecimal(100)).intValue() + "%");
row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue(0); row.getCell(TaxesCalculateReportEnum.Column.Column_10.getIndex()).setCellValue(0);
row.getCell(TaxesCalculateReportEnum.Column.Column_11.getIndex()).setCellValue(RevenueConfEnum.RevenueType.MAPPING.get(config.getRevenueType())); row.getCell(TaxesCalculateReportEnum.Column.Column_11.getIndex()).setCellValue(RevenueConfEnum.RevenueType.MAPPING.get(config.getRevenueType()));
row.getCell(TaxesCalculateReportEnum.Column.Column_12.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType())); row.getCell(TaxesCalculateReportEnum.Column.Column_12.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType()));
row.getCell(TaxesCalculateReportEnum.Column.Column_13.getIndex()).setCellValue(RevenueConfEnum.TaxType.MAPPING.get(config.getTaxType()));
rowIndex++; rowIndex++;
} }
} }
assemblePeriodTemplate(template, tWorkbook, projectId, period,dataList.size()); assemblePeriodTemplate(template, tWorkbook, projectId, period, dataList.size());
return tWorkbook; return tWorkbook;
} }
...@@ -875,7 +877,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -875,7 +877,7 @@ public class ReportServiceImpl extends BaseService {
periodJobMapper.updateByPrimaryKey(genJob); periodJobMapper.updateByPrimaryKey(genJob);
} }
@Autowired @Resource
private DataValidateLogMapper dataValidateLogMapper; private DataValidateLogMapper dataValidateLogMapper;
public void insertDataValidateResult(Map map) { public void insertDataValidateResult(Map map) {
......
...@@ -8,18 +8,12 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction; ...@@ -8,18 +8,12 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts; import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.DataSourceName;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType; import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto; import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.BBParasBo;
import pwc.taxtech.atms.dto.vatdto.CurrentPeriodBo;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto; import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo; import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.exception.Exceptions; import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException; import pwc.taxtech.atms.exception.FormulaException;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -65,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction { ...@@ -65,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL); MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
cellTemplateData = cellTemplateDataList.get(0); cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode()); int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex() - 1, cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), "VAT020".equals(bo.getReportCode())?bo.getColumnIndex():(bo.getColumnIndex() - 1),
Long.parseLong(cellTemplateData.getCellTemplateId())); Long.parseLong(cellTemplateData.getCellTemplateId()));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData); nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
nullCellDto.setAmount(cellValue); nullCellDto.setAmount(cellValue);
......
...@@ -67,16 +67,16 @@ taxDocumentManageModule.factory('taxDocumentListService', ...@@ -67,16 +67,16 @@ taxDocumentManageModule.factory('taxDocumentListService',
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params);
}, },
getCompanyNameOptions:function(params){ getCompanyNameOptions:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/org/query4SelectionBox', params); return jqFetch.get(apiInterceptor.webApiHostUrl + '/org/getMyOrgList', params);
}, },
delFileRecordItems:function(params){ delFileRecordItems:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params);
}, },
getDocumentsAttrAndType:function(params){ getDocumentsAttrAndType:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/v1/fileTypes/selectList', params); return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/selectList', params);
}, },
getBusinessList:function(params){ getBusinessList:function(params){
return jqFetch.get(apiInterceptor.webApiHostUrl + '/v1/businessunit/getlist', params); return jqFetch.get(apiInterceptor.webApiHostUrl + '/businessunit/getlist', params);
}, },
downloadAllFile:function(params){ downloadAllFile:function(params){
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment