Commit 6e924bf4 authored by 姬鋆屾's avatar 姬鋆屾
parents c34dbd07 ce9fa5a6
......@@ -9,7 +9,7 @@ export default {
clearTimeout(this.loadingTimer);
},
methods: {
beforeFecth() {
beforeFecth() {
return Promise.resolve();
},
// 表格接收数据前
......@@ -18,12 +18,12 @@ export default {
afterRender(data){},
// 默认拉取数据
async getTreeData() {
},
handleNodeClick(node) {
},
renderContent: function (h, { node, data, store }) {
return (
......@@ -31,7 +31,7 @@ export default {
<i style="font-size:16px;color:#409EFF" class={data.icon}></i>
<span style="padding-left: 2px;font-size:14px">{node.label}</span>
<span style="padding-left: 2px;font-size:14px;margin-left:20px">
({data.children?data.children.length:0})
({data.personList?data.personList.length:0})
</span>
</span>
)
......@@ -57,11 +57,11 @@ export default {
node.expand(); // 主动调用展开节点方法,重新查询该节点下的所有子节点
this.toView(this.currentNode);
},
},
data() {
return {
return {
treeProps: {
id: "id",
label: "label",
......
<template>
<!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field disabled label="请假人" prop="leavePerson" v-model="form.leavePerson" placeholder="请输入请假人"/>
<Field disabled label="所属部门" prop="deptName" v-model="form.deptName" type="textarea" placeholder="请输入所属部门"/>
<Field disabled label="电话号码" prop="phoneNumber" v-model="form.phoneNumber" placeholder="请输入电话号码"/>
<Field disabled label="请假类型" prop="leaveType" v-model="form.leaveType" type="select" :enumData="dict.leaveType" placeholder="请选择请假类型"/>
<Field disabled label="开始时间" prop="startTime" v-model="form.startTime" type="date" />
<Field disabled label="结束时间" prop="endTime" v-model="form.endTime" type="date" />
<Field disabled label="时长,单位秒" prop="duration" v-model="form.duration" placeholder="请输入时长,单位秒"/>
<Field disabled label="请假事由" prop="reason" v-model="form.reason" type="textarea" placeholder="请输入请假事由"/>
<Field disabled label="审批负责人" prop="approver" v-model="form.approver" placeholder="请输入审批负责人"/>
<Field disabled label="附件" prop="attachment" v-model="form.attachment" type="textarea" placeholder="请输入附件"/>
<Field disabled label="附件路径" prop="attachmentPath" v-model="form.attachmentPath" type="textarea" placeholder="请输入附件路径"/>
<Field disabled label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
<Field disabled label="申请时间" prop="appealTime" v-model="form.appealTime" type="date" />
<Field label="审核结果" prop="auditResult" v-model="form.auditResult" type="radio" :enumData="dict.auditResult" placeholder="请选择审核结果"/>
<Field label="审核说明" prop="auditDesc" v-model="form.auditDesc" placeholder="请输入审核说明"/>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">审 核</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow";
export default {
mixins: [form],
components: {
dialogShow ,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "请假记录信息",
// 是否显示弹出层
open: false,
// urls: { saveUrl: "/check/attend/record/examine" },
toString:[
"leaveType",
"auditResult",
"processStatus",
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/leave/record/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改请假记录信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/leave/record/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增请假记录信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/leave/record/view";
this.getData();
this.pageInfo.type="view"
this.title = "请假记录信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
beforeSubmit(data) {
data.processStatus=2;
return data;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
leavePersonId : null,
leavePerson : "",
deptId : null,
deptName : "",
phoneNumber : "",
leaveType : null,
startTime : null,
endTime : null,
duration : null,
reason : "",
approverId : null,
approver : "",
attachment : "",
attachmentPath : "",
remark : "",
appealTime : null,
auditResult : null,
auditDesc : "",
auditTime : null,
processStatus : 1,
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notDel>
<el-button type="primary" @click="doExport" :disabled="isExport"
size="mini" slot="table-head-left2">导出</el-button>
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notDel>
<el-button type="primary" @click="doExport" :disabled="isExport"
size="mini" slot="table-head-left2">导出
</el-button>
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData"/>
<drawer-audit ref="draweraudit" @ok="getData"/>
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "AttendanceLeaveRecordList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
doExport(){
this.isExport = true;
this.$download("/leave/record/exportExcel", {
"idList": this.selection,
'name': this.$route.query['name'],
}, { type: "excel" }).then(() => this.isExport = false).catch(error => {
this.isExport = false;
this.$message.error(error.message);
})
},
},
data() {
return {
isExport:false,
config: {
isshowTabPane:true,
search: [
{
name: "leavePerson",
type: "text",
label: "请假人",
fuzzy: true
},
{
name: "phoneNumber",
type: "text",
label: "电话号码",
fuzzy: true
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false
},
{
name: "leaveType",
type: "select",
label: "请假类型",
fuzzy: false
},
{
name: "startTime",
type: "date",
label: "开始时间",
fuzzy: false
},
{
name: "endTime",
type: "date",
label: "结束时间",
fuzzy: false
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
// {label: "请假人id", prop: "leavePersonId", formatter: this.formatter},
{label: "请假人", prop: "leavePerson"},
// {label: "所属部门id", prop: "deptId", formatter: this.formatter},
{label: "所属部门", prop: "deptName"},
{label: "电话号码", prop: "phoneNumber"},
{label: "请假类型", prop: "leaveType",formatter: this.formatterLeaveType},
{label: "开始时间", prop: "startTime", formatter: this.formatterDate},
{label: "结束时间", prop: "endTime", formatter: this.formatterDate},
{label: "时长", prop: "duration",formatter: this.formatter},
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
{label: "审批负责人", prop: "approver"},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "AttendanceLeaveRecordList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
audit(row) {
//todo 审核页面进行审核
this.$refs.draweraudit.view(row);
},
doExport() {
this.isExport = true;
this.$download("/leave/record/exportExcel", {
"idList": this.selection,
'name': this.$route.query['name'],
}, {type: "excel"}).then(() => this.isExport = false).catch(error => {
this.isExport = false;
this.$message.error(error.message);
})
},
},
data() {
return {
isExport: false,
config: {
isshowTabPane: true,
search: [
{
name: "leavePerson",
type: "text",
label: "请假人",
fuzzy: true
},
{
name: "phoneNumber",
type: "text",
label: "电话号码",
fuzzy: true
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false
},
{
name: "leaveType",
type: "select",
label: "请假类型",
fuzzy: false
},
{
name: "startTime",
type: "date",
label: "开始时间",
fuzzy: false
},
{
name: "endTime",
type: "date",
label: "结束时间",
fuzzy: false
},
],
columns: [
{type: "selection", width: 60},
{type: "index", label: "序号", width: 50},
// {label: "请假人id", prop: "leavePersonId", formatter: this.formatter},
{label: "请假人", prop: "leavePerson"},
// {label: "所属部门id", prop: "deptId", formatter: this.formatter},
{label: "所属部门", prop: "deptName"},
{label: "电话号码", prop: "phoneNumber"},
{label: "请假类型", prop: "leaveType", formatter: this.formatterLeaveType},
{label: "开始时间", prop: "startTime", formatter: this.formatterDate},
{label: "结束时间", prop: "endTime", formatter: this.formatterDate},
{label: "时长", prop: "duration", formatter: this.formatter},
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
/* {label: "处理状态", prop: "processStatus", formatter: this.formatter},*/
{label: "状态", prop: "auditResult", formatter: this.formatter},
{label: "审批负责人", prop: "approver"},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "创建时间", prop: "createTime", formatter: this.formatterDate},
{
label: "操作",
width: 240,
formatter: row => {
return (
<div>
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel}/>
<span> </span>
{row.processStatus === 1 ? (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.audit(row);
}}
>
审核
</el-button>
) : (
""
)}
</div>
);
}
}
]
}
};
</script>
\ No newline at end of file
}
};
</script>
......@@ -413,13 +413,20 @@ export default {
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: false,
fuzzy: true,
},
{
name: "workNum",
type: "text",
label: "员工工号",
fuzzy: true,
},
{
name: "phone",
type: "text",
label: "手机号",
fuzzy: false,
fuzzy: true,
},
{
name: "deptId",
......
......@@ -87,6 +87,8 @@
<div style="margin-top: 3px;">
{{ userOptions.length > 0 ? '请选择人员' : '请选择部门' }}
</div>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"
v-if="userOptions.length > 0">全选</el-checkbox>
<el-checkbox-group v-model="checkedUser">
<el-checkbox v-for="i in userOptions" :label="i.staffId" :key="i">{{ i.staffName
}}</el-checkbox>
......@@ -105,7 +107,6 @@
<script>
import formCreate from "@form-create/element-ui";
import moment from 'moment'
function formType(val) {
// (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
switch (val) {
......@@ -174,8 +175,11 @@ export default {
},
treeDialog: 0,
isIndeterminate: false,
userOptions: [],
checkedUser: [],
checkAll: false,
checkAllArr: [],
}
},
mounted() {
......@@ -203,8 +207,32 @@ export default {
this.$message.warning('请选择人员')
}
},
handleCheckAllChange(val) {
console.log(val, this.userOptions)
if (val) {
let arr = []
this.userOptions.forEach(i => {
arr.push(i.staffId)
})
this.checkedUser = Array.from(new Set([...this.checkedUser, ...arr]))
console.log(this.checkedUser)
this.isIndeterminate = false;
} else {
let arr = []
this.userOptions.forEach(i => {
arr.push(i.staffId)
})
let newSet = new Set(this.checkedUser)
arr.forEach(i => {
newSet.delete(i)
})
this.checkedUser = [...newSet]
console.log(this.checkedUser)
}
},
handleNodeClick(data) {
if (data.personList) {
this.checkAll = false;
this.userOptions = data.personList
// console.log(this.userOptions)
}
......
......@@ -712,7 +712,7 @@ export default {
indicator: names.map((v) => {
return {
name: v,
max: 150,
max: Math.max(...[...add, ...sub]),
};
}),
center: ["45%", "50%"],
......@@ -734,10 +734,10 @@ export default {
value: add,
name: "加分",
symbol: "rect",
symbolSize: 12,
// symbolSize: 12,
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: {
show: true,
show: false,
formatter: function (params) {
return params.value;
},
......
......@@ -205,6 +205,19 @@ public class TestController {
}
/**
* 生成模拟数据
* @return
*/
@GetMapping("randomStatData")
@UnAuth
public Rest<Void> randomMockStatData() {
return Rest.ok();
}
public static void main(String[] args) {
}
......
......@@ -97,6 +97,6 @@ public class PerformInfo {
*/
private Date createTime;
private String result;
}
......@@ -112,8 +112,8 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
}
log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName());
try {
Integer totalTimes=0;
Integer todayTimes=0;
Integer totalTimes = 0;
Integer todayTimes = 0;
CheckAllRecordQuery checkAllRecordQuery = new CheckAllRecordQuery();
checkAllRecordQuery.setSubMethod(SubMethodEnum.大厅巡查.getValue());
checkAllRecordQuery.setCreateUserId(context.getUser().getId());
......@@ -172,6 +172,12 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
if (CheckStatusEnum.未处理.getValue() == item.getCheckStatus()) {
performInfo.setResult(CheckStatusEnum.未处理.getDesc());
} else {
performInfo.setResult(item.getCheckResult());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -186,6 +192,12 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
if (CheckStatusEnum.未处理.getValue() == item.getCheckStatus()) {
performInfo.setResult(CheckStatusEnum.未处理.getDesc());
} else {
performInfo.setResult(item.getCheckResult());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -199,6 +211,12 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
if (CheckStatusEnum.未处理.getValue() == item.getCheckStatus()) {
performInfo.setResult(CheckStatusEnum.未处理.getDesc());
} else {
performInfo.setResult(item.getCheckResult());
}
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......
......@@ -119,11 +119,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
StaffPerformStatQuery staffPerformStatQuery = new StaffPerformStatQuery();
staffPerformStatQuery.setStaffId(context.getUser().getCustomerId());
staffPerformStatQuery.setYear(DateUtil.year(new Date()));
staffPerformStatQuery.setMonth(DateUtil.month(new Date())+1);
staffPerformStatQuery.setMonth(DateUtil.month(new Date()) + 1);
List<StaffPerformStatEntity> staffPerformStatEntities = staffPerformStatService.find(staffPerformStatQuery);
BigDecimal totalScore=new BigDecimal(0.0);
if(ObjectUtils.isEmpty(staffPerformStatEntities)){
BigDecimal totalScore = new BigDecimal(0.0);
if (ObjectUtils.isEmpty(staffPerformStatEntities)) {
totalScore = staffPerformStatEntities.stream().map(item -> item.getTotalSubScore()).reduce(BigDecimal.ZERO, BigDecimal::add);
}
......@@ -131,9 +131,9 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//今日得分
StaffPerformStatEntity staffPerformStatEntity = staffPerformStatService.selectOne(staffPerformStatQuery);
BigDecimal todayScore=new BigDecimal(0.0);
if(!ObjectUtils.isEmpty(staffPerformStatEntity)){
todayScore=staffPerformStatEntity.getTotalSubScore();
BigDecimal todayScore = new BigDecimal(0.0);
if (!ObjectUtils.isEmpty(staffPerformStatEntity)) {
todayScore = staffPerformStatEntity.getTotalSubScore();
}
PerformStatInfo performStatInfo = new PerformStatInfo();
......@@ -207,12 +207,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
......@@ -233,12 +228,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -258,12 +248,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -283,13 +268,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -308,12 +287,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.效能绩效.getValue());
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -333,12 +307,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
updateAppealResult(performInfo, entity);
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
......@@ -359,6 +328,22 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
return rest;
}
private void updateAppealResult(PerformInfo performInfo, PerformAttendAppealEntity entity) {
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
if (AppealResultEnum.通过.getValue() == entity.getAppealResult()) {
performInfo.setAppealStatus(AppealStatusEnum.申诉通过.getValue());
} else if (AppealResultEnum.不通过.getValue() == entity.getAppealResult()) {
performInfo.setAppealStatus(AppealStatusEnum.申诉拒绝.getValue());
} else {
performInfo.setAppealStatus(AppealStatusEnum.申诉中.getValue());
}
} else {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
}
}
private void updateAppealStatus(PerformInfo performInfo, Boolean bool, Integer processStatus, Integer appealResult) {
if (!bool) {
performInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
......
package com.mortals.xhx.module.attendance.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceLeaveRecordVo;
import java.util.Date;
import lombok.Data;
/**
* 请假记录信息实体对象
*
* @author zxfei
* @date 2023-04-14
* @date 2023-07-18
*/
@Data
public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
private static final long serialVersionUID = 1L;
......@@ -75,224 +78,26 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
* 备注
*/
private String remark;
public AttendanceLeaveRecordEntity(){}
/**
* 获取 请假人id
* @return Long
*/
public Long getLeavePersonId(){
return leavePersonId;
}
/**
* 设置 请假人id
* @param leavePersonId
*/
public void setLeavePersonId(Long leavePersonId){
this.leavePersonId = leavePersonId;
}
/**
* 获取 请假人
* @return String
*/
public String getLeavePerson(){
return leavePerson;
}
/**
* 设置 请假人
* @param leavePerson
*/
public void setLeavePerson(String leavePerson){
this.leavePerson = leavePerson;
}
/**
* 获取 所属部门id
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 所属部门id
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 所属部门
* @return String
* 申请时间
*/
public String getDeptName(){
return deptName;
}
private Date appealTime;
/**
* 设置 所属部门
* @param deptName
* 审核结果(1.申请通过,2.申请不通过)
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
private Integer auditResult;
/**
* 获取 电话号码
* @return String
* 审核说明
*/
public String getPhoneNumber(){
return phoneNumber;
}
private String auditDesc;
/**
* 设置 电话号码
* @param phoneNumber
* 审核时间
*/
public void setPhoneNumber(String phoneNumber){
this.phoneNumber = phoneNumber;
}
private Date auditTime;
/**
* 获取 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
* @return Integer
* 处理状态
*/
public Integer getLeaveType(){
return leaveType;
}
/**
* 设置 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)
* @param leaveType
*/
public void setLeaveType(Integer leaveType){
this.leaveType = leaveType;
}
/**
* 获取 开始时间
* @return Date
*/
public Date getStartTime(){
return startTime;
}
/**
* 设置 开始时间
* @param startTime
*/
public void setStartTime(Date startTime){
this.startTime = startTime;
}
/**
* 获取 结束时间
* @return Date
*/
public Date getEndTime(){
return endTime;
}
/**
* 设置 结束时间
* @param endTime
*/
public void setEndTime(Date endTime){
this.endTime = endTime;
}
/**
* 获取 时长,单位秒
* @return Integer
*/
public Integer getDuration(){
return duration;
}
/**
* 设置 时长,单位秒
* @param duration
*/
public void setDuration(Integer duration){
this.duration = duration;
}
/**
* 获取 请假事由
* @return String
*/
public String getReason(){
return reason;
}
/**
* 设置 请假事由
* @param reason
*/
public void setReason(String reason){
this.reason = reason;
}
/**
* 获取 审批负责人Id
* @return Long
*/
public Long getApproverId(){
return approverId;
}
/**
* 设置 审批负责人Id
* @param approverId
*/
public void setApproverId(Long approverId){
this.approverId = approverId;
}
/**
* 获取 审批负责人
* @return String
*/
public String getApprover(){
return approver;
}
/**
* 设置 审批负责人
* @param approver
*/
public void setApprover(String approver){
this.approver = approver;
}
/**
* 获取 附件
* @return String
*/
public String getAttachment(){
return attachment;
}
/**
* 设置 附件
* @param attachment
*/
public void setAttachment(String attachment){
this.attachment = attachment;
}
/**
* 获取 附件路径
* @return String
*/
public String getAttachmentPath(){
return attachmentPath;
}
/**
* 设置 附件路径
* @param attachmentPath
*/
public void setAttachmentPath(String attachmentPath){
this.attachmentPath = attachmentPath;
}
/**
* 获取 备注
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
private Integer processStatus;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -309,49 +114,29 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",leavePersonId:").append(getLeavePersonId());
sb.append(",leavePerson:").append(getLeavePerson());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",phoneNumber:").append(getPhoneNumber());
sb.append(",leaveType:").append(getLeaveType());
sb.append(",startTime:").append(getStartTime());
sb.append(",endTime:").append(getEndTime());
sb.append(",duration:").append(getDuration());
sb.append(",reason:").append(getReason());
sb.append(",approverId:").append(getApproverId());
sb.append(",approver:").append(getApprover());
sb.append(",attachment:").append(getAttachment());
sb.append(",attachmentPath:").append(getAttachmentPath());
sb.append(",remark:").append(getRemark());
return sb.toString();
}
public void initAttrValue(){
this.leavePersonId = null;
this.leavePersonId = -1L;
this.leavePerson = "";
this.deptId = null;
this.deptId = -1L;
this.deptName = "";
this.phoneNumber = "";
this.leaveType = null;
this.leaveType = -1;
this.startTime = null;
this.endTime = null;
this.duration = null;
this.duration = -1;
this.reason = "";
this.approverId = null;
this.approverId = -1L;
this.approver = "";
......@@ -360,5 +145,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
this.attachmentPath = "";
this.remark = "";
this.appealTime = null;
this.auditResult = null;
this.auditDesc = "";
this.auditTime = null;
this.processStatus = 1;
}
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.GoWorkResultEnum;
......@@ -70,6 +71,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
if (query.getGroupId()!=null){
query.setAttendanceGroupId(query.getGroupId());
}
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
super.doListBefore(query, model, context);
}
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -21,6 +22,7 @@ import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -29,10 +31,8 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
* 海康考勤打卡记录汇总信息
......@@ -67,6 +67,9 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
}
@Override
@Transactional(rollbackFor = Exception.class)
public void doImportDataBefore(List<AttendanceRecordHikEntity> list, boolean updateSupport, Context context) throws AppException {
......@@ -147,6 +150,13 @@ public class AttendanceRecordHikController extends BaseCRUDJsonBodyMappingContro
String staffName = "%" + query.getStaffName() + "%";
query.setStaffName(staffName);
}
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
super.doListBefore(query, model, context);
}
......
......@@ -12,7 +12,7 @@ import lombok.Data;
* 考勤绩效记录核查信息实体对象
*
* @author zxfei
* @date 2023-07-16
* @date 2023-07-17
*/
@Data
public class CheckAttendRecordEntity extends CheckAttendRecordVo {
......@@ -29,10 +29,12 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 所属部门
......@@ -41,6 +43,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 所属考勤组ID
......@@ -49,10 +52,12 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 所属考勤组名称
*/
@Excel(name = "所属考勤组名称")
private String attendanceGroupName;
/**
* 考勤时间
*/
@Excel(name = "考勤时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date attendanceDate;
/**
* 绩效规则id
......@@ -61,30 +66,37 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 规则名称
*/
@Excel(name = "规则名称")
private String ruleName;
/**
* 增减类型(1.增加,2.扣除)
*/
@Excel(name = "增减类型", readConverterExp = "1=增加,2.扣除")
private Integer subAddType;
/**
* 扣分或增加分值
*/
@Excel(name = "扣分或增加分值")
private BigDecimal score;
/**
* 上下班时间
*/
@Excel(name = "上下班时间")
private String goOffTimeStr;
/**
* 异常时间
*/
@Excel(name = "异常时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date errorTime;
/**
* 实际打卡时间
*/
@Excel(name = "实际打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date actualAttendTime;
/**
* 异常处理结果
*/
@Excel(name = "异常处理结果")
private String errorResult;
/**
* 核查人员
......@@ -94,6 +106,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 核查时间
*/
@Excel(name = "核查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkTime;
/**
* 核查说明
......@@ -103,7 +116,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 核查结果(1.加分或扣分,2.不扣分)
*/
@Excel(name = "核查结果", readConverterExp = "1=加分或扣分,2.不扣分")
@Excel(name = "核查结果", readConverterExp = "加分或扣分=加分或扣分,不扣分=不扣分")
private String checkResult;
/**
* 处理状态(1.未处理,2.已处理)
......@@ -121,20 +134,19 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
private String filePaths;
/**
* 绩效规则分类id
*/
private Long categoryId;
/**
* 规则名称
* 种类名称
*/
@Excel(name = "种类名称")
private String categoryName;
/**
* 扣分人员
......@@ -144,6 +156,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
/**
* 扣分时间
*/
@Excel(name = "扣分时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deductTime;
/**
* 窗口编号
......
......@@ -136,12 +136,10 @@ public class CheckComplainRecordEntity extends CheckComplainRecordVo {
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
private String filePaths;
/**
* 绩效规则分类id
......
......@@ -53,7 +53,7 @@ public class CheckEffectRecordEntity extends CheckEffectRecordVo {
/**
* 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
*/
@Excel(name = "违规类型", readConverterExp = "1=脱岗,2.离岗,3.玩手机,4.睡觉")
@Excel(name = "违规类型", readConverterExp = "1=脱岗,2=离岗,3=玩手机,4=睡觉")
private Integer irregularType;
/**
* 发生时间
......
......@@ -9,145 +9,148 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.check.model.vo.CheckGoworkRecordVo;
import lombok.Data;
/**
* 办件绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-11
*/
* 办件绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-17
*/
@Data
public class CheckGoworkRecordEntity extends CheckGoworkRecordVo {
private static final long serialVersionUID = 1L;
/**
* 记录ID
*/
* 记录ID
*/
private Long recordId;
/**
* 员工ID
*/
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 窗口编号
*/
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
/**
* 所属部门
*/
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 办件编码
*/
* 办件编码
*/
@Excel(name = "办件编码")
private String goworkCode;
/**
* 办件所属部门
*/
* 办件所属部门
*/
@Excel(name = "办件所属部门")
private String goworkDepts;
/**
* 事项名称
*/
* 事项名称
*/
@Excel(name = "事项名称")
private String matterlName;
/**
* 办理时间
*/
* 办理时间
*/
@Excel(name = "办理时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date goworkTime;
/**
* 绩效规则id
*/
* 绩效规则id
*/
private Long ruleId;
/**
* 规则名称
*/
* 规则名称
*/
@Excel(name = "规则名称")
private String ruleName;
/**
* 扣分方式(1.系统自动,2.人工添加)
*/
* 扣分方式(1.系统自动,2.人工添加)
*/
@Excel(name = "扣分方式", readConverterExp = "1=系统自动,2.人工添加")
private Integer subMethod;
/**
* 扣分人员
*/
* 扣分人员
*/
@Excel(name = "扣分人员")
private String deductPerson;
/**
* 扣分时间
*/
* 扣分时间
*/
@Excel(name = "扣分时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deductTime;
/**
* 扣分或增加分值
*/
* 扣分或增加分值
*/
@Excel(name = "扣分或增加分值")
private BigDecimal score;
/**
* 核查人员
*/
* 核查人员
*/
@Excel(name = "核查人员")
private String checkPerson;
/**
* 核查时间
*/
* 核查时间
*/
@Excel(name = "核查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkTime;
/**
* 核查说明
*/
* 核查说明
*/
@Excel(name = "核查说明")
private String checkDesc;
/**
* 核查结果
*/
* 核查结果
*/
@Excel(name = "核查结果")
private String checkResult;
/**
* 处理状态(1.未处理,2.已处理)
*/
* 处理状态(1.未处理,2.已处理)
*/
private Integer checkStatus;
/**
* 备注
*/
* 备注
*/
private String remark;
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
* 附件名称,多个逗号分割
*/
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
* 附件下载地址,多个逗号分割
*/
private String filePaths;
/**
* 绩效规则分类id
*/
* 绩效规则分类id
*/
private Long categoryId;
/**
* 规则名称
*/
* 规则名称
*/
private String categoryName;
/**
* 增减类型(1.增加,2.扣除)
*/
* 增减类型(1.增加,2.扣除)
*/
@Excel(name = "增减类型", readConverterExp = "1=增加,2.扣除")
private Integer subAddType;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -155,7 +158,7 @@ public class CheckGoworkRecordEntity extends CheckGoworkRecordVo {
if (obj instanceof CheckGoworkRecordEntity) {
CheckGoworkRecordEntity tmp = (CheckGoworkRecordEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
......@@ -163,60 +166,60 @@ public class CheckGoworkRecordEntity extends CheckGoworkRecordVo {
public void initAttrValue(){
this.recordId = -1L;
this.recordId = -1L;
this.staffId = -1L;
this.staffId = -1L;
this.staffName = "";
this.staffName = "";
this.workNum = "";
this.workNum = "";
this.windowNum = "";
this.windowNum = "";
this.deptId = -1L;
this.deptId = -1L;
this.deptName = "";
this.deptName = "";
this.goworkCode = "";
this.goworkCode = "";
this.goworkDepts = "";
this.goworkDepts = "";
this.matterlName = "";
this.matterlName = "";
this.goworkTime = null;
this.goworkTime = null;
this.ruleId = -1L;
this.ruleId = -1L;
this.ruleName = "";
this.ruleName = "";
this.subMethod = 1;
this.subMethod = 1;
this.deductPerson = "";
this.deductPerson = "";
this.deductTime = null;
this.deductTime = null;
this.score = BigDecimal.valueOf(0.00);
this.score = BigDecimal.valueOf(0.00);
this.checkPerson = "";
this.checkPerson = "";
this.checkTime = null;
this.checkTime = null;
this.checkDesc = "";
this.checkDesc = "";
this.checkResult = "";
this.checkResult = "";
this.checkStatus = 1;
this.checkStatus = 1;
this.remark = "";
this.remark = "";
this.fileNames = "";
this.fileNames = "";
this.filePaths = "";
this.filePaths = "";
this.categoryId = -1L;
this.categoryId = -1L;
this.categoryName = "";
this.categoryName = "";
this.subAddType = 1;
this.subAddType = 1;
}
}
\ No newline at end of file
......@@ -9,135 +9,145 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.check.model.vo.CheckOtherRecordVo;
import lombok.Data;
/**
* 其它绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-11
*/
* 其它绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-17
*/
@Data
public class CheckOtherRecordEntity extends CheckOtherRecordVo {
private static final long serialVersionUID = 1L;
/**
* 记录ID
*/
* 记录ID
*/
private Long recordId;
/**
* 员工ID
*/
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 所属部门
*/
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 窗口编号
*/
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
/**
* 违规类型(1.工作纪律)
*/
* 违规类型(1.工作纪律)
*/
@Excel(name = "违规类型", readConverterExp = "1=工作纪律")
private Integer irregularOtherType;
/**
* 发生时间
*/
* 发生时间
*/
@Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date happenTime;
/**
* 持续时间,秒
*/
* 持续时间,秒
*/
@Excel(name = "持续时间,秒")
private Integer duration;
/**
* 绩效规则id
*/
* 绩效规则id
*/
private Long ruleId;
/**
* 规则名称
*/
* 规则名称
*/
@Excel(name = "规则名称")
private String ruleName;
/**
* 评分标准
*/
* 评分标准
*/
@Excel(name = "评分标准")
private String ruleDesc;
/**
* 扣分方式(1.系统自动,2.人工添加)
*/
* 扣分方式(1.系统自动,2.人工添加)
*/
private Integer subMethod;
/**
* 扣分人员
*/
* 扣分人员
*/
private String deductPerson;
/**
* 扣分时间
*/
* 扣分时间
*/
private Date deductTime;
/**
* 扣分或增加分值
*/
* 扣分或增加分值
*/
@Excel(name = "扣分或增加分值")
private BigDecimal score;
/**
* 核查人员
*/
* 核查人员
*/
@Excel(name = "核查人员")
private String checkPerson;
/**
* 核查时间
*/
* 核查时间
*/
private Date checkTime;
/**
* 核查说明
*/
* 核查说明
*/
@Excel(name = "核查说明")
private String checkDesc;
/**
* 核查结果
*/
* 核查结果
*/
@Excel(name = "核查结果")
private String checkResult;
/**
* 处理状态(1.未处理,2.已处理)
*/
* 处理状态(1.未处理,2.已处理)
*/
private Integer checkStatus;
/**
* 备注
*/
* 备注
*/
private String remark;
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
* 附件名称,多个逗号分割
*/
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
* 附件下载地址,多个逗号分割
*/
private String filePaths;
/**
* 绩效规则分类id
*/
* 绩效规则分类id
*/
private Long categoryId;
/**
* 规则名称
*/
* 规则名称
*/
@Excel(name = "规则名称")
private String categoryName;
/**
* 增减类型(1.增加,2.扣除)
*/
* 增减类型(1.增加,2.扣除)
*/
@Excel(name = "增减类型", readConverterExp = "1=增加,2=扣除")
private Integer subAddType;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -145,7 +155,7 @@ public class CheckOtherRecordEntity extends CheckOtherRecordVo {
if (obj instanceof CheckOtherRecordEntity) {
CheckOtherRecordEntity tmp = (CheckOtherRecordEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
......@@ -153,60 +163,60 @@ public class CheckOtherRecordEntity extends CheckOtherRecordVo {
public void initAttrValue(){
this.recordId = -1L;
this.recordId = -1L;
this.staffId = -1L;
this.staffId = -1L;
this.staffName = "";
this.staffName = "";
this.workNum = "";
this.workNum = "";
this.deptId = -1L;
this.deptId = -1L;
this.deptName = "";
this.deptName = "";
this.windowNum = "";
this.windowNum = "";
this.irregularOtherType = -1;
this.irregularOtherType = -1;
this.happenTime = null;
this.happenTime = null;
this.duration = 0;
this.duration = 0;
this.ruleId = -1L;
this.ruleId = -1L;
this.ruleName = "";
this.ruleName = "";
this.ruleDesc = "";
this.ruleDesc = "";
this.subMethod = 1;
this.subMethod = 1;
this.deductPerson = "";
this.deductPerson = "";
this.deductTime = null;
this.deductTime = null;
this.score = BigDecimal.valueOf(0.00);
this.score = BigDecimal.valueOf(0.00);
this.checkPerson = "";
this.checkPerson = "";
this.checkTime = null;
this.checkTime = null;
this.checkDesc = "";
this.checkDesc = "";
this.checkResult = "";
this.checkResult = "";
this.checkStatus = 1;
this.checkStatus = 1;
this.remark = "";
this.remark = "";
this.fileNames = "";
this.fileNames = "";
this.filePaths = "";
this.filePaths = "";
this.categoryId = -1L;
this.categoryId = -1L;
this.categoryName = "";
this.categoryName = "";
this.subAddType = 1;
this.subAddType = 1;
}
}
\ No newline at end of file
......@@ -9,142 +9,147 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.check.model.vo.CheckReviewRecordVo;
import lombok.Data;
/**
* 评价差评绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-11
*/
* 评价差评绩效核查信息实体对象
*
* @author zxfei
* @date 2023-07-17
*/
@Data
public class CheckReviewRecordEntity extends CheckReviewRecordVo {
private static final long serialVersionUID = 1L;
/**
* 记录ID
*/
* 记录ID
*/
private Long recordId;
/**
* 员工ID
*/
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
* 员工姓名
*/
@Excel(name = "员工姓名")
private String staffName;
/**
* 工号
*/
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 窗口编号
*/
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
/**
* 所属部门
*/
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 评价结果(1.非常不满意,2.差评)
*/
* 评价结果(1.非常不满意,2.差评)
*/
@Excel(name = "评价结果", readConverterExp = "1=非常不满意,2=差评")
private Integer reviewResult;
/**
* 评价时间
*/
* 评价时间
*/
@Excel(name = "评价时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date reviewTime;
/**
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/
@Excel(name = "评价来源", readConverterExp = "评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)")
* 评价来源(窗口评价系统,导视系统,自助服务系统,微官网,其它)
*/
@Excel(name = "评价来源", readConverterExp = "评价来源")
private String reviewSource;
/**
* 评价设备
*/
* 评价设备
*/
@Excel(name = "评价设备")
private String reviewDevice;
/**
* 绩效规则id
*/
* 绩效规则id
*/
private Long ruleId;
/**
* 规则名称
*/
* 规则名称
*/
@Excel(name = "规则名称")
private String ruleName;
/**
* 扣分方式(1.系统自动,2.人工添加)
*/
* 扣分方式(1.系统自动,2.人工添加)
*/
private Integer subMethod;
/**
* 扣分人员
*/
* 扣分人员
*/
@Excel(name = "扣分人员")
private String deductPerson;
/**
* 扣分时间
*/
* 扣分时间
*/
private Date deductTime;
/**
* 扣分或增加分值
*/
* 扣分或增加分值
*/
@Excel(name = "扣分或增加分值")
private BigDecimal score;
/**
* 核查人员
*/
* 核查人员
*/
@Excel(name = "核查人员")
private String checkPerson;
/**
* 核查时间
*/
* 核查时间
*/
private Date checkTime;
/**
* 核查说明
*/
* 核查说明
*/
@Excel(name = "核查说明")
private String checkDesc;
/**
* 核查结果
*/
* 核查结果
*/
@Excel(name = "核查结果")
private String checkResult;
/**
* 处理状态(1.未处理,2.已处理)
*/
* 处理状态(1.未处理,2.已处理)
*/
@Excel(name = "处理状态", readConverterExp = "1=未处理,2=已处理")
private Integer checkStatus;
/**
* 备注
*/
* 备注
*/
private String remark;
/**
* 附件名称,多个逗号分割
*/
@Excel(name = "附件名称,多个逗号分割")
* 附件名称,多个逗号分割
*/
private String fileNames;
/**
* 附件下载地址,多个逗号分割
*/
@Excel(name = "附件下载地址,多个逗号分割")
* 附件下载地址,多个逗号分割
*/
private String filePaths;
/**
* 绩效规则分类id
*/
* 绩效规则分类id
*/
private Long categoryId;
/**
* 规则名称
*/
* 规则名称
*/
@Excel(name = "规则名称")
private String categoryName;
/**
* 增减类型(1.增加,2.扣除)
*/
* 增减类型(1.增加,2.扣除)
*/
@Excel(name = "增减类型", readConverterExp = "1=增加,2=扣除")
private Integer subAddType;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -152,7 +157,7 @@ public class CheckReviewRecordEntity extends CheckReviewRecordVo {
if (obj instanceof CheckReviewRecordEntity) {
CheckReviewRecordEntity tmp = (CheckReviewRecordEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
......@@ -160,60 +165,60 @@ public class CheckReviewRecordEntity extends CheckReviewRecordVo {
public void initAttrValue(){
this.recordId = -1L;
this.recordId = -1L;
this.staffId = -1L;
this.staffId = -1L;
this.staffName = "";
this.staffName = "";
this.workNum = "";
this.workNum = "";
this.windowNum = "";
this.windowNum = "";
this.deptId = -1L;
this.deptId = -1L;
this.deptName = "";
this.deptName = "";
this.reviewResult = -1;
this.reviewResult = -1;
this.reviewTime = null;
this.reviewTime = null;
this.reviewSource = "";
this.reviewSource = "";
this.reviewDevice = "";
this.reviewDevice = "";
this.ruleId = -1L;
this.ruleId = -1L;
this.ruleName = "";
this.ruleName = "";
this.subMethod = 1;
this.subMethod = 1;
this.deductPerson = "";
this.deductPerson = "";
this.deductTime = null;
this.deductTime = null;
this.score = BigDecimal.valueOf(0.00);
this.score = BigDecimal.valueOf(0.00);
this.checkPerson = "";
this.checkPerson = "";
this.checkTime = null;
this.checkTime = null;
this.checkDesc = "";
this.checkDesc = "";
this.checkResult = "";
this.checkResult = "";
this.checkStatus = 1;
this.checkStatus = 1;
this.remark = "";
this.remark = "";
this.fileNames = "";
this.fileNames = "";
this.filePaths = "";
this.filePaths = "";
this.categoryId = -1L;
this.categoryId = -1L;
this.categoryName = "";
this.categoryName = "";
this.subAddType = 1;
this.subAddType = 1;
}
}
\ No newline at end of file
......@@ -72,4 +72,11 @@ public class CheckAllRecordVo extends BaseEntityLong {
private String performType;
private String result;
private Integer checkStatus;
private String checkResult;
}
......@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dept.model;
import java.util.List;
import java.util.ArrayList;
import com.mortals.xhx.module.dept.model.vo.DeptVo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mortals.xhx.module.staff.model.StaffEntity;
......@@ -11,29 +12,32 @@ import org.springframework.util.ObjectUtils;
import java.io.Serializable;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 部门信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-03-06
*/
* 部门信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-03-06
*/
@Data
public class DeptTreeSelect implements Serializable {
public class DeptTreeSelect implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 节点ID
*/
* 节点ID
*/
private Long id;
/**
* 节点名称
*/
* 节点名称
*/
private String label;
private Integer personNum;
/**
* 子节点
*/
* 子节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DeptTreeSelect> children;
......@@ -41,15 +45,21 @@ public class DeptTreeSelect implements Serializable {
* 子节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Map<String,Object>> personList;
private List<Map<String, Object>> personList;
public DeptTreeSelect(DeptEntity entity) {
this.id = entity.getId();
this.label = entity.getDeptName();
if(!ObjectUtils.isEmpty(entity.getChildren())){
this.personNum = entity.getPersonNum();
if (!ObjectUtils.isEmpty(entity.getChildren())) {
this.children = entity.getChildren().stream().map(DeptTreeSelect::new).collect(Collectors.toList());
int sum = entity.getChildren().stream().mapToInt(i -> i.getPersonNum()).sum();
this.personNum = this.personNum + sum;
}
this.personList = entity.getPersonList();
}
}
......@@ -12,7 +12,7 @@ import lombok.Data;
* 员工基本信息实体对象
*
* @author zxfei
* @date 2023-07-07
* @date 2023-07-18
*/
@Data
public class StaffEntity extends StaffVo {
......@@ -21,10 +21,12 @@ public class StaffEntity extends StaffVo {
/**
* 员工姓名
*/
@Excel(name = "员工姓名")
private String name;
/**
* 性别(1.男,2.女)
*/
@Excel(name = "性别", readConverterExp = "1=男,2.女")
private Integer gender;
/**
* 出生日期
......@@ -37,14 +39,17 @@ public class StaffEntity extends StaffVo {
/**
* 联系电话
*/
@Excel(name = "联系电话")
private String phoneNumber;
/**
* 身份证号码
*/
@Excel(name = "身份证号码")
private String idCard;
/**
* 工号
*/
@Excel(name = "工号")
private String workNum;
/**
* 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)
......@@ -57,6 +62,7 @@ public class StaffEntity extends StaffVo {
/**
* 所属部门名称
*/
@Excel(name = "所属部门名称")
private String deptName;
/**
* 职位ID
......@@ -65,14 +71,17 @@ public class StaffEntity extends StaffVo {
/**
* 职位名称
*/
@Excel(name = "职位名称")
private String positionName;
/**
* 员工类型(1.全职,2.兼职,3.实习)
*/
@Excel(name = "员工类型")
private Integer staffType;
/**
* 员工状态(1.正式,2.试用,3.离职)
*/
@Excel(name = "员工状态", readConverterExp = "1=正式,2=试用,3=离职")
private Integer status;
/**
* 员工来源(1.外部,2.内部)
......@@ -85,6 +94,7 @@ public class StaffEntity extends StaffVo {
/**
* 入职时间
*/
@Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date entryDate;
/**
* 转正时间
......@@ -113,6 +123,7 @@ public class StaffEntity extends StaffVo {
/**
* 绩效分数
*/
@Excel(name = "绩效分数")
private BigDecimal score;
/**
* 员工登录名
......
......@@ -2,6 +2,8 @@ package com.mortals.xhx.module.staff.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -36,6 +38,9 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
@Autowired
private ParamService paramService;
@Autowired
private DeptService deptService;
public StaffPerformSummaryController(){
super.setModuleDesc( "员工绩效统计");
......@@ -44,6 +49,7 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "month", paramService.getParamBySecondOrganize("StaffPerformSummary","month"));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
super.init(model, context);
}
......
......@@ -5,7 +5,7 @@
<select id="getList" parameterType="com.mortals.xhx.module.check.model.CheckAllRecordQuery" resultType="com.mortals.xhx.module.check.model.vo.CheckAllRecordVo">
SELECT * FROM (
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,score,subMethod,checkTime,deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -14,7 +14,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,score,subMethod,checkTime,deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -23,7 +23,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -32,7 +32,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName, subAddType,checkStatus,checkResult,score,subMethod,checkTime, deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -41,7 +41,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,score,subMethod,checkTime, deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......@@ -50,7 +50,7 @@
<if test="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<if test="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,score,subMethod,checkTime, deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
<if test="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<if test="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<if test="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
......
......@@ -721,3 +721,44 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '员工类型', 'StaffOnboard', 's
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'StaffOnboard', 'onBoardStatus', '1', '待入职', 1, 4, 0, 'onBoardStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'StaffOnboard', 'onBoardStatus', '2', '试用中', 1, 4, 0, 'onBoardStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工状态', 'StaffOnboard', 'onBoardStatus', '3', '超期', 1, 4, 0, 'onBoardStatus', NULL, NULL, NULL);
-- ----------------------------
2023-7-17
-- ----------------------------
-- ----------------------------
-- 请假记录信息表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_attendance_leave_record`;
CREATE TABLE mortals_xhx_attendance_leave_record(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`leavePersonId` bigint(20) NOT NULL COMMENT '请假人id',
`leavePerson` varchar(64) COMMENT '请假人',
`deptId` bigint(20) COMMENT '所属部门id',
`deptName` varchar(256) COMMENT '所属部门',
`phoneNumber` varchar(20) COMMENT '电话号码',
`leaveType` tinyint(2) COMMENT '请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假)',
`startTime` datetime COMMENT '开始时间',
`endTime` datetime COMMENT '结束时间',
`duration` int(9) COMMENT '时长,单位秒',
`reason` text COMMENT '请假事由',
`approverId` bigint(20) COMMENT '审批负责人Id',
`approver` varchar(64) COMMENT '审批负责人',
`attachment` varchar(255) COMMENT '附件',
`attachmentPath` varchar(255) COMMENT '附件路径',
`remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) COMMENT '创建用户',
`createTime` datetime COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
`appealTime` datetime COMMENT '申请时间',
`auditResult` tinyint(1) COMMENT '审核结果(1.申请通过,2.申请不通过)',
`auditDesc` varchar(64) COMMENT '审核说明',
`auditTime` datetime COMMENT '审核时间',
`processStatus` tinyint(1) DEFAULT '1' COMMENT '处理状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='请假记录信息';
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