主题整合学期月计划(明细)

This commit is contained in:
paidaxing444
2020-08-25 17:34:44 +08:00
parent ec500c38ef
commit e47e97b89d
20 changed files with 1124 additions and 5 deletions

View File

@ -113,4 +113,14 @@ public class ByThemeActivityController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeActivityService.deleteByThemeActivityByIds(ids));
}
/**
* 查询主题整合活动列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:list')"+ "||@ss.hasPermi('benyi:thememonthplan:list')")
@PostMapping("/listbythemeid/{ids}")
public TableDataInfo listbythemeid(@PathVariable Long[] ids) {
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityByThemeIds(ids);
return getDataTable(list);
}
}

View File

@ -132,7 +132,8 @@ public class ByThemeMonthplanController extends BaseController {
byThemeMonthplan.setClassid(classId);
byThemeMonthplan.setThemes(strThemeIds);//主题id
byThemeMonthplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")");
return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan));
} else {
return AjaxResult.error("当前用户非幼儿园,无法创建月计划");

View File

@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -72,6 +73,7 @@ public class ByThemeTermplanitemController extends BaseController {
@Log(title = "主题整合学期计划明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeTermplanitem byThemeTermplanitem) {
byThemeTermplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeTermplanitemService.insertByThemeTermplanitem(byThemeTermplanitem));
}

View File

@ -0,0 +1,111 @@
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;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
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.domain.ByThemeWeekplan;
import com.ruoyi.project.benyi.service.IByThemeWeekplanService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 主题整合周计划Controller
*
* @author tsbz
* @date 2020-08-25
*/
@RestController
@RequestMapping("/benyi/themeweekplan")
public class ByThemeWeekplanController extends BaseController
{
@Autowired
private IByThemeWeekplanService byThemeWeekplanService;
@Autowired
private SchoolCommon schoolCommon;
/**
* 查询主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeWeekplan byThemeWeekplan)
{
startPage();
List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
return getDataTable(list);
}
/**
* 导出主题整合周计划列表
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')")
@Log(title = "主题整合周计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeWeekplan byThemeWeekplan)
{
List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan);
ExcelUtil<ByThemeWeekplan> util = new ExcelUtil<ByThemeWeekplan>(ByThemeWeekplan.class);
return util.exportExcel(list, "weekplan");
}
/**
* 获取主题整合周计划详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(byThemeWeekplanService.selectByThemeWeekplanById(id));
}
/**
* 新增主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')")
@Log(title = "主题整合周计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeWeekplan byThemeWeekplan)
{
String uuid=schoolCommon.getUuid();
byThemeWeekplan.setId(uuid);
byThemeWeekplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan));
}
/**
* 修改主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')")
@Log(title = "主题整合周计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeWeekplan byThemeWeekplan)
{
return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan));
}
/**
* 删除主题整合周计划
*/
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:remove')")
@Log(title = "主题整合周计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids));
}
}

View File

@ -0,0 +1,147 @@
package com.ruoyi.project.benyi.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 主题整合周计划对象 by_theme_weekplan
*
* @author tsbz
* @date 2020-08-25
*/
public class ByThemeWeekplan extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String id;
/**
* 所属月计划
*/
@Excel(name = "所属月计划")
private String mpid;
/**
* 周次
*/
@Excel(name = "周次")
private Long zc;
/**
* 开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date starttime;
/**
* 结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endtime;
/**
* 活动id
*/
@Excel(name = "活动id")
private String activityid;
/**
* 家长支持
*/
@Excel(name = "家长支持")
private String jzzc;
/**
* 创建人
*/
@Excel(name = "创建人")
private Long createuserid;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setMpid(String mpid) {
this.mpid = mpid;
}
public String getMpid() {
return mpid;
}
public void setZc(Long zc) {
this.zc = zc;
}
public Long getZc() {
return zc;
}
public void setStarttime(Date starttime) {
this.starttime = starttime;
}
public Date getStarttime() {
return starttime;
}
public void setEndtime(Date endtime) {
this.endtime = endtime;
}
public Date getEndtime() {
return endtime;
}
public void setActivityid(String activityid) {
this.activityid = activityid;
}
public String getActivityid() {
return activityid;
}
public void setJzzc(String jzzc) {
this.jzzc = jzzc;
}
public String getJzzc() {
return jzzc;
}
public void setCreateuserid(Long createuserid) {
this.createuserid = createuserid;
}
public Long getCreateuserid() {
return createuserid;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("mpid", getMpid())
.append("zc", getZc())
.append("starttime", getStarttime())
.append("endtime", getEndtime())
.append("activityid", getActivityid())
.append("jzzc", getJzzc())
.append("createuserid", getCreateuserid())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -58,4 +58,12 @@ public interface ByThemeActivityMapper {
* @return 结果
*/
public int deleteByThemeActivityByIds(Long[] ids);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
/**
* 主题整合周计划Mapper接口
*
* @author tsbz
* @date 2020-08-25
*/
public interface ByThemeWeekplanMapper {
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
public ByThemeWeekplan selectByThemeWeekplanById(String id);
/**
* 查询主题整合周计划列表
*
* @param byThemeWeekplan 主题整合周计划
* @return 主题整合周计划集合
*/
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan);
/**
* 新增主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 修改主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 删除主题整合周计划
*
* @param id 主题整合周计划ID
* @return 结果
*/
public int deleteByThemeWeekplanById(String id);
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeWeekplanByIds(String[] ids);
}

View File

@ -58,4 +58,12 @@ public interface IByThemeActivityService {
* @return 结果
*/
public int deleteByThemeActivityById(Long id);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
/**
* 主题整合周计划Service接口
*
* @author tsbz
* @date 2020-08-25
*/
public interface IByThemeWeekplanService {
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
public ByThemeWeekplan selectByThemeWeekplanById(String id);
/**
* 查询主题整合周计划列表
*
* @param byThemeWeekplan 主题整合周计划
* @return 主题整合周计划集合
*/
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan);
/**
* 新增主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 修改主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan);
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的主题整合周计划ID
* @return 结果
*/
public int deleteByThemeWeekplanByIds(String[] ids);
/**
* 删除主题整合周计划信息
*
* @param id 主题整合周计划ID
* @return 结果
*/
public int deleteByThemeWeekplanById(String id);
}

View File

@ -86,4 +86,15 @@ public class ByThemeActivityServiceImpl implements IByThemeActivityService {
public int deleteByThemeActivityById(Long id) {
return byThemeActivityMapper.deleteByThemeActivityById(id);
}
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
@Override
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids){
return byThemeActivityMapper.selectByThemeActivityByThemeIds(ids);
}
}

View File

@ -0,0 +1,89 @@
package com.ruoyi.project.benyi.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByThemeWeekplanMapper;
import com.ruoyi.project.benyi.domain.ByThemeWeekplan;
import com.ruoyi.project.benyi.service.IByThemeWeekplanService;
/**
* 主题整合周计划Service业务层处理
*
* @author tsbz
* @date 2020-08-25
*/
@Service
public class ByThemeWeekplanServiceImpl implements IByThemeWeekplanService {
@Autowired
private ByThemeWeekplanMapper byThemeWeekplanMapper;
/**
* 查询主题整合周计划
*
* @param id 主题整合周计划ID
* @return 主题整合周计划
*/
@Override
public ByThemeWeekplan selectByThemeWeekplanById(String id) {
return byThemeWeekplanMapper.selectByThemeWeekplanById(id);
}
/**
* 查询主题整合周计划列表
*
* @param byThemeWeekplan 主题整合周计划
* @return 主题整合周计划
*/
@Override
public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan) {
return byThemeWeekplanMapper.selectByThemeWeekplanList(byThemeWeekplan);
}
/**
* 新增主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
@Override
public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan) {
byThemeWeekplan.setCreateTime(DateUtils.getNowDate());
return byThemeWeekplanMapper.insertByThemeWeekplan(byThemeWeekplan);
}
/**
* 修改主题整合周计划
*
* @param byThemeWeekplan 主题整合周计划
* @return 结果
*/
@Override
public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan) {
return byThemeWeekplanMapper.updateByThemeWeekplan(byThemeWeekplan);
}
/**
* 批量删除主题整合周计划
*
* @param ids 需要删除的主题整合周计划ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanByIds(String[] ids) {
return byThemeWeekplanMapper.deleteByThemeWeekplanByIds(ids);
}
/**
* 删除主题整合周计划信息
*
* @param id 主题整合周计划ID
* @return 结果
*/
@Override
public int deleteByThemeWeekplanById(String id) {
return byThemeWeekplanMapper.deleteByThemeWeekplanById(id);
}
}

View File

@ -108,4 +108,13 @@
</foreach>
</delete>
<select id="selectByThemeActivityByThemeIds" parameterType="String" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/>
where themeid in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
order by themeid,sort
</select>
</mapper>

View File

@ -47,6 +47,7 @@
<if test="spyj != null and spyj != ''"> and spyj = #{spyj}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
order by month desc
</select>
<select id="selectByThemeMonthplanById" parameterType="String" resultMap="ByThemeMonthplanResult">

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeWeekplanMapper">
<resultMap type="ByThemeWeekplan" id="ByThemeWeekplanResult">
<result property="id" column="id"/>
<result property="mpid" column="mpid"/>
<result property="zc" column="zc"/>
<result property="starttime" column="starttime"/>
<result property="endtime" column="endtime"/>
<result property="activityid" column="activityid"/>
<result property="jzzc" column="jzzc"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByThemeWeekplanVo">
select id, mpid, zc, starttime, endtime, activityid, jzzc, createuserid, create_time from by_theme_weekplan
</sql>
<select id="selectByThemeWeekplanList" parameterType="ByThemeWeekplan" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
<where>
<if test="mpid != null and mpid != ''">and mpid = #{mpid}</if>
<if test="zc != null ">and zc = #{zc}</if>
<if test="starttime != null ">and starttime = #{starttime}</if>
<if test="endtime != null ">and endtime = #{endtime}</if>
<if test="activityid != null and activityid != ''">and activityid = #{activityid}</if>
<if test="jzzc != null and jzzc != ''">and jzzc = #{jzzc}</if>
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
</where>
order by zc
</select>
<select id="selectByThemeWeekplanById" parameterType="String" resultMap="ByThemeWeekplanResult">
<include refid="selectByThemeWeekplanVo"/>
where id = #{id}
</select>
<insert id="insertByThemeWeekplan" parameterType="ByThemeWeekplan">
insert into by_theme_weekplan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="mpid != null and mpid != ''">mpid,</if>
<if test="zc != null ">zc,</if>
<if test="starttime != null ">starttime,</if>
<if test="endtime != null ">endtime,</if>
<if test="activityid != null and activityid != ''">activityid,</if>
<if test="jzzc != null and jzzc != ''">jzzc,</if>
<if test="createuserid != null ">createuserid,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="mpid != null and mpid != ''">#{mpid},</if>
<if test="zc != null ">#{zc},</if>
<if test="starttime != null ">#{starttime},</if>
<if test="endtime != null ">#{endtime},</if>
<if test="activityid != null and activityid != ''">#{activityid},</if>
<if test="jzzc != null and jzzc != ''">#{jzzc},</if>
<if test="createuserid != null ">#{createuserid},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByThemeWeekplan" parameterType="ByThemeWeekplan">
update by_theme_weekplan
<trim prefix="SET" suffixOverrides=",">
<if test="mpid != null and mpid != ''">mpid = #{mpid},</if>
<if test="zc != null ">zc = #{zc},</if>
<if test="starttime != null ">starttime = #{starttime},</if>
<if test="endtime != null ">endtime = #{endtime},</if>
<if test="activityid != null and activityid != ''">activityid = #{activityid},</if>
<if test="jzzc != null and jzzc != ''">jzzc = #{jzzc},</if>
<if test="createuserid != null ">createuserid = #{createuserid},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeWeekplanById" parameterType="String">
delete from by_theme_weekplan where id = #{id}
</delete>
<delete id="deleteByThemeWeekplanByIds" parameterType="String">
delete from by_theme_weekplan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>