|
@@ -345,7 +345,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
|
|
List<Formula> formulas = this.formulaService.getFormulaList(keyMappers);
|
|
WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
|
|
WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
|
|
CurrentNode currentNode = createCurrentNode(wtc);
|
|
CurrentNode currentNode = createCurrentNode(wtc);
|
|
- TableElementConverter tec = new TableElementConverter(tableInfoList, keyMappers, formulas, coordinateMap,currentNode,tableAll);
|
|
|
|
|
|
+ TableElementConverter tec = new TableElementConverter(tableInfoList, keyMappers, formulas, coordinateMap, currentNode, tableAll);
|
|
if (tec.isPresent()) {
|
|
if (tec.isPresent()) {
|
|
tec.before();
|
|
tec.before();
|
|
this.formulaService.execute(tec);
|
|
this.formulaService.execute(tec);
|
|
@@ -357,27 +357,27 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public CurrentNode createCurrentNode(WbsTreeContract wtc){
|
|
|
|
- if(wtc!=null){
|
|
|
|
|
|
+ public CurrentNode createCurrentNode(WbsTreeContract wtc) {
|
|
|
|
+ if (wtc != null) {
|
|
CurrentNode currentNode = new CurrentNode();
|
|
CurrentNode currentNode = new CurrentNode();
|
|
currentNode.setPkId(wtc.getPKeyId());
|
|
currentNode.setPkId(wtc.getPKeyId());
|
|
currentNode.setParentId(wtc.getParentId());
|
|
currentNode.setParentId(wtc.getParentId());
|
|
- List<Long> ids=this.jdbcTemplate.queryForList("select id from m_wbs_tree where id in("+wtc.getId()+","+wtc.getOldId()+")",Long.class);
|
|
|
|
- if(Func.isNotEmpty(ids)){
|
|
|
|
|
|
+ List<Long> ids = this.jdbcTemplate.queryForList("select id from m_wbs_tree where id in(" + wtc.getId() + "," + wtc.getOldId() + ")", Long.class);
|
|
|
|
+ if (Func.isNotEmpty(ids)) {
|
|
Long id = ids.get(0);
|
|
Long id = ids.get(0);
|
|
currentNode.setId(id);
|
|
currentNode.setId(id);
|
|
- if(id.equals(wtc.getId())){
|
|
|
|
- if(Func.isNotEmpty(wtc.getOldId())) {
|
|
|
|
|
|
+ if (id.equals(wtc.getId())) {
|
|
|
|
+ if (Func.isNotEmpty(wtc.getOldId())) {
|
|
currentNode.setRelateId(Long.parseLong(wtc.getOldId()));
|
|
currentNode.setRelateId(Long.parseLong(wtc.getOldId()));
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
currentNode.setRelateId(wtc.getId());
|
|
currentNode.setRelateId(wtc.getId());
|
|
}
|
|
}
|
|
- List<Long> privateIds= this.jdbcTemplate.queryForList("select p_key_id from m_wbs_tree_private where id="+id+" and project_id="+wtc.getProjectId(),Long.class);
|
|
|
|
- if(Func.isNotEmpty(privateIds)){
|
|
|
|
- currentNode.setPrivateId(privateIds.get(0));
|
|
|
|
- return currentNode;
|
|
|
|
- }
|
|
|
|
|
|
+ List<Long> privateIds = this.jdbcTemplate.queryForList("select p_key_id from m_wbs_tree_private where id=" + id + " and project_id=" + wtc.getProjectId(), Long.class);
|
|
|
|
+ if (Func.isNotEmpty(privateIds)) {
|
|
|
|
+ currentNode.setPrivateId(privateIds.get(0));
|
|
|
|
+ return currentNode;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
@@ -736,8 +736,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
|
|
Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// Elements title = doc.select("el-input[placeholder~=^编号]");
|
|
// Elements title = doc.select("el-input[placeholder~=^编号]");
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -751,15 +749,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
ContractInfo contractInfo = contractInfoService.getById(wbsTreeContract.getContractId());
|
|
ContractInfo contractInfo = contractInfoService.getById(wbsTreeContract.getContractId());
|
|
// 施工单位名称
|
|
// 施工单位名称
|
|
if (dwtitle.size() >= 1) {
|
|
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());
|
|
reData.put(dwtitle.attr("keyName"), contractInfo.getConstructionUnitName());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
if (sgtitle.size() >= 1) {
|
|
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());
|
|
reData.put(sgtitle.attr("keyName"), contractInfo.getConstructionUnitName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -794,7 +792,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
}
|
|
}
|
|
|
|
|
|
// 项目名称
|
|
// 项目名称
|
|
- if (xmtitle.size() >= 1 ) {
|
|
|
|
|
|
+ if (xmtitle.size() >= 1) {
|
|
for (Element element : xmtitle) {
|
|
for (Element element : xmtitle) {
|
|
int trindex = Integer.parseInt(element.attr("trindex"));
|
|
int trindex = Integer.parseInt(element.attr("trindex"));
|
|
if (trindex <= 6) {
|
|
if (trindex <= 6) {
|
|
@@ -896,7 +894,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
@Override
|
|
@Override
|
|
public R getBussPdfInfo(Long pkeyId) throws Exception {
|
|
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()
|
|
WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
.eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
@@ -1062,7 +1060,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
|
|
|
// 组装电签设置
|
|
// 组装电签设置
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.in("type", 2,6);
|
|
|
|
|
|
+ queryWrapper.in("type", 2, 6);
|
|
queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
|
|
queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
|
|
|
|
|
|
List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
@@ -1174,15 +1172,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
* 试验 获取填报信息
|
|
* 试验 获取填报信息
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public R getBussDataInfoTrial(Long pkeyId) {
|
|
|
|
|
|
+ public List<Map<String, Object>> getBussDataInfoTrial(Long pkeyId) {
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
Map<String, Object> reData = new HashMap<>();
|
|
Map<String, Object> reData = new HashMap<>();
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
|
|
.eq(WbsTreePrivate::getPKeyId, pkeyId));
|
|
.eq(WbsTreePrivate::getPKeyId, pkeyId));
|
|
if (wbsTreePrivate == null) {
|
|
if (wbsTreePrivate == null) {
|
|
- return R.data(reData);
|
|
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
if (wbsTreePrivate.getHtmlUrl() == null) {
|
|
if (wbsTreePrivate.getHtmlUrl() == null) {
|
|
- return R.data(reData);
|
|
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
|
|
|
|
//表单是否存储在
|
|
//表单是否存储在
|
|
@@ -1190,7 +1189,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
String isExitSql = " select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
List<Map<String, Object>> tabList = jdbcTemplate.queryForList(isExitSql);
|
|
List<Map<String, Object>> tabList = jdbcTemplate.queryForList(isExitSql);
|
|
if (tabList == null || tabList.size() <= 0) {
|
|
if (tabList == null || tabList.size() <= 0) {
|
|
- return R.fail("无实体表对应");
|
|
|
|
|
|
+ throw new ServiceException("无实体表对应");
|
|
}
|
|
}
|
|
|
|
|
|
String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId;
|
|
String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId;
|
|
@@ -1294,7 +1293,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
reData.remove("contractId");
|
|
reData.remove("contractId");
|
|
reData.remove("pkeyId");
|
|
reData.remove("pkeyId");
|
|
reData.remove("projectId");
|
|
reData.remove("projectId");
|
|
- return R.data(reData);
|
|
|
|
|
|
+ list.add(reData);
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1326,7 +1326,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
throw new ServiceException("操作失败!");
|
|
throw new ServiceException("操作失败!");
|
|
}
|
|
}
|
|
|
|
|
|
- Map<String, Object> DataInfo = (Map<String, Object>) getBussDataInfoTrial(pkeyId).getData();
|
|
|
|
|
|
+ Map<String, Object> DataInfo = (Map<String, Object>) getBussDataInfoTrial(pkeyId);
|
|
|
|
|
|
// 获取excel流 和 html流
|
|
// 获取excel流 和 html流
|
|
Workbook wb = new Workbook();
|
|
Workbook wb = new Workbook();
|