|
|
@@ -1129,16 +1129,18 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
|
|
|
@Override
|
|
|
public WbsFormElementDetailVO elementDetail(Long id) {
|
|
|
WbsFormElementDetailVO vo = baseMapper.elementDetail(id);
|
|
|
- vo.setIsExistData(false);
|
|
|
- try {
|
|
|
- //获取实体表是否存储数据
|
|
|
- vo.setIsExistData(jdbcTemplate.queryForObject("select count(0) > 0 from " + vo.getTabEnName(), Boolean.class));
|
|
|
- } catch (Exception ignored) {
|
|
|
- ignored.printStackTrace();
|
|
|
+ if(vo!=null){
|
|
|
+ vo.setIsExistData(false);
|
|
|
+ try {
|
|
|
+ //获取实体表是否存储数据
|
|
|
+ vo.setIsExistData(jdbcTemplate.queryForObject("select count(0) > 0 from " + vo.getTabEnName(), Boolean.class));
|
|
|
+ } catch (Exception ignored) {
|
|
|
+ ignored.printStackTrace();
|
|
|
+ }
|
|
|
+ //获取项目列表
|
|
|
+ List<String> list = baseMapper.selectProjectList(id);
|
|
|
+ vo.setProjectList(list);
|
|
|
}
|
|
|
- //获取项目列表
|
|
|
- List<String> list = baseMapper.selectProjectList(id);
|
|
|
- vo.setProjectList(list);
|
|
|
return vo;
|
|
|
}
|
|
|
|