20200721-zlp-2
幼儿考勤管理
This commit is contained in:
		
							
								
								
									
										53
									
								
								ruoyi-ui/src/api/benyi/checkindetail.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								ruoyi-ui/src/api/benyi/checkindetail.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 查询幼儿考勤列表 | ||||
| export function listDetail(query) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail/list', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 查询幼儿考勤详细 | ||||
| export function getDetail(id) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail/' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 新增幼儿考勤 | ||||
| export function addDetail(data) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 修改幼儿考勤 | ||||
| export function updateDetail(data) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除幼儿考勤 | ||||
| export function delDetail(id) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail/' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出幼儿考勤 | ||||
| export function exportDetail(query) { | ||||
|   return request({ | ||||
|     url: '/benyi/checkindetail/export', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
							
								
								
									
										317
									
								
								ruoyi-ui/src/views/benyi/checkindetail/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										317
									
								
								ruoyi-ui/src/views/benyi/checkindetail/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,317 @@ | ||||
| <template> | ||||
|   <div class="app-container"> | ||||
|     <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">      | ||||
|       <el-form-item label="班级编码" prop="classid"> | ||||
|         <el-input | ||||
|           v-model="queryParams.classid" | ||||
|           placeholder="请输入班级编码" | ||||
|           clearable | ||||
|           size="small" | ||||
|           @keyup.enter.native="handleQuery" | ||||
|         /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="幼儿姓名" prop="childname"> | ||||
|         <el-input | ||||
|           v-model="queryParams.childname" | ||||
|           placeholder="请输入幼儿姓名" | ||||
|           clearable | ||||
|           size="small" | ||||
|           @keyup.enter.native="handleQuery" | ||||
|         /> | ||||
|       </el-form-item> | ||||
|       <el-form-item label="出勤类型" prop="type"> | ||||
|         <el-select v-model="queryParams.type" placeholder="请选择出勤类型" clearable size="small"> | ||||
|           <el-option label="请选择字典生成" value /> | ||||
|         </el-select> | ||||
|       </el-form-item> | ||||
|       <el-form-item> | ||||
|         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||
|         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||
|       </el-form-item> | ||||
|     </el-form> | ||||
|  | ||||
|     <el-row :gutter="10" class="mb8"> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button | ||||
|           type="primary" | ||||
|           icon="el-icon-plus" | ||||
|           size="mini" | ||||
|           @click="handleAdd" | ||||
|           v-hasPermi="['benyi:checkindetail:add']" | ||||
|         >新增</el-button> | ||||
|       </el-col> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button | ||||
|           type="success" | ||||
|           icon="el-icon-edit" | ||||
|           size="mini" | ||||
|           :disabled="single" | ||||
|           @click="handleUpdate" | ||||
|           v-hasPermi="['benyi:checkindetail:edit']" | ||||
|         >修改</el-button> | ||||
|       </el-col> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button | ||||
|           type="danger" | ||||
|           icon="el-icon-delete" | ||||
|           size="mini" | ||||
|           :disabled="multiple" | ||||
|           @click="handleDelete" | ||||
|           v-hasPermi="['benyi:checkindetail:remove']" | ||||
|         >删除</el-button> | ||||
|       </el-col> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button | ||||
|           type="warning" | ||||
|           icon="el-icon-download" | ||||
|           size="mini" | ||||
|           @click="handleExport" | ||||
|           v-hasPermi="['benyi:checkindetail:export']" | ||||
|         >导出</el-button> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|  | ||||
|     <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange"> | ||||
|       <el-table-column type="selection" width="55" align="center" /> | ||||
|       <el-table-column label="编号" align="center" prop="id" /> | ||||
|       <el-table-column label="学校编码" align="center" prop="schoolid" /> | ||||
|       <el-table-column label="班级编码" align="center" prop="classid" /> | ||||
|       <el-table-column label="幼儿编码" align="center" prop="childid" /> | ||||
|       <el-table-column label="幼儿姓名" align="center" prop="childname" /> | ||||
|       <el-table-column label="出勤类型" align="center" prop="type" /> | ||||
|       <el-table-column label="创建人" align="center" prop="createuserid" /> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|         <template slot-scope="scope"> | ||||
|           <el-button | ||||
|             size="mini" | ||||
|             type="text" | ||||
|             icon="el-icon-edit" | ||||
|             @click="handleUpdate(scope.row)" | ||||
|             v-hasPermi="['benyi:checkindetail:edit']" | ||||
|           >修改</el-button> | ||||
|           <el-button | ||||
|             size="mini" | ||||
|             type="text" | ||||
|             icon="el-icon-delete" | ||||
|             @click="handleDelete(scope.row)" | ||||
|             v-hasPermi="['benyi:checkindetail:remove']" | ||||
|           >删除</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|  | ||||
|     <pagination | ||||
|       v-show="total>0" | ||||
|       :total="total" | ||||
|       :page.sync="queryParams.pageNum" | ||||
|       :limit.sync="queryParams.pageSize" | ||||
|       @pagination="getList" | ||||
|     /> | ||||
|  | ||||
|     <!-- 添加或修改幼儿考勤对话框 --> | ||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="学校编码" prop="schoolid"> | ||||
|           <el-input v-model="form.schoolid" placeholder="请输入学校编码" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="班级编码" prop="classid"> | ||||
|           <el-input v-model="form.classid" placeholder="请输入班级编码" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="幼儿编码" prop="childid"> | ||||
|           <el-input v-model="form.childid" placeholder="请输入幼儿编码" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="幼儿姓名" prop="childname"> | ||||
|           <el-input v-model="form.childname" placeholder="请输入幼儿姓名" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="出勤类型"> | ||||
|           <el-select v-model="form.type" placeholder="请选择出勤类型"> | ||||
|             <el-option label="请选择字典生成" value /> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="创建人" prop="createuserid"> | ||||
|           <el-input v-model="form.createuserid" placeholder="请输入创建人" /> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <div slot="footer" class="dialog-footer"> | ||||
|         <el-button type="primary" @click="submitForm">确 定</el-button> | ||||
|         <el-button @click="cancel">取 消</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { | ||||
|   listDetail, | ||||
|   getDetail, | ||||
|   delDetail, | ||||
|   addDetail, | ||||
|   updateDetail, | ||||
|   exportDetail | ||||
| } from "@/api/benyi/checkindetail"; | ||||
|  | ||||
| export default { | ||||
|   name: "Detail", | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 选中数组 | ||||
|       ids: [], | ||||
|       // 非单个禁用 | ||||
|       single: true, | ||||
|       // 非多个禁用 | ||||
|       multiple: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 幼儿考勤表格数据 | ||||
|       detailList: [], | ||||
|       // 弹出层标题 | ||||
|       title: "", | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageNum: 1, | ||||
|         pageSize: 10, | ||||
|         schoolid: undefined, | ||||
|         classid: undefined, | ||||
|         childid: undefined, | ||||
|         childname: undefined, | ||||
|         type: undefined, | ||||
|         createuserid: undefined | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: {}, | ||||
|       // 表单校验 | ||||
|       rules: {} | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList(); | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询幼儿考勤列表 */ | ||||
|     getList() { | ||||
|       this.loading = true; | ||||
|       listDetail(this.queryParams).then(response => { | ||||
|         this.detailList = response.rows; | ||||
|         this.total = response.total; | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     // 取消按钮 | ||||
|     cancel() { | ||||
|       this.open = false; | ||||
|       this.reset(); | ||||
|     }, | ||||
|     // 表单重置 | ||||
|     reset() { | ||||
|       this.form = { | ||||
|         id: undefined, | ||||
|         schoolid: undefined, | ||||
|         classid: undefined, | ||||
|         childid: undefined, | ||||
|         childname: undefined, | ||||
|         type: undefined, | ||||
|         createuserid: undefined, | ||||
|         createTime: undefined | ||||
|       }; | ||||
|       this.resetForm("form"); | ||||
|     }, | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageNum = 1; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.resetForm("queryForm"); | ||||
|       this.handleQuery(); | ||||
|     }, | ||||
|     // 多选框选中数据 | ||||
|     handleSelectionChange(selection) { | ||||
|       this.ids = selection.map(item => item.id); | ||||
|       this.single = selection.length != 1; | ||||
|       this.multiple = !selection.length; | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset(); | ||||
|       this.open = true; | ||||
|       this.title = "添加幼儿考勤"; | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset(); | ||||
|       const id = row.id || this.ids; | ||||
|       getDetail(id).then(response => { | ||||
|         this.form = response.data; | ||||
|         this.open = true; | ||||
|         this.title = "修改幼儿考勤"; | ||||
|       }); | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm: function() { | ||||
|       this.$refs["form"].validate(valid => { | ||||
|         if (valid) { | ||||
|           if (this.form.id != undefined) { | ||||
|             updateDetail(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess("修改成功"); | ||||
|                 this.open = false; | ||||
|                 this.getList(); | ||||
|               } | ||||
|             }); | ||||
|           } else { | ||||
|             addDetail(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess("新增成功"); | ||||
|                 this.open = false; | ||||
|                 this.getList(); | ||||
|               } | ||||
|             }); | ||||
|           } | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       const ids = row.id || this.ids; | ||||
|       this.$confirm( | ||||
|         '是否确认删除幼儿考勤编号为"' + ids + '"的数据项?', | ||||
|         "警告", | ||||
|         { | ||||
|           confirmButtonText: "确定", | ||||
|           cancelButtonText: "取消", | ||||
|           type: "warning" | ||||
|         } | ||||
|       ) | ||||
|         .then(function() { | ||||
|           return delDetail(ids); | ||||
|         }) | ||||
|         .then(() => { | ||||
|           this.getList(); | ||||
|           this.msgSuccess("删除成功"); | ||||
|         }) | ||||
|         .catch(function() {}); | ||||
|     }, | ||||
|     /** 导出按钮操作 */ | ||||
|     handleExport() { | ||||
|       const queryParams = this.queryParams; | ||||
|       this.$confirm("是否确认导出所有幼儿考勤数据项?", "警告", { | ||||
|         confirmButtonText: "确定", | ||||
|         cancelButtonText: "取消", | ||||
|         type: "warning" | ||||
|       }) | ||||
|         .then(function() { | ||||
|           return exportDetail(queryParams); | ||||
|         }) | ||||
|         .then(response => { | ||||
|           this.download(response.msg); | ||||
|         }) | ||||
|         .catch(function() {}); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| </script> | ||||
| @@ -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