<%@ page import="weaver.general.*" %>
<%@page import="weaver.conn.RecordSet"%>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<jsp:useBean id="bb" class="weaver.general.BaseBean" scope="page" />
<%@ page language="java" contentType="text/html; charset=UTF-8" %>

<%

    String uf_tablename = "uf_zdyszb";
    RecordSet rs = new RecordSet();
    String dataid = Util.null2String(request.getParameter("dataid"));
    User user  = HrmUserVarify.getUser(request , response) ;
    int userid = user.getUID();
    String billid = "";
//    String pxfs = "";
    String sql = " select * from "+uf_tablename+" where ry = ?" ;
    rs.executeQuery(sql,new Object[]{userid});
    if(rs.next()){
        billid = Util.null2String(rs.getString("id"));
        //pxfs = Util.null2String(rs.getString("pxfs"));
    }
    boolean api_status = false;
    if(StringUtils.isNotEmpty(billid)){
        sql = " update "+uf_tablename+"_dt1 set djcs=(isnull(djcs,0)+1) where mainid = ? and uuid = ?" ;
        api_status = rs.executeUpdate(sql,new Object[]{billid,dataid});
    }

    JSONObject jsonObject = new JSONObject();
    jsonObject.put("api_status",api_status);
    jsonObject.put("dataid",dataid);
    jsonObject.put("userid",user.getUID());
    jsonObject.put("lastname",user.getLastname());
%>
<%=jsonObject.toString()  %>
