Commit 12c74a4a authored by 赵啸非's avatar 赵啸非

添加部门人数等字段;

添加假期详细扣减记录
parent c931aea6
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="员工id" prop="staffId" v-model="form.staffId" placeholder="请输入员工id"/>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" type="textarea" placeholder="请输入员工姓名"/>
<Field label="部门id" prop="deptId" v-model="form.deptId" placeholder="请输入部门id"/>
<Field label="部门名称" prop="deptName" v-model="form.deptName" type="textarea" placeholder="请输入部门名称"/>
<Field label="入职时间" prop="entryTime" v-model="form.entryTime" type="date" />
<Field label="事假" prop="personalLeaveDays" v-model="form.personalLeaveDays" placeholder="请输入事假"/>
<Field label="调休" prop="compensatedLeaveDays" v-model="form.compensatedLeaveDays" placeholder="请输入调休"/>
<Field label="病假" prop="sickLeaveDays" v-model="form.sickLeaveDays" placeholder="请输入病假"/>
<Field label="年假" prop="annualLeaveDays" v-model="form.annualLeaveDays" placeholder="请输入年假"/>
<Field label="婚假" prop="marriageLeaveDays" v-model="form.marriageLeaveDays" placeholder="请输入婚假"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="员工id" prop="staffId" v-model="form.staffId" placeholder="请输入员工id"/>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" type="textarea" placeholder="请输入员工姓名"/>
<Field label="部门id" prop="deptId" v-model="form.deptId" placeholder="请输入部门id"/>
<Field label="部门名称" prop="deptName" v-model="form.deptName" type="textarea" placeholder="请输入部门名称"/>
<Field label="入职时间" prop="entryTime" v-model="form.entryTime" type="date" />
<Field label="事假" prop="personalLeaveDays" v-model="form.personalLeaveDays" placeholder="请输入事假"/>
<Field label="调休" prop="compensatedLeaveDays" v-model="form.compensatedLeaveDays" placeholder="请输入调休"/>
<Field label="病假" prop="sickLeaveDays" v-model="form.sickLeaveDays" placeholder="请输入病假"/>
<Field label="年假" prop="annualLeaveDays" v-model="form.annualLeaveDays" placeholder="请输入年假"/>
<Field label="产假" prop="maternityLeaveDays" v-model="form.maternityLeaveDays" placeholder="请输入产假"/>
<Field label="陪产假" prop="paternityLeaveDays" v-model="form.paternityLeaveDays" placeholder="请输入陪产假"/>
<Field label="婚假" prop="marriageLeaveDays" v-model="form.marriageLeaveDays" placeholder="请输入婚假"/>
<Field label="例假" prop="menstrualLeaveDays" v-model="form.menstrualLeaveDays" placeholder="请输入例假"/>
<Field label="哺乳假" prop="breastfeedingLeaveDays" v-model="form.breastfeedingLeaveDays" placeholder="请输入哺乳假"/>
<Field label="丧假" prop="bereavementLeaveDays" v-model="form.bereavementLeaveDays" placeholder="请输入丧假"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row>
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceVacationBalanceDetail",
mixins: [form],
components: {
import form from "@/assets/mixins/formdialog";
export default {
name: "AttendanceVacationBalanceDetail",
mixins: [form],
components: {
},
created() {
this.changePath("attendance/vacation/balance")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "员工假期余额信息",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"entryTime",
],
// 表单校验
rules: {
}
};
},
},
created() {
this.changePath("attendance/vacation/balance")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "员工假期余额信息",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"entryTime",
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改员工假期余额信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/vacation/balance/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增员工假期余额信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/view";
this.getData();
this.pageInfo.type="view"
this.title = "员工假期余额信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改员工假期余额信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/vacation/balance/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增员工假期余额信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/view";
this.getData();
this.pageInfo.type="view"
this.title = "员工假期余额信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
staffId : null,
staffName : "",
deptId : null,
deptName : "",
entryTime : null,
personalLeaveDays : BigDecimal.valueOf(0),
compensatedLeaveDays : BigDecimal.valueOf(0),
sickLeaveDays : BigDecimal.valueOf(0),
annualLeaveDays : BigDecimal.valueOf(0),
marriageLeaveDays : BigDecimal.valueOf(0),
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
// 表单重置
reset() {
this.form = {
staffId : null,
staffName : "",
deptId : null,
deptName : "",
entryTime : null,
personalLeaveDays : 0,
compensatedLeaveDays : 0,
sickLeaveDays : 0,
annualLeaveDays : 0,
maternityLeaveDays : 0,
paternityLeaveDays : 0,
marriageLeaveDays : 0,
menstrualLeaveDays : 0,
breastfeedingLeaveDays : 0,
bereavementLeaveDays : 0,
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "AttendanceVacationBalanceList",
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);
},
},
data() {
return {
config: {
search: [
{
name: "staffId",
type: "text",
label: "员工id",
fuzzy: true
},
{
name: "deptId",
type: "text",
label: "部门id",
fuzzy: true
},
{
name: "entryTime",
type: "date",
label: "入职时间",
fuzzy: true
},
{
name: "personalLeaveDays",
type: "text",
label: "事假",
fuzzy: true
},
{
name: "compensatedLeaveDays",
type: "text",
label: "调休",
fuzzy: true
},
{
name: "sickLeaveDays",
type: "text",
label: "病假",
fuzzy: true
},
{
name: "annualLeaveDays",
type: "text",
label: "年假",
fuzzy: true
},
{
name: "marriageLeaveDays",
type: "text",
label: "婚假",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工id", prop: "staffId", formatter: this.formatter},
{label: "员工姓名", prop: "staffName"},
{label: "部门id", prop: "deptId", formatter: this.formatter},
{label: "部门名称", prop: "deptName"},
{label: "入职时间", prop: "entryTime", formatter: this.formatterDate},
{label: "事假", prop: "personalLeaveDays", formatter: this.formatterMoney},
{label: "调休", prop: "compensatedLeaveDays", formatter: this.formatterMoney},
{label: "病假", prop: "sickLeaveDays", formatter: this.formatterMoney},
{label: "年假", prop: "annualLeaveDays", formatter: this.formatterMoney},
{label: "婚假", prop: "marriageLeaveDays", formatter: this.formatterMoney},
{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: "AttendanceVacationBalanceList",
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);
},
/** 查看不同类型假期记录 */
handleCountDays(row,leavetype){
this.$post("/attendance/vacation/record/list", {
page: 1,
size: -1,
type:leavetype,
staffId:row.staffId
})
.then((res) => {
if (res.code == 1) {
//todo 抽屉打开 假期明细信息
//this.$message.success("激活设备成功!");
}
})
.catch((error) => {
this.$message.error(error.message);
});
}
},
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"},
{label: "部门名称", prop: "deptName"},
{label: "入职时间", prop: "entryTime", formatter: this.formatterDate},
{label: "事假", prop: "personalLeaveDays",formatter: (row) => {
return (
<div><el-link type="primary" onClick={() => {
this.handleCountDays(row,1);
}}>{row.personalLeaveDays}</el-link></div>
);
}},
{label: "调休", prop: "compensatedLeaveDays", formatter: this.formatterAmount},
{label: "病假", prop: "sickLeaveDays", formatter: this.formatterAmount},
{label: "年假", prop: "annualLeaveDays", formatter: this.formatterAmount},
{label: "产假", prop: "maternityLeaveDays", formatter: this.formatterAmount},
{label: "陪产假", prop: "paternityLeaveDays", formatter: this.formatterAmount},
{label: "婚假", prop: "marriageLeaveDays", formatter: this.formatterAmount},
{label: "例假", prop: "menstrualLeaveDays", formatter: this.formatterAmount},
{label: "哺乳假", prop: "breastfeedingLeaveDays", formatter: this.formatterAmount},
{label: "丧假", prop: "bereavementLeaveDays", formatter: this.formatterAmount},
{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} />
);
}
}
]
}
};
</script>
\ No newline at end of file
}
};
</script>
<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 label="员工id" prop="staffId" v-model="form.staffId" placeholder="请输入员工id"/>
<Field label="员工姓名" prop="staffName" v-model="form.staffName" type="textarea" placeholder="请输入员工姓名"/>
<Field label="请假类型" prop="type" v-model="form.type" type="select" :enumData="dict.type" placeholder="请选择请假类型"/>
<Field label="增减类型" prop="subAddType" v-model="form.subAddType" type="select" :enumData="dict.subAddType" placeholder="请选择增减类型"/>
<Field label="有效期" prop="validityPeriod" v-model="form.validityPeriod" type="textarea" placeholder="请输入有效期"/>
<Field label="增加或扣减天数" prop="subOrAddDays" v-model="form.subOrAddDays" placeholder="请输入增加或扣减天数"/>
<Field label="内容"><editor v-model="form.content" :min-height="256"/></Field>
<Field label="规则" prop="rule" v-model="form.rule" type="textarea" placeholder="请输入规则"/>
<Field label="理由" prop="reason" v-model="form.reason" type="textarea" placeholder="请输入理由"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" 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";
import Editor from '@/components/Editor';
export default {
mixins: [form],
components: {
dialogShow ,
Editor,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "员工假期记录信息",
// 是否显示弹出层
open: false,
toString:[
"type",
"subAddType",
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/record/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改员工假期记录信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "attendance/vacation/record/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增员工假期记录信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/record/view";
this.getData();
this.pageInfo.type="view"
this.title = "员工假期记录信息详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
staffId : null,
staffName : "",
type : null,
subAddType : 1,
validityPeriod : "0",
subOrAddDays : BigDecimal.valueOf(0),
content : "",
rule : "",
reason : "",
remark : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table";
export default {
name: "AttendanceVacationRecordList",
components: {
dialogShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工id", prop: "staffId", formatter: this.formatter},
{label: "员工姓名", prop: "staffName"},
{label: "请假类型", prop: "type",formatter: this.formatter},
{label: "增减类型", prop: "subAddType",formatter: this.formatter},
{label: "有效期", prop: "validityPeriod"},
{label: "增加或扣减天数", prop: "subOrAddDays", formatter: this.formatterMoney},
{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} />
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-view>
<el-descriptions :title="title" :column="column" :size="size" :colon="false" border>
<template slot="title">
<i class="el-icon-tickets"></i>
基本详细信息
</template>
<template slot="extra">
<el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
</template>
<el-descriptions-item label="员工id" label-class-name="labelClass" content-class-name="contentClass">
{{form.staffId}}
</el-descriptions-item>
<el-descriptions-item label="员工姓名" label-class-name="labelClass" content-class-name="contentClass">
{{form.staffName}}
</el-descriptions-item>
<el-descriptions-item label="请假类型" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatters("type", form.type) }}
</el-descriptions-item>
<el-descriptions-item label="增减类型" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatters("subAddType", form.subAddType) }}
</el-descriptions-item>
<el-descriptions-item label="有效期" label-class-name="labelClass" content-class-name="contentClass">
{{form.validityPeriod}}
</el-descriptions-item>
<el-descriptions-item label="增加或扣减天数" label-class-name="labelClass" content-class-name="contentClass">
{{form.subOrAddDays}}
</el-descriptions-item>
<el-descriptions-item label="内容" label-class-name="labelClass" content-class-name="contentClass">
<editor v-model="form.content" :min-height="256"/>
</el-descriptions-item>
<el-descriptions-item label="规则" label-class-name="labelClass" content-class-name="contentClass">
{{form.rule}}
</el-descriptions-item>
<el-descriptions-item label="理由" label-class-name="labelClass" content-class-name="contentClass">
{{form.reason}}
</el-descriptions-item>
<el-descriptions-item label="备注" label-class-name="labelClass" content-class-name="contentClass">
{{form.remark}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
import Editor from '@/components/Editor';
export default {
mixins: [view],
components: {
Editor,
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
"type",
"subAddType",
],
toArrays: [
],
toDate: [
]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
</style>
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 增减类型(1.增加,2.扣除)枚举类
*
* @author zxfei
*/
public enum SubAddTypeEnum {
增加(1, "增加"),
扣除(2, "扣除");
private Integer value;
private String desc;
SubAddTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static SubAddTypeEnum getByValue(Integer value) {
for (SubAddTypeEnum subAddTypeEnum : SubAddTypeEnum.values()) {
if (subAddTypeEnum.getValue() == value) {
return subAddTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (SubAddTypeEnum item : SubAddTypeEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import java.util.List;
/**
* 员工假期记录信息Dao
* 员工假期记录信息 DAO接口
*
* @author zxfei
* @date 2023-04-12
*/
public interface AttendanceVacationRecordDao extends ICRUDDao<AttendanceVacationRecordEntity,Long>{
}
package com.mortals.xhx.module.attendance.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.attendance.dao.AttendanceVacationRecordDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 员工假期记录信息DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-12
*/
@Repository("attendanceVacationRecordDao")
public class AttendanceVacationRecordDaoImpl extends BaseCRUDDaoMybatis<AttendanceVacationRecordEntity,Long> implements AttendanceVacationRecordDao {
}
package com.mortals.xhx.module.attendance.model;
import java.math.BigDecimal;
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.AttendanceVacationRecordVo;
/**
* 员工假期记录信息实体对象
*
* @author zxfei
* @date 2023-04-12
*/
public class AttendanceVacationRecordEntity extends AttendanceVacationRecordVo {
private static final long serialVersionUID = 1L;
/**
* 员工id
*/
@Excel(name = "员工id")
private Long staffId;
/**
* 员工姓名
*/
private String staffName;
/**
* 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假)
*/
private Integer type;
/**
* 增减类型(1.增加,2.扣除)
*/
private Integer subAddType;
/**
* 有效期
*/
private String validityPeriod;
/**
* 增加或扣减天数(天)
*/
private BigDecimal subOrAddDays;
/**
* 内容
*/
private String content;
/**
* 规则
*/
private String rule;
/**
* 理由
*/
private String reason;
/**
* 备注
*/
private String remark;
public AttendanceVacationRecordEntity(){}
/**
* 获取 员工id
* @return Long
*/
public Long getStaffId(){
return staffId;
}
/**
* 设置 员工id
* @param staffId
*/
public void setStaffId(Long staffId){
this.staffId = staffId;
}
/**
* 获取 员工姓名
* @return String
*/
public String getStaffName(){
return staffName;
}
/**
* 设置 员工姓名
* @param staffName
*/
public void setStaffName(String staffName){
this.staffName = staffName;
}
/**
* 获取 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假)
* @return Integer
*/
public Integer getType(){
return type;
}
/**
* 设置 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假)
* @param type
*/
public void setType(Integer type){
this.type = type;
}
/**
* 获取 增减类型(1.增加,2.扣除)
* @return Integer
*/
public Integer getSubAddType(){
return subAddType;
}
/**
* 设置 增减类型(1.增加,2.扣除)
* @param subAddType
*/
public void setSubAddType(Integer subAddType){
this.subAddType = subAddType;
}
/**
* 获取 有效期
* @return String
*/
public String getValidityPeriod(){
return validityPeriod;
}
/**
* 设置 有效期
* @param validityPeriod
*/
public void setValidityPeriod(String validityPeriod){
this.validityPeriod = validityPeriod;
}
/**
* 获取 增加或扣减天数(天)
* @return BigDecimal
*/
public BigDecimal getSubOrAddDays(){
return subOrAddDays;
}
/**
* 设置 增加或扣减天数(天)
* @param subOrAddDays
*/
public void setSubOrAddDays(BigDecimal subOrAddDays){
this.subOrAddDays = subOrAddDays;
}
/**
* 获取 内容
* @return String
*/
public String getContent(){
return content;
}
/**
* 设置 内容
* @param content
*/
public void setContent(String content){
this.content = content;
}
/**
* 获取 规则
* @return String
*/
public String getRule(){
return rule;
}
/**
* 设置 规则
* @param rule
*/
public void setRule(String rule){
this.rule = rule;
}
/**
* 获取 理由
* @return String
*/
public String getReason(){
return reason;
}
/**
* 设置 理由
* @param reason
*/
public void setReason(String reason){
this.reason = reason;
}
/**
* 获取 备注
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof AttendanceVacationRecordEntity) {
AttendanceVacationRecordEntity tmp = (AttendanceVacationRecordEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",staffId:").append(getStaffId());
sb.append(",staffName:").append(getStaffName());
sb.append(",type:").append(getType());
sb.append(",subAddType:").append(getSubAddType());
sb.append(",validityPeriod:").append(getValidityPeriod());
sb.append(",subOrAddDays:").append(getSubOrAddDays());
sb.append(",content:").append(getContent());
sb.append(",rule:").append(getRule());
sb.append(",reason:").append(getReason());
sb.append(",remark:").append(getRemark());
return sb.toString();
}
public void initAttrValue(){
this.staffId = null;
this.staffName = "";
this.type = null;
this.subAddType = 1;
this.validityPeriod = "0";
this.subOrAddDays = BigDecimal.valueOf(0);
this.content = "";
this.rule = "";
this.reason = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 员工假期记录信息视图对象
*
* @author zxfei
* @date 2023-04-12
*/
@Data
public class AttendanceVacationRecordVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
/**
* AttendanceVacationRecordService
*
* 员工假期记录信息 service接口
*
* @author zxfei
* @date 2023-04-12
*/
public interface AttendanceVacationRecordService extends ICRUDService<AttendanceVacationRecordEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.attendance.dao.AttendanceVacationRecordDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService;
/**
* AttendanceVacationRecordService
* 员工假期记录信息 service实现
*
* @author zxfei
* @date 2023-04-12
*/
@Service("attendanceVacationRecordService")
public class AttendanceVacationRecordServiceImpl extends AbstractCRUDServiceImpl<AttendanceVacationRecordDao, AttendanceVacationRecordEntity, Long> implements AttendanceVacationRecordService {
}
\ No newline at end of file
package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 员工假期记录信息
*
* @author zxfei
* @date 2023-04-12
*/
@RestController
@RequestMapping("attendance/vacation/record")
public class AttendanceVacationRecordController extends BaseCRUDJsonBodyMappingController<AttendanceVacationRecordService,AttendanceVacationRecordEntity,Long> {
@Autowired
private ParamService paramService;
public AttendanceVacationRecordController(){
super.setModuleDesc( "员工假期记录信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", paramService.getParamBySecondOrganize("AttendanceVacationRecord","type"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("AttendanceVacationRecord","subAddType"));
super.init(model, context);
}
}
\ No newline at end of file
......@@ -17,8 +17,8 @@ spring:
serialization:
WRITE_DATES_AS_TIMESTAMPS: true
default-property-inclusion: NON_NULL
# time-zone: GMT+8
# date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
dao:
exceptiontranslation:
enabled: false
......
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###员工假期记录信息列表
POST {{baseUrl}}/attendance/vacation/record/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###员工假期记录信息更新与保存
POST {{baseUrl}}/attendance/vacation/record/save
Authorization: {{authToken}}
Content-Type: application/json
{
"staffId":419,
"staffName":"ae63fr",
"type":363,
"subAddType":1,
"validityPeriod":"0",
"subOrAddDays":0,
"content":"quz3f7",
"rule":"zrag9p",
"reason":"kze1qs",
"remark":"88vnyt",
}
> {%
client.global.set("AttendanceVacationRecord_id", JSON.parse(response.body).data.id);
%}
###员工假期记录信息查看
GET {{baseUrl}}/attendance/vacation/record/info?id={{AttendanceVacationRecord_id}}
Authorization: {{authToken}}
Accept: application/json
###员工假期记录信息编辑
GET {{baseUrl}}/attendance/vacation/record/edit?id={{AttendanceVacationRecord_id}}
Authorization: {{authToken}}
Accept: application/json
###员工假期记录信息删除
GET {{baseUrl}}/attendance/vacation/record/delete?id={{AttendanceVacationRecord_id}}
Authorization: {{authToken}}
Accept: application/json
......@@ -522,3 +522,29 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '考勤方式', 'AttendanceGroup',
INSERT INTO `mortals_xhx_param` VALUES (null, '考勤方式', 'AttendanceGroup', 'attendanceType', '蓝牙打卡. 蓝牙打卡', '蓝牙打卡. 蓝牙打卡', 1, 4, 0, 'attendanceType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '考勤方式', 'AttendanceGroup', 'attendanceType', '考勤机打卡. 考勤机打卡', '考勤机打卡. 考勤机打卡', 1, 4, 0, 'attendanceType', NULL, NULL, NULL);
-- ----------------------------
-- 员工假期记录信息菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '员工假期记录信息', '/attendance/vacation/record/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 员工假期记录信息资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工假期记录信息-菜单管理-查看', '/attendance/vacation/record/list,/attendance/vacation/record/view,/attendance/vacation/record/info,/attendance/vacation/record/export,/attendance/vacation/record/exportExcel,/attendance/vacation/record/downloadTemplate,/attendance/vacation/record/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工假期记录信息-菜单管理-维护', '/attendance/vacation/record/add,/attendance/vacation/record/edit,/attendance/vacation/record/delete,/attendance/vacation/record/logicDelete,/attendance/vacation/record/save,/attendance/vacation/record/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 员工假期记录信息参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '1', '事假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '2', '调休', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '3', '病假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '4', '年假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '5', '产假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '6', '陪产假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '7', '婚假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '8', '例假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '9', '哺乳假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '请假类型', 'AttendanceVacationRecord', 'type', '10', '丧假', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '增减类型', 'AttendanceVacationRecord', 'subAddType', '1', '增加', 1, 4, 0, 'subAddType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '增减类型', 'AttendanceVacationRecord', 'subAddType', '2', '扣除', 1, 4, 0, 'subAddType', NULL, NULL, NULL);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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