package com.engine.htsc.gsfw.web;

import com.alibaba.fastjson.JSONObject;
import com.weaver.general.Util;
import org.apache.tools.ant.taskdefs.Tstamp;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.interfaces.htsc.comInfo.PropBean;

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;

public class Gsfw_Ifuserjobtool {

    @GET
    @Path("/GetUserJobflag")
    @Produces({MediaType.TEXT_PLAIN})
    public String getNextJudget(@Context HttpServletRequest request, @Context HttpServletResponse response) {
     //   String requestid = Util.null2String(request.getParameter("requestid"));
        JSONObject jsonObject=new JSONObject();
        BaseBean bb = new BaseBean();
        PropBean pb = new PropBean();
        String userid = Util.null2String(request.getParameter("userid"));
        jsonObject.put("zbnkllr", "");
        jsonObject.put("zbhggl", "");
        String sql="";
        sql="select count(*) rysum from uf_zbnkllr where dbms_lob.instr(ry,"+userid+")>0"; //内控联络人
        RecordSet rs = new RecordSet();
        rs.execute(sql);
        if(rs.next()){
            jsonObject.put("zbnkllr", Util.null2String(rs.getString("rysum")));
        }
        sql="select count(*) hgglsum from uf_zbbmhggl where hgry="+userid;  //总部合规管理

        rs.execute(sql);
        if(rs.next()){
            jsonObject.put("zbhggl", Util.null2String(rs.getString("hgglsum")));
        }
    return jsonObject.toString();
    }

    }
