public long getEndTime(Date beginTime,String spendTime){ long endTie = 0; if(spendTime.contains(".")){ long spendTimen = (long) (Double.parseDouble(spendTime)*1000*60*60); endTie = (beginTime.getTime()+spendTimen); }else{ long spendTimen = (long) (Integer.parseInt(spendTime)*1000*60*60); endTie = (beginTime.getTime()+spendTimen); } return endTie; }