示例#1
0
  /**
   * 功能:插入地点信息
   *
   * @throws DataHandleException
   */
  private void addAddressData(EtsFaAssetsDTO faDTO) throws DataHandleException, QueryException {
    try {
      EtsObjectDTO obDTO = new EtsObjectDTO();
      obDTO.setWorkorderObjectCode(faDTO.getAssetsLocationCode());
      obDTO.setWorkorderObjectName(faDTO.getAssetsLocation());
      obDTO.setWorkorderObjectLocation(faDTO.getAssetsLocation());
      obDTO.setOrganizationId(faDTO.getOrganizationId());
      obDTO.setObjectCategory("81");
      SQLModel sqlModel = modelProducer.getCount(faDTO.getDepreciationAccount().substring(5, 11));
      SimpleQuery sq = new SimpleQuery(sqlModel, conn);
      sq.executeQuery();
      if (sq.hasResult()) {
        Row row = sq.getFirstRow();
        obDTO.setCountyCode(row.getStrValue("COUNTY_CODE"));
      }
      if (obDTO.getWorkorderObjectName().equals("")) {
        return;
      }

      EtsObjectDAO etsObjectDAO = new EtsObjectDAO(userAccount, obDTO, conn);
      etsObjectDAO.createData2();
    } catch (ContainerException ex) {
      ex.printLog();
      throw new QueryException(ex);
    }
  }