예제 #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);
    }
  }
예제 #2
0
 /**
  * 功能:获得MIS的员工信息
  *
  * @throws QueryException
  * @throws ContainerException
  */
 private void appendAddressData(EtsItemInfoDTO itemDTO, EtsFaAssetsDTO faDTO)
     throws QueryException {
   try {
     SQLModel sqlModel =
         modelProducer.getLocId(faDTO.getAssetsLocationCode(), faDTO.getOrganizationId());
     SimpleQuery sq = new SimpleQuery(sqlModel, conn);
     sq.executeQuery();
     if (sq.hasResult()) {
       Row row = sq.getFirstRow();
       itemDTO.setAddressId((String) row.getValue("ADDRESS_ID"));
     }
   } catch (ContainerException ex) {
     ex.printLog();
     throw new QueryException(ex);
   }
 }