コード例 #1
0
ファイル: USCSpotPrice.java プロジェクト: sejii/sysmode
 /** @see cmdCore.ICommand#doIt() */
 public UCommandStatus doIt() {
   try {
     fSpotArray.clear();
     fStatus = fUMart.doSpotPrice(fSpotArray, fBrandName, fNoOfSteps);
     if (fStatus.getStatus()) {
       fAgent.sendMessage("+ACCEPT");
       Iterator itr = fSpotArray.iterator();
       while (itr.hasNext()) {
         HashMap hm = (HashMap) itr.next();
         String result = "";
         result += hm.get(STRING_BRAND_NAME).toString();
         result += " " + hm.get(INT_DAY).toString();
         result += ":" + hm.get(INT_BOARD_NO).toString();
         result += ":" + hm.get(INT_STEP).toString();
         result += " " + hm.get(LONG_PRICE).toString();
         fAgent.sendMessage(result);
       }
     } else {
       fAgent.sendMessage("+ERROR " + fStatus.getErrorCode());
       fAgent.sendMessage(fStatus.getErrorMessage());
     }
   } catch (Exception e) {
     fAgent.sendMessage("+ERROR " + ICommand.INVALID_ARGUMENTS);
     fAgent.sendMessage("USAGE: ORDERCANCEL <ORDERID>");
   }
   fAgent.flushMessage();
   return fStatus;
 }