<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.hrm.resource.ResourceComInfo" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%
    RecordSet rs = new RecordSet();
    out.print(":预计落地时间前3天，若尚未进行落地结果录入，\n" +
            " 提醒：录入人员进行落地情况录入或者预计落地时间修改；</br>");
    ResourceComInfo resourceComInfo = null;
    try{
        resourceComInfo = new ResourceComInfo();
        List<Map<String,String>> list = new ArrayList<Map<String,String>>();
        String sql =" select id,modedatacreater,proname,profall,sfcj\n" +
                    " from uf_threebatches\n" +
                    "       where (trunc(sysdate - to_date(profall,'YYYY-MM-DD' ))+1) <= 3 " +
                    "       and (trunc(sysdate - to_date(profall,'YYYY-MM-DD' ))+1) >= 0 \n" +
                    " and sfcj is null " ;
        rs.executeQuery(sql);
        out.print("当前时间在预计落地时间(profall)的前3天，是否承接 为空值:"+sql+"</br>");
        while (rs.next()){
            String id = Util.null2String(rs.getString("id"));
            String lrry = Util.null2String(rs.getString("modedatacreater"));
            String xmmc = Util.null2String(rs.getString("proname"));
            String profall = Util.null2String(rs.getString("profall"));
            String sfcj = Util.null2String(rs.getString("sfcj"));
            Map<String,String> map = new HashMap<String,String>();
            map.put("id",id);
            map.put("lrry",lrry);
            map.put("xmmc",xmmc);
            map.put("profall",profall);

            list.add(map);
        }

        out.print("总计:"+list.size()+"</br>");

        for(int i=0;i<list.size();i++){
            Map<String,String> map = list.get(i);
            String xmmc = map.get("xmmc");
            String lrry = map.get("lrry");
            String billid = map.get("id");

            String profall = map.get("profall");

            Set<String> userSet = new HashSet<String>();
            userSet.add(lrry);

            String context = "请及时维护"+xmmc+"的落地情况";
            String title = "三个一批项目提醒";

            out.print("序号:"+(i+1)+" ,建模ID:"+billid+" ,预计落地时间:"+profall+" ,提醒标题:"+title+" ,提醒内容:"+context+" ,提醒人:"+resourceComInfo.getLastname(lrry)+"("+lrry+")</br>");
        }
    }catch (Exception e){
        out.print("e:"+e);
    }
%>
