예제 #1
0
 protected void my_order_query(
     HttpServletRequest paramHttpServletRequest,
     HttpServletResponse paramHttpServletResponse,
     String paramString1,
     ResponseResult paramResponseResult,
     String paramString2) {
   if (this.log.isDebugEnabled()) {
     this.log.debug("Entering 'my_order_query' method ");
   }
   int i = 0;
   String str1 = "";
   String str2 = "";
   long l1 = 0L;
   try {
     String str3 = getLogonType(paramString2);
     str2 = getValueByTagName(paramString1, "USER_ID");
     if ("".equals(str2)) {
       str2 = getValueByTagName(paramString1, "TRADER_ID");
     }
     international((String) lanaguages.get(str2));
     String str4 = getValueByTagName(paramString1, "BUY_SELL");
     Short localShort = (str4.equals("")) || (str4.equals("0")) ? null : new Short(str4);
     String str5 = getValueByTagName(paramString1, "ORDER_NO");
     Long localLong = (str5.equals("")) || (str5.equals("0")) ? null : new Long(str5);
     String str6 = getValueByTagName(paramString1, "COMMODITY_ID");
     String str7 = getValueByTagName(paramString1, "STARTNUM");
     String str8 = getValueByTagName(paramString1, "RECCNT");
     String str9 = getValueByTagName(paramString1, "SORTFLD");
     String str10 = getValueByTagName(paramString1, "ISDESC") == "" ? "0" : "1";
     String str11 = getValueByTagName(paramString1, "UT");
     int j = (str11 == null) || ("0".equals(str11)) || ("".equals(str11.trim())) ? 1 : 0;
     String str12 = j != 0 ? "queryAll" : str11;
     SortCondition localSortCondition = new SortCondition();
     localSortCondition.setStartNu(str7);
     localSortCondition.setIsdesc(Integer.parseInt(str10));
     localSortCondition.setReccnt(str8);
     localSortCondition.setSortfLD((String) this.orderKeyMap.get(str9));
     long l2 = parseLong(getValueByTagName(paramString1, "SESSION_ID"));
     if (!isLogon(paramHttpServletRequest, str2, l2, str3)) {
       i = -201;
       str1 = this.properties.getProperty("-205");
     } else {
       OrdersManager localOrdersManager = (OrdersManager) getBean("ordersManager");
       Orders localOrders = new Orders();
       Privilege localPrivilege = getSessionBean(paramHttpServletRequest);
       if (PrivilegeController.checkSuperTrader(localPrivilege)) {
         localOrders.setSuperTrader("A");
       }
       localOrders.setBS_Flag(localShort);
       localOrders.setA_OrderNo(localLong);
       localOrders.setTraderID(str2);
       localOrders.setUpdateTime(str12);
       localOrders.setCommodityID(str6);
       List localList =
           localOrdersManager.my_order_query(localOrders, localPrivilege, localSortCondition);
       Timestamp localObject = null;
       for (int k = 0; k < localList.size(); k++) {
         Timestamp localTimestamp = null;
         Map localMap = (Map) localList.get(k);
         if (localMap.containsKey("UPDATETIME")) {
           localTimestamp = (Timestamp) localMap.get("UPDATETIME");
         }
         if (localObject == null) {
           localObject = localTimestamp;
         } else if (localObject.before(localTimestamp)) {
           localObject = localTimestamp;
         }
       }
       l1 =
           localObject == null ? parseLong("".equals(str11) ? "0" : str11) : localObject.getTime();
       if (localList == null) {
         i = -202;
         str1 = this.properties.getProperty("-208");
       } else if (localList.size() == 0) {
         i = 0;
         str1 = this.properties.getProperty("-200");
       } else {
         paramResponseResult.setResultList(localList);
       }
     }
   } catch (ConnectException localConnectException) {
     this.log.error("my_order_query rmi conection exception" + localConnectException);
     i = -202;
     str1 = this.properties.getProperty("-202");
     initRMI();
   } catch (RemoteException localRemoteException) {
     this.log.error("my_order_query remoteerror:" + localRemoteException);
     errorException(localRemoteException);
     i = -204;
     str1 = this.properties.getProperty("-204");
   } catch (Exception localException) {
     this.log.error("my_order_query error:" + localException);
     errorException(localException);
     i = -203;
     str1 = this.properties.getProperty("-203");
   }
   paramResponseResult.setRetCode(i);
   paramResponseResult.setMessage(str1);
   paramResponseResult.setUserID(str2);
   if ("mobile".equals(paramString2)) {
     this.mobileServlet.renderXML(
         paramHttpServletResponse, ResponseXml.my_order_query(paramResponseResult, l1));
   } else {
     renderXML(paramHttpServletResponse, ResponseXml.my_order_query(paramResponseResult, l1));
   }
 }