增加了日历显示组件

This commit is contained in:
muqing
2020-05-10 22:56:04 +08:00
parent d686674ddc
commit 19adac723d
5 changed files with 379 additions and 110 deletions

View File

@ -1,6 +1,10 @@
package com.ruoyi.project.benyi.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByCalendarShow;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -100,4 +104,34 @@ public class ByCalendarController extends BaseController
{
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
}
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
@GetMapping("/getAllSchoolCalendars")
public AjaxResult getAllSchoolCalendars(ByCalendar byCalendar) {
List<ByCalendarShow> listvi= new ArrayList<>();
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//加载本一园历
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
for (ByCalendar calendar:list) {
ByCalendarShow by = new ByCalendarShow();
by.setId(calendar.getId());
by.setTitle(calendar.getName());
by.setStart(formatter.format(calendar.getActivitytime()));
by.setEnd(formatter.format(calendar.getActivityendtime()));
by.setColor(calendar.getStylecolor());
listvi.add(by);
}
//加载幼儿园园历
//接在班级园历
AjaxResult ajax = AjaxResult.success();
ajax.put("calendarData", listvi);
return ajax;
}
}

View File

@ -0,0 +1,54 @@
package com.ruoyi.project.benyi.domain;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import java.util.Date;
public class ByCalendarShow {
private Long id;
private String title;
private String start;
private String end;
private String color;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}