20200721-zlp-2
幼儿考勤管理
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.ByChildCheckinDetail;
|
||||
import com.ruoyi.project.benyi.service.IByChildCheckinDetailService;
|
||||
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-07-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/checkindetail")
|
||||
public class ByChildCheckinDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByChildCheckinDetailService byChildCheckinDetailService;
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
startPage();
|
||||
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出幼儿考勤列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:export')")
|
||||
@Log(title = "幼儿考勤", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||
ExcelUtil<ByChildCheckinDetail> util = new ExcelUtil<ByChildCheckinDetail>(ByChildCheckinDetail.class);
|
||||
return util.exportExcel(list, "detail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取幼儿考勤详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(byChildCheckinDetailService.selectByChildCheckinDetailById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿考勤
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:add')")
|
||||
@Log(title = "幼儿考勤", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
return toAjax(byChildCheckinDetailService.insertByChildCheckinDetail(byChildCheckinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿考勤
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:edit')")
|
||||
@Log(title = "幼儿考勤", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
return toAjax(byChildCheckinDetailService.updateByChildCheckinDetail(byChildCheckinDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿考勤
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:remove')")
|
||||
@Log(title = "幼儿考勤", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byChildCheckinDetailService.deleteByChildCheckinDetailByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
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_child_checkin_detail
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public class ByChildCheckinDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学校编码
|
||||
*/
|
||||
@Excel(name = "学校编码")
|
||||
private Long schoolid;
|
||||
|
||||
/**
|
||||
* 班级编码
|
||||
*/
|
||||
@Excel(name = "班级编码")
|
||||
private String classid;
|
||||
|
||||
/**
|
||||
* 幼儿编码
|
||||
*/
|
||||
@Excel(name = "幼儿编码")
|
||||
private Long childid;
|
||||
|
||||
/**
|
||||
* 幼儿姓名
|
||||
*/
|
||||
@Excel(name = "幼儿姓名")
|
||||
private String childname;
|
||||
|
||||
/**
|
||||
* 出勤类型
|
||||
*/
|
||||
@Excel(name = "出勤类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSchoolid(Long schoolid) {
|
||||
this.schoolid = schoolid;
|
||||
}
|
||||
|
||||
public Long getSchoolid() {
|
||||
return schoolid;
|
||||
}
|
||||
|
||||
public void setClassid(String classid) {
|
||||
this.classid = classid;
|
||||
}
|
||||
|
||||
public String getClassid() {
|
||||
return classid;
|
||||
}
|
||||
|
||||
public void setChildid(Long childid) {
|
||||
this.childid = childid;
|
||||
}
|
||||
|
||||
public Long getChildid() {
|
||||
return childid;
|
||||
}
|
||||
|
||||
public void setChildname(String childname) {
|
||||
this.childname = childname;
|
||||
}
|
||||
|
||||
public String getChildname() {
|
||||
return childname;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
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("schoolid", getSchoolid())
|
||||
.append("classid", getClassid())
|
||||
.append("childid", getChildid())
|
||||
.append("childname", getChildname())
|
||||
.append("type", getType())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByChildCheckinDetail;
|
||||
|
||||
/**
|
||||
* 幼儿考勤Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public interface ByChildCheckinDetailMapper {
|
||||
/**
|
||||
* 查询幼儿考勤
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 幼儿考勤
|
||||
*/
|
||||
public ByChildCheckinDetail selectByChildCheckinDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤列表
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 幼儿考勤集合
|
||||
*/
|
||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 新增幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 修改幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 删除幼儿考勤
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildCheckinDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿考勤
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildCheckinDetailByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByChildCheckinDetail;
|
||||
|
||||
/**
|
||||
* 幼儿考勤Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public interface IByChildCheckinDetailService
|
||||
{
|
||||
/**
|
||||
* 查询幼儿考勤
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 幼儿考勤
|
||||
*/
|
||||
public ByChildCheckinDetail selectByChildCheckinDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤列表
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 幼儿考勤集合
|
||||
*/
|
||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 新增幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 修改幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿考勤
|
||||
*
|
||||
* @param ids 需要删除的幼儿考勤ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildCheckinDetailByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除幼儿考勤信息
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildCheckinDetailById(Long id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
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.ByChildCheckinDetailMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByChildCheckinDetail;
|
||||
import com.ruoyi.project.benyi.service.IByChildCheckinDetailService;
|
||||
|
||||
/**
|
||||
* 幼儿考勤Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
@Service
|
||||
public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailService
|
||||
{
|
||||
@Autowired
|
||||
private ByChildCheckinDetailMapper byChildCheckinDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 幼儿考勤
|
||||
*/
|
||||
@Override
|
||||
public ByChildCheckinDetail selectByChildCheckinDetailById(Long id)
|
||||
{
|
||||
return byChildCheckinDetailMapper.selectByChildCheckinDetailById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤列表
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 幼儿考勤
|
||||
*/
|
||||
@Override
|
||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
return byChildCheckinDetailMapper.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
byChildCheckinDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return byChildCheckinDetailMapper.insertByChildCheckinDetail(byChildCheckinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿考勤
|
||||
*
|
||||
* @param byChildCheckinDetail 幼儿考勤
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail)
|
||||
{
|
||||
return byChildCheckinDetailMapper.updateByChildCheckinDetail(byChildCheckinDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除幼儿考勤
|
||||
*
|
||||
* @param ids 需要删除的幼儿考勤ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildCheckinDetailByIds(Long[] ids)
|
||||
{
|
||||
return byChildCheckinDetailMapper.deleteByChildCheckinDetailByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿考勤信息
|
||||
*
|
||||
* @param id 幼儿考勤ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildCheckinDetailById(Long id)
|
||||
{
|
||||
return byChildCheckinDetailMapper.deleteByChildCheckinDetailById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
<?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.ByChildCheckinDetailMapper">
|
||||
|
||||
<resultMap type="ByChildCheckinDetail" id="ByChildCheckinDetailResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="schoolid" column="schoolid"/>
|
||||
<result property="classid" column="classid"/>
|
||||
<result property="childid" column="childid"/>
|
||||
<result property="childname" column="childname"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="createuserid" column="createuserid"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByChildCheckinDetailVo">
|
||||
select id, schoolid, classid, childid, childname, type, createuserid, create_time from by_child_checkin_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildCheckinDetailList" parameterType="ByChildCheckinDetail"
|
||||
resultMap="ByChildCheckinDetailResult">
|
||||
<include refid="selectByChildCheckinDetailVo"/>
|
||||
<where>
|
||||
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
|
||||
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||
<if test="childid != null ">and childid = #{childid}</if>
|
||||
<if test="childname != null and childname != ''">and childname like concat('%', #{childname}, '%')</if>
|
||||
<if test="type != null and type != ''">and type = #{type}</if>
|
||||
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByChildCheckinDetailById" parameterType="Long" resultMap="ByChildCheckinDetailResult">
|
||||
<include refid="selectByChildCheckinDetailVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByChildCheckinDetail" parameterType="ByChildCheckinDetail" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into by_child_checkin_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="childid != null ">childid,</if>
|
||||
<if test="childname != null and childname != ''">childname,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">#{schoolid},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="childid != null ">#{childid},</if>
|
||||
<if test="childname != null and childname != ''">#{childname},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByChildCheckinDetail" parameterType="ByChildCheckinDetail">
|
||||
update by_child_checkin_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid = #{schoolid},</if>
|
||||
<if test="classid != null and classid != ''">classid = #{classid},</if>
|
||||
<if test="childid != null ">childid = #{childid},</if>
|
||||
<if test="childname != null and childname != ''">childname = #{childname},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByChildCheckinDetailById" parameterType="Long">
|
||||
delete from by_child_checkin_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByChildCheckinDetailByIds" parameterType="String">
|
||||
delete from by_child_checkin_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user