/**
  * 功能说明:将EAM系统发生的公司内资产调拨同步到MIS系统
  *
  * @throws com.sino.base.exception.DataHandleException 将EAM系统发生的公司内资产调拨同步到MIS系统出错时抛数据处理异常
  */
 public void writeAssetsAllocations() throws DataHandleException {
   Connection conn = null;
   try {
     conn = getDBConnection();
     RowSet rows = getCompanyList(conn);
     if (rows != null && !rows.isEmpty()) {
       int dataCount = rows.getSize();
       SrvDAO srvDAO = new SrvDAO();
       for (int i = 0; i < dataCount; i++) {
         Row row = rows.getRow(i);
         String orgId = row.getStrValue("ORGANIZATION_ID");
         int organizationId = Integer.parseInt(orgId);
         taskExecutor = getOUTaskExecutor(conn, organizationId);
         if (taskExecutor == null) {
           continue;
         }
         srvDAO.synTransInCompany(conn, taskExecutor);
       }
     }
   } catch (Throwable ex) {
     Logger.logError(ex);
     throw new DataHandleException(ex.getMessage());
   } finally {
     closeDBConnection(conn);
   }
 }
Esempio n. 2
0
 public static void main(String args[]) {
   SfUserDTO userAccount = new SfUserDTO();
   ServletConfigDTO configDTO = new ServletConfigDTO();
   SSOUserLoginDAO ssoUserLoginDAO = new SSOUserLoginDAO(configDTO);
   userAccount = ssoUserLoginDAO.validateUser("SINOADMIN");
   SrvDAO sr = new SrvDAO();
   try {
     Connection conn = DBManager.getDBConnection();
     sr.synFaLocation(conn, userAccount);
   } catch (PoolException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   //        String na = "AA";
   //        sr.truncateData(na, null);
 }