Commit 991a067c authored by dll's avatar dll

提交

parents 767f6e95 4dffb1e2
...@@ -35,110 +35,109 @@ ...@@ -35,110 +35,109 @@
</el-row> </el-row>
<form-buttons @submit='submitForm' noCancelBtn /> <form-buttons @submit='submitForm' noCancelBtn />
</el-form> --> </el-form> -->
<div>
</div>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "AttendanceVacationBalanceDetail", name: "AttendanceVacationBalanceDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("attendance/vacation/balance")
created() { },
this.changePath("attendance/vacation/balance") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "员工假期余额信息",
// 弹出层标题 // 是否显示弹出层
title: "员工假期余额信息", open: false,
// 是否显示弹出层 direction:"rtl",
open: false, toString:[
direction:"rtl", ],
toString:[ toDate:[
], "entryTime",
toDate:[ ],
"entryTime", // 表单校验
], rules: {
// 表单校验 }
rules: { };
} },
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/edit"; this.urls.currUrl ="attendance/vacation/balance/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type="edit"
this.title = "修改员工假期余额信息"; this.title = "修改员工假期余额信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset()
this.urls.currUrl = "attendance/vacation/balance/add"; this.urls.currUrl = "attendance/vacation/balance/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type="add"
this.title = "新增员工假期余额信息"; this.title = "新增员工假期余额信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="attendance/vacation/balance/view"; this.urls.currUrl ="attendance/vacation/balance/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type="view"
this.title = "员工假期余额信息详细"; this.title = "员工假期余额信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : null, staffId : null,
staffName : "", staffName : "",
deptId : null, deptId : null,
deptName : "", deptName : "",
entryTime : null, entryTime : null,
personalLeaveDays : BigDecimal.valueOf(0), personalLeaveDays : 0,
compensatedLeaveDays : BigDecimal.valueOf(0), compensatedLeaveDays : 0,
sickLeaveDays : BigDecimal.valueOf(0), sickLeaveDays : 0,
annualLeaveDays : BigDecimal.valueOf(0), annualLeaveDays : 0,
marriageLeaveDays : BigDecimal.valueOf(0), maternityLeaveDays : 0,
remark : "", paternityLeaveDays : 0,
}; marriageLeaveDays : 0,
this.resetForm("form"); menstrualLeaveDays : 0,
}, breastfeedingLeaveDays : 0,
resetForm(refName) { bereavementLeaveDays : 0,
if (this.$refs[refName]) { remark : "",
this.$refs[refName].resetFields(); };
} this.resetForm("form");
}, },
}, resetForm(refName) {
}; if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script> </script>
<style scoped> <style scoped lang="less">
.tips{ .tips{
font-size: 14px; font-size: 14px;
color: #999; color: #999;
......
...@@ -9,98 +9,80 @@ ...@@ -9,98 +9,80 @@
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import drawerShow from "./drawershow"; import drawerShow from "./drawershow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "AttendanceVacationBalanceList", name: "AttendanceVacationBalanceList",
components: { components: {
drawerShow drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
}, },
methods: { methods: {
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
this.$refs.drawerform.add(row); this.$refs.drawerform.add(row);
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
doExport(){ /** 查看不同类型假期记录 */
this.isExport = true; handleCountDays(row,leavetype){
this.$download("/leave/record/exportExcel", { this.$post("/attendance/vacation/record/list", {
"idList": this.selection, page: 1,
'name': this.$route.query['name'], size: -1,
}, { type: "excel" }).then(() => this.isExport = false).catch(error => { type:leavetype,
this.isExport = false; staffId:row.staffId
this.$message.error(error.message); })
}) .then((res) => {
}, if (res.code == 1) {
}, //todo 抽屉打开 假期明细信息
data() { //this.$message.success("激活设备成功!");
return { }
isExport:false, })
config: { .catch((error) => {
isshowTabPane:true, this.$message.error(error.message);
search: [ });
{ }
name: "staffId",
type: "text",
label: "员工",
fuzzy: true
},
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
// {label: "员工id", prop: "staffId", formatter: this.formatter}, },
data() {
{label: "员工姓名", prop: "staffName"}, return {
config: {
// {label: "部门id", prop: "deptId", formatter: this.formatter}, search: [
],
{label: "部门名称", prop: "deptName"}, columns: [
{type: "selection", width: 60},
{label: "入职时间", prop: "entryTime", formatter: this.formatterDate}, {type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"},
{label: "事假(天)", prop: "personalLeaveDays", formatter: this.formatterMoney}, {label: "部门名称", prop: "deptName"},
{label: "入职时间", prop: "entryTime", formatter: this.formatterDate},
{label: "调休(天)", prop: "compensatedLeaveDays", formatter: this.formatterMoney}, {label: "事假(天)", prop: "personalLeaveDays", formatter: this.formatterMoney},
{label: "调休(天)", prop: "compensatedLeaveDays", formatter: this.formatterMoney},
{label: "病假(天)", prop: "sickLeaveDays", formatter: this.formatterMoney}, {label: "病假(天)", prop: "sickLeaveDays", formatter: this.formatterMoney},
{label: "年假(天)", prop: "annualLeaveDays", formatter: this.formatterMoney},
{label: "年假(天)", prop: "annualLeaveDays", formatter: this.formatterMoney}, {label: "婚假(tian)", prop: "marriageLeaveDays", formatter: this.formatterMoney},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "婚假(tian)", prop: "marriageLeaveDays", formatter: this.formatterMoney}, {
label: "操作",
// {label: "创建用户", prop: "createUserId", formatter: this.formatter}, width: 240,
{ formatter: row => {
label: "操作", return (
width: 240, <table-buttons noAdd noEdit noView noDel row={row}
formatter: row => { onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
return ( )
<table-buttons noAdd noEdit noView noDel 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
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov-dev</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>INFO</profiles.log.level> <profiles.log.level>INFO</profiles.log.level>
<package.environment>test</package.environment> <package.environment>test</package.environment>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<groupId>com.hikvision.ga</groupId> <groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId> <artifactId>artemis-http-client</artifactId>
<version>1.1.8</version> <version>1.1.8</version>
<!--<systemPath>${project.basedir}/src/main/resources/lib/artemis-http-client-1.1.8.jar</systemPath>--> <!-- <systemPath>${project.basedir}/src/main/resources/lib/artemis-http-client-1.1.8.jar</systemPath>-->
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -93,12 +93,6 @@ public class ArtemisPostTest { ...@@ -93,12 +93,6 @@ public class ArtemisPostTest {
return ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, "application/json"); return ArtemisHttpUtil.doPostStringArtemis(config,path, body, null, null, "application/json");
} }
public static String callPostApiGetDeptList() throws Exception { public static String callPostApiGetDeptList() throws Exception {
/** /**
* https://ip:port/artemis/api/resource/v1/org/orgList * https://ip:port/artemis/api/resource/v1/org/orgList
......
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
...@@ -4,7 +4,6 @@ import com.mortals.framework.exception.AppException; ...@@ -4,7 +4,6 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.base.framework.config.JsonUtils; import com.mortals.xhx.base.framework.config.JsonUtils;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.busiz.hik.ArtemisPostTest; import com.mortals.xhx.busiz.hik.ArtemisPostTest;
import com.mortals.xhx.busiz.rsp.DeptHikData; import com.mortals.xhx.busiz.rsp.DeptHikData;
import com.mortals.xhx.busiz.rsp.ListDept; import com.mortals.xhx.busiz.rsp.ListDept;
......
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
...@@ -26,4 +26,9 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{ ...@@ -26,4 +26,9 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
* */ * */
List<DeptEntity> queryAllList(); List<DeptEntity> queryAllList();
/**
* 统计部门人数
* */
} }
...@@ -24,7 +24,6 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements ...@@ -24,7 +24,6 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
@Override @Override
public List<DeptEntity> queryAllList() { public List<DeptEntity> queryAllList() {
return this.getList(new DeptEntity()); return this.getList(new DeptEntity());
} }
......
...@@ -16,4 +16,7 @@ public class DeptVo extends BaseEntityLong { ...@@ -16,4 +16,7 @@ public class DeptVo extends BaseEntityLong {
/** 子部门信息 */ /** 子部门信息 */
private List<DeptEntity> children = new ArrayList<>(); private List<DeptEntity> children = new ArrayList<>();
//成员数量
} }
\ No newline at end of file
package com.mortals.xhx.module.dept.web; package com.mortals.xhx.module.dept.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.alibaba.fastjson.JSONObject;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.framework.exception.AppException;
import com.mortals.xhx.module.dept.model.DeptQuery;
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 com.mortals.framework.model.Context;
import com.mortals.framework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.model.DeptTreeSelect; import com.mortals.xhx.module.dept.model.DeptTreeSelect;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.workman.model.WorkmanQuery;
import com.mortals.xhx.module.workman.service.WorkmanService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import static com.mortals.framework.ap.SysConstains.RESULT_KEY;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/** /**
* 部门信息 * 部门信息
...@@ -47,6 +37,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -47,6 +37,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
private ParamService paramService; private ParamService paramService;
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired
private WorkmanService workmanService;
public DeptController() { public DeptController() {
...@@ -56,7 +48,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -56,7 +48,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "deptStatus", paramService.getParamBySecondOrganize("Dept", "deptStatus")); this.addDict(model, "deptStatus", paramService.getParamBySecondOrganize("Dept", "deptStatus"));
this.addDict(model, "id", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
this.addDict(model, "remark", workmanService.find(new WorkmanQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getName(),(o, n)->n)));
super.init(model, context); super.init(model, context);
} }
...@@ -134,4 +127,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -134,4 +127,8 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
@Override
protected int doListAfter(DeptEntity query, Map<String, Object> model, Context context) throws AppException {
return super.doListAfter(query, model, context);
}
} }
\ No newline at end of file
...@@ -51,4 +51,9 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -51,4 +51,9 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* 兼职 * 兼职
* */ * */
int queryConcurrently(); int queryConcurrently();
/**
* 查询职位
* */
List<StaffEntity> queryDetp();
} }
...@@ -53,4 +53,11 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -53,4 +53,11 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryConcurrently")); return this.getSqlSession().selectOne(this.getSqlId("queryConcurrently"));
} }
@Override
public List<StaffEntity> queryDetp(){
return this.getSqlSession().selectList(this.getSqlId("queryDetp"));
}
} }
...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.staff.model.vo; ...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.staff.model.vo;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class StaffInfoVo { public class StaffInfoVo {
...@@ -19,4 +21,7 @@ public class StaffInfoVo { ...@@ -19,4 +21,7 @@ public class StaffInfoVo {
private Integer resignationStaff; private Integer resignationStaff;
//兼职 //兼职
private Integer concurrentlyStaff; private Integer concurrentlyStaff;
//刷新时间
private Date refreshDate;
} }
...@@ -3,6 +3,8 @@ import com.mortals.framework.service.ICRUDCacheService; ...@@ -3,6 +3,8 @@ import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import java.util.List;
/** /**
* StaffService * StaffService
* *
...@@ -14,4 +16,6 @@ import com.mortals.xhx.module.staff.model.vo.StaffInfoVo; ...@@ -14,4 +16,6 @@ import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll(); StaffInfoVo queryAll();
List<StaffEntity> queryDept();
} }
\ No newline at end of file
...@@ -10,6 +10,8 @@ import com.mortals.xhx.module.staff.service.StaffService; ...@@ -10,6 +10,8 @@ import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* StaffService * StaffService
* 员工基本信息 service实现 * 员工基本信息 service实现
...@@ -53,4 +55,10 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -53,4 +55,10 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation()); staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation());
return staffInfoVo; return staffInfoVo;
} }
@Override
public List<StaffEntity> queryDept() {
return staffDao.queryDetp();
}
} }
\ No newline at end of file
...@@ -17,8 +17,8 @@ spring: ...@@ -17,8 +17,8 @@ spring:
serialization: serialization:
WRITE_DATES_AS_TIMESTAMPS: true WRITE_DATES_AS_TIMESTAMPS: true
default-property-inclusion: NON_NULL default-property-inclusion: NON_NULL
# time-zone: GMT+8 time-zone: GMT+8
# date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
dao: dao:
exceptiontranslation: exceptiontranslation:
enabled: false enabled: false
......
This diff is collapsed.
This diff is collapsed.
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