package com.engine.htsc.changeCloudTicket.web;

import com.api.htsc.browser.ESBBrowser;
import weaver.hrm.resource.ResourceComInfo;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

public class NewCTAction {

    @GET
    @Path("/getAllTicket")
    @Produces({MediaType.APPLICATION_JSON})
    public String getAllTicket(@QueryParam("UserCode") String UserCode,
                               @QueryParam("InvoiceType") String InvoiceType, @QueryParam("pageNo") String pageNo,
                               @QueryParam("pagesize") String pagesize){
        String workcode = "";
        try {
            ResourceComInfo resourceComInfo = new ResourceComInfo();
            workcode = resourceComInfo.getWorkcode(UserCode);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new ESBBrowser().getInvoiceInfo(workcode,InvoiceType,pageNo,pagesize,"","","","");
    }
}
