Commit 2d197f3d authored by “yiyousong”'s avatar “yiyousong”
parents d298661e 1ce0a911
......@@ -51,7 +51,10 @@ export const encodeURI = (data) => {
* @returns {string} val 解析后的结果
*/
export function formatterDate(time) {
if (!time) return '';
if(time==='undefined'||time===null) {
return '--'}
if (!time) return '--';
let date = new Date(Number(time));
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
......
......@@ -49,6 +49,7 @@ const router = new Router({
...restBuilder("job", "job"), // 职位信息
...restBuilder("staff/adjust/log", "staff/adjust/log"), // 员工调岗信息
...restBuilder("staff/onboard", "staff/onboard"), // 员工入职信息
...restBuilder("staff/regular", "staff/regular"), // 员工转正信息
...restBuilder("staff/leave", "staff/leave"), // 员工离职信息
...restBuilder("staff/contract", "staff/contract"), // 员工合同信息
......
......@@ -68,10 +68,21 @@
{{ form.deductPerson ? form.deductPerson : "--" }}</el-col
>
<el-col :span="12"
>图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
>图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</el-col>
</el-row>
</div>
</div>
......@@ -391,7 +402,7 @@ export default {
this.$forceUpdate(this.form);
},
picMatter(val) {
if (val || val !== "--") {
if (val) {
return (
<el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......@@ -453,15 +464,16 @@ export default {
: "";
}
this.form.checkResult = 1;
this.form.view = "核查";
this.$post("/perform/rules/list", {
page: 1,
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
});
this.form.view = "核查";
this.kaoqinArr = res.data.data;
this.open = true;
});
}
);
this.pageInfo.type = "edit";
......
......@@ -212,7 +212,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -84,10 +84,20 @@
{{ form.deductTime ? form.deductTime : "--" }}</el-col
>
<el-col :span="12"
>图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
>图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image
></el-col>
</el-row>
</div>
</div>
......@@ -492,7 +502,7 @@ export default {
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
this.kaoqinArr = res.data.data;
});
this.form.view = "核查";
this.open = true;
......
......@@ -217,7 +217,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -61,10 +61,20 @@
</el-row>
<el-row>
<el-col :span="24">
图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image
></el-col>
</el-row>
</div>
</div>
......@@ -248,8 +258,8 @@
/>
<Field
label="图片凭证地址"
prop="snapPath"
v-model="form.snapPath"
prop="filePaths"
v-model="form.filePaths"
type="textarea"
placeholder="请输入图片凭证地址"
/>
......@@ -465,7 +475,7 @@ export default {
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
this.kaoqinArr = res.data.data;
});
this.form.view = "核查";
this.open = true;
......@@ -554,7 +564,7 @@ export default {
happenTime: null,
duration: 0,
alarmTime: null,
snapPath: "",
filePaths: "",
ruleId: null,
ruleName: "",
subMethod: 1,
......
......@@ -219,7 +219,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -42,7 +42,7 @@
{{ util_formatterDate(form.alarmTime)}}
</el-descriptions-item>
<el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.snapPath}}
{{form.filePaths}}
</el-descriptions-item>
<el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass">
{{form.ruleId}}
......
......@@ -63,10 +63,20 @@
</el-row>
<el-row>
<el-col :span="24">
图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image
></el-col>
</el-row>
</div>
</div>
......@@ -458,7 +468,7 @@ export default {
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
this.kaoqinArr = res.data.data;
});
this.form.view = "核查";
this.open = true;
......
......@@ -207,7 +207,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -59,10 +59,20 @@
</el-row>
<el-row>
<el-col :span="24"
>图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
>图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image
></el-col>
</el-row>
</div>
</div>
......@@ -457,7 +467,7 @@ export default {
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
this.kaoqinArr = res.data.data;
});
this.form.view = "核查";
this.open = true;
......
......@@ -215,7 +215,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -64,10 +64,20 @@
<el-row>
<el-col :span="12"
>图片凭证:{{
form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col
>图片凭证:
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image
></el-col>
</el-row>
</div>
</div>
......@@ -458,7 +468,7 @@ export default {
size: -1,
categoryId: this.form.categoryId,
}).then((res) => {
this.ruleArr = res.data.data;
this.kaoqinArr = res.data.data;
});
this.form.view = "核查";
this.open = true;
......
......@@ -216,7 +216,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -14,7 +14,8 @@
<el-button type="success" @click="drawer = true">预览</el-button>
</div>
<div style="margin: 10px 0;">
<el-tag :type="feedbackData.processStatus ? feedbackData.processStatus = 1 ? 'success' : 'info' : 'danger'" >
<el-tag
:type="feedbackData.processStatus ? feedbackData.processStatus = 1 ? 'success' : 'info' : 'danger'">
{{ feedbackData.processStatus ? feedbackData.processStatus
== 1 ? '进行中' : '已结束' : '未开始' }}</el-tag>
反馈时间:{{ feedbackData.timeStart }} ~ {{ feedbackData.timeEnd }}
......@@ -32,8 +33,8 @@
</div>
<!-- <el-button class="m15" type="primary" size="small">导出数据</el-button> -->
<div class="lBox m15">
<el-table ref="multipleTable" :data="staffList.data" tooltip-effect="dark" border
style="width: 100%;max-height: 450px;background-color: transparent; text-align: center;"
<el-table ref="multipleTable" :data="staffList.data" height="450" tooltip-effect="dark" border
style="width: 100%;background-color: transparent; text-align: center;"
@selection-change="handleSelectionChange" :header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }">
<el-table-column type="selection" width="55">
......@@ -239,7 +240,7 @@ export default {
}
})
this.staffList.data = arr
} else if(val == 3) {
} else if (val == 3) {
this.staffList.data.forEach(i => {
if (!i.backStatus) {
arr.push(i)
......@@ -282,6 +283,17 @@ export default {
})
},
handleCurrentChange(val) {
console.log(val)
this.staff.page = val
let id = localStorage.getItem('checkFeedbackId')
this.getStaffData(id)
},
handleSizeChange(val){
this.staff.size = val
let id = localStorage.getItem('checkFeedbackId')
this.getStaffData(id)
},
getStaffData(id) {
//人员数据
this.$post('/feedback/getStaffList', { feedbackId: id, size: this.staff.size, page: this.staff.page }).then(res => {
......
......@@ -35,7 +35,7 @@
}}</el-col
>
<el-col :span="8"
>异常时间:{{ form.errorTime ? form.errorTime : "--" }}</el-col
>异常时间:{{ formatterDate(form.errorTime) }}</el-col
>
<el-col :span="8"
>上下班时间:{{
......@@ -45,9 +45,7 @@
</el-row>
<el-row>
<el-col :span="10"
>实际打卡时间:{{
form.actualAttendTime ? form.actualAttendTime : "--"
}}</el-col
>实际打卡时间:{{ formatterDate(form.actualAttendTime) }}</el-col
>
<el-col :span="9"
>异常结果:{{
......@@ -55,12 +53,16 @@
}}</el-col
>
<el-col :span="5"
>加分/扣分方式:{{ form.subMethod ? form.subMethod : "--" }}</el-col
>加分/扣分方式:{{
form.subAddType
? util_formatter("subAddType", form.subAddType)
: "--"
}}</el-col
>
</el-row>
<el-row>
<el-col :span="8"
>加分/扣分时间:{{ form.deductTime ? form.deductTime : "--" }}</el-col
>加分/扣分时间:{{ formatterDate(form.deductTime) }}</el-col
>
<el-col :span="8"
>加分/扣分人员:{{
......@@ -76,7 +78,9 @@
<el-row>
<el-col :span="8"
>核查结果:{{
form.checkResult ? form.checkResult : "--"
form.checkResult
? util_formatter("checkResult", form.checkResult)
: "--"
}}</el-col
>
<el-col :span="8"
......@@ -98,7 +102,7 @@
}}</el-col
>
<el-col :span="8"
>核查时间:{{ form.checkTime ? form.checkTime : "--" }}</el-col
>核查时间:{{ formatterDate(form.checkTime) }}</el-col
>
</el-row>
</div>
......@@ -111,7 +115,7 @@
>申诉说明:{{ form.appealDesc ? form.appealDesc : "--" }}</el-col
>
<el-col :span="24"
>申诉时间:{{ form.appealTime ? form.appealTime : "--" }}</el-col
>申诉时间:{{ formatterDate(form.appealTime) }}</el-col
>
<el-col :span="24"
>申诉附件:
......@@ -133,22 +137,24 @@
</el-row>
</div>
</div>
<div class="box" v-if="form.view == '查看' || form.processStatus == 2">
<div class="box" v-if="form.view == '查看'">
<div class="title">申诉结果</div>
<div class="content">
<el-row>
<el-col :span="8"
>申诉结果:{{
form.appealResult ? form.appealResult : "--"
form.appealResult
? util_formatter("appealResult", form.appealResult)
: "--"
}}</el-col
>
<el-col :span="8"
>处理人员:{{
form.updateUserId ? form.updateUserId : "--"
util_formatter("updateUserId", form.updateUserId + "")
}}</el-col
>
<el-col :span="8"
>处理时间:{{ form.appealTime ? form.appealTime : "--" }}</el-col
>处理时间: {{ formatterDate(form.updateTime) }}</el-col
>
</el-row>
<el-row>
......@@ -457,6 +463,7 @@
import form from "@/assets/mixins/formdialog";
import { timestampToTime } from "@/assets/utils/dateFormat.js";
import { downloadFile } from "@/assets/utils/index";
import { formatterDate } from "@/assets/utils/index";
export default {
name: "PerformAttendAppealDetail",
......@@ -478,7 +485,13 @@ export default {
// 是否显示弹出层
open: false,
direction: "rtl",
toString: ["subMethod", "subAddType", "processStatus", "appealResult"],
toString: [
"subMethod",
"subAddType",
"processStatus",
"appealResult",
"updateUserId",
],
toDate: [
"attendanceDate",
"errorTime",
......@@ -498,6 +511,14 @@ export default {
},
methods: {
util_formatter(key, val) {
try {
return this.dict[key][val];
} catch (error) {
return val;
}
},
formatterDate,
// 下载附件
hanldeDownloadFile(val) {
console.log(val);
......@@ -571,38 +592,14 @@ export default {
this.$get("/perform/attend/appeal/info", { id: row.id }).then((res) => {
if (res.code == 1) {
this.form = res.data;
this.dict = res.dict;
} else {
this.reset();
}
for (let key in this.form) {
key == "actualAttendTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "attendanceDate"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "createTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "errorTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "updateTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "checkTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "reviewTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "appealTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "complainTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "happenTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "alarmTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: key == "alarmTime"
? (this.form[key] = timestampToTime(this.form[key], 6))
: "";
}
this.form.appealResult = "";
this.form.processStatus = 2;
this.form.remark = "";
this.form.view = "核查";
this.open = true;
});
this.pageInfo.type = "edit";
......
......@@ -172,13 +172,13 @@ export default {
{ label: "所属部门", prop: "deptName" },
{ 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: "加分/扣分时间",
prop: "attendanceDate",
prop: "deductTime",
formatter: this.formatterDate,
},
......@@ -225,6 +225,7 @@ export default {
onDel={this.toDel}
/>
) : (
<table-buttons
noAdd
noDel
......
......@@ -12,7 +12,7 @@
<el-form-item label="姓名:">
<p v-if="form.view == '查看'">{{ form.staffName }}</p>
<el-select
v-model="form.staffName"
v-model="form.staffId"
filterable
@change="staffChange"
style="width: 100%;"
......@@ -92,8 +92,9 @@
<el-date-picker
v-else
v-model="form.errorTime"
type="date"
type="datetime"
placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;"
>
</el-date-picker>
......@@ -104,18 +105,16 @@
<el-col :span="22">
<el-form-item label="实际打卡时间:">
<p v-if="form.view == '查看'">{{ form.actualAttendTime }}</p>
<el-time-select
<el-date-picker
v-else
v-model="form.actualAttendTime"
:picker-options="{
start: '06:00',
step: '00:01',
end: '18:30',
}"
placeholder="选择时间"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
style="width: 100%;"
>
</el-time-select>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -123,11 +122,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -440,7 +450,9 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
......@@ -454,7 +466,6 @@ export default {
// this.urls.currUrl = "perform/attend/record/edit";
// this.getData();
this.$get("/perform/attend/record/info", { id: row.id }).then((res) => {
console.log(res.data);
if (res.code == 1) {
this.form = res.data;
} else {
......@@ -489,6 +500,8 @@ export default {
}).then((res) => {
this.ruleArr = res.data.data;
});
this.form.filePaths = this.form.filePaths ? this.form.filePaths : "";
console.log(this.form);
this.open = true;
});
this.pageInfo.type = "edit";
......@@ -573,7 +586,7 @@ export default {
errorResult: "",
errorTime: "",
fileNames: "",
snapPath: "",
filePaths: "",
goOffTimeStr: "",
processStatus: 1,
remark: "",
......
......@@ -218,11 +218,20 @@ export default {
{ label: "异常结果", prop: "errorResult" },
/*
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
*/
{
label: "图片凭证",
prop: "filePaths",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleNme" },
......
......@@ -174,11 +174,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -502,7 +513,9 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
let arr = this.staffArr.filter((v) => v.id == val);
......@@ -583,7 +596,7 @@ export default {
score: "",
processStatus: 1,
remark: "",
snapPath: "",
filePaths: "",
fileNames: "",
};
this.open = true;
......
......@@ -224,7 +224,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -148,11 +148,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -278,8 +289,8 @@
/>
<Field
label="图片凭证地址"
prop="snapPath"
v-model="form.snapPath"
prop="filePaths"
v-model="form.filePaths"
type="textarea"
placeholder="请输入图片凭证地址"
/>
......@@ -473,7 +484,10 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
......@@ -609,7 +623,7 @@ export default {
happenTime: null,
duration: 0,
alarmTime: null,
snapPath: "",
filePaths: "",
ruleId: null,
ruleName: "",
subMethod: "",
......
......@@ -227,7 +227,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleName" },
......
......@@ -200,7 +200,7 @@ export default {
formatter: this.formatterDate,
},
{ label: "图片凭证地址", prop: "snapPath" },
{ label: "图片凭证地址", prop: "filePaths" },
{ label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
......
......@@ -39,7 +39,7 @@
{{ util_formatterDate(form.alarmTime)}}
</el-descriptions-item>
<el-descriptions-item label="图片凭证地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.snapPath}}
{{form.filePaths}}
</el-descriptions-item>
<el-descriptions-item label="绩效规则id" label-class-name="labelClass" content-class-name="contentClass">
{{form.ruleId}}
......
......@@ -126,11 +126,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -442,7 +453,9 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
......
......@@ -214,7 +214,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleName" },
......
......@@ -86,11 +86,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -403,8 +414,9 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.$forceUpdate(this.form.snapPath);
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
......@@ -445,7 +457,7 @@ export default {
: "";
}
this.form.processStatus = 2;
this.form.snapPath ? "" : (this.form.snapPath = "");
this.form.filePaths ? "" : (this.form.filePaths = "");
this.form.view = "核查";
this.staffChange(this.form.staffId);
this.$post("/perform/rules/list", {
......@@ -546,7 +558,7 @@ export default {
remark: "",
categoryId: "",
happenTime: "",
snapPath: "",
filePaths: "",
};
this.resetForm("form");
},
......
......@@ -223,7 +223,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleName" },
......
......@@ -139,11 +139,22 @@
<el-col :span="22">
<el-form-item label="图片凭证:">
<div v-if="form.view == '查看'">
{{ form.snapPath ? picMatter(form.snapPath) : "--" }}
<el-image
style="width: 100px; height: 100px"
:src="
`${
form.filePaths.indexOf('http') == -1
? baseUrl + form.filePaths
: form.filePaths
}`
"
:preview-src-list="form.filePaths"
>
</el-image>
</div>
<ImageUpload
v-else
:value="form.snapPath"
:value="form.filePaths"
@input="replaceImage"
></ImageUpload>
</el-form-item>
......@@ -457,7 +468,9 @@ export default {
});
},
replaceImage(val) {
this.form.snapPath = val;
this.form.filePaths = val;
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
......@@ -587,7 +600,7 @@ export default {
deptId: "",
deptName: "",
fileNames: "",
snapPath: "",
filePaths: "",
processStatus: 1,
remark: "",
reviewDevice: "",
......
......@@ -224,7 +224,7 @@ export default {
{
label: "图片凭证",
prop: "snapPath",
prop: "filePaths",
formatter: this.formatterPic,
},
......
......@@ -44,7 +44,7 @@
<span>最近更新:</span><span>{{ val.createTime }}</span>
</p>
<p class="goal_txt">
<span>更新人员:</span><span>{{ val.createUserId }}</span>
<span>更新人员:</span><span>{{ val.createUserName }}</span>
</p>
<div class="button_box">
<el-button
......
......@@ -38,6 +38,7 @@
data() {
return {
config: {
isshowTabPane: true,
search: [
{
name: "fullName",
......
......@@ -38,6 +38,7 @@
data() {
return {
config: {
isshowTabPane: true,
search: [
{
name: "staffName",
......
<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
......@@ -41,18 +41,22 @@ export default {
name: "createTimeStart",
type: "date",
label: "月份",
fuzzy: false,
},
{
name: "deptId",
type: "select",
label: "所属部门",
label: "全部部门",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: false,
},
],
columns: [
......
......@@ -38,6 +38,7 @@
data() {
return {
config: {
isshowTabPane: true,
search: [
{
name: "staffName",
......
......@@ -46,8 +46,8 @@
v-model="form.mobile"
:maxLength="11"
/>
<!-- <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="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="角色分配"
:span="24"
......
......@@ -344,7 +344,7 @@ export default {
分配角色
</el-button>
*/}
<span> </span>
<el-button
size="mini"
type="text"
......@@ -353,6 +353,15 @@ export default {
>
分配部门
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-share"
onClick={() => this.distributeDept(row)}
>
修改密码
</el-button>
</div>
);
......
......@@ -95,11 +95,11 @@
<profiles.hik.appKey>25128371</profiles.hik.appKey>
<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.appKey>dingpqzradgfr4efdi2j</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd</profiles.dingtalk.appSecret>
<profiles.webUrl>http://112.19.80.237:11039/attendance</profiles.webUrl>
<profiles.webUrl>https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/performance-h5</profiles.webUrl>
<package.environment>build</package.environment>
<skipUi>false</skipUi>
</properties>
......
......@@ -32,8 +32,8 @@ public class MessageServiceImpl implements MessageService {
Msg msg = new Msg();
msg.setMsgtype("link");
Link link = new Link();
link.setPicUrl("");
link.setMessageUrl("webUrl" + dingMsg.getPath());
//link.setMessageUrl(webUrl + dingMsg.getPath());
link.setMessageUrl(webUrl );
if (SubAddTypeEnum.增加.getValue() == dingMsg.getSubAddType()) {
link.setText(String.format("你好,经人工核实后你在%%-%s" +
......@@ -47,6 +47,8 @@ public class MessageServiceImpl implements MessageService {
msg.setLink(link);
workMsgReq.setUseridList(dingMsg.getUserIds());
workMsgReq.setMsg(msg);
Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq);
if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) {
String requestId = sendWorkRest.getData();
......@@ -70,6 +72,7 @@ public class MessageServiceImpl implements MessageService {
}
msg.setText(text);
workMsgReq.setUseridList(dingMsg.getUserIds());
workMsgReq.setMsg(msg);
Rest<String> sendWorkRest = dingPersonService.sendWorkMsg(workMsgReq);
if (YesNoEnum.YES.getValue() == sendWorkRest.getCode()) {
String requestId = sendWorkRest.getData();
......
......@@ -3,7 +3,6 @@ package com.mortals.xhx.base.system.user.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -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.service.UserService;
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.service.DeptService;
import io.jsonwebtoken.Claims;
......@@ -60,7 +60,7 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Override
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, "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)));
......
......@@ -3,7 +3,7 @@ package com.mortals.xhx.busiz;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSON;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
......@@ -138,7 +138,20 @@ public class TestController {
if (!ObjectUtils.isEmpty(staffEntity.getPicUri())) {
ImgReq imgReq = new ImgReq();
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()) {
byte[] bytes = Base64.decode(rest.getData());
if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) {
......@@ -149,10 +162,16 @@ public class TestController {
updateList.add(staffEntity);
}
} else {
log.info("download:{}", JSON.toJSONString(rest));
}*/
}
}
if (!ObjectUtils.isEmpty(updateList)) {
staffService.update(updateList);
}
return "更新数量:" + updateList.size();
}
......
......@@ -152,6 +152,13 @@ public class InspectSaveReq extends BaseReq {
private String ruleDesc;
private String fileNames;
private String filePaths;
private String windowNum;
}
......@@ -221,4 +221,14 @@ public class PerformDetailInfo {
* 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)
*/
private Integer appealStatus;
private String ruleDesc;
private String deductPerson;
private Date deductTime;
}
......@@ -66,4 +66,25 @@ public class PerformInfo {
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>
recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId());
recordEntity.setRuleNme(rule.getName());
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setDeductPerson("admin");
......
......@@ -13,8 +13,7 @@ import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.h5.req.AppealReq;
import com.mortals.xhx.busiz.h5.req.PerformReq;
import com.mortals.xhx.busiz.h5.rsp.AppealStatInfo;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.service.*;
......@@ -66,6 +65,14 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
@Autowired
private PerformAttendAppealService appealService;
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
}
/**
* 个人申诉绩效统计
......@@ -82,9 +89,9 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
try {
//todo 查询当前登录人的绩效分数
AppealStatInfo appealStatInfo = new AppealStatInfo();
appealStatInfo.setTotalScore(new BigDecimal("10.52"));
appealStatInfo.setTotalScore(new BigDecimal("10.52").setScale(1,BigDecimal.ROUND_HALF_UP));
appealStatInfo.setTotalTimes(12);
appealStatInfo.setTodayScore(new BigDecimal("2.5"));
appealStatInfo.setTodayScore(new BigDecimal("2.5").setScale(1,BigDecimal.ROUND_HALF_UP));
appealStatInfo.setTodayTimes(3);
rest.setData(appealStatInfo);
recordSysLog(request, busiDesc + " 【成功】");
......@@ -131,7 +138,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
parsePageInfo(model, result.getPageInfo());
rest.setData(model);
this.init(model, context);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......@@ -150,13 +157,15 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(appealReq));
Rest<PerformAttendAppealEntity> rest = Rest.ok(busiDesc + " 【成功】");
Context context = this.getContext();
Map<String, Object> model = new HashMap<>();
try {
if (ObjectUtils.isEmpty(appealReq.getId())) {
throw new AppException("详细查询id不能为空!");
}
PerformAttendAppealEntity performAttendAppealEntity = appealService.get(appealReq.getId(), context);
rest.setData(performAttendAppealEntity);
this.init(model, context);
rest.setDict(model.get("dict"));
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......@@ -262,7 +271,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
public static void main(String[] args) {
System.out.println(new BigDecimal(15.52).setScale(1,BigDecimal.ROUND_HALF_UP).toString());
}
}
......@@ -92,7 +92,7 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
@UnAuth
public String login(@RequestBody DingTalkReq req) throws Exception {
JSONObject ret = new JSONObject();
JSONObject data = new JSONObject();
UserEntity userEntity = null;
try {
if (ObjectUtils.isEmpty(req.getCode())) {
......@@ -103,15 +103,19 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
if (personRest.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException(String.format("获取钉钉用户异常,%s", personRest.getMsg()));
}
log.info(personRest.getData());
if(ObjectUtils.isEmpty(personRest.getData())) throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
if (ObjectUtils.isEmpty(personRest.getData()))
throw new AppException(1012, "未找到响应的钉钉用户!");
//根据钉钉的用户查询系统绑定的用户,获取
UserQuery userQuery = new UserQuery();
userQuery.setDingUserId(personRest.getData());
userEntity = userService.selectOne(userQuery);
if (ObjectUtils.isEmpty(userEntity))
throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
JSONObject data = new JSONObject();
if (ObjectUtils.isEmpty(userEntity)) {
ret.put("openId", personRest.getData());
throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户2!");
}
data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType());
userEntity.setLoginTime(System.currentTimeMillis());
......
......@@ -23,10 +23,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.*;
......@@ -82,13 +79,19 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
//已反馈
//查询我已经回答过的
List<Long> feedbackIdList = answerService.find(new FeedbackAnswerQuery().staffId(context.getUser().getCustomerId())).stream().map(i -> i.getFeedbackId()).distinct().collect(Collectors.toList());
if(ObjectUtils.isEmpty(feedbackIdList)){
pageAllInfo.setTotalResult(0);
model.put(PAGEINFO_KEY, pageAllInfo);
model.put(KEY_RESULT_DATA, new ArrayList<>());
parsePageInfo(model, pageAllInfo);
}else{
FeedbackQuery feedbackQuery = new FeedbackQuery();
feedbackQuery.setIdList(feedbackIdList);
Result<FeedbackEntity> result = feedbackService.find(feedbackQuery, pageAllInfo, null);
model.put(PAGEINFO_KEY, result.getPageInfo());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
}
} else {
//未反馈
//查询我的反馈 但是还未回答的
......@@ -133,6 +136,7 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
//如果时间已经结束 则不能再提交
FeedbackEntity feedbackEntity = feedbackService.get(req.getFeedbackId(), context);
if(ObjectUtils.isEmpty(feedbackEntity)) throw new AppException("未找到当前问卷,请联系管理员!");
if (DateUtil.compare(new Date(), feedbackEntity.getFeedbackTimeStart()) < 0)
throw new AppException("当前反馈问卷信息还未开始!");
if (DateUtil.compare(new Date(), feedbackEntity.getFeedbackTimeEnd()) > 0)
......@@ -145,14 +149,20 @@ public class FeedbackApiController extends AbstractBaseController<FeedbackReq> {
//添加问答
List<FeedbackAnswerEntity> feedbackAnswerList = req.getFeedbackAnswerList();
for (FeedbackAnswerEntity feedbackAnswerEntity : feedbackAnswerList) {
feedbackAnswerEntity.setFeedbackId(req.getFeedbackId());
feedbackAnswerEntity.setStaffId(context.getUser().getCustomerId());
feedbackAnswerEntity.setCreateUserId(context.getUser().getId());
feedbackAnswerEntity.setCreateTime(new Date());
List<FeedbackAnswerOptionEntity> feedbackAnswerOptionList = feedbackAnswerEntity.getFeedbackAnswerOptionList();
for (FeedbackAnswerOptionEntity feedbackAnswerOptionEntity : feedbackAnswerOptionList) {
feedbackAnswerOptionEntity.setCreateUserId(context.getUser().getId());
feedbackAnswerOptionEntity.setCreateTime(new Date());
}
}
answerService.save(feedbackAnswerList, context);
recordSysLog(request, busiDesc + " 【成功】");
......
......@@ -13,15 +13,16 @@ import com.mortals.xhx.busiz.h5.req.PerformReq;
import com.mortals.xhx.busiz.h5.rsp.InspectStatInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformInfo;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckAllRecordDao;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import com.mortals.xhx.module.check.service.*;
import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.service.*;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffPerformStatService;
import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
......@@ -84,6 +85,18 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
@Autowired
private CheckOtherRecordService checkOtherRecordService;
@Autowired
private CheckAllRecordDao checkAllRecordDao;
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
}
/**
* 个人巡查效统计
......@@ -99,10 +112,20 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
}
log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName());
try {
//todo
Integer totalTimes=0;
Integer todayTimes=0;
CheckAllRecordQuery checkAllRecordQuery = new CheckAllRecordQuery();
checkAllRecordQuery.setSubMethod(SubMethodEnum.大厅巡查.getValue());
checkAllRecordQuery.setCreateUserId(context.getUser().getId());
totalTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
checkAllRecordQuery.setCheckTimeStart(DateUtil.today());
checkAllRecordQuery.setCheckTimeEnd(DateUtil.today());
todayTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
InspectStatInfo performStatInfo = new InspectStatInfo();
performStatInfo.setTotalTimes(RandomUtil.randomInt(40,50));
performStatInfo.setTodayTimes(RandomUtil.randomInt(1,5));
performStatInfo.setTotalTimes(totalTimes);
performStatInfo.setTodayTimes(todayTimes);
rest.setData(performStatInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
......@@ -139,11 +162,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
CheckAllRecordQuery query = new CheckAllRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setCreateUserId(context.getUser().getCustomerId());
query.setCreateUserId(context.getUser().getId());
PageInfo pageInfo = buildPageInfo(performReq);
if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) {
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
List<CheckAllRecordVo> allCheckRecord = result.getList();
......@@ -184,6 +206,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
parsePageInfo(model, result.getPageInfo());
}
rest.setData(model);
this.init(model, context);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......@@ -261,12 +284,16 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId());
recordEntity.setRuleNme(rule.getName());
recordEntity.setRuleName(rule.getName());
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setErrorTime(new Date());
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformAttendRecordEntity save = attendRecordService.save(recordEntity);
......@@ -299,7 +326,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformReviewRecordEntity save = reviewRecordService.save(recordEntity);
return save.newEntity();
......@@ -331,9 +358,8 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformComplainRecordEntity save = complainRecordService.save(recordEntity);
return save.newEntity();
......@@ -364,7 +390,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformGoworkRecordEntity save = performGoworkRecordService.save(recordEntity);
return save.newEntity();
......@@ -396,7 +422,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformEffectRecordEntity save = effectRecordService.save(recordEntity);
return save.newEntity();
......@@ -427,7 +453,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date());
PerformOtherRecordEntity save = otherRecordService.save(recordEntity);
return save.newEntity();
......@@ -439,6 +465,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
@PostMapping(value = "info")
public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) {
Context context = this.getContext();
Map<String, Object> model = new HashMap<>();
String busiDesc = "个人巡查详细";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(performReq));
Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】");
......@@ -475,6 +502,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
log.error(busiDesc, e);
rest = Rest.fail(super.convertException(e));
}
this.init(model, context);
rest.setDict(model.get("dict"));
return rest;
}
......
......@@ -5,6 +5,7 @@ import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
......@@ -15,17 +16,20 @@ import com.mortals.xhx.busiz.h5.req.PerformReq;
import com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformStatInfo;
import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.AppealStatusEnum;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckAllRecordDao;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import com.mortals.xhx.module.check.service.*;
import com.mortals.xhx.module.perform.model.PerformAttendAppealEntity;
import com.mortals.xhx.module.perform.model.PerformAttendAppealQuery;
import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformAttendAppealService;
import com.mortals.xhx.module.perform.service.PerformRulesService;
import com.mortals.xhx.module.staff.model.StaffPerformStatEntity;
import com.mortals.xhx.module.staff.model.StaffPerformStatQuery;
import com.mortals.xhx.module.staff.service.StaffPerformStatService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -72,6 +76,22 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
@Autowired
private PerformAttendAppealService appealService;
@Autowired
private CheckAllRecordDao checkAllRecordDao;
@Autowired
private StaffPerformStatService staffPerformStatService;
@Autowired
private PerformRulesService rulesService;
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "checkResult", CheckStatusEnum.getEnumMap());
this.addDict(model, "subMethod", SubMethodEnum.getEnumMap());
this.addDict(model, "subAddType", SubAddTypeEnum.getEnumMap());
this.addDict(model, "checkType", CheckTypeEnum.getEnumMap());
this.addDict(model, "reviewResult", ReviewResultEnum.getEnumMap());
}
/**
* 个人当天绩效统计
......@@ -87,12 +107,40 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
}
log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName());
try {
//todo
CheckAllRecordQuery checkAllRecordQuery = new CheckAllRecordQuery();
checkAllRecordQuery.setSubAddType(SubAddTypeEnum.扣除.getValue());
checkAllRecordQuery.setStaffId(context.getUser().getCustomerId());
int totalTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
checkAllRecordQuery.setCheckTimeStart(DateUtil.today());
checkAllRecordQuery.setCheckTimeEnd(DateUtil.today());
int todayTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
StaffPerformStatQuery staffPerformStatQuery = new StaffPerformStatQuery();
staffPerformStatQuery.setStaffId(context.getUser().getCustomerId());
staffPerformStatQuery.setYear(DateUtil.year(new Date()));
staffPerformStatQuery.setMonth(DateUtil.month(new Date())+1);
List<StaffPerformStatEntity> staffPerformStatEntities = staffPerformStatService.find(staffPerformStatQuery);
BigDecimal totalScore=new BigDecimal(0.0);
if(ObjectUtils.isEmpty(staffPerformStatEntities)){
totalScore = staffPerformStatEntities.stream().map(item -> item.getTotalSubScore()).reduce(BigDecimal.ZERO, BigDecimal::add);
}
staffPerformStatQuery.setDay(DateUtil.dayOfMonth(new Date()));
//今日得分
StaffPerformStatEntity staffPerformStatEntity = staffPerformStatService.selectOne(staffPerformStatQuery);
BigDecimal todayScore=new BigDecimal(0.0);
if(!ObjectUtils.isEmpty(staffPerformStatEntity)){
todayScore=staffPerformStatEntity.getTotalSubScore();
}
PerformStatInfo performStatInfo = new PerformStatInfo();
performStatInfo.setTotalScore(RandomUtil.randomBigDecimal(new BigDecimal("15"),new BigDecimal("45")));
performStatInfo.setTotalTimes(RandomUtil.randomInt(10,40));
performStatInfo.setTodayScore(RandomUtil.randomBigDecimal(new BigDecimal("2"),new BigDecimal("10")));
performStatInfo.setTodayTimes(RandomUtil.randomInt(10));
performStatInfo.setTotalScore(totalScore.setScale(1, BigDecimal.ROUND_HALF_UP));
performStatInfo.setTotalTimes(totalTimes);
performStatInfo.setTodayScore(todayScore.setScale(1, BigDecimal.ROUND_HALF_UP));
performStatInfo.setTodayTimes(todayTimes);
rest.setData(performStatInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
......@@ -135,7 +183,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
query.setStaffId(context.getUser().getCustomerId());
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
List<CheckAllRecordVo> allCheckRecord = result.getList();List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
List<CheckAllRecordVo> allCheckRecord = result.getList();
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
return performInfo;
......@@ -166,7 +215,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
......@@ -305,6 +353,8 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
log.error(busiDesc, e);
rest = Rest.fail(super.convertException(e));
}
this.init(model, context);
return rest;
}
......@@ -331,6 +381,7 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
@PostMapping(value = "info")
public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) {
Context context = this.getContext();
Map<String, Object> model = new HashMap<>();
String busiDesc = "个人绩效增减详细";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(performReq));
Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】");
......@@ -343,7 +394,6 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
......@@ -378,7 +428,16 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
}
}
PerformRulesEntity rulesEntity = rulesService.getCache(performDetailInfo.getRuleId().toString());
performDetailInfo.setRuleDesc(rulesEntity.getContent());
rest.setData(performDetailInfo);
log.info("rspperformDetailInfo:{}", JSON.toJSONString(performDetailInfo));
this.init(model, context);
rest.setDict(model.get("dict"));
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
......
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
......@@ -28,4 +28,7 @@ public interface CheckAllRecordDao {
* @return
*/
CheckAllScoreSummaryVo getScoreSummary(StaffCheckSummaryQuery query);
int getCount(CheckAllRecordQuery checkAllRecordQuery);
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment