Commit 9d4a7d23 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/model/vo/AttendanceStaffStatVo.java
#	attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceStaffStatServiceImpl.java
parents 4a00eed6 ac4c4c57
...@@ -14,7 +14,7 @@ const tagsMap = { ...@@ -14,7 +14,7 @@ const tagsMap = {
const baseUrl = process.env.VUE_APP_API_BASE_URL + "/"; const baseUrl = process.env.VUE_APP_API_BASE_URL + "/";
export default { export default {
mounted() { mounted() {
this.getData(); // this.getData();
}, },
watch: { watch: {
$route(route) { $route(route) {
......
...@@ -282,9 +282,11 @@ export default { ...@@ -282,9 +282,11 @@ export default {
}, },
// 表格接收数据后 // 表格接收数据后
afterRender(data) { afterRender(data) {
console.log(data);
let addobjArr = []; let addobjArr = [];
data.dyncColumns.map((item) => { data.dyncColumns.map((item) => {
let obj = { let obj = {
show: true,
label: item.name, label: item.name,
prop: "", prop: "",
formatter: (row) => { formatter: (row) => {
...@@ -299,6 +301,7 @@ export default { ...@@ -299,6 +301,7 @@ export default {
} }
}, },
}; };
addobjArr.push(obj);
}); });
this.config.columns = [...this.initalArr, ...addobjArr]; this.config.columns = [...this.initalArr, ...addobjArr];
this.$refs.layoutTable.showType = "tableSelect"; this.$refs.layoutTable.showType = "tableSelect";
...@@ -512,6 +515,8 @@ export default { ...@@ -512,6 +515,8 @@ export default {
}, },
data() { data() {
return { return {
// 动态新增列表
addColumn: [],
progress: false, progress: false,
percent: 0, percent: 0,
upload: { upload: {
...@@ -666,25 +671,25 @@ export default { ...@@ -666,25 +671,25 @@ export default {
show: true, show: true,
}, },
{ // {
label: "考勤打卡记录详细信息", // label: "考勤打卡记录详细信息",
width: 120, // width: 120,
prop: "subColumns", // prop: "subColumns",
show: true, // show: true,
formatter: (row) => { // formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => { // let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width); // return pre + Number(cur.width);
}, 50); // }, 50);
return ( // return (
<el-popover placement="right" width={widthsize} trigger="click"> // <el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.attendanceRecordDetailList)} // {this.renderTable(row.attendanceRecordDetailList)}
<el-button type="text" slot="reference"> // <el-button type="text" slot="reference">
详细 // 详细
</el-button> // </el-button>
</el-popover> // </el-popover>
); // );
}, // },
}, // },
// { // {
// label: "操作", // label: "操作",
// width: 240, // width: 240,
......
...@@ -168,9 +168,18 @@ export default { ...@@ -168,9 +168,18 @@ export default {
let index = arr.findIndex((item) => item.createTime == currentTime); let index = arr.findIndex((item) => item.createTime == currentTime);
if (index > -1) { if (index > -1) {
return arr[index].attendanceSummary ? ( return arr[index].attendanceSummary ? (
<el-tooltip
class="item"
effect="dark"
content={
arr[index].createTime + " " + arr[index].attendanceSummary
}
placement="top-start"
>
<el-tag type={"danger"} size="mini"> <el-tag type={"danger"} size="mini">
{arr[index].attendanceSummary} {arr[index].attendanceSummary}
</el-tag> </el-tag>
</el-tooltip>
) : ( ) : (
"-" "-"
); );
......
<template> <template>
<div className="page"> <div className="page">
<el-card style="height:80vh;overflow:scroll-y"> <el-card style="height:80vh;overflow:scroll-y">
<LayoutTable notPagination :data="tableData" ref="layoutTable" :config="tableConfig" notSearch></LayoutTable> <LayoutTable
notPagination
:data="tableData"
notAdd
notDel
ref="layoutTable"
:config="tableConfig"
notSearch
></LayoutTable>
</el-card> </el-card>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import {handleTree} from "@/assets/utils/table"; import { handleTree } from "@/assets/utils/table";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "DeptList", name: "DeptList",
components: { components: {
drawerShow, drawerShow,
Treeselect Treeselect,
}, },
mixins: [table], mixins: [table],
created() { created() {
this.query={"page":1,"size":-1} this.query = { page: 1, size: -1 };
}, },
methods: { methods: {
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
this.$refs.drawerform.add(row,this.menuOptions); this.$refs.drawerform.add(row, this.menuOptions);
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
this.$refs.drawerform.edit(row,this.menuOptions); this.$refs.drawerform.edit(row, this.menuOptions);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
...@@ -39,41 +47,48 @@ ...@@ -39,41 +47,48 @@
}, },
afterRender(data) { afterRender(data) {
data.data = handleTree(data.data, "id", "parentId"); data.data = handleTree(data.data, "id", "parentId");
console.log("tree data:",data.data) console.log("tree data:", data.data);
this.menuOptions = data.data; this.menuOptions = data.data;
this.$refs.layoutTable.showType = "treetable" this.$refs.layoutTable.showType = "treetable";
}, },
}, },
data() { data() {
return { return {
config: { config: {
showType:'treetable', showType: "treetable",
isshowTabPane:true, isshowTabPane: true,
/** 树表是否默认展开 */ /** 树表是否默认展开 */
expand: false, expand: false,
columns: [ columns: [
{type: "selection", width: 60}, { type: "selection", width: 60 },
{label: "部门名称", prop: "deptName"}, { label: "部门名称", prop: "deptName" },
{label: "成员数量", prop: "personNum"}, { label: "成员数量", prop: "personNum" },
{label: "负责人", prop: "workName"}, { label: "负责人", prop: "workName" },
// {label: "部门状态", prop: "deptStatus",formatter: this.formatter}, // {label: "部门状态", prop: "deptStatus",formatter: this.formatter},
// {label: "顺序", prop: "orderNum",formatter: this.formatter}, // {label: "顺序", prop: "orderNum",formatter: this.formatter},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter}, // {label: "创建用户", prop: "createUserId", formatter: this.formatter},
{ // {
label: "操作", // label: "操作",
width: 240, // width: 240,
formatter: row => { // formatter: (row) => {
return ( // return (
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> // <table-buttons
) // noAdd
} // noView
} // row={row}
] // onEdit={this.toEdit}
} // onView={this.toView}
}; // onDel={this.toDel}
} // />
// );
// },
// },
],
},
}; };
},
};
</script> </script>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@handleClick="handleClick" @handleClick="handleClick"
></tab-pane> ></tab-pane>
</div> </div>
<div class="totalNum flex" v-if="tableData.staff"> <!-- <div class="totalNum flex" v-if="tableData.staff">
<div class="item"> <div class="item">
在职员工 <span class="num">{{ tableData.staff.inWorkStaff }}</span> 在职员工 <span class="num">{{ tableData.staff.inWorkStaff }}</span>
</div> </div>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
待离职 <span class="num">{{ tableData.staff.resignationStaff }}</span> 待离职 <span class="num">{{ tableData.staff.resignationStaff }}</span>
</div> </div>
</div> </div>
</div> </div> -->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6" :xs="12" class="mytree"> <el-col :span="6" :xs="12" class="mytree">
<div class="titles">选择部门</div> <div class="titles">选择部门</div>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</el-col> </el-col>
<el-col :span="18" :xs="12"> <el-col :span="18" :xs="12">
<el-row> <el-row>
<LayoutTable notDel :data="tableData" :config="tableConfig"> <LayoutTable notDel notAdd :data="tableData" :config="tableConfig">
<el-button <el-button
type="primary" type="primary"
@click="doExport" @click="doExport"
......
...@@ -2,6 +2,10 @@ package com.mortals.xhx.module.attendance.dao; ...@@ -2,6 +2,10 @@ package com.mortals.xhx.module.attendance.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.attendance.model.AttendanceRecordDetailEntity; import com.mortals.xhx.module.attendance.model.AttendanceRecordDetailEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import java.util.List;
/** /**
* 考勤打卡记录详细信息Dao * 考勤打卡记录详细信息Dao
* 考勤打卡记录详细信息 DAO接口 * 考勤打卡记录详细信息 DAO接口
...@@ -18,6 +22,11 @@ public interface AttendanceRecordDetailDao extends ICRUDDao<AttendanceRecordDet ...@@ -18,6 +22,11 @@ public interface AttendanceRecordDetailDao extends ICRUDDao<AttendanceRecordDet
* */ * */
int goWorkCount(Long id); int goWorkCount(Long id);
/**
* 查询每日打卡记录明细
* @param query
* @return
*/
List<AttendanceRecordDetailEntity> getListByWhere(AttendanceRecordQuery query);
} }
...@@ -4,7 +4,11 @@ package com.mortals.xhx.module.attendance.dao.ibatis; ...@@ -4,7 +4,11 @@ package com.mortals.xhx.module.attendance.dao.ibatis;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.attendance.dao.AttendanceRecordDetailDao; import com.mortals.xhx.module.attendance.dao.AttendanceRecordDetailDao;
import com.mortals.xhx.module.attendance.model.AttendanceRecordDetailEntity; import com.mortals.xhx.module.attendance.model.AttendanceRecordDetailEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* 考勤打卡记录详细信息DaoImpl DAO接口 * 考勤打卡记录详细信息DaoImpl DAO接口
* *
...@@ -19,4 +23,11 @@ public class AttendanceRecordDetailDaoImpl extends BaseCRUDDaoMybatis<Attendance ...@@ -19,4 +23,11 @@ public class AttendanceRecordDetailDaoImpl extends BaseCRUDDaoMybatis<Attendance
public int goWorkCount(Long id) { public int goWorkCount(Long id) {
return getSqlSession().selectOne(getSqlId("goWorkCount"),id); return getSqlSession().selectOne(getSqlId("goWorkCount"),id);
} }
@Override
public List<AttendanceRecordDetailEntity> getListByWhere(AttendanceRecordQuery query) {
return getSqlSession().selectList(getSqlId("getListByWhere"),query);
}
} }
...@@ -14,10 +14,5 @@ import java.util.List; ...@@ -14,10 +14,5 @@ import java.util.List;
*/ */
@Data @Data
public class AttendanceStaffStatVo extends BaseEntityLong { public class AttendanceStaffStatVo extends BaseEntityLong {
List<AttendanceRecordDetailEntity> attendanceRecordDetail;
/**
* 考勤打卡记录详细信息信息
*/
private List<AttendanceRecordDetailEntity> attendanceRecordDetailList=new ArrayList<>();;
} }
\ No newline at end of file
package com.mortals.xhx.module.attendance.service.impl; package com.mortals.xhx.module.attendance.service.impl;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.attendance.dao.AttendanceRecordDetailDao;
import com.mortals.xhx.module.attendance.model.AttendanceRecordDetailEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordQuery;
import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery; import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -33,11 +38,18 @@ public class AttendanceStaffStatServiceImpl extends AbstractCRUDServiceImpl<Atte ...@@ -33,11 +38,18 @@ public class AttendanceStaffStatServiceImpl extends AbstractCRUDServiceImpl<Atte
throw new AppException("查询日期范围不能为空"); throw new AppException("查询日期范围不能为空");
} }
List<AttendanceStaffStatEntity> listExt = dao.getListExt(params); List<AttendanceStaffStatEntity> list = dao.getListExt(params);
if(CollectionUtils.isNotEmpty(list)){
//构建异常信息 分日期 分人 for(AttendanceStaffStatEntity entity:list){
AttendanceRecordQuery query = new AttendanceRecordQuery();
query.setStaffId(entity.getStaffId());
return listExt; String dayStr = entity.getYear()+"-"+entity.getMonth()+"-"+entity.getDay();
query.setAttendanceDateStart(dayStr);
query.setAttendanceDateEnd(dayStr);
List<AttendanceRecordDetailEntity> entityList = attendanceRecordDetailDao.getListByWhere(query);
entity.setAttendanceRecordDetail(entityList);
}
}
return list;
} }
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.attendance.dao.ibatis.AttendanceRecordDetailDaoImpl">
<!-- 获取列表 -->
<select id="getListByWhere" parameterType="AttendanceRecordQuery" resultMap="AttendanceRecordDetailEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_attendance_record_detail as a,mortals_xhx_attendance_record r
where a.recordId = r.id
and r.staffId = #{staffId}
AND r.attendanceDate <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{attendanceDateStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND r.attendanceDate <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{attendanceDateEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment