package com.seeyon.ctp.rest.resources;


import com.alibaba.fastjson.JSONObject;
import com.seeyon.apps.src_gettaxrate.dao.IGetTaxRateDao;
import com.seeyon.apps.src_hxinvoice.service.IInvoiceService;
import com.seeyon.ctp.common.AppContext;
import com.seeyon.ctp.common.log.CtpLogFactory;
import org.apache.commons.logging.Log;

import javax.ws.rs.*;
import javax.ws.rs.core.Response;

@Path("/nc/oa")
@Produces({"application/json", "application/xml"})
public class PushOrderInfoAndInvoiceInfoResource extends BaseResource{

    private static final Log log = CtpLogFactory.getLog(PushOrderInfoAndInvoiceInfoResource.class);

    private IInvoiceService invoiceServiceImpl;


    public IInvoiceService getInvoiceService() {
        if (this.invoiceServiceImpl == null) {
            this.invoiceServiceImpl = ((IInvoiceService) AppContext.getBean("invoiceServiceImpl"));
        }
        return invoiceServiceImpl;
    }
    public void setInvoiceService(IInvoiceService invoiceServiceImpl) {
        this.invoiceServiceImpl = invoiceServiceImpl;
    }

    @POST
    @Path("/PushOrderInfoAndInvoiceInfo")
    @Produces({"application/json"})
    @Consumes({"application/json"})
    public Response getData(JSONObject param){

        JSONObject res = null;
        try {
//            res = getInvoiceService().PushOrderInfoAndInvoiceInfoService(param);
            res = new JSONObject();
        } catch (Exception e) {
            e.printStackTrace();
        }

//        JSONObject res = new JSONObject();
//        res.put("returnCode", "000000");
//        res.put("returnMessage", "接口请求成功");
//        res.put("dataExchangeId", "20241205");
//        res.put("encryptCode", "1");
//        res.put("zipCode", "1");
//        res.put("content", "H4sIAAAAAAAAAAFIALf/B5xnO3ULeQNgSjuFauMdBOYwfy6UkGLG3sLMKr2KhOokVQG1Br3ytpbHu3/Wj+K85zdBVSo9cPf86lGBR5UAQ2O/HluFvmlKuGFbp0gAAAA=");
        return ok(res);
    }

}
