Commit d156a9bd authored by 赵啸非's avatar 赵啸非

修改请假功能

parent 491d88ab
<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>
......@@ -2,21 +2,25 @@
<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>
size="mini" slot="table-head-left2">导出
</el-button>
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
<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 {
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "AttendanceLeaveRecordList",
components: {
drawerShow
},
},
mixins: [table],
created() {
},
......@@ -33,12 +37,17 @@
toView(row) {
this.$refs.drawerform.view(row);
},
doExport(){
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 => {
}, {type: "excel"}).then(() => this.isExport = false).catch(error => {
this.isExport = false;
this.$message.error(error.message);
})
......@@ -46,9 +55,9 @@
},
data() {
return {
isExport:false,
isExport: false,
config: {
isshowTabPane:true,
isshowTabPane: true,
search: [
{
name: "leavePerson",
......@@ -89,7 +98,7 @@
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{type: "index", label: "序号", width: 50},
// {label: "请假人id", prop: "leavePersonId", formatter: this.formatter},
......@@ -101,25 +110,46 @@
{label: "电话号码", prop: "phoneNumber"},
{label: "请假类型", prop: "leaveType",formatter: this.formatterLeaveType},
{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: "时长", prop: "duration", formatter: this.formatter},
// {label: "审批负责人Id", prop: "approverId", formatter: this.formatter},
{label: "审批负责人", prop: "approver"},
{label: "处理状态", prop: "processStatus", formatter: this.formatter},
{label: "审核状态", prop: "auditResult", formatter: this.formatter},
{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} />
<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>
);
}
}
......@@ -127,5 +157,5 @@
}
};
}
};
};
</script>
......@@ -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.model;
import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity;
/**
* 请假记录信息查询对象
*
* @author zxfei
* @date 2023-04-14
* @date 2023-07-18
*/
public class AttendanceLeaveRecordQuery extends AttendanceLeaveRecordEntity {
/** 开始 序号,主键,自增长 */
......@@ -192,6 +194,53 @@ public class AttendanceLeaveRecordQuery extends AttendanceLeaveRecordEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 申请时间 */
private String appealTimeStart;
/** 结束 申请时间 */
private String appealTimeEnd;
/** 开始 审核结果(1.申请通过,2.申请不通过) */
private Integer auditResultStart;
/** 结束 审核结果(1.申请通过,2.申请不通过) */
private Integer auditResultEnd;
/** 增加 审核结果(1.申请通过,2.申请不通过) */
private Integer auditResultIncrement;
/** 审核结果(1.申请通过,2.申请不通过)列表 */
private List <Integer> auditResultList;
/** 审核结果(1.申请通过,2.申请不通过)排除列表 */
private List <Integer> auditResultNotList;
/** 审核说明 */
private List<String> auditDescList;
/** 审核说明排除列表 */
private List <String> auditDescNotList;
/** 开始 审核时间 */
private String auditTimeStart;
/** 结束 审核时间 */
private String auditTimeEnd;
/** 开始 处理状态 */
private Integer processStatusStart;
/** 结束 处理状态 */
private Integer processStatusEnd;
/** 增加 处理状态 */
private Integer processStatusIncrement;
/** 处理状态列表 */
private List <Integer> processStatusList;
/** 处理状态排除列表 */
private List <Integer> processStatusNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<AttendanceLeaveRecordQuery> orConditionList;
......@@ -1232,6 +1281,264 @@ public class AttendanceLeaveRecordQuery extends AttendanceLeaveRecordEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 申请时间
* @return appealTimeStart
*/
public String getAppealTimeStart(){
return this.appealTimeStart;
}
/**
* 设置 开始 申请时间
* @param appealTimeStart
*/
public void setAppealTimeStart(String appealTimeStart){
this.appealTimeStart = appealTimeStart;
}
/**
* 获取 结束 申请时间
* @return appealTimeEnd
*/
public String getAppealTimeEnd(){
return this.appealTimeEnd;
}
/**
* 设置 结束 申请时间
* @param appealTimeEnd
*/
public void setAppealTimeEnd(String appealTimeEnd){
this.appealTimeEnd = appealTimeEnd;
}
/**
* 获取 开始 审核结果(1.申请通过,2.申请不通过)
* @return auditResultStart
*/
public Integer getAuditResultStart(){
return this.auditResultStart;
}
/**
* 设置 开始 审核结果(1.申请通过,2.申请不通过)
* @param auditResultStart
*/
public void setAuditResultStart(Integer auditResultStart){
this.auditResultStart = auditResultStart;
}
/**
* 获取 结束 审核结果(1.申请通过,2.申请不通过)
* @return $auditResultEnd
*/
public Integer getAuditResultEnd(){
return this.auditResultEnd;
}
/**
* 设置 结束 审核结果(1.申请通过,2.申请不通过)
* @param auditResultEnd
*/
public void setAuditResultEnd(Integer auditResultEnd){
this.auditResultEnd = auditResultEnd;
}
/**
* 获取 增加 审核结果(1.申请通过,2.申请不通过)
* @return auditResultIncrement
*/
public Integer getAuditResultIncrement(){
return this.auditResultIncrement;
}
/**
* 设置 增加 审核结果(1.申请通过,2.申请不通过)
* @param auditResultIncrement
*/
public void setAuditResultIncrement(Integer auditResultIncrement){
this.auditResultIncrement = auditResultIncrement;
}
/**
* 获取 审核结果(1.申请通过,2.申请不通过)
* @return auditResultList
*/
public List<Integer> getAuditResultList(){
return this.auditResultList;
}
/**
* 设置 审核结果(1.申请通过,2.申请不通过)
* @param auditResultList
*/
public void setAuditResultList(List<Integer> auditResultList){
this.auditResultList = auditResultList;
}
/**
* 获取 审核结果(1.申请通过,2.申请不通过)
* @return auditResultNotList
*/
public List<Integer> getAuditResultNotList(){
return this.auditResultNotList;
}
/**
* 设置 审核结果(1.申请通过,2.申请不通过)
* @param auditResultNotList
*/
public void setAuditResultNotList(List<Integer> auditResultNotList){
this.auditResultNotList = auditResultNotList;
}
/**
* 获取 审核说明
* @return auditDescList
*/
public List<String> getAuditDescList(){
return this.auditDescList;
}
/**
* 设置 审核说明
* @param auditDescList
*/
public void setAuditDescList(List<String> auditDescList){
this.auditDescList = auditDescList;
}
/**
* 获取 审核说明
* @return auditDescNotList
*/
public List<String> getAuditDescNotList(){
return this.auditDescNotList;
}
/**
* 设置 审核说明
* @param auditDescNotList
*/
public void setAuditDescNotList(List<String> auditDescNotList){
this.auditDescNotList = auditDescNotList;
}
/**
* 获取 开始 审核时间
* @return auditTimeStart
*/
public String getAuditTimeStart(){
return this.auditTimeStart;
}
/**
* 设置 开始 审核时间
* @param auditTimeStart
*/
public void setAuditTimeStart(String auditTimeStart){
this.auditTimeStart = auditTimeStart;
}
/**
* 获取 结束 审核时间
* @return auditTimeEnd
*/
public String getAuditTimeEnd(){
return this.auditTimeEnd;
}
/**
* 设置 结束 审核时间
* @param auditTimeEnd
*/
public void setAuditTimeEnd(String auditTimeEnd){
this.auditTimeEnd = auditTimeEnd;
}
/**
* 获取 开始 处理状态
* @return processStatusStart
*/
public Integer getProcessStatusStart(){
return this.processStatusStart;
}
/**
* 设置 开始 处理状态
* @param processStatusStart
*/
public void setProcessStatusStart(Integer processStatusStart){
this.processStatusStart = processStatusStart;
}
/**
* 获取 结束 处理状态
* @return $processStatusEnd
*/
public Integer getProcessStatusEnd(){
return this.processStatusEnd;
}
/**
* 设置 结束 处理状态
* @param processStatusEnd
*/
public void setProcessStatusEnd(Integer processStatusEnd){
this.processStatusEnd = processStatusEnd;
}
/**
* 获取 增加 处理状态
* @return processStatusIncrement
*/
public Integer getProcessStatusIncrement(){
return this.processStatusIncrement;
}
/**
* 设置 增加 处理状态
* @param processStatusIncrement
*/
public void setProcessStatusIncrement(Integer processStatusIncrement){
this.processStatusIncrement = processStatusIncrement;
}
/**
* 获取 处理状态
* @return processStatusList
*/
public List<Integer> getProcessStatusList(){
return this.processStatusList;
}
/**
* 设置 处理状态
* @param processStatusList
*/
public void setProcessStatusList(List<Integer> processStatusList){
this.processStatusList = processStatusList;
}
/**
* 获取 处理状态
* @return processStatusNotList
*/
public List<Integer> getProcessStatusNotList(){
return this.processStatusNotList;
}
/**
* 设置 处理状态
* @param processStatusNotList
*/
public void setProcessStatusNotList(List<Integer> processStatusNotList){
this.processStatusNotList = processStatusNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -1820,6 +2127,135 @@ public class AttendanceLeaveRecordQuery extends AttendanceLeaveRecordEntity {
}
/**
* 设置 审核结果(1.申请通过,2.申请不通过)
* @param auditResult
*/
public AttendanceLeaveRecordQuery auditResult(Integer auditResult){
setAuditResult(auditResult);
return this;
}
/**
* 设置 开始 审核结果(1.申请通过,2.申请不通过)
* @param auditResultStart
*/
public AttendanceLeaveRecordQuery auditResultStart(Integer auditResultStart){
this.auditResultStart = auditResultStart;
return this;
}
/**
* 设置 结束 审核结果(1.申请通过,2.申请不通过)
* @param auditResultEnd
*/
public AttendanceLeaveRecordQuery auditResultEnd(Integer auditResultEnd){
this.auditResultEnd = auditResultEnd;
return this;
}
/**
* 设置 增加 审核结果(1.申请通过,2.申请不通过)
* @param auditResultIncrement
*/
public AttendanceLeaveRecordQuery auditResultIncrement(Integer auditResultIncrement){
this.auditResultIncrement = auditResultIncrement;
return this;
}
/**
* 设置 审核结果(1.申请通过,2.申请不通过)
* @param auditResultList
*/
public AttendanceLeaveRecordQuery auditResultList(List<Integer> auditResultList){
this.auditResultList = auditResultList;
return this;
}
/**
* 设置 审核结果(1.申请通过,2.申请不通过)
* @param auditResultNotList
*/
public AttendanceLeaveRecordQuery auditResultNotList(List<Integer> auditResultNotList){
this.auditResultNotList = auditResultNotList;
return this;
}
/**
* 设置 审核说明
* @param auditDesc
*/
public AttendanceLeaveRecordQuery auditDesc(String auditDesc){
setAuditDesc(auditDesc);
return this;
}
/**
* 设置 审核说明
* @param auditDescList
*/
public AttendanceLeaveRecordQuery auditDescList(List<String> auditDescList){
this.auditDescList = auditDescList;
return this;
}
/**
* 设置 处理状态
* @param processStatus
*/
public AttendanceLeaveRecordQuery processStatus(Integer processStatus){
setProcessStatus(processStatus);
return this;
}
/**
* 设置 开始 处理状态
* @param processStatusStart
*/
public AttendanceLeaveRecordQuery processStatusStart(Integer processStatusStart){
this.processStatusStart = processStatusStart;
return this;
}
/**
* 设置 结束 处理状态
* @param processStatusEnd
*/
public AttendanceLeaveRecordQuery processStatusEnd(Integer processStatusEnd){
this.processStatusEnd = processStatusEnd;
return this;
}
/**
* 设置 增加 处理状态
* @param processStatusIncrement
*/
public AttendanceLeaveRecordQuery processStatusIncrement(Integer processStatusIncrement){
this.processStatusIncrement = processStatusIncrement;
return this;
}
/**
* 设置 处理状态
* @param processStatusList
*/
public AttendanceLeaveRecordQuery processStatusList(List<Integer> processStatusList){
this.processStatusList = processStatusList;
return this;
}
/**
* 设置 处理状态
* @param processStatusNotList
*/
public AttendanceLeaveRecordQuery processStatusNotList(List<Integer> processStatusNotList){
this.processStatusNotList = processStatusNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -72,4 +72,11 @@ public class CheckAllRecordVo extends BaseEntityLong {
private String performType;
private String result;
private Integer checkStatus;
private String checkResult;
}
......@@ -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);
}
......
......@@ -25,6 +25,11 @@
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="appealTime" column="appealTime" />
<result property="auditResult" column="auditResult" />
<result property="auditDesc" column="auditDesc" />
<result property="auditTime" column="auditTime" />
<result property="processStatus" column="processStatus" />
</resultMap>
......@@ -92,23 +97,38 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('appealTime') or colPickMode == 1 and data.containsKey('appealTime')))">
a.appealTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('auditResult') or colPickMode == 1 and data.containsKey('auditResult')))">
a.auditResult,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('auditDesc') or colPickMode == 1 and data.containsKey('auditDesc')))">
a.auditDesc,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('auditTime') or colPickMode == 1 and data.containsKey('auditTime')))">
a.auditTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('processStatus') or colPickMode == 1 and data.containsKey('processStatus')))">
a.processStatus,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AttendanceLeaveRecordEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_attendance_leave_record
(leavePersonId,leavePerson,deptId,deptName,phoneNumber,leaveType,startTime,endTime,duration,reason,approverId,approver,attachment,attachmentPath,remark,createUserId,createTime,updateUserId,updateTime)
(leavePersonId,leavePerson,deptId,deptName,phoneNumber,leaveType,startTime,endTime,duration,reason,approverId,approver,attachment,attachmentPath,remark,createUserId,createTime,updateUserId,updateTime,appealTime,auditResult,auditDesc,auditTime,processStatus)
VALUES
(#{leavePersonId},#{leavePerson},#{deptId},#{deptName},#{phoneNumber},#{leaveType},#{startTime},#{endTime},#{duration},#{reason},#{approverId},#{approver},#{attachment},#{attachmentPath},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
(#{leavePersonId},#{leavePerson},#{deptId},#{deptName},#{phoneNumber},#{leaveType},#{startTime},#{endTime},#{duration},#{reason},#{approverId},#{approver},#{attachment},#{attachmentPath},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{appealTime},#{auditResult},#{auditDesc},#{auditTime},#{processStatus})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_attendance_leave_record
(leavePersonId,leavePerson,deptId,deptName,phoneNumber,leaveType,startTime,endTime,duration,reason,approverId,approver,attachment,attachmentPath,remark,createUserId,createTime,updateUserId,updateTime)
(leavePersonId,leavePerson,deptId,deptName,phoneNumber,leaveType,startTime,endTime,duration,reason,approverId,approver,attachment,attachmentPath,remark,createUserId,createTime,updateUserId,updateTime,appealTime,auditResult,auditDesc,auditTime,processStatus)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.leavePersonId},#{item.leavePerson},#{item.deptId},#{item.deptName},#{item.phoneNumber},#{item.leaveType},#{item.startTime},#{item.endTime},#{item.duration},#{item.reason},#{item.approverId},#{item.approver},#{item.attachment},#{item.attachmentPath},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
(#{item.leavePersonId},#{item.leavePerson},#{item.deptId},#{item.deptName},#{item.phoneNumber},#{item.leaveType},#{item.startTime},#{item.endTime},#{item.duration},#{item.reason},#{item.approverId},#{item.approver},#{item.attachment},#{item.attachmentPath},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.appealTime},#{item.auditResult},#{item.auditDesc},#{item.auditTime},#{item.processStatus})
</foreach>
</insert>
......@@ -196,6 +216,27 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('appealTime')) or (colPickMode==1 and !data.containsKey('appealTime'))">
a.appealTime=#{data.appealTime},
</if>
<if test="(colPickMode==0 and data.containsKey('auditResult')) or (colPickMode==1 and !data.containsKey('auditResult'))">
a.auditResult=#{data.auditResult},
</if>
<if test="(colPickMode==0 and data.containsKey('auditResultIncrement')) or (colPickMode==1 and !data.containsKey('auditResultIncrement'))">
a.auditResult=ifnull(a.auditResult,0) + #{data.auditResultIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('auditDesc')) or (colPickMode==1 and !data.containsKey('auditDesc'))">
a.auditDesc=#{data.auditDesc},
</if>
<if test="(colPickMode==0 and data.containsKey('auditTime')) or (colPickMode==1 and !data.containsKey('auditTime'))">
a.auditTime=#{data.auditTime},
</if>
<if test="(colPickMode==0 and data.containsKey('processStatus')) or (colPickMode==1 and !data.containsKey('processStatus'))">
a.processStatus=#{data.processStatus},
</if>
<if test="(colPickMode==0 and data.containsKey('processStatusIncrement')) or (colPickMode==1 and !data.containsKey('processStatusIncrement'))">
a.processStatus=ifnull(a.processStatus,0) + #{data.processStatusIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -376,6 +417,51 @@
</if>
</foreach>
</trim>
<trim prefix="appealTime=(case" suffix="ELSE appealTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('appealTime')) or (colPickMode==1 and !item.containsKey('appealTime'))">
when a.id=#{item.id} then #{item.appealTime}
</if>
</foreach>
</trim>
<trim prefix="auditResult=(case" suffix="ELSE auditResult end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('auditResult')) or (colPickMode==1 and !item.containsKey('auditResult'))">
when a.id=#{item.id} then #{item.auditResult}
</when>
<when test="(colPickMode==0 and item.containsKey('auditResultIncrement')) or (colPickMode==1 and !item.containsKey('auditResultIncrement'))">
when a.id=#{item.id} then ifnull(a.auditResult,0) + #{item.auditResultIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="auditDesc=(case" suffix="ELSE auditDesc end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('auditDesc')) or (colPickMode==1 and !item.containsKey('auditDesc'))">
when a.id=#{item.id} then #{item.auditDesc}
</if>
</foreach>
</trim>
<trim prefix="auditTime=(case" suffix="ELSE auditTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('auditTime')) or (colPickMode==1 and !item.containsKey('auditTime'))">
when a.id=#{item.id} then #{item.auditTime}
</if>
</foreach>
</trim>
<trim prefix="processStatus=(case" suffix="ELSE processStatus end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('processStatus')) or (colPickMode==1 and !item.containsKey('processStatus'))">
when a.id=#{item.id} then #{item.processStatus}
</when>
<when test="(colPickMode==0 and item.containsKey('processStatusIncrement')) or (colPickMode==1 and !item.containsKey('processStatusIncrement'))">
when a.id=#{item.id} then ifnull(a.processStatus,0) + #{item.processStatusIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -936,6 +1022,111 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('appealTime')">
<if test="conditionParamRef.appealTime != null ">
${_conditionType_} a.appealTime = #{${_conditionParam_}.appealTime}
</if>
<if test="conditionParamRef.appealTime == null">
${_conditionType_} a.appealTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('appealTimeStart') and conditionParamRef.appealTimeStart != null and conditionParamRef.appealTimeStart!=''">
${_conditionType_} a.appealTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.appealTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('appealTimeEnd') and conditionParamRef.appealTimeEnd != null and conditionParamRef.appealTimeEnd!=''">
${_conditionType_} a.appealTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.appealTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('auditResult')">
<if test="conditionParamRef.auditResult != null ">
${_conditionType_} a.auditResult = #{${_conditionParam_}.auditResult}
</if>
<if test="conditionParamRef.auditResult == null">
${_conditionType_} a.auditResult is null
</if>
</if>
<if test="conditionParamRef.containsKey('auditResultList') and conditionParamRef.auditResultList.size() > 0">
${_conditionType_} a.auditResult in
<foreach collection="conditionParamRef.auditResultList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('auditResultNotList') and conditionParamRef.auditResultNotList.size() > 0">
${_conditionType_} a.auditResult not in
<foreach collection="conditionParamRef.auditResultNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('auditResultStart') and conditionParamRef.auditResultStart != null">
${_conditionType_} a.auditResult <![CDATA[ >= ]]> #{${_conditionParam_}.auditResultStart}
</if>
<if test="conditionParamRef.containsKey('auditResultEnd') and conditionParamRef.auditResultEnd != null">
${_conditionType_} a.auditResult <![CDATA[ <= ]]> #{${_conditionParam_}.auditResultEnd}
</if>
<if test="conditionParamRef.containsKey('auditDesc')">
<if test="conditionParamRef.auditDesc != null and conditionParamRef.auditDesc != ''">
${_conditionType_} a.auditDesc like #{${_conditionParam_}.auditDesc}
</if>
<if test="conditionParamRef.auditDesc == null">
${_conditionType_} a.auditDesc is null
</if>
</if>
<if test="conditionParamRef.containsKey('auditDescList') and conditionParamRef.auditDescList.size() > 0">
${_conditionType_} a.auditDesc in
<foreach collection="conditionParamRef.auditDescList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('auditDescNotList') and conditionParamRef.auditDescNotList.size() > 0">
${_conditionType_} a.auditDesc not in
<foreach collection="conditionParamRef.auditDescNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('auditTime')">
<if test="conditionParamRef.auditTime != null ">
${_conditionType_} a.auditTime = #{${_conditionParam_}.auditTime}
</if>
<if test="conditionParamRef.auditTime == null">
${_conditionType_} a.auditTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('auditTimeStart') and conditionParamRef.auditTimeStart != null and conditionParamRef.auditTimeStart!=''">
${_conditionType_} a.auditTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.auditTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('auditTimeEnd') and conditionParamRef.auditTimeEnd != null and conditionParamRef.auditTimeEnd!=''">
${_conditionType_} a.auditTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.auditTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('processStatus')">
<if test="conditionParamRef.processStatus != null ">
${_conditionType_} a.processStatus = #{${_conditionParam_}.processStatus}
</if>
<if test="conditionParamRef.processStatus == null">
${_conditionType_} a.processStatus is null
</if>
</if>
<if test="conditionParamRef.containsKey('processStatusList') and conditionParamRef.processStatusList.size() > 0">
${_conditionType_} a.processStatus in
<foreach collection="conditionParamRef.processStatusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('processStatusNotList') and conditionParamRef.processStatusNotList.size() > 0">
${_conditionType_} a.processStatus not in
<foreach collection="conditionParamRef.processStatusNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('processStatusStart') and conditionParamRef.processStatusStart != null">
${_conditionType_} a.processStatus <![CDATA[ >= ]]> #{${_conditionParam_}.processStatusStart}
</if>
<if test="conditionParamRef.containsKey('processStatusEnd') and conditionParamRef.processStatusEnd != null">
${_conditionType_} a.processStatus <![CDATA[ <= ]]> #{${_conditionParam_}.processStatusEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -1049,6 +1240,31 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('appealTime')">
a.appealTime
<if test='orderCol.appealTime != null and "DESC".equalsIgnoreCase(orderCol.appealTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('auditResult')">
a.auditResult
<if test='orderCol.auditResult != null and "DESC".equalsIgnoreCase(orderCol.auditResult)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('auditDesc')">
a.auditDesc
<if test='orderCol.auditDesc != null and "DESC".equalsIgnoreCase(orderCol.auditDesc)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('auditTime')">
a.auditTime
<if test='orderCol.auditTime != null and "DESC".equalsIgnoreCase(orderCol.auditTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('processStatus')">
a.processStatus
<if test='orderCol.processStatus != null and "DESC".equalsIgnoreCase(orderCol.processStatus)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
......@@ -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