Commit 72af8cf9 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

添加报表未取到公式

See merge request root/atms!174
parents 656b3165 c28f4dd6
...@@ -137,7 +137,7 @@ public class TemplateController extends BaseController { ...@@ -137,7 +137,7 @@ public class TemplateController extends BaseController {
@RequestMapping(value = "getTemplateUniqList", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "getTemplateUniqList", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
List<TemplateUniqDto> getTemplateUniqList(String serviceTypeId, Integer payTaxType, Integer reportType, String industryIds) { List<TemplateUniqDto> getTemplateUniqList(@RequestParam(value = "serviceTypeID") String serviceTypeId, Integer payTaxType, Integer reportType, @RequestParam(value = "industryIDs") String industryIds) {
return templateService.getTemplateUniqList(serviceTypeId, payTaxType, reportType, industryIds); return templateService.getTemplateUniqList(serviceTypeId, payTaxType, reportType, industryIds);
} }
......
...@@ -356,16 +356,19 @@ public class TemplateGroupServiceImpl extends AbstractService { ...@@ -356,16 +356,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate.setIsReadOnly(cell.getCellStyle().getLocked() ? true : false); cellTemplate.setIsReadOnly(cell.getCellStyle().getLocked() ? true : false);
cellTemplateList.add(cellTemplate); cellTemplateList.add(cellTemplate);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式 //todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
// CellTemplateConfig config = new CellTemplateConfig(); if(!cell.getCellStyle().getLocked() && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) {
// config.setId(distributedIdService.nextId()); CellTemplateConfig config = new CellTemplateConfig();
// config.setCellTemplateId(cellTemplate.getId()); config.setId(distributedIdService.nextId());
// config.setReportTemplateId(template.getId()); config.setCellTemplateId(cellTemplate.getId());
// config.setDataSourceType(1);//todo 枚举 config.setReportTemplateId(template.getId());
// config.setFormula(POIUtil.getCellFormulaString(cell)); config.setDataSourceType(1);//todo 枚举
//// config.setFormulaDataSource(); //todo KV相关 config.setFormula(POIUtil.getCellFormulaString(cell));
// config.setUpdateTime(now); // config.setFormula(cell.getCellFormula());
// config.setUpdateBy(authUserHelper.getCurrentUserId()); // config.setFormulaDataSource(); //todo KV相关
// cellTemplateConfigList.add(config); config.setUpdateTime(now);
config.setUpdateBy(authUserHelper.getCurrentUserId());
cellTemplateConfigList.add(config);
}
} }
} }
List<List<CellTemplate>> tmpList = CommonUtils.subListWithLen(cellTemplateList, CommonUtils.BATCH_NUM); List<List<CellTemplate>> tmpList = CommonUtils.subListWithLen(cellTemplateList, CommonUtils.BATCH_NUM);
......
...@@ -85,7 +85,7 @@ public class TemplateServiceImpl extends AbstractService { ...@@ -85,7 +85,7 @@ public class TemplateServiceImpl extends AbstractService {
map.put("serviceTypeId", serviceTypeId); map.put("serviceTypeId", serviceTypeId);
map.put("payTaxType", payTaxType); map.put("payTaxType", payTaxType);
map.put("reportType", reportType); map.put("reportType", reportType);
map.put("industryIds", industryIds); map.put("industryID", industryIds);
List<TemplateUniqDto> templatedbList = templateMapper.getTemplateUniqDtosByTemplateAndTemplateGroup(map); List<TemplateUniqDto> templatedbList = templateMapper.getTemplateUniqDtosByTemplateAndTemplateGroup(map);
Map<Long, Map<String, List<TemplateUniqDto>>> groupList = templatedbList.stream() Map<Long, Map<String, List<TemplateUniqDto>>> groupList = templatedbList.stream()
......
...@@ -222,30 +222,30 @@ public class ReportGeneratorImpl { ...@@ -222,30 +222,30 @@ public class ReportGeneratorImpl {
.collect(Collectors.toList()); .collect(Collectors.toList());
//todo: add manual datasource here,in order to disaplay the manual datasource we need add it first at here. //todo: add manual datasource here,in order to disaplay the manual datasource we need add it first at here.
// for (PeriodCellTemplateConfig keyInCellTemplateConfig : keyInCellTemplateConfigs) { for (PeriodCellTemplateConfig keyInCellTemplateConfig : keyInCellTemplateConfigs) {
// PeriodCellTemplateExample periodCellTemplateExample1 = new PeriodCellTemplateExample(); PeriodCellTemplateExample periodCellTemplateExample1 = new PeriodCellTemplateExample();
// periodCellTemplateExample1.createCriteria().andCellTemplateIdEqualTo(keyInCellTemplateConfig.getCellTemplateId()); periodCellTemplateExample1.createCriteria().andCellTemplateIdEqualTo(keyInCellTemplateConfig.getCellTemplateId());
// Optional<PeriodCellTemplate> periodCellTemplate = periodCellTemplateMapper.selectByExample(periodCellTemplateExample1).stream().findFirst(); Optional<PeriodCellTemplate> periodCellTemplate = periodCellTemplateMapper.selectByExample(periodCellTemplateExample1).stream().findFirst();
//
//
// DataSource dataSource = new DataSource(); PeriodDataSource dataSource = new PeriodDataSource();
// dataSource.setId(distributedIdService.nextId()); dataSource.setId(distributedIdService.nextId());
// if (periodCellTemplate.isPresent()) { if (periodCellTemplate.isPresent()) {
// dataSource.setColumnIndex(periodCellTemplate.get().getColumnIndex()); dataSource.setColumnIndex(periodCellTemplate.get().getColumnIndex());
// dataSource.setRowIndex(periodCellTemplate.get().getRowIndex()); dataSource.setRowIndex(periodCellTemplate.get().getRowIndex());
// } }
// dataSource.setAmount(new BigDecimal("0")); dataSource.setAmount(new BigDecimal("0"));
// dataSource.setName("ManualDataSource"); dataSource.setName("ManualDataSource");
// dataSource.setDescription("ManualDataSource"); dataSource.setDescription("ManualDataSource");
// dataSource.setCreateTime(createTime); dataSource.setCreateTime(createTime);
// dataSource.setUpdateTime(createTime); dataSource.setUpdateTime(createTime);
// dataSource.setCreateBy("Admin"); dataSource.setCreateBy("Admin");
// dataSource.setUpdateBy("Admin"); dataSource.setUpdateBy("Admin");
// dataSource.setPeriod(period); dataSource.setPeriod(period);
// dataSource.setCellTemplateId(keyInCellTemplateConfig.getCellTemplateId()); dataSource.setCellTemplateId(keyInCellTemplateConfig.getCellTemplateId());
// dataSource.setType(FormulaDataSourceType.KeyInSource.getCode()); dataSource.setType(FormulaDataSourceType.KeyInSource.getCode());
// dataSourceMapper.insertSelective(dataSource); periodDataSourceMapper.insertSelective(dataSource);
// } }
//update formulablock table reportid field //update formulablock table reportid field
List<Long> cellTemplateConfigIds = periodCellTemplateConfigs.stream() List<Long> cellTemplateConfigIds = periodCellTemplateConfigs.stream()
......
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