20200510-zlp-1
新增本一端园历 园历新增字段 结束时间和活动样式
This commit is contained in:
		| @@ -0,0 +1,103 @@ | ||||
| package com.ruoyi.project.benyi.controller; | ||||
|  | ||||
| import java.util.List; | ||||
| 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.ByCalendar; | ||||
| 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; | ||||
| import com.ruoyi.framework.web.page.TableDataInfo; | ||||
|  | ||||
| /** | ||||
|  * 园历管理(本一)Controller | ||||
|  *  | ||||
|  * @author tsbz | ||||
|  * @date 2020-05-10 | ||||
|  */ | ||||
| @RestController | ||||
| @RequestMapping("/benyi/calendar") | ||||
| public class ByCalendarController extends BaseController | ||||
| { | ||||
|     @Autowired | ||||
|     private IByCalendarService byCalendarService; | ||||
|  | ||||
|     /** | ||||
|      * 查询园历管理(本一)列表 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:list')") | ||||
|     @GetMapping("/list") | ||||
|     public TableDataInfo list(ByCalendar byCalendar) | ||||
|     { | ||||
|         startPage(); | ||||
|         List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar); | ||||
|         return getDataTable(list); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 导出园历管理(本一)列表 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:export')") | ||||
|     @Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT) | ||||
|     @GetMapping("/export") | ||||
|     public AjaxResult export(ByCalendar byCalendar) | ||||
|     { | ||||
|         List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar); | ||||
|         ExcelUtil<ByCalendar> util = new ExcelUtil<ByCalendar>(ByCalendar.class); | ||||
|         return util.exportExcel(list, "calendar"); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 获取园历管理(本一)详细信息 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:query')") | ||||
|     @GetMapping(value = "/{id}") | ||||
|     public AjaxResult getInfo(@PathVariable("id") Long id) | ||||
|     { | ||||
|         return AjaxResult.success(byCalendarService.selectByCalendarById(id)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增园历管理(本一) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:add')") | ||||
|     @Log(title = "园历管理(本一)", businessType = BusinessType.INSERT) | ||||
|     @PostMapping | ||||
|     public AjaxResult add(@RequestBody ByCalendar byCalendar) | ||||
|     { | ||||
|         return toAjax(byCalendarService.insertByCalendar(byCalendar)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改园历管理(本一) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:edit')") | ||||
|     @Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE) | ||||
|     @PutMapping | ||||
|     public AjaxResult edit(@RequestBody ByCalendar byCalendar) | ||||
|     { | ||||
|         return toAjax(byCalendarService.updateByCalendar(byCalendar)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除园历管理(本一) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('system:calendar:remove')") | ||||
|     @Log(title = "园历管理(本一)", businessType = BusinessType.DELETE) | ||||
| 	@DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable Long[] ids) | ||||
|     { | ||||
|         return toAjax(byCalendarService.deleteByCalendarByIds(ids)); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,137 @@ | ||||
| package com.ruoyi.project.benyi.domain; | ||||
|  | ||||
| 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; | ||||
| import java.util.Date; | ||||
|  | ||||
| /** | ||||
|  * 园历管理(本一)对象 by_calendar | ||||
|  *  | ||||
|  * @author tsbz | ||||
|  * @date 2020-05-10 | ||||
|  */ | ||||
| public class ByCalendar extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 标识 */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 名称 */ | ||||
|     @Excel(name = "名称") | ||||
|     private String name; | ||||
|  | ||||
|     /** 活动类型 */ | ||||
|     @Excel(name = "活动类型") | ||||
|     private String type; | ||||
|  | ||||
|     /** 活动时间 */ | ||||
|     @Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date activitytime; | ||||
|  | ||||
|     /** 活动结束时间 */ | ||||
|     @Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date activityendtime; | ||||
|  | ||||
|     /** 活动样式颜色 */ | ||||
|     @Excel(name = "活动样式颜色") | ||||
|     private String stylecolor; | ||||
|  | ||||
|     /** 创建人 */ | ||||
|     @Excel(name = "创建人") | ||||
|     private Long createuserid; | ||||
|  | ||||
|     /** | ||||
|      * 创建时间 | ||||
|      */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date createtime; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setName(String name)  | ||||
|     { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getName()  | ||||
|     { | ||||
|         return name; | ||||
|     } | ||||
|     public void setType(String type)  | ||||
|     { | ||||
|         this.type = type; | ||||
|     } | ||||
|  | ||||
|     public String getType()  | ||||
|     { | ||||
|         return type; | ||||
|     } | ||||
|     public void setActivitytime(Date activitytime)  | ||||
|     { | ||||
|         this.activitytime = activitytime; | ||||
|     } | ||||
|  | ||||
|     public Date getActivitytime()  | ||||
|     { | ||||
|         return activitytime; | ||||
|     } | ||||
|     public void setActivityendtime(Date activityendtime)  | ||||
|     { | ||||
|         this.activityendtime = activityendtime; | ||||
|     } | ||||
|  | ||||
|     public Date getActivityendtime()  | ||||
|     { | ||||
|         return activityendtime; | ||||
|     } | ||||
|     public void setStylecolor(String stylecolor)  | ||||
|     { | ||||
|         this.stylecolor = stylecolor; | ||||
|     } | ||||
|  | ||||
|     public String getStylecolor()  | ||||
|     { | ||||
|         return stylecolor; | ||||
|     } | ||||
|     public void setCreateuserid(Long createuserid)  | ||||
|     { | ||||
|         this.createuserid = createuserid; | ||||
|     } | ||||
|  | ||||
|     public Long getCreateuserid()  | ||||
|     { | ||||
|         return createuserid; | ||||
|     } | ||||
|     public void setCreatetime(Date createtime) { | ||||
|         this.createtime = createtime; | ||||
|     } | ||||
|  | ||||
|     public Date getCreatetime() { | ||||
|         return createtime; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("name", getName()) | ||||
|             .append("type", getType()) | ||||
|             .append("activitytime", getActivitytime()) | ||||
|             .append("activityendtime", getActivityendtime()) | ||||
|             .append("stylecolor", getStylecolor()) | ||||
|             .append("createuserid", getCreateuserid()) | ||||
|             .append("createtime", getCreatetime()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -5,46 +5,74 @@ 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; | ||||
|  | ||||
| import java.util.Date; | ||||
|  | ||||
| /** | ||||
|  * 园历管理对象 by_schoolcalendar | ||||
|  *  | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-04-20 | ||||
|  */ | ||||
| public class BySchoolcalendar extends BaseEntity | ||||
| { | ||||
| public class BySchoolcalendar extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 标识 */ | ||||
|     /** | ||||
|      * 标识 | ||||
|      */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 名称 */ | ||||
|     /** | ||||
|      * 名称 | ||||
|      */ | ||||
|     @Excel(name = "名称") | ||||
|     private String name; | ||||
|  | ||||
|     /** 活动类型 */ | ||||
|     /** | ||||
|      * 活动类型 | ||||
|      */ | ||||
|     @Excel(name = "活动类型") | ||||
|     private String type; | ||||
|  | ||||
|     /** 适用范围:大班、中班、小班、全园 */ | ||||
|     /** | ||||
|      * 适用范围:大班、中班、小班、全园 | ||||
|      */ | ||||
|     @Excel(name = "适用范围:大班、中班、小班、全园") | ||||
|     private String scope; | ||||
|  | ||||
|     /** 学年学期 */ | ||||
|     /** | ||||
|      * 学年学期 | ||||
|      */ | ||||
|     @Excel(name = "学年学期") | ||||
|     private String xnxq; | ||||
|  | ||||
|     /** 所属学校 */ | ||||
|     /** | ||||
|      * 所属学校 | ||||
|      */ | ||||
|     @Excel(name = "所属学校") | ||||
|     private Long deptid; | ||||
|  | ||||
|     /** 活动时间 */ | ||||
|     /** | ||||
|      * 活动时间 | ||||
|      */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     private Date activitytime; | ||||
|  | ||||
|     /** 创建人 */ | ||||
|     /** | ||||
|      * 活动结束时间 | ||||
|      */ | ||||
|     @Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date activityendtime; | ||||
|  | ||||
|     /** | ||||
|      * 活动样式颜色 | ||||
|      */ | ||||
|     @Excel(name = "活动样式颜色") | ||||
|     private String stylecolor; | ||||
|  | ||||
|     /** | ||||
|      * 创建人 | ||||
|      */ | ||||
|     @Excel(name = "创建人") | ||||
|     private Long createuserid; | ||||
|  | ||||
| @@ -54,78 +82,86 @@ public class BySchoolcalendar extends BaseEntity | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date createtime; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|     public void setId(Long id) { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|     public Long getId() { | ||||
|         return id; | ||||
|     } | ||||
|     public void setName(String name)  | ||||
|     { | ||||
|  | ||||
|     public void setName(String name) { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getName()  | ||||
|     { | ||||
|     public String getName() { | ||||
|         return name; | ||||
|     } | ||||
|     public void setType(String type)  | ||||
|     { | ||||
|  | ||||
|     public void setType(String type) { | ||||
|         this.type = type; | ||||
|     } | ||||
|  | ||||
|     public String getType()  | ||||
|     { | ||||
|     public String getType() { | ||||
|         return type; | ||||
|     } | ||||
|     public void setScope(String scope)  | ||||
|     { | ||||
|  | ||||
|     public void setScope(String scope) { | ||||
|         this.scope = scope; | ||||
|     } | ||||
|  | ||||
|     public String getScope()  | ||||
|     { | ||||
|     public String getScope() { | ||||
|         return scope; | ||||
|     } | ||||
|     public void setXnxq(String xnxq)  | ||||
|     { | ||||
|  | ||||
|     public void setXnxq(String xnxq) { | ||||
|         this.xnxq = xnxq; | ||||
|     } | ||||
|  | ||||
|     public String getXnxq()  | ||||
|     { | ||||
|     public String getXnxq() { | ||||
|         return xnxq; | ||||
|     } | ||||
|     public void setDeptid(Long deptid)  | ||||
|     { | ||||
|  | ||||
|     public void setDeptid(Long deptid) { | ||||
|         this.deptid = deptid; | ||||
|     } | ||||
|  | ||||
|     public Long getDeptid()  | ||||
|     { | ||||
|     public Long getDeptid() { | ||||
|         return deptid; | ||||
|     } | ||||
|     public void setActivitytime(Date activitytime)  | ||||
|     { | ||||
|  | ||||
|     public void setActivitytime(Date activitytime) { | ||||
|         this.activitytime = activitytime; | ||||
|     } | ||||
|  | ||||
|     public Date getActivitytime()  | ||||
|     { | ||||
|     public Date getActivitytime() { | ||||
|         return activitytime; | ||||
|     } | ||||
|     public void setCreateuserid(Long createuserid)  | ||||
|     { | ||||
|  | ||||
|     public void setActivityendtime(Date activityendtime) { | ||||
|         this.activityendtime = activityendtime; | ||||
|     } | ||||
|  | ||||
|     public Date getActivityendtime() { | ||||
|         return activityendtime; | ||||
|     } | ||||
|  | ||||
|     public void setStylecolor(String stylecolor) { | ||||
|         this.stylecolor = stylecolor; | ||||
|     } | ||||
|  | ||||
|     public String getStylecolor() { | ||||
|         return stylecolor; | ||||
|     } | ||||
|  | ||||
|     public void setCreateuserid(Long createuserid) { | ||||
|         this.createuserid = createuserid; | ||||
|     } | ||||
|  | ||||
|     public Long getCreateuserid()  | ||||
|     { | ||||
|     public Long getCreateuserid() { | ||||
|         return createuserid; | ||||
|     } | ||||
|  | ||||
|     public void setCreatetime(Date createtime) { | ||||
|         this.createtime = createtime; | ||||
|     } | ||||
| @@ -136,16 +172,18 @@ public class BySchoolcalendar extends BaseEntity | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("name", getName()) | ||||
|             .append("type", getType()) | ||||
|             .append("scope", getScope()) | ||||
|             .append("xnxq", getXnxq()) | ||||
|             .append("deptid", getDeptid()) | ||||
|             .append("activitytime", getActivitytime()) | ||||
|             .append("createuserid", getCreateuserid()) | ||||
|             .append("createtime", getCreatetime()) | ||||
|             .toString(); | ||||
|         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("id", getId()) | ||||
|                 .append("name", getName()) | ||||
|                 .append("type", getType()) | ||||
|                 .append("scope", getScope()) | ||||
|                 .append("xnxq", getXnxq()) | ||||
|                 .append("deptid", getDeptid()) | ||||
|                 .append("activitytime", getActivitytime()) | ||||
|                 .append("activityendtime", getActivityendtime()) | ||||
|                 .append("stylecolor", getStylecolor()) | ||||
|                 .append("createuserid", getCreateuserid()) | ||||
|                 .append("createtime", getCreatetime()) | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,7 +1,6 @@ | ||||
| package com.ruoyi.project.benyi.domain; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import com.ruoyi.project.system.domain.ByClass; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel; | ||||
| @@ -54,8 +53,6 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date createtime; | ||||
|  | ||||
|     private ByClass byClass; | ||||
|  | ||||
|  | ||||
|  | ||||
|     public void setId(Long id)  | ||||
| @@ -145,7 +142,6 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|             .append("activitytime", getActivitytime()) | ||||
|             .append("createuserid", getCreateuserid()) | ||||
|             .append("createtime", getCreatetime()) | ||||
|             .append("byClass", getByClass()) | ||||
|             .toString(); | ||||
|     } | ||||
|  | ||||
| @@ -156,12 +152,4 @@ public class BySchoolcalendarClass extends BaseEntity | ||||
|     public void setCreatetime(Date createtime) { | ||||
|         this.createtime = createtime; | ||||
|     } | ||||
|  | ||||
|     public ByClass getByClass() { | ||||
|         return byClass; | ||||
|     } | ||||
|  | ||||
|     public void setByClass(ByClass byClass) { | ||||
|         this.byClass = byClass; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.project.benyi.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.project.benyi.domain.ByCalendar; | ||||
|  | ||||
| /** | ||||
|  * 园历管理(本一)Mapper接口 | ||||
|  *  | ||||
|  * @author tsbz | ||||
|  * @date 2020-05-10 | ||||
|  */ | ||||
| public interface ByCalendarMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询园历管理(本一) | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 园历管理(本一) | ||||
|      */ | ||||
|     public ByCalendar selectByCalendarById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询园历管理(本一)列表 | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 园历管理(本一)集合 | ||||
|      */ | ||||
|     public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 新增园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertByCalendar(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 修改园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateByCalendar(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 删除园历管理(本一) | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByCalendarById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除园历管理(本一) | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByCalendarByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.project.benyi.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.project.benyi.domain.ByCalendar; | ||||
|  | ||||
| /** | ||||
|  * 园历管理(本一)Service接口 | ||||
|  *  | ||||
|  * @author tsbz | ||||
|  * @date 2020-05-10 | ||||
|  */ | ||||
| public interface IByCalendarService  | ||||
| { | ||||
|     /** | ||||
|      * 查询园历管理(本一) | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 园历管理(本一) | ||||
|      */ | ||||
|     public ByCalendar selectByCalendarById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询园历管理(本一)列表 | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 园历管理(本一)集合 | ||||
|      */ | ||||
|     public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 新增园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertByCalendar(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 修改园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateByCalendar(ByCalendar byCalendar); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除园历管理(本一) | ||||
|      *  | ||||
|      * @param ids 需要删除的园历管理(本一)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByCalendarByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除园历管理(本一)信息 | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByCalendarById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,93 @@ | ||||
| package com.ruoyi.project.benyi.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.ruoyi.project.benyi.mapper.ByCalendarMapper; | ||||
| import com.ruoyi.project.benyi.domain.ByCalendar; | ||||
| import com.ruoyi.project.benyi.service.IByCalendarService; | ||||
|  | ||||
| /** | ||||
|  * 园历管理(本一)Service业务层处理 | ||||
|  *  | ||||
|  * @author tsbz | ||||
|  * @date 2020-05-10 | ||||
|  */ | ||||
| @Service | ||||
| public class ByCalendarServiceImpl implements IByCalendarService  | ||||
| { | ||||
|     @Autowired | ||||
|     private ByCalendarMapper byCalendarMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询园历管理(本一) | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 园历管理(本一) | ||||
|      */ | ||||
|     @Override | ||||
|     public ByCalendar selectByCalendarById(Long id) | ||||
|     { | ||||
|         return byCalendarMapper.selectByCalendarById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询园历管理(本一)列表 | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 园历管理(本一) | ||||
|      */ | ||||
|     @Override | ||||
|     public List<ByCalendar> selectByCalendarList(ByCalendar byCalendar) | ||||
|     { | ||||
|         return byCalendarMapper.selectByCalendarList(byCalendar); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertByCalendar(ByCalendar byCalendar) | ||||
|     { | ||||
|         return byCalendarMapper.insertByCalendar(byCalendar); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改园历管理(本一) | ||||
|      *  | ||||
|      * @param byCalendar 园历管理(本一) | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateByCalendar(ByCalendar byCalendar) | ||||
|     { | ||||
|         return byCalendarMapper.updateByCalendar(byCalendar); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除园历管理(本一) | ||||
|      *  | ||||
|      * @param ids 需要删除的园历管理(本一)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByCalendarByIds(Long[] ids) | ||||
|     { | ||||
|         return byCalendarMapper.deleteByCalendarByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除园历管理(本一)信息 | ||||
|      *  | ||||
|      * @param id 园历管理(本一)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByCalendarById(Long id) | ||||
|     { | ||||
|         return byCalendarMapper.deleteByCalendarById(id); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										89
									
								
								ruoyi/src/main/resources/mybatis/benyi/ByCalendarMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								ruoyi/src/main/resources/mybatis/benyi/ByCalendarMapper.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,89 @@ | ||||
| <?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.ByCalendarMapper"> | ||||
|      | ||||
|     <resultMap type="ByCalendar" id="ByCalendarResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="name"    column="name"    /> | ||||
|         <result property="type"    column="type"    /> | ||||
|         <result property="activitytime"    column="activitytime"    /> | ||||
|         <result property="activityendtime"    column="activityendtime"    /> | ||||
|         <result property="stylecolor"    column="stylecolor"    /> | ||||
|         <result property="createuserid"    column="createuserid"    /> | ||||
|         <result property="createtime"    column="createtime"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectByCalendarVo"> | ||||
|         select id, name, type, activitytime, activityendtime, stylecolor, createuserid, createtime from by_calendar | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectByCalendarList" parameterType="ByCalendar" resultMap="ByCalendarResult"> | ||||
|         <include refid="selectByCalendarVo"/> | ||||
|         <where>   | ||||
|             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if> | ||||
|             <if test="type != null  and type != ''"> and type = #{type}</if> | ||||
|             <if test="activitytime != null "> and activitytime = #{activitytime}</if> | ||||
|             <if test="activityendtime != null "> and activityendtime = #{activityendtime}</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''"> and stylecolor = #{stylecolor}</if> | ||||
|             <if test="createuserid != null "> and createuserid = #{createuserid}</if> | ||||
|             <if test="createtime != null "> and createtime = #{createtime}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectByCalendarById" parameterType="Long" resultMap="ByCalendarResult"> | ||||
|         <include refid="selectByCalendarVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertByCalendar" parameterType="ByCalendar"> | ||||
|         insert into by_calendar | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null ">id,</if> | ||||
|             <if test="name != null  and name != ''">name,</if> | ||||
|             <if test="type != null  and type != ''">type,</if> | ||||
|             <if test="activitytime != null ">activitytime,</if> | ||||
|             <if test="activityendtime != null ">activityendtime,</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">stylecolor,</if> | ||||
|             <if test="createuserid != null ">createuserid,</if> | ||||
|             <if test="createtime != null ">createtime,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null ">#{id},</if> | ||||
|             <if test="name != null  and name != ''">#{name},</if> | ||||
|             <if test="type != null  and type != ''">#{type},</if> | ||||
|             <if test="activitytime != null ">#{activitytime},</if> | ||||
|             <if test="activityendtime != null ">#{activityendtime},</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">#{stylecolor},</if> | ||||
|             <if test="createuserid != null ">#{createuserid},</if> | ||||
|             <if test="createtime != null ">#{createtime},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateByCalendar" parameterType="ByCalendar"> | ||||
|         update by_calendar | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="name != null  and name != ''">name = #{name},</if> | ||||
|             <if test="type != null  and type != ''">type = #{type},</if> | ||||
|             <if test="activitytime != null ">activitytime = #{activitytime},</if> | ||||
|             <if test="activityendtime != null ">activityendtime = #{activityendtime},</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">stylecolor = #{stylecolor},</if> | ||||
|             <if test="createuserid != null ">createuserid = #{createuserid},</if> | ||||
|             <if test="createtime != null ">createtime = #{createtime},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteByCalendarById" parameterType="Long"> | ||||
|         delete from by_calendar where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteByCalendarByIds" parameterType="String"> | ||||
|         delete from by_calendar where id in  | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
| @@ -14,46 +14,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|         <result property="activitytime"    column="activitytime"    /> | ||||
|         <result property="createuserid"    column="createuserid"    /> | ||||
|         <result property="createtime"    column="createtime"    /> | ||||
|         <association property="byClass"    column="bjbh" javaType="ByClass" resultMap="ByClassResult" /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <resultMap type="ByClass" id="ByClassResult"> | ||||
|         <result property="bjbh" column="bjbh"/> | ||||
|         <result property="deptId" column="dept_id"/> | ||||
|         <result property="bjtype" column="bjtype"/> | ||||
|         <result property="bhxh" column="bhxh"/> | ||||
|         <result property="xn" column="xn"/> | ||||
|         <result property="bjmc" column="bjmc"/> | ||||
|         <result property="bjrych" column="bjrych"/> | ||||
|         <result property="jbny" column="jbny"/> | ||||
|         <result property="zbjs" column="zbjs"/> | ||||
|         <result property="zbjsxm" column="zbjsxm"/> | ||||
|         <result property="pbjs" column="pbjs"/> | ||||
|         <result property="pbjsxm" column="pbjsxm"/> | ||||
|         <result property="zljs" column="zljs"/> | ||||
|         <result property="zljsxm" column="zljsxm"/> | ||||
|         <result property="isdel" column="isdel"/> | ||||
|         <result property="createtime" column="createtime"/> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectBySchoolcalendarClassVo"> | ||||
|         select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime | ||||
|         from by_schoolcalendar_class | ||||
|         select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime from by_schoolcalendar_class | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult"> | ||||
|         select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime, | ||||
|         c.bjbh, c.bjmc | ||||
|         from by_schoolcalendar_class sc, by_class c | ||||
|         <where> | ||||
|             <if test="name != null  and name != ''"> and sc.name like concat('%', #{name}, '%')</if> | ||||
|             <if test="type != null  and type != ''"> and sc.type = #{type}</if> | ||||
|             <if test="classid != null  and classid != ''"> and sc.classid = #{classid}</if> | ||||
|             <if test="xnxq != null  and xnxq != ''"> and sc.xnxq = #{xnxq}</if> | ||||
|             <if test="deptid != null "> and sc.deptId = #{deptid}</if> | ||||
|             <if test="activitytime != null "> and sc.activitytime = #{activitytime}</if> | ||||
|             <if test="createuserid != null "> and sc.createuserid = #{createuserid}</if> | ||||
|             <if test="createtime != null "> and sc.createtime = #{createtime}</if> | ||||
|         <include refid="selectBySchoolcalendarClassVo"/> | ||||
|         <where>   | ||||
|             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if> | ||||
|             <if test="type != null  and type != ''"> and type = #{type}</if> | ||||
|             <if test="classid != null  and classid != ''"> and classid = #{classid}</if> | ||||
|             <if test="xnxq != null  and xnxq != ''"> and xnxq = #{xnxq}</if> | ||||
|             <if test="deptid != null "> and deptId = #{deptid}</if> | ||||
|             <if test="activitytime != null "> and activitytime = #{activitytime}</if> | ||||
|             <if test="createuserid != null "> and createuserid = #{createuserid}</if> | ||||
|             <if test="createtime != null "> and createtime = #{createtime}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|   | ||||
| @@ -12,12 +12,14 @@ | ||||
|         <result property="xnxq" column="xnxq"/> | ||||
|         <result property="deptid" column="dept_id"/> | ||||
|         <result property="activitytime" column="activitytime"/> | ||||
|         <result property="activityendtime"    column="activityendtime"    /> | ||||
|         <result property="stylecolor"    column="stylecolor"    /> | ||||
|         <result property="createuserid" column="createuserid"/> | ||||
|         <result property="createtime" column="createtime"/> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectBySchoolcalendarVo"> | ||||
|         select id, name, type, scope, xnxq, dept_id, activitytime, createuserid, createtime from by_schoolcalendar d | ||||
|         select id, name, type, scope, xnxq, dept_id, activitytime, activityendtime, stylecolor, createuserid, createtime from by_schoolcalendar d | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectBySchoolcalendarList" parameterType="BySchoolcalendar" resultMap="BySchoolcalendarResult"> | ||||
| @@ -29,6 +31,8 @@ | ||||
|         <if test="xnxq != null  and xnxq != ''">and xnxq like concat('%', #{xnxq}, '%')</if> | ||||
|         <if test="deptid != null ">and dept_id = #{deptid}</if> | ||||
|         <if test="activitytime != null ">and activitytime = #{activitytime}</if> | ||||
|         <if test="activityendtime != null "> and activityendtime = #{activityendtime}</if> | ||||
|         <if test="stylecolor != null  and stylecolor != ''"> and stylecolor = #{stylecolor}</if> | ||||
|         <if test="createuserid != null ">and createuserid = #{createuserid}</if> | ||||
|         <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> | ||||
|             AND date_format(activitytime,'%y%m%d') >= date_format(#{beginTime},'%y%m%d') | ||||
| @@ -56,6 +60,8 @@ | ||||
|             <if test="xnxq != null  and xnxq != ''">xnxq,</if> | ||||
|             <if test="deptid != null ">dept_id,</if> | ||||
|             <if test="activitytime != null ">activitytime,</if> | ||||
|             <if test="activityendtime != null ">activityendtime,</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">stylecolor,</if> | ||||
|             <if test="createuserid != null ">createuserid,</if> | ||||
|             <if test="createtime != null ">createtime,</if> | ||||
|         </trim> | ||||
| @@ -66,6 +72,8 @@ | ||||
|             <if test="xnxq != null  and xnxq != ''">#{xnxq},</if> | ||||
|             <if test="deptid != null ">#{deptid},</if> | ||||
|             <if test="activitytime != null ">#{activitytime},</if> | ||||
|             <if test="activityendtime != null ">#{activityendtime},</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">#{stylecolor},</if> | ||||
|             <if test="createuserid != null ">#{createuserid},</if> | ||||
|             <if test="createtime != null ">#{createtime},</if> | ||||
|         </trim> | ||||
| @@ -80,6 +88,8 @@ | ||||
|             <if test="xnxq != null  and xnxq != ''">xnxq = #{xnxq},</if> | ||||
|             <if test="deptid != null ">dept_id = #{deptid},</if> | ||||
|             <if test="activitytime != null ">activitytime = #{activitytime},</if> | ||||
|             <if test="activityendtime != null ">activityendtime = #{activityendtime},</if> | ||||
|             <if test="stylecolor != null  and stylecolor != ''">stylecolor = #{stylecolor},</if> | ||||
|             <if test="createuserid != null ">createuserid = #{createuserid},</if> | ||||
|             <if test="createtime != null ">createtime = #{createtime},</if> | ||||
|         </trim> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user