周计划和详细 页面优化

This commit is contained in:
sk1551
2020-08-29 10:52:00 +08:00
parent 64281f5d49
commit 49b8014970
4 changed files with 14 additions and 9 deletions

View File

@ -3,6 +3,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.common.SchoolCommon;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -34,6 +35,8 @@ public class ByPlanweekitemController extends BaseController
{
@Autowired
private IByPlanweekitemService byPlanweekitemService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询周计划(家长和教育部门细化)列表
@ -79,6 +82,7 @@ public class ByPlanweekitemController extends BaseController
public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem)
{
byPlanweekitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byPlanweekitem.setDay("星期" + String.valueOf(schoolCommon.dateToWeek(byPlanweekitem.getActivitytime())));
return toAjax(byPlanweekitemService.insertByPlanweekitem(byPlanweekitem));
}
@ -91,6 +95,7 @@ public class ByPlanweekitemController extends BaseController
public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem)
{
byPlanweekitem.setUpdateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byPlanweekitem.setDay("星期" + String.valueOf(schoolCommon.dateToWeek(byPlanweekitem.getActivitytime())));
return toAjax(byPlanweekitemService.updateByPlanweekitem(byPlanweekitem));
}

View File

@ -18,7 +18,7 @@
</resultMap>
<sql id="selectByPlanweekitemVo">
select id, wid, activitytype, content, activitytime, createuserid, create_time, updateuserid, update_time from by_planweekitem
select id, wid, activitytype, content, activitytime, createuserid, create_time, updateuserid, update_time, day from by_planweekitem
</sql>
<select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult">