|
@@ -385,22 +385,12 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
currentNode.setPkId(wtc.getPKeyId());
|
|
|
currentNode.setParentId(wtc.getParentId());
|
|
|
currentNode.setWbsId(Long.parseLong(wtc.getWbsId()));
|
|
|
- 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);
|
|
|
- currentNode.setId(id);
|
|
|
- if (id.equals(wtc.getId())) {
|
|
|
- if (Func.isNotEmpty(wtc.getOldId())) {
|
|
|
- currentNode.setRelateId(Long.parseLong(wtc.getOldId()));
|
|
|
- }
|
|
|
- } else {
|
|
|
- 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() + " and wbs_id=" + wtc.getWbsId(), Long.class);
|
|
|
- if (Func.isNotEmpty(privateIds)) {
|
|
|
- currentNode.setPrivateId(privateIds.get(0));
|
|
|
- return currentNode;
|
|
|
- }
|
|
|
+ currentNode.setId(StringUtils.isNotEmpty(wtc.getOldId())? Long.valueOf(wtc.getOldId()) :wtc.getId());
|
|
|
+ currentNode.setRelateId(wtc.getId());
|
|
|
+ List<Long> privateIds = this.jdbcTemplate.queryForList("select p_key_id from m_wbs_tree_private where id=" + currentNode.getRelateId() + " and project_id=" + wtc.getProjectId() + " and wbs_id=" + wtc.getWbsId(), Long.class);
|
|
|
+ if (Func.isNotEmpty(privateIds)) {
|
|
|
+ currentNode.setPrivateId(privateIds.get(0));
|
|
|
+ return currentNode;
|
|
|
}
|
|
|
}
|
|
|
return null;
|