Search in sources :

Example 1 with TbSysCalendarNote

use of com.netsteadfast.greenstep.po.hbm.TbSysCalendarNote in project bamboobsc by billchen198318.

the class SystemCalendarNoteHistoryAction method generateContent.

private void generateContent() throws ControllerException, AuthorityException, ServiceException, Exception {
    String date = this.getFields().get("date");
    if (!SimpleUtils.isDate(date)) {
        return;
    }
    date = date.replaceAll("/", "").replaceAll("-", "");
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("account", super.getAccountId());
    params.put("date", date);
    Map<String, String> orderParams = new LinkedHashMap<String, String>();
    orderParams.put("time", "ASC");
    List<TbSysCalendarNote> searchList = sysCalendarNoteService.findListByParams2(params, null, null, orderParams);
    if (searchList == null || searchList.size() < 1) {
        this.message = "";
        return;
    }
    StringBuilder sb = new StringBuilder();
    for (TbSysCalendarNote calendarNote : searchList) {
        calendarNote.setTitle(TemplateUtils.escapeHtml4TemplateHtmlContent(calendarNote.getTitle()));
        calendarNote.setNote(TemplateUtils.escapeHtml4TemplateHtmlContent(calendarNote.getNote()));
        TemplateResultObj result = TemplateUtils.getResult(TemplateCode.TPLMSG0001, calendarNote);
        sb.append(result.getContent());
    }
    this.message = sb.toString();
}
Also used : TbSysCalendarNote(com.netsteadfast.greenstep.po.hbm.TbSysCalendarNote) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) TemplateResultObj(com.netsteadfast.greenstep.model.TemplateResultObj) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

TemplateResultObj (com.netsteadfast.greenstep.model.TemplateResultObj)1 TbSysCalendarNote (com.netsteadfast.greenstep.po.hbm.TbSysCalendarNote)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1