Exemplo n.º 1
0
 public List<AtrLoadDataItem> execute(
     ArmUserInfo user,
     List<AtrLoadDataItem> answer,
     String maType,
     Integer taPeriod,
     String period,
     String calendar) {
   String sql =
       "{call dbo.mo_WebSet_putATR_sp ?, ?, ?, "
           + taPeriod
           + ", '"
           + maType
           + "', 'PX_HIGH', 'PX_LOW', 'PX_LAST', '"
           + period
           + "', '"
           + calendar
           + "'}";
   for (AtrLoadDataItem item : answer) {
     ems.executeUpdate(
         AccessAction.OTHER,
         user,
         sql,
         item.getSecurity(),
         Utils.parseDate(item.getDate()),
         new BigDecimal(item.getValue()));
   }
   return answer;
 }
Exemplo n.º 2
0
 public int put(
     ArmUserInfo user,
     String batch,
     String tradeNum,
     String tradeTicker,
     Date tradeDate,
     Date settleDate,
     String tradeOper,
     Double tradePrice,
     Double quantity,
     String currency,
     String tradeSystem,
     String account,
     String investmentPortfolio,
     String securityCode,
     String futuresAlias,
     Integer kindTicker) {
   String sql =
       "{call dbo.mo_WebSet_putSingleDeal_sp"
           + " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,"
           + " ?, ?, ?, ?, ?}";
   return ems.executeUpdate(
       AccessAction.OTHER,
       user,
       sql,
       batch,
       tradeNum,
       tradeTicker,
       tradeDate,
       settleDate,
       tradeOper,
       tradePrice,
       quantity,
       currency,
       tradeSystem,
       account,
       investmentPortfolio,
       securityCode,
       futuresAlias,
       kindTicker);
 }
Exemplo n.º 3
0
 public List<SimpleItem> getCalendar(String query) {
   String sql = "select calendar_id as id, name from dbo.calendar_type";
   String where = " where lower(name) like ?";
   return ems.getComboList(sql, where, query);
 }
Exemplo n.º 4
0
 public List<SimpleItem> getPeriod(String query) {
   String sql = "select period_id as id, name from dbo.period_type";
   String where = " where lower(name) like ?";
   return ems.getComboList(sql, where, query);
 }
Exemplo n.º 5
0
 public List<SimpleItem> getTypeMA(String query) {
   String sql = "select id, algorithm_name as name from dbo.mo_WebGet_ajaxAlgorithm_v";
   String where = " where lower(algorithm_name) like ?";
   return ems.getComboList(sql, where, query);
 }