|
@@ -1986,7 +1986,26 @@ public class ExcelTabController extends BladeController {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ //获取CL08 和CL10 监理表的id
|
|
|
+ String levelingTableName = "m_20220928134702_1574999102784012288";
|
|
|
+ String planePositionTableName = "m_20220928134725_1574999197613031424";
|
|
|
+ List<TableInfo> one = new ArrayList<>();
|
|
|
+ tableInfoList.forEach(tableInfo -> {
|
|
|
+ String pkeyId = tableInfo.getPkeyId();
|
|
|
+ WbsTreeContract byId = wbsTreeContractService.getById(pkeyId);
|
|
|
+ //如果时CL08 或者 CL10 监理表
|
|
|
+ if(levelingTableName.equals(byId.getInitTableName()) || planePositionTableName.equals(byId.getInitTableName())){
|
|
|
+ String sql = "select count(0) from " + byId.getInitTableName() + " where p_key_id = " + pkeyId;
|
|
|
+
|
|
|
+ //根据表单去查询数据
|
|
|
+ Integer i = jdbcTemplate.queryForObject(sql, Integer.class);
|
|
|
+ //如果有数据 就不执行公式
|
|
|
+ if(i > 0){
|
|
|
+ one.add(tableInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ tableInfoList.removeAll(one);
|
|
|
//公式填充
|
|
|
executionTime.info("----公式填充执行----");
|
|
|
this.excelTabService.formulaFillData(tableInfoList, Long.parseLong(nodeId), ExecuteType.INSPECTION);
|
|
@@ -1996,6 +2015,12 @@ public class ExcelTabController extends BladeController {
|
|
|
R.success("数据未发生变化");
|
|
|
}
|
|
|
executionTime.info("----公式填充执行完毕----");
|
|
|
+
|
|
|
+ //把CL08 和CL10 的监理表添加进去
|
|
|
+ if(CollectionUtil.isNotEmpty(one)){
|
|
|
+ tableInfoList.addAll(one);
|
|
|
+ }
|
|
|
+
|
|
|
//保存数据到数据库
|
|
|
R<Object> result = this.excelTabService.saveOrUpdateInfo(tableInfoList);
|
|
|
RandomNumberHolder.RandomTemplateTypeclear();
|