package com.engine.htsc.payment.web;

import com.engine.common.util.ParamUtil;
import com.engine.htsc.payment.service.PaymentQueryDetailService;
import com.engine.htsc.payment.service.impl.PaymentQueryDetailServiceImpl;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import com.engine.common.util.ServiceUtil;
public class PaymentQueryDetailAction {
  private Log log = LogFactory.getLog(this.getClass());
  private PaymentQueryDetailService getService(User user){
    return ServiceUtil.getService(PaymentQueryDetailServiceImpl.class,user);
  }
  
  
  @GET
  @Path("/queryDetailInfo")
  @Produces({MediaType.APPLICATION_JSON})
  public List<Map<String,Object>> createBusinessTravelWorkflow(@Context HttpServletRequest request,
      @Context HttpServletResponse response){
    try {
      User user = HrmUserVarify.getUser(request, response);
      List<Map<String,Object>> result = this.getService(user).getDetailInfo(ParamUtil.request2Map(request));
      return  result;
    }catch (Exception e){
      log.info(String.format("query detail failed!"),e);
    }
    return null;
  }
}
