@Override
public List<Map<String, Object>> getPatrolStatistics(String year) {
if (!year.isEmpty()){
return fxIncidentMapper.getPatrolStatistics(year);
}
SimpleDateFormat format = new SimpleDateFormat("yyyy");
Calendar c = Calendar.getInstance();
c.setTime(new Date());
Date m3 = c.getTime();
String mon3 = format.format(m3);
return fxIncidentMapper.getPatrolStatistics(mon3);
}
只输出当前时间的年份,并转换成String类型返回
最新推荐文章于 2021-06-24 17:28:43 发布