/** * 初始化 * * @return */ public String init() { // 检查action传递过来的systemID合法性 if (form == null || StringUtil.isNullOrEmpty(form.getSystemID())) { return Action.ERROR; } String startDate = DateUtil.getDateOfXdaysAgo(1); String lidu = Constants.DAILY; int systemID = form.getSystemIDValue(); form.setStartTime(startDate); form.setLidu(lidu); ColorosDTO dto = new ColorosDTO(); dto.setStartDate(DateUtil.parseDate(startDate, "yyyy-MM-dd")); dto.setLidu(lidu); dto.setSystemID(systemID); versionactiveList = service.getVersionactiveList(dto); ServletActionContext.getRequest() .getSession() .setAttribute(Constants.NEARME_SESSION_REPROT_DATA, versionactiveList); LogUtil.log(dto, TAG); return Action.SUCCESS; }
public String init() { String startDate = DateUtil.getDateOfXdaysAgo(30); String endDate = DateUtil.getToday(); form = new ZjbForm(); form.setStartTime(startDate); form.setEndTime(endDate); form.setLidu(Constants.DAILY); ZjbDTO dto = new ZjbDTO(); dto.setStartDate(DateUtil.parseDate(startDate, "yyyy-MM-dd")); dto.setEndDate(DateUtil.parseDate(endDate, "yyyy-MM-dd")); dto.setLidu(form.getLidu()); channelserviceList = service.getChannelserviceList(dto); ServletActionContext.getRequest() .getSession() .setAttribute(Constants.NEARME_SESSION_REPROT_DATA, channelserviceList); LogUtil.log(dto, TAG); return Action.SUCCESS; }
/** 初始化日使用时长 */ private void initUsetime() { String startDate = DateUtil.getDateOfXdaysAgo(1); formusetime.setStartTime(startDate); formusetime.setSystemID(form.getSystemID()); BaseDTO dto = new BaseDTO(); dto.setStartDate(DateUtil.parseDate(startDate, "yyyy-MM-dd")); dto.setSystemID(formusetime.getSystemIDValue()); List<ColumnValueEntity> list = service.getUseoftenUsetimeList(dto); setUsetimeColumn(); usetimeEntity.setValueList(list); ServletActionContext.getRequest() .getSession() .setAttribute(Constants.NEARME_SESSION_REPROT_DATA_2, usetimeEntity); LogUtil.log(dto, "使用频率时长分析"); // log记录查询 }