精华内容
下载资源
问答
  • 员工打卡系统简易版java语言
  • java编写的员工打卡系统,模拟一下,适合初学者
  • Java-员工-时间-时钟 这是我的员工打卡版本,允许您设置用户并跟踪打卡和打卡时间。
  • 普通员工的功能包括:系统自动完成普通员工每天上下班的考勤记录,员工可以查看工资及3天内的考勤打卡情况 如果发现考勤与实际不符,可以提交申请给经理处理。 经理继承员工的功能,不同之处在于:能增加员工,审核...
  • java基础打卡28

    2020-10-31 14:15:42
    员工:work();//抽象 extends或implements 讲师类:work() {讲课} 助教类:work() {辅导} 如果不用多态,只用子类,那么写法是: 【Teacher】 one = new Teacher(); one.work();//讲课 【Assistant】 two = new ...

    使用多态的好处

    员工:work();//抽象
    extends或implements
    讲师类:work() {讲课}		助教类:work() {辅导}
    
    如果不用多态,只用子类,那么写法是:
    【Teacher】 one = new Teacher();
    one.work();//讲课
    【Assistant】 two = new Assistant();
    two.work();//辅导
    
    我现在唯一要做的事情,就是调用work方法,其他的功能不关心。
    
    如果使用多态的写法,对比一下:
    【Employee】 one = new Teacher();
    one.work();//讲课
    【Employee】 two = new Assistant();
    two.work();//辅导
    
    好处:无论右边new的时候换成哪个子类对象,等号左边调用方法都不会变化。
    

    对象的上下转型

    动物:eat();//抽象
    猫:eat() {}
    狗:eat() {SHIT}
    
    1. 对象的向上转型,其实就是多态写法:
    【格式:父类名称 对象名 = new 子类名称();】		Animal animal = new Cat();
    含义:右侧创建了一个子类对象,把它当作父类来看待使用。	创建了一直猫,当作动物看待,没问题。
    注意事项:【向上转型一定是安全的】。从小范围转向了大范围,从小范围的猫,向上转换成为了更大范围的动物。
    
    类似于:
    double num = 100;//正确,int --> double,自动类型转换。
    
    2. 对象的向下转型,其实就是一个【还原】的动作。
    【格式:子类名称 对象名 = (子类名称) 父类对象;】
    含义:将父类对象,【还原】成为本来的子类对象。
    
    Animal animal = new Cat();//本来是猫,向上转型成为动物
    Cat cat = (Cat) animal;//本来是猫,已经被当作动物了,还原回来成为本来的猫
    【注意事项】:
    a. 必须保证对象本来创建的时候,就是猫,才能向下转型成为猫。				本来是猫,还原为猫
    b. 如果对象创建的时候本来不是猫,现在非要向下转型成为猫,编译不会报错,但是运行会出现异常。【java.lang.ClassCastException 类转换异常】	本来是猫,当作狗,错误!
    
    类似于:int num = (int) 10.0;//可以	int num = (int) 10.5;//不可以,精度损失
    

    instanceof关键字

    向上转型一定是安全的,没有问题的,正确的。但是也有一个弊端:
    对象一旦向上转型为父类,那么就无法调用子类原本特有的内容。
    
    解决方案:用对象的向下转型【还原】。
    
    如何才能知道一个父类引用的对象,本来是什么子类?
    格式:
    对象 instanceof 类名称
    这将会得到一个boolean值结果,也就是判断前面的对象能不能当作后面类型的实例。
    例如:	Animal animal = new Dog();//本来是一只狗
            if (animal instanceof Dog) {
                Dog dog = (Dog) animal;
                dog.watchHouse();
            }
            // 如果希望调用子类特有方法,需要向下转型
            // 判断一下父类引用animal本来是不是Dog
    

    笔记本USB接口案例练习

    • 案例分析
    笔记本电脑类:开机powerOn()	关机powerOff()	使用设备useDevice(USB usb)	使用接口
    USB接口:打开设备	关闭设备
    鼠标类:打开鼠标	关闭鼠标		实现接口
    键盘类:打开键盘	关闭键盘		实现接口
    
    • USB接口
    public interface USB {
        public abstract void open();//打开设备
        public abstract void close();//关闭设备
    }
    
    • 鼠标类
      鼠标就是一个USB设备
    public class Mouse implements USB{
    	// 覆盖重写USB接口中的全部抽象方法
        @Override
        public void open() {
            System.out.println("打开鼠标");
        }
        @Override
        public void close() {
            System.out.println("关闭鼠标");
        }
        public void click() {
            System.out.println("鼠标点击");
        }
    }
    
    • 键盘类
      键盘也是一个USB设备,代码与鼠标相同,把需要打印输出的语句改变即可:打开键盘、关闭键盘、键盘输入
    展开全文
  • java基础打卡21

    2020-10-29 10:16:56
    静态代码块 静态代码块的格式是: public class 类名称 { static { //静态代码块的内容 } } 特点:当第一次用到本类时,静态代码块执行唯一的一次。 静态内容总是优先于非静态,所以静态代码块比构造方法先...

    字符串方法练习

    • 练习一
      定义一个方法,把数组{1,2,3}按照指定格式拼接成一个字符串。格式参照如下:[word1#word2#word3]。
    分析:
    1. 首先准备一个int[]数组,内容是:1、2、3
    2. 定义一个方法,用来将数组变成字符串
    三要素
    返回值类型:String
    方法名称:fromArrayToString
    参数列表:int[]
    3. 格式:[word1#word2#word3]
    用到:for循环、字符串拼接、每个数组元素之前都有一个word字样、分隔使用的是#、区分一下是不是最后一个
    4. 调用方法,得到返回值,并打印结果字符串
    
    public static void main(String[] args) {
            int[] array = {1, 2, 3};
    
            String result = fromArrayToString(array);
            System.out.println(result);
        }
    
        public static String fromArrayToString(int[] array) {
            String str = "[";
            for (int i = 0; i < array.length; i++) {
                if (i == array.length - 1) {
                    str += "word" + array[i] + "]";
                } else {
                    str += "word" + array[i] + "#";
                }
            }
            return str;
        }
    
    • 练习二
      键盘输入一个字符串,并且统计其中大写字母字符出现的次数。
    思路:
    1. 既然用到键盘输入,肯定是Scanner
    2. 键盘输入的是字符串,那么:String str = sc.next();
    3. 定义一个变量,代表大写字母字符的出现次数。
    4. 需要对字符串一个字、一个字检查,String-->char[],方法就是toCharArray()
    5. 遍历char[]字符数组,对当前字符的种类进行判断,并且用一个变量进行++动作。
    6. 打印输出一个变量,代表大写字母字符出现次数。
    
    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入一个字符串:");
            String input = sc.next();//获取键盘输入的一个字符串
    
            int countUpper = 0;//大写字母
           
            char[] charArray = input.toCharArray();
            for (int i = 0; i < charArray.length; i++) {
                char ch = charArray[i];//当前单个字符
                if ('A' <= ch && ch <= 'Z') {
                    countUpper++;
                } 
            }
    
            System.out.println("大写字母有:" + countUpper);
        }
    

    静态static关键字

    • 修饰成员变量
      如果一个成员变量使用了static关键字,那么这个变量不再属于对象自己,而是属于所在的类。多个对象共享同一份数据。
    • 修饰成员方法
      一旦使用static修饰成员方法,那么这就成为了静态方法。静态方法不属于对象,而是属于类的。
    如果没有static关键字,那么必须首先创建对象,然后通过对象才能使用它。
    例如:	MyClass obj = new MyClass();
    		obj.method();
    如果有了static关键字,那么不需要创建对象,直接就能通过类名称来使用它。
    
    无论是成员变量,还是成员方法。如果有了static,都推荐使用类名称进行调用。
    静态变量:类名称.静态变量		Student.room
    静态方法:类名称.静态方法()	MyClass.methodStatic();
    
    注意事项:
    1. 静态不能直接访问非静态。
    原因:因为在内存当中是【先】有的静态内容,【后】有的非静态内容。
    “先人不知道后人,但是后人知道先人。”
    2. 静态方法当中不能用this。
    原因:this代表当前对象,通过谁调用的方法,谁就是当前对象。
    3. 对于本类当中的静态方法,可以省略类名称
    例如:	myMethod();
            Demo01StaticMethod.myMethod(); // 完全等效
    
    按住alt再进行选中	可以实现跨区选中
    
    • 内存分布
      静态成员变量存储在方法区中的静态区。
    根据类名称访问静态成员变量的时候,全程【和对象没关系,只和类有关系】。
    

    静态代码块

    静态代码块的格式是:
    	public class 类名称 {
    	    static {
    	        //静态代码块的内容
    	    }
    	}
    
    特点:当第一次用到本类时,静态代码块执行唯一的一次。
    静态内容总是优先于非静态,所以静态代码块比构造方法先执行。
    
    静态代码块的典型用途:
    用来一次性地对静态成员变量进行赋值。
    
    展开全文
  • 公司员工考勤系统Java代码

    万次阅读 多人点赞 2017-07-01 08:10:11
    package com.company; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Company company = new Company(); //添加员工
    package com.company;
    
    import java.util.List;
    import java.util.Scanner;
    
    public class Main {
    
        public static void main(String[] args) {
           Company company = new Company();
            //添加员工
            company.addEmp(11,"zhangsan",20,'男');
            company.addEmp(22,"lisi",22,'男');
            company.addEmp(33,"lili",24,'女');
            company.addEmp(44,"fsw",28,'男');
            //显示员工信息
            company.showEmp();
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入删除员工信息!工号");
            int empNum = sc.nextInt();
            String s = sc.nextLine();
            //删除员工的方法
            company.deleteEmp(empNum);
            //显示删除后的员工信息
            company.showEmp();
            System.out.println("请输入查询员工信息的工号:");
            int id = sc.nextInt();
            String a = sc.nextLine();
            company.selectEmp(id);
            int input = 0;
            do{
                System.out.println("员工考勤系统");
                System.out.println("0-------------exit");
                System.out.println("1-------------签到");
                System.out.println("2-------------签退");
                System.out.println("3-------------显示考勤信息");
                input = sc.nextInt();
                String c = sc.nextLine();
                switch (input){
                    case 1:
                        company.qiandao();
                        break;
                    case 2:
                        company.qiantui();
                        break;
                    case 3:
                        company.showAttendence();
                        break;
                    default:
                        break;
                }
            }while(input!=0);
        }
    

    }

    package com.company;
    
    import java.text.SimpleDateFormat;
    import java.util.*;
    
    /**
     * 定义一个公司类,包括员工的集合,还有每天考勤的集合
     * Created by ttc on 2017/6/30.
     */
    public class Company {
        private  Map<Integer,Emp> mapEmp = new HashMap<>();
        //Map中的KEY为签到的日期
        private Map<String,List<KaoqinRecord>> map = new HashMap<>();
        //定义一个添加员工的方法
        public Map<Integer,Emp> addEmp(int id,String name,int age,char sex){
            mapEmp.put(id,new Emp(id,name,age,sex));
            return mapEmp;
        }
        //显示现在公司员工的信息
        public void showEmp(){
            for(Map.Entry<Integer,Emp> m :mapEmp.entrySet()){
                System.out.println("工号:"+m.getValue().getId()+" 姓名:"+m.getValue().getName()+" 年龄"+m.getValue().getAge()+" 性别"+m.getValue().getSex());
            }
        }
        //定义删除员工的方法
        public void deleteEmp(int id){
            mapEmp.remove(id);
        }
        //定义查询员工的方法
        public void selectEmp(int id){
            System.out.println("工号:"+mapEmp.get(id).getId()+" 姓名:"+mapEmp.get(id).getName()+" 年龄"+mapEmp.get(id).getAge()+" 性别"+mapEmp.get(id).getSex());
        }
        //定义公司的签到方法
        public void qiandao(){
            Date date = new Date();
            SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");
            String qiandaoDate = sdfDate.format(date);
            String kaoqinTime = sdfTime.format(date);
            System.out.println("请输入要签到的员工号码");
            Scanner sc = new Scanner(System.in);
            int inputId = sc.nextInt();
            if(!mapEmp.containsKey(inputId)){
                System.out.println("不存在该员工");
                return;
            }
            List<KaoqinRecord> listKaoQin = null;
            if(!map.containsKey(qiandaoDate)){
                //第一个签到的员工
                listKaoQin = new ArrayList<>();
                KaoqinRecord kq = new KaoqinRecord();
                kq.setName(mapEmp.get(inputId).getName());
                kq.setStratTime(kaoqinTime);
                kq.setEndTime("");
                listKaoQin.add(kq);
                map.put(qiandaoDate,listKaoQin);
                System.out.println("签到成功!");
            }else {//说明之前,今天已经有人签到过了
                listKaoQin = map.get(qiandaoDate);
                //判断是否已经签到过
                boolean bIsFind = false;
                for (KaoqinRecord kr : listKaoQin) {
                    if (kr.getName() == mapEmp.get(inputId).getName()) {
                        System.out.println("已经签到过了");
                        bIsFind = true;
                        break;
                    }
                }
                if (!bIsFind) {
                    KaoqinRecord kr = new KaoqinRecord();
                    kr.setName(mapEmp.get(inputId).getName());
                    kr.setStratTime(kaoqinTime);
                    kr.setEndTime("");
                    listKaoQin.add(kr);
                    System.out.println("签到成功!");
                }
            }
        }
        public void qiantui(){
            System.out.println("请输入要签退的员工ID");
            Scanner sc = new Scanner(System.in);
            int inputId = sc.nextInt();
            String s = sc.nextLine();
            if(!mapEmp.containsKey(inputId)){
                System.out.println("员工不存在");
                return;
            }
            Date date = new Date();
            SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");
            String qiandaoDate = sdfDate.format(date);
            String kaoqinTime = sdfTime.format(date);
            if(!map.containsKey(qiandaoDate)){
                System.out.println("您没签到,不能签退!");
            }else{
                List<KaoqinRecord> listKaoQin = map.get(qiandaoDate);
                boolean bIsFind = false;
                for(KaoqinRecord kr : listKaoQin){
                    if(kr.getName().equals(mapEmp.get(inputId).getName())){
                        kr.setEndTime(kaoqinTime);
                        bIsFind = true;
                        break;
                    }
                }
                if(!bIsFind){
                    System.out.println("您没签到,不能签退");
                }else{
                    System.out.println("签退成功!");
                }
            }
        }
        public void showAttendence(){
            System.out.println("请输入要查询的日期(yyyy-MM-dd)");
            Scanner sc = new Scanner(System.in);
            String qiandaoDate = sc.nextLine();
            List<KaoqinRecord> listKaoQin = map.get(qiandaoDate);
            for(KaoqinRecord kr : listKaoQin){
                System.out.println(kr.getName()+" 签到时间为:"+kr.getStratTime()+" 签退时间为:"+kr.getEndTime());
            }
        }
    }
    package com.company;
    
    /**
     * 定义一个员工每天考勤的类,包括员工姓名,还有签到时间和签退时间
     * Created by ttc on 2017/6/30.
     */
    public class KaoqinRecord {
        private String name;
        private String stratTime;
        private String endTime;
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getStratTime() {
            return stratTime;
        }
    
        public void setStratTime(String stratTime) {
            this.stratTime = stratTime;
        }
    
        public String getEndTime() {
            return endTime;
        }
    
        public void setEndTime(String endTime) {
            this.endTime = endTime;
        }
    }
    package com.company;
    
    /**
     * 定义一个员工类,属性包括员工的id,员工姓名,年龄,性别
     * Created by ttc on 2017/6/30.
     */
    public class Emp {
        private int id;
        private String name;
        private int age;
        private char sex;
        public  Emp(){
    
        }
    
        public Emp(int id, String name, int age, char sex) {
            this.id = id;
            this.name = name;
            this.age = age;
            this.sex = sex;
        }
    
        public int getId() {
            return id;
        }
    
        public void setId(int id) {
            this.id = id;
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public int getAge() {
            return age;
        }
    
        public void setAge(int age) {
            this.age = age;
        }
    
        public char getSex() {
            return sex;
        }
    
        public void setSex(char sex) {
            this.sex = sex;
        }
    }

    展开全文
  • 求大神帮我写一个java tcp模拟考勤打卡代码,主要需求有,得到员工名字,工号,和打卡时间
  • 源码描述: 一、源码介绍 使用SSH框架实现,mysql数据库。 二、主要功能 学生信息管理,学生考勤记录,考勤记录审批,个人中心,权限设置。 三、注意事项 开发环境为jdk1.8,数据库为mysql
  • 上下班自动打卡系统

    千次阅读 2019-05-12 19:02:44
    某程序员上下班要在本人的IP地址在公司考勤系统上在线打卡各一次。假设公司的打卡流程为登录-提交表单-填写工时(下班),登录后考勤页面表单包含个人姓名,工号,IP地址,随机验证码等信息,提交表单后服务端首先...

      某程序员上下班要用本人的IP地址在公司考勤系统在线打卡各一次。
      假设公司的打卡流程为登录-提交表单-填写工时(下班),登录后考勤页面表单包含个人姓名,工号,IP地址,随机验证码,时间戳等信息,提交表单后服务端首先检查IP地址是否与员工登记的IP地址一致,随后验证时间是否在正常的上下班时间段,返回考勤正常或异常。
      编程语言:JAVA
      直接上源码。

    上班打卡

    package htmlparse;
    
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Random;
    
    import org.jsoup.Connection;
    import org.jsoup.Connection.Response;
    import org.jsoup.Jsoup;
    import org.jsoup.nodes.Document;
    import org.jsoup.nodes.Element;
    import org.jsoup.select.Elements;
    
    
    public class InCheck {
    
    	public static void main(String[] arg0) throws IOException{
    		
    //		HttpURLConnection httpConn=null;
    //        BufferedReader in=null;
    //        PrintWriter out=null;
    //        try {
    //            URL url=new URL("http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    //            httpConn=(HttpURLConnection)url.openConnection();
    //            httpConn.setRequestMethod("POST");
    //            httpConn.setDoInput(true);
    //            httpConn.setDoOutput(true);
    //            httpConn.setInstanceFollowRedirects(false);
    //            
    //            httpConn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    //    		httpConn.setRequestProperty("Accept-Encoding", "gzip, deflate");
    //    		httpConn.setRequestProperty("Accept-Language", "zh-CN,zh;q=0.8");
    //    		httpConn.setRequestProperty("Cache-Control", "max-age=0");
    //    		httpConn.setRequestProperty("Connection", "keep-alive");
    //    		httpConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    //    		httpConn.setRequestProperty("Cookie", "ff_username=os.*******=ff_username; JSESSIONID=ID669715155DB0.22358644074085698End; sapj2ee_*=669715155");
    //    		httpConn.setRequestProperty("Host", "eis.ffcs.cn");
    //    		httpConn.setRequestProperty("Origin", "http://eis.ffcs.cn");
    //    		httpConn.setRequestProperty("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    //    		httpConn.setRequestProperty("Upgrade-Insecure-Requests", "1");
    //    		httpConn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36");
    //    		
    //            //发送post请求参数
    //            out=new PrintWriter(httpConn.getOutputStream());
    //            out.println("login_submit=on&login_do_redirect=1&no_cert_storing=on&j_user=os.*******&j_password=??????&j_authscheme=default");
    //            out.flush();
    //             
    //            Map<String, List<String>> map = httpConn.getHeaderFields();
    //            // 遍历所有的响应头字段
    //            for (String key : map.keySet()) {
    //                System.out.println(key + "--->" + map.get(key));
    //            }
    //            
    //            //读取响应
    //            if(httpConn.getResponseCode()==302){
    //                StringBuffer content=new StringBuffer();
    //                String tempStr="";
    //                in=new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
    //                while((tempStr=in.readLine())!=null){
    //                    content.append(tempStr);
    //                }
    //                System.out.println(new String(content.toString().getBytes(),Charset.forName("utf-8")));
    //            }
    //        } catch (IOException e) {
    //            e.printStackTrace();
    //        }finally{
    //        	try{
    //            in.close();
    //            out.close();
    //            httpConn.disconnect();
    //        	}catch(Exception e){
    //        		e.printStackTrace();
    //        	}
    //        }
    		try {
    			Map<String, String> cookies = null;
    			String sapj2ee_star = null;
    			String JSESSIONID = null;
    			String ASPdotNET_SessionId = null;
    			String MYSAPSSO2 = null;
    			
    			
    			
    			System.out.println(1);
    			String url = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
    			
    			Connection conn = Jsoup.connect(url);
    			conn.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn.header("Connection", "keep-alive");
    			conn.header("Cookie", "ff_username=os.*******=ff_username");
    			//conn.header("Cookie", "ff_username=os.*******=ff_username; JSESSIONID=ID669715155DB0.22358644074085698End; sapj2ee_*=669715155");
    			conn.header("Host", "eis.ffcs.cn");
    			conn.header("Upgrade-Insecure-Requests", "1");
    			conn.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    
    
    			conn.method(Connection.Method.GET);
    //        conn.followRedirects(false);
    			Response response = conn.timeout(10000).execute();
    			
    			System.out.println(response.statusCode());
    //		System.out.println(response.body());
    			System.out.println(response.headers());
    			
    			cookies = response.cookies();
    			
    			sapj2ee_star = cookies.get("sapj2ee_*");
    			JSESSIONID = cookies.get("JSESSIONID");
    			
    			System.out.println(cookies); //sapj2ee_*=669715155; Version=1; Path=/   
    			//JSESSIONID=ID669715155DB0.24023707681679896End; Version=1; Domain=.ffcs.cn; Path=/
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			
    			System.out.println(2);
    			
    			String url2 = "http://bem.ffcs.cn:81/mis/eislogin.aspx";
    			
    			Connection conn2 = Jsoup.connect(url2);
    			conn2.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn2.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn2.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn2.header("Connection", "keep-alive");
    //		conn2.header("Cookie", "ASP.NET_SessionId=1gjx3p23rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn2.header("Host", "bem.ffcs.cn:81");
    			conn2.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    			conn2.header("Upgrade-Insecure-Requests", "1");
    			conn2.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			conn2.cookie("JSESSIONID","ID669715155DB0.4105357846396225End");
    			
    			conn2.method(Connection.Method.GET);
    			Response response2 = conn2.timeout(10000).execute();
    			System.out.println(response2.statusCode());
    //		System.out.println(response2.body());
    			System.out.println(response2.headers());
    			
    			cookies = response2.cookies();
    			
    			ASPdotNET_SessionId = cookies.get("ASP.NET_SessionId");
    			
    			System.out.println(cookies);
    			
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			System.out.println(3);
    			
    			String url3 = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
    			
    			Connection conn3 = Jsoup.connect(url3);
    			conn3.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn3.header("Accept-Encoding", "gzip, deflate");
    			conn3.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn3.header("Cache-Control","max-age=0");//
    			conn3.header("Connection", "keep-alive");
    //		conn3.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn3.header("Content-Length","111");
    			conn3.header("Content-Type","application/x-www-form-urlencoded");
    			conn3.header("Host", "eis.ffcs.cn");
    			conn3.header("Origin","http://eis.ffcs.cn");
    			conn3.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    			conn3.header("Upgrade-Insecure-Requests", "1");
    			conn3.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			conn3.cookie("ff_username","os.*******=ff_username");
    			conn3.cookie("sapj2ee_*", sapj2ee_star);
    			conn3.cookie("JSESSIONID", JSESSIONID);
    			
    			
    			conn3.data("login_submit", "on");
    			conn3.data("login_do_redirect", "1");
    			conn3.data("no_cert_storing", "on");
    			conn3.data("j_user", "os.*******");
    			conn3.data("j_password", "??????");
    			conn3.data("j_authscheme", "default");
    			
    			
    			conn3.method(Connection.Method.POST);
    			conn3.followRedirects(false);
    			
    			Response response3 = conn3.timeout(10000).execute();
    			
    			System.out.println(response3.statusCode());
    //		System.out.println(response3.body());
    			System.out.println(response3.headers());
    			cookies = response3.cookies();
    			
    			String redirectUrl = response3.header("Location");
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			MYSAPSSO2 = cookies.get("MYSAPSSO2");
    			System.out.println(cookies);
    			
    			System.out.println(MYSAPSSO2);
    			System.out.println(redirectUrl);
    			
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			System.out.println(4);
    			
    			//String url4 = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
    			String url4 = redirectUrl;
    			
    			Connection conn4 = Jsoup.connect(url4);
    			conn4.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn4.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn4.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn4.header("Cache-Control","max-age=0");//
    			conn4.header("Connection", "keep-alive");
    //		conn4.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn4.header("Content-Length","111");
    			conn4.header("Host", "eis.ffcs.cn");
    			conn4.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    			conn4.header("Upgrade-Insecure-Requests", "1");
    			conn4.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			conn4.cookie("ff_username","os.*******=ff_username");
    			conn4.cookie("sapj2ee_*", sapj2ee_star);
    			conn4.cookie("JSESSIONID", JSESSIONID);
    			conn4.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn4.method(Connection.Method.GET);
    			System.out.println(5);
    			Response response4 = conn4.timeout(10000).execute();
    			
    			System.out.println(response4.statusCode());
    //		System.out.println(response4.body());
    			System.out.println(response4.headers());
    			cookies = response4.cookies();
    			sapj2ee_star=cookies.get("sapj2ee_*");
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			///
    			
    //			
    			System.out.println("4_5");
    			
    			String url4_5 = "http://eis.ffcs.cn/irj/portalapps/com.sap.portal.htmlb/jslib/emptyhover.html";
    			
    			Connection conn4_5 = Jsoup.connect(url4_5);
    			conn4_5.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn4_5.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn4_5.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn4_5.header("Connection", "keep-alive");
    //		conn4_5.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn4_5.header("Host", "eis.ffcs.cn");
    			conn4_5.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    			conn4_5.header("Upgrade-Insecure-Requests", "1");
    			conn4_5.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn4_5.cookie("JSESSIONID", JSESSIONID);
    			conn4_5.cookie("sapj2ee_*", sapj2ee_star);
    			conn4_5.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn4_5.method(Connection.Method.GET);
    			
    			Response response4_5 = conn4_5.timeout(10000).execute();
    			
    			
    			System.out.println(response4_5.statusCode());
    			System.out.println(response4_5.body());
    			System.out.println(response4_5.headers());
    			cookies = response4_5.cookies();
    			//sapj2ee_star=cookies.get("sapj2ee_*");
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			
    //			
    			
    			
    			
    			
    			System.out.println(5);
    			
    			String url5 = "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx";
    			
    			Connection conn5 = Jsoup.connect(url5);
    			conn5.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn5.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn5.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn5.header("Connection", "keep-alive");
    //		conn5.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn5.header("Host", "bem.ffcs.cn:81");
    			conn5.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    			conn5.header("Upgrade-Insecure-Requests", "1");
    			conn5.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn5.cookie("JSESSIONID", JSESSIONID);
    			conn5.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn5.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn5.method(Connection.Method.GET);
    			
    			Response response5 = conn5.timeout(10000).execute();
    			
    			
    			System.out.println(response5.statusCode());
    			System.out.println(response5.body());
    			System.out.println(response5.headers());
    			cookies = response5.cookies();
    			//sapj2ee_star=cookies.get("sapj2ee_*");
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			Document doc = Jsoup.parse(response5.body());
    			
    			
    			System.out.println(6);
    			
    			String url6 = "http://bem.ffcs.cn:81/hrs/ajax/common.ashx";
    			
    			Connection conn6 = Jsoup.connect(url6);
    			conn6.header("Accept", "*/*");
    			conn6.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn6.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn6.header("Connection", "keep-alive");
    //		conn6.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn6.header("Host", "bem.ffcs.cn:81");
    			conn6.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    			conn6.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn6.cookie("JSESSIONID", JSESSIONID);
    			conn6.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn6.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn6.method(Connection.Method.GET);
    			
    			Response response6 = conn6.timeout(10000).execute();
    			
    			
    			System.out.println(response6.statusCode());
    //	System.out.println(response6.body());
    			System.out.println(response6.headers());
    			cookies = response6.cookies();
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    
    			System.out.println(7);
    			
    			String url7 = "http://bem.ffcs.cn:81/hrs/ajax/FFCS.HumanResource.Work.OutUserWork,FFCS.HumanResource.ashx";
    			
    			Connection conn7 = Jsoup.connect(url7);
    			conn7.header("Accept", "*/*");
    			conn7.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn7.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn7.header("Connection", "keep-alive");
    //		conn7.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn7.header("Host", "bem.ffcs.cn:81");
    			conn7.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    			conn7.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn7.cookie("JSESSIONID", JSESSIONID);
    			conn7.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn7.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn7.method(Connection.Method.GET);
    			
    			Response response7 = conn7.timeout(10000).execute();
    			
    			System.out.println(response7.statusCode());
    //	System.out.println(response7.body());
    			System.out.println(response7.headers());
    			cookies = response7.cookies();
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			
    			System.out.println("上班");
    			///上班/
    			
    			Element form1=doc.getElementById("form1");
    			
    			Elements inputs = form1.getElementsByTag("input");
    			
    			System.out.println(inputs);
    			
    			Map<String,String> dataMap = new HashMap<String,String>();
    			
    			Iterator<Element> inputIt = inputs.iterator();
    			while(inputIt.hasNext()){
    				
    				Element inputEle = inputIt.next();
    				if(!"ibOff".equals(inputEle.attr("name"))){
    					dataMap.put(inputEle.attr("name"), inputEle.attr("value"));
    				}
    			}
    			
    			Random rd = new Random();
    			
    			int xx = 3 + rd.nextInt(121-3);
    			int yy = 9 + rd.nextInt(29-9);
    			
    			dataMap.put("ibOn.x", xx+""); //82
    			dataMap.put("ibOn.y", yy+""); //22
    			
    			System.out.println(dataMap);
    			
    			try {
    				Thread.sleep(2000);
    			} catch (InterruptedException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			
    			System.out.println(8);
    			
    			String url8 = "http://bem.ffcs.cn:81/hrs/ajax/FFCS.HumanResource.Work.OutUserWork,FFCS.HumanResource.ashx?_method=AjaxCheckOnWork&_session=rw";
    			
    			Connection conn8 = Jsoup.connect(url8);
    			conn8.header("Accept", "*/*");
    			conn8.header("Accept-Encoding", "gzip, deflate");
    			conn8.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn8.header("Connection", "keep-alive");
    //		conn8.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn8.header("Content-Length","42");
    			conn8.header("Content-Type","text/plain;charset=UTF-8");
    			conn8.header("Host", "bem.ffcs.cn:81");
    			conn8.header("Origin","http://bem.ffcs.cn:81");
    			conn8.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    			conn8.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			conn8.cookie("JSESSIONID",JSESSIONID);
    			conn8.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn8.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    			
    			conn8.data("strUserNo",dataMap.get("pcUserno"));
    			conn8.data("strUserName",dataMap.get("pcUsername"));
    
    			
    			
    			conn8.method(Connection.Method.POST);
    			
    			Response response8 = conn8.timeout(10000).execute();
    			
    			System.out.println(response8.statusCode());
    			System.out.println(response8.body());
    			System.out.println(response8.headers());
    			cookies = response8.cookies();
    			
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			
    			System.out.println(9);
    			
    			String url9 = "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx";
    			
    			Connection conn9 = Jsoup.connect(url9);
    			conn9.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn9.header("Accept-Encoding", "gzip, deflate");
    			conn9.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn9.header("Cache-Control","max-age=0");//
    			conn9.header("Connection", "keep-alive");
    //		conn9.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn9.header("Content-Length","515");
    			conn9.header("Content-Type","application/x-www-form-urlencoded");
    			conn9.header("Host", "bem.ffcs.cn:81");
    			conn9.header("Origin","http://bem.ffcs.cn:81");
    			conn9.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    			conn9.header("Upgrade-Insecure-Requests", "1");
    			conn9.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			conn9.cookie("JSESSIONID",JSESSIONID);
    			conn9.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn9.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    			
    			conn9.data(dataMap);
    			
    			
    			conn9.method(Connection.Method.POST);
    			conn9.followRedirects(false);
    			
    			
    			Response response9 = conn9.timeout(10000).execute();
    			
    			System.out.println(response9.statusCode());
    			System.out.println(response9.body());
    			System.out.println(response9.headers());
    			cookies = response9.cookies();
    			
    			redirectUrl = response9.header("Location");
    			//Location:/hrs/work/OutUserWorkList.aspx?id=17105468
    			
    			System.out.println(cookies);
    
    			System.out.println(redirectUrl);
    			System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			
    			if(redirectUrl != null){
    				System.out.println(10);
    				
    				String url10 = redirectUrl;
    				//http://bem.ffcs.cn:81/hrs/work/OutUserWorkList.aspx?id=17105468
    			    
    				Connection conn10 = Jsoup.connect("http://bem.ffcs.cn:81"+url10);
    				conn10.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    				conn10.header("Accept-Encoding", "gzip, deflate, sdch");
    				conn10.header("Accept-Language", "zh-CN,zh;q=0.8");
    				conn10.header("Cache-Control","max-age=0");
    				conn10.header("Connection", "keep-alive");
    //			conn10.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    				conn10.header("Host", "bem.ffcs.cn:81");
    				conn10.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    				conn10.header("Upgrade-Insecure-Requests", "1");
    				conn10.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    				
    				conn10.cookie("JSESSIONID", JSESSIONID);
    				conn10.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    				conn10.cookie("MYSAPSSO2", MYSAPSSO2);
    					
    				
    				conn10.method(Connection.Method.GET);
    				
    			    Response response10 = conn10.timeout(10000).execute();
    			    
    			    
    			    System.out.println(response10.statusCode());
    				System.out.println(response10.body());
    			    System.out.println(response10.headers());
    				cookies = response10.cookies();
    				//sapj2ee_star=cookies.get("sapj2ee_*");
    				//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    				
    				System.out.println(cookies);
    				
    				System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    			}
    			
    		} catch (Exception e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace(System.out);
    		
    		}
    		
    	}
    	
    	
    	
    	
    }
    
    

    下班打卡

    package htmlparse;
    
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Map;
    
    import org.jsoup.Connection;
    import org.jsoup.Connection.Response;
    import org.jsoup.Jsoup;
    import org.jsoup.nodes.Document;
    import org.jsoup.nodes.Element;
    import org.jsoup.select.Elements;
    
    
    public class OffCheck {
    
    	public static void main(String[] arg0) throws IOException{
    		
    //		HttpURLConnection httpConn=null;
    //        BufferedReader in=null;
    //        PrintWriter out=null;
    //        try {
    //            URL url=new URL("http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    //            httpConn=(HttpURLConnection)url.openConnection();
    //            httpConn.setRequestMethod("POST");
    //            httpConn.setDoInput(true);
    //            httpConn.setDoOutput(true);
    //            httpConn.setInstanceFollowRedirects(false);
    //            
    //            httpConn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    //    		httpConn.setRequestProperty("Accept-Encoding", "gzip, deflate");
    //    		httpConn.setRequestProperty("Accept-Language", "zh-CN,zh;q=0.8");
    //    		httpConn.setRequestProperty("Cache-Control", "max-age=0");
    //    		httpConn.setRequestProperty("Connection", "keep-alive");
    //    		httpConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    //    		httpConn.setRequestProperty("Cookie", "ff_username=os.*******=ff_username; JSESSIONID=ID669715155DB0.22358644074085698End; sapj2ee_*=669715155");
    //    		httpConn.setRequestProperty("Host", "eis.ffcs.cn");
    //    		httpConn.setRequestProperty("Origin", "http://eis.ffcs.cn");
    //    		httpConn.setRequestProperty("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    //    		httpConn.setRequestProperty("Upgrade-Insecure-Requests", "1");
    //    		httpConn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36");
    //    		
    //            //发送post请求参数
    //            out=new PrintWriter(httpConn.getOutputStream());
    //            out.println("login_submit=on&login_do_redirect=1&no_cert_storing=on&j_user=os.*******&j_password=??????&j_authscheme=default");
    //            out.flush();
    //             
    //            Map<String, List<String>> map = httpConn.getHeaderFields();
    //            // 遍历所有的响应头字段
    //            for (String key : map.keySet()) {
    //                System.out.println(key + "--->" + map.get(key));
    //            }
    //            
    //            //读取响应
    //            if(httpConn.getResponseCode()==302){
    //                StringBuffer content=new StringBuffer();
    //                String tempStr="";
    //                in=new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
    //                while((tempStr=in.readLine())!=null){
    //                    content.append(tempStr);
    //                }
    //                System.out.println(new String(content.toString().getBytes(),Charset.forName("utf-8")));
    //            }
    //        } catch (IOException e) {
    //            e.printStackTrace();
    //        }finally{
    //        	try{
    //            in.close();
    //            out.close();
    //            httpConn.disconnect();
    //        	}catch(Exception e){
    //        		e.printStackTrace();
    //        	}
    //        }
    		Map<String, String> cookies = null;
    		String sapj2ee_star = null;
    		String JSESSIONID = null;
    		String ASPdotNET_SessionId = null;
    		String MYSAPSSO2 = null;
    		
    		
    		System.out.println(1);
    		String url = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
    		
    		Connection conn = Jsoup.connect(url);
    		conn.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn.header("Connection", "keep-alive");
    		conn.header("Cookie", "ff_username=os.*******=ff_username");
    		//conn.header("Cookie", "ff_username=os.*******=ff_username; JSESSIONID=ID669715155DB0.22358644074085698End; sapj2ee_*=669715155");
    		conn.header("Host", "eis.ffcs.cn");
    		conn.header("Upgrade-Insecure-Requests", "1");
    		conn.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		
    
    	
    		conn.method(Connection.Method.GET);
    //        conn.followRedirects(false);
            Response response = conn.timeout(10000).execute();
    		
            System.out.println(response.statusCode());
    //		System.out.println(response.body());
            System.out.println(response.headers());
            
            cookies = response.cookies();
            
            sapj2ee_star = cookies.get("sapj2ee_*");
            JSESSIONID = cookies.get("JSESSIONID");
            
            System.out.println(cookies); //sapj2ee_*=669715155; Version=1; Path=/   
            //JSESSIONID=ID669715155DB0.24023707681679896End; Version=1; Domain=.ffcs.cn; Path=/
            
            System.out.println(2);
            
            String url2 = "http://bem.ffcs.cn:81/mis/eislogin.aspx";
            
    		Connection conn2 = Jsoup.connect(url2);
    		conn2.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn2.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn2.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn2.header("Connection", "keep-alive");
    //		conn2.header("Cookie", "ASP.NET_SessionId=1gjx3p23rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    		conn2.header("Host", "bem.ffcs.cn:81");
    		conn2.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    		conn2.header("Upgrade-Insecure-Requests", "1");
    		conn2.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn2.cookie("JSESSIONID","ID669715155DB0.4105357846396225End");
    		
    		conn2.method(Connection.Method.GET);
            Response response2 = conn2.timeout(10000).execute();
            System.out.println(response2.statusCode());
    //		System.out.println(response2.body());
            System.out.println(response2.headers());
            
    		cookies = response2.cookies();
    		
    		ASPdotNET_SessionId = cookies.get("ASP.NET_SessionId");
    		
    		System.out.println(cookies);
    		
    		System.out.println(3);
            
            String url3 = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
            
    		Connection conn3 = Jsoup.connect(url3);
    		conn3.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn3.header("Accept-Encoding", "gzip, deflate");
    		conn3.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn3.header("Cache-Control","max-age=0");//
    		conn3.header("Connection", "keep-alive");
    //		conn3.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn3.header("Content-Length","111");
    		conn3.header("Content-Type","application/x-www-form-urlencoded");
    		conn3.header("Host", "eis.ffcs.cn");
    		conn3.header("Origin","http://eis.ffcs.cn");
    		conn3.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    		conn3.header("Upgrade-Insecure-Requests", "1");
    		conn3.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn3.cookie("ff_username","os.*******=ff_username");
    		conn3.cookie("sapj2ee_*", sapj2ee_star);
    		conn3.cookie("JSESSIONID", JSESSIONID);
    		
    		
    		conn3.data("login_submit", "on");
    		conn3.data("login_do_redirect", "1");
    		conn3.data("no_cert_storing", "on");
    		conn3.data("j_user", "os.*******");
    		conn3.data("j_password", "??????");
    		conn3.data("j_authscheme", "default");
    		
    		
    		conn3.method(Connection.Method.POST);
    		conn3.followRedirects(false);
    		
            Response response3 = conn3.timeout(10000).execute();
            
            System.out.println(response3.statusCode());
    //		System.out.println(response3.body());
            System.out.println(response3.headers());
    		cookies = response3.cookies();
    		
    		String redirectUrl = response3.header("Location");
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		MYSAPSSO2 = cookies.get("MYSAPSSO2");
    		System.out.println(cookies);
    		
    		System.out.println(MYSAPSSO2);
    		System.out.println(redirectUrl);
    		
    		System.out.println(4);
            
            //String url4 = "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
            String url4 = redirectUrl;
            
    		Connection conn4 = Jsoup.connect(url4);
    		conn4.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn4.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn4.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn4.header("Cache-Control","max-age=0");//
    		conn4.header("Connection", "keep-alive");
    //		conn4.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn4.header("Content-Length","111");
    		conn4.header("Host", "eis.ffcs.cn");
    		conn4.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    		conn4.header("Upgrade-Insecure-Requests", "1");
    		conn4.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn4.cookie("ff_username","os.*******=ff_username");
    		conn4.cookie("sapj2ee_*", sapj2ee_star);
    		conn4.cookie("JSESSIONID", JSESSIONID);
    		conn4.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    		
    		conn4.method(Connection.Method.GET);
    		System.out.println(5);
            Response response4 = conn4.timeout(10000).execute();
            
            System.out.println(response4.statusCode());
    //		System.out.println(response4.body());
            System.out.println(response4.headers());
    		cookies = response4.cookies();
    		sapj2ee_star=cookies.get("sapj2ee_*");
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		System.out.println(cookies);
    		
    		System.out.println(5);
    		
    		String url5 = "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx";
            
    		Connection conn5 = Jsoup.connect(url5);
    		conn5.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn5.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn5.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn5.header("Connection", "keep-alive");
    //		conn5.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    		conn5.header("Host", "bem.ffcs.cn:81");
    		conn5.header("Referer", "http://eis.ffcs.cn/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default");
    		conn5.header("Upgrade-Insecure-Requests", "1");
    		conn5.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		
    		conn5.cookie("JSESSIONID", JSESSIONID);
    		conn5.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn5.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    		
    		conn5.method(Connection.Method.GET);
    		
            Response response5 = conn5.timeout(10000).execute();
            
            
            System.out.println(response5.statusCode());
    		System.out.println(response5.body());
            System.out.println(response5.headers());
    		cookies = response5.cookies();
    //		sapj2ee_star=cookies.get("sapj2ee_*");
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		System.out.println(cookies);
    		
    		Document doc = Jsoup.parse(response5.body());
    		
    		
    		System.out.println(6);
    		
    		String url6 = "http://bem.ffcs.cn:81/hrs/ajax/common.ashx";
            
    		Connection conn6 = Jsoup.connect(url6);
    		conn6.header("Accept", "*/*");
    		conn6.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn6.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn6.header("Connection", "keep-alive");
    //		conn6.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    		conn6.header("Host", "bem.ffcs.cn:81");
    		conn6.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    		conn6.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		
    		conn6.cookie("JSESSIONID", JSESSIONID);
    		conn6.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn6.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    		
    		conn6.method(Connection.Method.GET);
    		
            Response response6 = conn6.timeout(10000).execute();
            
            
            System.out.println(response6.statusCode());
    	//	System.out.println(response6.body());
            System.out.println(response6.headers());
    		cookies = response6.cookies();
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		System.out.println(cookies);
    		
    
    		System.out.println(7);
    		
    		String url7 = "http://bem.ffcs.cn:81/hrs/ajax/FFCS.HumanResource.Work.OutUserWork,FFCS.HumanResource.ashx";
            
    		Connection conn7 = Jsoup.connect(url7);
    		conn7.header("Accept", "*/*");
    		conn7.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn7.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn7.header("Connection", "keep-alive");
    //		conn7.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    		conn7.header("Host", "bem.ffcs.cn:81");
    		conn7.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    		conn7.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		
    		conn7.cookie("JSESSIONID", JSESSIONID);
    		conn7.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn7.cookie("MYSAPSSO2", MYSAPSSO2);
    			
    		
    		conn7.method(Connection.Method.GET);
    		
            Response response7 = conn7.timeout(10000).execute();
            
            System.out.println(response7.statusCode());
    	//	System.out.println(response7.body());
            System.out.println(response7.headers());
    		cookies = response7.cookies();
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		System.out.println(cookies);
    		
    		System.out.println("下班");
    		///下班/
    		
    		Element form1=doc.getElementById("form1");
    		
    		Elements inputs = form1.getElementsByTag("input");
    		
    		System.out.println(inputs);
    		
    		Map<String,String> dataMap = new HashMap<String,String>();
    		
    		Iterator<Element> inputIt = inputs.iterator();
    		while(inputIt.hasNext()){
    			
    			Element inputEle = inputIt.next();
    			if(!"ibOff".equals(inputEle.attr("name"))){
    				dataMap.put(inputEle.attr("name"), inputEle.attr("value"));
    			}
    		}
    		System.out.println(dataMap);
    		
    //		dataMap.put("ibOn.x", "66");
    //		dataMap.put("ibOn.y", "27");
    		
    		try {
    			Thread.sleep(1000);
    		} catch (InterruptedException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    		
    		
    		System.out.println(8);
            
            String url8 = "http://bem.ffcs.cn:81/hrs/ajax/FFCS.HumanResource.Work.OutUserWork,FFCS.HumanResource.ashx?_method=AjaxCheckOffTime&_session=rw";
            
            
    		Connection conn8 = Jsoup.connect(url8);
    		conn8.header("Accept", "*/*");
    		conn8.header("Accept-Encoding", "gzip, deflate");
    		conn8.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn8.header("Connection", "keep-alive");
    //		conn8.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn8.header("Content-Length","19");
    		conn8.header("Content-Type","text/plain;charset=UTF-8");
    		conn8.header("Host", "bem.ffcs.cn:81");
    		conn8.header("Origin","http://bem.ffcs.cn:81");
    		conn8.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    		conn8.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		
    		conn8.cookie("JSESSIONID",JSESSIONID);
    		conn8.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn8.cookie("MYSAPSSO2", MYSAPSSO2);
    		
    		
    		
    		System.out.println(dataMap.get("pcUserno"));
    		conn8.data("strUserno",dataMap.get("pcUserno"));
    		conn8.method(Connection.Method.POST);
    		
            Response response8 = conn8.timeout(10000).execute();
            
            System.out.println(response8.statusCode());
    		System.out.println(response8.body());
            System.out.println(response8.headers());
    		cookies = response8.cookies();
    		
    		//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    		
    		System.out.println(cookies);
    		
    
    		
    		System.out.println(9);
            
            String url9 = "http://bem.ffcs.cn:81/hrs/ajax/FFCS.HumanResource.Work.OutUserWork,FFCS.HumanResource.ashx?_method=AjaxGetWorkHour&_session=rw";
            
    		Connection conn9 = Jsoup.connect(url9);
    		conn9.header("Accept", "*/*");
    		conn9.header("Accept-Encoding", "gzip, deflate");
    		conn9.header("Accept-Language", "zh-CN,zh;q=0.8");
    	//	conn9.header("Cache-Control","max-age=0");//
    		conn9.header("Connection", "keep-alive");
    //		conn9.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn9.header("Content-Length","40");
    		conn9.header("Content-Type","text/plain;charset=UTF-8");
    		conn9.header("Host", "bem.ffcs.cn:81");
    		conn9.header("Origin","http://bem.ffcs.cn:81");
    		conn9.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    	//	conn9.header("Upgrade-Insecure-Requests", "1");
    		conn9.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn9.cookie("JSESSIONID",JSESSIONID);
    		conn9.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn9.cookie("MYSAPSSO2", MYSAPSSO2);
    		
    		System.out.println(dataMap.get("pcDeptid"));
    		System.out.println(dataMap.get("pcUserno"));
    		
    		conn9.data("strDeptID",dataMap.get("pcDeptid"));
    		conn9.data("strUserNO",dataMap.get("pcUserno"));
    		
    		conn9.method(Connection.Method.POST);
    	//	conn9.followRedirects(false);
    		
    		
            Response response9 = conn9.timeout(10000).execute();
            
            System.out.println(response9.statusCode());
    		System.out.println(response9.body());
            System.out.println(response9.headers());
    		cookies = response9.cookies();
    		System.out.println(cookies);
    //		redirectUrl = response9.header("Location");
    //		//Location:/hrs/work/OutUserWorkList.aspx?id=17105468
    	
    //		System.out.println(redirectUrl);		
    //
    
    		
    		
    		System.out.println(10);
    		
    		String url10 = "http://bem.ffcs.cn:81/hrs/work/Effort-Admin-Hour-Input-Plus.aspx?userno="+dataMap.get("pcUserno")+"&work=2";
    		
    		Connection conn10 = Jsoup.connect(url10);
    		conn10.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn10.header("Accept-Encoding", "gzip, deflate, sdch");
    		conn10.header("Accept-Language", "zh-CN,zh;q=0.8");
    //		conn10.header("Cache-Control","max-age=0");//
    		conn10.header("Connection", "keep-alive");
    //	conn10.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn10.header("Content-Length","515");
    //		conn10.header("Content-Type","application/x-www-form-urlencoded");
    		conn10.header("Host", "bem.ffcs.cn:81");
    //		conn10.header("Origin","http://bem.ffcs.cn:81");
    		conn10.header("Referer", "http://bem.ffcs.cn:81/hrs/work/OutUserWork.aspx");
    		conn10.header("Upgrade-Insecure-Requests", "1");
    		conn10.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn10.cookie("JSESSIONID",JSESSIONID);
    		conn10.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn10.cookie("MYSAPSSO2", MYSAPSSO2);
    		
    		
    		
    		conn10.method(Connection.Method.GET);
    		
    		
    		Response response10 = conn10.timeout(10000).execute();
    		
    		System.out.println(response10.statusCode());
    		System.out.println(response10.body());
    		System.out.println(response10.headers());
    		cookies = response10.cookies();
    		System.out.println(cookies);
    		
    		System.out.println(response10.body());
    		Document doc2 = Jsoup.parse(response10.body());
    
    		Element form2=doc2.getElementById("form1");
    		
    		Elements inputs2 = form2.getElementsByTag("input");
    		
    		System.out.println(inputs2);
    		
    		Map<String,String> dataMap2 = new HashMap<String,String>();
    		
    		Iterator<Element> inputIt2 = inputs2.iterator();
    		boolean hasAdd = false;
    		while(inputIt2.hasNext()){
    			
    			Element inputEle2 = inputIt2.next();
    			String inputName = inputEle2.attr("name");
    			if(hasAdd == false && inputName.startsWith("input-")){
    				dataMap2.put(inputEle2.attr("name"), "8");
    				hasAdd = true;
    			}else if(hasAdd == true && inputName.startsWith("input-")){
    				dataMap2.put(inputEle2.attr("name"), "0");
    			}else if(inputName.startsWith("sum-day-")){
    				dataMap2.put(inputEle2.attr("name"), "8");
    			}else{
    				dataMap2.put(inputEle2.attr("name"), inputEle2.attr("value"));
    			}
    		}
    		System.out.println(dataMap2);
    		
    		
    		
    		
    		System.out.println(11);
    		
    		String url11 = "http://bem.ffcs.cn:81/hrs/work/Effort-Admin-Hour-Input-Plus.aspx?userno="+dataMap.get("pcUserno")+"&work=2";
    		
    		Connection conn11 = Jsoup.connect(url11);
    		conn11.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    		conn11.header("Accept-Encoding", "gzip, deflate");
    		conn11.header("Accept-Language", "zh-CN,zh;q=0.8");
    		conn11.header("Cache-Control","max-age=0");//
    		conn11.header("Connection", "keep-alive");
    //	conn11.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    //		conn11.header("Content-Length","515");
    		conn11.header("Content-Type","application/x-www-form-urlencoded");
    		conn11.header("Host", "bem.ffcs.cn:81");
    		conn11.header("Origin","http://bem.ffcs.cn:81");
    		conn11.header("Referer", "http://bem.ffcs.cn:81/hrs/work/Effort-Admin-Hour-Input-Plus.aspx?userno="+dataMap.get("pcUserno")+"&work=2");
    		conn11.header("Upgrade-Insecure-Requests", "1");
    		conn11.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    		conn11.cookie("JSESSIONID",JSESSIONID);
    		conn11.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    		conn11.cookie("MYSAPSSO2", MYSAPSSO2);
    		
    		
    		conn11.data(dataMap2);
    		
    		
    		conn11.method(Connection.Method.POST);
    		conn11.followRedirects(false);
    		
    		
    		Response response11 = conn11.timeout(10000).execute();
    		
    		System.out.println(response11.statusCode());
    		System.out.println(response11.body());
    		System.out.println(response11.headers());
    		cookies = response11.cookies();
    		System.out.println(cookies);
    		
    		
    		String redirectUrl2 = response11.header("Location");
    		//Location:/hrs/work/OutUserWorkList.aspx?id=18098707&flag=0
    		
    		System.out.println(redirectUrl2);
    		
    		
    		if(redirectUrl2 != null){
    		
    		
    			System.out.println(12);
    			
    			String url12 = "http://bem.ffcs.cn:81"+redirectUrl2;
    			//http://bem.ffcs.cn:81/hrs/work/OutUserWorkList.aspx?id=17105468
    	        
    			Connection conn12 = Jsoup.connect(url12);
    			conn12.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
    			conn12.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn12.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn12.header("Cache-Control","max-age=0");
    			conn12.header("Connection", "keep-alive");
    //			conn12.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn12.header("Host", "bem.ffcs.cn:81");
    			conn12.header("Referer", "http://bem.ffcs.cn:81/hrs/work/Effort-Admin-Hour-Input-Plus.aspx?"+dataMap.get("pcUserno")+"&work=2");
    			conn12.header("Upgrade-Insecure-Requests", "1");
    			conn12.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn12.cookie("JSESSIONID", JSESSIONID);
    			conn12.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn12.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn12.method(Connection.Method.GET);
    			
    	        Response response12 = conn12.timeout(10000).execute();
    	        
    	        
    	        System.out.println(response12.statusCode());
    			System.out.println(response12.body());
    	        System.out.println(response12.headers());
    			cookies = response12.cookies();
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    
    			System.out.println(13);
    			
    			String url13 = "http://bem.ffcs.cn:81/hrs/js/AllJs.aspx";
    			//http://bem.ffcs.cn:81/hrs/work/OutUserWorkList.aspx?id=17105468
    	        
    			Connection conn13 = Jsoup.connect(url13);
    			conn13.header("Accept", "*/*");
    			conn13.header("Accept-Encoding", "gzip, deflate, sdch");
    			conn13.header("Accept-Language", "zh-CN,zh;q=0.8");
    			conn13.header("Connection", "keep-alive");
    //			conn13.header("Cookie", "ASP.NET_SessionId=1gjx3p33rxfd0kr0whfcv355; JSESSIONID=ID669715155DB0.22358644074085698End; MYSAPSSO2="+cookie);
    			conn13.header("Host", "bem.ffcs.cn:81");
    			conn13.header("Referer", "http://bem.ffcs.cn:81"+redirectUrl2);
    			conn13.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
    			
    			conn13.cookie("JSESSIONID", JSESSIONID);
    			conn13.cookie("ASP.NET_SessionId", ASPdotNET_SessionId);
    			conn13.cookie("MYSAPSSO2", MYSAPSSO2);
    				
    			
    			conn13.method(Connection.Method.GET);
    			
    	        Response response13 = conn13.timeout(10000).execute();
    	        
    	        
    	        System.out.println(response13.statusCode());
    			System.out.println(response13.body());
    	        System.out.println(response13.headers());
    			cookies = response13.cookies();
    			//Cookie:ff_username=os.*******=ff_username; sapj2ee_*=669715155; JSESSIONID=ID669715155DB0.8915172846308779End
    			
    			System.out.println(cookies);
    			
    		}
    		System.out.println(" 1 "+sapj2ee_star+" 2 "+JSESSIONID+" 3 "+ ASPdotNET_SessionId + " 4 "+MYSAPSSO2);
    		
    	}
    	
    	
    	
    	
    }
    
    
    
    展开全文
  • Java考勤系统代码

    2018-01-23 11:05:22
    Java考勤系统利用SSM框架技术实现 相关信息操作文档在文件里面!
  • 计算机毕业设计-springboot企业考勤管理系统(前后端分离)员工考勤管理系统-公司日常管理系统java代码 注意:该项目只展示部分功能,如需了解,联系咨询即可。 作者:IT跃迁谷 1.开发环境 开发语言:Java 后台...
  • 设计和开发一个企业员工考勤管理系统,企业员工和管理员只需登录系统就能实现网上考勤。建立一个能够初步实现企业考勤管理系统的智能化管理,提高考勤管理效率,企业员工能够在各个岗位上的工作状态得到及时的反馈,...
  • 设计和开发一个企业员工考勤管理系统,企业员工和管理员只需登录系统就能实现网上考勤。建立一个能够初步实现企业考勤管理系统的智能化管理,提高考勤管理效率,企业员工能够在各个岗位上的工作状态得到及时的反馈,...
  • 员工考勤信息系统 实现智能化的考勤功能 实现员工智能考勤 分角色登陆 这项目主要体现多线程、网络编程、数据库、面向对象、三层架构的综合使用
  • (小奇JAVA面试)每日10道Java面试题打卡Java基础篇3

    多人点赞 热门讨论 2021-05-26 22:57:50
    堆 是进程和线程共有的空间,每一个进程里面有多个线程,分全局堆和局部堆,全局堆就是所有没有分配的空间,局部堆就是分配给用户的空间,堆在操作系统对进程初始化的时候分配,运行过程中也可以向系统要额外的堆,...
  • 基于web的游乐园员工管理系统 基于web的游乐园员工管理系统mysql数据库创建语句 基于web的游乐园员工管理系统oracle数据库创建语句 基于web的游乐园员工管理系统sqlserver数据库创建语句 基于web的游乐园员工管理...
  • 一个简单的应用程序,用于打卡打卡 IT POS 系统,还显示需要员工注意的计算机列表。 这是俄克拉荷马州立大学 MSIS 4003 的一个课堂项目,它继续为 Geekabytes 开始的工作在这里 此应用程序也已扩展为包含一个 ...
  • 用户登录界面管理 科室管理 部门管理 员工管理 工资管理 请假管理 培训管理 员工打卡 免费赠送本源代码、数据库,请私信
  • } } /** * 修改员工信息 * * @param request * @param response * @throws IOException * @throws ServletException */ private void updateEmp(HttpServletRequest request, ...
  • java学生考勤管理系统

    2019-06-27 09:08:17
    学生考勤管理系统设计一个基于java与RFID的考勤系统。 应用背景:单位员工考勤等。 业务流程与需求分析: 考勤主体需求:记录员工何时到达,何时离开(甚至可以包括何处)。并可以按照要求,提供考勤的统计情况。 ...
  • 2, //当天值班员工(核心线程池大小) 5, //柜台总数:最大核心线程池大小 3, //临时工的超时等待:超时了没有人调用就会释放 TimeUnit.SECONDS, //超时等待单位 new LinkedBlockingDeque<>(3),//候客区...
  • java实现的签到系统

    热门讨论 2015-05-07 12:41:49
    java实现的简易签到系统,web版的,含数据库文件,可以直接运行
  • 源码: private List<View> getCandidateViews(String viewName, Locale locale, List<MediaType> requestedMediaTypes) throws Exception { List<View> candidateViews = new ArrayList(); if...
  • 剑指offer打卡19-翻转单词顺序列(java版)1. 考察知识点2. 题目3. 思路4. 代码实现 1. 考察知识点 字符串 2. 题目 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。同事Cat对...
  • 员工考勤信息系统 实现智能化的考勤功能 需求: 企业上班时间:9:00 企业下班时间:18:00 标准: 11:00>上班打卡时间>9:00: 迟到处理 上班打卡时间>11:00 旷工处理 16:00<下班打卡时间早退处理 下班打卡时间...
  • 员工考勤系统

    2021-08-28 10:13:52
    按钮:上班打卡(8点-8点半)、下班打卡(18点-18点30) 迟到扣50,早退扣100,旷工200 2、考勤列表 列表字段:姓名、打卡时间、打卡状态(正常、迟到、早退) 搜索条件:姓名、打卡状态 三:流程管理 1、流程管理 ...
  • java web jsp/servlet 考勤管理系统

    千次阅读 2020-07-02 08:58:18
    jsp/servlet 考勤管理系统 一、基础功能简介 登录、退出 管理员 个人信息管理 查看个人信息 个人密码修改 查看个人打卡记录【分页查询】 查看个人加班记录...
  • 类名:Text 概述:管理者登录、系统功能的实现、程序的运行在此类中进行 方法及说明: public static void main(String[] args) {} 五、系统实现 5.1 管理员登陆主界面 完整的源码和详细的文档,上传到了 WRITE-BUG...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,008
精华内容 403
关键字:

java员工打卡系统代码

java 订阅