Commit c06aa2b1 authored by zhkwei's avatar zhkwei

CIT数据处理

parent b0658e9d
......@@ -183,12 +183,11 @@ public class CitReportServiceImpl extends BaseService {
@Override
public void run() {
try {
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
// TODO 进行数据校验
DataValidation(periodParam, projectId, genJob);
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
PeriodResources resources = reportGenerator.getPeriodResources(projectId, periodParam,
templates.stream().map(Template::getId).collect(Collectors.toList()));
......
......@@ -361,6 +361,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
Row row = temp.getRow(j);
for(int k = row.getFirstCellNum(); k < row.getLastCellNum(); k++){
Cell cell = row.getCell(k);
if (cell == null) {
continue;//todo cell == null 如何处理
}
cell.setCellType(CellType.STRING);
if(!cell.getCellStyle().getLocked() && "${KeyIn}".equalsIgnoreCase(cell.getStringCellValue())){
cell.setCellValue("");
......
......@@ -223,9 +223,18 @@ public class FormulaAgent {
double rev = 0.00;
for (int i = 0, j = stringObjectMap.size(); i < j; i++) {
if (i == 1) {
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev = 0.00;
}else{
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
} else {
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev= rev+ 0.00;
}else{
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
}
}
return rev;
......
......@@ -513,7 +513,7 @@ public class ReportGeneratorImpl {
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new SUM2(formulaContext),
new SUM(formulaContext), new RSUMIF(formulaContext), new TABLESUMIF(formulaContext)};
new RSUMIF(formulaContext), new TABLESUMIF(formulaContext), new SUM(formulaContext)};
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -642,7 +642,9 @@ debugger;
}
var getInitTaskStatus = function(){
debugger;
citReportService.getRunningJob(vatSessionService.project.id,0).then(function (result) {
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
if(result.data.jobStatus=='Begin'||result.data.jobStatus=='Running'){
......
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