Commit 0c041df2 authored by 姬鋆屾's avatar 姬鋆屾
parents 76152568 d4c360d8
...@@ -51,7 +51,12 @@ export const encodeURI = (data) => { ...@@ -51,7 +51,12 @@ export const encodeURI = (data) => {
* @returns {string} val 解析后的结果 * @returns {string} val 解析后的结果
*/ */
export function formatterDate(time) { export function formatterDate(time) {
if (!time) return ''; console.log("time",time)
if(time==='undefined'||time===null) {
return '--'}
if (!time) return '--';
console.log("time11111",time)
let date = new Date(Number(time)); let date = new Date(Number(time));
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
......
...@@ -49,6 +49,7 @@ const router = new Router({ ...@@ -49,6 +49,7 @@ const router = new Router({
...restBuilder("job", "job"), // 职位信息 ...restBuilder("job", "job"), // 职位信息
...restBuilder("staff/adjust/log", "staff/adjust/log"), // 员工调岗信息 ...restBuilder("staff/adjust/log", "staff/adjust/log"), // 员工调岗信息
...restBuilder("staff/onboard", "staff/onboard"), // 员工入职信息
...restBuilder("staff/regular", "staff/regular"), // 员工转正信息 ...restBuilder("staff/regular", "staff/regular"), // 员工转正信息
...restBuilder("staff/leave", "staff/leave"), // 员工离职信息 ...restBuilder("staff/leave", "staff/leave"), // 员工离职信息
...restBuilder("staff/contract", "staff/contract"), // 员工合同信息 ...restBuilder("staff/contract", "staff/contract"), // 员工合同信息
...@@ -127,7 +128,7 @@ const router = new Router({ ...@@ -127,7 +128,7 @@ const router = new Router({
...restBuilder("feedback", "feedback"), //反馈信息 ...restBuilder("feedback", "feedback"), //反馈信息
...restBuilder("feedback/addQuestion", "feedback/addQuestion"), //新增反馈 ...restBuilder("feedback/addQuestion", "feedback/addQuestion"), //新增反馈
...restBuilder("feedback/questionnaire", "feedback/questionnaire"), //问卷情况 ...restBuilder("feedback/questionnaire", "feedback/questionnaire"), //问卷情况
...restBuilder("feedback/question", "feedback/question"), //反馈问题 ...restBuilder("feedback/question", "feedback/question"), //反馈问题
...restBuilder("feedback/option", "feedback/option"), //反馈选项 ...restBuilder("feedback/option", "feedback/option"), //反馈选项
...restBuilder("feedback/answer", "feedback/answer"), //回答问题 ...restBuilder("feedback/answer", "feedback/answer"), //回答问题
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>异常时间:{{ form.errorTime ? form.errorTime : "--" }}</el-col >异常时间:{{ formatterDate(form.errorTime)}}</el-col
> >
<el-col :span="8" <el-col :span="8"
>上下班时间:{{ >上下班时间:{{
...@@ -45,9 +45,7 @@ ...@@ -45,9 +45,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10" <el-col :span="10"
>实际打卡时间:{{ >实际打卡时间:{{formatterDate(form.actualAttendTime)}}</el-col
form.actualAttendTime ? form.actualAttendTime : "--"
}}</el-col
> >
<el-col :span="9" <el-col :span="9"
>异常结果:{{ >异常结果:{{
...@@ -56,14 +54,14 @@ ...@@ -56,14 +54,14 @@
> >
<el-col :span="5" <el-col :span="5"
>加分/扣分方式:{{ >加分/扣分方式:{{
form.subMethod ? form.subMethod : "--" form.subAddType ? form.subAddType : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" <el-col :span="8"
>加分/扣分时间:{{ >加分/扣分时间:{{
form.deductTime ? form.deductTime : "--" formatterDate(form.deductTime)
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
...@@ -102,7 +100,7 @@ ...@@ -102,7 +100,7 @@
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>核查时间:{{ form.checkTime ? form.checkTime : "--" }}</el-col >核查时间:{{ formatterDate(form.checkTime) }}</el-col
> >
</el-row> </el-row>
</div> </div>
...@@ -115,7 +113,7 @@ ...@@ -115,7 +113,7 @@
>申诉说明:{{ form.appealDesc ? form.appealDesc : "--" }}</el-col >申诉说明:{{ form.appealDesc ? form.appealDesc : "--" }}</el-col
> >
<el-col :span="24" <el-col :span="24"
>申诉时间:{{ form.appealTime ? form.appealTime : "--" }}</el-col >申诉时间:{{ formatterDate(form.appealTime)}}</el-col
> >
<el-col :span="24" <el-col :span="24"
>申诉附件: >申诉附件:
...@@ -147,12 +145,10 @@ ...@@ -147,12 +145,10 @@
}}</el-col }}</el-col
> >
<el-col :span="8" <el-col :span="8"
>处理人员:{{ >处理人员{{util_formatter('updateUserId',form.updateUserId+"")}}</el-col
form.updateUserId ? form.updateUserId : "--"
}}</el-col
> >
<el-col :span="8" <el-col :span="8"
>处理时间:{{ form.appealTime ? form.appealTime : "--" }}</el-col >处理时间: {{ formatterDate(form.updateTime) }}</el-col
> >
</el-row> </el-row>
<el-row> <el-row>
...@@ -461,6 +457,7 @@ ...@@ -461,6 +457,7 @@
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import { timestampToTime } from "@/assets/utils/dateFormat.js"; import { timestampToTime } from "@/assets/utils/dateFormat.js";
import { downloadFile } from "@/assets/utils/index"; import { downloadFile } from "@/assets/utils/index";
import { formatterDate } from "@/assets/utils/index";
export default { export default {
name: "PerformAttendAppealDetail", name: "PerformAttendAppealDetail",
...@@ -482,13 +479,14 @@ export default { ...@@ -482,13 +479,14 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
toString: ["subMethod", "subAddType", "processStatus", "appealResult"], toString: ["subMethod", "subAddType", "processStatus", "appealResult", "updateUserId"],
toDate: [ toDate: [
"attendanceDate", "attendanceDate",
"errorTime", "errorTime",
"actualAttendTime", "actualAttendTime",
"checkTime", "checkTime",
"appealTime", "appealTime",
], ],
// 表单校验 // 表单校验
rules: { rules: {
...@@ -502,6 +500,14 @@ export default { ...@@ -502,6 +500,14 @@ export default {
}, },
methods: { methods: {
util_formatter(key, val) {
try {
return this.dict[key][val];
} catch (error) {
return val;
}
},
formatterDate,
// 下载附件 // 下载附件
hanldeDownloadFile(val) { hanldeDownloadFile(val) {
console.log(val); console.log(val);
......
...@@ -172,13 +172,13 @@ export default { ...@@ -172,13 +172,13 @@ export default {
{ label: "所属部门", prop: "deptName" }, { label: "所属部门", prop: "deptName" },
{ label: "违规类型", prop: "irregularOtherType" }, { label: "违规类型", prop: "irregularOtherType" },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleId", formatter: this.formatter },
{ label: "加分/扣分方式", prop: "subMethod", formatter: this.formatter }, { label: "加分/扣分方式", prop: "subAddType", formatter: this.formatter },
{ {
label: "加分/扣分时间", label: "加分/扣分时间",
prop: "attendanceDate", prop: "deductTime",
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
...@@ -225,6 +225,7 @@ export default { ...@@ -225,6 +225,7 @@ export default {
onDel={this.toDel} onDel={this.toDel}
/> />
) : ( ) : (
<table-buttons <table-buttons
noAdd noAdd
noDel noDel
......
...@@ -122,11 +122,11 @@ ...@@ -122,11 +122,11 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }} {{ form.filePaths ? picMatter(form.filePaths) : "--" }}
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.snapPath" :value="form.filePaths"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
......
...@@ -218,11 +218,20 @@ export default { ...@@ -218,11 +218,20 @@ export default {
{ label: "异常结果", prop: "errorResult" }, { label: "异常结果", prop: "errorResult" },
/*
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "filePaths",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
*/
{
label: "图片凭证",
prop: "filePaths",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleNme" }, { label: "绩效规则", prop: "ruleNme" },
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<span>最近更新:</span><span>{{ val.createTime }}</span> <span>最近更新:</span><span>{{ val.createTime }}</span>
</p> </p>
<p class="goal_txt"> <p class="goal_txt">
<span>更新人员:</span><span>{{ val.createUserId }}</span> <span>更新人员:</span><span>{{ val.createUserName }}</span>
</p> </p>
<div class="button_box"> <div class="button_box">
<el-button <el-button
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
data() { data() {
return { return {
config: { config: {
isshowTabPane: true,
search: [ search: [
{ {
name: "fullName", name: "fullName",
...@@ -109,4 +110,4 @@ ...@@ -109,4 +110,4 @@
}; };
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
data() { data() {
return { return {
config: { config: {
isshowTabPane: true,
search: [ search: [
{ {
name: "staffName", name: "staffName",
...@@ -113,4 +114,4 @@ ...@@ -113,4 +114,4 @@
}; };
} }
}; };
</script> </script>
\ No newline at end of file
<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" placeholder="请输入员工姓名"/>
<Field label="性别" prop="gender" v-model="form.gender" type="select" :enumData="dict.gender" placeholder="请选择性别"/>
<Field label="出生日期" prop="birthday" v-model="form.birthday" type="date" />
<Field label="照片" prop="photoPath" v-model="form.photoPath" type="textarea" placeholder="请输入照片"/>
<Field label="联系电话" prop="phoneNumber" v-model="form.phoneNumber" placeholder="请输入联系电话"/>
<Field label="身份证号码" prop="idCard" v-model="form.idCard" placeholder="请输入身份证号码"/>
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/>
<Field label="入职登记表"><fileUpload v-model="form.filePath" prePath="/file/fileupload"/></Field>
<Field label="政治面貌 " prop="politicalstatus" v-model="form.politicalstatus" type="select" :enumData="dict.politicalstatus" placeholder="请选择政治面貌 "/>
<Field label="所属部门" prop="deptId" v-model="form.deptId" placeholder="请输入所属部门"/>
<Field label="所属部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入所属部门名称"/>
<Field label="职位ID" prop="jobId" v-model="form.jobId" placeholder="请输入职位ID"/>
<Field label="职位名称" prop="jobName" v-model="form.jobName" placeholder="请输入职位名称"/>
<Field label="员工类型" prop="staffType" v-model="form.staffType" type="select" :enumData="dict.staffType" placeholder="请选择员工类型"/>
<Field label="员工状态" prop="onBoardStatus" v-model="form.onBoardStatus" type="select" :enumData="dict.onBoardStatus" placeholder="请选择员工状态"/>
<Field label="入职时间" prop="entryDate" v-model="form.entryDate" type="date" />
</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 FileUpload from '@/components/FileUpload';
export default {
mixins: [form],
components: {
dialogShow ,
FileUpload,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "员工入职信息",
// 是否显示弹出层
open: false,
toString:[
"gender",
"politicalstatus",
"staffType",
"onBoardStatus",
],
// 表单校验
rules: {
staffName: [
{required: true,message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="staff/onboard/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改员工入职信息";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "staff/onboard/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增员工入职信息";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="staff/onboard/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 : "",
gender : 1,
birthday : null,
photoPath : "",
phoneNumber : "",
idCard : "",
workNum : "",
filePath : "",
politicalstatus : 1,
deptId : null,
deptName : "",
jobId : null,
jobName : "",
staffType : 1,
onBoardStatus : 1,
entryDate : null,
};
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: "StaffOnboardList",
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: {
isshowTabPane: true,
search: [
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "员工姓名", prop: "staffName"},
{label: "性别", prop: "gender",formatter: this.formatter},
{label: "政治面貌 ", prop: "politicalstatus",formatter: this.formatter},
{label: "员工类型", prop: "staffType",formatter: this.formatter},
{label: "员工状态", prop: "onBoardStatus",formatter: this.formatter},
{label: "入职时间", prop: "entryDate", formatter: this.formatterDate},
{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>
<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("gender", form.gender) }}
</el-descriptions-item>
<el-descriptions-item label="出生日期" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.birthday)}}
</el-descriptions-item>
<el-descriptions-item label="照片" label-class-name="labelClass" content-class-name="contentClass">
{{form.photoPath}}
</el-descriptions-item>
<el-descriptions-item label="联系电话" label-class-name="labelClass" content-class-name="contentClass">
{{form.phoneNumber}}
</el-descriptions-item>
<el-descriptions-item label="身份证号码" label-class-name="labelClass" content-class-name="contentClass">
{{form.idCard}}
</el-descriptions-item>
<el-descriptions-item label="工号" label-class-name="labelClass" content-class-name="contentClass">
{{form.workNum}}
</el-descriptions-item>
<el-descriptions-item label="入职登记表" label-class-name="labelClass" content-class-name="contentClass">
<fileUpload v-model="form.filePath" prePath="/file/fileupload"/>
</el-descriptions-item>
<el-descriptions-item label="政治面貌 " label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatters("politicalstatus", form.politicalstatus) }}
</el-descriptions-item>
<el-descriptions-item label="所属部门" label-class-name="labelClass" content-class-name="contentClass">
{{form.deptId}}
</el-descriptions-item>
<el-descriptions-item label="所属部门名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.deptName}}
</el-descriptions-item>
<el-descriptions-item label="职位ID" label-class-name="labelClass" content-class-name="contentClass">
{{form.jobId}}
</el-descriptions-item>
<el-descriptions-item label="职位名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.jobName}}
</el-descriptions-item>
<el-descriptions-item label="员工类型" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatters("staffType", form.staffType) }}
</el-descriptions-item>
<el-descriptions-item label="员工状态" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatters("onBoardStatus", form.onBoardStatus) }}
</el-descriptions-item>
<el-descriptions-item label="入职时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.entryDate)}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
import FileUpload from '@/components/FileUpload';
export default {
mixins: [view],
components: {
FileUpload,
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
"gender",
"politicalstatus",
"staffType",
"onBoardStatus",
],
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
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
data() { data() {
return { return {
config: { config: {
isshowTabPane: true,
search: [ search: [
{ {
name: "staffName", name: "staffName",
...@@ -105,4 +106,4 @@ ...@@ -105,4 +106,4 @@
}; };
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
v-model="form.mobile" v-model="form.mobile"
:maxLength="11" :maxLength="11"
/> />
<!-- <Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' /> <Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' />
<Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' /> --> <!-- <Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' />-->
<Field <Field
label="角色分配" label="角色分配"
:span="24" :span="24"
......
...@@ -344,7 +344,7 @@ export default { ...@@ -344,7 +344,7 @@ export default {
分配角色 分配角色
</el-button> </el-button>
*/} */}
<span> </span>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -353,6 +353,15 @@ export default { ...@@ -353,6 +353,15 @@ export default {
> >
分配部门 分配部门
</el-button> </el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-share"
onClick={() => this.distributeDept(row)}
>
修改密码
</el-button>
</div> </div>
); );
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<profiles.hik.appKey>25128371</profiles.hik.appKey> <profiles.hik.appKey>25128371</profiles.hik.appKey>
<profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret> <profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret>
<profiles.dingtalk.domain>https://oapi.dingtalk.com</profiles.dingtalk.domain> <profiles.dingtalk.domain>http://172.15.28.113:8918</profiles.dingtalk.domain>
<profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId> <profiles.dingtalk.agentId>2652674890</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey> <profiles.dingtalk.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret> <profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret>
......
...@@ -33,7 +33,7 @@ public class MessageServiceImpl implements MessageService { ...@@ -33,7 +33,7 @@ public class MessageServiceImpl implements MessageService {
msg.setMsgtype("link"); msg.setMsgtype("link");
Link link = new Link(); Link link = new Link();
link.setPicUrl(""); link.setPicUrl("");
link.setMessageUrl("webUrl" + dingMsg.getPath()); link.setMessageUrl(webUrl + dingMsg.getPath());
if (SubAddTypeEnum.增加.getValue() == dingMsg.getSubAddType()) { if (SubAddTypeEnum.增加.getValue() == dingMsg.getSubAddType()) {
link.setText(String.format("你好,经人工核实后你在%%-%s" + link.setText(String.format("你好,经人工核实后你在%%-%s" +
...@@ -47,6 +47,8 @@ public class MessageServiceImpl implements MessageService { ...@@ -47,6 +47,8 @@ public class MessageServiceImpl implements MessageService {
msg.setLink(link); msg.setLink(link);
workMsgReq.setUseridList(dingMsg.getUserIds()); workMsgReq.setUseridList(dingMsg.getUserIds());
workMsgReq.setMsg(msg);
Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq); Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq);
if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) { if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) {
String requestId = sendWorkRest.getData(); String requestId = sendWorkRest.getData();
...@@ -70,6 +72,7 @@ public class MessageServiceImpl implements MessageService { ...@@ -70,6 +72,7 @@ public class MessageServiceImpl implements MessageService {
} }
msg.setText(text); msg.setText(text);
workMsgReq.setUseridList(dingMsg.getUserIds()); workMsgReq.setUseridList(dingMsg.getUserIds());
workMsgReq.setMsg(msg);
Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq); Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq);
if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) { if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) {
String requestId = sendWorkRest.getData(); String requestId = sendWorkRest.getData();
......
...@@ -3,7 +3,6 @@ package com.mortals.xhx.base.system.user.web; ...@@ -3,7 +3,6 @@ package com.mortals.xhx.base.system.user.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.IBaseEnum; import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
...@@ -17,6 +16,7 @@ import com.mortals.xhx.base.system.role.service.RoleUserService; ...@@ -17,6 +16,7 @@ import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.UserStatus; import com.mortals.xhx.common.code.UserStatus;
import com.mortals.xhx.common.code.UserType;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
...@@ -60,7 +60,7 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -60,7 +60,7 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "userType", IBaseEnum.getEnumMap(UserType.class)); this.addDict(model, "userType", UserType.getEnumMap());
this.addDict(model, "status", UserStatus.getEnumMap()); this.addDict(model, "status", UserStatus.getEnumMap());
this.addDict(model, "roleIds", roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName()))); this.addDict(model, "roleIds", roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName())));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
......
...@@ -138,7 +138,20 @@ public class TestController { ...@@ -138,7 +138,20 @@ public class TestController {
if (!ObjectUtils.isEmpty(staffEntity.getPicUri())) { if (!ObjectUtils.isEmpty(staffEntity.getPicUri())) {
ImgReq imgReq = new ImgReq(); ImgReq imgReq = new ImgReq();
imgReq.setUrl(staffEntity.getPicUri()); imgReq.setUrl(staffEntity.getPicUri());
Rest<String> rest = faceService.downloadPicture(imgReq); imgReq.setServerIndexCode(staffEntity.getServerIndexCode());
//Rest<String> rest = faceService.downloadPicture(imgReq);
try {
InputStream in = faceService.callPostImgs(imgReq);
if (!ObjectUtils.isEmpty(in)) {
MultipartFile file = ServletUtils.getMultipartFile(in, "snap.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload/snap/" + DateUtil.today(), null);
staffEntity.setPhotoPath(filePath);
updateList.add(staffEntity);
}
} catch (Exception e) {
log.error("下载出错");
}
/*
if (YesNoEnum.YES.getValue() == rest.getCode()) { if (YesNoEnum.YES.getValue() == rest.getCode()) {
byte[] bytes = Base64.decode(rest.getData()); byte[] bytes = Base64.decode(rest.getData());
if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) { if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) {
...@@ -151,7 +164,7 @@ public class TestController { ...@@ -151,7 +164,7 @@ public class TestController {
} }
} else { } else {
log.info("download:{}", JSON.toJSONString(rest)); log.info("download:{}", JSON.toJSONString(rest));
} }*/
} }
} }
if (!ObjectUtils.isEmpty(updateList)) { if (!ObjectUtils.isEmpty(updateList)) {
......
...@@ -157,6 +157,8 @@ public class InspectSaveReq extends BaseReq { ...@@ -157,6 +157,8 @@ public class InspectSaveReq extends BaseReq {
private String filePaths; private String filePaths;
private String windowNum;
} }
...@@ -66,4 +66,25 @@ public class PerformInfo { ...@@ -66,4 +66,25 @@ public class PerformInfo {
private Integer appealStatus; private Integer appealStatus;
private String deductPerson;
private Date deductTime;
/**
* 核查人员
*/
private String checkPerson;
/**
* 核查时间
*/
private Date checkTime;
/**
* 核查说明
*/
private String checkDesc;
/**
* 核查结果
*/
private String checkResult;
} }
...@@ -214,7 +214,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq> ...@@ -214,7 +214,7 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
recordEntity.setRuleNme(rule.getName()); recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin"); recordEntity.setDeductPerson("admin");
......
...@@ -67,9 +67,11 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -67,9 +67,11 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap()); this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap()); this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap()); this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
} }
/** /**
......
...@@ -156,6 +156,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> { ...@@ -156,6 +156,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
feedbackAnswerEntity.setCreateTime(new Date()); feedbackAnswerEntity.setCreateTime(new Date());
List<FeedbackAnswerOptionEntity> feedbackAnswerOptionList = feedbackAnswerEntity.getFeedbackAnswerOptionList(); List<FeedbackAnswerOptionEntity> feedbackAnswerOptionList = feedbackAnswerEntity.getFeedbackAnswerOptionList();
for (FeedbackAnswerOptionEntity feedbackAnswerOptionEntity : feedbackAnswerOptionList) { for (FeedbackAnswerOptionEntity feedbackAnswerOptionEntity : feedbackAnswerOptionList) {
feedbackAnswerOptionEntity.setCreateUserId(context.getUser().getId()); feedbackAnswerOptionEntity.setCreateUserId(context.getUser().getId());
feedbackAnswerOptionEntity.setCreateTime(new Date()); feedbackAnswerOptionEntity.setCreateTime(new Date());
} }
......
...@@ -91,9 +91,11 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -91,9 +91,11 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap()); this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap()); this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap()); this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
} }
/** /**
...@@ -282,11 +284,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -282,11 +284,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
recordEntity.setRuleNme(rule.getName()); recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setErrorTime(new Date());
recordEntity.setCreateUserId(context.getUser().getId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformAttendRecordEntity save = attendRecordService.save(recordEntity); PerformAttendRecordEntity save = attendRecordService.save(recordEntity);
......
...@@ -86,9 +86,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -86,9 +86,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap()); this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap()); this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap()); this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
} }
/** /**
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 激活状态 (0.未激活,1.已激活)枚举类
*
* @author zxfei
*/
public enum ActiveEnum {
未激活(0, "未激活"),
已激活(1, "已激活");
private Integer value;
private String desc;
ActiveEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ActiveEnum getByValue(Integer value) {
for (ActiveEnum activeEnum : ActiveEnum.values()) {
if (activeEnum.getValue() == value) {
return activeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ActiveEnum item : ActiveEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum AgentEnum {
SELF(0, "本人办理"),
OTHER(1, "代办");
private int value;
private String desc;
private AgentEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AgentEnum getByValue(int value) {
AgentEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
AgentEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
AgentEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
AgentEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 告警级别(0.危险,1.次要,2.一般)枚举类
*
* @author zxfei
*/
public enum AlarmLevelEnum {
危险(0, "危险"),
次要(1, "次要"),
一般(2, "一般");
private Integer value;
private String desc;
AlarmLevelEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AlarmLevelEnum getByValue(Integer value) {
for (AlarmLevelEnum alarmLevelEnum : AlarmLevelEnum.values()) {
if (alarmLevelEnum.getValue() == value) {
return alarmLevelEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (AlarmLevelEnum item : AlarmLevelEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 告警状态,来自工单系统(0.未清除,1.清除未确认,2.清除已确认)枚举类
*
* @author zxfei
*/
public enum AlarmStatusEnum {
未清除(0, "未清除"),
清除未确认(1, "清除未确认"),
清除已确认(2, "清除已确认");
private Integer value;
private String desc;
AlarmStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AlarmStatusEnum getByValue(Integer value) {
for (AlarmStatusEnum alarmStatusEnum : AlarmStatusEnum.values()) {
if (alarmStatusEnum.getValue() == value) {
return alarmStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (AlarmStatusEnum item : AlarmStatusEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 告警类型,(0.离线)枚举类
*
* @author zxfei
*/
public enum AlarmTypeEnum {
离线(0, "离线");
private Integer value;
private String desc;
AlarmTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static AlarmTypeEnum getByValue(Integer value) {
for (AlarmTypeEnum alarmTypeEnum : AlarmTypeEnum.values()) {
if (alarmTypeEnum.getValue() == value) {
return alarmTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (AlarmTypeEnum item : AlarmTypeEnum.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.common.code;
public enum AssetFlowStatusEnum {
/** 任意状态 */
Special_597("597", "任意状态"),
/** 回前状态 */
Special_598("598", "回前状态"),
/** 不变状态 */
Special_599("599", "不变状态");
private String value;
private String desc;
AssetFlowStatusEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static AssetFlowStatusEnum getByValue(String value) {
for (AssetFlowStatusEnum YesNoEnum : AssetFlowStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum BomStatusEnum implements IBaseEnum{
BOM_EDIT(401, "修订中"),
BOM_AUDIT(402, "审核中"),
BOM_PUBLISH(403, "已发布");
private int value;
private String desc;
BomStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static BomStatusEnum getByValue(int value) {
for (BomStatusEnum YesNoEnum : BomStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (BomStatusEnum item : BomStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 合同类型(1.纸质)枚举类
*
* @author zxfei
*/
public enum ContractTypeEnum {
纸质(1, "纸质");
private Integer value;
private String desc;
ContractTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ContractTypeEnum getByValue(Integer value) {
for (ContractTypeEnum contractTypeEnum : ContractTypeEnum.values()) {
if (contractTypeEnum.getValue() == value) {
return contractTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ContractTypeEnum item : ContractTypeEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 部门状态(0.停用,1.启用)枚举类
*
* @author zxfei
*/
public enum DeptStatusEnum {
停用(0, "停用"),
启用(1, "启用");
private Integer value;
private String desc;
DeptStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeptStatusEnum getByValue(Integer value) {
for (DeptStatusEnum deptStatusEnum : DeptStatusEnum.values()) {
if (deptStatusEnum.getValue() == value) {
return deptStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeptStatusEnum item : DeptStatusEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 数据获取方式(0.主动上报,1被动拉取)枚举类
*
* @author zxfei
*/
public enum DeviceDataSourceWayEnum {
主动上报(0, "主动上报");
private Integer value;
private String desc;
DeviceDataSourceWayEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceDataSourceWayEnum getByValue(Integer value) {
for (DeviceDataSourceWayEnum deviceDataSourceWayEnum : DeviceDataSourceWayEnum.values()) {
if (deviceDataSourceWayEnum.getValue() == value) {
return deviceDataSourceWayEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceDataSourceWayEnum item : DeviceDataSourceWayEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备请求方式,1:新增,2:修改,3:删除,4:激活,5:启用,6:停用
*
* @author zxfei
*/
public enum DeviceMethodEnum {
ADD(1, "新增"),
UPDATE(2, "修改"),
DEL(3, "删除"),
ACTIVE(4, "激活"),
ENABLED(5, "启用"),
STOP(6, "停用"),
ONLINE(7, "上线"),
OFFLINE(8, "下线")
;
private Integer value;
private String desc;
DeviceMethodEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceMethodEnum getByValue(Integer value) {
for (DeviceMethodEnum deviceTypeEnum : DeviceMethodEnum.values()) {
if (deviceTypeEnum.getValue() == value) {
return deviceTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceMethodEnum item : DeviceMethodEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 在线状态 (0.离线,1.在线)枚举类
*
* @author zxfei
*/
public enum DeviceOnlineStatusEnum {
离线(0, "离线"),
在线(1, "在线");
private Integer value;
private String desc;
DeviceOnlineStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceOnlineStatusEnum getByValue(Integer value) {
for (DeviceOnlineStatusEnum deviceOnlineStatusEnum : DeviceOnlineStatusEnum.values()) {
if (deviceOnlineStatusEnum.getValue() == value) {
return deviceOnlineStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceOnlineStatusEnum item : DeviceOnlineStatusEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 利旧设备
*/
public enum DeviceSourceEnum {
(0, "是"),
(1, "否");
private Integer value;
private String desc;
DeviceSourceEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceSourceEnum getByValue(Integer value) {
for (DeviceSourceEnum enabledEnum : DeviceSourceEnum.values()) {
if (enabledEnum.getValue() == value) {
return enabledEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceSourceEnum item : DeviceSourceEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备来源(0.子设备,1.网关设备,2.直连设备)枚举类
*
* @author zxfei
*/
public enum DeviceSrcEnum {
子设备(0, "子设备"),
网关设备(1, "网关设备"),
直连设备(2, "直连设备");
private Integer value;
private String desc;
DeviceSrcEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceSrcEnum getByValue(Integer value) {
for (DeviceSrcEnum deviceSrcEnum : DeviceSrcEnum.values()) {
if (deviceSrcEnum.getValue() == value) {
return deviceSrcEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceSrcEnum item : DeviceSrcEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备状态 (0.未激活,1.离线,2.在线)枚举类
*
* @author zxfei
*/
public enum DeviceStatusEnum {
全部(null, "全部"),
未激活(0, "未激活"),
离线(1, "离线"),
在线(2, "在线");
private Integer value;
private String desc;
DeviceStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceStatusEnum getByValue(Integer value) {
for (DeviceStatusEnum deviceStatusEnum : DeviceStatusEnum.values()) {
if (deviceStatusEnum.getValue() == value) {
return deviceStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceStatusEnum item : DeviceStatusEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备类型(1.呼叫器,2.窗口屏, 3.评价器,4.集中屏, 5.排号机,6.im设备, 7.样表设备,8.取件柜, 9.信息发布,10.导视机,11.开标室设备,12.背靠背)枚举类
*
* @author zxfei
*/
public enum DeviceTypeEnum {
呼叫器(1, "呼叫器"),
窗口屏(2, "窗口屏"),
评价器(3, "评价器"),
集中屏(4, "集中屏"),
排号机(5, "排号机"),
im设备(6, "im设备"),
样表设备(7, "样表设备"),
取件柜(8, "取件柜"),
信息发布(9, "信息发布"),
导视机(10, "导视机"),
开标室设备(11, "开标室设备"),
背靠背(12, "背靠背");
private Integer value;
private String desc;
DeviceTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceTypeEnum getByValue(Integer value) {
for (DeviceTypeEnum deviceTypeEnum : DeviceTypeEnum.values()) {
if (deviceTypeEnum.getValue() == value) {
return deviceTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceTypeEnum item : DeviceTypeEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 是否部署(0.否,1.是)枚举类
*
* @author zxfei
*/
public enum DistributeEnum {
(0, "否"),
(1, "是");
private Integer value;
private String desc;
DistributeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DistributeEnum getByValue(Integer value) {
for (DistributeEnum distributeEnum : DistributeEnum.values()) {
if (distributeEnum.getValue() == value) {
return distributeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DistributeEnum item : DistributeEnum.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,12 +4,12 @@ import java.util.LinkedHashMap; ...@@ -4,12 +4,12 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* 启用状态 (0.停止,1.启用)枚举类 * 启用状态 (0.停止,1.启用)枚举类
* *
* @author zxfei * @author zxfei
*/ */
public enum EnabledEnum { public enum EnabledEnum {
(0, "停止"), (0, "停用"),
启用(1, "启用"); 启用(1, "启用");
private Integer value; private Integer value;
private String desc; private String desc;
...@@ -37,11 +37,11 @@ public enum EnabledEnum { ...@@ -37,11 +37,11 @@ public enum EnabledEnum {
} }
/** /**
* 获取Map集合 * 获取Map集合
* *
* @param eItem 不包含项 * @param eItem 不包含项
* @return * @return
*/ */
public static Map<String, String> getEnumMap(Integer... eItem) { public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>(); Map<String, String> resultMap = new LinkedHashMap<>();
for (EnabledEnum item : EnabledEnum.values()) { for (EnabledEnum item : EnabledEnum.values()) {
......
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum FlowStatusEnum implements IBaseEnum{
FLOW_RUNNING(1, "进行中"),
FLOW_FINISH(2, "已完成");
private int value;
private String desc;
FlowStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static FlowStatusEnum getByValue(int value) {
for (FlowStatusEnum YesNoEnum : FlowStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (FlowStatusEnum item : FlowStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum ImageReEnum {
RE_1920X1080(0, "1920x1080"),
RE_1080X1920(1, "1080x1920"),
RE_1280X1280(2, "1280x1280");
private Integer value;
private String desc;
ImageReEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ImageReEnum getByValue(Integer value) {
for (ImageReEnum distributeEnum : ImageReEnum.values()) {
if (distributeEnum.getValue() == value) {
return distributeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ImageReEnum item : ImageReEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 是否启用(0.不启动,1.启动)枚举类
*
* @author zxfei
*/
public enum IsUseEnum {
不启动(0, "不启动"),
启动(1, "启动");
private Integer value;
private String desc;
IsUseEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static IsUseEnum getByValue(Integer value) {
for (IsUseEnum isUseEnum : IsUseEnum.values()) {
if (isUseEnum.getValue() == value) {
return isUseEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (IsUseEnum item : IsUseEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 日志类型,(0.上报事件,1.下发服务)枚举类
*
* @author zxfei
*/
public enum LogTypeEnum {
上报事件(0, "上行"),
下发服务(1, "下行"),
消息异常(99, "消息发送异常");
private Integer value;
private String desc;
LogTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static LogTypeEnum getByValue(Integer value) {
for (LogTypeEnum logTypeEnum : LogTypeEnum.values()) {
if (logTypeEnum.getValue() == value) {
return logTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (LogTypeEnum item : LogTypeEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum MannerEnum {
SELF(0, "自主取件"),
EXPRESS(1, "邮寄");
private int value;
private String desc;
private MannerEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static MannerEnum getByValue(int value) {
MannerEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
MannerEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
MannerEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
MannerEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum MatterSourceEnum {
OUTER(0, "政务网"),
SELF(1, "自定义");
private int value;
private String desc;
private MatterSourceEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static MatterSourceEnum getByValue(int value) {
MatterSourceEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
MatterSourceEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
MatterSourceEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
MatterSourceEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MessageTypeEnum {
CRUD(0, "设备增删改查"),
TRANSACTION(1, "设备消息类,数据域透传设备上行消息体");
private Integer value;
private String desc;
MessageTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static MessageTypeEnum getByValue(Integer value) {
for (MessageTypeEnum sendMsgTypeEnum : MessageTypeEnum.values()) {
if (sendMsgTypeEnum.getValue() == value) {
return sendMsgTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (MessageTypeEnum item : MessageTypeEnum.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,17 +4,18 @@ import java.util.LinkedHashMap; ...@@ -4,17 +4,18 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* 是否接收异常短(0.否,1.是)枚举类 * 员工状态(1.待入职,2.试用中,3.超期)枚举类
* *
* @author zxfei * @author zxfei
*/ */
public enum IsReceiveMessEnum { public enum OnBoardStatusEnum {
(0, "否"), 待入职(1, "待入职"),
(1, "是"); 试用中(2, "试用中"),
超期(3, "超期");
private Integer value; private Integer value;
private String desc; private String desc;
IsReceiveMessEnum(Integer value, String desc) { OnBoardStatusEnum(Integer value, String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
...@@ -27,10 +28,10 @@ public enum IsReceiveMessEnum { ...@@ -27,10 +28,10 @@ public enum IsReceiveMessEnum {
return this.desc; return this.desc;
} }
public static IsReceiveMessEnum getByValue(Integer value) { public static OnBoardStatusEnum getByValue(Integer value) {
for (IsReceiveMessEnum isReceiveMessEnum : IsReceiveMessEnum.values()) { for (OnBoardStatusEnum onBoardStatusEnum : OnBoardStatusEnum.values()) {
if (isReceiveMessEnum.getValue() == value) { if (onBoardStatusEnum.getValue() == value) {
return isReceiveMessEnum; return onBoardStatusEnum;
} }
} }
return null; return null;
...@@ -44,7 +45,7 @@ public enum IsReceiveMessEnum { ...@@ -44,7 +45,7 @@ public enum IsReceiveMessEnum {
*/ */
public static Map<String, String> getEnumMap(Integer... eItem) { public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>(); Map<String, String> resultMap = new LinkedHashMap<>();
for (IsReceiveMessEnum item : IsReceiveMessEnum.values()) { for (OnBoardStatusEnum item : OnBoardStatusEnum.values()) {
try { try {
boolean hasE = false; boolean hasE = false;
for (Integer e : eItem) { for (Integer e : eItem) {
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)枚举类
*
* @author zxfei
*/
public enum ProjectTypeEnum {
法律法规(0, "法律法规"),
业务知识(1, "业务知识"),
行业知识(2, "行业知识"),
通用知识(3, "通用知识");
private Integer value;
private String desc;
ProjectTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ProjectTypeEnum getByValue(Integer value) {
for (ProjectTypeEnum projectTypeEnum : ProjectTypeEnum.values()) {
if (projectTypeEnum.getValue() == value) {
return projectTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ProjectTypeEnum item : ProjectTypeEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 已读要求(0. 学员进入学习项目详情即标记为已读)枚举类
*
* @author zxfei
*/
public enum ReadRequestEnum {
学员进入学习项目详情即标记为已读(0, "学员进入学习项目详情即标记为已读");
private Integer value;
private String desc;
ReadRequestEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ReadRequestEnum getByValue(Integer value) {
for (ReadRequestEnum readRequestEnum : ReadRequestEnum.values()) {
if (readRequestEnum.getValue() == value) {
return readRequestEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ReadRequestEnum item : ReadRequestEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 是否启用发送消息(0.停用,1.启用)枚举类
*
* @author zxfei
*/
public enum SendSwitchEnum {
停用(0, "停用"),
启用(1, "启用");
private Integer value;
private String desc;
SendSwitchEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static SendSwitchEnum getByValue(Integer value) {
for (SendSwitchEnum sendSwitchEnum : SendSwitchEnum.values()) {
if (sendSwitchEnum.getValue() == value) {
return sendSwitchEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (SendSwitchEnum item : SendSwitchEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 员工来源(1.外部,2.内部)枚举类
*
* @author zxfei
*/
public enum SourceEnum {
外部(1, "外部"),
内部(2, "内部");
private Integer value;
private String desc;
SourceEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static SourceEnum getByValue(Integer value) {
for (SourceEnum sourceEnum : SourceEnum.values()) {
if (sourceEnum.getValue() == value) {
return sourceEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (SourceEnum item : SourceEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 是否置顶(0.否,1.是)枚举类
*
* @author zxfei
*/
public enum TopEnum {
(0, "否"),
(1, "是");
private Integer value;
private String desc;
TopEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static TopEnum getByValue(Integer value) {
for (TopEnum topEnum : TopEnum.values()) {
if (topEnum.getValue() == value) {
return topEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (TopEnum item : TopEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum TopicalTypeEnum {
PERSONAL(1, "个人服务"),
ENTERPRISE(2, "企业服务");
private int value;
private String desc;
private TopicalTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static TopicalTypeEnum getByValue(int value) {
TopicalTypeEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
TopicalTypeEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
TopicalTypeEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
TopicalTypeEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 查看人员(0.全部学员,1.部分学员)枚举类
*
* @author zxfei
*/
public enum ViewPersionEnum {
全部学员(0, "全部学员"),
部分学员(1, "部分学员");
private Integer value;
private String desc;
ViewPersionEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static ViewPersionEnum getByValue(Integer value) {
for (ViewPersionEnum viewPersionEnum : ViewPersionEnum.values()) {
if (viewPersionEnum.getValue() == value) {
return viewPersionEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (ViewPersionEnum item : ViewPersionEnum.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
...@@ -12,7 +12,7 @@ import lombok.Data; ...@@ -12,7 +12,7 @@ import lombok.Data;
* 考勤绩效记录核查信息实体对象 * 考勤绩效记录核查信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-15 * @date 2023-07-16
*/ */
@Data @Data
public class CheckAttendRecordEntity extends CheckAttendRecordVo { public class CheckAttendRecordEntity extends CheckAttendRecordVo {
...@@ -145,6 +145,11 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo { ...@@ -145,6 +145,11 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
* 扣分时间 * 扣分时间
*/ */
private Date deductTime; private Date deductTime;
/**
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -222,5 +227,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo { ...@@ -222,5 +227,7 @@ public class CheckAttendRecordEntity extends CheckAttendRecordVo {
this.deductPerson = ""; this.deductPerson = "";
this.deductTime = null; this.deductTime = null;
this.windowNum = "";
} }
} }
\ No newline at end of file
...@@ -8,7 +8,7 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity; ...@@ -8,7 +8,7 @@ import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
* 考勤绩效记录核查信息查询对象 * 考勤绩效记录核查信息查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-15 * @date 2023-07-16
*/ */
public class CheckAttendRecordQuery extends CheckAttendRecordEntity { public class CheckAttendRecordQuery extends CheckAttendRecordEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -323,6 +323,11 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity { ...@@ -323,6 +323,11 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity {
/** 结束 扣分时间 */ /** 结束 扣分时间 */
private String deductTimeEnd; private String deductTimeEnd;
/** 窗口编号 */
private List<String> windowNumList;
/** 窗口编号排除列表 */
private List <String> windowNumNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<CheckAttendRecordQuery> orConditionList; private List<CheckAttendRecordQuery> orConditionList;
...@@ -2088,6 +2093,38 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity { ...@@ -2088,6 +2093,38 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity {
this.deductTimeEnd = deductTimeEnd; this.deductTimeEnd = deductTimeEnd;
} }
/**
* 获取 窗口编号
* @return windowNumList
*/
public List<String> getWindowNumList(){
return this.windowNumList;
}
/**
* 设置 窗口编号
* @param windowNumList
*/
public void setWindowNumList(List<String> windowNumList){
this.windowNumList = windowNumList;
}
/**
* 获取 窗口编号
* @return windowNumNotList
*/
public List<String> getWindowNumNotList(){
return this.windowNumNotList;
}
/**
* 设置 窗口编号
* @param windowNumNotList
*/
public void setWindowNumNotList(List<String> windowNumNotList){
this.windowNumNotList = windowNumNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -3082,6 +3119,25 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity { ...@@ -3082,6 +3119,25 @@ public class CheckAttendRecordQuery extends CheckAttendRecordEntity {
} }
/**
* 设置 窗口编号
* @param windowNum
*/
public CheckAttendRecordQuery windowNum(String windowNum){
setWindowNum(windowNum);
return this;
}
/**
* 设置 窗口编号
* @param windowNumList
*/
public CheckAttendRecordQuery windowNumList(List<String> windowNumList){
this.windowNumList = windowNumList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.dept.service.impl; package com.mortals.xhx.module.dept.service.impl;
import com.mortals.xhx.common.code.EnableEnum;
import com.mortals.xhx.common.code.EnabledEnum;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffQuery; import com.mortals.xhx.module.staff.model.StaffQuery;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
...@@ -7,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -7,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.xhx.common.code.DeptStatusEnum;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.dept.dao.DeptDao; import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
...@@ -34,13 +35,13 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -34,13 +35,13 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override @Override
protected void saveBefore(DeptEntity entity, Context context) throws AppException { protected void saveBefore(DeptEntity entity, Context context) throws AppException {
if(ObjectUtils.isEmpty(entity.getParentId())){ if (ObjectUtils.isEmpty(entity.getParentId())) {
//如果父节点为空,默认挂载到根目录 //如果父节点为空,默认挂载到根目录
entity.setParentId(0L); entity.setParentId(0L);
} }
DeptEntity parentDeptEntity = this.get(entity.getParentId()); DeptEntity parentDeptEntity = this.get(entity.getParentId());
if (!ObjectUtils.isEmpty(parentDeptEntity) && DeptStatusEnum.停用.getValue() == parentDeptEntity.getDeptStatus()) { if (!ObjectUtils.isEmpty(parentDeptEntity) && EnabledEnum.停用.getValue() == parentDeptEntity.getDeptStatus()) {
throw new AppException("部门信息停用,不允许新增"); throw new AppException("部门信息停用,不允许新增");
} }
...@@ -56,7 +57,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -56,7 +57,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
DeptEntity newParentEntity = this.get(entity.getParentId()); DeptEntity newParentEntity = this.get(entity.getParentId());
DeptEntity oldEntity = this.get(entity.getId()); DeptEntity oldEntity = this.get(entity.getId());
if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) { if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) {
String newAncestors = newParentEntity.getAncestors() + "," +entity.getId(); String newAncestors = newParentEntity.getAncestors() + "," + entity.getId();
String oldAncestors = oldEntity.getAncestors(); String oldAncestors = oldEntity.getAncestors();
entity.setAncestors(newAncestors); entity.setAncestors(newAncestors);
updateDeptChildren(entity.getId(), newAncestors, oldAncestors, context); updateDeptChildren(entity.getId(), newAncestors, oldAncestors, context);
...@@ -67,7 +68,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -67,7 +68,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override @Override
protected void updateAfter(DeptEntity entity, Context context) throws AppException { protected void updateAfter(DeptEntity entity, Context context) throws AppException {
if (DeptStatusEnum.启用.getValue() == entity.getDeptStatus()) { if (EnabledEnum.启用.getValue() == entity.getDeptStatus()) {
updateParentDeptStatus(entity, context); updateParentDeptStatus(entity, context);
} }
super.updateAfter(entity, context); super.updateAfter(entity, context);
...@@ -80,10 +81,10 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -80,10 +81,10 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
*/ */
private void updateParentDeptStatus(DeptEntity dept, Context context) { private void updateParentDeptStatus(DeptEntity dept, Context context) {
DeptEntity deptEntity = this.get(dept.getParentId()); DeptEntity deptEntity = this.get(dept.getParentId());
if(!ObjectUtils.isEmpty(deptEntity)){ if (!ObjectUtils.isEmpty(deptEntity)) {
deptEntity.setDeptStatus(DeptStatusEnum.启用.getValue()); deptEntity.setDeptStatus(EnabledEnum.启用.getValue());
deptEntity.setUpdateTime(new Date()); deptEntity.setUpdateTime(new Date());
deptEntity.setUpdateUser(context==null?"admin":context.getUser().getLoginName()); deptEntity.setUpdateUser(context == null ? "admin" : context.getUser().getLoginName());
DeptEntity condition = new DeptEntity(); DeptEntity condition = new DeptEntity();
condition.setId(deptEntity.getId()); condition.setId(deptEntity.getId());
this.updateBatch(deptEntity, condition, context); this.updateBatch(deptEntity, condition, context);
...@@ -138,12 +139,12 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -138,12 +139,12 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
for (Iterator<DeptEntity> iterator = list.iterator(); iterator.hasNext(); ) { for (Iterator<DeptEntity> iterator = list.iterator(); iterator.hasNext(); ) {
DeptEntity deptEntity = iterator.next(); DeptEntity deptEntity = iterator.next();
List<StaffEntity> staffEntities = staffService.find(new StaffQuery().deptId(deptEntity.getId())); List<StaffEntity> staffEntities = staffService.find(new StaffQuery().deptId(deptEntity.getId()));
List<Map<String,Object>> personList = new ArrayList<>(); List<Map<String, Object>> personList = new ArrayList<>();
staffEntities.forEach(item->{ staffEntities.forEach(item -> {
Map<String,Object> map= new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("staffId",item.getId()); map.put("staffId", item.getId());
map.put("staffName",item.getName()); map.put("staffName", item.getName());
map.put("deptId",item.getDeptId()); map.put("deptId", item.getDeptId());
personList.add(map); personList.add(map);
}); });
deptEntity.setPersonList(personList); deptEntity.setPersonList(personList);
...@@ -208,6 +209,4 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -208,6 +209,4 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
} }
} }
...@@ -32,7 +32,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -32,7 +32,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
OapiV2UserGetbymobileResponse rsp = client.execute(req, getToken()); OapiV2UserGetbymobileResponse rsp = client.execute(req, getToken());
log.info("OapiV2UserGetbymobileResponse:{}", rsp.getBody()); log.info("OapiV2UserGetbymobileResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) { if (rsp.getErrcode() == 0) {
return Rest.ok(rsp.getResult().getUserid()); return Rest.ok("成功",rsp.getResult().getUserid());
} else { } else {
return Rest.fail(String.format("code:%s,msg:%s", rsp.getErrcode(), rsp.getErrmsg())); return Rest.fail(String.format("code:%s,msg:%s", rsp.getErrcode(), rsp.getErrmsg()));
} }
...@@ -71,6 +71,9 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -71,6 +71,9 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
req.setAgentId(agentId); req.setAgentId(agentId);
req.setUseridList(workMsgReq.getUseridList()); req.setUseridList(workMsgReq.getUseridList());
req.setMsg(JSON.toJSONString(workMsgReq.getMsg())); req.setMsg(JSON.toJSONString(workMsgReq.getMsg()));
workMsgReq.getMsg().getLink().setPicUrl("@lADOADmaWMzazQKA");
log.info("sendWorkMsg:{}", JSON.toJSONString(workMsgReq)); log.info("sendWorkMsg:{}", JSON.toJSONString(workMsgReq));
OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, getToken()); OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, getToken());
log.info("OapiMessageResponse:{}", rsp.getBody()); log.info("OapiMessageResponse:{}", rsp.getBody());
......
...@@ -5,7 +5,7 @@ import lombok.Data; ...@@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class ImgReq { public class ImgReq {
private String svrIndexCode; private String serverIndexCode;
private String picUri; private String picUri;
......
package com.mortals.xhx.module.hik.face.service;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognListReq;
import com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognReq;
import com.mortals.xhx.module.hik.face.model.rsp.plan.PlanRecognInfo;
import java.util.List;
/**
* 海康门禁接口对接类
*
* @author:
* @date: 2023/4/12 17:47
*/
public interface IHikPlanService {
/**
* 查询重点识别计划
*
* @param planRecognListReq
* @return
*/
Rest<List<PlanRecognInfo>> findPlanRecognBlackList(PlanRecognListReq planRecognListReq);
/**
* 添加人员监视计划
*
* @param planRecognReq
* @return
*/
Rest<String> planRecognBlackAdd(PlanRecognReq planRecognReq);
/**
* 人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognBlackDel(PlanRecognReq planRecognReq);
/**
* 查询陌生人识别计划
*
* @param planRecognListReq
* @return
*/
Rest<List<PlanRecognInfo>> findPlanRecognWhiteList(PlanRecognListReq planRecognListReq);
/**
* 添加陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest<String> planRecognWhiteAdd(PlanRecognReq planRecognReq);
/**
* 更新陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteUpdate(PlanRecognReq planRecognReq);
/**
* 陌生人人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteDel(PlanRecognReq planRecognReq);
/**
* 陌生人监视计划重新下发
*
* @param planRecognReq
* @return
*/
Rest<Boolean> planRecognWhiteReStart(PlanRecognReq planRecognReq);
}
...@@ -269,7 +269,7 @@ public class HikFaceServiceImpl extends AbstractHikService implements IHikFaceSe ...@@ -269,7 +269,7 @@ public class HikFaceServiceImpl extends AbstractHikService implements IHikFaceSe
@Override @Override
public InputStream callPostImgs(ImgReq imgReq) throws Exception { public InputStream callPostImgs(ImgReq imgReq) throws Exception {
ArtemisConfig config = getArtemisConfig(); ArtemisConfig config = getArtemisConfig();
String getSecurityApi = ARTEMIS_PATH + "/api/visitor/v1/record/pictures"; String getSecurityApi = ARTEMIS_PATH + "/api/resource/v1/person/";
path.put(protocol, getSecurityApi); path.put(protocol, getSecurityApi);
//ArtemisHttpUtil.doPostStringImgArtemis(config, path, JSON.toJSONString(recognReq), null, null, "application/json"); //ArtemisHttpUtil.doPostStringImgArtemis(config, path, JSON.toJSONString(recognReq), null, null, "application/json");
Map<String, String> query = new HashMap<String, String>(2) { //get请求的head参数 Map<String, String> query = new HashMap<String, String>(2) { //get请求的head参数
......
...@@ -273,25 +273,25 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -273,25 +273,25 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
public void initAttrValue(){ public void initAttrValue(){
this.checkRecordId = -1L; this.checkRecordId = 0L;
this.staffId = -1L; this.staffId = 0L;
this.staffName = ""; this.staffName = "";
this.workNum = ""; this.workNum = "";
this.deptId = -1L; this.deptId = 0L;
this.deptName = ""; this.deptName = "";
this.attendanceGroupId = -1L; this.attendanceGroupId = 0L;
this.attendanceGroupName = ""; this.attendanceGroupName = "";
this.attendanceDate = null; this.attendanceDate = null;
this.ruleId = -1L; this.ruleId = 0L;
this.ruleName = ""; this.ruleName = "";
...@@ -329,7 +329,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -329,7 +329,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
this.violationType = ""; this.violationType = "";
this.reviewResult = -1; this.reviewResult = 0;
this.reviewTime = null; this.reviewTime = null;
...@@ -359,7 +359,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -359,7 +359,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
this.goworkTime = null; this.goworkTime = null;
this.irregularType = -1; this.irregularType = null;
this.happenTime = null; this.happenTime = null;
...@@ -369,7 +369,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo { ...@@ -369,7 +369,7 @@ public class PerformAttendAppealEntity extends PerformAttendAppealVo {
this.snapPath = ""; this.snapPath = "";
this.irregularOtherType = -1; this.irregularOtherType = null;
this.performType = ""; this.performType = "";
......
...@@ -9,121 +9,126 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -9,121 +9,126 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformAttendRecordVo; import com.mortals.xhx.module.perform.model.vo.PerformAttendRecordVo;
import lombok.Data; import lombok.Data;
/** /**
* 考勤绩效记录信息实体对象 * 考勤绩效记录信息实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-10 * @date 2023-07-16
*/ */
@Data @Data
public class PerformAttendRecordEntity extends PerformAttendRecordVo { public class PerformAttendRecordEntity extends PerformAttendRecordVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 员工ID * 员工ID
*/ */
private Long staffId; private Long staffId;
/** /**
* 员工姓名 * 员工姓名
*/ */
private String staffName; private String staffName;
/** /**
* 工号 * 工号
*/ */
private String workNum; private String workNum;
/** /**
* 所属部门 * 所属部门
*/ */
private Long deptId; private Long deptId;
/** /**
* 所属部门名称 * 所属部门名称
*/ */
private String deptName; private String deptName;
/** /**
* 所属考勤组ID * 所属考勤组ID
*/ */
private Long attendanceGroupId; private Long attendanceGroupId;
/** /**
* 所属考勤组名称 * 所属考勤组名称
*/ */
private String attendanceGroupName; private String attendanceGroupName;
/** /**
* 考勤时间 * 考勤时间
*/ */
private Date attendanceDate; private Date attendanceDate;
/** /**
* 绩效规则id * 绩效规则id
*/ */
private Long ruleId; private Long ruleId;
/** /**
* 规则名称 * 异常时间
*/ */
private String ruleNme;
/**
* 异常时间
*/
private Date errorTime; private Date errorTime;
/** /**
* 上下班时间 * 上下班时间
*/ */
private String goOffTimeStr; private String goOffTimeStr;
/** /**
* 实际打卡时间 * 实际打卡时间
*/ */
private Date actualAttendTime; private Date actualAttendTime;
/** /**
* 异常处理结果 * 异常处理结果
*/ */
private String errorResult; private String errorResult;
/** /**
* 扣分方式(1.系统自动,2.人工添加) * 扣分方式(1.系统自动,2.人工添加)
*/ */
private Integer subMethod; private Integer subMethod;
/** /**
* 扣分人员 * 扣分人员
*/ */
@Excel(name = "扣分人员") @Excel(name = "扣分人员")
private String deductPerson; private String deductPerson;
/** /**
* 扣分时间 * 扣分时间
*/ */
private Date deductTime; private Date deductTime;
/** /**
* 增减类型(1.增加,2.扣除) * 增减类型(1.增加,2.扣除)
*/ */
private Integer subAddType; private Integer subAddType;
/** /**
* 扣分或增加分值 * 扣分或增加分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 处理状态(1.未核查,2.已核查) * 处理状态(1.未核查,2.已核查)
*/ */
private Integer processStatus; private Integer processStatus;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/** /**
* 附件名称,多个逗号分割 * 附件名称,多个逗号分割
*/ */
@Excel(name = "附件名称,多个逗号分割") @Excel(name = "附件名称,多个逗号分割")
private String fileNames; private String fileNames;
/** /**
* 附件下载地址,多个逗号分割 * 附件下载地址,多个逗号分割
*/ */
@Excel(name = "附件下载地址,多个逗号分割") @Excel(name = "附件下载地址,多个逗号分割")
private String filePaths; private String filePaths;
/** /**
* 绩效规则分类id * 绩效规则分类id
*/ */
private Long categoryId; private Long categoryId;
/** /**
* 规则名称 * 规则名称
*/ */
private String categoryName; private String categoryName;
/**
* 规则名称
*/
private String ruleName;
/**
* 窗口编号
*/
@Excel(name = "窗口编号")
private String windowNum;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
...@@ -131,7 +136,7 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo { ...@@ -131,7 +136,7 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
if (obj instanceof PerformAttendRecordEntity) { if (obj instanceof PerformAttendRecordEntity) {
PerformAttendRecordEntity tmp = (PerformAttendRecordEntity) obj; PerformAttendRecordEntity tmp = (PerformAttendRecordEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
...@@ -139,54 +144,56 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo { ...@@ -139,54 +144,56 @@ public class PerformAttendRecordEntity extends PerformAttendRecordVo {
public void initAttrValue(){ public void initAttrValue(){
this.staffId = -1L; this.staffId = -1L;
this.staffName = "";
this.staffName = ""; this.workNum = "";
this.workNum = ""; this.deptId = -1L;
this.deptId = -1L; this.deptName = "";
this.deptName = ""; this.attendanceGroupId = -1L;
this.attendanceGroupId = -1L; this.attendanceGroupName = "";
this.attendanceGroupName = ""; this.attendanceDate = null;
this.attendanceDate = null; this.ruleId = -1L;
this.ruleId = -1L; this.errorTime = null;
this.ruleNme = ""; this.goOffTimeStr = "";
this.errorTime = null; this.actualAttendTime = null;
this.goOffTimeStr = ""; this.errorResult = "";
this.actualAttendTime = null; this.subMethod = 1;
this.errorResult = ""; this.deductPerson = "";
this.subMethod = 1; this.deductTime = null;
this.deductPerson = ""; this.subAddType = 1;
this.deductTime = null; this.score = BigDecimal.valueOf(0.00);
this.subAddType = 1; this.processStatus = 1;
this.score = BigDecimal.valueOf(0.00); this.remark = "";
this.processStatus = 1; this.fileNames = "";
this.remark = ""; this.filePaths = "";
this.fileNames = ""; this.categoryId = -1L;
this.filePaths = ""; this.categoryName = "";
this.categoryId = -1L; this.ruleName = "";
this.categoryName = ""; this.windowNum = "";
} }
} }
\ No newline at end of file
...@@ -33,10 +33,10 @@ public class PerformDeptConfDetailServiceImpl extends AbstractCRUDServiceImpl<Pe ...@@ -33,10 +33,10 @@ public class PerformDeptConfDetailServiceImpl extends AbstractCRUDServiceImpl<Pe
} }
PerformDeptConfDetailEntity entity = new PerformDeptConfDetailEntity(); PerformDeptConfDetailEntity entity = new PerformDeptConfDetailEntity();
entity.setId(id); entity.setId(id);
if(temp.getEnable() == EnabledEnum..getValue()){ if(temp.getEnable() == EnabledEnum..getValue()){
entity.setEnable(EnabledEnum.启用.getValue()); entity.setEnable(EnabledEnum.启用.getValue());
}else { }else {
entity.setEnable(EnabledEnum..getValue()); entity.setEnable(EnabledEnum..getValue());
} }
if(context!=null && context.getUser()!=null){ if(context!=null && context.getUser()!=null){
entity.setUpdateTime(new Date()); entity.setUpdateTime(new Date());
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
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.service.DeptService;
...@@ -18,18 +22,19 @@ import com.mortals.xhx.module.perform.dao.PerformDeptConfDao; ...@@ -18,18 +22,19 @@ import com.mortals.xhx.module.perform.dao.PerformDeptConfDao;
import com.mortals.xhx.module.perform.model.PerformDeptConfEntity; import com.mortals.xhx.module.perform.model.PerformDeptConfEntity;
import com.mortals.xhx.module.perform.service.PerformDeptConfService; import com.mortals.xhx.module.perform.service.PerformDeptConfService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
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;
/** /**
* PerformDeptConfService * PerformDeptConfService
* 部门自动考核信息 service实现 * 部门自动考核信息 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-05-16
*/ */
@Service("performDeptConfService") @Service("performDeptConfService")
@Slf4j @Slf4j
public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformDeptConfDao, PerformDeptConfEntity, Long> implements PerformDeptConfService { public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformDeptConfDao, PerformDeptConfEntity, Long> implements PerformDeptConfService {
...@@ -40,11 +45,19 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD ...@@ -40,11 +45,19 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private PerformRulesCategoryService performRulesCategoryService; private PerformRulesCategoryService performRulesCategoryService;
@Autowired
private UserService userService;
@Override @Override
protected void findAfter(PerformDeptConfEntity params, PageInfo pageInfo, Context context, List<PerformDeptConfEntity> list) throws AppException { protected void findAfter(PerformDeptConfEntity params, PageInfo pageInfo, Context context, List<PerformDeptConfEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for (PerformDeptConfEntity item:list){ Map<Long, UserEntity> userMap = userService.findToMap(new UserQuery(), context);
if (CollectionUtils.isNotEmpty(list)) {
for (PerformDeptConfEntity item : list) {
UserEntity userEntity = userMap.get(item.getCreateUserId());
if (!ObjectUtils.isEmpty(userEntity)) {
item.setCreateUserName(userEntity.getRealName());
}
List<PerformDeptConfDetailEntity> detailEntityList = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(item.getId())); List<PerformDeptConfDetailEntity> detailEntityList = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(item.getId()));
item.setDeptConfDetail(detailEntityList); item.setDeptConfDetail(detailEntityList);
} }
...@@ -58,61 +71,66 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD ...@@ -58,61 +71,66 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD
if (deptEntity != null) { if (deptEntity != null) {
entity.setDeptName(deptEntity.getDeptName()); entity.setDeptName(deptEntity.getDeptName());
} }
updateCount(entity);
} }
@Override @Override
protected void updateAfter(PerformDeptConfEntity entity, Context context) throws AppException { protected void updateAfter(PerformDeptConfEntity entity, Context context) throws AppException {
if(CollectionUtils.isNotEmpty(entity.getDeptConfDetail())){ if (CollectionUtils.isNotEmpty(entity.getDeptConfDetail())) {
Long[] detailIds = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(entity.getId())).stream().map(PerformDeptConfDetailEntity::getId).toArray(Long[]::new); Long[] detailIds = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(entity.getId())).stream().map(PerformDeptConfDetailEntity::getId).toArray(Long[]::new);
performDeptConfDetailService.remove(detailIds,context); performDeptConfDetailService.remove(detailIds, context);
for(PerformDeptConfDetailEntity item:entity.getDeptConfDetail()){ for (PerformDeptConfDetailEntity item : entity.getDeptConfDetail()) {
item.setDeptConfId(entity.getId()); item.setDeptConfId(entity.getId());
item.setCreateTime(entity.getCreateTime()); item.setCreateTime(entity.getCreateTime());
item.setCreateUser(entity.getCreateUser()); item.setCreateUser(entity.getCreateUser());
item.setDeptId(entity.getDeptId()); item.setDeptId(entity.getDeptId());
item.setDeptName(entity.getDeptName()); item.setDeptName(entity.getDeptName());
PerformRulesCategoryEntity categoryEntity = performRulesCategoryService.get(item.getCategoryId()); PerformRulesCategoryEntity categoryEntity = performRulesCategoryService.get(item.getCategoryId());
if(categoryEntity!=null){ if (categoryEntity != null) {
item.setCategoryName(categoryEntity.getName()); item.setCategoryName(categoryEntity.getName());
} }
item.setId(null); item.setId(null);
} }
performDeptConfDetailService.save(entity.getDeptConfDetail(),context); performDeptConfDetailService.save(entity.getDeptConfDetail(), context);
} }
} }
@Override @Override
protected void saveBefore(PerformDeptConfEntity entity, Context context) throws AppException { protected void saveBefore(PerformDeptConfEntity entity, Context context) throws AppException {
super.saveBefore(entity,context); super.saveBefore(entity, context);
DeptEntity deptEntity = deptService.get(entity.getDeptId()); DeptEntity deptEntity = deptService.get(entity.getDeptId());
if(deptEntity!=null){ if (deptEntity != null) {
entity.setDeptName(deptEntity.getDeptName()); entity.setDeptName(deptEntity.getDeptName());
} }
if(CollectionUtils.isNotEmpty(entity.getDeptConfDetail())){ updateCount(entity);
Map<Integer,List<PerformDeptConfDetailEntity>> groupMap = entity.getDeptConfDetail().stream().collect(Collectors.groupingBy(PerformDeptConfDetailEntity::getType)); }
if(groupMap.containsKey(CheckTypeEnum.考勤绩效.getValue())) {
private void updateCount(PerformDeptConfEntity entity) {
if (CollectionUtils.isNotEmpty(entity.getDeptConfDetail())) {
Map<Integer, List<PerformDeptConfDetailEntity>> groupMap = entity.getDeptConfDetail().stream().collect(Collectors.groupingBy(PerformDeptConfDetailEntity::getType));
if (groupMap.containsKey(CheckTypeEnum.考勤绩效.getValue())) {
entity.setAttendCount(groupMap.get(CheckTypeEnum.考勤绩效.getValue()).size()); entity.setAttendCount(groupMap.get(CheckTypeEnum.考勤绩效.getValue()).size());
}else { } else {
entity.setAttendCount(0); entity.setAttendCount(0);
} }
if(groupMap.containsKey(CheckTypeEnum.评价绩效.getValue())) { if (groupMap.containsKey(CheckTypeEnum.评价绩效.getValue())) {
entity.setAssessCount(groupMap.get(CheckTypeEnum.评价绩效.getValue()).size()); entity.setAssessCount(groupMap.get(CheckTypeEnum.评价绩效.getValue()).size());
}else { } else {
entity.setAssessCount(0); entity.setAssessCount(0);
} }
if(groupMap.containsKey(CheckTypeEnum.办件绩效.getValue())) { if (groupMap.containsKey(CheckTypeEnum.办件绩效.getValue())) {
entity.setWorkCount(groupMap.get(CheckTypeEnum.办件绩效.getValue()).size()); entity.setWorkCount(groupMap.get(CheckTypeEnum.办件绩效.getValue()).size());
}else { } else {
entity.setWorkCount(0); entity.setWorkCount(0);
} }
if(groupMap.containsKey(CheckTypeEnum.效能绩效.getValue())) { if (groupMap.containsKey(CheckTypeEnum.效能绩效.getValue())) {
entity.setEffectCount(groupMap.get(CheckTypeEnum.效能绩效.getValue()).size()); entity.setEffectCount(groupMap.get(CheckTypeEnum.效能绩效.getValue()).size());
}else { } else {
entity.setEffectCount(0); entity.setEffectCount(0);
} }
if(groupMap.containsKey(CheckTypeEnum.其它绩效.getValue())) { if (groupMap.containsKey(CheckTypeEnum.其它绩效.getValue())) {
entity.setOtherCount(groupMap.get(CheckTypeEnum.其它绩效.getValue()).size()); entity.setOtherCount(groupMap.get(CheckTypeEnum.其它绩效.getValue()).size());
}else { } else {
entity.setOtherCount(0); entity.setOtherCount(0);
} }
} }
...@@ -120,27 +138,27 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD ...@@ -120,27 +138,27 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD
@Override @Override
protected void saveAfter(PerformDeptConfEntity entity, Context context) throws AppException { protected void saveAfter(PerformDeptConfEntity entity, Context context) throws AppException {
if(CollectionUtils.isNotEmpty(entity.getDeptConfDetail())){ if (CollectionUtils.isNotEmpty(entity.getDeptConfDetail())) {
for(PerformDeptConfDetailEntity item:entity.getDeptConfDetail()){ for (PerformDeptConfDetailEntity item : entity.getDeptConfDetail()) {
item.setDeptConfId(entity.getId()); item.setDeptConfId(entity.getId());
item.setCreateTime(entity.getCreateTime()); item.setCreateTime(entity.getCreateTime());
item.setCreateUser(entity.getCreateUser()); item.setCreateUser(entity.getCreateUser());
item.setDeptId(entity.getDeptId()); item.setDeptId(entity.getDeptId());
item.setDeptName(entity.getDeptName()); item.setDeptName(entity.getDeptName());
PerformRulesCategoryEntity categoryEntity = performRulesCategoryService.get(item.getCategoryId()); PerformRulesCategoryEntity categoryEntity = performRulesCategoryService.get(item.getCategoryId());
if(categoryEntity!=null){ if (categoryEntity != null) {
item.setCategoryName(categoryEntity.getName()); item.setCategoryName(categoryEntity.getName());
} }
item.setId(null); item.setId(null);
} }
performDeptConfDetailService.save(entity.getDeptConfDetail(),context); performDeptConfDetailService.save(entity.getDeptConfDetail(), context);
} }
} }
@Override @Override
public PerformDeptConfEntity get(Long key, Context context) throws AppException { public PerformDeptConfEntity get(Long key, Context context) throws AppException {
PerformDeptConfEntity entity = this.dao.get(key); PerformDeptConfEntity entity = this.dao.get(key);
if(entity!=null) { if (entity != null) {
List<PerformDeptConfDetailEntity> detailEntityList = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(entity.getId())); List<PerformDeptConfDetailEntity> detailEntityList = performDeptConfDetailService.find(new PerformDeptConfDetailQuery().deptConfId(entity.getId()));
entity.setDeptConfDetail(detailEntityList); entity.setDeptConfDetail(detailEntityList);
} }
...@@ -149,11 +167,11 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD ...@@ -149,11 +167,11 @@ public class PerformDeptConfServiceImpl extends AbstractCRUDServiceImpl<PerformD
@Override @Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException { protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
if(ids != null && ids.length != 0){ if (ids != null && ids.length != 0) {
for (Long id:ids){ for (Long id : ids) {
PerformDeptConfDetailEntity condition = new PerformDeptConfDetailEntity(); PerformDeptConfDetailEntity condition = new PerformDeptConfDetailEntity();
condition.setDeptConfId(id); condition.setDeptConfId(id);
performDeptConfDetailService.remove(condition,context); performDeptConfDetailService.remove(condition, context);
} }
} }
} }
......
...@@ -34,10 +34,10 @@ public class PerformStaffConfDetailServiceImpl extends AbstractCRUDServiceImpl<P ...@@ -34,10 +34,10 @@ public class PerformStaffConfDetailServiceImpl extends AbstractCRUDServiceImpl<P
} }
PerformStaffConfDetailEntity entity = new PerformStaffConfDetailEntity(); PerformStaffConfDetailEntity entity = new PerformStaffConfDetailEntity();
entity.setId(id); entity.setId(id);
if(temp.getEnable() == EnabledEnum..getValue()){ if(temp.getEnable() == EnabledEnum..getValue()){
entity.setEnable(EnabledEnum.启用.getValue()); entity.setEnable(EnabledEnum.启用.getValue());
}else { }else {
entity.setEnable(EnabledEnum..getValue()); entity.setEnable(EnabledEnum..getValue());
} }
if(context!=null && context.getUser()!=null){ if(context!=null && context.getUser()!=null){
entity.setUpdateTime(new Date()); entity.setUpdateTime(new Date());
......
...@@ -8,10 +8,16 @@ import com.mortals.framework.model.PageInfo; ...@@ -8,10 +8,16 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
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.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.EnabledEnum; import com.mortals.xhx.common.code.EnabledEnum;
import com.mortals.xhx.common.code.IrregularTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.perform.model.PerformRulesQuery;
import com.mortals.xhx.module.perform.model.vo.AppealInfo; import com.mortals.xhx.module.perform.model.vo.AppealInfo;
import com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery; import com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery;
import com.mortals.xhx.module.perform.service.PerformRulesService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -41,6 +47,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -41,6 +47,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
import static java.util.stream.Collectors.toMap;
/** /**
* 绩效记录申诉信息 * 绩效记录申诉信息
...@@ -54,6 +61,11 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro ...@@ -54,6 +61,11 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private UserService userService;
@Autowired
private PerformRulesService rulesService;
public PerformAttendAppealController() { public PerformAttendAppealController() {
super.setModuleDesc("绩效记录申诉信息"); super.setModuleDesc("绩效记录申诉信息");
...@@ -61,13 +73,17 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro ...@@ -61,13 +73,17 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "updateUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
this.addDict(model, "ruleId", rulesService.find(new PerformRulesQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n)));
this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subMethod")); this.addDict(model, "subMethod", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subMethod"));
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subAddType")); this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "subAddType"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("PerformAttendAppeal", "processStatus")); this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "appealResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "appealResult")); this.addDict(model, "appealResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "appealResult"));
this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewResult")); this.addDict(model, "reviewResult", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewResult"));
this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewSource")); this.addDict(model, "reviewSource", paramService.getParamBySecondOrganize("PerformAttendAppeal", "reviewSource"));
this.addDict(model, "irregularType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "irregularType")); this.addDict(model, "irregularType", IrregularTypeEnum.getEnumMap());
this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "irregularOtherType")); this.addDict(model, "irregularOtherType", paramService.getParamBySecondOrganize("PerformAttendAppeal", "irregularOtherType"));
super.init(model, context); super.init(model, context);
} }
......
package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffOnboardEntity;
import java.util.List;
/**
* 员工入职信息Dao
* 员工入职信息 DAO接口
*
* @author zxfei
* @date 2023-07-16
*/
public interface StaffOnboardDao extends ICRUDDao<StaffOnboardEntity,Long>{
}
package com.mortals.xhx.module.staff.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.staff.dao.StaffOnboardDao;
import com.mortals.xhx.module.staff.model.StaffOnboardEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 员工入职信息DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-16
*/
@Repository("staffOnboardDao")
public class StaffOnboardDaoImpl extends BaseCRUDDaoMybatis<StaffOnboardEntity,Long> implements StaffOnboardDao {
}
package com.mortals.xhx.module.staff.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.staff.model.vo.StaffOnboardVo;
import lombok.Data;
/**
* 员工入职信息实体对象
*
* @author zxfei
* @date 2023-07-16
*/
@Data
public class StaffOnboardEntity extends StaffOnboardVo {
private static final long serialVersionUID = 1L;
/**
* 员工ID
*/
private Long staffId;
/**
* 员工姓名
*/
private String staffName;
/**
* 性别(1.男,2.女)
*/
private Integer gender;
/**
* 出生日期
*/
private Date birthday;
/**
* 照片
*/
private String photoPath;
/**
* 联系电话
*/
private String phoneNumber;
/**
* 身份证号码
*/
private String idCard;
/**
* 工号
*/
private String workNum;
/**
* 入职登记表
*/
private String filePath;
/**
* 政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)
*/
private Integer politicalstatus;
/**
* 所属部门
*/
private Long deptId;
/**
* 所属部门名称
*/
private String deptName;
/**
* 职位ID
*/
private Long jobId;
/**
* 职位名称
*/
private String jobName;
/**
* 员工类型(1.全职,2.兼职,3.实习)
*/
private Integer staffType;
/**
* 员工状态(1.待入职,2.试用中,3.超期)
*/
private Integer onBoardStatus;
/**
* 入职时间
*/
private Date entryDate;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof StaffOnboardEntity) {
StaffOnboardEntity tmp = (StaffOnboardEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.staffId = -1L;
this.staffName = "";
this.gender = 1;
this.birthday = null;
this.photoPath = "";
this.phoneNumber = "";
this.idCard = "";
this.workNum = "";
this.filePath = "";
this.politicalstatus = 1;
this.deptId = -1L;
this.deptName = "";
this.jobId = -1L;
this.jobName = "";
this.staffType = 1;
this.onBoardStatus = 1;
this.entryDate = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.staff.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.StaffOnboardEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 员工入职信息视图对象
*
* @author zxfei
* @date 2023-07-16
*/
@Data
public class StaffOnboardVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.staff.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.staff.model.StaffOnboardEntity;
import com.mortals.xhx.module.staff.dao.StaffOnboardDao;
/**
* StaffOnboardService
*
* 员工入职信息 service接口
*
* @author zxfei
* @date 2023-07-16
*/
public interface StaffOnboardService extends ICRUDService<StaffOnboardEntity,Long>{
StaffOnboardDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.staff.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.staff.dao.StaffOnboardDao;
import com.mortals.xhx.module.staff.model.StaffOnboardEntity;
import com.mortals.xhx.module.staff.service.StaffOnboardService;
import lombok.extern.slf4j.Slf4j;
/**
* StaffOnboardService
* 员工入职信息 service实现
*
* @author zxfei
* @date 2023-07-16
*/
@Service("staffOnboardService")
@Slf4j
public class StaffOnboardServiceImpl extends AbstractCRUDServiceImpl<StaffOnboardDao, StaffOnboardEntity, Long> implements StaffOnboardService {
}
\ No newline at end of file
package com.mortals.xhx.module.staff.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.staff.model.StaffOnboardEntity;
import com.mortals.xhx.module.staff.service.StaffOnboardService;
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-07-16
*/
@RestController
@RequestMapping("staff/onboard")
public class StaffOnboardController extends BaseCRUDJsonBodyMappingController<StaffOnboardService,StaffOnboardEntity,Long> {
@Autowired
private ParamService paramService;
public StaffOnboardController(){
super.setModuleDesc( "员工入职信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "gender", paramService.getParamBySecondOrganize("StaffOnboard","gender"));
this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("StaffOnboard","politicalstatus"));
this.addDict(model, "staffType", paramService.getParamBySecondOrganize("StaffOnboard","staffType"));
this.addDict(model, "onBoardStatus", paramService.getParamBySecondOrganize("StaffOnboard","onBoardStatus"));
super.init(model, context);
}
}
\ No newline at end of file
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<result property="categoryName" column="categoryName" /> <result property="categoryName" column="categoryName" />
<result property="deductPerson" column="deductPerson" /> <result property="deductPerson" column="deductPerson" />
<result property="deductTime" column="deductTime" /> <result property="deductTime" column="deductTime" />
<result property="windowNum" column="windowNum" />
</resultMap> </resultMap>
...@@ -152,23 +153,26 @@ ...@@ -152,23 +153,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deductTime') or colPickMode == 1 and data.containsKey('deductTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deductTime') or colPickMode == 1 and data.containsKey('deductTime')))">
a.deductTime, a.deductTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowNum') or colPickMode == 1 and data.containsKey('windowNum')))">
a.windowNum,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CheckAttendRecordEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="CheckAttendRecordEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_check_attend_record insert into mortals_xhx_check_attend_record
(recordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,checkStatus,createUserId,createTime,updateUserId,updateTime,subMethod,remark,fileNames,filePaths,categoryId,categoryName,deductPerson,deductTime) (recordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,checkStatus,createUserId,createTime,updateUserId,updateTime,subMethod,remark,fileNames,filePaths,categoryId,categoryName,deductPerson,deductTime,windowNum)
VALUES VALUES
(#{recordId},#{staffId},#{staffName},#{workNum},#{deptId},#{deptName},#{attendanceGroupId},#{attendanceGroupName},#{attendanceDate},#{ruleId},#{ruleName},#{subAddType},#{score},#{goOffTimeStr},#{errorTime},#{actualAttendTime},#{errorResult},#{checkPerson},#{checkTime},#{checkDesc},#{checkResult},#{checkStatus},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{subMethod},#{remark},#{fileNames},#{filePaths},#{categoryId},#{categoryName},#{deductPerson},#{deductTime}) (#{recordId},#{staffId},#{staffName},#{workNum},#{deptId},#{deptName},#{attendanceGroupId},#{attendanceGroupName},#{attendanceDate},#{ruleId},#{ruleName},#{subAddType},#{score},#{goOffTimeStr},#{errorTime},#{actualAttendTime},#{errorResult},#{checkPerson},#{checkTime},#{checkDesc},#{checkResult},#{checkStatus},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{subMethod},#{remark},#{fileNames},#{filePaths},#{categoryId},#{categoryName},#{deductPerson},#{deductTime},#{windowNum})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_check_attend_record insert into mortals_xhx_check_attend_record
(recordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,checkStatus,createUserId,createTime,updateUserId,updateTime,subMethod,remark,fileNames,filePaths,categoryId,categoryName,deductPerson,deductTime) (recordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,checkStatus,createUserId,createTime,updateUserId,updateTime,subMethod,remark,fileNames,filePaths,categoryId,categoryName,deductPerson,deductTime,windowNum)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.recordId},#{item.staffId},#{item.staffName},#{item.workNum},#{item.deptId},#{item.deptName},#{item.attendanceGroupId},#{item.attendanceGroupName},#{item.attendanceDate},#{item.ruleId},#{item.ruleName},#{item.subAddType},#{item.score},#{item.goOffTimeStr},#{item.errorTime},#{item.actualAttendTime},#{item.errorResult},#{item.checkPerson},#{item.checkTime},#{item.checkDesc},#{item.checkResult},#{item.checkStatus},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.subMethod},#{item.remark},#{item.fileNames},#{item.filePaths},#{item.categoryId},#{item.categoryName},#{item.deductPerson},#{item.deductTime}) (#{item.recordId},#{item.staffId},#{item.staffName},#{item.workNum},#{item.deptId},#{item.deptName},#{item.attendanceGroupId},#{item.attendanceGroupName},#{item.attendanceDate},#{item.ruleId},#{item.ruleName},#{item.subAddType},#{item.score},#{item.goOffTimeStr},#{item.errorTime},#{item.actualAttendTime},#{item.errorResult},#{item.checkPerson},#{item.checkTime},#{item.checkDesc},#{item.checkResult},#{item.checkStatus},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.subMethod},#{item.remark},#{item.fileNames},#{item.filePaths},#{item.categoryId},#{item.categoryName},#{item.deductPerson},#{item.deductTime},#{item.windowNum})
</foreach> </foreach>
</insert> </insert>
...@@ -316,6 +320,9 @@ ...@@ -316,6 +320,9 @@
<if test="(colPickMode==0 and data.containsKey('deductTime')) or (colPickMode==1 and !data.containsKey('deductTime'))"> <if test="(colPickMode==0 and data.containsKey('deductTime')) or (colPickMode==1 and !data.containsKey('deductTime'))">
a.deductTime=#{data.deductTime}, a.deductTime=#{data.deductTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('windowNum')) or (colPickMode==1 and !data.containsKey('windowNum'))">
a.windowNum=#{data.windowNum},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -626,6 +633,13 @@ ...@@ -626,6 +633,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="windowNum=(case" suffix="ELSE windowNum end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('windowNum')) or (colPickMode==1 and !item.containsKey('windowNum'))">
when a.id=#{item.id} then #{item.windowNum}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1513,6 +1527,27 @@ ...@@ -1513,6 +1527,27 @@
<if test="conditionParamRef.containsKey('deductTimeEnd') and conditionParamRef.deductTimeEnd != null and conditionParamRef.deductTimeEnd!=''"> <if test="conditionParamRef.containsKey('deductTimeEnd') and conditionParamRef.deductTimeEnd != null and conditionParamRef.deductTimeEnd!=''">
${_conditionType_} a.deductTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.deductTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.deductTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.deductTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('windowNum')">
<if test="conditionParamRef.windowNum != null and conditionParamRef.windowNum != ''">
${_conditionType_} a.windowNum like #{${_conditionParam_}.windowNum}
</if>
<if test="conditionParamRef.windowNum == null">
${_conditionType_} a.windowNum is null
</if>
</if>
<if test="conditionParamRef.containsKey('windowNumList') and conditionParamRef.windowNumList.size() > 0">
${_conditionType_} a.windowNum in
<foreach collection="conditionParamRef.windowNumList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('windowNumNotList') and conditionParamRef.windowNumNotList.size() > 0">
${_conditionType_} a.windowNum not in
<foreach collection="conditionParamRef.windowNumNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1701,6 +1736,11 @@ ...@@ -1701,6 +1736,11 @@
<if test='orderCol.deductTime != null and "DESC".equalsIgnoreCase(orderCol.deductTime)'>DESC</if> <if test='orderCol.deductTime != null and "DESC".equalsIgnoreCase(orderCol.deductTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('windowNum')">
a.windowNum
<if test='orderCol.windowNum != null and "DESC".equalsIgnoreCase(orderCol.windowNum)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
###登录
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}}/staff/onboard/list
Content-Type: application/json
{
"page":1,
"size":10
}
###员工入职信息更新与保存
POST {{baseUrl}}/staff/onboard/save
Authorization: {{authToken}}
Content-Type: application/json
{
"staffId":41,
"staffName":"x2t0e0",
"gender":1,
"birthday":"1689436800000",
"photoPath":"5yrbfh",
"phoneNumber":"0u5r86",
"idCard":"4d9xj3",
"workNum":"37mcc3",
"filePath":"s8j5i3",
"politicalstatus":1,
"deptId":862,
"deptName":"t6ei4m",
"jobId":69,
"jobName":"g088vz",
"staffType":1,
"onBoardStatus":1,
"entryDate":"1689436800000",
}
> {%
client.global.set("StaffOnboard_id", JSON.parse(response.body).data.id);
%}
###员工入职信息查看
GET {{baseUrl}}/staff/onboard/info?id={{StaffOnboard_id}}
Accept: application/json
###员工入职信息编辑
GET {{baseUrl}}/staff/onboard/edit?id={{StaffOnboard_id}}
Accept: application/json
###员工入职信息删除
GET {{baseUrl}}/staff/onboard/delete?id={{StaffOnboard_id}}
Authorization: {{authToken}}
Accept: application/json
...@@ -657,3 +657,67 @@ ALTER TABLE mortals_xhx_user ADD COLUMN `dingUserId` varchar(64) DEFAULT '' ...@@ -657,3 +657,67 @@ ALTER TABLE mortals_xhx_user ADD COLUMN `dingUserId` varchar(64) DEFAULT ''
ALTER TABLE mortals_xhx_check_attend_record ADD COLUMN `deductPerson` varchar(128) DEFAULT '' COMMENT '扣分人员' AFTER subMethod; ALTER TABLE mortals_xhx_check_attend_record ADD COLUMN `deductPerson` varchar(128) DEFAULT '' COMMENT '扣分人员' AFTER subMethod;
ALTER TABLE mortals_xhx_check_attend_record ADD COLUMN `deductTime` datetime COMMENT '扣分时间' AFTER deductPerson; ALTER TABLE mortals_xhx_check_attend_record ADD COLUMN `deductTime` datetime COMMENT '扣分时间' AFTER deductPerson;
-- ----------------------------
-- 员工入职信息表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_onboard`;
CREATE TABLE mortals_xhx_staff_onboard(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`staffId` bigint(20) COMMENT '员工ID',
`staffName` varchar(64) NOT NULL COMMENT '员工姓名',
`gender` tinyint(2) DEFAULT '1' COMMENT '性别(1.男,2.女)',
`birthday` datetime COMMENT '出生日期',
`photoPath` varchar(255) COMMENT '照片',
`phoneNumber` varchar(128) COMMENT '联系电话',
`idCard` varchar(128) COMMENT '身份证号码',
`workNum` varchar(128) COMMENT '工号',
`filePath` varchar(128) COMMENT '入职登记表',
`politicalstatus` tinyint(2) DEFAULT '1' COMMENT '政治面貌 (1.中共党员,2.中共预备党员,3.共青团员,4.群众,5.其它)',
`deptId` bigint(20) COMMENT '所属部门',
`deptName` varchar(128) COMMENT '所属部门名称',
`jobId` bigint(20) COMMENT '职位ID',
`jobName` varchar(128) COMMENT '职位名称',
`staffType` tinyint(2) DEFAULT '1' COMMENT '员工类型(1.全职,2.兼职,3.实习)',
`onBoardStatus` tinyint(2) DEFAULT '1' COMMENT '员工状态(1.待入职,2.试用中,3.超期)',
`entryDate` datetime COMMENT '入职时间',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工入职信息';
ALTER TABLE mortals_xhx_perform_attend_record ADD COLUMN `windowNum` varchar(64) DEFAULT '' COMMENT '窗口编号' AFTER deductPerson;
ALTER TABLE mortals_xhx_check_attend_record ADD COLUMN `windowNum` varchar(64) DEFAULT '' COMMENT '窗口编号' AFTER deductPerson;
-- ----------------------------
2023-7-16
-- ----------------------------
-- ----------------------------
-- 员工入职信息菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '员工入职信息', '/staff/onboard/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 员工入职信息资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工入职信息-菜单管理-查看', '/staff/onboard/list,/staff/onboard/view,/staff/onboard/info,/staff/onboard/export,/staff/onboard/exportExcel,/staff/onboard/downloadTemplate,/staff/onboard/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工入职信息-菜单管理-维护', '/staff/onboard/add,/staff/onboard/edit,/staff/onboard/delete,/staff/onboard/logicDelete,/staff/onboard/save,/staff/onboard/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 员工入职信息参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'StaffOnboard', 'gender', '1', '男', 1, 4, 0, 'gender', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '性别', 'StaffOnboard', 'gender', '2', '女', 1, 4, 0, 'gender', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工类型', 'StaffOnboard', 'staffType', '1', '全职', 1, 4, 0, 'staffType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工类型', 'StaffOnboard', 'staffType', '2', '兼职', 1, 4, 0, 'staffType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '员工类型', 'StaffOnboard', 'staffType', '3', '实习', 1, 4, 0, 'staffType', NULL, NULL, NULL);
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);
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