/*** 获取前一天日期** @return*/public String getYesterday() {Calendar calendar = Calendar.getInstance();calendar.add(Calendar.DATE, -1); //得到前一天Date date = calendar.getTime();DateFormat df = new SimpleDateFormat("yyyy-MM-dd");return df.format(date);}/*** 获取当前日期** @return*/public String getCurrentDate() {LocalDateTime dateTime = LocalDateTime.now();DateTimeFormatter currentDate = DateTimeFormatter.ofPattern("yyyy-MM-dd");return dateTime.format(currentDate);}/*** 获取当前时间** @return*/public String getCurrentTime() {LocalDateTime dateTime = LocalDateTime.now();DateTimeFormatter currenTime = DateTimeFormatter.ofPattern("HH:mm:ss");return dateTime.format(currenTime);}
Hxprocesslog hxprocesslog = new Hxprocesslog();// Date tStartDate = new Date();// DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");// DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");// hxprocesslog.setMakedate(dateFormat.parse(dateFormat.format(tStartDate)));// hxprocesslog.setMaketime(timeFormat.format(tStartDate));// hxprocesslog.setModifytime(timeFormat.format(tStartDate));// hxprocesslog.setModifydate(dateFormat.parse(dateFormat.format(tStartDate)));