20200724-zlp-1
幼儿考勤管理
This commit is contained in:
parent
976230c3f2
commit
e7b4d9b40e
@ -9,6 +9,15 @@ export function listChild(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询幼儿信息列表
|
||||
export function listByCheck(query) {
|
||||
return request({
|
||||
url: '/benyi/child/listByCheck',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询幼儿信息详细
|
||||
export function getChild(id) {
|
||||
return request({
|
||||
|
@ -30,6 +30,17 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考勤时间" prop="createTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="queryParams.createTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择考勤时间"
|
||||
></el-date-picker>
|
||||
</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>
|
||||
@ -78,7 +89,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" />
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<!-- <el-table-column label="学校编码" align="center" prop="schoolid" /> -->
|
||||
<el-table-column label="班级编码" align="center" prop="classid" :formatter="classFormat" />
|
||||
@ -99,6 +110,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['benyi:checkindetail:edit']"
|
||||
:disabled="!checkSelectable(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -106,6 +118,7 @@
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['benyi:checkindetail:remove']"
|
||||
:disabled="!checkSelectable(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -127,10 +140,16 @@
|
||||
:indeterminate="isIndeterminate"
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
:disabled="isable"
|
||||
>全选</el-checkbox>
|
||||
<div style="margin: 15px 0;"></div>
|
||||
<el-checkbox-group v-model="checkedChilds" @change="handlecheckedChildsChange">
|
||||
<el-checkbox v-for="child in childs" :label="child.id" :key="child.id">{{child.name}}</el-checkbox>
|
||||
<el-checkbox
|
||||
v-for="child in childs"
|
||||
:label="child.id"
|
||||
:key="child.id"
|
||||
:disabled="isable"
|
||||
>{{child.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-input v-model="form.childname" v-if="false" />
|
||||
</el-form-item>
|
||||
@ -163,7 +182,7 @@ import {
|
||||
exportDetail
|
||||
} from "@/api/benyi/checkindetail";
|
||||
|
||||
import { listChild } from "@/api/benyi/child";
|
||||
import { listByCheck, listChild } from "@/api/benyi/child";
|
||||
|
||||
import { listClass } from "@/api/system/class";
|
||||
|
||||
@ -171,6 +190,7 @@ export default {
|
||||
name: "Detail",
|
||||
data() {
|
||||
return {
|
||||
isable: false,
|
||||
checkAll: false,
|
||||
checkedChilds: [],
|
||||
childs: [],
|
||||
@ -204,7 +224,8 @@ export default {
|
||||
childid: undefined,
|
||||
childname: undefined,
|
||||
type: undefined,
|
||||
createuserid: undefined
|
||||
createuserid: undefined,
|
||||
createTime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -229,6 +250,16 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//控制按钮可用
|
||||
checkSelectable(row) {
|
||||
var date = new Date();
|
||||
//console.log(date.toLocaleDateString());
|
||||
return this.CompareDate(row.createTime, date.toLocaleDateString());
|
||||
},
|
||||
//比较日期大小
|
||||
CompareDate(d1, d2) {
|
||||
return new Date(d1.replace(/-/g, "/")) > new Date(d2.replace(/-/g, "/"));
|
||||
},
|
||||
//班级列表
|
||||
getClassList() {
|
||||
listClass(null).then(response => {
|
||||
@ -280,6 +311,8 @@ export default {
|
||||
createTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
|
||||
this.checkedChilds = [];
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -299,18 +332,25 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.isable = false;
|
||||
this.open = true;
|
||||
this.title = "幼儿考勤";
|
||||
listChild(null).then(response => {
|
||||
listByCheck(null).then(response => {
|
||||
this.childs = response.rows;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.isable = true;
|
||||
const id = row.id || this.ids;
|
||||
getDetail(id).then(response => {
|
||||
this.form = response.data;
|
||||
listChild(null).then(response => {
|
||||
this.childs = response.rows;
|
||||
});
|
||||
this.checkedChilds.push(response.data.childid);
|
||||
this.open = true;
|
||||
this.title = "修改幼儿考勤";
|
||||
});
|
||||
@ -323,6 +363,16 @@ export default {
|
||||
this.msgError("请至少选择一个幼儿");
|
||||
return;
|
||||
}
|
||||
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) {
|
||||
@ -332,6 +382,8 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@ -48,6 +49,10 @@ public class ByChildCheckinDetailController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByChildCheckinDetail byChildCheckinDetail) {
|
||||
startPage();
|
||||
System.out.println("checkintime=" + byChildCheckinDetail.getCreateTime());
|
||||
if (byChildCheckinDetail.getCreateTime() == null) {
|
||||
byChildCheckinDetail.setCreateTime(new Date());
|
||||
}
|
||||
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -89,7 +94,7 @@ public class ByChildCheckinDetailController extends BaseController {
|
||||
for (int i = 0; i < strArr.length; i++) {
|
||||
Long cid = Long.parseLong(strArr[i]);
|
||||
byChildCheckinDetail.setChildid(cid);
|
||||
ByChild byChild=byChildService.selectByChildById(cid);
|
||||
ByChild byChild = byChildService.selectByChildById(cid);
|
||||
byChildCheckinDetail.setChildname(byChild.getName());
|
||||
byChildCheckinDetail.setClassid(byChild.getClassid());
|
||||
byChildCheckinDetail.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||
|
@ -48,6 +48,16 @@ public class ByChildController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿考勤列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:checkindetail:list')")
|
||||
@GetMapping("/listByCheck")
|
||||
public TableDataInfo listByCheck(ByChild byChild) {
|
||||
List<ByChild> list = byChildService.selectByCheckList(byChild);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出幼儿信息列表
|
||||
*/
|
||||
|
@ -74,6 +74,9 @@ public class ByMathController extends BaseController
|
||||
@GetMapping("/treeselect")
|
||||
public AjaxResult treeselect(ByMath byMath) {
|
||||
List<ByMath> byMathDetails = byMathService.selectByMathListTree(byMath);
|
||||
// for(int i=0;i<byMathDetails.size();i++){
|
||||
// System.out.println("parentid="+byMathDetails.get(i).getParentId());
|
||||
// }
|
||||
return AjaxResult.success(byMathService.buildMathTreeSelect(byMathDetails));
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,14 @@ public interface ByChildMapper {
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表-用于考勤
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByCheckList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
|
@ -27,6 +27,14 @@ public interface IByChildService {
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表-用于考勤
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByCheckList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
|
@ -42,6 +42,17 @@ public class ByChildServiceImpl implements IByChildService {
|
||||
return byChildMapper.selectByChildList(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表-用于考勤
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<ByChild> selectByCheckList(ByChild byChild) {
|
||||
return byChildMapper.selectByCheckList(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ public class ByThemeServiceImpl implements IByThemeService {
|
||||
}
|
||||
for (Iterator<ByTheme> iterator = byThemes.iterator(); iterator.hasNext(); ) {
|
||||
ByTheme item = (ByTheme) iterator.next();
|
||||
//System.out.println("test==="+!tempList.contains(byDayFlowDetail.getParentId()));
|
||||
//System.out.println("test==="+!tempList.contains(item.getParentId()));
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(item.getParentId())) {
|
||||
recursionFn(byThemes, item);
|
||||
|
@ -29,6 +29,7 @@
|
||||
<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>
|
||||
<if test="createTime != null ">and to_days(create_time) =to_days(#{createTime})</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -120,6 +120,73 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByCheckList" parameterType="ByChild" resultMap="ByChildResult">
|
||||
select a.* from by_child a
|
||||
where id not in (select childid from by_child_checkin_detail where to_days(create_time) = to_days(now()))
|
||||
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
|
||||
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="enName != null and enName != ''">and en_name like concat('%', #{enName}, '%')</if>
|
||||
<if test="infantName != null and infantName != ''">and infant_name like concat('%', #{infantName}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">and phone = #{phone}</if>
|
||||
<if test="xb != null and xb != ''">and xb = #{xb}</if>
|
||||
<if test="mz != null and mz != ''">and mz = #{mz}</if>
|
||||
<if test="zjhm != null and zjhm != ''">and zjhm = #{zjhm}</if>
|
||||
<if test="csrq != null ">and csrq = #{csrq}</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">and birth_province = #{birthProvince}</if>
|
||||
<if test="birthProvincename != null and birthProvincename != ''">and birth_provincename like concat('%',
|
||||
#{birthProvincename}, '%')
|
||||
</if>
|
||||
<if test="birthCity != null and birthCity != ''">and birth_city = #{birthCity}</if>
|
||||
<if test="birthCityname != null and birthCityname != ''">and birth_cityname like concat('%',
|
||||
#{birthCityname}, '%')
|
||||
</if>
|
||||
<if test="birthArea != null and birthArea != ''">and birth_area = #{birthArea}</if>
|
||||
<if test="birthAreaname != null and birthAreaname != ''">and birth_areaname like concat('%',
|
||||
#{birthAreaname}, '%')
|
||||
</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">and registered_province =
|
||||
#{registeredProvince}
|
||||
</if>
|
||||
<if test="registeredProvincename != null and registeredProvincename != ''">and registered_provincename like
|
||||
concat('%', #{registeredProvincename}, '%')
|
||||
</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">and registered_city = #{registeredCity}</if>
|
||||
<if test="registeredCityname != null and registeredCityname != ''">and registered_cityname like concat('%',
|
||||
#{registeredCityname}, '%')
|
||||
</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">and registered_area = #{registeredArea}</if>
|
||||
<if test="registeredAreaname != null and registeredAreaname != ''">and registered_areaname like concat('%',
|
||||
#{registeredAreaname}, '%')
|
||||
</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">and addr_province = #{addrProvince}</if>
|
||||
<if test="addrProvincename != null and addrProvincename != ''">and addr_provincename like concat('%',
|
||||
#{addrProvincename}, '%')
|
||||
</if>
|
||||
<if test="addrCity != null and addrCity != ''">and addr_city = #{addrCity}</if>
|
||||
<if test="addrCityname != null and addrCityname != ''">and addr_cityname like concat('%', #{addrCityname},
|
||||
'%')
|
||||
</if>
|
||||
<if test="addrArea != null and addrArea != ''">and addr_area = #{addrArea}</if>
|
||||
<if test="addrAreaname != null and addrAreaname != ''">and addr_areaname like concat('%', #{addrAreaname},
|
||||
'%')
|
||||
</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">and addr_detail = #{addrDetail}</if>
|
||||
<if test="everSchool != null and everSchool != ''">and ever_school = #{everSchool}</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">and learn_english = #{learnEnglish}</if>
|
||||
<if test="source != null and source != ''">and source = #{source}</if>
|
||||
<if test="status != null and status != ''">and status = #{status}</if>
|
||||
<if test="enterDate != null ">and enter_date = #{enterDate}</if>
|
||||
<if test="outDate != null ">and out_date = #{outDate}</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">and first_language = #{firstLanguage}</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">and seconder_language =
|
||||
#{seconderLanguage}
|
||||
</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">and other_language = #{otherLanguage}</if>
|
||||
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByChildById" parameterType="Long" resultMap="ByChildResult">
|
||||
<include refid="selectByChildVo"/>
|
||||
where id = #{id}
|
||||
|
@ -13,6 +13,7 @@
|
||||
<result property="classtypeId" column="classtype_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByMathVo">
|
||||
|
Loading…
x
Reference in New Issue
Block a user