20200523-zlp-1
园历样式
This commit is contained in:
@ -7,9 +7,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.framework.security.LoginUser;
|
||||
import com.ruoyi.framework.security.service.TokenService;
|
||||
import com.ruoyi.project.benyi.domain.*;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
|
||||
@ -63,7 +60,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 查询园历管理(本一)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:list')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByCalendar byCalendar)
|
||||
{
|
||||
@ -75,7 +72,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 导出园历管理(本一)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:export')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByCalendar byCalendar)
|
||||
@ -88,7 +85,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 获取园历管理(本一)详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:query')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -98,18 +95,21 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 新增园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:add')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByCalendar byCalendar)
|
||||
{
|
||||
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
byCalendar.setStylecolor("red");
|
||||
byCalendar.setCreatetime(new Date());
|
||||
return toAjax(byCalendarService.insertByCalendar(byCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:edit')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
|
||||
@ -120,7 +120,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 删除园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:remove')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@ -131,7 +131,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 园历展示(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
|
||||
@GetMapping("/getAllSchoolCalendars")
|
||||
public AjaxResult getAllSchoolCalendars(ByCalendar byCalendar) {
|
||||
//将类型颜色样式加载到字典
|
||||
@ -151,6 +151,7 @@ public class ByCalendarController extends BaseController
|
||||
ByCalendarShow by = new ByCalendarShow();
|
||||
by.setId(calendar.getId());
|
||||
by.setTitle(calendar.getName());
|
||||
System.out.println("title:"+calendar.getName());
|
||||
by.setStart(formatter.format(calendar.getActivitytime()));
|
||||
by.setEnd(formatter.format(calendar.getActivityendtime()));
|
||||
by.setColor(hashMap.get(calendar.getType()));
|
||||
@ -242,7 +243,7 @@ public class ByCalendarController extends BaseController
|
||||
by.setStart(timefor);
|
||||
by.setEnd(timefor);
|
||||
//教师生日颜色
|
||||
by.setColor("aqua");
|
||||
by.setColor("#13c2c2");
|
||||
listvi.add(by);
|
||||
System.out.println("当前年工作日期timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-合同满年期限");
|
||||
}
|
||||
@ -257,7 +258,7 @@ public class ByCalendarController extends BaseController
|
||||
by.setStart(timefor);
|
||||
by.setEnd(timefor);
|
||||
//教师生日颜色
|
||||
by.setColor("aqua");
|
||||
by.setColor("#722ed1");
|
||||
listvi.add(by);
|
||||
System.out.println("当前年生日timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-生日");
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -53,10 +54,11 @@ public class BySchoolcalendarClassController extends BaseController
|
||||
startPage();
|
||||
bySchoolcalendarClass.setClassid(strClassId);
|
||||
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------分页"+list);
|
||||
//System.out.println("---------------------分页"+list);
|
||||
return getDataTable(list);
|
||||
}else{
|
||||
return null;
|
||||
List<BySchoolcalendarClass> list =new ArrayList<>();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -69,7 +71,7 @@ public class BySchoolcalendarClassController extends BaseController
|
||||
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass)
|
||||
{
|
||||
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------没有分页"+listAll);
|
||||
//System.out.println("---------------------没有分页"+listAll);
|
||||
return getDataTable(listAll);
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,7 @@ public class BySchoolcalendarController extends BaseController {
|
||||
//首先判断 当前用户是否为学校
|
||||
if (schoolCommon.isSchool()) {
|
||||
bySchoolcalendar.setCreatetime(new Date());
|
||||
//System.out.println("activitytime="+bySchoolcalendar.getActivitytime());
|
||||
String strXnxq = schoolCommon.getCurrentXnXq(bySchoolcalendar.getActivitytime());
|
||||
bySchoolcalendar.setXnxq(strXnxq);
|
||||
bySchoolcalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
|
@ -29,11 +29,11 @@ public class ByCalendar extends BaseEntity
|
||||
private String type;
|
||||
|
||||
/** 活动时间 */
|
||||
@Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activitytime;
|
||||
|
||||
/** 活动结束时间 */
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/** 活动样式颜色 */
|
||||
|
@ -61,7 +61,7 @@ public class BySchoolcalendar extends BaseEntity {
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ public class BySchoolcalendarClass extends BaseEntity
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user