package com.engine.htsc.seal.lhht;

import com.engine.common.util.ServiceUtil;
import com.engine.htsc.seal.lhht.Service.Impl.SeallhhtServiceimpl;
import com.engine.htsc.seal.lhht.Service.SeallhhtService;
import com.engine.htsc.seal.service.SendManualSignService;
import com.sap.db.jdbc.Hash;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.HashMap;
import java.util.Map;

/**
 * @author xf
 * @version 1.0.0
 * @ClassName SendLhhtSealAction.java
 * @createTime 2021年12月13日 10:19:00
 */
public class SendLhhtSealAction {


    @POST
    @Path("/sendlhhtSeal")
    @Produces({MediaType.TEXT_PLAIN})
    public String sendlhhtSeal(@Context HttpServletRequest request, @Context HttpServletResponse response){
        BaseBean bs = new BaseBean();
        bs.writeLog("-------------sendlhhtSeal-------------");
        String requestid = Util.null2String(request.getParameter("requestid"));
        String docids = Util.null2String(request.getParameter("docid"));
        String sealtype= Util.null2String(request.getParameter("sealtype"));
        User user = HrmUserVarify.getUser(request, response);
        SeallhhtService sendseallhtservice = ServiceUtil.getService(SeallhhtServiceimpl.class);
        Map<String,Object> map=new HashMap<>();
        map.put("requestid",requestid);
        map.put("docids",docids);
        map.put("sealtype",sealtype);
        return sendseallhtservice.sendLhhtSeal(user,map);


    }

}
