主题整合周计划及明细加入园历展示
This commit is contained in:
parent
a9e3c5209b
commit
e5bb4a5c8c
@ -100,6 +100,7 @@ export default {
|
|||||||
title: undefined,
|
title: undefined,
|
||||||
lecturer: undefined,
|
lecturer: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
|
status:"0",
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 8
|
pageSize: 8
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.project.benyi.domain.*;
|
import com.ruoyi.project.benyi.domain.*;
|
||||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService;
|
import com.ruoyi.project.benyi.service.*;
|
||||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
|
|
||||||
import com.ruoyi.project.common.SchoolCommon;
|
import com.ruoyi.project.common.SchoolCommon;
|
||||||
import com.ruoyi.project.system.domain.ByTeacherJbxx;
|
import com.ruoyi.project.system.domain.ByTeacherJbxx;
|
||||||
import com.ruoyi.project.system.domain.SysDictData;
|
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 org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
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.controller.BaseController;
|
||||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
@ -42,8 +40,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/benyi/calendar")
|
@RequestMapping("/benyi/calendar")
|
||||||
public class ByCalendarController extends BaseController
|
public class ByCalendarController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByCalendarService byCalendarService;
|
private IByCalendarService byCalendarService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -56,14 +53,19 @@ public class ByCalendarController extends BaseController
|
|||||||
private SchoolCommon schoolCommon;
|
private SchoolCommon schoolCommon;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByTeacherJbxxService byTeacherJbxxService;
|
private IByTeacherJbxxService byTeacherJbxxService;
|
||||||
|
@Autowired
|
||||||
|
private IByThemeWeekplanService byThemeWeekplanService;
|
||||||
|
@Autowired
|
||||||
|
private IByThemeWeekplanitemService byThemeWeekplanitemService;
|
||||||
|
@Autowired
|
||||||
|
private IByThemeActivityService byThemeActivityService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询园历管理(本一)列表
|
* 查询园历管理(本一)列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ByCalendar byCalendar)
|
public TableDataInfo list(ByCalendar byCalendar) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -75,8 +77,7 @@ public class ByCalendarController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
|
||||||
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
|
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public AjaxResult export(ByCalendar byCalendar)
|
public AjaxResult export(ByCalendar byCalendar) {
|
||||||
{
|
|
||||||
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
||||||
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
|
ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class);
|
||||||
return util.exportExcel(list, "calendar");
|
return util.exportExcel(list, "calendar");
|
||||||
@ -87,8 +88,7 @@ public class ByCalendarController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return AjaxResult.success(byCalendarService.selectByCalendarById(id));
|
return AjaxResult.success(byCalendarService.selectByCalendarById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,8 +98,7 @@ public class ByCalendarController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
|
||||||
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
|
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByCalendar byCalendar)
|
public AjaxResult add(@RequestBody ByCalendar byCalendar) {
|
||||||
{
|
|
||||||
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
byCalendar.setStylecolor("#eb2f96");
|
byCalendar.setStylecolor("#eb2f96");
|
||||||
byCalendar.setCreatetime(new Date());
|
byCalendar.setCreatetime(new Date());
|
||||||
@ -112,8 +111,7 @@ public class ByCalendarController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
|
||||||
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
|
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
|
public AjaxResult edit(@RequestBody ByCalendar byCalendar) {
|
||||||
{
|
|
||||||
return toAjax(byCalendarService.updateByCalendar(byCalendar));
|
return toAjax(byCalendarService.updateByCalendar(byCalendar));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,8 +121,7 @@ public class ByCalendarController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
|
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
|
||||||
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
|
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
|
return toAjax(byCalendarService.deleteByCalendarByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,9 +169,11 @@ public class ByCalendarController extends BaseController
|
|||||||
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
|
// listvi.addAll(getbyteacherBiths((long)207,formatter,hashMap));
|
||||||
|
|
||||||
//根据不同的班级记载班级园历
|
//根据不同的班级记载班级园历
|
||||||
if (schoolCommon.getClassId()!=""){
|
if (!schoolCommon.isStringEmpty(schoolCommon.getClassId())) {
|
||||||
//根据不同的班级加载班级园历
|
//根据不同的班级加载班级园历
|
||||||
listvi.addAll(getbyclasses(schoolCommon.getClassId(), formatter, hashMap));
|
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;
|
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<>();
|
List<ByCalendarShow> listvi = new ArrayList<>();
|
||||||
|
|
||||||
BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass();
|
BySchoolcalendarClass bySchoolcalendarClass = new BySchoolcalendarClass();
|
||||||
//设置班级
|
//设置班级
|
||||||
bySchoolcalendarClass.setClassid(classlId);
|
bySchoolcalendarClass.setClassid(classId);
|
||||||
List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
List<BySchoolcalendarClass> bySchoolcalendarClassList = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||||
if (bySchoolcalendarClassList.size() > 0) {
|
if (bySchoolcalendarClassList.size() > 0) {
|
||||||
for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) {
|
for (BySchoolcalendarClass bscc : bySchoolcalendarClassList) {
|
||||||
@ -287,6 +287,60 @@ public class ByCalendarController extends BaseController
|
|||||||
listvi.add(by);
|
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;
|
return listvi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user