|
@@ -1904,6 +1904,7 @@ public class ExcelTabController extends BladeController {
|
|
@ApiOperationSupport(order = 13)
|
|
@ApiOperationSupport(order = 13)
|
|
@ApiOperation(value = "填报页面数据保存", notes = "填报页面数据保存")
|
|
@ApiOperation(value = "填报页面数据保存", notes = "填报页面数据保存")
|
|
public R saveBussData2(@Valid @RequestBody JSONObject dataInfo) throws Exception {
|
|
public R saveBussData2(@Valid @RequestBody JSONObject dataInfo) throws Exception {
|
|
|
|
+ ExecutionTime executionTime = new ExecutionTime();
|
|
JSONArray dataArray = new JSONArray();
|
|
JSONArray dataArray = new JSONArray();
|
|
if (dataInfo.containsKey("dataInfo")) { //节点保存
|
|
if (dataInfo.containsKey("dataInfo")) { //节点保存
|
|
JSONObject jsonObject = dataInfo.getJSONObject("dataInfo");
|
|
JSONObject jsonObject = dataInfo.getJSONObject("dataInfo");
|
|
@@ -1928,20 +1929,21 @@ public class ExcelTabController extends BladeController {
|
|
doForTableIst(tableAll,tableInfoList);
|
|
doForTableIst(tableAll,tableInfoList);
|
|
}
|
|
}
|
|
System.out.println("加载所有表单数据耗时:"+(System.currentTimeMillis()-start));*/
|
|
System.out.println("加载所有表单数据耗时:"+(System.currentTimeMillis()-start));*/
|
|
|
|
+ executionTime.info("公式前");
|
|
//公式填充
|
|
//公式填充
|
|
this.excelTabService.formulaFillData(tableInfoList, Long.parseLong(nodeId), ExecuteType.INSPECTION);
|
|
this.excelTabService.formulaFillData(tableInfoList, Long.parseLong(nodeId), ExecuteType.INSPECTION);
|
|
assert tableInfoList != null;
|
|
assert tableInfoList != null;
|
|
if(tableInfoList.size()==0){
|
|
if(tableInfoList.size()==0){
|
|
R.success("数据未发生变化");
|
|
R.success("数据未发生变化");
|
|
}
|
|
}
|
|
|
|
+ executionTime.info("公式耗时");
|
|
//保存数据到数据库
|
|
//保存数据到数据库
|
|
R<Object> result = this.excelTabService.saveOrUpdateInfo(tableInfoList);
|
|
R<Object> result = this.excelTabService.saveOrUpdateInfo(tableInfoList);
|
|
if (!result.isSuccess()) {
|
|
if (!result.isSuccess()) {
|
|
return R.fail(result.getMsg());
|
|
return R.fail(result.getMsg());
|
|
}
|
|
}
|
|
|
|
+ executionTime.info("表单保存耗时");
|
|
|
|
|
|
-
|
|
|
|
- long start2= System.currentTimeMillis();
|
|
|
|
List<String> errorPKeyIds = new ArrayList<>();
|
|
List<String> errorPKeyIds = new ArrayList<>();
|
|
//单个pdf加载
|
|
//单个pdf加载
|
|
if (tableInfoList != null) {
|
|
if (tableInfoList != null) {
|
|
@@ -1958,8 +1960,7 @@ public class ExcelTabController extends BladeController {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
- System.out.println("PDF刷新耗时:"+(System.currentTimeMillis()-start2));
|
|
|
|
|
|
+ executionTime.info("PDF刷新耗时");
|
|
//发生异常后直接返回,不进行合并
|
|
//发生异常后直接返回,不进行合并
|
|
if (errorPKeyIds.size() > 0) {
|
|
if (errorPKeyIds.size() > 0) {
|
|
List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
@@ -1976,10 +1977,11 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
//合并pdf加载
|
|
//合并pdf加载
|
|
excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
-
|
|
|
|
|
|
+ executionTime.info("PDF合并耗时");
|
|
//更新缓存
|
|
//更新缓存
|
|
informationQueryClient.delAsyncWbsTree(contractId);
|
|
informationQueryClient.delAsyncWbsTree(contractId);
|
|
-
|
|
|
|
|
|
+ executionTime.info("缓存删除耗时");
|
|
|
|
+ executionTime.brief();
|
|
return R.data("操作成功");
|
|
return R.data("操作成功");
|
|
}
|
|
}
|
|
|
|
|