/** * 功能:判断项目id的存在性。 * * @return */ private boolean isProjectId(EtsFaAssetsDTO faDTO) throws QueryException { boolean hasResule = false; SQLModel sqlModel = modelProducer.hasProjId(faDTO.getProjectid()); SimpleQuery sq = new SimpleQuery(sqlModel, conn); sq.executeQuery(); if (sq.hasResult()) { hasResule = true; } return hasResule; }
/** * 功能:获得ProjectId * * @throws QueryException * @throws ContainerException */ private void appendProjIdData(EtsItemInfoDTO itemDTO, EtsFaAssetsDTO faDTO) throws QueryException { try { SQLModel sqlModel = modelProducer.getProId(faDTO.getProjectid()); SimpleQuery sq = new SimpleQuery(sqlModel, conn); sq.executeQuery(); if (sq.hasResult()) { Row row = sq.getFirstRow(); itemDTO.setProjectid((String) row.getValue("PROJECT_ID")); } } catch (ContainerException ex) { ex.printLog(); throw new QueryException(ex); } }