|
@@ -326,7 +326,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
public void formulaFillData(List<TableInfo> tableInfoList, Long nodeId) {
|
|
|
if (Func.isNotEmpty(tableInfoList)) {
|
|
|
/*用来保存日志执行情况*/
|
|
|
- StringBuilder log=new StringBuilder();
|
|
|
+ StringBuilder log = new StringBuilder();
|
|
|
/*每次都是部分表单提交,保证跨节点跨表取数正常,其次是反向依赖的被动刷新*/
|
|
|
List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(nodeId.toString(), "1", tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId());
|
|
|
StopWatch stopWatch = new StopWatch();
|
|
@@ -347,7 +347,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
|
|
|
WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
|
|
|
CurrentNode currentNode = createCurrentNode(wtc);
|
|
|
- TableElementConverter tec = new TableElementConverter(tableInfoList, keyMappers, formulas, coordinateMap,currentNode,tableAll);
|
|
|
+ TableElementConverter tec = new TableElementConverter(tableInfoList, keyMappers, formulas, coordinateMap, currentNode, tableAll);
|
|
|
tec.setLog(log);
|
|
|
if (tec.isPresent()) {
|
|
|
tec.before();
|
|
@@ -355,12 +355,12 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
tec.after();
|
|
|
}
|
|
|
stopWatch.stop();
|
|
|
- Long totalTime=stopWatch.getTotalTimeMillis();
|
|
|
+ Long totalTime = stopWatch.getTotalTimeMillis();
|
|
|
log.append("公式执行消耗时间:").append(totalTime);
|
|
|
StaticLog.info("公式执行用时:{}", totalTime);
|
|
|
- String[] sql=new String[]{
|
|
|
- "delete from m_formula_log where id ="+wtc.getPKeyId(),
|
|
|
- "INSERT INTO m_formula_log (id,content) VALUES ("+wtc.getPKeyId()+", '"+log+"')"
|
|
|
+ String[] sql = new String[]{
|
|
|
+ "delete from m_formula_log where id =" + wtc.getPKeyId(),
|
|
|
+ "INSERT INTO m_formula_log (id,content) VALUES (" + wtc.getPKeyId() + ", '" + log + "')"
|
|
|
};
|
|
|
this.jdbcTemplate.batchUpdate(sql);
|
|
|
}
|
|
@@ -746,8 +746,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// Elements title = doc.select("el-input[placeholder~=^编号]");
|
|
|
|
|
|
/**
|
|
@@ -761,15 +759,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
ContractInfo contractInfo = contractInfoService.getById(wbsTreeContract.getContractId());
|
|
|
// 施工单位名称
|
|
|
if (dwtitle.size() >= 1) {
|
|
|
- int y =Integer.parseInt(dwtitle.attr("trindex"));
|
|
|
- if(y<=10){
|
|
|
+ int y = Integer.parseInt(dwtitle.attr("trindex"));
|
|
|
+ if (y <= 10) {
|
|
|
reData.put(dwtitle.attr("keyName"), contractInfo.getConstructionUnitName());
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (sgtitle.size() >= 1) {
|
|
|
- int y =Integer.parseInt(sgtitle.attr("trindex"));
|
|
|
- if(y<=10) {
|
|
|
+ int y = Integer.parseInt(sgtitle.attr("trindex"));
|
|
|
+ if (y <= 10) {
|
|
|
reData.put(sgtitle.attr("keyName"), contractInfo.getConstructionUnitName());
|
|
|
}
|
|
|
}
|
|
@@ -804,7 +802,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
|
|
|
// 项目名称
|
|
|
- if (xmtitle.size() >= 1 ) {
|
|
|
+ if (xmtitle.size() >= 1) {
|
|
|
for (Element element : xmtitle) {
|
|
|
int trindex = Integer.parseInt(element.attr("trindex"));
|
|
|
if (trindex <= 6) {
|
|
@@ -906,7 +904,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
@Override
|
|
|
public R getBussPdfInfo(Long pkeyId) throws Exception {
|
|
|
|
|
|
- String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
|
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
@@ -1072,7 +1070,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
|
|
|
// 组装电签设置
|
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.in("type", 2,6);
|
|
|
+ queryWrapper.in("type", 2, 6);
|
|
|
queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
|
|
|
|
|
|
List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
@@ -1338,8 +1336,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
throw new ServiceException("操作失败!");
|
|
|
}
|
|
|
|
|
|
- @SuppressWarnings("unchecked") //忽略警告
|
|
|
- Map<String, Object> DataInfo = (Map<String, Object>) getBussDataInfoTrial(pkeyId);
|
|
|
+ List<Map<String, Object>> bussDataInfoTrial = getBussDataInfoTrial(pkeyId);
|
|
|
+ Map<String, Object> DataInfo = bussDataInfoTrial.stream().findAny().orElse(null);
|
|
|
|
|
|
// 获取excel流 和 html流
|
|
|
Workbook wb = new Workbook();
|
|
@@ -1357,7 +1355,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //数据不为空 &&
|
|
|
+ //数据不为空
|
|
|
if (StringUtils.isNotEmpty(wbsTreePrivate.getHtmlUrl())) {
|
|
|
File htmlFile = ResourceUtil.getFile(wbsTreePrivate.getHtmlUrl());
|
|
|
if (htmlFile.exists()) {
|
|
@@ -1578,7 +1576,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
String querySql = "select * from u_information_query where classify='" + classify + "' and wbs_id='" + id + "' and contract_id ='" + contractId + "'";
|
|
|
List<Map<String, Object>> resultSQL = jdbcTemplate.queryForList(querySql);
|
|
|
if (resultSQL.size() > 0) {
|
|
|
- informationQueryClient.updateInformationQuery(bladeFile.getLink(), classify, id.toString(), contractId);
|
|
|
+ String updateSql = "update u_information_query set pdf_url = '" + bladeFile.getLink() + "' where classify='" + classify + "' and wbs_id='" + id + "' and contract_id ='" + contractId + "'";
|
|
|
+ jdbcTemplate.execute(updateSql);
|
|
|
+ //informationQueryClient.updateInformationQuery(bladeFile.getLink(), classify, id.toString(), contractId);
|
|
|
} else {
|
|
|
informationQueryClient.saveData(id.toString(), projectId, contractId, classify, bladeFile.getLink());
|
|
|
}
|