主题整合学期月计划(明细)
This commit is contained in:
		| @@ -1,15 +1,15 @@ | ||||
| package com.ruoyi.project.benyi.controller; | ||||
|  | ||||
| import java.text.ParseException; | ||||
| import java.text.SimpleDateFormat; | ||||
| import java.util.Date; | ||||
| import java.util.List; | ||||
|  | ||||
| import com.ruoyi.common.utils.SecurityUtils; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeTermplan; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeTermplanitem; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem; | ||||
| import com.ruoyi.project.benyi.service.IByThemeTermplanService; | ||||
| import com.ruoyi.project.benyi.service.IByThemeTermplanitemService; | ||||
| import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService; | ||||
| import com.ruoyi.project.common.SchoolCommon; | ||||
| import com.ruoyi.project.system.service.IByClassService; | ||||
| import org.springframework.security.access.prepost.PreAuthorize; | ||||
| @@ -50,6 +50,8 @@ public class ByThemeMonthplanController extends BaseController { | ||||
|     private IByThemeTermplanService byThemeTermplanService; | ||||
|     @Autowired | ||||
|     private IByThemeTermplanitemService byThemeTermplanitemService; | ||||
|     @Autowired | ||||
|     private IByThemeMonthplanitemService byThemeWeekplanService; | ||||
|  | ||||
|     /** | ||||
|      * 查询主题整合月计划列表 | ||||
| @@ -136,7 +138,7 @@ public class ByThemeMonthplanController extends BaseController { | ||||
|             byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")"); | ||||
|             return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan)); | ||||
|         } else { | ||||
|             return AjaxResult.error("当前用户非幼儿园,无法创建月计划"); | ||||
|             return AjaxResult.error("当前用户非幼儿园教师,无法创建月计划"); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -157,6 +159,28 @@ public class ByThemeMonthplanController extends BaseController { | ||||
|     @Log(title = "主题整合月计划", businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable String[] ids) { | ||||
|         //首先判断当前id下是否存在子目录 | ||||
|         for (int i = 0; i < ids.length; i++) { | ||||
|             ByThemeMonthplanitem byThemeMonthplanitem = new ByThemeMonthplanitem(); | ||||
|             byThemeMonthplanitem.setMpid(ids[i]); | ||||
|             List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem); | ||||
|             if (list != null && list.size() > 0) { | ||||
|                 return AjaxResult.error("选中的计划下存在子计划,无法删除"); | ||||
|             } | ||||
|         } | ||||
|         return toAjax(byThemeMonthplanService.deleteByThemeMonthplanByIds(ids)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 提交主题整合学期计划 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')") | ||||
|     @Log(title = "主题整合学期计划", businessType = BusinessType.UPDATE) | ||||
|     @PostMapping("/check/{id}") | ||||
|     public AjaxResult check(@PathVariable String id) { | ||||
|         ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan(); | ||||
|         byThemeMonthplan.setId(id); | ||||
|         byThemeMonthplan.setStatus("1"); | ||||
|         return toAjax(byThemeMonthplanService.updateByThemeMonthplan(byThemeMonthplan)); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -16,8 +16,8 @@ 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.project.benyi.domain.ByThemeMonthplanitem; | ||||
| import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService; | ||||
| import com.ruoyi.framework.web.controller.BaseController; | ||||
| import com.ruoyi.framework.web.domain.AjaxResult; | ||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | ||||
| @@ -30,11 +30,11 @@ import com.ruoyi.framework.web.page.TableDataInfo; | ||||
|  * @date 2020-08-25 | ||||
|  */ | ||||
| @RestController | ||||
| @RequestMapping("/benyi/themeweekplan") | ||||
| public class ByThemeWeekplanController extends BaseController | ||||
| @RequestMapping("/benyi/thememonthplanitem") | ||||
| public class ByThemeMonthplanitemController extends BaseController | ||||
| { | ||||
|     @Autowired | ||||
|     private IByThemeWeekplanService byThemeWeekplanService; | ||||
|     private IByThemeMonthplanitemService byThemeWeekplanService; | ||||
|     @Autowired | ||||
|     private SchoolCommon schoolCommon; | ||||
| 
 | ||||
| @@ -43,10 +43,10 @@ public class ByThemeWeekplanController extends BaseController | ||||
|  */ | ||||
| @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:list')") | ||||
| @GetMapping("/list") | ||||
|         public TableDataInfo list(ByThemeWeekplan byThemeWeekplan) | ||||
|         public TableDataInfo list(ByThemeMonthplanitem byThemeMonthplanitem) | ||||
|     { | ||||
|         startPage(); | ||||
|         List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan); | ||||
|         List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem); | ||||
|         return getDataTable(list); | ||||
|     } | ||||
|      | ||||
| @@ -56,10 +56,10 @@ public class ByThemeWeekplanController extends BaseController | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:export')") | ||||
|     @Log(title = "主题整合周计划", businessType = BusinessType.EXPORT) | ||||
|     @GetMapping("/export") | ||||
|     public AjaxResult export(ByThemeWeekplan byThemeWeekplan) | ||||
|     public AjaxResult export(ByThemeMonthplanitem byThemeMonthplanitem) | ||||
|     { | ||||
|         List<ByThemeWeekplan> list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan); | ||||
|         ExcelUtil<ByThemeWeekplan> util = new ExcelUtil<ByThemeWeekplan>(ByThemeWeekplan.class); | ||||
|         List<ByThemeMonthplanitem> list = byThemeWeekplanService.selectByThemeMonthplanitemList(byThemeMonthplanitem); | ||||
|         ExcelUtil<ByThemeMonthplanitem> util = new ExcelUtil<ByThemeMonthplanitem>(ByThemeMonthplanitem.class); | ||||
|         return util.exportExcel(list, "weekplan"); | ||||
|     } | ||||
| 
 | ||||
| @@ -70,7 +70,7 @@ public class ByThemeWeekplanController extends BaseController | ||||
|     @GetMapping(value = "/{id}") | ||||
|     public AjaxResult getInfo(@PathVariable("id") String id) | ||||
|     { | ||||
|         return AjaxResult.success(byThemeWeekplanService.selectByThemeWeekplanById(id)); | ||||
|         return AjaxResult.success(byThemeWeekplanService.selectByThemeMonthplanitemById(id)); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
| @@ -79,12 +79,12 @@ public class ByThemeWeekplanController extends BaseController | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:add')") | ||||
|     @Log(title = "主题整合周计划", businessType = BusinessType.INSERT) | ||||
|     @PostMapping | ||||
|     public AjaxResult add(@RequestBody ByThemeWeekplan byThemeWeekplan) | ||||
|     public AjaxResult add(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) | ||||
|     { | ||||
|         String uuid=schoolCommon.getUuid(); | ||||
|         byThemeWeekplan.setId(uuid); | ||||
|         byThemeWeekplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); | ||||
|         return toAjax(byThemeWeekplanService.insertByThemeWeekplan(byThemeWeekplan)); | ||||
|         byThemeMonthplanitem.setId(uuid); | ||||
|         byThemeMonthplanitem.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); | ||||
|         return toAjax(byThemeWeekplanService.insertByThemeMonthplanitem(byThemeMonthplanitem)); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
| @@ -93,9 +93,9 @@ public class ByThemeWeekplanController extends BaseController | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:edit')") | ||||
|     @Log(title = "主题整合周计划", businessType = BusinessType.UPDATE) | ||||
|     @PutMapping | ||||
|     public AjaxResult edit(@RequestBody ByThemeWeekplan byThemeWeekplan) | ||||
|     public AjaxResult edit(@RequestBody ByThemeMonthplanitem byThemeMonthplanitem) | ||||
|     { | ||||
|         return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan)); | ||||
|         return toAjax(byThemeWeekplanService.updateByThemeMonthplanitem(byThemeMonthplanitem)); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
| @@ -106,6 +106,6 @@ public class ByThemeWeekplanController extends BaseController | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable String[] ids) | ||||
|     { | ||||
|         return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids)); | ||||
|         return toAjax(byThemeWeekplanService.deleteByThemeMonthplanitemByIds(ids)); | ||||
|     } | ||||
| } | ||||
| @@ -118,7 +118,7 @@ public class ByThemeTermplanController extends BaseController { | ||||
|  | ||||
|             return toAjax(byThemeTermplanService.insertByThemeTermplan(byThemeTermplan)); | ||||
|         } else { | ||||
|             return AjaxResult.error("当前用户非幼儿园,无法添加幼儿"); | ||||
|             return AjaxResult.error("当前用户非幼儿园教师,无法创建计划"); | ||||
|         } | ||||
|  | ||||
|     } | ||||
| @@ -140,6 +140,15 @@ public class ByThemeTermplanController extends BaseController { | ||||
|     @Log(title = "主题整合学期计划", businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable String[] ids) { | ||||
|         //首先判断当前id下是否存在子目录 | ||||
|         for (int i = 0; i < ids.length; i++) { | ||||
|             ByThemeTermplanitem byThemeTermplanitem = new ByThemeTermplanitem(); | ||||
|             byThemeTermplanitem.setTpid(ids[i]); | ||||
|             List<ByThemeTermplanitem> list = byThemeTermplanitemService.selectByThemeTermplanitemList(byThemeTermplanitem); | ||||
|             if (list != null && list.size() > 0) { | ||||
|                 return AjaxResult.error("选中的计划下存在子计划,无法删除"); | ||||
|             } | ||||
|         } | ||||
|         return toAjax(byThemeTermplanService.deleteByThemeTermplanByIds(ids)); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -14,7 +14,7 @@ import com.ruoyi.framework.web.domain.BaseEntity; | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-25 | ||||
|  */ | ||||
| public class ByThemeWeekplan extends BaseEntity { | ||||
| public class ByThemeMonthplanitem extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
|     /** | ||||
| @@ -2,7 +2,7 @@ package com.ruoyi.project.benyi.mapper; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| import com.ruoyi.project.benyi.domain.ByThemeWeekplan; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem; | ||||
| 
 | ||||
| /** | ||||
|  * 主题整合周计划Mapper接口 | ||||
| @@ -10,38 +10,38 @@ import com.ruoyi.project.benyi.domain.ByThemeWeekplan; | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-25 | ||||
|  */ | ||||
| public interface ByThemeWeekplanMapper { | ||||
| public interface ByThemeMonthplanitemMapper { | ||||
|     /** | ||||
|      * 查询主题整合周计划 | ||||
|      * | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 主题整合周计划 | ||||
|      */ | ||||
|     public ByThemeWeekplan selectByThemeWeekplanById(String id); | ||||
|     public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id); | ||||
| 
 | ||||
|     /** | ||||
|      * 查询主题整合周计划列表 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 主题整合周计划集合 | ||||
|      */ | ||||
|     public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan); | ||||
|     public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 新增主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan); | ||||
|     public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 修改主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan); | ||||
|     public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 删除主题整合周计划 | ||||
| @@ -49,7 +49,7 @@ public interface ByThemeWeekplanMapper { | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByThemeWeekplanById(String id); | ||||
|     public int deleteByThemeMonthplanitemById(String id); | ||||
| 
 | ||||
|     /** | ||||
|      * 批量删除主题整合周计划 | ||||
| @@ -57,5 +57,5 @@ public interface ByThemeWeekplanMapper { | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByThemeWeekplanByIds(String[] ids); | ||||
|     public int deleteByThemeMonthplanitemByIds(String[] ids); | ||||
| } | ||||
| @@ -2,7 +2,7 @@ package com.ruoyi.project.benyi.service; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| import com.ruoyi.project.benyi.domain.ByThemeWeekplan; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem; | ||||
| 
 | ||||
| /** | ||||
|  * 主题整合周计划Service接口 | ||||
| @@ -10,38 +10,38 @@ import com.ruoyi.project.benyi.domain.ByThemeWeekplan; | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-25 | ||||
|  */ | ||||
| public interface IByThemeWeekplanService { | ||||
| public interface IByThemeMonthplanitemService { | ||||
|     /** | ||||
|      * 查询主题整合周计划 | ||||
|      * | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 主题整合周计划 | ||||
|      */ | ||||
|     public ByThemeWeekplan selectByThemeWeekplanById(String id); | ||||
|     public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id); | ||||
| 
 | ||||
|     /** | ||||
|      * 查询主题整合周计划列表 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 主题整合周计划集合 | ||||
|      */ | ||||
|     public List<ByThemeWeekplan> selectByThemeWeekplanList(ByThemeWeekplan byThemeWeekplan); | ||||
|     public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 新增主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertByThemeWeekplan(ByThemeWeekplan byThemeWeekplan); | ||||
|     public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 修改主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeWeekplan 主题整合周计划 | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateByThemeWeekplan(ByThemeWeekplan byThemeWeekplan); | ||||
|     public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem); | ||||
| 
 | ||||
|     /** | ||||
|      * 批量删除主题整合周计划 | ||||
| @@ -49,7 +49,7 @@ public interface IByThemeWeekplanService { | ||||
|      * @param ids 需要删除的主题整合周计划ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByThemeWeekplanByIds(String[] ids); | ||||
|     public int deleteByThemeMonthplanitemByIds(String[] ids); | ||||
| 
 | ||||
|     /** | ||||
|      * 删除主题整合周计划信息 | ||||
| @@ -57,5 +57,5 @@ public interface IByThemeWeekplanService { | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByThemeWeekplanById(String id); | ||||
|     public int deleteByThemeMonthplanitemById(String id); | ||||
| } | ||||
| @@ -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.ByThemeMonthplanitemMapper; | ||||
| import com.ruoyi.project.benyi.domain.ByThemeMonthplanitem; | ||||
| import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService; | ||||
|  | ||||
| /** | ||||
|  * 主题整合周计划Service业务层处理 | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-25 | ||||
|  */ | ||||
| @Service | ||||
| public class ByThemeMonthplanitemServiceImpl implements IByThemeMonthplanitemService { | ||||
|     @Autowired | ||||
|     private ByThemeMonthplanitemMapper byThemeMonthplanitemMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询主题整合周计划 | ||||
|      * | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 主题整合周计划 | ||||
|      */ | ||||
|     @Override | ||||
|     public ByThemeMonthplanitem selectByThemeMonthplanitemById(String id) { | ||||
|         return byThemeMonthplanitemMapper.selectByThemeMonthplanitemById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询主题整合周计划列表 | ||||
|      * | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 主题整合周计划 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<ByThemeMonthplanitem> selectByThemeMonthplanitemList(ByThemeMonthplanitem byThemeMonthplanitem) { | ||||
|         return byThemeMonthplanitemMapper.selectByThemeMonthplanitemList(byThemeMonthplanitem); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem) { | ||||
|         byThemeMonthplanitem.setCreateTime(DateUtils.getNowDate()); | ||||
|         return byThemeMonthplanitemMapper.insertByThemeMonthplanitem(byThemeMonthplanitem); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改主题整合周计划 | ||||
|      * | ||||
|      * @param byThemeMonthplanitem 主题整合周计划 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateByThemeMonthplanitem(ByThemeMonthplanitem byThemeMonthplanitem) { | ||||
|         return byThemeMonthplanitemMapper.updateByThemeMonthplanitem(byThemeMonthplanitem); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除主题整合周计划 | ||||
|      * | ||||
|      * @param ids 需要删除的主题整合周计划ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByThemeMonthplanitemByIds(String[] ids) { | ||||
|         return byThemeMonthplanitemMapper.deleteByThemeMonthplanitemByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除主题整合周计划信息 | ||||
|      * | ||||
|      * @param id 主题整合周计划ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByThemeMonthplanitemById(String id) { | ||||
|         return byThemeMonthplanitemMapper.deleteByThemeMonthplanitemById(id); | ||||
|     } | ||||
| } | ||||
| @@ -1,89 +0,0 @@ | ||||
| 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); | ||||
|     } | ||||
| } | ||||
| @@ -46,7 +46,16 @@ public class ByClassController extends BaseController { | ||||
|     @GetMapping("/list") | ||||
|     public TableDataInfo list(ByClass byClass) { | ||||
|         startPage(); | ||||
|         List<ByClass> list = byClassService.selectByClassList(byClass); | ||||
|         List<ByClass> list = null; | ||||
|         String classId = schoolCommon.getClassId(); | ||||
|         //如果是幼儿园教师 只显示当前班级 | ||||
|         if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { | ||||
|             byClass.setBjbh(classId); | ||||
|             list = byClassService.selectByClassList(byClass); | ||||
|         }else{ | ||||
|             list = byClassService.selectByClassList(byClass); | ||||
|         } | ||||
|  | ||||
|         return getDataTable(list); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -2,9 +2,9 @@ | ||||
| <!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"> | ||||
| <mapper namespace="com.ruoyi.project.benyi.mapper.ByThemeMonthplanitemMapper"> | ||||
| 
 | ||||
|     <resultMap type="ByThemeWeekplan" id="ByThemeWeekplanResult"> | ||||
|     <resultMap type="ByThemeMonthplanitem" id="ByThemeMonthplanitemResult"> | ||||
|         <result property="id" column="id"/> | ||||
|         <result property="mpid" column="mpid"/> | ||||
|         <result property="zc" column="zc"/> | ||||
| @@ -16,12 +16,12 @@ | ||||
|         <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 id="selectByThemeMonthplanitemVo"> | ||||
|         select id, mpid, zc, starttime, endtime, activityid, jzzc, createuserid, create_time from by_theme_monthplanitem | ||||
|     </sql> | ||||
| 
 | ||||
|     <select id="selectByThemeWeekplanList" parameterType="ByThemeWeekplan" resultMap="ByThemeWeekplanResult"> | ||||
|         <include refid="selectByThemeWeekplanVo"/> | ||||
|     <select id="selectByThemeMonthplanitemList" parameterType="ByThemeMonthplanitem" resultMap="ByThemeMonthplanitemResult"> | ||||
|         <include refid="selectByThemeMonthplanitemVo"/> | ||||
|         <where> | ||||
|             <if test="mpid != null  and mpid != ''">and mpid = #{mpid}</if> | ||||
|             <if test="zc != null ">and zc = #{zc}</if> | ||||
| @@ -34,13 +34,13 @@ | ||||
|         order by zc | ||||
|     </select> | ||||
| 
 | ||||
|     <select id="selectByThemeWeekplanById" parameterType="String" resultMap="ByThemeWeekplanResult"> | ||||
|         <include refid="selectByThemeWeekplanVo"/> | ||||
|     <select id="selectByThemeMonthplanitemById" parameterType="String" resultMap="ByThemeMonthplanitemResult"> | ||||
|         <include refid="selectByThemeMonthplanitemVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
| 
 | ||||
|     <insert id="insertByThemeWeekplan" parameterType="ByThemeWeekplan"> | ||||
|         insert into by_theme_weekplan | ||||
|     <insert id="insertByThemeMonthplanitem" parameterType="ByThemeMonthplanitem"> | ||||
|         insert into by_theme_monthplanitem | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null  and id != ''">id,</if> | ||||
|             <if test="mpid != null  and mpid != ''">mpid,</if> | ||||
| @@ -65,8 +65,8 @@ | ||||
|         </trim> | ||||
|     </insert> | ||||
| 
 | ||||
|     <update id="updateByThemeWeekplan" parameterType="ByThemeWeekplan"> | ||||
|         update by_theme_weekplan | ||||
|     <update id="updateByThemeMonthplanitem" parameterType="ByThemeMonthplanitem"> | ||||
|         update by_theme_monthplanitem | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="mpid != null  and mpid != ''">mpid = #{mpid},</if> | ||||
|             <if test="zc != null ">zc = #{zc},</if> | ||||
| @@ -80,12 +80,12 @@ | ||||
|         where id = #{id} | ||||
|     </update> | ||||
| 
 | ||||
|     <delete id="deleteByThemeWeekplanById" parameterType="String"> | ||||
|         delete from by_theme_weekplan where id = #{id} | ||||
|     <delete id="deleteByThemeMonthplanitemById" parameterType="String"> | ||||
|         delete from by_theme_monthplanitem where id = #{id} | ||||
|     </delete> | ||||
| 
 | ||||
|     <delete id="deleteByThemeWeekplanByIds" parameterType="String"> | ||||
|         delete from by_theme_weekplan where id in | ||||
|     <delete id="deleteByThemeMonthplanitemByIds" parameterType="String"> | ||||
|         delete from by_theme_monthplanitem where id in | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
| @@ -34,6 +34,7 @@ | ||||
|     <select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult"> | ||||
|         <include refid="selectByClassVo"/> | ||||
|         where isdel='0' | ||||
|         <if test="bjbh != null  and bjbh != ''">and bjbh = #{bjbh}</if> | ||||
|         <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if> | ||||
|         <if test="bjtype != null  and bjtype != ''">and bjtype = #{bjtype}</if> | ||||
|         <if test="bhxh != null ">and bhxh = #{bhxh}</if> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user