主题整合周计划及明细加入园历展示
This commit is contained in:
@ -100,6 +100,7 @@ export default {
|
||||
title: undefined,
|
||||
lecturer: undefined,
|
||||
type: undefined,
|
||||
status:"0",
|
||||
pageNum: 1,
|
||||
pageSize: 8
|
||||
}
|
||||
|
@ -8,8 +8,7 @@ import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.*;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
|
||||
import com.ruoyi.project.benyi.service.*;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import com.ruoyi.project.system.domain.ByTeacherJbxx;
|
||||
import com.ruoyi.project.system.domain.SysDictData;
|
||||
@ -28,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.service.IByCalendarService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
@ -42,8 +40,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/calendar")
|
||||
public class ByCalendarController extends BaseController
|
||||
{
|
||||
public class ByCalendarController extends BaseController {
|
||||
@Autowired
|
||||
private IByCalendarService byCalendarService;
|
||||
@Autowired
|
||||
@ -56,14 +53,19 @@ public class ByCalendarController extends BaseController
|
||||
private SchoolCommon schoolCommon;
|
||||
@Autowired
|
||||
private IByTeacherJbxxService byTeacherJbxxService;
|
||||
@Autowired
|
||||
private IByThemeWeekplanService byThemeWeekplanService;
|
||||
@Autowired
|
||||
private IByThemeWeekplanitemService byThemeWeekplanitemService;
|
||||
@Autowired
|
||||
private IByThemeActivityService byThemeActivityService;
|
||||
|
||||
/**
|
||||
* 查询园历管理(本一)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByCalendar byCalendar)
|
||||
{
|
||||
public TableDataInfo list(ByCalendar byCalendar) {
|
||||
startPage();
|
||||
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
||||
return getDataTable(list);
|
||||
@ -75,8 +77,7 @@ public class ByCalendarController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByCalendar byCalendar)
|
||||
{
|
||||
public AjaxResult export(ByCalendar byCalendar) {
|
||||
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
||||
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
|
||||
return util.exportExcel(list, "calendar");
|
||||
@ -87,8 +88,7 @@ public class ByCalendarController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(byCalendarService.selectByCalendarById(id));
|
||||
}
|
||||
|
||||
@ -98,8 +98,7 @@ public class ByCalendarController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByCalendar byCalendar)
|
||||
{
|
||||
public AjaxResult add(@RequestBody ByCalendar byCalendar) {
|
||||
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
byCalendar.setStylecolor("#eb2f96");
|
||||
byCalendar.setCreatetime(new Date());
|
||||
@ -112,8 +111,7 @@ public class ByCalendarController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody ByCalendar byCalendar) {
|
||||
return toAjax(byCalendarService.updateByCalendar(byCalendar));
|
||||
}
|
||||
|
||||
@ -123,8 +121,7 @@ public class ByCalendarController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
|
||||
}
|
||||
|
||||
@ -172,9 +169,11 @@ public class ByCalendarController extends BaseController
|
||||
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
|
||||
|
||||
//根据不同的班级记载班级园历
|
||||
if (schoolCommon.getClassId()!=""){
|
||||
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
||||
//根据不同的班级加载班级园历
|
||||
listvi.addAll(getbyclasses(schoolCommon.getClassId(), formatter, hashMap));
|
||||
//加载主题整合活动
|
||||
listvi.addAll(getbyclassthemes(schoolCommon.getClassId(), formatter, hashMap));
|
||||
//根据班级加载幼儿生日
|
||||
}
|
||||
|
||||
@ -266,15 +265,16 @@ public class ByCalendarController extends BaseController
|
||||
}
|
||||
return listvi;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据不同的班级加载班级园历
|
||||
*/
|
||||
private List<ByCalendarShow> getbyclasses(String classlId,SimpleDateFormat formatter,HashMap<String, String> hashMap){
|
||||
private List<ByCalendarShow> getbyclasses(String classId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
|
||||
List<ByCalendarShow> listvi = new ArrayList<>();
|
||||
|
||||
BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass();
|
||||
//设置班级
|
||||
bySchoolcalendarClass.setClassid(classlId);
|
||||
bySchoolcalendarClass.setClassid(classId);
|
||||
List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
if (bySchoolcalendarClassList.size() > 0) {
|
||||
for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) {
|
||||
@ -287,6 +287,60 @@ public class ByCalendarController extends BaseController
|
||||
listvi.add(by);
|
||||
}
|
||||
}
|
||||
|
||||
//班级课程
|
||||
|
||||
return listvi;
|
||||
}
|
||||
|
||||
//获取班级主题整合活动
|
||||
private List<ByCalendarShow> getbyclassthemes(String classId, SimpleDateFormat formatter, HashMap<String, String> hashMap) {
|
||||
|
||||
List<ByCalendarShow> listvi = new ArrayList<>();
|
||||
Long deptId = SecurityUtils.getLoginUser().getUser().getDept().getDeptId();
|
||||
ByThemeWeekplan byThemeWeekplan = new ByThemeWeekplan();
|
||||
byThemeWeekplan.setSchoolid(deptId);
|
||||
byThemeWeekplan.setClassid(classId);
|
||||
byThemeWeekplan.setStatus("2");
|
||||
//学年学期?
|
||||
|
||||
List<ByThemeWeekplan> listByThemeWeekplan = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
|
||||
if (listByThemeWeekplan != null && listByThemeWeekplan.size() > 0) {
|
||||
ByThemeWeekplanitem byThemeWeekplanitem = null;
|
||||
for (int i = 0; i < listByThemeWeekplan.size(); i++) {
|
||||
byThemeWeekplanitem = new ByThemeWeekplanitem();
|
||||
String wpId = listByThemeWeekplan.get(i).getId();
|
||||
|
||||
byThemeWeekplanitem.setWpid(wpId);
|
||||
List<ByThemeWeekplanitem> listByThemeWeekplanitem = byThemeWeekplanitemService.selectByThemeWeekplanitemList(byThemeWeekplanitem);
|
||||
if (listByThemeWeekplanitem != null && listByThemeWeekplanitem.size() > 0) {
|
||||
for (int j = 0; j < listByThemeWeekplanitem.size(); j++) {
|
||||
if (!schoolCommon.isStringEmpty(listByThemeWeekplanitem.get(j).getActivityid())) {
|
||||
ByCalendarShow by = new ByCalendarShow();
|
||||
by.setId(listByThemeWeekplanitem.get(j).getId());
|
||||
|
||||
String[] strArr = listByThemeWeekplanitem.get(j).getActivityid().split(";");
|
||||
String activityName = "";
|
||||
if (strArr.length > 0) {
|
||||
for (int g = 0; g < strArr.length; g++) {
|
||||
if (!schoolCommon.isStringEmpty(strArr[g])) {
|
||||
activityName = activityName + byThemeActivityService.selectByThemeActivityById(Long.valueOf(strArr[g])).getName() + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
by.setTitle("主题整合(" + activityName + ")");
|
||||
by.setStart(formatter.format(listByThemeWeekplanitem.get(j).getDaytime()));
|
||||
by.setEnd(formatter.format(listByThemeWeekplanitem.get(j).getDaytime()));
|
||||
by.setColor(hashMap.get("03"));
|
||||
listvi.add(by);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return listvi;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user