Commit 87eccd76 authored by 王晓旭's avatar 王晓旭

修改评价

parents a4532be7 faec8751
<template>
<div>
<a-drawer
title="报表管理"
:visible="Visible"
@close="onClose"
:maskClosable="false"
:destroyOnClose="true"
width="850"
>
<div class="search-box flex aic jcb mb20">
<div>
<a-space>
<a-button type="primary" @click="handleAdd"> 新增 </a-button>
<a-button type="danger" @click="handleDelAll"> 批量删除 </a-button>
</a-space>
</div>
<a-input-search
style="width: 300px"
placeholder="请输入报表名称搜索"
enter-button="搜索"
v-model="censusName"
allowClear
@search="onSearch"
/>
</div>
<!-- 表格 -->
<div class="table-content">
<a-table
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 460 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="tableData"
:rowKey="(record) => record.id"
>
<!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{
(current - 1) * size + index + 1
}}</span>
<!-- 统计类型 -->
<template slot="censusType" slot-scope="text">
{{ filterDict(text.censusType) }}
</template>
<!-- 是否开放 -->
<template slot="status" slot-scope="text">
<a-tag color="blue" v-if="text.status === 1"></a-tag>
<a-tag color="red" v-else></a-tag>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
<!-- 新增报表 -->
<AddStatement
:addStatementVisile.sync="addStatementVisile"
:title="title"
:dict="dict"
ref="AddStatement"
@addSuccess="getStatementList"
></AddStatement>
</a-drawer>
</div>
</template>
<script>
import { getStatementList, delStatement } from "@/services/basicsetFun";
import AddStatement from "../modal/AddStatement.vue";
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "报表名称",
dataIndex: "censusName",
},
{
title: "统计类型",
scopedSlots: { customRender: "censusType" },
},
{
title: "访问路由",
dataIndex: "censusUrl",
},
{
title: "是否开放",
scopedSlots: { customRender: "status" },
},
{
title: "操作",
width: "100px",
scopedSlots: { customRender: "action" },
},
];
export default {
props: {
StatementVisible: {
type: Boolean,
require: true,
default: false,
},
},
components: {
AddStatement,
},
data() {
return {
columns,
modelInfo: {}, // 模块信息
loading: false,
total: 0,
size: 10,
current: 1,
pageSizeOptions: ["10", "30", "50", "100"],
selectedRowKeys: [],
tableData: [],
addStatementVisile: false,
title: "新增",
censusName: "",
dict: {}, // 字典
};
},
computed: {
Visible: {
get() {
return this.StatementVisible;
},
set(val) {
this.$emit("update:StatementVisible", val);
},
},
},
methods: {
// 获取模块信息
getModelInfo(modelInfo) {
this.modelInfo = modelInfo;
this.getStatementList();
},
// 获取报表列表
async getStatementList() {
this.loading = true;
let res = await getStatementList({
page: this.current,
size: this.size,
modelId: this.modelInfo.id,
censusName: `%${this.censusName}%`,
});
let { code, dict, data } = res.data;
this.dict = dict;
this.loading = false;
if (code == 1) {
if (!data.length && this.current > 1) {
this.current -= 1;
this.getStatementList();
}
this.tableData = data.data;
}
},
handleAdd() {
this.title = "新增报表";
this.addStatementVisile = true;
this.$refs.AddStatement.onAdd(this.modelInfo);
},
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 关闭抽屉
onClose() {
this.censusName = "";
this.selectedRowKeys = [];
this.Visible = false;
},
// 搜索
onSearch() {
this.current = 1;
this.getStatementList();
},
// 编辑
handleEdit(row) {
this.title = "编辑报表";
this.addStatementVisile = true;
this.$refs.AddStatement.onEdit(row, this.modelInfo);
},
// 翻页
handleChange(cur) {
this.current = cur;
this.getStatementList();
},
// 改变每页显示数量
showSizeChange(current, size) {
this.current = current;
this.size = size;
this.getStatementList();
},
// 删除
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await delStatement({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getStatementList();
}
},
});
},
// 选中
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 过滤列表数据
filterDict(dict) {
let str = "";
Object.keys(this.dict.censusType).forEach((keys) => {
if (dict == keys) {
str = this.dict.censusType[keys];
}
});
return str;
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -77,12 +77,20 @@ ...@@ -77,12 +77,20 @@
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-space>
<a
href="javascript:;"
class="primary"
@click="statementManage(text)"
>配置报表</a
>
<a href="javascript:;" class="edit" @click="handleEdit(text)" <a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a >编辑</a
> >
<a href="javascript:;" class="delete" @click="handleDel(text.id)" <a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a >删除</a
> >
</a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -212,12 +220,18 @@ ...@@ -212,12 +220,18 @@
:previewVisible.sync="previewVisible" :previewVisible.sync="previewVisible"
></PrevieModal> ></PrevieModal>
</a-modal> </a-modal>
<!-- 表别管理 -->
<StatementManage
ref="StatementManage"
:StatementVisible.sync="StatementVisible"
></StatementManage>
</div> </div>
</template> </template>
<script> <script>
import { modelList, addMode, delMode } from "@/services/basicsetFun"; import { modelList, addMode, delMode } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue"; import PrevieModal from "@/components/PrevieModal.vue";
import StatementManage from "./components/StatementManage.vue";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -262,13 +276,14 @@ const columns = [ ...@@ -262,13 +276,14 @@ const columns = [
}, },
{ {
title: "操作", title: "操作",
width: "120px", width: "180px",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]; ];
export default { export default {
components: { components: {
PrevieModal, PrevieModal,
StatementManage,
}, },
data() { data() {
return { return {
...@@ -311,6 +326,8 @@ export default { ...@@ -311,6 +326,8 @@ export default {
{ required: true, message: "模块图标不能为空", trigger: "change" }, { required: true, message: "模块图标不能为空", trigger: "change" },
], ],
}, },
StatementVisible: false,
modelInfo: {},
}; };
}, },
created() { created() {
...@@ -485,6 +502,14 @@ export default { ...@@ -485,6 +502,14 @@ export default {
// return false; // return false;
// } // }
// }, // },
statementManage(row) {
let obj = {
id: row.id,
modelName: row.modelName,
};
this.StatementVisible = true;
this.$refs.StatementManage.getModelInfo(obj);
},
}, },
}; };
</script> </script>
...@@ -508,7 +533,6 @@ export default { ...@@ -508,7 +533,6 @@ export default {
// } // }
.edit { .edit {
color: #03d76f; color: #03d76f;
margin-right: 15px;
} }
.delete { .delete {
color: #f94545; color: #f94545;
......
<template>
<div>
<a-modal
v-model="Visible"
:maskClosable="false"
:title="title"
@cancel="handleClose"
:zIndex="1001"
destroyOnClose
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
ref="ruleForm"
:model="formData"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="所属模块">
<a-input disabled :value="modelInfo.modelName" />
</a-form-model-item>
<a-form-model-item label="报表名称" prop="censusName">
<a-input v-model="formData.censusName" placeholder="请输入报表名称" />
</a-form-model-item>
<a-form-model-item label="报表路由" prop="censusUrl">
<a-input
v-model="formData.censusUrl"
placeholder="请输入报表访问路由"
/>
</a-form-model-item>
<a-form-model-item label="统计类型" prop="censusType">
<a-select v-model="formData.censusType" placeholder="请选择统计类型">
<a-select-option
v-for="(v, key) in dict.censusType"
:key="key"
:value="Number(key)"
>
{{ v }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="是否开放" prop="status">
<YSwitch v-model="formData.status"></YSwitch>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import { addStatement } from "@/services/basicsetFun";
import YSwitch from "@/components/yswitch/YSwitch.vue";
export default {
props: {
title: {
require: true,
type: String,
default: "",
},
addStatementVisile: {
type: Boolean,
require: true,
default: false,
},
dict: {
type: Object,
require: true,
default: () => {
return {};
},
},
},
components: {
YSwitch,
},
data() {
return {
modelInfo: {},
formData: {
modelId: "", // 模块id
censusName: "", // 报表名称
censusUrl: "", // 报表访问路由
censusType: undefined, // 统计类型
status: 1, // 状态(0:为开通,1:开通)
},
rules: {
censusName: [
{ required: true, message: "请输入报表名称", trigger: "blur" },
],
censusUrl: [
{ required: true, message: "请输入报表访问路由", trigger: "blur" },
],
censusType: [
{ required: true, message: "请选择统计类型", trigger: "change" },
],
},
};
},
computed: {
Visible: {
get() {
return this.addStatementVisile;
},
set(val) {
this.$emit("update:addStatementVisile", val);
},
},
},
methods: {
// 新增
onAdd(modelInfo) {
Object.assign(this.formData, this.$options.data().formData);
this.formData.id && this.$delete(this.formData, "id");
this.modelInfo = modelInfo;
this.formData.modelId = modelInfo.id;
},
// 编辑
onEdit(data, modelInfo) {
this.modelInfo = modelInfo;
this.formData = { ...data };
},
// 关闭弹窗
handleClose() {
this.$refs.ruleForm.resetFields();
this.Visible = false;
},
// 保存
handleOk() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await addStatement(this.formData);
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
});
},
// 重置
handleReset() {
this.$refs.ruleForm.resetFields();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
cancel-text="取消" cancel-text="取消"
width="820px" width="820px"
:maskClosable="false" :maskClosable="false"
destroyOnClose
> >
<a-form-model <a-form-model
:model="form" :model="form"
...@@ -53,31 +54,14 @@ ...@@ -53,31 +54,14 @@
{{ v.name }}</a-select-option {{ v.name }}</a-select-option
> >
</a-select> </a-select>
<!-- <a-select
v-model="form.deptId"
@change="handleDeptSelect"
placeholder="请选择部门"
>
<a-select-option
v-for="v in diptData"
:key="v.id"
:value="v.id"
>{{ v.name }}</a-select-option
>
</a-select> -->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="星级" prop="starlevel"> <a-form-model-item label="经办人Id" prop="operatorId">
<a-select v-model="form.starlevel" placeholder="请选择星级"> <a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
<a-select-option :value="5">5星</a-select-option>
<a-select-option :value="4">4星</a-select-option>
<a-select-option :value="3">3星</a-select-option>
<a-select-option :value="2">2星</a-select-option>
<a-select-option :value="1">1星</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="12"> <!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId"> <a-form-model-item label="所属窗口" prop="windowId">
<a-select <a-select
...@@ -96,18 +80,33 @@ ...@@ -96,18 +80,33 @@
</a-col> --> </a-col> -->
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="星级" prop="starlevel">
<a-select
allowClear
v-model="form.starlevel"
placeholder="请选择星级"
>
<a-select-option :value="5">5星</a-select-option>
<a-select-option :value="4">4星</a-select-option>
<a-select-option :value="3">3星</a-select-option>
<a-select-option :value="2">2星</a-select-option>
<a-select-option :value="1">1星</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职务" prop="userpost"> <a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" /> <a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职称" prop="posttitle"> <a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" /> <a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus"> <a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select <a-select
...@@ -140,9 +139,14 @@ ...@@ -140,9 +139,14 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="电话" prop="phone">
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row v-if="form.dangyuan === 99"> <a-row v-if="form.dangyuan === 99">
<a-col :span="12"> </a-col> <!-- <a-col :span="12"> </a-col> -->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="其他称号" prop="dangyuanext"> <a-form-model-item label="其他称号" prop="dangyuanext">
<a-input v-model="form.dangyuanext" placeholder="请输入称号" /> <a-input v-model="form.dangyuanext" placeholder="请输入称号" />
...@@ -150,18 +154,11 @@ ...@@ -150,18 +154,11 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="电话" prop="phone">
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="手机" prop="mobile"> <a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" /> <a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="身份证" prop="idCard"> <a-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" /> <a-input v-model="form.idCard" placeholder="请输入身份证号码" />
...@@ -428,6 +425,7 @@ export default { ...@@ -428,6 +425,7 @@ export default {
duty: "", // 岗位职责 duty: "", // 岗位职责
promise: "", // 服务承诺 promise: "", // 服务承诺
business: "", // 办理事项 business: "", // 办理事项
operatorId: "", // 经办人id
// modelIds: [], // 模块 // modelIds: [], // 模块
}, },
rules: { rules: {
...@@ -529,7 +527,7 @@ export default { ...@@ -529,7 +527,7 @@ export default {
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
this.$refs.formData.resetFields(); // this.$refs.formData.resetFields();
this.loading = false; this.loading = false;
this.Visible = false; this.Visible = false;
}, },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
cancel-text="重置" cancel-text="重置"
width="820px" width="820px"
:maskClosable="false" :maskClosable="false"
destroyOnClose
> >
<a-form-model <a-form-model
:model="form" :model="form"
...@@ -53,37 +54,14 @@ ...@@ -53,37 +54,14 @@
{{ v.name }}</a-select-option {{ v.name }}</a-select-option
> >
</a-select> </a-select>
<!-- <a-select
v-model="form.deptId"
@change="handleDeptSelect"
allowClear
placeholder="请选择部门"
>
<a-select-option
v-for="v in diptData"
:key="v.id"
:value="v.id"
>{{ v.name }}</a-select-option
>
</a-select> -->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="星级" prop="starlevel"> <a-form-model-item label="经办人Id" prop="operatorId">
<a-select <a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
allowClear
v-model="form.starlevel"
placeholder="请选择星级"
>
<a-select-option :value="5">5星</a-select-option>
<a-select-option :value="4">4星</a-select-option>
<a-select-option :value="3">3星</a-select-option>
<a-select-option :value="2">2星</a-select-option>
<a-select-option :value="1">1星</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="12"> <!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId"> <a-form-model-item label="所属窗口" prop="windowId">
<a-select <a-select
...@@ -102,18 +80,33 @@ ...@@ -102,18 +80,33 @@
</a-col> --> </a-col> -->
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="星级" prop="starlevel">
<a-select
allowClear
v-model="form.starlevel"
placeholder="请选择星级"
>
<a-select-option :value="5">5星</a-select-option>
<a-select-option :value="4">4星</a-select-option>
<a-select-option :value="3">3星</a-select-option>
<a-select-option :value="2">2星</a-select-option>
<a-select-option :value="1">1星</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职务" prop="userpost"> <a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" /> <a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职称" prop="posttitle"> <a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" /> <a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus"> <a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select <a-select
...@@ -146,9 +139,14 @@ ...@@ -146,9 +139,14 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="电话" prop="phone">
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row v-if="form.dangyuan === 99"> <a-row v-if="form.dangyuan === 99">
<a-col :span="12"> </a-col> <!-- <a-col :span="12"> </a-col> -->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="其他称号" prop="dangyuanext"> <a-form-model-item label="其他称号" prop="dangyuanext">
<a-input v-model="form.dangyuanext" placeholder="请输入称号" /> <a-input v-model="form.dangyuanext" placeholder="请输入称号" />
...@@ -156,18 +154,11 @@ ...@@ -156,18 +154,11 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="电话" prop="phone">
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="手机" prop="mobile"> <a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" /> <a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="身份证" prop="idCard"> <a-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" /> <a-input v-model="form.idCard" placeholder="请输入身份证号码" />
...@@ -470,6 +461,7 @@ export default { ...@@ -470,6 +461,7 @@ export default {
duty: "", // 岗位职责 duty: "", // 岗位职责
promise: "", // 服务承诺 promise: "", // 服务承诺
business: "", // 办理事项 business: "", // 办理事项
operatorId: "", // 经办人id
// modelIds: [], // 模块 // modelIds: [], // 模块
}, },
rules: { rules: {
...@@ -582,7 +574,7 @@ export default { ...@@ -582,7 +574,7 @@ export default {
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
this.$refs.formData.resetFields(); // this.$refs.formData.resetFields();
this.loading = false; this.loading = false;
this.Visible = false; this.Visible = false;
}, },
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
onChange: handlePagination, onChange: handlePagination,
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
:scroll="{ y: 450 }" :scroll="{ y: 530 }"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
:data-source="WorkmanData" :data-source="WorkmanData"
......
...@@ -17,6 +17,9 @@ module.exports = { ...@@ -17,6 +17,9 @@ module.exports = {
info: `${BASE_URL}/base/model/info`, info: `${BASE_URL}/base/model/info`,
save: `${BASE_URL}/base/model/save`, save: `${BASE_URL}/base/model/save`,
delete: `${BASE_URL}/base/model/delete`, delete: `${BASE_URL}/base/model/delete`,
saveStatement: `${BASE_URL}/base/model/census/save`,
statementList: `${BASE_URL}/base/model/census/list`,
delStatement: `${BASE_URL}/base/model/census/delete`,
}, },
// 区域 // 区域
area: { area: {
......
...@@ -59,3 +59,15 @@ export async function addMode(data) { ...@@ -59,3 +59,15 @@ export async function addMode(data) {
export async function delMode(data) { export async function delMode(data) {
return request(model.delete, METHOD.GET, data); return request(model.delete, METHOD.GET, data);
} }
// 保存模块报表
export async function addStatement(data) {
return request(model.saveStatement, METHOD.POST, data);
}
// 模块报表列表
export async function getStatementList(data) {
return request(model.statementList, METHOD.POST, data);
}
// 删除报表
export async function delStatement(data) {
return request(model.delStatement, METHOD.GET, data);
}
...@@ -6,3 +6,6 @@ ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) default 0 COMMEN ...@@ -6,3 +6,6 @@ ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) default 0 COMMEN
ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default "" COMMENT '显示内容' AFTER duty; ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default "" COMMENT '显示内容' AFTER duty;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyEnglish` varchar (256) default "" COMMENT '显示英文' AFTER dutyContent; ALTER TABLE mortals_sys_window ADD COLUMN `dutyEnglish` varchar (256) default "" COMMENT '显示英文' AFTER dutyContent;
ALTER TABLE mortals_sys_dept ADD COLUMN `total` int(9) DEFAULT '0' COMMENT '关联事项数量' AFTER updateTime;
INSERT INTO `mortals_xhx_task` VALUES (null, '统计站点部门事项数', 'StatSiteDeptMatterTask', 0, 'StatSiteDeptMatterTask', NULL, NULL, 1, 0, '23:21', NULL, '172.17.0.1', '2023-03-05 23:21:01', 0, NULL, NULL, NULL);
...@@ -212,6 +212,7 @@ CREATE TABLE mortals_sys_dept ...@@ -212,6 +212,7 @@ CREATE TABLE mortals_sys_dept
`createTime` datetime COMMENT '创建时间', `createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户', `createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间', `updateTime` datetime COMMENT '修改时间',
`total` int(9) DEFAULT '0' COMMENT '关联事项数量',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门';
......
...@@ -4938,6 +4938,7 @@ size|Integer|每页条数|否|- ...@@ -4938,6 +4938,7 @@ size|Integer|每页条数|否|-
name|String|部门名称|否|- name|String|部门名称|否|-
deptAbb|String|部门简称|否|- deptAbb|String|部门简称|否|-
deptNumber|String|部门编号|否|- deptNumber|String|部门编号|否|-
filter|Integer|是否过滤没有事项的部门(0.否,1.是)|否|-
**请求样例:** **请求样例:**
...@@ -11502,644 +11503,59 @@ dict|object|字典对象 ...@@ -11502,644 +11503,59 @@ dict|object|字典对象
``` ```
## 字典附录 ## 微中台
### isBusiness
字典参数key|字典参数值|其它
---|---|---
0|一级业务|-
1|二级业务|-
### canorder
字典参数key|字典参数值|其它
---|---|---
1|允许|-
0|不允许|-
### cantake
字典参数key|字典参数值|其它
---|---|---
1|允许|-
0|不允许|-
### datashow
字典参数key|字典参数值|其它
---|---|---
1|展示|-
0|不展示|-
### status
字典参数key|字典参数值|其它
---|---|---
0|停用|-
1|正常|-
### isAutotable
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### isOrder
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### isBkb
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### isWorkGuide
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### usValid
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### isSecphone
字典参数key|字典参数值|其它 ### 获取微中台签名信息
---|---|---
0|否|-
1|是|-
### isEnglish
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### filetype
字典参数key|字典参数值|其它
---|---|---
1|示例样表|-
2|空白表格|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### policyType
字典参数key|字典参数值|其它
---|---|---
1|法律|-
2|行政法规|-
3|地方法规|-
4|部门规章|-
5|其他|-
6|政府规章|-
7|规范性文件|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### messageoff **请求URL:** base/mid/sign
字典参数key|字典参数值|其它
---|---|---
1|开|-
0|关|-
### smsplatform
字典参数key|字典参数值|其它
---|---|---
1|容联|-
2|阿里云|-
3|移动|-
### type
字典参数key|字典参数值|其它
---|---|---
1|预约成功短信|-
2|取号成功短信|-
3|临近叫号短信|-
### online
字典参数key|字典参数值|其它
---|---|---
0|离线|-
1|在线|-
2|暂离|-
3|点击暂离|-
4|回归|-
5|登陆|-
### haveSonArea
字典参数key|字典参数值|其它
---|---|---
0|否|-
1|是|-
### workday1
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday2
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday3
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday4
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday5
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday6
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### workday7
字典参数key|字典参数值|其它
---|---|---
1|上班|-
0|不上|-
### isSite
字典参数key|字典参数值|其它
---|---|---
1|是|-
0|否|-
### status
字典参数key|字典参数值|其它
---|---|---
0|停用|-
1|正常|-
### hongqi
字典参数key|字典参数值|其它
---|---|---
1|是|-
0|否|-
### haveSonArea
字典参数key|字典参数值|其它
---|---|---
True|是|-
False|否|-
### haveSonDept
字典参数key|字典参数值|其它
---|---|---
True|是|-
False|否|-
### haveGetDept
字典参数key|字典参数值|其它
---|---|---
true|是|-
false|否|-
### haveGetMatterList
字典参数key|字典参数值|其它
---|---|---
true|是|-
false|否|-
### areaLevel
字典参数key|字典参数值|其它
---|---|---
1|省|-
2|地市州|-
3|区县|-
4|街道|-
5|社区|-
### status
字典参数key|字典参数值|其它
---|---|---
0|停用|-
1|正常|-
### isMust **请求方式:** POST
字典参数key|字典参数值|其它
---|---|---
非必要|非必要|-
必要|必要|-
必要|容缺后补|必要|容缺后补|-
非必要|容缺后补|非必要|容缺后补|-
### materialProperty
字典参数key|字典参数值|其它
---|---|---
纸质|纸质|-
电子|电子|-
纸质|电子|纸质|电子|-
### electronicgs
字典参数key|字典参数值|其它
---|---|---
无|无|-
不限|不限|-
jpg|jpg|-
jpeg|jpeg|-
pdf|pdf|-
word|word|-
pdf|jpg|jpeg|pdf|jpg|jpeg|-
pdf|jpg|pdf|jpg|-
### materialSource
字典参数key|字典参数值|其它
---|---|---
无|无|-
申请人自备|申请人自备|-
政府部门核发|政府部门核发|-
其他|其他|-
### jianmMs
字典参数key|字典参数值|其它
---|---|---
无|无|-
减|减|-
免|免|-
### isjianm
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isLack
字典参数key|字典参数值|其它
---|---|---
必要|必要|-
非必要|非必要|-
### source
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### isBusiness
字典参数key|字典参数值|其它
---|---|---
0|一级业务|-
1|二级业务|-
### status
字典参数key|字典参数值|其它
---|---|---
0|停用|-
1|正常|-
### isShow
字典参数key|字典参数值|其它
---|---|---
1|是|-
0|否|-
### appoveObjectShow
字典参数key|字典参数值|其它
---|---|---
事业法人|事业法人|-
社会组织法人|社会组织法人|-
非法人企业|非法人企业|-
企业法人|企业法人|-
自然人|自然人|-
其他组织|其他组织|-
### operatScopeShow
字典参数key|字典参数值|其它
---|---|---
无|无|-
全国|全国|-
全市|全市|-
全县|全县|-
全镇[乡 街道]|全镇[乡 街道]|-
跨村[社区]|跨村[社区]|-
### appoveTimeLimitShow
字典参数key|字典参数值|其它
---|---|---
网络办件|网络办件|-
行政审批一般件|行政审批一般件|-
综合窗口件|综合窗口件|-
### handleType
字典参数key|字典参数值|其它
---|---|---
窗口办理|窗口办理|-
网上办理|网上办理|-
### isChargesShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### certificationLevelsShow
字典参数key|字典参数值|其它
---|---|---
实名认证|实名认证|-
单次面签|单次面签|-
每次面签|每次面签|-
### isOnlineSubscribeShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isExpressTakeShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isProvinceAcquisitionShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isApplyProvinceShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### onlineType
字典参数key|字典参数值|其它
---|---|---
原件预审|原件预审|-
原件核验|原件核验|-
全程网办|全程网办|-
### onlineOperatDeep
字典参数key|字典参数值|其它
---|---|---
互联网咨询|互联网咨询|-
互联网收件|互联网收件|-
互联网预审|互联网预审|-
互联网受理|互联网受理|-
互联网办理|互联网办理|-
互联网办理结果信息反馈|互联网办理结果信息反馈|-
其他|其他|-
### isExpressTakeOnlineShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isDoorTakeShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### eventTypeShow
字典参数key|字典参数值|其它
---|---|---
行政许可|行政许可|-
行政处罚|行政处罚|-
行政强制|行政强制|-
行政征收|行政征收|-
行政给付|行政给付|-
行政检查|行政检查|-
行政确认|行政确认|-
行政奖励|行政奖励|-
行政裁决|行政裁决|-
其他行政权力|其他行政权力|-
主动服务|主动服务|-
依申请服务|依申请服务|-
咨询查询|咨询查询|-
未归类事项|未归类事项|-
### performHierarchyShow
字典参数key|字典参数值|其它
---|---|---
省级|省级|-
市级|市级|-
县级|县级|-
镇[乡 街道]|镇[乡 街道]|-
村[社区]级|村[社区]级|-
### powerSourceShow
字典参数key|字典参数值|其它
---|---|---
法定本级行使|法定本级行使|-
上级下放|上级下放|-
上级授权|上级授权|-
同级授权|同级授权|-
上级委托|上级委托|-
同级委托|同级委托|-
### performDeptTypeShow
字典参数key|字典参数值|其它
---|---|---
法定机关|法定机关|-
授权组织|授权组织|-
受委托组织|受委托组织|-
### goveServiceCenterShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isConvenientCenterShow
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### terminalHandle
字典参数key|字典参数值|其它
---|---|---
否|否|-
是|是|-
### isOnline
字典参数key|字典参数值|其它 **内容类型:** application/json;charset=utf-8
---|---|---
否|否|-
是|是|-
### isOnlinePayShow **简要描述:** 获取微中台签名信息
字典参数key|字典参数值|其它 **请求参数:**
---|---|---
否|否|-
是|是|-
### entrustmentDepartmen 参数名称|类型|必填|描述
:---|:---|:---|:------
method|String|是|请求方法(post或者get)
body|String|是|请求参数体
字典参数key|字典参数值|其它 **请求样例:**
---|---|--- ```
否|否|- {
是|是|- "method":"post",
"body":"{\"test\":\"哈哈哈\"}"
}
```
**响应参数:**
### matterStatus 参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;appId|String|应用id
&emsp;appKey|String|应用key
&emsp;timeStamp|String|时间戳
&emsp;nonce|String|随机数
&emsp;secretKey|String|密码
&emsp;sign|String|签名
字典参数key|字典参数值|其它
---|---|---
停用|停用|-
在用|在用|-
### source **响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
字典参数key|字典参数值|其它
---|---|---
0|政务网|-
1|自定义|-
### deviceType ## 字典附录
字典参数key|字典参数值|其它
---|---|---
pdj|排队机|-
ckp|窗口屏|-
hjq|呼叫器|-
jzxsp|集中显示屏|-
dsj|导视机|-
pjq|评级器|-
zzfwzd|自助服务终端|-
tdj|填单机|-
ybj|样表机|-
### imageResolution
字典参数key|字典参数值|其它
---|---|---
1|1920*1080|-
2|1080*1920|-
3|1280*1280|-
...@@ -214,11 +214,11 @@ ...@@ -214,11 +214,11 @@
</dependency> </dependency>
<!-- 虹软人脸解析 --> <!-- 虹软人脸解析 -->
<!-- <dependency> <dependency>
<groupId>com.arcsoft.face</groupId> <groupId>com.arcsoft.face</groupId>
<artifactId>arcsoft-sdk-face</artifactId> <artifactId>arcsoft-sdk-face</artifactId>
<version>3.0.0.0</version> <version>3.0.0.0</version>
</dependency>--> </dependency>
<dependency> <dependency>
<groupId>net.coobird</groupId> <groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId> <artifactId>thumbnailator</artifactId>
......
...@@ -41,8 +41,9 @@ public class OperlogAspect extends FileLogServiceImpl implements ILogService { ...@@ -41,8 +41,9 @@ public class OperlogAspect extends FileLogServiceImpl implements ILogService {
public void doHandlerLog(String platformMark, Long userId, String userName, String loginName, String requestUrl, public void doHandlerLog(String platformMark, Long userId, String userName, String loginName, String requestUrl,
String content, String ip, Date logDate) { String content, String ip, Date logDate) {
super.doHandlerLog(platformMark, userId, userName, loginName, requestUrl, content, ip, logDate); super.doHandlerLog(platformMark, userId, userName, loginName, requestUrl, content, ip, logDate);
//操作日志 只记录用户侧
if(userId==null) return;
operLogService.insertOperLog(ip, requestUrl, userId, userName, loginName, content); operLogService.insertOperLog(ip, requestUrl, userId, userName, loginName, content);
OperateLogPdu operateLogPdu = new OperateLogPdu(); OperateLogPdu operateLogPdu = new OperateLogPdu();
operateLogPdu.initAttrValue(); operateLogPdu.initAttrValue();
operateLogPdu.setIp(ip); operateLogPdu.setIp(ip);
......
package com.mortals.xhx.busiz.req;
import lombok.Data;
/**
* 微中台请求接口
* @author:
* @date: 2023/3/2 18:08
*/
@Data
public class MidReq{
private String method;
private String body;
private String path;
}
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class MidResp {
private String appId;
private String appKey;
private String timeStamp;
private String nonce;
private String secretKey;
private String sign;
}
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class SignResp {
private String appId;
private String appKey;
private String timeStamp;
private String nonce;
private String secretKey;
private String sign;
}
package com.mortals.xhx.busiz.web;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;
import cn.hutool.http.HttpUtil;
import cn.hutool.http.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.busiz.req.MidReq;
import com.mortals.xhx.busiz.rsp.SignResp;
import com.mortals.xhx.common.utils.EncryptionUtils;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.model.WindowMatterEntity;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
import com.mortals.xhx.module.window.model.WindowQuery;
import com.mortals.xhx.module.window.service.WindowMatterService;
import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpResponse;
import org.apache.http.client.CookieStore;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import java.util.stream.Collectors;
/**
* 微中台签名接口
*
* @author:
* @date: 2023/3/2 18:07
*/
@RestController
@RequestMapping("mid")
@Slf4j
public class MidSignApiController {
@Value("${mid.midUrl:http://172.15.28.117:9000}")
private String midUrl;
@Value("${mid.appId:01C67D56D0630517}")
private String appId;
@Value("${mid.appKey:a0b946c858aa8d06}")
private String appKey;
@Value("${mid.secretKey:ad80c59e575a78ab}")
private String secretKey;
@PostMapping(value = "sign")
@UnAuth
public Rest<SignResp> midSign(@RequestBody MidReq midReq) {
SignResp signResp = new SignResp();
try {
Map<String, String> headerMap = new HashMap<>();
if("post".equalsIgnoreCase(midReq.getMethod())){
headerMap.put("appId", appId);
headerMap.put("appKey", appKey);
JSONObject object1 = JSONObject.parseObject(midReq.getBody());
headerMap.put("body", object1.toJSONString());
String timeStamp = System.currentTimeMillis() + "";
headerMap.put("timeStamp", timeStamp);
String nonce = RandomUtil.randomNumbers(6);
headerMap.put("nonce", nonce);
headerMap.put("secretKey", secretKey);
signResp.setAppId(appId);
signResp.setAppKey(appKey);
signResp.setTimeStamp(timeStamp);
signResp.setNonce(nonce);
signResp.setSecretKey(secretKey);
}else if("get".equalsIgnoreCase(midReq.getMethod())){
HashMap<String, String> paramsMap = JSON.parseObject(midReq.getBody(), HashMap.class);
if (!paramsMap.isEmpty()) {
for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
headerMap.put(entry.getKey(), entry.getValue());
}
}
}
StringBuilder signSb = new StringBuilder();
signSb.append("appId").append("=").append(headerMap.get("appId")).append("&");
signSb.append("appKey").append("=").append(headerMap.get("appKey")).append("&");
signSb.append("body").append("=").append(headerMap.get("body")).append("&");
signSb.append("nonce").append("=").append(headerMap.get("nonce")).append("&");
signSb.append("secretKey").append("=").append(headerMap.get("secretKey")).append("&");
signSb.append("timeStamp").append("=").append(headerMap.get("timeStamp")).append("&");
/* for (Map.Entry<String, String> params : headerMap.entrySet()) {
signSb.append(params.getKey()).append("=").append(params.getValue() + "").append("&");
}*/
String signStr = signSb.substring(0, signSb.length() - 1);
log.info("签名源字符串: " + signStr);
String sign = EncryptionUtils.SHA256(signStr);
log.info("签名计算结果: " + sign);
signResp.setSign(sign);
return Rest.ok(signResp);
} catch (Exception e) {
log.error("签名异常",e);
return Rest.fail("签名异常!");
}
}
/**
* 透传请求
* @param midReq
* @return
*/
@PostMapping(value = "trans")
@UnAuth
public Rest<String> trans(@RequestBody MidReq midReq) {
try {
Map<String, String> headerMap = new HashMap<>();
StringBuilder signSb = new StringBuilder();
headerMap.put("appId", appId);
headerMap.put("appKey", appKey);
String timeStamp = System.currentTimeMillis() + "";
headerMap.put("timeStamp", timeStamp);
String nonce = RandomUtil.randomNumbers(6);
headerMap.put("nonce", nonce);
headerMap.put("secretKey", secretKey);
if("post".equalsIgnoreCase(midReq.getMethod())){
JSONObject object1 = JSONObject.parseObject(midReq.getBody());
headerMap.put("body", object1.toJSONString());
}else if("get".equalsIgnoreCase(midReq.getMethod())){
/* HashMap<String, String> paramsMap = JSON.parseObject(midReq.getBody(), HashMap.class);
if (!paramsMap.isEmpty()) {
for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
headerMap.put(entry.getKey(), entry.getValue());
}
}*/
}
signSb.append("appId").append("=").append(headerMap.get("appId")).append("&");
signSb.append("appKey").append("=").append(headerMap.get("appKey")).append("&");
signSb.append("body").append("=").append(headerMap.get("body")).append("&");
signSb.append("nonce").append("=").append(headerMap.get("nonce")).append("&");
signSb.append("secretKey").append("=").append(headerMap.get("secretKey")).append("&");
signSb.append("timeStamp").append("=").append(headerMap.get("timeStamp")).append("&");
String signStr = signSb.substring(0, signSb.length() - 1);
log.info("签名源字符串: " + signStr);
String sign = EncryptionUtils.SHA256(signStr);
log.info("签名计算结果: " + sign);
headerMap.put("sign", sign);
//请求转发
String fullUrl = URLUtil.completeUrl(midUrl, midReq.getPath());
String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(headerMap.get("body")).execute().body();
return Rest.ok(body);
} catch (Exception e) {
log.error("透传请求异常",e);
return Rest.fail("透传请求异常!");
}
}
}
package com.mortals.xhx.common.utils;
import lombok.extern.slf4j.Slf4j;
import java.security.MessageDigest;
@Slf4j
public class EncryptionUtils {
private enum DigestType{
MD5("MD5"),
SHA("SHA"),
SHA256("SHA-256");
private String name;
private DigestType(String name){
this.name = name;
}
public String getName() {
return name;
}
}
private final static String digest(String sourceStr,DigestType type) {
char hexDigits[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
try {
byte[] btInput = sourceStr.getBytes();
// 获得摘要算法的 MessageDigest 对象
MessageDigest mdInst = MessageDigest.getInstance(type.name);
// 使用指定的字节更新摘要
mdInst.update(btInput);
// 获得密文
byte[] md = mdInst.digest();
// 把密文转换成十六进制的字符串形式
int length = md.length;
char str[] = new char[length * 2];
int k = 0;
for (int i = 0; i < length; i++) {
byte byte0 = md[i];
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
return new String(str);
} catch (Exception e) {
log.error("签名失败", e);
return "";
}
}
public final static String MD5(String s) {
return digest(s, DigestType.MD5);
}
public final static String SHA(String s) {
return digest(s, DigestType.SHA);
}
public final static String SHA256(String s){
return digest(s, DigestType.SHA256);
}
}
//package com.mortals.xhx.common.utils; package com.mortals.xhx.common.utils;
//
//import com.arcsoft.face.*; import com.arcsoft.face.*;
//import com.arcsoft.face.enums.DetectMode; import com.arcsoft.face.enums.DetectMode;
//import com.arcsoft.face.enums.DetectOrient; import com.arcsoft.face.enums.DetectOrient;
//import com.arcsoft.face.enums.ErrorInfo; import com.arcsoft.face.enums.ErrorInfo;
//import com.arcsoft.face.toolkit.ImageInfo; import com.arcsoft.face.toolkit.ImageInfo;
//import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
//import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
//
//import java.util.ArrayList; import java.util.ArrayList;
//import java.util.List; import java.util.List;
//
//import static com.arcsoft.face.toolkit.ImageFactory.getRGBData; import static com.arcsoft.face.toolkit.ImageFactory.getRGBData;
//
//@Slf4j @Slf4j
//@Component @Component
//public class FaceUtil { public class FaceUtil {
//
// public FaceEngine initFace(String appId, String sdkKey) { public FaceEngine initFace(String appId, String sdkKey) {
// FaceEngine faceEngine = new FaceEngine(getClass().getResource(getOsName()).getPath()); FaceEngine faceEngine = new FaceEngine(getClass().getResource(getOsName()).getPath());
// //激活引擎 //激活引擎
// int errorCode = faceEngine.activeOnline(appId, sdkKey); int errorCode = faceEngine.activeOnline(appId, sdkKey);
// isTrue(!(errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()), "引擎激活失败"); isTrue(!(errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()), "引擎激活失败");
// ActiveFileInfo activeFileInfo = new ActiveFileInfo(); ActiveFileInfo activeFileInfo = new ActiveFileInfo();
// errorCode = faceEngine.getActiveFileInfo(activeFileInfo); errorCode = faceEngine.getActiveFileInfo(activeFileInfo);
// isTrue(!(errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()), "获取激活文件信息失败"); isTrue(!(errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()), "获取激活文件信息失败");
// //引擎配置 //引擎配置
// EngineConfiguration engineConfiguration = new EngineConfiguration(); EngineConfiguration engineConfiguration = new EngineConfiguration();
// engineConfiguration.setDetectMode(DetectMode.ASF_DETECT_MODE_IMAGE); engineConfiguration.setDetectMode(DetectMode.ASF_DETECT_MODE_IMAGE);
// engineConfiguration.setDetectFaceOrientPriority(DetectOrient.ASF_OP_ALL_OUT); engineConfiguration.setDetectFaceOrientPriority(DetectOrient.ASF_OP_ALL_OUT);
// engineConfiguration.setDetectFaceMaxNum(10); engineConfiguration.setDetectFaceMaxNum(10);
// engineConfiguration.setDetectFaceScaleVal(16); engineConfiguration.setDetectFaceScaleVal(16);
// //功能配置 //功能配置
// FunctionConfiguration functionConfiguration = new FunctionConfiguration(); FunctionConfiguration functionConfiguration = new FunctionConfiguration();
// functionConfiguration.setSupportAge(true); functionConfiguration.setSupportAge(true);
// functionConfiguration.setSupportFace3dAngle(true); functionConfiguration.setSupportFace3dAngle(true);
// functionConfiguration.setSupportFaceDetect(true); functionConfiguration.setSupportFaceDetect(true);
// functionConfiguration.setSupportFaceRecognition(true); functionConfiguration.setSupportFaceRecognition(true);
// functionConfiguration.setSupportGender(true); functionConfiguration.setSupportGender(true);
// functionConfiguration.setSupportLiveness(true); functionConfiguration.setSupportLiveness(true);
// functionConfiguration.setSupportIRLiveness(true); functionConfiguration.setSupportIRLiveness(true);
// engineConfiguration.setFunctionConfiguration(functionConfiguration); engineConfiguration.setFunctionConfiguration(functionConfiguration);
// //初始化引擎 //初始化引擎
// errorCode = faceEngine.init(engineConfiguration); errorCode = faceEngine.init(engineConfiguration);
// isTrue(errorCode == ErrorInfo.MOK.getValue(), "初始化引擎失败"); isTrue(errorCode == ErrorInfo.MOK.getValue(), "初始化引擎失败");
// return faceEngine; return faceEngine;
// } }
//
//
// /** /**
// * 人脸检测、特征提取 * 人脸检测、特征提取
// * *
// * @param faceEngine * @param faceEngine
// * @param bytes * @param bytes
// * @return * @return
// */ */
// public byte[] featureData(FaceEngine faceEngine, byte[] bytes) { public byte[] featureData(FaceEngine faceEngine, byte[] bytes) {
// //人脸检测 //人脸检测
// ImageInfo imageInfo = getRGBData(bytes); ImageInfo imageInfo = getRGBData(bytes);
// List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>(); List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>();
// faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList); faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList);
// //特征提取 //特征提取
// FaceFeature faceFeature = new FaceFeature(); FaceFeature faceFeature = new FaceFeature();
// faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature); faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature);
// return faceFeature.getFeatureData(); return faceFeature.getFeatureData();
// } }
//
//
// /** /**
// * 特征比对 * 特征比对
// * *
// * @param targeFace * @param targeFace
// * @param sourceFace * @param sourceFace
// * @return * @return
// */ */
// public boolean featureComparison(FaceEngine faceEngine, byte[] targeFace, byte[] sourceFace) { public boolean featureComparison(FaceEngine faceEngine, byte[] targeFace, byte[] sourceFace) {
// //特征比对 //特征比对
// FaceFeature targetFaceFeature = new FaceFeature(); FaceFeature targetFaceFeature = new FaceFeature();
// targetFaceFeature.setFeatureData(targeFace); targetFaceFeature.setFeatureData(targeFace);
// FaceFeature sourceFaceFeature = new FaceFeature(); FaceFeature sourceFaceFeature = new FaceFeature();
// sourceFaceFeature.setFeatureData(sourceFace); sourceFaceFeature.setFeatureData(sourceFace);
// FaceSimilar faceSimilar = new FaceSimilar(); FaceSimilar faceSimilar = new FaceSimilar();
// faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar); faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar);
// float score = faceSimilar.getScore(); float score = faceSimilar.getScore();
// if (score > 0.8) { if (score > 0.8) {
// return true; return true;
// } }
// return false; return false;
// } }
//
// public void unInit(FaceEngine faceEngine) { public void unInit(FaceEngine faceEngine) {
// faceEngine.unInit(); faceEngine.unInit();
// } }
//
// public String getOsName() { public String getOsName() {
// String os = System.getProperty("os.name"); String os = System.getProperty("os.name");
// String osName = os.toLowerCase().startsWith("win") ? "/face_lib/win64" : "/face_lib/linux"; String osName = os.toLowerCase().startsWith("win") ? "/face_lib/win64" : "/face_lib/linux";
// return osName; return osName;
// } }
//
//
// private void isTrue(boolean b, String errorMsg) { private void isTrue(boolean b, String errorMsg) {
// if (!b) { if (!b) {
// throw new AppException(errorMsg); throw new AppException(errorMsg);
// } }
// } }
//
//} }
...@@ -51,10 +51,40 @@ public class MatterHtmlParseUtil { ...@@ -51,10 +51,40 @@ public class MatterHtmlParseUtil {
return Rest.ok(resultMap); return Rest.ok(resultMap);
} }
public static Rest<Map<String, Integer>> statSiteMatterDeptCount(Map<String, String> params, String url) {
String matterTotalExp = "//input[@id=\"result_countDept\"]";
String matterPageExp = "//input[@id=\"pageNumDept\"]";
Map<String, Integer> resultMap = new HashMap<>();
try {
Document dom = Jsoup.connect(url).data(params).get();
Elements elements = dom.selectXpath(matterTotalExp);
if (elements.size() > 0) {
Integer total = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
resultMap.put("total", total);
}
elements = dom.selectXpath(matterPageExp);
if (elements.size() > 0) {
Integer pageNum = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
resultMap.put("pageNum", pageNum);
}
} catch (Exception e) {
log.error("获取事项数量异常!params:" + JSON.toJSONString(params), e);
return Rest.fail(e.getMessage());
}
return Rest.ok(resultMap);
}
public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) { public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) {
String matterListExp = "//div[@class=\"sx_list\"]//span[1]"; String matterListExp = "//div[@class=\"sx_list\"]//span[1]";
String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]"; String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]";
List<MatterEntity> matterEntityList = new ArrayList<>(); List<MatterEntity> matterEntityList = new ArrayList<>();
String evaluationUrl = "";
String netApplyUrl = "";
String href = "";
try { try {
Document dom = Jsoup.connect(url).data(params).get(); Document dom = Jsoup.connect(url).data(params).get();
//System.out.println(dom.html()); //System.out.println(dom.html());
...@@ -66,7 +96,7 @@ public class MatterHtmlParseUtil { ...@@ -66,7 +96,7 @@ public class MatterHtmlParseUtil {
continue; continue;
} }
String title = element.attr("title"); String title = element.attr("title");
String href = element.firstElementChild().attr("href"); href = element.firstElementChild().attr("href");
//element.child() //element.child()
if (href.equalsIgnoreCase("javascript:void(0)")) { if (href.equalsIgnoreCase("javascript:void(0)")) {
...@@ -74,18 +104,22 @@ public class MatterHtmlParseUtil { ...@@ -74,18 +104,22 @@ public class MatterHtmlParseUtil {
} }
//抓取申请与评价页面地址 //抓取申请与评价页面地址
Element nextElementSibling = element.nextElementSibling(); Element nextElementSibling = element.nextElementSibling();
Elements elementsA = nextElementSibling.children();
String evaluationUrl = ""; //Elements elementsA = nextElementSibling.selectXpath("//a");
String netApplyUrl = "";
Elements elementsA = nextElementSibling.selectXpath("//a");
if (elementsA != null) { if (elementsA != null) {
for (Element tempElement : elementsA) { for (Element tempElement : elementsA) {
if (tempElement.text().trim().equals("好差评")) { if ("办事指南".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick");
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 1) {
href = StrUtil.subBetween(list.get(0), "'", "'");
}
}
if ("好差评".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')"); evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')");
} }
if (tempElement.text().trim().equals("申请")) { if ("申请".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick); List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 4) { if (list.size() > 4) {
...@@ -94,6 +128,11 @@ public class MatterHtmlParseUtil { ...@@ -94,6 +128,11 @@ public class MatterHtmlParseUtil {
} }
} }
} }
if (ObjectUtils.isEmpty(href)) {
log.info("error href ,title:" + title);
}
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl);
} }
...@@ -104,14 +143,23 @@ public class MatterHtmlParseUtil { ...@@ -104,14 +143,23 @@ public class MatterHtmlParseUtil {
continue; continue;
} }
String title = element.attr("title"); String title = element.attr("title");
String href = element.attr("href"); href = element.attr("href");
//抓取申请与评价页面地址 //抓取申请与评价页面地址
String evaluationUrl = "";
String netApplyUrl = "";
Element nextElementSibling = element.nextElementSibling(); Element nextElementSibling = element.nextElementSibling();
if (nextElementSibling != null) { if (nextElementSibling != null) {
Elements elementsA = nextElementSibling.selectXpath("//a");
Elements elementsA = nextElementSibling.children();
//Elements elementsA = nextElementSibling.selectXpath("//a");
for (Element tempElement : elementsA) { for (Element tempElement : elementsA) {
if ("办事指南".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick");
if(ObjectUtils.isEmpty(onclick)) continue;
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 1) {
href = StrUtil.subBetween(list.get(0), "'", "'");
}
}
if ("好差评".equals(tempElement.text().trim())) { if ("好差评".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')"); evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')");
...@@ -123,6 +171,11 @@ public class MatterHtmlParseUtil { ...@@ -123,6 +171,11 @@ public class MatterHtmlParseUtil {
netApplyUrl = StrUtil.subBetween(list.get(3), "'", "'"); netApplyUrl = StrUtil.subBetween(list.get(3), "'", "'");
} }
} }
if (ObjectUtils.isEmpty(href)) {
log.info("error href ,title:" + title);
}
} }
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl);
...@@ -243,17 +296,19 @@ public class MatterHtmlParseUtil { ...@@ -243,17 +296,19 @@ public class MatterHtmlParseUtil {
// System.out.println(JSON.toJSONString(allList)); // System.out.println(JSON.toJSONString(allList));
String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags"; /* String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params = new HashMap<>(); HashMap<String, String> params = new HashMap<>();
params.put("areaCode", "510110006007"); params.put("areaCode", "511500000000");
params.put("dxType", "56"); params.put("dxType", "3");
params.put("deptCode", ""); params.put("deptCode", "");
params.put("searchtext", ""); params.put("searchtext", "");
params.put("type", "2");//类型 2.部门 1.主题 3.热度
params.put("taskType", ""); params.put("taskType", "");
params.put("pageno", "1"); // params.put("pageno", "1");
Rest<Map<String, Integer>> rest = MatterHtmlParseUtil.statSiteMatterCount(params, url); Rest<Map<String, Integer>> rest = MatterHtmlParseUtil.statSiteMatterDeptCount(params, url);
System.out.println(JSON.toJSONString(rest)); System.out.println(JSON.toJSONString(rest));*/
/*
List<MatterEntity> allList = new ArrayList<>(); List<MatterEntity> allList = new ArrayList<>();
String url1 = "http://www.sczwfw.gov.cn/jiq/interface/item/tags"; String url1 = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
...@@ -282,6 +337,7 @@ public class MatterHtmlParseUtil { ...@@ -282,6 +337,7 @@ public class MatterHtmlParseUtil {
Rest<Map<String, String>> rest1 = MatterHtmlParseUtil.syncDeptBySiteId(params, url); Rest<Map<String, String>> rest1 = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
System.out.println(JSON.toJSONString(rest1)); System.out.println(JSON.toJSONString(rest1));
*/
} }
......
...@@ -69,15 +69,15 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -69,15 +69,15 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override @Override
public void run() { public void run() {
log.info("同步站点事项开始....."); log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context); // Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
log.info("同步站点部门:" + JSON.toJSONString(deptRest)); // log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context); Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode()); AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode());
log.info("同步事项列表:" + JSON.toJSONString(rest)); log.info("同步事项列表:" + JSON.toJSONString(rest));
if (rest.getCode() == YesNoEnum.YES.getValue()) { if (rest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue())); List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream() List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream()
//.filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false")) .filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false"))
.collect(Collectors.toList()); .collect(Collectors.toList());
//查询站点事项相关 //查询站点事项相关
......
package com.mortals.xhx.daemon.task;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.matters.service.MattersService;
import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 统计站点部门事项
*/
@Slf4j
@Service("StatSiteDeptMatterTask")
public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
@Autowired
private DeptService deptService;
@Autowired
private MatterService matterService;
@Override
public void excuteTask(ITask task) throws AppException {
log.info("开始同步事项列表!");
List<DeptEntity> deptEntities = deptService.find(new DeptQuery());
for (DeptEntity deptEntity : deptEntities) {
int total = matterService.count(new MatterQuery().deptCode(deptEntity.getDeptNumber()), null);
if (total > 0) {
DeptEntity deptQuery = new DeptEntity();
deptQuery.setTotal(total);
deptQuery.setUpdateTime(new Date());
DeptEntity condition = new DeptEntity();
condition.setId(deptEntity.getId());
deptService.getDao().update(deptQuery, condition);
// deptService.update(deptEntity, null);
}
}
}
@Override
public void stopTask(ITask task) throws AppException {
}
}
...@@ -15,6 +15,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu; ...@@ -15,6 +15,7 @@ import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.SyncTreeSiteThread; import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.user.IUserFeign; import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.dept.service.DeptService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,7 +28,7 @@ import java.util.List; ...@@ -27,7 +28,7 @@ import java.util.List;
* 同步用户 * 同步用户
*/ */
@Slf4j @Slf4j
@Service("SyncUserTask") //@Service("SyncUserTask")
public class SyncUserTaskImpl implements ITaskExcuteService { public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
...@@ -47,8 +48,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -47,8 +48,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
userService.updateUserList(list.getData().getData()); userService.updateUserList(list.getData().getData());
//resourceService.updateUserList(); //resourceService.updateUserList();
/* UserPdu userPdu = new UserPdu(); /* UserPdu userPdu = new UserPdu();
......
//package com.mortals.xhx.face; package com.mortals.xhx.face;
//
//import com.arcsoft.face.*; import com.arcsoft.face.*;
//import com.arcsoft.face.toolkit.ImageInfo; import com.arcsoft.face.toolkit.ImageInfo;
//import com.google.common.collect.Lists; import com.google.common.collect.Lists;
//import com.mortals.xhx.face.factory.FaceEnginePoolFactory; import com.mortals.xhx.face.factory.FaceEnginePoolFactory;
//import com.mortals.xhx.module.identity.model.SysFaceEntity; import com.mortals.xhx.module.identity.model.SysFaceEntity;
//import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
//import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.pool2.impl.AbandonedConfig; import org.apache.commons.pool2.impl.AbandonedConfig;
//import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPool;
//import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
//import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
//
//import javax.imageio.ImageIO; import javax.imageio.ImageIO;
//import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
//import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
//import java.io.IOException; import java.io.IOException;
//import java.io.InputStream; import java.io.InputStream;
//import java.math.BigDecimal; import java.math.BigDecimal;
//import java.util.ArrayList; import java.util.ArrayList;
//import java.util.List; import java.util.List;
//
//import static com.arcsoft.face.toolkit.ImageFactory.getRGBData; import static com.arcsoft.face.toolkit.ImageFactory.getRGBData;
//
//@Slf4j @Slf4j
//@Component @Component
//public class ArcsoftFaceUtil { public class ArcsoftFaceUtil {
//
// @Value(value = "${faceAppId}") @Value(value = "${faceAppId}")
// private String appId; private String appId;
//
// @Value(value = "${winSdkKey}") @Value(value = "${winSdkKey}")
// private String winSdkKey; private String winSdkKey;
//
// @Value(value = "${linuxSdkkey}") @Value(value = "${linuxSdkkey}")
// private String linuxSdkKey; private String linuxSdkKey;
//
//
// public Integer threadPoolSize=5; public Integer threadPoolSize=5;
//
// private GenericObjectPool<FaceEngine> faceEngineGenericObjectPool; private GenericObjectPool<FaceEngine> faceEngineGenericObjectPool;
//
// public ArcsoftFaceUtil(){ public ArcsoftFaceUtil(){
//
// String sdkLibPath = getClass().getResource(getOsName()).getPath(); String sdkLibPath = getClass().getResource(getOsName()).getPath();
// String sdkKey = getSdkKey(sdkLibPath); String sdkKey = getSdkKey(sdkLibPath);
// // 对象池工厂 // 对象池工厂
// FaceEnginePoolFactory personPoolFactory = new FaceEnginePoolFactory(appId,sdkKey,sdkLibPath); FaceEnginePoolFactory personPoolFactory = new FaceEnginePoolFactory(appId,sdkKey,sdkLibPath);
// // 对象池配置 // 对象池配置
// GenericObjectPoolConfig<FaceEngine> objectPoolConfig = new GenericObjectPoolConfig<>(); GenericObjectPoolConfig<FaceEngine> objectPoolConfig = new GenericObjectPoolConfig<>();
// objectPoolConfig.setMaxTotal(threadPoolSize); objectPoolConfig.setMaxTotal(threadPoolSize);
// AbandonedConfig abandonedConfig = new AbandonedConfig(); AbandonedConfig abandonedConfig = new AbandonedConfig();
// //在Maintenance的时候检查是否有泄漏 //在Maintenance的时候检查是否有泄漏
// abandonedConfig.setRemoveAbandonedOnMaintenance(true); abandonedConfig.setRemoveAbandonedOnMaintenance(true);
// //borrow 的时候检查泄漏 //borrow 的时候检查泄漏
// abandonedConfig.setRemoveAbandonedOnBorrow(true); abandonedConfig.setRemoveAbandonedOnBorrow(true);
// //如果一个对象borrow之后10秒还没有返还给pool,认为是泄漏的对象 //如果一个对象borrow之后10秒还没有返还给pool,认为是泄漏的对象
// abandonedConfig.setRemoveAbandonedTimeout(10); abandonedConfig.setRemoveAbandonedTimeout(10);
// // 对象池 // 对象池
// faceEngineGenericObjectPool = new GenericObjectPool<>(personPoolFactory, objectPoolConfig); faceEngineGenericObjectPool = new GenericObjectPool<>(personPoolFactory, objectPoolConfig);
// faceEngineGenericObjectPool.setAbandonedConfig(abandonedConfig); faceEngineGenericObjectPool.setAbandonedConfig(abandonedConfig);
// faceEngineGenericObjectPool.setTimeBetweenEvictionRunsMillis(5000); //5秒运行一次维护任务 faceEngineGenericObjectPool.setTimeBetweenEvictionRunsMillis(5000); //5秒运行一次维护任务
// log.info("引擎池开启成功"); log.info("引擎池开启成功");
// } }
//
// private String getOsName() { private String getOsName() {
// String os = System.getProperty("os.name"); String os = System.getProperty("os.name");
// String osName = os.toLowerCase().startsWith("win") ? "/face_lib/win64" : "/face_lib/linux"; String osName = os.toLowerCase().startsWith("win") ? "/face_lib/win64" : "/face_lib/linux";
// return osName; return osName;
// } }
//
// private String getSdkKey(String sdkLibPath) { private String getSdkKey(String sdkLibPath) {
// return sdkLibPath.equals("/face_lib/win64") ? winSdkKey : linuxSdkKey; return sdkLibPath.equals("/face_lib/win64") ? winSdkKey : linuxSdkKey;
// } }
//
// /** /**
// * 人脸检测 * 人脸检测
// * *
// * @param fileInputStream * @param fileInputStream
// * @return * @return
// */ */
// public List<FaceInfo> faceFind(InputStream fileInputStream) throws IOException { public List<FaceInfo> faceFind(InputStream fileInputStream) throws IOException {
// FaceEngine faceEngine = null; FaceEngine faceEngine = null;
// try { try {
// faceEngine = faceEngineGenericObjectPool.borrowObject(); faceEngine = faceEngineGenericObjectPool.borrowObject();
// ImageInfo imageInfo = getRGBData(fileInputStream); ImageInfo imageInfo = getRGBData(fileInputStream);
// List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>(); List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>();
// int errorCode = faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList); int errorCode = faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList);
// return faceInfoList; return faceInfoList;
// } catch (Exception e) { } catch (Exception e) {
// log.error("人脸检测出现了异常"); log.error("人脸检测出现了异常");
// e.printStackTrace(); e.printStackTrace();
// return new ArrayList<FaceInfo>(); return new ArrayList<FaceInfo>();
// } finally { } finally {
// fileInputStream.close(); fileInputStream.close();
// // 回收对象到对象池 // 回收对象到对象池
// if (faceEngine != null) { if (faceEngine != null) {
// faceEngineGenericObjectPool.returnObject(faceEngine); faceEngineGenericObjectPool.returnObject(faceEngine);
// } }
// } }
//
// } }
//
// /** /**
// * 人脸截取 * 人脸截取
// * *
// * @param fileInputStream * @param fileInputStream
// * @param rect * @param rect
// * @return * @return
// */ */
// public String faceCrop(InputStream fileInputStream, Rect rect) { public String faceCrop(InputStream fileInputStream, Rect rect) {
// try { try {
// ByteArrayOutputStream stream = new ByteArrayOutputStream(); ByteArrayOutputStream stream = new ByteArrayOutputStream();
// BufferedImage bufImage = ImageIO.read(fileInputStream); BufferedImage bufImage = ImageIO.read(fileInputStream);
// int height = bufImage.getHeight(); int height = bufImage.getHeight();
// int width = bufImage.getWidth(); int width = bufImage.getWidth();
// int top = rect.getTop(); int top = rect.getTop();
// int bottom = rect.getBottom(); int bottom = rect.getBottom();
// int left = rect.getLeft(); int left = rect.getLeft();
// int right = rect.getRight(); int right = rect.getRight();
// //System.out.println(top + "-" + bottom + "-" + left + "-" + right); //System.out.println(top + "-" + bottom + "-" + left + "-" + right);
// try { try {
// BufferedImage subimage = bufImage.getSubimage(left, top, right - left, bottom - left); BufferedImage subimage = bufImage.getSubimage(left, top, right - left, bottom - left);
// ImageIO.write(subimage, "png", stream); ImageIO.write(subimage, "png", stream);
// String base64 = Base64.encode(stream.toByteArray()); String base64 = Base64.encode(stream.toByteArray());
// return base64; return base64;
// }catch (Exception e){ }catch (Exception e){
// return null; return null;
// }finally { }finally {
// stream.close(); stream.close();
// fileInputStream.close(); fileInputStream.close();
// } }
// } catch (IOException e) { } catch (IOException e) {
// e.printStackTrace(); e.printStackTrace();
// }finally { }finally {
//
// } }
// return null; return null;
// } }
//
// /** /**
// * 人脸特征值提取 * 人脸特征值提取
// */ */
// public byte[] faceFeature(byte[] bytes) { public byte[] faceFeature(byte[] bytes) {
// FaceEngine faceEngine = null; FaceEngine faceEngine = null;
//
// try { try {
// faceEngine = faceEngineGenericObjectPool.borrowObject(); faceEngine = faceEngineGenericObjectPool.borrowObject();
// ImageInfo imageInfo = getRGBData(bytes); ImageInfo imageInfo = getRGBData(bytes);
// //人脸检测得到人脸列表 //人脸检测得到人脸列表
// List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>(); List<FaceInfo> faceInfoList = new ArrayList<FaceInfo>();
// faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList); faceEngine.detectFaces(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList);
// FaceFeature faceFeature = new FaceFeature(); FaceFeature faceFeature = new FaceFeature();
// faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature); faceEngine.extractFaceFeature(imageInfo.getImageData(), imageInfo.getWidth(), imageInfo.getHeight(), imageInfo.getImageFormat(), faceInfoList.get(0), faceFeature);
// byte[] featureData = faceFeature.getFeatureData(); byte[] featureData = faceFeature.getFeatureData();
// return featureData; return featureData;
// } catch (Exception e) { } catch (Exception e) {
// log.error("人脸特征值提取出现了异常"); log.error("人脸特征值提取出现了异常");
// e.printStackTrace(); e.printStackTrace();
// return new byte[0]; return new byte[0];
// } finally { } finally {
// // 回收对象到对象池 // 回收对象到对象池
// if (faceEngine != null) { if (faceEngine != null) {
// faceEngineGenericObjectPool.returnObject(faceEngine); faceEngineGenericObjectPool.returnObject(faceEngine);
// } }
// } }
// } }
//
// /** /**
// * 人脸对比 * 人脸对比
// */ */
// public float faceCompared(byte [] source,byte [] des) throws IOException { public float faceCompared(byte [] source,byte [] des) throws IOException {
// FaceEngine faceEngine = null; FaceEngine faceEngine = null;
// try { try {
// faceEngine = faceEngineGenericObjectPool.borrowObject(); faceEngine = faceEngineGenericObjectPool.borrowObject();
// FaceFeature targetFaceFeature = new FaceFeature(); FaceFeature targetFaceFeature = new FaceFeature();
// targetFaceFeature.setFeatureData(source); targetFaceFeature.setFeatureData(source);
// FaceFeature sourceFaceFeature = new FaceFeature(); FaceFeature sourceFaceFeature = new FaceFeature();
// sourceFaceFeature.setFeatureData(des); sourceFaceFeature.setFeatureData(des);
// FaceSimilar faceSimilar = new FaceSimilar(); FaceSimilar faceSimilar = new FaceSimilar();
// faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar); faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar);
// float score = faceSimilar.getScore(); float score = faceSimilar.getScore();
// return score; return score;
// } catch (Exception e) { } catch (Exception e) {
// log.error("人脸对比出现了异常"); log.error("人脸对比出现了异常");
// e.printStackTrace(); e.printStackTrace();
// return 0; return 0;
// } finally { } finally {
// // 回收对象到对象池 // 回收对象到对象池
// if (faceEngine != null) { if (faceEngine != null) {
// faceEngineGenericObjectPool.returnObject(faceEngine); faceEngineGenericObjectPool.returnObject(faceEngine);
// } }
// } }
// } }
//
// /** /**
// * 人脸搜索 * 人脸搜索
// */ */
// public List<SysFaceEntity> faceSearch(FaceFeature targetFaceFeature,List<SysFaceEntity> sourceList) throws IOException { public List<SysFaceEntity> faceSearch(FaceFeature targetFaceFeature,List<SysFaceEntity> sourceList) throws IOException {
// FaceEngine faceEngine = null; FaceEngine faceEngine = null;
// List<SysFaceEntity> resultFaceInfoList = Lists.newLinkedList();//识别到的人脸列表 List<SysFaceEntity> resultFaceInfoList = Lists.newLinkedList();//识别到的人脸列表
// try { try {
// faceEngine = faceEngineGenericObjectPool.borrowObject(); faceEngine = faceEngineGenericObjectPool.borrowObject();
//
// for(SysFaceEntity faceUserInfo : sourceList) { for(SysFaceEntity faceUserInfo : sourceList) {
// FaceFeature sourceFaceFeature = new FaceFeature(); FaceFeature sourceFaceFeature = new FaceFeature();
// sourceFaceFeature.setFeatureData(faceUserInfo.getFaceFeature()); sourceFaceFeature.setFeatureData(faceUserInfo.getFaceFeature());
// FaceSimilar faceSimilar = new FaceSimilar(); FaceSimilar faceSimilar = new FaceSimilar();
// faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar); faceEngine.compareFaceFeature(targetFaceFeature, sourceFaceFeature, faceSimilar);
// float score = faceSimilar.getScore(); float score = faceSimilar.getScore();
// if(score > 0.8){ if(score > 0.8){
// faceUserInfo.setSimilarValue(plusHundred(score)); faceUserInfo.setSimilarValue(plusHundred(score));
// resultFaceInfoList.add(faceUserInfo); resultFaceInfoList.add(faceUserInfo);
// } }
// } }
// } catch (Exception e) { } catch (Exception e) {
// log.error("人脸对比出现了异常"); log.error("人脸对比出现了异常");
// e.printStackTrace(); e.printStackTrace();
// } finally { } finally {
// // 回收对象到对象池 // 回收对象到对象池
// if (faceEngine != null) { if (faceEngine != null) {
// faceEngineGenericObjectPool.returnObject(faceEngine); faceEngineGenericObjectPool.returnObject(faceEngine);
// } }
// } }
// return resultFaceInfoList; return resultFaceInfoList;
// } }
//
// private int plusHundred(Float value) { private int plusHundred(Float value) {
// BigDecimal target = new BigDecimal(value); BigDecimal target = new BigDecimal(value);
// BigDecimal hundred = new BigDecimal(100f); BigDecimal hundred = new BigDecimal(100f);
// return target.multiply(hundred).intValue(); return target.multiply(hundred).intValue();
// } }
//
//} }
//package com.mortals.xhx.face.factory; package com.mortals.xhx.face.factory;
//
//import com.arcsoft.face.ActiveFileInfo; import com.arcsoft.face.ActiveFileInfo;
//import com.arcsoft.face.EngineConfiguration; import com.arcsoft.face.EngineConfiguration;
//import com.arcsoft.face.FaceEngine; import com.arcsoft.face.FaceEngine;
//import com.arcsoft.face.FunctionConfiguration; import com.arcsoft.face.FunctionConfiguration;
//import com.arcsoft.face.enums.DetectMode; import com.arcsoft.face.enums.DetectMode;
//import com.arcsoft.face.enums.DetectOrient; import com.arcsoft.face.enums.DetectOrient;
//import com.arcsoft.face.enums.ErrorInfo; import com.arcsoft.face.enums.ErrorInfo;
//import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.pool2.BasePooledObjectFactory; import org.apache.commons.pool2.BasePooledObjectFactory;
//import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.PooledObject;
//import org.apache.commons.pool2.impl.DefaultPooledObject; import org.apache.commons.pool2.impl.DefaultPooledObject;
//
//@Slf4j @Slf4j
//public class FaceEnginePoolFactory extends BasePooledObjectFactory<FaceEngine> { public class FaceEnginePoolFactory extends BasePooledObjectFactory<FaceEngine> {
//
// private String appId; private String appId;
// private String sdkKey; private String sdkKey;
// private String sdkLibPath; private String sdkLibPath;
//
// public FaceEnginePoolFactory(String appId, String sdkKey, String sdkLibPath) { public FaceEnginePoolFactory(String appId, String sdkKey, String sdkLibPath) {
// this.appId = appId; this.appId = appId;
// this.sdkKey = sdkKey; this.sdkKey = sdkKey;
// this.sdkLibPath = sdkLibPath; this.sdkLibPath = sdkLibPath;
// //this.sdkLibPath = "D:\\face\\win64"; //this.sdkLibPath = "D:\\face\\win64";
// } }
//
// /** /**
// * 在对象池中创建对象 * 在对象池中创建对象
// * @return * @return
// * @throws Exception * @throws Exception
// */ */
// @Override @Override
// public FaceEngine create() throws Exception { public FaceEngine create() throws Exception {
// FaceEngine faceEngine = new FaceEngine(sdkLibPath); FaceEngine faceEngine = new FaceEngine(sdkLibPath);
// //激活引擎 //激活引擎
// int errorCode = faceEngine.activeOnline(appId, sdkKey); int errorCode = faceEngine.activeOnline(appId, sdkKey);
// if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) {
// log.warn("引擎激活失败"); log.warn("引擎激活失败");
// } }
// ActiveFileInfo activeFileInfo=new ActiveFileInfo(); ActiveFileInfo activeFileInfo=new ActiveFileInfo();
// errorCode = faceEngine.getActiveFileInfo(activeFileInfo); errorCode = faceEngine.getActiveFileInfo(activeFileInfo);
// if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) {
// log.warn("获取激活文件信息失败"); log.warn("获取激活文件信息失败");
// } }
// //引擎配置 //引擎配置
// EngineConfiguration engineConfiguration = new EngineConfiguration(); EngineConfiguration engineConfiguration = new EngineConfiguration();
// engineConfiguration.setDetectMode(DetectMode.ASF_DETECT_MODE_IMAGE); engineConfiguration.setDetectMode(DetectMode.ASF_DETECT_MODE_IMAGE);
// engineConfiguration.setDetectFaceOrientPriority(DetectOrient.ASF_OP_ALL_OUT); engineConfiguration.setDetectFaceOrientPriority(DetectOrient.ASF_OP_ALL_OUT);
// engineConfiguration.setDetectFaceMaxNum(10); engineConfiguration.setDetectFaceMaxNum(10);
// engineConfiguration.setDetectFaceScaleVal(16); engineConfiguration.setDetectFaceScaleVal(16);
// //功能配置 //功能配置
// FunctionConfiguration functionConfiguration = new FunctionConfiguration(); FunctionConfiguration functionConfiguration = new FunctionConfiguration();
// functionConfiguration.setSupportAge(true); functionConfiguration.setSupportAge(true);
// functionConfiguration.setSupportFace3dAngle(true); functionConfiguration.setSupportFace3dAngle(true);
// functionConfiguration.setSupportFaceDetect(true); functionConfiguration.setSupportFaceDetect(true);
// functionConfiguration.setSupportFaceRecognition(true); functionConfiguration.setSupportFaceRecognition(true);
// functionConfiguration.setSupportGender(true); functionConfiguration.setSupportGender(true);
// functionConfiguration.setSupportLiveness(true); functionConfiguration.setSupportLiveness(true);
// functionConfiguration.setSupportIRLiveness(true); functionConfiguration.setSupportIRLiveness(true);
// engineConfiguration.setFunctionConfiguration(functionConfiguration); engineConfiguration.setFunctionConfiguration(functionConfiguration);
// //初始化引擎 //初始化引擎
// errorCode = faceEngine.init(engineConfiguration); errorCode = faceEngine.init(engineConfiguration);
//
// if (errorCode != ErrorInfo.MOK.getValue()) { if (errorCode != ErrorInfo.MOK.getValue()) {
// log.error("初始化引擎失败"); log.error("初始化引擎失败");
// } }
// return faceEngine; return faceEngine;
// } }
//
// /** /**
// * 包装对象 * 包装对象
// * @param faceEngine * @param faceEngine
// * @return * @return
// */ */
// @Override @Override
// public PooledObject<FaceEngine> wrap(FaceEngine faceEngine) { public PooledObject<FaceEngine> wrap(FaceEngine faceEngine) {
// return new DefaultPooledObject<>(faceEngine); return new DefaultPooledObject<>(faceEngine);
// } }
// /** /**
// * 销毁对象 * 销毁对象
// * @param faceEngine 对象池 * @param faceEngine 对象池
// * @throws Exception 异常 * @throws Exception 异常
// */ */
// @Override @Override
// public void destroyObject(PooledObject<FaceEngine> faceEngine) throws Exception { public void destroyObject(PooledObject<FaceEngine> faceEngine) throws Exception {
// super.destroyObject(faceEngine); super.destroyObject(faceEngine);
// } }
//
// /** /**
// * 校验对象是否可用 * 校验对象是否可用
// * @param faceEngine 对象池 * @param faceEngine 对象池
// * @return 对象是否可用结果,boolean * @return 对象是否可用结果,boolean
// */ */
// @Override @Override
// public boolean validateObject(PooledObject<FaceEngine> faceEngine) { public boolean validateObject(PooledObject<FaceEngine> faceEngine) {
// return super.validateObject(faceEngine); return super.validateObject(faceEngine);
// } }
//
// /** /**
// * 激活钝化的对象系列操作 * 激活钝化的对象系列操作
// * @param faceEngine 对象池 * @param faceEngine 对象池
// * @throws Exception 异常信息 * @throws Exception 异常信息
// */ */
// @Override @Override
// public void activateObject(PooledObject<FaceEngine> faceEngine) throws Exception { public void activateObject(PooledObject<FaceEngine> faceEngine) throws Exception {
// super.activateObject(faceEngine); super.activateObject(faceEngine);
// } }
//
// /** /**
// * 钝化未使用的对象 * 钝化未使用的对象
// * @param faceEngine 对象池 * @param faceEngine 对象池
// * @throws Exception 异常信息 * @throws Exception 异常信息
// */ */
// @Override @Override
// public void passivateObject(PooledObject<FaceEngine> faceEngine) throws Exception { public void passivateObject(PooledObject<FaceEngine> faceEngine) throws Exception {
// super.passivateObject(faceEngine); super.passivateObject(faceEngine);
// } }
//
//} }
...@@ -17,14 +17,17 @@ import com.mortals.framework.model.PageInfo; ...@@ -17,14 +17,17 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant; import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.pdu.app.AppPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.ZipUtils; import com.mortals.xhx.common.utils.ZipUtils;
import com.mortals.xhx.feign.app.device.IAppFeign;
import com.mortals.xhx.module.app.model.*; import com.mortals.xhx.module.app.model.*;
import com.mortals.xhx.module.app.service.*; import com.mortals.xhx.module.app.service.*;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.utils.EncodeUtil; import com.mortals.xhx.utils.EncodeUtil;
import com.mortals.xhx.version.model.VersionEntity; import com.mortals.xhx.version.model.VersionEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -49,6 +52,7 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH; ...@@ -49,6 +52,7 @@ import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH;
* @date 2022-11-28 * @date 2022-11-28
*/ */
@Service("appService") @Service("appService")
@Slf4j
public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, Long> implements AppService { public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, Long> implements AppService {
@Autowired @Autowired
...@@ -63,11 +67,14 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -63,11 +67,14 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private AppInfoTempleteFieldService appInfoTempleteFieldService; private AppInfoTempleteFieldService appInfoTempleteFieldService;
@Autowired @Autowired
private AppVersionService appVersionService; private AppVersionService appVersionService;
@Autowired
private IAppFeign appFeign;
@Override @Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException { protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//排序 //排序
if (!ObjectUtils.isEmpty(params.getIdList())) { if (!ObjectUtils.isEmpty(params.getIdList())) {
log.info("请求的排序id列表:{}", JSON.toJSONString(params.getIdList()));
try { try {
//去除idlist中不存在的 //去除idlist中不存在的
Set<Long> idSet = list.stream().map(item -> item.getId()).collect(Collectors.toSet()); Set<Long> idSet = list.stream().map(item -> item.getId()).collect(Collectors.toSet());
...@@ -317,6 +324,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -317,6 +324,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
entity.setFilePath(null); entity.setFilePath(null);
entity.setFileName(null); entity.setFileName(null);
//判断如果应用下架,通知自助服务终端
if(entity.getShelves()==YesNoEnum.NO.getValue()){
AppPdu appPdu = new AppPdu();
appPdu.setAppId(entity.getId());
appFeign.forbidden(appPdu);
}
int iRet = this.dao.update(entity); int iRet = this.dao.update(entity);
if (iRet == 0) { if (iRet == 0) {
throw new AppException(-1002, "更新失败!"); throw new AppException(-1002, "更新失败!");
......
...@@ -36,7 +36,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -36,7 +36,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
private BaseAreaService baseAreaService; private BaseAreaService baseAreaService;
/* @Override @Override
public void putCache(String key, AreaEntity data) { public void putCache(String key, AreaEntity data) {
super.putCache(key, data); super.putCache(key, data);
//加载孩子关系 //加载孩子关系
...@@ -47,7 +47,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -47,7 +47,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
cacheService.lpush(childKey, item); cacheService.lpush(childKey, item);
}); });
} }
}*/ }
@Override @Override
protected String getExtKey(AreaEntity data) { protected String getExtKey(AreaEntity data) {
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.dept.model.vo.DeptVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.dept.model.vo.DeptVo;
* 部门实体对象 * 部门实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-23 * @date 2023-03-06
*/ */
public class DeptEntity extends DeptVo { public class DeptEntity extends DeptVo {
...@@ -84,6 +84,10 @@ public class DeptEntity extends DeptVo { ...@@ -84,6 +84,10 @@ public class DeptEntity extends DeptVo {
* 部门来源 * 部门来源
*/ */
private Integer source; private Integer source;
/**
* 关联事项数量
*/
private Integer total;
...@@ -326,6 +330,20 @@ public class DeptEntity extends DeptVo { ...@@ -326,6 +330,20 @@ public class DeptEntity extends DeptVo {
public void setSource(Integer source){ public void setSource(Integer source){
this.source = source; this.source = source;
} }
/**
* 获取 关联事项数量
* @return Integer
*/
public Integer getTotal(){
return total;
}
/**
* 设置 关联事项数量
* @param total
*/
public void setTotal(Integer total){
this.total = total;
}
...@@ -365,6 +383,7 @@ public class DeptEntity extends DeptVo { ...@@ -365,6 +383,7 @@ public class DeptEntity extends DeptVo {
sb.append(",isEnglish:").append(getIsEnglish()); sb.append(",isEnglish:").append(getIsEnglish());
sb.append(",sort:").append(getSort()); sb.append(",sort:").append(getSort());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
sb.append(",total:").append(getTotal());
return sb.toString(); return sb.toString();
} }
...@@ -403,5 +422,7 @@ public class DeptEntity extends DeptVo { ...@@ -403,5 +422,7 @@ public class DeptEntity extends DeptVo {
this.sort = 0; this.sort = 0;
this.source = 0; this.source = 0;
this.total = 0;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.dept.model.DeptEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.dept.model.DeptEntity;
* 部门查询对象 * 部门查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-11-23 * @date 2023-03-06
*/ */
public class DeptQuery extends DeptEntity { public class DeptQuery extends DeptEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -21,18 +21,29 @@ public class DeptQuery extends DeptEntity { ...@@ -21,18 +21,29 @@ public class DeptQuery extends DeptEntity {
/** 序号,主键,自增长列表 */ /** 序号,主键,自增长列表 */
private List <Long> idList; private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 从政务系统来的部门id */ /** 从政务系统来的部门id */
private List<String> tidList; private List<String> tidList;
/** 从政务系统来的部门id排除列表 */
private List <String> tidNotList;
/** 从政务系统来的部门name */ /** 从政务系统来的部门name */
private List<String> tnameList; private List<String> tnameList;
/** 从政务系统来的部门name排除列表 */
private List <String> tnameNotList;
/** 部门名称 */ /** 部门名称 */
private List<String> nameList; private List<String> nameList;
/** 部门名称排除列表 */
private List <String> nameNotList;
/** 从政务系统来的别名 */ /** 从政务系统来的别名 */
private List<String> simpleNameList; private List<String> simpleNameList;
/** 从政务系统来的别名排除列表 */
private List <String> simpleNameNotList;
/** 开始 站点ID */ /** 开始 站点ID */
private Long siteIdStart; private Long siteIdStart;
...@@ -45,15 +56,24 @@ public class DeptQuery extends DeptEntity { ...@@ -45,15 +56,24 @@ public class DeptQuery extends DeptEntity {
/** 站点ID列表 */ /** 站点ID列表 */
private List <Long> siteIdList; private List <Long> siteIdList;
/** 站点ID排除列表 */
private List <Long> siteIdNotList;
/** 部门简称 */ /** 部门简称 */
private List<String> deptAbbList; private List<String> deptAbbList;
/** 部门简称排除列表 */
private List <String> deptAbbNotList;
/** 部门电话 */ /** 部门电话 */
private List<String> deptTelphoneList; private List<String> deptTelphoneList;
/** 部门电话排除列表 */
private List <String> deptTelphoneNotList;
/** 部门编号 */ /** 部门编号 */
private List<String> deptNumberList; private List<String> deptNumberList;
/** 部门编号排除列表 */
private List <String> deptNumberNotList;
/** 开始 填单机展示 (0.否,1.是) */ /** 开始 填单机展示 (0.否,1.是) */
private Integer isAutotableStart; private Integer isAutotableStart;
...@@ -66,6 +86,9 @@ public class DeptQuery extends DeptEntity { ...@@ -66,6 +86,9 @@ public class DeptQuery extends DeptEntity {
/** 填单机展示 (0.否,1.是) 列表 */ /** 填单机展示 (0.否,1.是) 列表 */
private List <Integer> isAutotableList; private List <Integer> isAutotableList;
/** 填单机展示 (0.否,1.是) 排除列表 */
private List <Integer> isAutotableNotList;
/** 开始 预约展示 (0.否,1.是) */ /** 开始 预约展示 (0.否,1.是) */
private Integer isOrderStart; private Integer isOrderStart;
...@@ -78,6 +101,9 @@ public class DeptQuery extends DeptEntity { ...@@ -78,6 +101,9 @@ public class DeptQuery extends DeptEntity {
/** 预约展示 (0.否,1.是) 列表 */ /** 预约展示 (0.否,1.是) 列表 */
private List <Integer> isOrderList; private List <Integer> isOrderList;
/** 预约展示 (0.否,1.是) 排除列表 */
private List <Integer> isOrderNotList;
/** 开始 背靠背展示 (0.否,1.是) */ /** 开始 背靠背展示 (0.否,1.是) */
private Integer isBkbStart; private Integer isBkbStart;
...@@ -90,6 +116,9 @@ public class DeptQuery extends DeptEntity { ...@@ -90,6 +116,9 @@ public class DeptQuery extends DeptEntity {
/** 背靠背展示 (0.否,1.是) 列表 */ /** 背靠背展示 (0.否,1.是) 列表 */
private List <Integer> isBkbList; private List <Integer> isBkbList;
/** 背靠背展示 (0.否,1.是) 排除列表 */
private List <Integer> isBkbNotList;
/** 开始 办事指南展示 (0.否,1.是) */ /** 开始 办事指南展示 (0.否,1.是) */
private Integer isWorkGuideStart; private Integer isWorkGuideStart;
...@@ -102,6 +131,9 @@ public class DeptQuery extends DeptEntity { ...@@ -102,6 +131,9 @@ public class DeptQuery extends DeptEntity {
/** 办事指南展示 (0.否,1.是) 列表 */ /** 办事指南展示 (0.否,1.是) 列表 */
private List <Integer> isWorkGuideList; private List <Integer> isWorkGuideList;
/** 办事指南展示 (0.否,1.是) 排除列表 */
private List <Integer> isWorkGuideNotList;
/** 开始 是否使用 (0.否,1.是) */ /** 开始 是否使用 (0.否,1.是) */
private Integer usValidStart; private Integer usValidStart;
...@@ -114,6 +146,9 @@ public class DeptQuery extends DeptEntity { ...@@ -114,6 +146,9 @@ public class DeptQuery extends DeptEntity {
/** 是否使用 (0.否,1.是) 列表 */ /** 是否使用 (0.否,1.是) 列表 */
private List <Integer> usValidList; private List <Integer> usValidList;
/** 是否使用 (0.否,1.是) 排除列表 */
private List <Integer> usValidNotList;
/** 开始 部门电话是否展示 (0.否,1.是) */ /** 开始 部门电话是否展示 (0.否,1.是) */
private Integer isSecphoneStart; private Integer isSecphoneStart;
...@@ -126,6 +161,9 @@ public class DeptQuery extends DeptEntity { ...@@ -126,6 +161,9 @@ public class DeptQuery extends DeptEntity {
/** 部门电话是否展示 (0.否,1.是) 列表 */ /** 部门电话是否展示 (0.否,1.是) 列表 */
private List <Integer> isSecphoneList; private List <Integer> isSecphoneList;
/** 部门电话是否展示 (0.否,1.是) 排除列表 */
private List <Integer> isSecphoneNotList;
/** 开始 是否展示英文 (0.否,1.是) */ /** 开始 是否展示英文 (0.否,1.是) */
private Integer isEnglishStart; private Integer isEnglishStart;
...@@ -138,6 +176,9 @@ public class DeptQuery extends DeptEntity { ...@@ -138,6 +176,9 @@ public class DeptQuery extends DeptEntity {
/** 是否展示英文 (0.否,1.是) 列表 */ /** 是否展示英文 (0.否,1.是) 列表 */
private List <Integer> isEnglishList; private List <Integer> isEnglishList;
/** 是否展示英文 (0.否,1.是) 排除列表 */
private List <Integer> isEnglishNotList;
/** 开始 排序 */ /** 开始 排序 */
private Integer sortStart; private Integer sortStart;
...@@ -150,6 +191,9 @@ public class DeptQuery extends DeptEntity { ...@@ -150,6 +191,9 @@ public class DeptQuery extends DeptEntity {
/** 排序列表 */ /** 排序列表 */
private List <Integer> sortList; private List <Integer> sortList;
/** 排序排除列表 */
private List <Integer> sortNotList;
/** 开始 部门来源 */ /** 开始 部门来源 */
private Integer sourceStart; private Integer sourceStart;
...@@ -162,6 +206,9 @@ public class DeptQuery extends DeptEntity { ...@@ -162,6 +206,9 @@ public class DeptQuery extends DeptEntity {
/** 部门来源列表 */ /** 部门来源列表 */
private List <Integer> sourceList; private List <Integer> sourceList;
/** 部门来源排除列表 */
private List <Integer> sourceNotList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -180,12 +227,30 @@ public class DeptQuery extends DeptEntity { ...@@ -180,12 +227,30 @@ public class DeptQuery extends DeptEntity {
/** 创建用户列表 */ /** 创建用户列表 */
private List <Long> createUserIdList; private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 修改时间 */ /** 开始 修改时间 */
private String updateTimeStart; private String updateTimeStart;
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 关联事项数量 */
private Integer totalStart;
/** 结束 关联事项数量 */
private Integer totalEnd;
/** 增加 关联事项数量 */
private Integer totalIncrement;
/** 关联事项数量列表 */
private List <Integer> totalList;
/** 关联事项数量排除列表 */
private List <Integer> totalNotList;
/** 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<DeptQuery> orConditionList; private List<DeptQuery> orConditionList;
...@@ -258,6 +323,23 @@ public class DeptQuery extends DeptEntity { ...@@ -258,6 +323,23 @@ public class DeptQuery extends DeptEntity {
this.idList = idList; this.idList = idList;
} }
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/** /**
* 获取 从政务系统来的部门id * 获取 从政务系统来的部门id
* @return tidList * @return tidList
...@@ -273,6 +355,23 @@ public class DeptQuery extends DeptEntity { ...@@ -273,6 +355,23 @@ public class DeptQuery extends DeptEntity {
public void setTidList(List<String> tidList){ public void setTidList(List<String> tidList){
this.tidList = tidList; this.tidList = tidList;
} }
/**
* 获取 从政务系统来的部门id
* @return tidNotList
*/
public List<String> getTidNotList(){
return this.tidNotList;
}
/**
* 设置 从政务系统来的部门id
* @param tidNotList
*/
public void setTidNotList(List<String> tidNotList){
this.tidNotList = tidNotList;
}
/** /**
* 获取 从政务系统来的部门name * 获取 从政务系统来的部门name
* @return tnameList * @return tnameList
...@@ -288,6 +387,23 @@ public class DeptQuery extends DeptEntity { ...@@ -288,6 +387,23 @@ public class DeptQuery extends DeptEntity {
public void setTnameList(List<String> tnameList){ public void setTnameList(List<String> tnameList){
this.tnameList = tnameList; this.tnameList = tnameList;
} }
/**
* 获取 从政务系统来的部门name
* @return tnameNotList
*/
public List<String> getTnameNotList(){
return this.tnameNotList;
}
/**
* 设置 从政务系统来的部门name
* @param tnameNotList
*/
public void setTnameNotList(List<String> tnameNotList){
this.tnameNotList = tnameNotList;
}
/** /**
* 获取 部门名称 * 获取 部门名称
* @return nameList * @return nameList
...@@ -303,6 +419,23 @@ public class DeptQuery extends DeptEntity { ...@@ -303,6 +419,23 @@ public class DeptQuery extends DeptEntity {
public void setNameList(List<String> nameList){ public void setNameList(List<String> nameList){
this.nameList = nameList; this.nameList = nameList;
} }
/**
* 获取 部门名称
* @return nameNotList
*/
public List<String> getNameNotList(){
return this.nameNotList;
}
/**
* 设置 部门名称
* @param nameNotList
*/
public void setNameNotList(List<String> nameNotList){
this.nameNotList = nameNotList;
}
/** /**
* 获取 从政务系统来的别名 * 获取 从政务系统来的别名
* @return simpleNameList * @return simpleNameList
...@@ -318,6 +451,23 @@ public class DeptQuery extends DeptEntity { ...@@ -318,6 +451,23 @@ public class DeptQuery extends DeptEntity {
public void setSimpleNameList(List<String> simpleNameList){ public void setSimpleNameList(List<String> simpleNameList){
this.simpleNameList = simpleNameList; this.simpleNameList = simpleNameList;
} }
/**
* 获取 从政务系统来的别名
* @return simpleNameNotList
*/
public List<String> getSimpleNameNotList(){
return this.simpleNameNotList;
}
/**
* 设置 从政务系统来的别名
* @param simpleNameNotList
*/
public void setSimpleNameNotList(List<String> simpleNameNotList){
this.simpleNameNotList = simpleNameNotList;
}
/** /**
* 获取 开始 站点ID * 获取 开始 站点ID
* @return siteIdStart * @return siteIdStart
...@@ -382,6 +532,23 @@ public class DeptQuery extends DeptEntity { ...@@ -382,6 +532,23 @@ public class DeptQuery extends DeptEntity {
this.siteIdList = siteIdList; this.siteIdList = siteIdList;
} }
/**
* 获取 站点ID
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点ID
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/** /**
* 获取 部门简称 * 获取 部门简称
* @return deptAbbList * @return deptAbbList
...@@ -397,6 +564,23 @@ public class DeptQuery extends DeptEntity { ...@@ -397,6 +564,23 @@ public class DeptQuery extends DeptEntity {
public void setDeptAbbList(List<String> deptAbbList){ public void setDeptAbbList(List<String> deptAbbList){
this.deptAbbList = deptAbbList; this.deptAbbList = deptAbbList;
} }
/**
* 获取 部门简称
* @return deptAbbNotList
*/
public List<String> getDeptAbbNotList(){
return this.deptAbbNotList;
}
/**
* 设置 部门简称
* @param deptAbbNotList
*/
public void setDeptAbbNotList(List<String> deptAbbNotList){
this.deptAbbNotList = deptAbbNotList;
}
/** /**
* 获取 部门电话 * 获取 部门电话
* @return deptTelphoneList * @return deptTelphoneList
...@@ -412,6 +596,23 @@ public class DeptQuery extends DeptEntity { ...@@ -412,6 +596,23 @@ public class DeptQuery extends DeptEntity {
public void setDeptTelphoneList(List<String> deptTelphoneList){ public void setDeptTelphoneList(List<String> deptTelphoneList){
this.deptTelphoneList = deptTelphoneList; this.deptTelphoneList = deptTelphoneList;
} }
/**
* 获取 部门电话
* @return deptTelphoneNotList
*/
public List<String> getDeptTelphoneNotList(){
return this.deptTelphoneNotList;
}
/**
* 设置 部门电话
* @param deptTelphoneNotList
*/
public void setDeptTelphoneNotList(List<String> deptTelphoneNotList){
this.deptTelphoneNotList = deptTelphoneNotList;
}
/** /**
* 获取 部门编号 * 获取 部门编号
* @return deptNumberList * @return deptNumberList
...@@ -427,6 +628,23 @@ public class DeptQuery extends DeptEntity { ...@@ -427,6 +628,23 @@ public class DeptQuery extends DeptEntity {
public void setDeptNumberList(List<String> deptNumberList){ public void setDeptNumberList(List<String> deptNumberList){
this.deptNumberList = deptNumberList; this.deptNumberList = deptNumberList;
} }
/**
* 获取 部门编号
* @return deptNumberNotList
*/
public List<String> getDeptNumberNotList(){
return this.deptNumberNotList;
}
/**
* 设置 部门编号
* @param deptNumberNotList
*/
public void setDeptNumberNotList(List<String> deptNumberNotList){
this.deptNumberNotList = deptNumberNotList;
}
/** /**
* 获取 开始 填单机展示 (0.否,1.是) * 获取 开始 填单机展示 (0.否,1.是)
* @return isAutotableStart * @return isAutotableStart
...@@ -491,6 +709,23 @@ public class DeptQuery extends DeptEntity { ...@@ -491,6 +709,23 @@ public class DeptQuery extends DeptEntity {
this.isAutotableList = isAutotableList; this.isAutotableList = isAutotableList;
} }
/**
* 获取 填单机展示 (0.否,1.是)
* @return isAutotableNotList
*/
public List<Integer> getIsAutotableNotList(){
return this.isAutotableNotList;
}
/**
* 设置 填单机展示 (0.否,1.是)
* @param isAutotableNotList
*/
public void setIsAutotableNotList(List<Integer> isAutotableNotList){
this.isAutotableNotList = isAutotableNotList;
}
/** /**
* 获取 开始 预约展示 (0.否,1.是) * 获取 开始 预约展示 (0.否,1.是)
* @return isOrderStart * @return isOrderStart
...@@ -555,6 +790,23 @@ public class DeptQuery extends DeptEntity { ...@@ -555,6 +790,23 @@ public class DeptQuery extends DeptEntity {
this.isOrderList = isOrderList; this.isOrderList = isOrderList;
} }
/**
* 获取 预约展示 (0.否,1.是)
* @return isOrderNotList
*/
public List<Integer> getIsOrderNotList(){
return this.isOrderNotList;
}
/**
* 设置 预约展示 (0.否,1.是)
* @param isOrderNotList
*/
public void setIsOrderNotList(List<Integer> isOrderNotList){
this.isOrderNotList = isOrderNotList;
}
/** /**
* 获取 开始 背靠背展示 (0.否,1.是) * 获取 开始 背靠背展示 (0.否,1.是)
* @return isBkbStart * @return isBkbStart
...@@ -619,6 +871,23 @@ public class DeptQuery extends DeptEntity { ...@@ -619,6 +871,23 @@ public class DeptQuery extends DeptEntity {
this.isBkbList = isBkbList; this.isBkbList = isBkbList;
} }
/**
* 获取 背靠背展示 (0.否,1.是)
* @return isBkbNotList
*/
public List<Integer> getIsBkbNotList(){
return this.isBkbNotList;
}
/**
* 设置 背靠背展示 (0.否,1.是)
* @param isBkbNotList
*/
public void setIsBkbNotList(List<Integer> isBkbNotList){
this.isBkbNotList = isBkbNotList;
}
/** /**
* 获取 开始 办事指南展示 (0.否,1.是) * 获取 开始 办事指南展示 (0.否,1.是)
* @return isWorkGuideStart * @return isWorkGuideStart
...@@ -683,6 +952,23 @@ public class DeptQuery extends DeptEntity { ...@@ -683,6 +952,23 @@ public class DeptQuery extends DeptEntity {
this.isWorkGuideList = isWorkGuideList; this.isWorkGuideList = isWorkGuideList;
} }
/**
* 获取 办事指南展示 (0.否,1.是)
* @return isWorkGuideNotList
*/
public List<Integer> getIsWorkGuideNotList(){
return this.isWorkGuideNotList;
}
/**
* 设置 办事指南展示 (0.否,1.是)
* @param isWorkGuideNotList
*/
public void setIsWorkGuideNotList(List<Integer> isWorkGuideNotList){
this.isWorkGuideNotList = isWorkGuideNotList;
}
/** /**
* 获取 开始 是否使用 (0.否,1.是) * 获取 开始 是否使用 (0.否,1.是)
* @return usValidStart * @return usValidStart
...@@ -747,6 +1033,23 @@ public class DeptQuery extends DeptEntity { ...@@ -747,6 +1033,23 @@ public class DeptQuery extends DeptEntity {
this.usValidList = usValidList; this.usValidList = usValidList;
} }
/**
* 获取 是否使用 (0.否,1.是)
* @return usValidNotList
*/
public List<Integer> getUsValidNotList(){
return this.usValidNotList;
}
/**
* 设置 是否使用 (0.否,1.是)
* @param usValidNotList
*/
public void setUsValidNotList(List<Integer> usValidNotList){
this.usValidNotList = usValidNotList;
}
/** /**
* 获取 开始 部门电话是否展示 (0.否,1.是) * 获取 开始 部门电话是否展示 (0.否,1.是)
* @return isSecphoneStart * @return isSecphoneStart
...@@ -811,6 +1114,23 @@ public class DeptQuery extends DeptEntity { ...@@ -811,6 +1114,23 @@ public class DeptQuery extends DeptEntity {
this.isSecphoneList = isSecphoneList; this.isSecphoneList = isSecphoneList;
} }
/**
* 获取 部门电话是否展示 (0.否,1.是)
* @return isSecphoneNotList
*/
public List<Integer> getIsSecphoneNotList(){
return this.isSecphoneNotList;
}
/**
* 设置 部门电话是否展示 (0.否,1.是)
* @param isSecphoneNotList
*/
public void setIsSecphoneNotList(List<Integer> isSecphoneNotList){
this.isSecphoneNotList = isSecphoneNotList;
}
/** /**
* 获取 开始 是否展示英文 (0.否,1.是) * 获取 开始 是否展示英文 (0.否,1.是)
* @return isEnglishStart * @return isEnglishStart
...@@ -875,6 +1195,23 @@ public class DeptQuery extends DeptEntity { ...@@ -875,6 +1195,23 @@ public class DeptQuery extends DeptEntity {
this.isEnglishList = isEnglishList; this.isEnglishList = isEnglishList;
} }
/**
* 获取 是否展示英文 (0.否,1.是)
* @return isEnglishNotList
*/
public List<Integer> getIsEnglishNotList(){
return this.isEnglishNotList;
}
/**
* 设置 是否展示英文 (0.否,1.是)
* @param isEnglishNotList
*/
public void setIsEnglishNotList(List<Integer> isEnglishNotList){
this.isEnglishNotList = isEnglishNotList;
}
/** /**
* 获取 开始 排序 * 获取 开始 排序
* @return sortStart * @return sortStart
...@@ -939,6 +1276,23 @@ public class DeptQuery extends DeptEntity { ...@@ -939,6 +1276,23 @@ public class DeptQuery extends DeptEntity {
this.sortList = sortList; this.sortList = sortList;
} }
/**
* 获取 排序
* @return sortNotList
*/
public List<Integer> getSortNotList(){
return this.sortNotList;
}
/**
* 设置 排序
* @param sortNotList
*/
public void setSortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
}
/** /**
* 获取 开始 部门来源 * 获取 开始 部门来源
* @return sourceStart * @return sourceStart
...@@ -1003,6 +1357,23 @@ public class DeptQuery extends DeptEntity { ...@@ -1003,6 +1357,23 @@ public class DeptQuery extends DeptEntity {
this.sourceList = sourceList; this.sourceList = sourceList;
} }
/**
* 获取 部门来源
* @return sourceNotList
*/
public List<Integer> getSourceNotList(){
return this.sourceNotList;
}
/**
* 设置 部门来源
* @param sourceNotList
*/
public void setSourceNotList(List<Integer> sourceNotList){
this.sourceNotList = sourceNotList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -1099,6 +1470,23 @@ public class DeptQuery extends DeptEntity { ...@@ -1099,6 +1470,23 @@ public class DeptQuery extends DeptEntity {
this.createUserIdList = createUserIdList; this.createUserIdList = createUserIdList;
} }
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/** /**
* 获取 开始 修改时间 * 获取 开始 修改时间
* @return updateTimeStart * @return updateTimeStart
...@@ -1131,6 +1519,87 @@ public class DeptQuery extends DeptEntity { ...@@ -1131,6 +1519,87 @@ public class DeptQuery extends DeptEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 关联事项数量
* @return totalStart
*/
public Integer getTotalStart(){
return this.totalStart;
}
/**
* 设置 开始 关联事项数量
* @param totalStart
*/
public void setTotalStart(Integer totalStart){
this.totalStart = totalStart;
}
/**
* 获取 结束 关联事项数量
* @return $totalEnd
*/
public Integer getTotalEnd(){
return this.totalEnd;
}
/**
* 设置 结束 关联事项数量
* @param totalEnd
*/
public void setTotalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
}
/**
* 获取 增加 关联事项数量
* @return totalIncrement
*/
public Integer getTotalIncrement(){
return this.totalIncrement;
}
/**
* 设置 增加 关联事项数量
* @param totalIncrement
*/
public void setTotalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
}
/**
* 获取 关联事项数量
* @return totalList
*/
public List<Integer> getTotalList(){
return this.totalList;
}
/**
* 设置 关联事项数量
* @param totalList
*/
public void setTotalList(List<Integer> totalList){
this.totalList = totalList;
}
/**
* 获取 关联事项数量
* @return totalNotList
*/
public List<Integer> getTotalNotList(){
return this.totalNotList;
}
/**
* 设置 关联事项数量
* @param totalNotList
*/
public void setTotalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1176,6 +1645,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1176,6 +1645,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public DeptQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/** /**
* 设置 从政务系统来的部门id * 设置 从政务系统来的部门id
...@@ -1297,6 +1775,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1297,6 +1775,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 站点ID
* @param siteIdNotList
*/
public DeptQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/** /**
* 设置 部门简称 * 设置 部门简称
...@@ -1399,6 +1886,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1399,6 +1886,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 填单机展示 (0.否,1.是)
* @param isAutotableNotList
*/
public DeptQuery isAutotableNotList(List<Integer> isAutotableNotList){
this.isAutotableNotList = isAutotableNotList;
return this;
}
/** /**
* 设置 预约展示 (0.否,1.是) * 设置 预约展示 (0.否,1.是)
* @param isOrder * @param isOrder
...@@ -1444,6 +1940,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1444,6 +1940,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 预约展示 (0.否,1.是)
* @param isOrderNotList
*/
public DeptQuery isOrderNotList(List<Integer> isOrderNotList){
this.isOrderNotList = isOrderNotList;
return this;
}
/** /**
* 设置 背靠背展示 (0.否,1.是) * 设置 背靠背展示 (0.否,1.是)
* @param isBkb * @param isBkb
...@@ -1489,6 +1994,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1489,6 +1994,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 背靠背展示 (0.否,1.是)
* @param isBkbNotList
*/
public DeptQuery isBkbNotList(List<Integer> isBkbNotList){
this.isBkbNotList = isBkbNotList;
return this;
}
/** /**
* 设置 办事指南展示 (0.否,1.是) * 设置 办事指南展示 (0.否,1.是)
* @param isWorkGuide * @param isWorkGuide
...@@ -1534,6 +2048,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1534,6 +2048,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 办事指南展示 (0.否,1.是)
* @param isWorkGuideNotList
*/
public DeptQuery isWorkGuideNotList(List<Integer> isWorkGuideNotList){
this.isWorkGuideNotList = isWorkGuideNotList;
return this;
}
/** /**
* 设置 是否使用 (0.否,1.是) * 设置 是否使用 (0.否,1.是)
* @param usValid * @param usValid
...@@ -1579,6 +2102,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1579,6 +2102,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 是否使用 (0.否,1.是)
* @param usValidNotList
*/
public DeptQuery usValidNotList(List<Integer> usValidNotList){
this.usValidNotList = usValidNotList;
return this;
}
/** /**
* 设置 部门电话是否展示 (0.否,1.是) * 设置 部门电话是否展示 (0.否,1.是)
* @param isSecphone * @param isSecphone
...@@ -1624,6 +2156,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1624,6 +2156,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 部门电话是否展示 (0.否,1.是)
* @param isSecphoneNotList
*/
public DeptQuery isSecphoneNotList(List<Integer> isSecphoneNotList){
this.isSecphoneNotList = isSecphoneNotList;
return this;
}
/** /**
* 设置 是否展示英文 (0.否,1.是) * 设置 是否展示英文 (0.否,1.是)
* @param isEnglish * @param isEnglish
...@@ -1669,6 +2210,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1669,6 +2210,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 是否展示英文 (0.否,1.是)
* @param isEnglishNotList
*/
public DeptQuery isEnglishNotList(List<Integer> isEnglishNotList){
this.isEnglishNotList = isEnglishNotList;
return this;
}
/** /**
* 设置 排序 * 设置 排序
* @param sort * @param sort
...@@ -1714,6 +2264,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1714,6 +2264,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 排序
* @param sortNotList
*/
public DeptQuery sortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
return this;
}
/** /**
* 设置 部门来源 * 设置 部门来源
* @param source * @param source
...@@ -1759,6 +2318,15 @@ public class DeptQuery extends DeptEntity { ...@@ -1759,6 +2318,15 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 部门来源
* @param sourceNotList
*/
public DeptQuery sourceNotList(List<Integer> sourceNotList){
this.sourceNotList = sourceNotList;
return this;
}
/** /**
* 设置 创建用户 * 设置 创建用户
...@@ -1805,6 +2373,69 @@ public class DeptQuery extends DeptEntity { ...@@ -1805,6 +2373,69 @@ public class DeptQuery extends DeptEntity {
return this; return this;
} }
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public DeptQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 关联事项数量
* @param total
*/
public DeptQuery total(Integer total){
setTotal(total);
return this;
}
/**
* 设置 开始 关联事项数量
* @param totalStart
*/
public DeptQuery totalStart(Integer totalStart){
this.totalStart = totalStart;
return this;
}
/**
* 设置 结束 关联事项数量
* @param totalEnd
*/
public DeptQuery totalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
return this;
}
/**
* 设置 增加 关联事项数量
* @param totalIncrement
*/
public DeptQuery totalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
return this;
}
/**
* 设置 关联事项数量
* @param totalList
*/
public DeptQuery totalList(List<Integer> totalList){
this.totalList = totalList;
return this;
}
/**
* 设置 关联事项数量
* @param totalNotList
*/
public DeptQuery totalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
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)
......
...@@ -43,5 +43,12 @@ public class DeptVo extends BaseEntityLong { ...@@ -43,5 +43,12 @@ public class DeptVo extends BaseEntityLong {
/** 部门ID列表 */ /** 部门ID列表 */
private List <Long> idList; private List <Long> idList;
/**
* 是否过滤不存在事项的部门(0.不过滤,1.过滤,默认不过滤)
*/
private Integer filter;
/** 开始 关联事项数量 */
private Integer totalStart;
} }
\ No newline at end of file
...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context; ...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.model.vo.DeptVo; import com.mortals.xhx.module.dept.model.vo.DeptVo;
...@@ -23,6 +24,7 @@ import java.util.Map; ...@@ -23,6 +24,7 @@ import java.util.Map;
*/ */
public interface DeptService extends ICRUDCacheService<DeptEntity, Long> { public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
DeptDao getDao();
/** /**
* 同步政务网部门数据 * 同步政务网部门数据
......
...@@ -4,6 +4,7 @@ import com.mortals.framework.ap.GlobalSysInfo; ...@@ -4,6 +4,7 @@ import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
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.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
...@@ -69,6 +70,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -69,6 +70,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return data.getDeptNumber(); return data.getDeptNumber();
} }
/** /**
* @param entity * @param entity
* @param context * @param context
......
...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol; ...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
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.common.code.YesNoEnum;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
...@@ -59,6 +60,11 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -59,6 +60,11 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
add(new OrderCol("a.createTime", OrderCol.ASCENDING)); add(new OrderCol("a.createTime", OrderCol.ASCENDING));
} }
}); });
if(!ObjectUtils.isEmpty(query.getFilter())&& YesNoEnum.YES.getValue()==query.getFilter()){
//过滤部门事项数据为0的部门
query.setTotalStart(0);
}
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
...@@ -150,6 +156,19 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -150,6 +156,19 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
/**
* @param entity
* @param model
* @param context
* @throws AppException
*/
@Override
protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException {
DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
if(!ObjectUtils.isEmpty(deptEntity)){
throw new AppException("部门编码已存在!");
}
entity.setSource(1);
super.saveBefore(entity, model, context);
}
} }
\ No newline at end of file
//package com.mortals.xhx.module.identity.service.impl; package com.mortals.xhx.module.identity.service.impl;
//
//import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
//import cn.hutool.core.img.Img; import cn.hutool.core.img.Img;
//import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
//import com.arcsoft.face.FaceEngine; import com.arcsoft.face.FaceEngine;
//import com.arcsoft.face.FaceFeature; import com.arcsoft.face.FaceFeature;
//import com.arcsoft.face.FaceSimilar; import com.arcsoft.face.FaceSimilar;
//import com.google.common.collect.Lists; import com.google.common.collect.Lists;
//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.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
//import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
//import com.mortals.xhx.common.utils.FaceUtil; import com.mortals.xhx.common.utils.FaceUtil;
//import com.mortals.xhx.face.ArcsoftFaceUtil; import com.mortals.xhx.face.ArcsoftFaceUtil;
//import com.mortals.xhx.module.identity.dao.SysFaceDao; import com.mortals.xhx.module.identity.dao.SysFaceDao;
//import com.mortals.xhx.module.identity.model.SysFaceEntity; import com.mortals.xhx.module.identity.model.SysFaceEntity;
//import com.mortals.xhx.module.identity.model.SysIdentityEntity; import com.mortals.xhx.module.identity.model.SysIdentityEntity;
//import com.mortals.xhx.module.identity.model.vo.FaceInfoResVO; import com.mortals.xhx.module.identity.model.vo.FaceInfoResVO;
//import com.mortals.xhx.module.identity.service.SysFaceService; import com.mortals.xhx.module.identity.service.SysFaceService;
//import com.mortals.xhx.module.identity.service.SysIdentityService; import com.mortals.xhx.module.identity.service.SysIdentityService;
//import net.coobird.thumbnailator.Thumbnails; import net.coobird.thumbnailator.Thumbnails;
//import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
//import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
//
//import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
//import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
//import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
//import java.io.IOException; import java.io.IOException;
//import java.util.Base64; import java.util.Base64;
//import java.util.Date; import java.util.Date;
//import java.util.List; import java.util.List;
//import java.util.concurrent.*; import java.util.concurrent.*;
//import java.util.stream.Collectors; import java.util.stream.Collectors;
//
///** /**
//* SysFaceService * SysFaceService
//* 人脸识别信息 service实现 * 人脸识别信息 service实现
//* *
//* @author zxfei * @author zxfei
//* @date 2022-08-03 * @date 2022-08-03
//*/ */
//@Service("sysFaceService") @Service("sysFaceService")
//public class SysFaceServiceImpl extends AbstractCRUDServiceImpl<SysFaceDao, SysFaceEntity, String> implements SysFaceService { public class SysFaceServiceImpl extends AbstractCRUDServiceImpl<SysFaceDao, SysFaceEntity, String> implements SysFaceService {
//
// private Integer passRate = 80; private Integer passRate = 80;
//
// public static final int WIDTH = 100; public static final int WIDTH = 100;
// public static final int HEIGHT = 100; public static final int HEIGHT = 100;
//
// @Value(value = "${faceAppId}") @Value(value = "${faceAppId}")
// private String appId; private String appId;
//
// @Value(value = "${winSdkKey}") @Value(value = "${winSdkKey}")
// private String winSdkKey; private String winSdkKey;
//
// @Value(value = "${linuxSdkkey}") @Value(value = "${linuxSdkkey}")
// private String linuxSdkKey; private String linuxSdkKey;
//
// public Integer threadPoolSize = 5; public Integer threadPoolSize = 5;
//
// @Autowired @Autowired
// private FaceUtil faceUtil; private FaceUtil faceUtil;
//
// @Autowired @Autowired
// private SysIdentityService sysIdentityService; private SysIdentityService sysIdentityService;
//
// @Autowired @Autowired
// private ArcsoftFaceUtil arcsoftFaceUtil; private ArcsoftFaceUtil arcsoftFaceUtil;
//
// private ExecutorService executorService; private ExecutorService executorService;
//
// @PostConstruct @PostConstruct
// public void init() { public void init() {
// executorService = Executors.newFixedThreadPool(threadPoolSize); executorService = Executors.newFixedThreadPool(threadPoolSize);
// } }
//
// @Override @Override
// protected void saveBefore(SysFaceEntity entity, Context context) throws AppException { protected void saveBefore(SysFaceEntity entity, Context context) throws AppException {
// //非系统自增,需这里设置主键 //非系统自增,需这里设置主键
// entity.setId(IdUtil.fastSimpleUUID()); entity.setId(IdUtil.fastSimpleUUID());
// super.saveBefore(entity, context); super.saveBefore(entity, context);
// } }
//
// @Override @Override
// public FaceInfoResVO uploadImage(MultipartFile multipartFile, String name, String idCard, String placeId, String placeName) throws AppException { public FaceInfoResVO uploadImage(MultipartFile multipartFile, String name, String idCard, String placeId, String placeName) throws AppException {
// String clientName = multipartFile.getOriginalFilename(); String clientName = multipartFile.getOriginalFilename();
// if(!(clientName.endsWith(".png") || clientName.endsWith(".jpg") || clientName.endsWith(".jpeg"))){ if(!(clientName.endsWith(".png") || clientName.endsWith(".jpg") || clientName.endsWith(".jpeg"))){
// throw new AppException("请上传图片格式(" + clientName + ")"); throw new AppException("请上传图片格式(" + clientName + ")");
// } }
// FaceInfoResVO resVO = new FaceInfoResVO(); FaceInfoResVO resVO = new FaceInfoResVO();
// SysIdentityEntity idEntityReqVO = new SysIdentityEntity(); SysIdentityEntity idEntityReqVO = new SysIdentityEntity();
// idEntityReqVO.setName(name); idEntityReqVO.setName(name);
// idEntityReqVO.setIdCard(idCard); idEntityReqVO.setIdCard(idCard);
// String entityId = sysIdentityService.saveIdEntity(idEntityReqVO).getId(); String entityId = sysIdentityService.saveIdEntity(idEntityReqVO).getId();
// SysFaceEntity query = new SysFaceEntity(); SysFaceEntity query = new SysFaceEntity();
// query.setIdCard(entityId); query.setIdCard(entityId);
// List<SysFaceEntity> sysFaceList = dao.getList(query); List<SysFaceEntity> sysFaceList = dao.getList(query);
// if(CollectionUtils.isNotEmpty(sysFaceList)){ if(CollectionUtils.isNotEmpty(sysFaceList)){
// throw new AppException("该用户(" + idEntityReqVO.getName() + "_" + idEntityReqVO.getIdCard() + ")人脸数据已存在"); throw new AppException("该用户(" + idEntityReqVO.getName() + "_" + idEntityReqVO.getIdCard() + ")人脸数据已存在");
// } }
//
// try { try {
// byte[] file = multipartFile.getBytes(); byte[] file = multipartFile.getBytes();
// //激活引擎 //激活引擎
// FaceEngine faceEngine = faceUtil.initFace(appId, getSdkKey()); FaceEngine faceEngine = faceUtil.initFace(appId, getSdkKey());
// byte[] featureData = faceUtil.featureData(faceEngine, file); byte[] featureData = faceUtil.featureData(faceEngine, file);
// //创建缩略图 //创建缩略图
// BufferedImage image = Thumbnails.of(multipartFile.getInputStream()).size(WIDTH, HEIGHT).asBufferedImage(); BufferedImage image = Thumbnails.of(multipartFile.getInputStream()).size(WIDTH, HEIGHT).asBufferedImage();
// ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
// //此方法会造成png图片有阴影 //此方法会造成png图片有阴影
//// ImageIO.write(image, "jpg", byteArrayOutputStream); // ImageIO.write(image, "jpg", byteArrayOutputStream);
// Img.from(image).write(byteArrayOutputStream); Img.from(image).write(byteArrayOutputStream);
// byteArrayOutputStream.flush(); byteArrayOutputStream.flush();
// SysFaceEntity sysFace = new SysFaceEntity(); SysFaceEntity sysFace = new SysFaceEntity();
// sysFace.setId(IdUtil.fastSimpleUUID()); sysFace.setId(IdUtil.fastSimpleUUID());
// sysFace.setFace(byteArrayOutputStream.toByteArray()); sysFace.setFace(byteArrayOutputStream.toByteArray());
// sysFace.setFaceFeature(featureData); sysFace.setFaceFeature(featureData);
// sysFace.setIdCard(entityId); sysFace.setIdCard(entityId);
// sysFace.setPlaceId(placeId); sysFace.setPlaceId(placeId);
// sysFace.setPlaceName(placeName); sysFace.setPlaceName(placeName);
// sysFace.setCreateTime(new Date()); sysFace.setCreateTime(new Date());
// sysFace.setUpdateTime(sysFace.getCreateTime()); sysFace.setUpdateTime(sysFace.getCreateTime());
// sysFace.setDeleted(0); sysFace.setDeleted(0);
// dao.insert(sysFace); dao.insert(sysFace);
// resVO.setFace(Base64.getEncoder().encodeToString(file)); resVO.setFace(Base64.getEncoder().encodeToString(file));
// resVO.setFaceFeature(Base64.getEncoder().encodeToString(featureData)); resVO.setFaceFeature(Base64.getEncoder().encodeToString(featureData));
// resVO.setIdCard(idCard); resVO.setIdCard(idCard);
// resVO.setName(name); resVO.setName(name);
// resVO.setPhone(""); resVO.setPhone("");
// resVO.setId(sysFace.getId()); resVO.setId(sysFace.getId());
// } catch (IOException e) { } catch (IOException e) {
// log.error("提取特征失败:", e); log.error("提取特征失败:", e);
// } }
// return resVO; return resVO;
// } }
//
// @Override @Override
// public List<FaceInfoResVO> findFaceList(String placeId) throws AppException { public List<FaceInfoResVO> findFaceList(String placeId) throws AppException {
// SysFaceEntity query = new SysFaceEntity(); SysFaceEntity query = new SysFaceEntity();
// query.setPlaceId(placeId); query.setPlaceId(placeId);
// List<SysFaceEntity> sysFaceList = dao.getList(query); List<SysFaceEntity> sysFaceList = dao.getList(query);
// if(CollectionUtils.isEmpty(sysFaceList)){ if(CollectionUtils.isEmpty(sysFaceList)){
// throw new AppException("该场所无人脸数据"); throw new AppException("该场所无人脸数据");
// } }
// return sysFaceList.stream().map(o -> { return sysFaceList.stream().map(o -> {
// FaceInfoResVO resVO = new FaceInfoResVO(); FaceInfoResVO resVO = new FaceInfoResVO();
// SysIdentityEntity resVO1 = sysIdentityService.findIdEntityDetail(o.getIdCard(), 1); SysIdentityEntity resVO1 = sysIdentityService.findIdEntityDetail(o.getIdCard(), 1);
// resVO.setId(o.getId()); resVO.setId(o.getId());
// resVO.setPlaceId(o.getPlaceId()); resVO.setPlaceId(o.getPlaceId());
// resVO.setPlaceName(o.getPlaceName()); resVO.setPlaceName(o.getPlaceName());
// resVO.setCardId(resVO1.getId()); resVO.setCardId(resVO1.getId());
// resVO.setName(resVO1.getName()); resVO.setName(resVO1.getName());
// resVO.setPhone(resVO1.getPhone()); resVO.setPhone(resVO1.getPhone());
// resVO.setFace(Base64.getEncoder().encodeToString(o.getFace())); resVO.setFace(Base64.getEncoder().encodeToString(o.getFace()));
// resVO.setFaceFeature(Base64.getEncoder().encodeToString(o.getFaceFeature())); resVO.setFaceFeature(Base64.getEncoder().encodeToString(o.getFaceFeature()));
// return resVO; return resVO;
// }).collect(Collectors.toList()); }).collect(Collectors.toList());
// } }
//
// @Override @Override
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public void batchAddFace(List<MultipartFile> files, String placeId, String placeName) { public void batchAddFace(List<MultipartFile> files, String placeId, String placeName) {
// for (int j = 0; j < files.size(); j++) { for (int j = 0; j < files.size(); j++) {
// String fileName = files.get(j).getOriginalFilename(); String fileName = files.get(j).getOriginalFilename();
// if(StringUtils.isEmpty(fileName)){ if(StringUtils.isEmpty(fileName)){
// throw new AppException("文件名称(" + fileName + ")不能为空!"); throw new AppException("文件名称(" + fileName + ")不能为空!");
// } }
// String[] info = fileName.split("/"); String[] info = fileName.split("/");
// if(info.length != 2){ if(info.length != 2){
// throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!"); throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!");
// } }
// String[] infos = info[1].split("\\."); String[] infos = info[1].split("\\.");
// if(infos.length != 2){ if(infos.length != 2){
// throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!"); throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!");
// } }
// String[] strings = infos[0].split("_"); String[] strings = infos[0].split("_");
// if(strings.length != 2){ if(strings.length != 2){
// throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!"); throw new AppException("(" + fileName + ")文件命名错误,请按照规定文件模版上传!");
// } }
// uploadImage(files.get(j), strings[0], strings[1], placeId, placeName); uploadImage(files.get(j), strings[0], strings[1], placeId, placeName);
// } }
// } }
//
// private String getSdkKey() { private String getSdkKey() {
// return faceUtil.getOsName().equals("/win") ? winSdkKey : linuxSdkKey; return faceUtil.getOsName().equals("/win") ? winSdkKey : linuxSdkKey;
// } }
//
// @Override @Override
// public List<FaceInfoResVO> searchUserByFace(byte[] bytes) throws InterruptedException, ExecutionException{ public List<FaceInfoResVO> searchUserByFace(byte[] bytes) throws InterruptedException, ExecutionException{
// List<SysFaceEntity> resultFaceInfoList = Lists.newLinkedList();//识别到的人脸列表 List<SysFaceEntity> resultFaceInfoList = Lists.newLinkedList();//识别到的人脸列表
//
// byte[] faceFeature = arcsoftFaceUtil.faceFeature(bytes); byte[] faceFeature = arcsoftFaceUtil.faceFeature(bytes);
// FaceFeature targetFaceFeature = new FaceFeature(); FaceFeature targetFaceFeature = new FaceFeature();
// targetFaceFeature.setFeatureData(faceFeature); targetFaceFeature.setFeatureData(faceFeature);
// List<SysFaceEntity> faceInfoList = this.find(new SysFaceEntity()); List<SysFaceEntity> faceInfoList = this.find(new SysFaceEntity());
// List<List<SysFaceEntity>> faceUserInfoPartList = Lists.partition(faceInfoList, 1000);//分成1000一组,多线程处理 List<List<SysFaceEntity>> faceUserInfoPartList = Lists.partition(faceInfoList, 1000);//分成1000一组,多线程处理
// CompletionService<List<SysFaceEntity>> completionService = new ExecutorCompletionService(executorService); CompletionService<List<SysFaceEntity>> completionService = new ExecutorCompletionService(executorService);
// for (List<SysFaceEntity> part : faceUserInfoPartList) { for (List<SysFaceEntity> part : faceUserInfoPartList) {
// completionService.submit(new CompareFaceTask(part, targetFaceFeature)); completionService.submit(new CompareFaceTask(part, targetFaceFeature));
// } }
// for (int i = 0; i < faceUserInfoPartList.size(); i++) { for (int i = 0; i < faceUserInfoPartList.size(); i++) {
// List<SysFaceEntity> faceUserInfoList = completionService.take().get(); List<SysFaceEntity> faceUserInfoList = completionService.take().get();
// if (CollectionUtil.isNotEmpty(faceInfoList)) { if (CollectionUtil.isNotEmpty(faceInfoList)) {
// resultFaceInfoList.addAll(faceUserInfoList); resultFaceInfoList.addAll(faceUserInfoList);
// } }
// } }
//
// resultFaceInfoList.sort((h1, h2) -> h2.getSimilarValue().compareTo(h1.getSimilarValue()));//从大到小排序 resultFaceInfoList.sort((h1, h2) -> h2.getSimilarValue().compareTo(h1.getSimilarValue()));//从大到小排序
//
// return resultFaceInfoList.stream().map(o -> { return resultFaceInfoList.stream().map(o -> {
// FaceInfoResVO resVO = new FaceInfoResVO(); FaceInfoResVO resVO = new FaceInfoResVO();
// SysIdentityEntity resVO1 = sysIdentityService.findIdEntityDetail(o.getIdCard(), 1); SysIdentityEntity resVO1 = sysIdentityService.findIdEntityDetail(o.getIdCard(), 1);
// resVO.setId(o.getId()); resVO.setId(o.getId());
// resVO.setPlaceId(o.getPlaceId()); resVO.setPlaceId(o.getPlaceId());
// resVO.setPlaceName(o.getPlaceName()); resVO.setPlaceName(o.getPlaceName());
// resVO.setCardId(resVO1.getId()); resVO.setCardId(resVO1.getId());
// resVO.setName(resVO1.getName()); resVO.setName(resVO1.getName());
// resVO.setPhone(resVO1.getPhone()); resVO.setPhone(resVO1.getPhone());
// resVO.setFace(Base64.getEncoder().encodeToString(o.getFace())); resVO.setFace(Base64.getEncoder().encodeToString(o.getFace()));
// resVO.setFaceFeature(Base64.getEncoder().encodeToString(o.getFaceFeature())); resVO.setFaceFeature(Base64.getEncoder().encodeToString(o.getFaceFeature()));
// return resVO; return resVO;
// }).collect(Collectors.toList()); }).collect(Collectors.toList());
// } }
//
// private class CompareFaceTask implements Callable<List<SysFaceEntity>> { private class CompareFaceTask implements Callable<List<SysFaceEntity>> {
//
// private List<SysFaceEntity> faceUserInfoList; private List<SysFaceEntity> faceUserInfoList;
// private FaceFeature targetFaceFeature; private FaceFeature targetFaceFeature;
//
//
// public CompareFaceTask(List<SysFaceEntity> faceUserInfoList, FaceFeature targetFaceFeature) { public CompareFaceTask(List<SysFaceEntity> faceUserInfoList, FaceFeature targetFaceFeature) {
// this.faceUserInfoList = faceUserInfoList; this.faceUserInfoList = faceUserInfoList;
// this.targetFaceFeature = targetFaceFeature; this.targetFaceFeature = targetFaceFeature;
// } }
//
// @Override @Override
// public List<SysFaceEntity> call() throws Exception { public List<SysFaceEntity> call() throws Exception {
//
// return arcsoftFaceUtil.faceSearch(targetFaceFeature,faceUserInfoList); return arcsoftFaceUtil.faceSearch(targetFaceFeature,faceUserInfoList);
// } }
//
// } }
//} }
\ No newline at end of file \ No newline at end of file
//package com.mortals.xhx.module.identity.web; package com.mortals.xhx.module.identity.web;
//
//import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
//import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
//import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
//import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
//import com.mortals.xhx.module.identity.model.SysFaceEntity; import com.mortals.xhx.module.identity.model.SysFaceEntity;
//import com.mortals.xhx.module.identity.model.vo.FaceInfoResVO; import com.mortals.xhx.module.identity.model.vo.FaceInfoResVO;
//import com.mortals.xhx.module.identity.service.SysFaceService; import com.mortals.xhx.module.identity.service.SysFaceService;
//import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
//
//import java.util.HashMap; import java.util.HashMap;
//import java.util.List; import java.util.List;
//import java.util.Map; import java.util.Map;
///** /**
//* *
//* 人脸识别信息 * 人脸识别信息
//* *
//* @author zxfei * @author zxfei
//* @date 2022-08-03 * @date 2022-08-03
//*/ */
//@RestController @RestController
//@RequestMapping("face") @RequestMapping("face")
//public class SysFaceController extends BaseCRUDJsonBodyMappingController<SysFaceService,SysFaceEntity,String> { public class SysFaceController extends BaseCRUDJsonBodyMappingController<SysFaceService,SysFaceEntity,String> {
//
// public SysFaceController(){ public SysFaceController(){
// super.setModuleDesc( "人脸识别信息"); super.setModuleDesc( "人脸识别信息");
// } }
//
// @Override @Override
// protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
// super.init(model, context); super.init(model, context);
// } }
//
//
//
// @PostMapping({"uploadImage"}) @PostMapping({"uploadImage"})
// @UnAuth @UnAuth
// public String uploadImage(@RequestPart("file") MultipartFile file, public String uploadImage(@RequestPart("file") MultipartFile file,
// @RequestParam("name") String name, @RequestParam("name") String name,
// @RequestParam("idCard") String idCard, @RequestParam("idCard") String idCard,
// @RequestParam(value = "placeId") String placeId, @RequestParam(value = "placeId") String placeId,
// @RequestParam(value = "placeName") String placeName) { @RequestParam(value = "placeName") String placeName) {
// Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
// JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
// String busiDesc = "人脸特征解析"; String busiDesc = "人脸特征解析";
// Context context = this.getContext(); Context context = this.getContext();
//
// try { try {
// FaceInfoResVO resVO = service.uploadImage(file, name, idCard, placeId, placeName); FaceInfoResVO resVO = service.uploadImage(file, name, idCard, placeId, placeName);
// model.put("data",resVO); model.put("data",resVO);
// this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
// } catch (Exception var8) { } catch (Exception var8) {
// this.doException(this.request, busiDesc, model, var8); this.doException(this.request, busiDesc, model, var8);
// Object msg = model.get("message_info"); Object msg = model.get("message_info");
// return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString()); return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
// } }
//
// this.init(model, context); this.init(model, context);
// ret.put("data", model.get("data")); ret.put("data", model.get("data"));
// ret.put("code", 1); ret.put("code", 1);
// ret.put("msg", model.remove("message_info")); ret.put("msg", model.remove("message_info"));
// return ret.toJSONString(); return ret.toJSONString();
// } }
//
// @GetMapping({"findFaceList"}) @GetMapping({"findFaceList"})
// @UnAuth @UnAuth
// public String findFaceList(@RequestParam("placeId") String placeId) { public String findFaceList(@RequestParam("placeId") String placeId) {
// Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
// JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
// String busiDesc = "下发人脸列表"; String busiDesc = "下发人脸列表";
// Context context = this.getContext(); Context context = this.getContext();
// try { try {
// List<FaceInfoResVO> list = service.findFaceList(placeId); List<FaceInfoResVO> list = service.findFaceList(placeId);
// model.put("data",list); model.put("data",list);
// this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
// } catch (Exception var8) { } catch (Exception var8) {
// this.doException(this.request, busiDesc, model, var8); this.doException(this.request, busiDesc, model, var8);
// Object msg = model.get("message_info"); Object msg = model.get("message_info");
// return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString()); return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
// } }
//
// this.init(model, context); this.init(model, context);
// ret.put("data", model.get("data")); ret.put("data", model.get("data"));
// ret.put("code", 1); ret.put("code", 1);
// ret.put("msg", model.remove("message_info")); ret.put("msg", model.remove("message_info"));
// return ret.toJSONString(); return ret.toJSONString();
// } }
//
// @PostMapping({"batchAddFace"}) @PostMapping({"batchAddFace"})
// @UnAuth @UnAuth
// public String batchAddFace(@RequestPart("files") List<MultipartFile> files, public String batchAddFace(@RequestPart("files") List<MultipartFile> files,
// @RequestParam("placeId") String placeId, @RequestParam("placeId") String placeId,
// @RequestParam("placeName") String placeName) { @RequestParam("placeName") String placeName) {
// Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
// JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
// String busiDesc = "批量上传人脸"; String busiDesc = "批量上传人脸";
// Context context = this.getContext(); Context context = this.getContext();
//
// try { try {
// service.batchAddFace(files, placeId, placeName); service.batchAddFace(files, placeId, placeName);
// this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
// } catch (Exception var8) { } catch (Exception var8) {
// this.doException(this.request, busiDesc, model, var8); this.doException(this.request, busiDesc, model, var8);
// Object msg = model.get("message_info"); Object msg = model.get("message_info");
// return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString()); return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
// } }
//
// this.init(model, context); this.init(model, context);
// ret.put("data", null); ret.put("data", null);
// ret.put("code", 1); ret.put("code", 1);
// ret.put("msg", model.remove("message_info")); ret.put("msg", model.remove("message_info"));
// return ret.toJSONString(); return ret.toJSONString();
// } }
//
// @PostMapping({"search"}) @PostMapping({"search"})
// @UnAuth @UnAuth
// public String search(@RequestPart("file") MultipartFile file) { public String search(@RequestPart("file") MultipartFile file) {
// Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
// JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
// String busiDesc = "人脸识别"; String busiDesc = "人脸识别";
// Context context = this.getContext(); Context context = this.getContext();
// try { try {
// List<FaceInfoResVO> list = service.searchUserByFace(file.getBytes()); List<FaceInfoResVO> list = service.searchUserByFace(file.getBytes());
// model.put("data",list); model.put("data",list);
// this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
// } catch (Exception var8) { } catch (Exception var8) {
// this.doException(this.request, busiDesc, model, var8); this.doException(this.request, busiDesc, model, var8);
// Object msg = model.get("message_info"); Object msg = model.get("message_info");
// return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString()); return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
// } }
//
// this.init(model, context); this.init(model, context);
// ret.put("data", model.get("data")); ret.put("data", model.get("data"));
// ret.put("code", 1); ret.put("code", 1);
// ret.put("msg", model.remove("message_info")); ret.put("msg", model.remove("message_info"));
// return ret.toJSONString(); return ret.toJSONString();
// } }
//} }
\ No newline at end of file \ No newline at end of file
package com.mortals.xhx.module.matter.model; package com.mortals.xhx.module.matter.model;
import java.util.*;
import java.util.List; import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
...@@ -1694,7 +1692,7 @@ public class MatterEntity extends MatterVo { ...@@ -1694,7 +1692,7 @@ public class MatterEntity extends MatterVo {
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return Objects.hash(this.areaCode, this.matterNo);
} }
@Override @Override
...@@ -1702,7 +1700,7 @@ public class MatterEntity extends MatterVo { ...@@ -1702,7 +1700,7 @@ public class MatterEntity extends MatterVo {
if (obj == null) return false; if (obj == null) return false;
if (obj instanceof MatterEntity) { if (obj instanceof MatterEntity) {
MatterEntity tmp = (MatterEntity) obj; MatterEntity tmp = (MatterEntity) obj;
if (this.getId() == tmp.getId()) { if ((this.getAreaCode()+this.matterNo).equals(tmp.getAreaCode()+tmp.matterNo)) {
return true; return true;
} }
} }
......
...@@ -284,6 +284,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -284,6 +284,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override @Override
public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException { public Result<MatterEntity> findSubList(MatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException {
SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString()); SiteEntity siteCache = siteService.getCache(matterQuery.getSiteId().toString());
if(ObjectUtils.isEmpty(siteCache)) throw new AppException("查询站点id不能为空!");
if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) { if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) {
matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode()); matterQuery.setAreaCode(siteCache == null ? null : siteCache.getAreaCode());
} }
......
...@@ -85,7 +85,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -85,7 +85,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Override @Override
protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException { protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException {
if (!ObjectUtils.isEmpty(params.getIdNotList())) { if (!ObjectUtils.isEmpty(params.getIdNotList())) {
//排除掉已经存在的ids //排除掉已经存在的ids
log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList())); log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList()));
...@@ -103,15 +102,15 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -103,15 +102,15 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
//子节点已经全部选中,删除父节点 //子节点已经全部选中,删除父节点
iterator.remove(); iterator.remove();
pageInfo.setTotalResult(pageInfo.getTotalResult() - 1); pageInfo.setTotalResult(pageInfo.getTotalResult() - 1);
} else { } else {
childs.stream().forEach(item1 -> { childs.stream().forEach(item1 -> {
buildChildBusiness(item1); buildChildBusiness(item1);
}); });
item.setChildren(childs); item.setChildren(childs);
buildChildBusiness(item);
} }
} }
buildChildBusiness(item);
} }
} else { } else {
list.stream().peek(item -> { list.stream().peek(item -> {
...@@ -187,10 +186,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -187,10 +186,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
//删除 //删除
businessService.remove(mainIds,context); businessService.remove(mainIds,context);
} }
} }
......
...@@ -27,6 +27,7 @@ import com.mortals.xhx.module.area.model.AreaEntity; ...@@ -27,6 +27,7 @@ import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery; import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.service.AreaService; import com.mortals.xhx.module.area.service.AreaService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
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 com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
...@@ -368,14 +369,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -368,14 +369,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
private List<SiteTreeSelect> getSiteTreeSelects(String userId) { private List<SiteTreeSelect> getSiteTreeSelects(String userId) {
String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class); String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class);
log.info("userId:{},siteTreeSelectStr:{}",userId,siteTreeSelectStr); log.info("userId:{},siteTreeSelectStr:{}", userId, siteTreeSelectStr);
//反序列化树对象 //反序列化树对象
if(ObjectUtils.isEmpty(siteTreeSelectStr)){ if (ObjectUtils.isEmpty(siteTreeSelectStr)) {
return new ArrayList<>(); return new ArrayList<>();
} }
JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr); JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr);
if(ObjectUtils.isEmpty(jsonArray)){ if (ObjectUtils.isEmpty(jsonArray)) {
return new ArrayList<>(); return new ArrayList<>();
} }
List<SiteTreeSelect> collect = jsonArray.stream().map(item -> { List<SiteTreeSelect> collect = jsonArray.stream().map(item -> {
...@@ -554,32 +555,100 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -554,32 +555,100 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return Rest.ok(allList); return Rest.ok(allList);
} }
private List<MatterEntity> getMatters(HashMap<String, String> params, Context context) {
String url = GlobalSysInfo.getParamValue(Constant.GOV_MATTER_PAGELIST_URL, "http://www.sczwfw.gov.cn/jiq/interface/item/tags");
Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterCount(params, url);
if (restStat.getCode() == YesNoEnum.YES.getValue()) {
Integer pageNum = restStat.getData().getOrDefault("pageNum", 0);
Integer total = restStat.getData().getOrDefault("total", 0);
//获取事项全列表
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
return matterAllRest.getData();
}
}
return new ArrayList<MatterEntity>();
}
@Override @Override
public Rest<String> syncMatterBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncMatterBySiteId(SiteEntity siteEntity, Context context) {
//根据站点中区域编码 查询当前是否已经存在事项 //根据站点中区域编码 查询当前是否已经存在事项
//根据站点区域编码查询政务网事项列表 //根据站点区域编码查询政务网事项列表
AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode()); AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode());
String dxType = AreaLevelDxTypeEnum.getByValue(areaEntity == null ? 2 : areaEntity.getAreaLevel()).getDesc(); //String dxType = AreaLevelDxTypeEnum.getByValue(areaEntity == null ? 2 : areaEntity.getAreaLevel()).getDesc();
String url = GlobalSysInfo.getParamValue(Constant.GOV_MATTER_PAGELIST_URL, "http://www.sczwfw.gov.cn/jiq/interface/item/tags"); // String dxType="2";
//String dxType = "3";
List<MatterEntity> govMatterList = new ArrayList<>();
List<DeptEntity> deptEntities = deptService.find(new DeptQuery().siteId(siteEntity.getId()).source(0));
for (DeptEntity deptEntity : deptEntities) {
HashMap<String, String> params = new HashMap<>(); HashMap<String, String> params = new HashMap<>();
params.put("areaCode", areaEntity.getAreaCode());
params.put("dxType", "6");
params.put("deptCode", deptEntity.getDeptNumber());
params.put("searchtext", "");
params.put("taskType", "");
List<MatterEntity> deptMatterList = this.getMatters(params, context);
if (!ObjectUtils.isEmpty(deptMatterList)) {
govMatterList.addAll(deptMatterList);
}
}
/* HashMap<String, String> params = new HashMap<>();
params.put("dxType", dxType); params.put("dxType", dxType);
params.put("areaCode", siteEntity.getAreaCode()); params.put("areaCode", siteEntity.getAreaCode());
params.put("deptCode", ""); params.put("deptCode", "");
params.put("searchtext", ""); params.put("searchtext", "");
params.put("taskType", ""); params.put("taskType", "");
params.put("pageno", "1"); params.put("pageno", "1");
params.put("type", "2");
Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterCount(params, url); List<MatterEntity> govMatterList = this.getMatters(params, context);
dxType = "3";
params = new HashMap<>();
params.put("dxType", dxType);
params.put("areaCode", siteEntity.getAreaCode());
params.put("deptCode", "");
params.put("searchtext", "");
params.put("taskType", "");
params.put("pageno", "1");
params.put("type", "2");
List<MatterEntity> mattersTwo = this.getMatters(params, context);
govMatterList.addAll(mattersTwo);*/
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
log.info("抓取事项总数:{}需要添加事项数量:{}", govMatterList.size(), subList.size());
subList = subList.stream().distinct().collect(Collectors.toList());
log.info("需要添加事项过滤后数量:{}" , subList.size());
//差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) {
for (MatterEntity matterEntity : subList) {
DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterService.save(matterEntity, context);
}
/* List<List<MatterEntity>> partition = ListUtil.partition(subList, 100);
for (List<MatterEntity> matterEntityList : partition) {
log.info("insert subList size:" + matterEntityList.size());
int count = matterService.save(matterEntityList, context);
log.info("insert subList size success:" + count);
}*/
}
/* Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterDeptCount(params, url);
if (restStat.getCode() == YesNoEnum.YES.getValue()) { if (restStat.getCode() == YesNoEnum.YES.getValue()) {
Integer pageNum = restStat.getData().getOrDefault("pageNum", 0); Integer pageNum = restStat.getData().getOrDefault("pageNum", 0);
Integer total = restStat.getData().getOrDefault("total", 0); Integer total = restStat.getData().getOrDefault("total", 0);
//获取事项全列表 //获取事项全列表
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context); Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (total != matterAllRest.getData().size()) {
log.warn(String.format("抓取事项数量不一致,抓取计划:%d条 ,实际抓取:%d条", total, matterAllRest.getData().size()));
}
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) { if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> govMatterList = matterAllRest.getData(); List<MatterEntity> govMatterList = matterAllRest.getData();
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode())); List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
...@@ -602,7 +671,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -602,7 +671,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
} }
} }
} }
*/
return Rest.ok("同步事项条数成功!"); return Rest.ok("同步事项条数成功!");
} }
......
...@@ -41,9 +41,6 @@ import java.util.regex.Pattern; ...@@ -41,9 +41,6 @@ import java.util.regex.Pattern;
@Service("siteThemeService") @Service("siteThemeService")
public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, SiteThemeEntity, Long> implements SiteThemeService { public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, SiteThemeEntity, Long> implements SiteThemeService {
@Autowired
private SiteService siteService;
@Override @Override
public Rest<String> syncThemeBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncThemeBySiteId(SiteEntity siteEntity, Context context) {
...@@ -151,16 +148,21 @@ public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, ...@@ -151,16 +148,21 @@ public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao,
public static void main(String[] args) { public static void main(String[] args) {
String str = "changeTheme('005', '1')"; String str = "ywblurl('http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&amp;itemCode=511A0141700000-511500000000-000-125112007566044888-1-00&amp;taskType=1&amp;deptCode=511501-17','在公路增设或改造平面交叉道口审批')";
/*
String reg = "'.*?'"; String reg = "'.*?'";
Pattern compile = Pattern.compile(reg); Pattern compile = Pattern.compile(reg);
*/
List<String> allGroups = ReUtil.findAllGroup0(compile, str); List<String> allGroups = ReUtil.findAllGroup0("'(.*?)'", str);
allGroups.forEach(item -> { allGroups.forEach(item -> {
System.out.println(item); // System.out.println(item);
}); });
System.out.println(allGroups.get(0));
} }
} }
\ No newline at end of file
...@@ -184,7 +184,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -184,7 +184,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
private void pushChangeMsg(Long windowId) { private void pushChangeMsg(Long windowId) {
log.info("pushChangeMsg:{}", JSON.toJSONString(windowId)); // log.info("pushChangeMsg:{}", JSON.toJSONString(windowId));
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090"); String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090");
phpUrl += "/api/window/winNameChange"; phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>(); HashMap<String, Object> paramsMap = new HashMap<>();
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="total" column="total" />
</resultMap> </resultMap>
...@@ -96,23 +97,26 @@ ...@@ -96,23 +97,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('total') or colPickMode == 1 and data.containsKey('total')))">
a.total,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DeptEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="DeptEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_dept insert into mortals_sys_dept
(tid,tname,name,simpleName,siteId,deptAbb,deptTelphone,deptNumber,isAutotable,isOrder,isBkb,isWorkGuide,usValid,isSecphone,isEnglish,sort,source,createTime,createUserId,updateTime) (tid,tname,name,simpleName,siteId,deptAbb,deptTelphone,deptNumber,isAutotable,isOrder,isBkb,isWorkGuide,usValid,isSecphone,isEnglish,sort,source,createTime,createUserId,updateTime,total)
VALUES VALUES
(#{tid},#{tname},#{name},#{simpleName},#{siteId},#{deptAbb},#{deptTelphone},#{deptNumber},#{isAutotable},#{isOrder},#{isBkb},#{isWorkGuide},#{usValid},#{isSecphone},#{isEnglish},#{sort},#{source},#{createTime},#{createUserId},#{updateTime}) (#{tid},#{tname},#{name},#{simpleName},#{siteId},#{deptAbb},#{deptTelphone},#{deptNumber},#{isAutotable},#{isOrder},#{isBkb},#{isWorkGuide},#{usValid},#{isSecphone},#{isEnglish},#{sort},#{source},#{createTime},#{createUserId},#{updateTime},#{total})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_dept insert into mortals_sys_dept
(tid,tname,name,simpleName,siteId,deptAbb,deptTelphone,deptNumber,isAutotable,isOrder,isBkb,isWorkGuide,usValid,isSecphone,isEnglish,sort,source,createTime,createUserId,updateTime) (tid,tname,name,simpleName,siteId,deptAbb,deptTelphone,deptNumber,isAutotable,isOrder,isBkb,isWorkGuide,usValid,isSecphone,isEnglish,sort,source,createTime,createUserId,updateTime,total)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.tid},#{item.tname},#{item.name},#{item.simpleName},#{item.siteId},#{item.deptAbb},#{item.deptTelphone},#{item.deptNumber},#{item.isAutotable},#{item.isOrder},#{item.isBkb},#{item.isWorkGuide},#{item.usValid},#{item.isSecphone},#{item.isEnglish},#{item.sort},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.tid},#{item.tname},#{item.name},#{item.simpleName},#{item.siteId},#{item.deptAbb},#{item.deptTelphone},#{item.deptNumber},#{item.isAutotable},#{item.isOrder},#{item.isBkb},#{item.isWorkGuide},#{item.usValid},#{item.isSecphone},#{item.isEnglish},#{item.sort},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.total})
</foreach> </foreach>
</insert> </insert>
...@@ -215,6 +219,12 @@ ...@@ -215,6 +219,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('total')) or (colPickMode==1 and !data.containsKey('total'))">
a.total=#{data.total},
</if>
<if test="(colPickMode==0 and data.containsKey('totalIncrement')) or (colPickMode==1 and !data.containsKey('totalIncrement'))">
a.total=ifnull(a.total,0) + #{data.totalIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -422,6 +432,18 @@ ...@@ -422,6 +432,18 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="total=(case" suffix="ELSE total end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('total')) or (colPickMode==1 and !item.containsKey('total'))">
when a.id=#{item.id} then #{item.total}
</when>
<when test="(colPickMode==0 and item.containsKey('totalIncrement')) or (colPickMode==1 and !item.containsKey('totalIncrement'))">
when a.id=#{item.id} then ifnull(a.total,0) + #{item.totalIncrement}
</when>
</choose>
</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=")">
...@@ -546,12 +568,18 @@ ...@@ -546,12 +568,18 @@
${_conditionType_} a.id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('idList')"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in ${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if> </if>
...@@ -568,12 +596,18 @@ ...@@ -568,12 +596,18 @@
${_conditionType_} a.tid is null ${_conditionType_} a.tid is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('tidList')"> <if test="conditionParamRef.containsKey('tidList') and conditionParamRef.tidList.size() > 0">
${_conditionType_} a.tid in ${_conditionType_} a.tid in
<foreach collection="conditionParamRef.tidList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.tidList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('tidNotList') and conditionParamRef.tidNotList.size() > 0">
${_conditionType_} a.tid not in
<foreach collection="conditionParamRef.tidNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('tname')"> <if test="conditionParamRef.containsKey('tname')">
<if test="conditionParamRef.tname != null and conditionParamRef.tname != ''"> <if test="conditionParamRef.tname != null and conditionParamRef.tname != ''">
...@@ -583,12 +617,18 @@ ...@@ -583,12 +617,18 @@
${_conditionType_} a.tname is null ${_conditionType_} a.tname is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('tnameList')"> <if test="conditionParamRef.containsKey('tnameList') and conditionParamRef.tnameList.size() > 0">
${_conditionType_} a.tname in ${_conditionType_} a.tname in
<foreach collection="conditionParamRef.tnameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.tnameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('tnameNotList') and conditionParamRef.tnameNotList.size() > 0">
${_conditionType_} a.tname not in
<foreach collection="conditionParamRef.tnameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('name')"> <if test="conditionParamRef.containsKey('name')">
<if test="conditionParamRef.name != null and conditionParamRef.name != ''"> <if test="conditionParamRef.name != null and conditionParamRef.name != ''">
...@@ -598,12 +638,18 @@ ...@@ -598,12 +638,18 @@
${_conditionType_} a.name is null ${_conditionType_} a.name is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('nameList')"> <if test="conditionParamRef.containsKey('nameList') and conditionParamRef.nameList.size() > 0">
${_conditionType_} a.name in ${_conditionType_} a.name in
<foreach collection="conditionParamRef.nameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.nameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('nameNotList') and conditionParamRef.nameNotList.size() > 0">
${_conditionType_} a.name not in
<foreach collection="conditionParamRef.nameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('simpleName')"> <if test="conditionParamRef.containsKey('simpleName')">
<if test="conditionParamRef.simpleName != null and conditionParamRef.simpleName != ''"> <if test="conditionParamRef.simpleName != null and conditionParamRef.simpleName != ''">
...@@ -613,12 +659,18 @@ ...@@ -613,12 +659,18 @@
${_conditionType_} a.simpleName is null ${_conditionType_} a.simpleName is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('simpleNameList')"> <if test="conditionParamRef.containsKey('simpleNameList') and conditionParamRef.simpleNameList.size() > 0">
${_conditionType_} a.simpleName in ${_conditionType_} a.simpleName in
<foreach collection="conditionParamRef.simpleNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.simpleNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('simpleNameNotList') and conditionParamRef.simpleNameNotList.size() > 0">
${_conditionType_} a.simpleName not in
<foreach collection="conditionParamRef.simpleNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteId')"> <if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null "> <if test="conditionParamRef.siteId != null ">
${_conditionType_} a.siteId = #{${_conditionParam_}.siteId} ${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
...@@ -627,12 +679,18 @@ ...@@ -627,12 +679,18 @@
${_conditionType_} a.siteId is null ${_conditionType_} a.siteId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdList')"> <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in ${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null"> <if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart} ${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if> </if>
...@@ -649,12 +707,18 @@ ...@@ -649,12 +707,18 @@
${_conditionType_} a.deptAbb is null ${_conditionType_} a.deptAbb is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptAbbList')"> <if test="conditionParamRef.containsKey('deptAbbList') and conditionParamRef.deptAbbList.size() > 0">
${_conditionType_} a.deptAbb in ${_conditionType_} a.deptAbb in
<foreach collection="conditionParamRef.deptAbbList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptAbbList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptAbbNotList') and conditionParamRef.deptAbbNotList.size() > 0">
${_conditionType_} a.deptAbb not in
<foreach collection="conditionParamRef.deptAbbNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptTelphone')"> <if test="conditionParamRef.containsKey('deptTelphone')">
<if test="conditionParamRef.deptTelphone != null and conditionParamRef.deptTelphone != ''"> <if test="conditionParamRef.deptTelphone != null and conditionParamRef.deptTelphone != ''">
...@@ -664,12 +728,18 @@ ...@@ -664,12 +728,18 @@
${_conditionType_} a.deptTelphone is null ${_conditionType_} a.deptTelphone is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptTelphoneList')"> <if test="conditionParamRef.containsKey('deptTelphoneList') and conditionParamRef.deptTelphoneList.size() > 0">
${_conditionType_} a.deptTelphone in ${_conditionType_} a.deptTelphone in
<foreach collection="conditionParamRef.deptTelphoneList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptTelphoneList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptTelphoneNotList') and conditionParamRef.deptTelphoneNotList.size() > 0">
${_conditionType_} a.deptTelphone not in
<foreach collection="conditionParamRef.deptTelphoneNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptNumber')"> <if test="conditionParamRef.containsKey('deptNumber')">
<if test="conditionParamRef.deptNumber != null and conditionParamRef.deptNumber != ''"> <if test="conditionParamRef.deptNumber != null and conditionParamRef.deptNumber != ''">
...@@ -679,12 +749,18 @@ ...@@ -679,12 +749,18 @@
${_conditionType_} a.deptNumber is null ${_conditionType_} a.deptNumber is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('deptNumberList')"> <if test="conditionParamRef.containsKey('deptNumberList') and conditionParamRef.deptNumberList.size() > 0">
${_conditionType_} a.deptNumber in ${_conditionType_} a.deptNumber in
<foreach collection="conditionParamRef.deptNumberList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.deptNumberList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptNumberNotList') and conditionParamRef.deptNumberNotList.size() > 0">
${_conditionType_} a.deptNumber not in
<foreach collection="conditionParamRef.deptNumberNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isAutotable')"> <if test="conditionParamRef.containsKey('isAutotable')">
<if test="conditionParamRef.isAutotable != null "> <if test="conditionParamRef.isAutotable != null ">
${_conditionType_} a.isAutotable = #{${_conditionParam_}.isAutotable} ${_conditionType_} a.isAutotable = #{${_conditionParam_}.isAutotable}
...@@ -693,12 +769,18 @@ ...@@ -693,12 +769,18 @@
${_conditionType_} a.isAutotable is null ${_conditionType_} a.isAutotable is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isAutotableList')"> <if test="conditionParamRef.containsKey('isAutotableList') and conditionParamRef.isAutotableList.size() > 0">
${_conditionType_} a.isAutotable in ${_conditionType_} a.isAutotable in
<foreach collection="conditionParamRef.isAutotableList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isAutotableList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isAutotableNotList') and conditionParamRef.isAutotableNotList.size() > 0">
${_conditionType_} a.isAutotable not in
<foreach collection="conditionParamRef.isAutotableNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isAutotableStart') and conditionParamRef.isAutotableStart != null"> <if test="conditionParamRef.containsKey('isAutotableStart') and conditionParamRef.isAutotableStart != null">
${_conditionType_} a.isAutotable <![CDATA[ >= ]]> #{${_conditionParam_}.isAutotableStart} ${_conditionType_} a.isAutotable <![CDATA[ >= ]]> #{${_conditionParam_}.isAutotableStart}
</if> </if>
...@@ -714,12 +796,18 @@ ...@@ -714,12 +796,18 @@
${_conditionType_} a.isOrder is null ${_conditionType_} a.isOrder is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isOrderList')"> <if test="conditionParamRef.containsKey('isOrderList') and conditionParamRef.isOrderList.size() > 0">
${_conditionType_} a.isOrder in ${_conditionType_} a.isOrder in
<foreach collection="conditionParamRef.isOrderList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isOrderList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isOrderNotList') and conditionParamRef.isOrderNotList.size() > 0">
${_conditionType_} a.isOrder not in
<foreach collection="conditionParamRef.isOrderNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isOrderStart') and conditionParamRef.isOrderStart != null"> <if test="conditionParamRef.containsKey('isOrderStart') and conditionParamRef.isOrderStart != null">
${_conditionType_} a.isOrder <![CDATA[ >= ]]> #{${_conditionParam_}.isOrderStart} ${_conditionType_} a.isOrder <![CDATA[ >= ]]> #{${_conditionParam_}.isOrderStart}
</if> </if>
...@@ -735,12 +823,18 @@ ...@@ -735,12 +823,18 @@
${_conditionType_} a.isBkb is null ${_conditionType_} a.isBkb is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isBkbList')"> <if test="conditionParamRef.containsKey('isBkbList') and conditionParamRef.isBkbList.size() > 0">
${_conditionType_} a.isBkb in ${_conditionType_} a.isBkb in
<foreach collection="conditionParamRef.isBkbList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isBkbList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isBkbNotList') and conditionParamRef.isBkbNotList.size() > 0">
${_conditionType_} a.isBkb not in
<foreach collection="conditionParamRef.isBkbNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isBkbStart') and conditionParamRef.isBkbStart != null"> <if test="conditionParamRef.containsKey('isBkbStart') and conditionParamRef.isBkbStart != null">
${_conditionType_} a.isBkb <![CDATA[ >= ]]> #{${_conditionParam_}.isBkbStart} ${_conditionType_} a.isBkb <![CDATA[ >= ]]> #{${_conditionParam_}.isBkbStart}
</if> </if>
...@@ -756,12 +850,18 @@ ...@@ -756,12 +850,18 @@
${_conditionType_} a.isWorkGuide is null ${_conditionType_} a.isWorkGuide is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isWorkGuideList')"> <if test="conditionParamRef.containsKey('isWorkGuideList') and conditionParamRef.isWorkGuideList.size() > 0">
${_conditionType_} a.isWorkGuide in ${_conditionType_} a.isWorkGuide in
<foreach collection="conditionParamRef.isWorkGuideList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isWorkGuideList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isWorkGuideNotList') and conditionParamRef.isWorkGuideNotList.size() > 0">
${_conditionType_} a.isWorkGuide not in
<foreach collection="conditionParamRef.isWorkGuideNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isWorkGuideStart') and conditionParamRef.isWorkGuideStart != null"> <if test="conditionParamRef.containsKey('isWorkGuideStart') and conditionParamRef.isWorkGuideStart != null">
${_conditionType_} a.isWorkGuide <![CDATA[ >= ]]> #{${_conditionParam_}.isWorkGuideStart} ${_conditionType_} a.isWorkGuide <![CDATA[ >= ]]> #{${_conditionParam_}.isWorkGuideStart}
</if> </if>
...@@ -777,12 +877,18 @@ ...@@ -777,12 +877,18 @@
${_conditionType_} a.usValid is null ${_conditionType_} a.usValid is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('usValidList')"> <if test="conditionParamRef.containsKey('usValidList') and conditionParamRef.usValidList.size() > 0">
${_conditionType_} a.usValid in ${_conditionType_} a.usValid in
<foreach collection="conditionParamRef.usValidList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.usValidList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('usValidNotList') and conditionParamRef.usValidNotList.size() > 0">
${_conditionType_} a.usValid not in
<foreach collection="conditionParamRef.usValidNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('usValidStart') and conditionParamRef.usValidStart != null"> <if test="conditionParamRef.containsKey('usValidStart') and conditionParamRef.usValidStart != null">
${_conditionType_} a.usValid <![CDATA[ >= ]]> #{${_conditionParam_}.usValidStart} ${_conditionType_} a.usValid <![CDATA[ >= ]]> #{${_conditionParam_}.usValidStart}
</if> </if>
...@@ -798,12 +904,18 @@ ...@@ -798,12 +904,18 @@
${_conditionType_} a.isSecphone is null ${_conditionType_} a.isSecphone is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isSecphoneList')"> <if test="conditionParamRef.containsKey('isSecphoneList') and conditionParamRef.isSecphoneList.size() > 0">
${_conditionType_} a.isSecphone in ${_conditionType_} a.isSecphone in
<foreach collection="conditionParamRef.isSecphoneList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isSecphoneList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isSecphoneNotList') and conditionParamRef.isSecphoneNotList.size() > 0">
${_conditionType_} a.isSecphone not in
<foreach collection="conditionParamRef.isSecphoneNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isSecphoneStart') and conditionParamRef.isSecphoneStart != null"> <if test="conditionParamRef.containsKey('isSecphoneStart') and conditionParamRef.isSecphoneStart != null">
${_conditionType_} a.isSecphone <![CDATA[ >= ]]> #{${_conditionParam_}.isSecphoneStart} ${_conditionType_} a.isSecphone <![CDATA[ >= ]]> #{${_conditionParam_}.isSecphoneStart}
</if> </if>
...@@ -819,12 +931,18 @@ ...@@ -819,12 +931,18 @@
${_conditionType_} a.isEnglish is null ${_conditionType_} a.isEnglish is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isEnglishList')"> <if test="conditionParamRef.containsKey('isEnglishList') and conditionParamRef.isEnglishList.size() > 0">
${_conditionType_} a.isEnglish in ${_conditionType_} a.isEnglish in
<foreach collection="conditionParamRef.isEnglishList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.isEnglishList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isEnglishNotList') and conditionParamRef.isEnglishNotList.size() > 0">
${_conditionType_} a.isEnglish not in
<foreach collection="conditionParamRef.isEnglishNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('isEnglishStart') and conditionParamRef.isEnglishStart != null"> <if test="conditionParamRef.containsKey('isEnglishStart') and conditionParamRef.isEnglishStart != null">
${_conditionType_} a.isEnglish <![CDATA[ >= ]]> #{${_conditionParam_}.isEnglishStart} ${_conditionType_} a.isEnglish <![CDATA[ >= ]]> #{${_conditionParam_}.isEnglishStart}
</if> </if>
...@@ -840,12 +958,18 @@ ...@@ -840,12 +958,18 @@
${_conditionType_} a.sort is null ${_conditionType_} a.sort is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('sortList')"> <if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0">
${_conditionType_} a.sort in ${_conditionType_} a.sort in
<foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('sortNotList') and conditionParamRef.sortNotList.size() > 0">
${_conditionType_} a.sort not in
<foreach collection="conditionParamRef.sortNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null"> <if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null">
${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart} ${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart}
</if> </if>
...@@ -861,12 +985,18 @@ ...@@ -861,12 +985,18 @@
${_conditionType_} a.source is null ${_conditionType_} a.source is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('sourceList')"> <if test="conditionParamRef.containsKey('sourceList') and conditionParamRef.sourceList.size() > 0">
${_conditionType_} a.source in ${_conditionType_} a.source in
<foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('sourceNotList') and conditionParamRef.sourceNotList.size() > 0">
${_conditionType_} a.source not in
<foreach collection="conditionParamRef.sourceNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sourceStart') and conditionParamRef.sourceStart != null"> <if test="conditionParamRef.containsKey('sourceStart') and conditionParamRef.sourceStart != null">
${_conditionType_} a.source <![CDATA[ >= ]]> #{${_conditionParam_}.sourceStart} ${_conditionType_} a.source <![CDATA[ >= ]]> #{${_conditionParam_}.sourceStart}
</if> </if>
...@@ -897,12 +1027,18 @@ ...@@ -897,12 +1027,18 @@
${_conditionType_} a.createUserId is null ${_conditionType_} a.createUserId is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdList')"> <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in ${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if> </if>
...@@ -925,6 +1061,33 @@ ...@@ -925,6 +1061,33 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('total')">
<if test="conditionParamRef.total != null ">
${_conditionType_} a.total = #{${_conditionParam_}.total}
</if>
<if test="conditionParamRef.total == null">
${_conditionType_} a.total is null
</if>
</if>
<if test="conditionParamRef.containsKey('totalList') and conditionParamRef.totalList.size() > 0">
${_conditionType_} a.total in
<foreach collection="conditionParamRef.totalList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('totalNotList') and conditionParamRef.totalNotList.size() > 0">
${_conditionType_} a.total not in
<foreach collection="conditionParamRef.totalNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('totalStart') and conditionParamRef.totalStart != null">
${_conditionType_} a.total <![CDATA[ >= ]]> #{${_conditionParam_}.totalStart}
</if>
<if test="conditionParamRef.containsKey('totalEnd') and conditionParamRef.totalEnd != null">
${_conditionType_} a.total <![CDATA[ <= ]]> #{${_conditionParam_}.totalEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1043,6 +1206,11 @@ ...@@ -1043,6 +1206,11 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('total')">
a.total
<if test='orderCol.total != null and "DESC".equalsIgnoreCase(orderCol.total)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
LEFT JOIN ( SELECT matterCode FROM mortals_sys_site_matter LEFT JOIN ( SELECT matterCode FROM mortals_sys_site_matter
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
<if test="condition.siteId!=null and condition.siteId!=''"> <if test="condition.siteId!=null and condition.siteId!=''">
where siteId = #{condition.siteId,jdbcType=VARCHAR} where siteId = #{condition.siteId}
</if> </if>
</trim> </trim>
)AS b ON a.matterNo = b.matterCode )AS b ON a.matterNo = b.matterCode
......
...@@ -19,7 +19,7 @@ Content-Type: application/json ...@@ -19,7 +19,7 @@ Content-Type: application/json
{ {
"siteId":1, "siteId":1,
"idList": [1,2,3,4], "idList": [2,10,5,14,13,3,7,9,1],
"type": 1, "type": 1,
"shelves": 1, "shelves": 1,
"page":1, "page":1,
......
...@@ -50,7 +50,7 @@ Accept: application/json ...@@ -50,7 +50,7 @@ Accept: application/json
###区域查看 ###区域查看
GET {{baseUrl}}/area/getListByRootId?rootId=6182157d00ce41559e001a89d87f4057 GET {{baseUrl}}/area/getListByRootId?rootId=0
Accept: application/json Accept: application/json
......
...@@ -4,9 +4,7 @@ POST {{baseUrl}}/dept/list ...@@ -4,9 +4,7 @@ POST {{baseUrl}}/dept/list
Content-Type: application/json Content-Type: application/json
{ {
"name":"qwudiq" , "filter":1 ,
"deptAbb":"zudynx" ,
"deptNumber":"w2q60e" ,
"page":1, "page":1,
"size":10 "size":10
} }
......
...@@ -14,16 +14,17 @@ Content-Type: application/json ...@@ -14,16 +14,17 @@ Content-Type: application/json
###节假日更新与保存 ###节假日更新与保存
POST {{baseUrl}}/holiday/save POST {{baseUrl}}/holiday/save
Authorization: {{authToken}}
Content-Type: application/json Content-Type: application/json
{ {
"siteId":3374, "siteId":1,
"name":"rlubyj", "name":"rlubyj",
"summary":"70cuql", "summary":"70cuql",
"year":2788, "year":2023,
"startTime":"2022-01-20", "startTime":"2022-01-20",
"endTime":"2022-01-20", "endTime":"2022-01-20",
"workorholiday":9809 "workorholiday":1
} }
> {% > {%
......
...@@ -84,6 +84,15 @@ Content-Type: application/json ...@@ -84,6 +84,15 @@ Content-Type: application/json
{} {}
###midsign
POST {{baseUrl}}/mid/sign
Content-Type: application/json
{
"method":"post",
"body":"{\"test\":\"哈哈哈\"}"
}
###短信设置编辑 ###短信设置编辑
GET {{baseUrl}}/sms/set/edit?id={{SmsSet_id}} GET {{baseUrl}}/sms/set/edit?id={{SmsSet_id}}
Accept: application/json Accept: application/json
......
...@@ -4,7 +4,6 @@ POST {{baseUrl}}/window/business/list ...@@ -4,7 +4,6 @@ POST {{baseUrl}}/window/business/list
Content-Type: application/json Content-Type: application/json
{ {
"siteBusinessId":58,
"page":1, "page":1,
"size":10 "size":10
} }
......
...@@ -13,14 +13,6 @@ POST {{baseUrl}}/workman/list ...@@ -13,14 +13,6 @@ POST {{baseUrl}}/workman/list
Content-Type: application/json Content-Type: application/json
{ {
"deptId":6389 ,
"deptName":"ne8rqn" ,
"windowId":4325 ,
"windowName":"xrj91w" ,
"siteId":6949 ,
"siteName":"ifug3n" ,
"name":"fujlcs" ,
"number":"kpg7fk" ,
"page":1, "page":1,
"size":10 "size":10
} }
......
package com.mortals.xhx.common.pdu.app;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* appPdu对象
*
* @author zxfei
* @date 2022-10-26
*/
@Data
public class AppPdu {
/**
* appId
*/
private Long appId;
}
\ No newline at end of file
package com.mortals.xhx.feign.app.device;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.pdu.app.AppPdu;
import com.mortals.xhx.feign.IFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 设备 Feign接口
*
* @author zxfei
* @date 2022-10-26
*/
@FeignClient(name = "sst-manager", path = "/sst", fallbackFactory = AppFeignFallbackFactory.class)
public interface IAppFeign extends IFeign {
/**
* 设备保存更新
*
* @param appPdu
* @return
*/
@PostMapping(value = "/apps/forbidden")
Rest<Void> forbidden(@RequestBody AppPdu appPdu);
}
@Slf4j
@Component
class AppFeignFallbackFactory implements FallbackFactory<IAppFeign> {
@Override
public IAppFeign create(Throwable t) {
return new IAppFeign() {
@Override
public Rest<Void> forbidden(AppPdu appPdu) {
return Rest.fail("暂时无法通知,请稍后再试!");
}
};
}
}
...@@ -25,12 +25,10 @@ public class MessageProducer implements IMessageProduceService { ...@@ -25,12 +25,10 @@ public class MessageProducer implements IMessageProduceService {
private RabbitTemplate rabbitTemplate; private RabbitTemplate rabbitTemplate;
public void syncAccessSend(AccessLogPdu accessLogPdu) { public void syncAccessSend(AccessLogPdu accessLogPdu) {
// new Message()
//new Message(JSON.toJSONString(accessLogPdu).getBytes(StandardCharsets.UTF_8)) //new Message(JSON.toJSONString(accessLogPdu).getBytes(StandardCharsets.UTF_8))
rabbitTemplate.send(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE,new Message(JSON.toJSONString(accessLogPdu).getBytes(StandardCharsets.UTF_8))); //rabbitTemplate.send(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE,new Message(JSON.toJSONString(accessLogPdu).getBytes(StandardCharsets.UTF_8)));
//rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, JSON.toJSONString(accessLogPdu)); rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, JSON.toJSONString(accessLogPdu));
//rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, accessLogPdu); //rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, accessLogPdu);
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL let baseURL = process.env.VUE_APP_API_BASE_URL;
let BASEURL = process.env.VUE_APP_API_PHP_URL let BASEURL = process.env.VUE_APP_API_PHP_URL;
// 1.15.1. 获取站点下的数据管理列表 // 1.15.1. 获取站点下的数据管理列表
export function censusListInterface(params) { export function censusListInterface(params) {
return http.post(`${baseURL}/zwfw/site/model/census/list`, params); return http.post(`${baseURL}/zwfw/site/model/census/list`, params);
} }
/* 排号机部分 */ /* 排号机部分 */
//排号机列表数据 //排号机列表数据
export function getTaskList(params) { export function getTaskList(params) {
return http.get(`${BASEURL}/admin/take/takelist`, params) return http.get(`${BASEURL}/admin/take/takelist`, params);
} }
//排队办理记录报表接口 //排队办理记录报表接口
export function getQueueData(params) { export function getQueueData(params) {
return http.post(`${BASEURL}/inter/reportform/quelist`, params) return http.post(`${BASEURL}/inter/reportform/quelist`, params);
} }
//排号记录详情 //排号记录详情
export function getQueueInfo(params) { export function getQueueInfo(params) {
return http.post(`${BASEURL}/inter/reportform/queinfo`, params) return http.post(`${BASEURL}/inter/reportform/queinfo`, params);
} }
//业务事项关联 //业务事项关联
export function getBusinessEvent(params) { export function getBusinessEvent(params) {
return http.get(`${BASEURL}/inter/reportform/busanalyse`, params) return http.get(`${BASEURL}/inter/reportform/busanalyse`, params);
} }
//查询业务人员信息 //查询业务人员信息
export function getWorkerInfo(params){ export function getWorkerInfo(params) {
return http.get(`${baseURL}/basics_api/base/workman/info`,params) return http.get(`${baseURL}/base/workman/info`, params);
} }
...@@ -36,38 +34,38 @@ export function getOptonList(params){ ...@@ -36,38 +34,38 @@ export function getOptonList(params){
return http.post(`${BASEURL}/bkb/bkbset/optionlist`,params) return http.post(`${BASEURL}/bkb/bkbset/optionlist`,params)
} }
//评价数据列表 //评价数据列表
export function getEvaList(params){ export function getEvaList(params) {
return http.post(`${BASEURL}/bkb/evaluate/evaluatelist`,params) return http.post(`${BASEURL}/bkb/evaluate/evaluatelist`, params);
} }
// 评价数据详情 // 评价数据详情
export function getEvaData(params){ export function getEvaData(params) {
return http.get(`${BASEURL}/bkb/evaluate/evaluatinfo`,params) return http.get(`${BASEURL}/bkb/evaluate/evaluatinfo`, params);
} }
// 评价数据删除 // 评价数据删除
export function getEvaDetil(params){ export function getEvaDetil(params) {
return http.get(`${BASEURL}/bkb/evaluate/evaluatedl`,params) return http.get(`${BASEURL}/bkb/evaluate/evaluatedl`, params);
} }
// 排号评价详情 // 排号评价详情
export function getQueEvaData(params){ export function getQueEvaData(params) {
return http.get(`${BASEURL}/bkb/evaluate/queEvaluateInfo`,params) return http.get(`${BASEURL}/bkb/evaluate/queEvaluateInfo`, params);
} }
// 短信月度账单 // 短信月度账单
export function getSMSList(params){ export function getSMSList(params) {
return http.get(`${BASEURL}/inter/Recharge/smsMonthList`,params) return http.get(`${BASEURL}/inter/Recharge/smsMonthList`, params);
} }
// 网络理政列表 // 网络理政列表
export function getWLLZList(params){ export function getWLLZList(params) {
return http.get(`${BASEURL}/wllz/index/list`,params) return http.get(`${BASEURL}/wllz/index/list`, params);
} }
// 网络理政统计 // 网络理政统计
export function getWLLZCount(params){ export function getWLLZCount(params) {
return http.post(`${BASEURL}/wllz/complainapi/statisticsComplain`,params) return http.post(`${BASEURL}/wllz/complainapi/statisticsComplain`, params);
} }
// 网络理政详情 // 网络理政详情
export function getWLLZInfo(params){ export function getWLLZInfo(params) {
return http.get(`${BASEURL}/wllz/index/complainInfo`,params) return http.get(`${BASEURL}/wllz/index/complainInfo`, params);
} }
// 样表列表 // 样表列表
...@@ -82,22 +80,19 @@ export function getPrintList(params) { ...@@ -82,22 +80,19 @@ export function getPrintList(params) {
//查询业务人员业务数据分析 //查询业务人员业务数据分析
export function getWorkmananalyse(params) { export function getWorkmananalyse(params) {
return http.get(`${BASEURL}/inter/reportform/workmananalyse`, params) return http.get(`${BASEURL}/inter/reportform/workmananalyse`, params);
} }
//查询用户信息 //查询用户信息
export function getPeopleanalyse(params) { export function getPeopleanalyse(params) {
return http.get(`${BASEURL}/inter/reportform/peopleanalyse`, params) return http.get(`${BASEURL}/inter/reportform/peopleanalyse`, params);
} }
/* 呼叫部分 */ /* 呼叫部分 */
// 呼叫器列表 // 呼叫器列表
export function getCalllist(params) { export function getCalllist(params) {
return http.get(`${baseURL}/zwfw_api/admin/call/calllist`, params) return http.get(`${BASEURL}/admin/call/calllist`, params);
} }
// 呼叫记录报表 // 呼叫记录报表
export function getCallQueList(params) { export function getCallQueList(params) {
return http.post(`${BASEURL}/inter/reportform/callQueList`, params) return http.post(`${BASEURL}/inter/reportform/callQueList`, params);
} }
// 导出表格数据
const ExportJsonExcel = require("js-export-excel");
/**
* 导出excel
* @param {导出的表头名信息} tHeader
* @param {导出的表头字段名,需要导出表格字段名} filterVal
* @param {导出数据} list
* @param {导出文件名称} fileName
*/
export const export2Excel = (tHeader, filterVal, list, fileName) => {
let option = {
fileName,
datas: [
{
sheetData: list,
sheetName: "sheet",
sheetFilter: filterVal,
sheetHeader: tHeader,
// columnWidths: columnWidths, // 列宽
},
],
};
let toExcel = new ExportJsonExcel(option);
toExcel.saveExcel(); //保存
};
...@@ -2,18 +2,30 @@ ...@@ -2,18 +2,30 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>累计发送短信量:<i>{{allCount}}</i></b> <b
>累计发送短信量:<i>{{ allCount }}</i></b
>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select :value="nowSite" @change="changeSite"> <a-select :value="nowSite" @change="changeSite">
<a-select-option v-for="item in siteList" :key="item.value" :value="item.value"> {{item.label}} </a-select-option> <a-select-option
v-for="item in siteList"
:key="item.value"
:value="item.value"
>
{{ item.label }}
</a-select-option>
</a-select> </a-select>
<a-button type="primary" @click="togetSMSList()">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
...@@ -33,8 +45,12 @@ ...@@ -33,8 +45,12 @@
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="tableSourceData" :dataSource="tableSourceData"
> >
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="gotoSMSSystem()">查看明细</a-button> <a-button type="link" @click="gotoSMSSystem">查看明细</a-button>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -43,20 +59,22 @@ ...@@ -43,20 +59,22 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import {getSMSList} from "@/api/dataAdmin" import { export2Excel } from "@/utils/js/exportExcel";
import { getSMSList } from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuePickUpRecord", name: "PortalAdminVuePickUpRecord",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "月度时间", title: "月度时间",
...@@ -86,99 +104,120 @@ export default { ...@@ -86,99 +104,120 @@ export default {
}, },
], ],
searchName: undefined, searchName: undefined,
nowSite:null, nowSite: null,
siteList:[], siteList: [],
allCount:0 allCount: 0,
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"月度时间",
"发送量",
"账单生成时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"month",
"send_num",
"update_time",
],
}; };
}, },
components: {}, components: {},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getSiteData() this.getSiteData();
this.togetSMSList() this.togetSMSList();
}, },
methods: { methods: {
//导出 gotoSMSSystem() {
toexportTable() { window.open("http://sms.wx3.com.cn/admin", "_blank");
let tableData = [];
if (this.tableSelectedRows.length == 0) {
// 获取表信息
getSMSList({
siteid:this.nowSite,
page:1,
size:-1,
}).then((res)=>{
const {code,data} = res
if(code==1){
tableData = JSON.parse(JSON.stringify(data.list.data));
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
})
} else {
tableData = JSON.parse(JSON.stringify(this.tableSelectedRows));
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
}, },
gotoSMSSystem(){ changeSite(e) {
window.location.href="http://sms.wx3.com.cn/admin" this.nowSite = e;
},
changeSite(e){
this.nowSite = e
}, },
// 获取当前站点和站点列表 // 获取当前站点和站点列表
getSiteData(){ getSiteData() {
this.nowSite = JSON.parse(localStorage.getItem('siteId')) this.nowSite = JSON.parse(localStorage.getItem("siteId"));
this.siteList = [] this.siteList = [];
JSON.parse(localStorage.getItem('siteList')).forEach(item => { JSON.parse(localStorage.getItem("siteList")).forEach((item) => {
this.siteList.push({ this.siteList.push({
label:item.siteName, label: item.siteName,
value:item.id value: item.id,
}) });
}); });
}, },
togetSMSList(){ // 搜索
handleSearch() {
this.tablePagination = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetSMSList();
},
togetSMSList() {
// 获取表信息 // 获取表信息
getSMSList({ getSMSList({
siteid:this.nowSite, siteid: this.nowSite,
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
}).then((res)=>{ }).then((res) => {
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
console.log(res); console.log(res);
this.tableSourceData = data.list.data this.tableSourceData = data.list.data;
this.allCount=data.all_num this.allCount = data.all_num;
this.tablePagination.total = data.list.total this.tablePagination.total = data.list.total;
} }
});
},
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
}) })
} .filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetSMSList() this.btnLoading = true;
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"短信记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getSMSList({
siteid: this.nowSite,
page: 1,
size: -1,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.list.data.length) return;
export2Excel(
this.tHeader,
this.filterVal,
data.list.data,
"短信记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} }
} });
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetSMSList();
},
},
}; };
</script> </script>
...@@ -187,7 +226,7 @@ export default { ...@@ -187,7 +226,7 @@ export default {
display: block; display: block;
} }
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -208,8 +247,7 @@ export default { ...@@ -208,8 +247,7 @@ export default {
} }
} }
} }
} }
</style> </style>
<template> <template>
<<<<<<< HEAD
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
...@@ -24,11 +25,64 @@ ...@@ -24,11 +25,64 @@
<a-select-option value="5"> 好差评 </a-select-option> <a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
=======
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<a-button type="danger" @click="delTable">
<span>批量删除</span>
</a-button>
<b
>评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div>
<span>
<a-space>
<a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select>
<a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<a-select-option value="1"> 窗口评价 </a-select-option>
<a-select-option value="2"> 自助服务终端 </a-select-option>
<a-select-option value="3"> 背靠背评价 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option>
</a-select>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> :allowClear="false"
format="YYYY-MM-DD"
class="range_picker_style"
valueFormat="YYYY-MM-DD"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<<<<<<< HEAD
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -57,12 +111,64 @@ ...@@ -57,12 +111,64 @@
{{content}} {{content}}
</a-modal> </a-modal>
</div> </div>
=======
<a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template>
<template slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370">删除</a-button>
<a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template>
</a-table>
<HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div>
</div> </div>
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
<<<<<<< HEAD
import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin";
export default { export default {
...@@ -264,90 +370,279 @@ export default { ...@@ -264,90 +370,279 @@ export default {
this.exportExcel(tableColumns, newTableData, exprotExcelName); this.exportExcel(tableColumns, newTableData, exprotExcelName);
} }
=======
import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default {
mixins: [table],
name: "departmentEvaluation",
data() {
return {
btnLoading: false,
tableHeaders: [
{
title: "序号",
width: "60px",
align: "center",
scopedSlots: {
customRender: "index",
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
},
{
title: "部门名称",
align: "center",
customRender: (text) => {
return text.section ? text.section : "--";
},
},
{
title: "评价选项",
align: "center",
dataIndex: "option_id",
},
{
title: "评价人",
align: "center",
customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
},
{
title: "身份证号",
align: "center",
customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
},
{
title: "手机号",
align: "center",
customRender: (text) => {
return text.phone ? text.phone : "--";
},
},
{
title: "评价时间",
align: "center",
dataIndex: "create_time",
},
{
title: "评价来源",
align: "center",
dataIndex: "pjxt",
customRender: (text, record, index) => {
if (text == 1) {
return "窗口评价";
} else if (text == 2) {
return "自助服务终端";
} else if (text == 3) {
return "背靠背评价";
} else if (text == 4) {
return "微官网";
} else if (text == 5) {
return "好差评";
} else {
return "一体化评价";
}
},
},
{
title: "评价设备",
align: "center",
dataIndex: "source",
customRender: (text, record, index) => {
if (text == 1) {
return "安卓";
} else if (text == 2) {
return "导视机";
} else {
return "微信";
}
},
},
{
title: "评价人照片",
align: "center",
dataIndex: "picture",
scopedSlots: {
customRender: "评价人照片",
},
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
}, },
delTable(){ ],
BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined,
//删除窗口判断
visible: false,
tableSourceData: [],
evaCount: 0, //评价次数
evaChoose: [], //评价选项
evaFrom: [0], // 评价来源
evaDates: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
], // 评价日期
content: "此操作将删除该评价信息,是否继续?",
delId: null, //当前删除id
tHeader: [
// 导出的表头名信息
"部门名称",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"section",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
tableSelectedKeys: [],
tableSelectedRows: [],
};
},
components: {
HandlingDetails,
},
mounted() {
this.setMoment();
this.togetevalist();
},
methods: {
delTable() {
// console.log(this.tableSelectedRows); // console.log(this.tableSelectedRows);
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) <<<<<<< HEAD
},
created(){
this.baseurl = process.env.VUE_APP_API_PHP_URL
}
=======
});
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((res) => {
console.log(res); console.log(res);
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
this.$refs.HandlingDetails.queEvaData = data this.$refs.HandlingDetails.queEvaData = data;
} }
}) });
}, },
togetEvaData(id){ togetEvaData(id) {
getEvaData({ getEvaData({
id:id id: id,
}).then(res=>{ }).then((res) => {
console.log(res); const { code, data } = res;
const {code,data} = res if (code == 1) {
if(code==1){ this.$refs.HandlingDetails.queEvaData = data;
this.$refs.HandlingDetails.queEvaData = data
} }
}) });
}, },
togetevalist(){ // 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
},
togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ getEvaList({
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type:'bmpj', type: "bmpj",
option_id:chooseStr, option_id: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
console.log(11111,res); const { code, data } = res;
const{code,data} = res; if (code == 1) {
if(code == 1){ this.tableSourceData = data.data.data;
this.tableSourceData = data.data.data this.evaCount = data.count;
this.evaCount = data.count this.tablePagination.total = data.count;
this.tablePagination.total = data.count
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
}, },
rangePickerChange(val) { rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] this.evaDates = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -370,7 +665,7 @@ export default { ...@@ -370,7 +665,7 @@ export default {
// }else{ // }else{
this.$refs.HandlingDetails.modalInfo.title = "评价详情"; this.$refs.HandlingDetails.modalInfo.title = "评价详情";
this.$refs.HandlingDetails.modalInfo.show = 2; this.$refs.HandlingDetails.modalInfo.show = 2;
this.togetEvaData(record.id) this.togetEvaData(record.id);
// } // }
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
...@@ -378,17 +673,87 @@ export default { ...@@ -378,17 +673,87 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetevalist() this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
} }
}, });
created(){ });
this.baseurl = process.env.VUE_APP_API_PHP_URL export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "bmpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"办事部门评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} }
});
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetevalist();
},
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
}; };
</script> </script>
...@@ -403,7 +768,7 @@ export default { ...@@ -403,7 +768,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
<template> <template>
<<<<<<< HEAD
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
...@@ -24,11 +25,64 @@ ...@@ -24,11 +25,64 @@
<a-select-option value="5"> 好差评 </a-select-option> <a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
=======
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<a-button type="danger" @click="delTable">
<span>批量删除</span>
</a-button>
<b
>评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div>
<span>
<a-space>
<a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select>
<a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<a-select-option value="1"> 窗口评价 </a-select-option>
<a-select-option value="2"> 自助服务终端 </a-select-option>
<a-select-option value="3"> 背靠背评价 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option>
</a-select>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> allowClear
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<<<<<<< HEAD
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -57,12 +111,70 @@ ...@@ -57,12 +111,70 @@
{{content}} {{content}}
</a-modal> </a-modal>
</div> </div>
=======
<a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template>
<template slot="操作" slot-scope="text, record">
<a-button
type="link"
style="color: #ff7370"
@click="showModal(record)"
>删除</a-button
>
<a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template>
</a-table>
<HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div>
</div> </div>
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
<<<<<<< HEAD
import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin";
export default { export default {
...@@ -264,91 +376,270 @@ export default { ...@@ -264,91 +376,270 @@ export default {
this.exportExcel(tableColumns, newTableData, exprotExcelName); this.exportExcel(tableColumns, newTableData, exprotExcelName);
} }
=======
import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default {
mixins: [table],
name: "matterEvaluation",
data() {
return {
btnLoading: false,
tableHeaders: [
{
title: "序号",
width: "60px",
align: "center",
scopedSlots: {
customRender: "index",
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
},
{
title: "排队编号",
align: "center",
customRender: (text) => {
return text.flounum ? text.flounum : "--";
},
},
{
title: "评价选项",
align: "center",
dataIndex: "option_id",
}, },
delTable(){ {
title: "评价人",
align: "center",
customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
},
{
title: "身份证号",
align: "center",
customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
},
{
title: "手机号",
align: "center",
customRender: (text) => {
return text.phone ? text.phone : "--";
},
},
{
title: "评价时间",
align: "center",
dataIndex: "create_time",
},
{
title: "评价来源",
align: "center",
dataIndex: "pjxt",
customRender: (text, record, index) => {
if (text == 1) {
return "窗口评价";
} else if (text == 2) {
return "自助服务终端";
} else if (text == 3) {
return "背靠背评价";
} else if (text == 4) {
return "微官网";
} else if (text == 5) {
return "好差评";
} else {
return "一体化评价";
}
},
},
{
title: "评价设备",
align: "center",
dataIndex: "source",
customRender: (text, record, index) => {
if (text == 1) {
return "安卓";
} else if (text == 2) {
return "导视机";
} else {
return "微信";
}
},
},
{
title: "评价人照片",
align: "center",
dataIndex: "picture",
scopedSlots: {
customRender: "评价人照片",
},
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
},
],
BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined,
//删除窗口判断
visible: false,
tableSourceData: [],
evaCount: 0, //评价次数
evaChoose: [], //评价选项
evaFrom: [0], // 评价来源
evaDates: [], // 评价日期
content: "此操作将删除该评价信息,是否继续?",
delId: null, //当前删除id
tHeader: [
// 导出的表头名信息
"排队编号",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flounum",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
tableSelectedKeys: [],
tableSelectedRows: [],
};
},
components: {
HandlingDetails,
},
mounted() {
this.setMoment();
this.togetevalist();
},
methods: {
delTable() {
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) <<<<<<< HEAD
},
created(){
this.baseurl = process.env.VUE_APP_API_PHP_URL
}
=======
});
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((res) => {
console.log(res); console.log(res);
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
this.$refs.HandlingDetails.queEvaData = data this.$refs.HandlingDetails.queEvaData = data;
} }
}) });
}, },
togetEvaData(id){ togetEvaData(id) {
getEvaData({ getEvaData({
id:id id: id,
}).then(res=>{ }).then((res) => {
console.log(res); const { code, data } = res;
const {code,data} = res if (code == 1) {
if(code==1){ this.$refs.HandlingDetails.queEvaData = data;
this.$refs.HandlingDetails.queEvaData = data
} }
}) });
}, },
togetevalist(){ // 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
},
togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ getEvaList({
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type:'phpj', type: "phpj",
option_id:chooseStr, option_id: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
console.log(11111,res); const { code, data } = res;
const{code,data} = res; if (code == 1) {
if(code == 1){ this.tableSourceData = data.data.data;
this.tableSourceData = data.data.data this.evaCount = data.count;
this.evaCount = data.count this.tablePagination.total = data.count;
this.tablePagination.total = data.count
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
},
rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -366,7 +657,7 @@ export default { ...@@ -366,7 +657,7 @@ export default {
// if(record.pjxt==1){ // if(record.pjxt==1){
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.show = 1; this.$refs.HandlingDetails.modalInfo.show = 1;
this.togetQueEvaData(record) this.togetQueEvaData(record);
// }else{ // }else{
// this.$refs.HandlingDetails.modalInfo.title = "评价详情"; // this.$refs.HandlingDetails.modalInfo.title = "评价详情";
// this.$refs.HandlingDetails.modalInfo.show = 2; // this.$refs.HandlingDetails.modalInfo.show = 2;
...@@ -378,17 +669,88 @@ export default { ...@@ -378,17 +669,88 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
}, },
watch:{ // 导出
tablePagination(){ async handleExportTable() {
this.togetevalist() this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
} }
}, });
created(){ });
this.baseurl = process.env.VUE_APP_API_PHP_URL export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"办理事项评价评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "phpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"办理事项评价评价记录报表" +
this.$moment().format("YYYYMMDDHHmmss")
);
} }
});
}
this.btnLoading = false;
},
},
watch: {
tablePagination() {
this.togetevalist();
},
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
}; };
</script> </script>
...@@ -403,7 +765,7 @@ export default { ...@@ -403,7 +765,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
<template> <template>
<<<<<<< HEAD
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
...@@ -24,11 +25,63 @@ ...@@ -24,11 +25,63 @@
<a-select-option value="5"> 好差评 </a-select-option> <a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option> <a-select-option value="6"> 一体化评价 </a-select-option>
</a-select> </a-select>
=======
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
type="success"
:loading="btnLoading"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<a-button type="danger" @click="delTable">
<span>批量删除</span>
</a-button>
<b
>评价次数:<i>{{ evaCount }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div>
<span>
<a-space>
<a-select
placeholder="全部评价"
@change="changeEvaChoose"
mode="multiple"
>
<a-select-option value="非常满意"> 非常满意 </a-select-option>
<a-select-option value="基本满意"> 基本满意 </a-select-option>
<a-select-option value="满意"> 满意 </a-select-option>
<a-select-option value="不满意"> 不满意 </a-select-option>
<a-select-option value="非常不满意"> 非常不满意 </a-select-option>
</a-select>
<a-select
placeholder="全部来源"
@change="changeEvaFrom"
mode="multiple"
>
<a-select-option value="1"> 窗口评价 </a-select-option>
<a-select-option value="2"> 自助服务终端 </a-select-option>
<a-select-option value="3"> 背靠背评价 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 好差评 </a-select-option>
<a-select-option value="6"> 一体化评价 </a-select-option>
</a-select>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
<a-range-picker :allowClear="false" format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker> </a-range-picker>
<<<<<<< HEAD
<a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
...@@ -57,12 +110,70 @@ ...@@ -57,12 +110,70 @@
{{content}} {{content}}
</a-modal> </a-modal>
</div> </div>
=======
<a-input v-model="searchName" placeholder="请输入内容搜索搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text" shape="square" :size="40" icon="user" />
<img
v-else
:src="process.env.VUE_APP_API_BASE_URL + text"
alt=""
srcset=""
/>
</template>
<template slot="操作" slot-scope="text, record">
<a-button
type="link"
style="color: #ff7370"
@click="showModal(record)"
>删除</a-button
>
<a-button type="link" @click="openHandlingDetails(record)"
>详情</a-button
>
</template>
</a-table>
<HandlingDetails ref="HandlingDetails" />
<a-modal v-model="visible" title="系统提示" @ok="togetEvaDetil()">
{{ content }}
</a-modal>
</div>
</div> </div>
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
<<<<<<< HEAD
import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin"; import { getOptonList, getEvaList, getEvaData, getEvaDetil, getQueEvaData } from "@/api/dataAdmin";
export default { export default {
...@@ -262,86 +373,260 @@ export default { ...@@ -262,86 +373,260 @@ export default {
this.exportExcel(tableColumns, newTableData, exprotExcelName); this.exportExcel(tableColumns, newTableData, exprotExcelName);
} }
=======
import {
getEvaList,
getEvaData,
getEvaDetil,
getQueEvaData,
} from "@/api/dataAdmin";
export default {
mixins: [table],
name: "windowsEvaluation",
data() {
return {
btnLoading: false,
tableHeaders: [
{
title: "序号",
width: "60px",
align: "center",
scopedSlots: {
customRender: "index",
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
},
{
title: "窗口编号",
align: "center",
dataIndex: "flounum",
},
{
title: "评价选项",
align: "center",
dataIndex: "option_id",
},
{
title: "评价人",
align: "center",
customRender: (text) => {
return text.idcard_Name ? text.idcard_Name : "--";
},
},
{
title: "身份证号",
align: "center",
customRender: (text) => {
return text.idcard_IDCardNo ? text.idcard_IDCardNo : "--";
},
},
{
title: "手机号",
align: "center",
customRender: (text) => {
return text.phone ? text.phone : "--";
},
},
{
title: "评价时间",
align: "center",
dataIndex: "create_time",
},
{
title: "评价来源",
align: "center",
dataIndex: "pjxt",
customRender: (text, record, index) => {
if (text == 1) {
return "窗口评价";
} else if (text == 2) {
return "自助服务终端";
} else if (text == 3) {
return "背靠背评价";
} else if (text == 4) {
return "微官网";
} else if (text == 5) {
return "好差评";
} else {
return "一体化评价";
}
}, },
delTable(){ },
{
title: "评价设备",
align: "center",
dataIndex: "source",
customRender: (text, record, index) => {
if (text == 1) {
return "安卓";
} else if (text == 2) {
return "导视机";
} else {
return "微信";
}
},
},
{
title: "评价人照片",
align: "center",
dataIndex: "picture",
scopedSlots: {
customRender: "评价人照片",
},
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
},
],
BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
], // 评价日期
searchName: undefined, // 搜索内容
//删除窗口判断
visible: false,
tableSourceData: [],
evaCount: 0, //评价次数
evaChoose: [], //评价选项
evaFrom: [0], // 评价来源
// evaDates: [], // 评价日期
content: "此操作将删除该评价信息,是否继续?",
delId: null, //当前删除id
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"窗口编号",
"评价选项",
"评价人",
"身份证号码",
"手机号",
"评价时间",
"评价来源",
"评价设备",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flounum",
"option_id",
"idcard_Name",
"idcard_IDCardNo",
"phone",
"create_time",
"pjxt",
"source",
],
};
},
components: {
HandlingDetails,
},
mounted() {
this.setMoment();
this.togetevalist();
},
methods: {
delTable() {
this.visible = true; this.visible = true;
if(!this.tableSelectedRows.length){ if (!this.tableSelectedRows.length) {
this.content = '一条评论都没有选中' this.content = "一条评论都没有选中";
}else{ } else {
this.content = '此操作将删除这些评价信息,是否继续?' this.content = "此操作将删除这些评价信息,是否继续?";
let arr = [] let arr = [];
this.tableSelectedRows.forEach(item => { this.tableSelectedRows.forEach((item) => {
arr.push(item.id) arr.push(item.id);
}); });
this.delId = arr this.delId = arr;
} }
}, },
togetEvaDetil(){ togetEvaDetil() {
getEvaDetil({ getEvaDetil({
id:this.delId id: this.delId,
}).then(res=>{ }).then((res) => {
{ {
this.delId=null this.delId = null;
this.visible = false; this.visible = false;
// 要刷新页面 // 要刷新页面
this.togetevalist() this.togetevalist();
} }
}) });
}, },
togetQueEvaData(record){ togetQueEvaData(record) {
getQueEvaData({ getQueEvaData({
id:record.id id: record.id,
}).then(res=>{ }).then((res) => {
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
this.$refs.HandlingDetails.queEvaData = data this.$refs.HandlingDetails.queEvaData = data;
} }
}) });
}, },
togetEvaData(id){ togetEvaData(id) {
getEvaData({ getEvaData({
id:id id: id,
}).then(res=>{ }).then((res) => {
const {code,data} = res const { code, data } = res;
if(code==1){ if (code == 1) {
this.$refs.HandlingDetails.queEvaData = data this.$refs.HandlingDetails.queEvaData = data;
} }
}) });
}, },
togetevalist(){ // 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetevalist();
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = "";
this.togetevalist();
},
togetevalist() {
// 拼接评价选项 // 拼接评价选项
let chooseStr = this.evaChoose.join(',') let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源 // 要先拼接评价来源
let fromString = this.evaFrom.join(',') let fromString = this.evaFrom.join(",");
getEvaList({ getEvaList({
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
type:'ckpj', type: "ckpj",
option_id:chooseStr, option_id: chooseStr,
pjxt:fromString,//传0代表全部 pjxt: fromString, //传0代表全部
time:this.evaDates, time: this.BegindAndEndTime,
info:this.searchName info: this.searchName,
}).then((res)=>{ }).then((res) => {
const{code,data} = res; const { code, data } = res;
if(code == 1){ if (code == 1) {
this.tableSourceData = data.data.data this.tableSourceData = data.data.data;
this.evaCount = data.count this.evaCount = data.count;
this.tablePagination.total = data.count this.tablePagination.total = data.count;
} }
}) });
}, },
changeEvaFrom(val){ changeEvaFrom(val) {
if(val.length){ if (val.length) {
this.evaFrom = val; this.evaFrom = val;
}else{ } else {
this.evaFrom = [0] this.evaFrom = [0];
} }
}, },
changeEvaChoose(val){ changeEvaChoose(val) {
this.evaChoose = val this.evaChoose = val;
},
rangePickerChange(val) {
this.evaDates = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
}, },
QueueState(type) { QueueState(type) {
...@@ -358,14 +643,14 @@ export default { ...@@ -358,14 +643,14 @@ export default {
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
// 判断为窗口屏或者其他状况,调用不同接口 // 判断为窗口屏或者其他状况,调用不同接口
if(record.pjxt==1){ if (record.pjxt == 1) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.show = 1; this.$refs.HandlingDetails.modalInfo.show = 1;
this.togetQueEvaData(record) this.togetQueEvaData(record);
}else{ } else {
this.$refs.HandlingDetails.modalInfo.title = "评价详情"; this.$refs.HandlingDetails.modalInfo.title = "评价详情";
this.$refs.HandlingDetails.modalInfo.show = 2; this.$refs.HandlingDetails.modalInfo.show = 2;
this.togetEvaData(record.id) this.togetEvaData(record.id);
} }
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
...@@ -373,9 +658,81 @@ export default { ...@@ -373,9 +658,81 @@ export default {
//删除模态框 //删除模态框
showModal(record) { showModal(record) {
this.visible = true; this.visible = true;
this.delId = record.id this.delId = record.id;
},
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
}, },
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "窗口评价",
2: "自助服务终端",
3: "背靠背评价",
4: "微官网",
5: "好差评",
6: "一体化评价",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.pjxt == keys) {
item.pjxt = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
// 拼接评价选项
let chooseStr = this.evaChoose.join(",");
// 要先拼接评价来源
let fromString = this.evaFrom.join(",");
getEvaList({
page: 1,
size: -1,
type: "ckpj",
option_id: chooseStr,
pjxt: fromString, //传0代表全部
time: this.BegindAndEndTime,
info: this.searchName,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.data.length) return;
for (let item of data.data.data) {
Object.keys(obj).forEach((key) => {
if (item.pjxt == key) {
item.pjxt = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data.data.data,
"窗口服务评价记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
}, },
<<<<<<< HEAD
watch:{ watch:{
tablePagination(){ tablePagination(){
this.togetevalist() this.togetevalist()
...@@ -384,6 +741,14 @@ export default { ...@@ -384,6 +741,14 @@ export default {
created(){ created(){
this.baseurl = process.env.VUE_APP_API_PHP_URL this.baseurl = process.env.VUE_APP_API_PHP_URL
} }
=======
},
watch: {
tablePagination() {
this.togetevalist();
},
},
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
}; };
</script> </script>
...@@ -398,10 +763,36 @@ export default { ...@@ -398,10 +763,36 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
<<<<<<< HEAD
&>div { &>div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
=======
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
}
}
sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
>>>>>>> faec875196e6e37db13be22ad308b1e9549236cb
}
} }
} }
</style> </style>
......
...@@ -2,58 +2,89 @@ ...@@ -2,58 +2,89 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>填单次数:<i>{{tablePagination.total}}</i></b> <b
<sub>统计时间段:{{BegindAndEndTime[0]}}~{{BegindAndEndTime[1]}}</sub> >填单次数:<i>{{ tablePagination.total }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}</sub
>
</div> </div>
<span> <span>
<a-space> <a-space>
<!-- <a-input-group compact> --> <!-- <a-input-group compact> -->
<a-select :default-value="1" style="width:25%" @change="changeSearchType"> <a-select
<a-select-option :value="1"> :default-value="1"
按事项 style="width: 25%"
</a-select-option> @change="changeSearchType"
<a-select-option :value="2"> >
按材料 <a-select-option :value="1"> 按事项 </a-select-option>
</a-select-option> <a-select-option :value="2"> 按材料 </a-select-option>
</a-select> </a-select>
<a-input style="width:73%" v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<!-- </a-input-group> -->
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange">
</a-range-picker>
<a-select placeholder="全部状态" @change="changeStatu"> <a-select placeholder="全部状态" @change="changeStatu">
<a-select-option :value="0"> 全部类型 </a-select-option> <a-select-option :value="0"> 全部类型 </a-select-option>
<a-select-option :value="1"> 打印 </a-select-option> <a-select-option :value="1"> 本地打印 </a-select-option>
<a-select-option :value="2"> 在线提交 </a-select-option> <a-select-option :value="2"> 在线提交 </a-select-option>
</a-select> </a-select>
<a-button type="primary" @click="togetPrintList">搜索</a-button> <a-input v-model="searchName" placeholder="请输入名称搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<!-- </a-input-group> -->
<a-range-picker
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
v-model="BegindAndEndTime"
>
</a-range-picker>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
<template slot="事项名称" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="事项名称" slot-scope="text, record">
<div> <div>
{{record.matterName?record.matterName:'--'}} {{ record.matterName ? record.matterName : "--" }}
</div> </div>
<div class="tabFont"> <div class="tabFont">
事项全称:{{record.matterFullName?record.matterFullName:"--"}} 事项全称:{{ record.matterFullName ? record.matterFullName : "--" }}
</div> </div>
</template> </template>
<template slot="材料名称" slot-scope="text, record, index"> <template slot="材料名称" slot-scope="text, record">
<div> <div>
{{record.materialName?record.materialName:'--'}} {{ record.materialName ? record.materialName : "--" }}
</div> </div>
<div class="tabFont"> <div class="tabFont">
样表全称:{{record.materialFullName?record.materialFullName:"--"}} 样表全称:{{
record.materialFullName ? record.materialFullName : "--"
}}
</div> </div>
</template> </template>
</a-table> </a-table>
...@@ -64,21 +95,21 @@ ...@@ -64,21 +95,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { getPrintList } from "@/api/dataAdmin"; import { getPrintList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "fillForm", name: "fillForm",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "事项名称", title: "事项名称",
...@@ -101,29 +132,36 @@ export default { ...@@ -101,29 +132,36 @@ export default {
{ {
title: "用户姓名", title: "用户姓名",
align: "center", align: "center",
dataIndex: "idName", customRender: (text) => {
return text.idName ? text.idName : "--";
},
}, },
{ {
title: "身份证号", title: "身份证号",
align: "center", align: "center",
dataIndex: "idCard", customRender: (text) => {
return text.idCard ? text.idCard : "--";
},
}, },
{ {
title: "手机号码", title: "手机号码",
align: "center", align: "center",
dataIndex: "mobile", customRender: (text) => {
return text.mobile ? text.mobile : "--";
},
}, },
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "deviceName", customRender: (text) => {
return text.deviceName ? text.deviceName : "--";
},
}, },
{ {
title: "结果类型", title: "结果类型",
align: "center", align: "center",
dataIndex: "type",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'本地打印':'在线打印' return text == 1 ? "本地打印" : "在线提交";
}, },
}, },
{ {
...@@ -137,123 +175,105 @@ export default { ...@@ -137,123 +175,105 @@ export default {
// dataIndex: "累计耗时", // dataIndex: "累计耗时",
// }, // },
], ],
BegindAndEndTime: [], BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
],
searchName: undefined, searchName: undefined,
searchType:1, searchType: 1,
siteId:undefined, siteId: JSON.parse(localStorage.getItem("siteId")),
statu:undefined statu: undefined,
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"事项简称",
"事项全称",
"材料简称",
"材料全称",
"用户姓名",
"身份证号码",
"手机号码",
"设备名称",
"结果类型",
"操作时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"matterName",
"matterFullName",
"materialName",
"materialFullName",
"idName",
"idCard",
"mobile",
"deviceName",
"type",
"createTime",
],
}; };
}, },
components: { components: {},
},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.BegindAndEndTime=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] this.togetPrintList();
this.siteId = JSON.parse(localStorage.getItem('siteId')) },
this.togetPrintList() watch: {
tablePagination() {
this.togetPrintList();
}, },
watch:{
tablePagination(){
this.togetPrintList()
}
}, },
methods: { methods: {
//导出 changeStatu(val) {
toexportTable() { this.statu = val;
let tableData = [];
if (this.tableSelectedRows.length == 0) {
let pramse = {
page:this.tablePagination.current,
size:this.tablePagination.pageSize,
siteId:this.siteId,
matterName:"%%",
materialName:"%%",
createTimeStart:this.BegindAndEndTime[0],
createTimeEnd:this.BegindAndEndTime[1],
}
if(this.statu && this.statu!=0){
pramse.type=this.statu
}
if(this.searchType==1 && this.searchName){
pramse.matterName = '%'+this.searchName+'%'
}else if(this.searchName){
pramse.materialName='%'+this.searchName+'%'
}
getPrintList(pramse).then((res)=>{
const{code,data} = res;
if(code == 1){
tableData = JSON.parse(JSON.stringify(data.data));
tableData.forEach(item => {
item.type = item.type==1?"本地打印":"在线打印"
});
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
})
} else {
tableData = JSON.parse(JSON.stringify(this.tableSelectedRows));
tableData.forEach(item => {
item.type = item.type==1?"本地打印":"在线打印"
});
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
}, },
changeStatu(val){ changeSearchType(val) {
this.statu = val this.searchType = val;
}, },
changeSearchType(val){ handleSearch() {
this.searchType = val this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetPrintList();
}, },
togetPrintList(){ togetPrintList() {
let pramse = { let pramse = {
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
siteId:this.siteId, siteId: this.siteId,
matterName:"%%", matterName: "%%",
materialName:"%%", materialName: "%%",
createTimeStart:this.BegindAndEndTime[0], createTimeStart: this.BegindAndEndTime[0],
createTimeEnd:this.BegindAndEndTime[1], createTimeEnd: this.BegindAndEndTime[1],
} };
if(this.statu && this.statu!=0){ if (this.statu && this.statu != 0) {
pramse.type=this.statu pramse.type = this.statu;
} }
if(this.searchType==1 && this.searchName){ if (this.searchType == 1 && this.searchName) {
pramse.matterName = '%'+this.searchName+'%' pramse.matterName = "%" + this.searchName + "%";
}else if(this.searchName){ } else if (this.searchName) {
pramse.materialName='%'+this.searchName+'%' pramse.materialName = "%" + this.searchName + "%";
} }
getPrintList(pramse).then((res)=>{ getPrintList(pramse).then((res) => {
const{code,data} = res; const { code, data } = res;
if(code==1){ if (code == 1) {
console.log(res); this.tableSourceData = data.data;
this.tableSourceData = data.data this.tablePagination.total = data.total;
this.tablePagination.total = data.total
} }
}) });
}, },
rangePickerChange(val) { // 重置
this.BegindAndEndTime=[this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] handleReset() {
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = undefined;
this.searchType = 1;
this.statu = undefined;
this.tablePagination.current = 1;
this.togetPrintList();
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -265,7 +285,79 @@ export default { ...@@ -265,7 +285,79 @@ export default {
return "type0"; return "type0";
} }
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
handleExportTable() {
this.btnLoading = true;
let obj = {
1: "本地打印",
2: "在线提交",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
let pramse = {
page: 1,
size: -1,
siteId: this.siteId,
matterName: "%%",
materialName: "%%",
createTimeStart: this.BegindAndEndTime[0],
createTimeEnd: this.BegindAndEndTime[1],
};
if (this.statu && this.statu != 0) {
pramse.type = this.statu;
}
if (this.searchType == 1 && this.searchName) {
pramse.matterName = "%" + this.searchName + "%";
} else if (this.searchName) {
pramse.materialName = "%" + this.searchName + "%";
}
getPrintList(pramse).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.length) return;
for (let item of data.data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data.data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -281,7 +373,7 @@ export default { ...@@ -281,7 +373,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -2,16 +2,27 @@ ...@@ -2,16 +2,27 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable"> <a-button
type="success"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>叫号次数:<i>{{ tablePagination.total }}</i></b> <b
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -23,19 +34,33 @@ ...@@ -23,19 +34,33 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableList"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -51,13 +76,17 @@ ...@@ -51,13 +76,17 @@
<template slot="people_phone" slot-scope="text"> <template slot="people_phone" slot-scope="text">
{{ text.people_phone ? text.people_phone : "--" }} {{ text.people_phone ? text.people_phone : "--" }}
</template> </template>
<!-- 取号设备 --> <!-- 呼叫设备 -->
<template slot="device_name" slot-scope="text"> <template slot="device_name" slot-scope="text">
{{ text.device_name ? text.device_name : "--" }} {{ text.device_name ? text.device_name : "--" }}
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a> <a
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -66,7 +95,11 @@ ...@@ -66,7 +95,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -85,11 +118,13 @@ ...@@ -85,11 +118,13 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span :class="{ <span
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}"> }"
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -104,15 +139,21 @@ ...@@ -104,15 +139,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import moment from "moment"; import moment from "moment";
import UserInfo from "./components/userInfo.vue"; import UserInfo from "./components/userInfo.vue";
import BusinessInfo from "./components/businessInfo.vue"; import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getCalllist, getCallQueList, getBusinessEvent, getQueueInfo, getCalllist,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getCallQueList,
} from "@/api/dataAdmin" getBusinessEvent,
getQueueInfo,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuecallRecord", name: "PortalAdminVuecallRecord",
...@@ -223,10 +264,6 @@ export default { ...@@ -223,10 +264,6 @@ export default {
}, },
//状态 //状态
style: [ style: [
{
key: 0,
name: "排队中",
},
{ {
key: 1, key: 1,
name: "办理中", name: "办理中",
...@@ -239,10 +276,40 @@ export default { ...@@ -239,10 +276,40 @@ export default {
//Form数据列表 //Form数据列表
tableList: [], tableList: [],
obj: { obj: {
0: "排队中",
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tHeader: [
// 导出的表头名信息
"排队编号",
"申报人",
"联系方式",
"取号时间",
"呼叫设备",
"办理业务",
"办理开始时间",
"办理窗口",
"工作人员",
"办理结束时间",
"状态",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum",
"people_name",
"people_phone",
"taketime",
"device_name",
"business",
"calltime",
"window_name",
"workman_name",
"endtime",
"style",
],
btnLoading: false,
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -253,25 +320,27 @@ export default { ...@@ -253,25 +320,27 @@ export default {
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.getCalllistArr() this.getCalllistArr();
this.getCallQueListArr() this.getCallQueListArr();
}, },
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getCallQueListArr(); this.getCallQueListArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.tablePagination.current = 1;
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getCallQueListArr() this.getCallQueListArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getCalllistArr() { async getCalllistArr() {
...@@ -280,6 +349,13 @@ export default { ...@@ -280,6 +349,13 @@ export default {
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getCallQueListArr();
},
// 获取列表数据 // 获取列表数据
getCallQueListArr() { getCallQueListArr() {
getCallQueList({ getCallQueList({
...@@ -293,50 +369,60 @@ export default { ...@@ -293,50 +369,60 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getCallQueListArr() this.getCallQueListArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { idcard: item.people_idcard,
this.$refs.UserInfo.dataList = { ...item, ...res.data } peopleid: item.peopleid,
time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
...@@ -355,6 +441,65 @@ export default { ...@@ -355,6 +441,65 @@ export default {
return "type0"; return "type0";
} }
}, },
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getCallQueList({
page: 1,
size: -1,
...this.searchForm,
}).then((res) => {
let { data } = res.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"呼叫记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -363,5 +508,12 @@ export default { ...@@ -363,5 +508,12 @@ export default {
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block !important; display: block !important;
} }
.stand-line {
color: #f23a3a;
}
.on-transact {
color: #04ca8f;
}
</style> </style>
<template> <template>
<div class="handling" ref="handling"> <div class="handling" ref="handling">
<a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible" <a-drawer
@close="modalClose" @getContainer="() => $refs.handling"> :destroyOnClose="true"
:title="modalInfo.title"
:width="modalInfo.width"
:visible="modalInfo.visible"
@close="modalClose"
@getContainer="() => $refs.handling"
>
<div class="headerInfo"> <div class="headerInfo">
<!-- 头部耗时部分 --> <!-- 头部耗时部分 -->
<p> <p>
<span>总耗时:{{ dataList.alltime || "--" }} <span
<i v-show="dataList.alltime && compareTime(dataList.p_alltime,dataList.alltime)" class="fa fa-long-arrow-down"></i> >总耗时:{{ dataList.alltime || "--" }}
<i
v-show="
dataList.alltime &&
compareTime(dataList.p_alltime, dataList.alltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>等待时间:{{ dataList.waittime || "--" }} <span
<i v-show="dataList.waittime && compareTime(dataList.p_waittime,dataList.waittime)" class="fa fa-long-arrow-down"></i> >等待时间:{{ dataList.waittime || "--" }}
<i
v-show="
dataList.waittime &&
compareTime(dataList.p_waittime, dataList.waittime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
<span>办理时间:{{ dataList.bltime || "--" }} <span
<i v-show="dataList.bltime && compareTime(dataList.p_bltime , dataList.bltime)" class="fa fa-long-arrow-down"></i> >办理时间:{{ dataList.bltime || "--" }}
<i
v-show="
dataList.bltime &&
compareTime(dataList.p_bltime, dataList.bltime)
"
class="fa fa-long-arrow-down"
></i>
</span> </span>
</p> </p>
<p> <p>
...@@ -22,7 +49,12 @@ ...@@ -22,7 +49,12 @@
</p> </p>
</div> </div>
<div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div> <div :class="returnScolor">{{ $codeMap.queueState[dataList.style] }}</div>
<a-steps direction="vertical" size="small" :current="approveLs.length" class="steps_box"> <a-steps
direction="vertical"
size="small"
:current="approveLs.length"
class="steps_box"
>
<a-step :disabled="true" class="step_box"> <a-step :disabled="true" class="step_box">
<div class="icon_box" slot="icon"></div> <div class="icon_box" slot="icon"></div>
<div class="title_box" slot="title"> <div class="title_box" slot="title">
...@@ -30,12 +62,27 @@ ...@@ -30,12 +62,27 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">申报人:</i>{{ dataList.people_name || "--" }}</span> <span
<span><i class="lable">取号时间:</i>{{ dataList.taketime || "--" }}</span> ><i class="lable">申报人:</i
<span><i class="lable">排队编码:</i>{{ dataList.flownum || "--" }}</span> >{{ dataList.people_name || "--" }}</span
<span><i class="lable">取号方式:</i>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span> >
<span
><i class="lable">取号时间:</i
>{{ dataList.taketime || "--" }}</span
>
<span
><i class="lable">排队编码:</i
>{{ dataList.flownum || "--" }}</span
>
<span
><i class="lable">取号方式:</i
>{{ $codeMap.takeNumWay[dataList.wy_signin] || "--" }}</span
>
<span><i class="lable">注册方式:</i>{{ "--" }}</span> <span><i class="lable">注册方式:</i>{{ "--" }}</span>
<span><i class="lable">取号设备:</i>{{ dataList.take_name || "--" }}</span> <span
><i class="lable">取号设备:</i
>{{ dataList.take_name || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -46,10 +93,22 @@ ...@@ -46,10 +93,22 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理窗口:</i>{{ dataList.window_name || "--" }}</span> <span
<span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span> ><i class="lable">办理窗口:</i
<span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span> >{{ dataList.window_name || "--" }}</span
<span><i class="lable">叫号设备:</i>{{ dataList.window_fromnum || "--" }}</span> >
<span
><i class="lable">办理开始时间:</i
>{{ dataList.calltime || "--" }}</span
>
<span
><i class="lable">工作人员:</i
>{{ dataList.workman_name || "--" }}</span
>
<span
><i class="lable">叫号设备:</i
>{{ dataList.call_name || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
...@@ -60,18 +119,19 @@ ...@@ -60,18 +119,19 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理结束时间:</i>{{ dataList.endtime || "--" }}</span> <span
><i class="lable">办理结束时间:</i
>{{ dataList.endtime || "--" }}</span
>
</div> </div>
</div> </div>
</a-step> </a-step>
</a-steps> </a-steps>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "PortalAdminVueHandlingDetails", name: "PortalAdminVueHandlingDetails",
...@@ -81,8 +141,8 @@ export default { ...@@ -81,8 +141,8 @@ export default {
modalInfo: { modalInfo: {
confirmLoading: false, confirmLoading: false,
visible: false, visible: false,
title: '用户信息', title: "用户信息",
width: '38%', width: "38%",
}, },
dataList: [], dataList: [],
approveLs: [ approveLs: [
...@@ -116,8 +176,7 @@ export default { ...@@ -116,8 +176,7 @@ export default {
} }
}, },
}, },
mounted() { mounted() {},
},
methods: { methods: {
modalClose() { modalClose() {
...@@ -132,18 +191,19 @@ export default { ...@@ -132,18 +191,19 @@ export default {
}, },
// 转换时间为秒 // 转换时间为秒
timeToSec(time) { timeToSec(time) {
if (time !== null && time !== undefined) { if (time) {
var s = ""; var s = "";
if (time.includes("分钟") && time.includes("")) { if (time.includes("分钟") && time.includes("")) {
var min = time.split("分钟")[0]; var min = time.split("分钟")[0];
var sec = time.split("分钟")[1].split("")[0]; var sec = time.split("分钟")[1].split("")[0];
s = Number(min * 60) + Number(sec); s = Number(min * 60) + Number(sec);
return s; return s;
}else{ } else {
sec = time.split("")[0] sec = time.split("")[0];
return sec; return sec;
} }
} else {
return 0;
} }
}, },
}, },
...@@ -253,7 +313,7 @@ export default { ...@@ -253,7 +313,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #BDBAB4; color: #bdbab4;
} }
.state1 { .state1 {
...@@ -262,7 +322,7 @@ export default { ...@@ -262,7 +322,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #FCE2D9; border: 5px solid #fce2d9;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -278,7 +338,7 @@ export default { ...@@ -278,7 +338,7 @@ export default {
top: 150px; top: 150px;
width: 85px; width: 85px;
height: 85px; height: 85px;
border: 5px solid #D9F1E4; border: 5px solid #d9f1e4;
border-radius: 50%; border-radius: 50%;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -315,7 +375,7 @@ export default { ...@@ -315,7 +375,7 @@ export default {
} }
/deep/.ant-steps-item { /deep/.ant-steps-item {
&+.ant-steps-item { & + .ant-steps-item {
margin-top: 25px !important; margin-top: 25px !important;
} }
} }
......
<template> <template>
<div class="businessModal" ref="businessModal"> <div class="businessModal" ref="businessModal">
<a-modal :title="modalInfo.title" width="400px" :visible="modalInfo.visible" <a-modal :title="modalInfo.title" :visible="modalInfo.visible" :confirmLoading="modalInfo.confirmLoading"
:confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true" @cancel="modalClose" :centered="true" :destroyOnClose="true" :getContainer="() => $refs.businessModal">
:getContainer="() => $refs.businessModal">
<div class="content"> <div class="content">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<em v-if="dataList.matterlist">关联事项({{ dataList.matterlist.length }}</em> <em v-if="dataList.matterlist">关联事项({{ dataList.matterlist.length }}</em>
<p> <p>
<template v-for="item in dataList.matterlist"> <template v-for="item in dataList.matterlist">
<p>{{ item }}</p> <p>* {{ item }}</p>
</template> </template>
</p> </p>
<h4> <h4>
<span>受理次数<br /><i>{{ dataList.slcount }}</i></span> <span>受理次数<br /><i>{{ dataList.slcount }}</i></span>
<span>办结次数<br /><i>{{ dataList.bjcount }}</i></span> <span>办结次数<br /><i>{{ dataList.bjcount }}</i></span>
<span>好评率<br /><i>{{ dataList.hplv }}</i></span> <span>好评率<br /><i>{{ dataList.hplv }}%</i></span>
</h4> </h4>
</div> </div>
<template slot="footer"> <template slot="footer">
...@@ -50,7 +49,7 @@ export default { ...@@ -50,7 +49,7 @@ export default {
h1 { h1 {
font-size: 17px; font-size: 17px;
color: #139bfd; color: #139bfd;
padding: 20px; padding: 0 20px 20px 20px;
} }
em { em {
...@@ -64,10 +63,12 @@ export default { ...@@ -64,10 +63,12 @@ export default {
p { p {
padding: 3px 20px; padding: 3px 20px;
font-size: 16px; font-size: 16px;
width: 500px; width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
h4 { h4 {
......
<template> <template>
<div class="userModal" ref="userModal"> <div class="userModal" ref="userModal">
<a-modal <a-modal :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible"
:title="modalInfo.title" :confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true"
:width="modalInfo.width" :getContainer="() => $refs.userModal">
:visible="modalInfo.visible"
:confirmLoading="modalInfo.confirmLoading"
@cancel="modalClose"
:centered="true"
:destroyOnClose="true"
:getContainer="() => $refs.userModal"
>
<div class="content"> <div class="content">
<h1>{{ dataList.people_name}}</h1> <h1>{{ dataList.people_name }}</h1>
<p> <p>
<span>{{ dataList.people_sex }}</span> <span>{{ dataList.people_sex }}</span>
<span>{{ dataList.age }}</span> <span>{{ dataList.age }}</span>
<span>{{ dataList.people_phone }}</span> <span>{{ dataList.people_phone }}</span>
</p> </p>
<h2> <h2>
<span <span>预约次数<br /><i>{{ dataList.ordernum }}</i></span>
>预约次数<br /><i>{{ dataList.ordernum }}</i></span <span>排队次数<br /><i>{{ dataList.quenum }}</i></span>
> <span>关联业务<br /><i>{{ dataList.bus_num }}</i></span>
<span
>排队次数<br /><i>{{ dataList.quenum }}</i></span
>
<span
>关联业务<br /><i>{{ dataList.bus_num}}</i></span
>
</h2> </h2>
</div> </div>
<template slot="footer"> <template slot="footer">
<a-button type="primary" ghost @click="openBlockchain">查看TA的数据画像</a-button> <a-button type="primary" ghost @click="openBlockchain">查看TA的数据画像</a-button>
<a-button type="primary" ghost @click="openBlockchain" <a-button type="primary" ghost @click="openBlockchain">区块链信息</a-button>
>区块链信息</a-button
>
</template> </template>
</a-modal> </a-modal>
<Blockchain ref="Blockchain" /> <Blockchain ref="Blockchain" />
...@@ -48,14 +33,14 @@ export default { ...@@ -48,14 +33,14 @@ export default {
name: "PortalAdminVueUserInfo", name: "PortalAdminVueUserInfo",
data() { data() {
return { return {
dataList:[], dataList: [],
}; };
}, },
components: { components: {
Blockchain, Blockchain,
}, },
mounted() {}, mounted() { },
methods: { methods: {
openBlockchain() { openBlockchain() {
// this.$refs.Blockchain.modalInfo.visible = true; // this.$refs.Blockchain.modalInfo.visible = true;
...@@ -69,30 +54,35 @@ export default { ...@@ -69,30 +54,35 @@ export default {
.userModal { .userModal {
.content { .content {
h1 { h1 {
padding: 20px; padding: 0 20px;
color: #3bacfd; color: #3bacfd;
font-size: 18px; font-size: 18px;
} }
p { p {
padding: 20px; padding: 20px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
span { span {
& + span { &+span {
margin-left: 30px; margin-left: 30px;
} }
} }
} }
h2 { h2 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
background: #f3faff; background: #f3faff;
span { span {
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
i { i {
color: #3bacfd; color: #3bacfd;
font-style: normal; font-style: normal;
...@@ -100,6 +90,7 @@ export default { ...@@ -100,6 +90,7 @@ export default {
} }
} }
} }
.ant-modal-body { .ant-modal-body {
padding: 0 !important; padding: 0 !important;
min-height: 300px !important; min-height: 300px !important;
......
<template> <template>
<div class="workPeopleModal" ref="workPeopleModal"> <div class="workPeopleModal" ref="workPeopleModal">
<a-modal :title="modalInfo.title" width="500px" :visible="modalInfo.visible" <a-modal :title="modalInfo.title" :visible="modalInfo.visible" :confirmLoading="modalInfo.confirmLoading"
:confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true" @cancel="modalClose" :centered="true" :destroyOnClose="true" :getContainer="() => $refs.workPeopleModal">
:getContainer="() => $refs.workPeopleModal">
<div class="content"> <div class="content">
<div class="workInfo"> <div class="workInfo">
<div class="left"> <div class="left">
...@@ -15,14 +14,14 @@ ...@@ -15,14 +14,14 @@
<span><i class="lable">所属部门:</i>{{ infoData.deptName || "--" }}</span> <span><i class="lable">所属部门:</i>{{ infoData.deptName || "--" }}</span>
<span><i class="lable">政治面貌:</i>{{ $codeMap.politicalStatus[infoData.politicalstatus] || "--" }}</span> <span><i class="lable">政治面貌:</i>{{ $codeMap.politicalStatus[infoData.politicalstatus] || "--" }}</span>
<span><i class="lable">电话:</i>{{ infoData.mobile || "--" }}</span> <span><i class="lable">电话:</i>{{ infoData.mobile || "--" }}</span>
<span><i class="lable">星级:</i>{{ infoData.starlevel +'' || "--" }} </span> <span v-show="infoData.starlevel"><i class="lable">星级:</i>{{ infoData.starlevel + '' || "--" }} </span>
</div> </div>
</div> </div>
</div> </div>
<h2> <h2>
<span>受理业务<br /><i>{{ infoData.slbusiness || "0" }}</i></span> <span>受理业务<br /><i>{{ infoData.slbusiness || "0" }}</i></span>
<span>评价次数<br /><i>{{ infoData.pjnum || "0" }}</i></span> <span>评价次数<br /><i>{{ infoData.pjnum || "0" }}</i></span>
<span>好评率<br /><i>{{ infoData.hplv || "0" }}</i></span> <span>好评率<br /><i>{{ infoData.hplv + '%' || "--" }}</i></span>
</h2> </h2>
</div> </div>
<template slot="footer"> <template slot="footer">
...@@ -72,6 +71,7 @@ export default { ...@@ -72,6 +71,7 @@ export default {
width: 100px; width: 100px;
padding: 0 10px; padding: 0 10px;
img { img {
max-height: 120px; max-height: 120px;
width: 100%; width: 100%;
...@@ -94,6 +94,9 @@ export default { ...@@ -94,6 +94,9 @@ export default {
display: inline-block; display: inline-block;
width: 49%; width: 49%;
padding: 2px 0; padding: 2px 0;
overflow: hidden; // 溢出部分隐藏
white-space: nowrap; // 文字不换行
text-overflow: ellipsis; // 显示省略号
.lable { .lable {
display: inline-block; display: inline-block;
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<div class="queueRecord-Container"> <div class="queueRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="exportTable(tHeader, filterVal, style, downAllData)"> <a-button :loading="btnLoading" type="success" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>号次数:<i>{{ tablePagination.total }}</i></b> <b>号次数:<i>{{ tablePagination.total }}</i></b>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id"> <a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
...@@ -26,8 +27,9 @@ ...@@ -26,8 +27,9 @@
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索"> <a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="getDataList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button> <a-button @click="resetBtn">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
...@@ -66,7 +68,11 @@ ...@@ -66,7 +68,11 @@
</template> </template>
<!-- 办理窗口 --> <!-- 办理窗口 -->
<template slot="window_name" slot-scope="text"> <template slot="window_name" slot-scope="text">
{{ text.window_name ? text.window_name : "--" }} {{
text.window_name
? text.window_name + "-" + text.window_fromnum
: "--"
}}
</template> </template>
<!-- 工作人员 --> <!-- 工作人员 -->
<template slot="workman_name" slot-scope="text"> <template slot="workman_name" slot-scope="text">
...@@ -110,14 +116,21 @@ import BusinessInfo from "./components/businessInfo.vue"; ...@@ -110,14 +116,21 @@ import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue"; import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue"; import HandlingDetails from "./components/HandlingDetails.vue";
import { import {
getTaskList, getQueueData, getQueueInfo, getBusinessEvent, getTaskList,
getWorkerInfo, getPeopleanalyse, getWorkmananalyse getQueueData,
getQueueInfo,
getBusinessEvent,
getWorkerInfo,
getPeopleanalyse,
getWorkmananalyse,
} from "@/api/dataAdmin"; } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table],
name: "PortalAdminVueQueueRecord", name: "PortalAdminVueQueueRecord",
mixins: [table],
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
...@@ -212,7 +225,9 @@ export default { ...@@ -212,7 +225,9 @@ export default {
}, },
}, },
], ],
tHeader: [// 导出的表头名信息
tHeader: [
// 导出的表头名信息
"排队编号", "排队编号",
"申报人", "申报人",
"联系方式", "联系方式",
...@@ -225,7 +240,8 @@ export default { ...@@ -225,7 +240,8 @@ export default {
"办理结束时间", "办理结束时间",
"状态", "状态",
], ],
filterVal: [// 导出的表头字段名,需要导出表格字段名 filterVal: [
// 导出的表头字段名,需要导出表格字段名
"flownum", "flownum",
"people_name", "people_name",
"people_phone", "people_phone",
...@@ -269,6 +285,8 @@ export default { ...@@ -269,6 +285,8 @@ export default {
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
tableSelectedKeys: [],
tableSelectedRows: [],
}; };
}, },
components: { components: {
...@@ -285,19 +303,21 @@ export default { ...@@ -285,19 +303,21 @@ export default {
methods: { methods: {
//搜索按钮 //搜索按钮
getDataList() { getDataList() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.getQueueDataArr(); this.getQueueDataArr();
}, },
//重置按钮 //重置按钮
resetBtn() { resetBtn() {
this.tablePagination.current = 1 this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.searchForm = { this.searchForm = {
id: "", // 排队机id id: "", // 排队机id
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
} };
this.getQueueDataArr() this.getQueueDataArr();
}, },
//获取排号机设备列表 //获取排号机设备列表
async getTaskListArr() { async getTaskListArr() {
...@@ -306,6 +326,13 @@ export default { ...@@ -306,6 +326,13 @@ export default {
this.deviceData = res.data.data; this.deviceData = res.data.data;
}); });
}, },
// 搜索
handleSearch() {
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.getQueueDataArr();
},
// 获取列表数据 // 获取列表数据
getQueueDataArr() { getQueueDataArr() {
getQueueData({ getQueueData({
...@@ -319,65 +346,133 @@ export default { ...@@ -319,65 +346,133 @@ export default {
}, },
//分页 //分页
changeTablePage(page) { changeTablePage(page) {
this.pagTableChange(page) this.pagTableChange(page);
this.getQueueDataArr() this.getQueueDataArr();
}, },
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ peopleid: item.peopleid, time: this.searchForm.time }).then(res => { await getPeopleanalyse({
if (res.code = 1) { idcard: item.people_idcard,
this.$refs.UserInfo.dataList = { ...item, ...res.data } peopleid: item.peopleid,
time: this.searchForm.time,
}).then((res) => {
if ((res.code = 1)) {
this.$refs.UserInfo.dataList = { ...item, ...res.data };
// console.log(this.$refs.UserInfo.dataList) // console.log(this.$refs.UserInfo.dataList)
} }
}) });
this.$refs.UserInfo.modalInfo.title = "用户信息"; this.$refs.UserInfo.modalInfo.title = "用户信息";
this.$refs.UserInfo.modalInfo.width = "25%"; this.$refs.UserInfo.modalInfo.width = "25%";
this.$refs.UserInfo.modalInfo.visible = true; this.$refs.UserInfo.modalInfo.visible = true;
}, },
//业务关联模块 //业务关联模块
async openBusiness(business, id) { async openBusiness(business, id) {
let siteId = localStorage.getItem('siteId') let siteId = localStorage.getItem("siteId");
await getBusinessEvent({ businessid: id, time: this.searchForm.time }).then(res => { await getBusinessEvent({
this.$refs.BusinessInfo.dataList = res.data businessid: id,
}) time: this.searchForm.time,
}).then((res) => {
this.$refs.BusinessInfo.dataList = res.data;
});
this.$refs.BusinessInfo.modalInfo.title = "业务分析"; this.$refs.BusinessInfo.modalInfo.title = "业务分析";
this.$refs.BusinessInfo.title = business this.$refs.BusinessInfo.title = business;
this.$refs.BusinessInfo.modalInfo.visible = true; this.$refs.BusinessInfo.modalInfo.visible = true;
}, },
//工作人员信息模态框 //工作人员信息模态框
async openWorkpeople(id) { async openWorkpeople(id) {
let a, b = {} let a,
await getWorkerInfo({ id }).then(res => { b = {};
a = res.data await getWorkerInfo({ id }).then((res) => {
}) a = res.data;
await getWorkmananalyse({ workmanid: id, time: this.searchForm.time }).then(res => { });
b = res.data await getWorkmananalyse({
}) workmanid: id,
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b } time: this.searchForm.time,
console.log(this.$refs.WorkpeopleInfo.infoData) }).then((res) => {
b = res.data;
});
this.$refs.WorkpeopleInfo.infoData = { ...a, ...b };
this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息"; this.$refs.WorkpeopleInfo.modalInfo.title = "工作人员信息";
this.$refs.WorkpeopleInfo.modalInfo.visible = true; this.$refs.WorkpeopleInfo.modalInfo.visible = true;
}, },
//详情信息抽屉 //详情信息抽屉
async openHandlingDetails(id) { async openHandlingDetails(id) {
//获取排队叫号对应ID详情 //获取排队叫号对应ID详情
await getQueueInfo({ id }).then(res => { await getQueueInfo({ id }).then((res) => {
this.$refs.HandlingDetails.dataList = res.data this.$refs.HandlingDetails.dataList = res.data;
}) });
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.visible = true; this.$refs.HandlingDetails.modalInfo.visible = true;
}, },
//获取全部数据 // 选中
downAllData() { onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
0: "排队中",
1: "办理中",
4: "办理完成",
};
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
this.tableSelectedRows.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.style == keys) {
item.style = obj[keys];
}
});
});
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getQueueData({ getQueueData({
page: 1, page: 1,
size: -1, size: -1,
...this.searchForm, ...this.searchForm,
}).then(res => { }).then((res) => {
return res let { data } = res.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}); });
} }
this.btnLoading = false;
},
//获取全部数据
// downAllData() {
// getQueueData({
// page: 1,
// size: -1,
// ...this.searchForm,
// }).then((res) => {
// return res;
// });
// },
}, },
}; };
</script> </script>
......
...@@ -2,54 +2,74 @@ ...@@ -2,54 +2,74 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="success" @click="toexportTable"> <a-button
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>查看样表次数:<i>{{tablePagination.total}}</i></b> <b
<sub>统计时间段:{{BegindAndEndTime[0]}}~{{BegindAndEndTime[1]}} >查看样表次数:<i>{{ tablePagination.total }}</i></b
>
<sub
>统计时间段:{{ BegindAndEndTime[0] }}~{{ BegindAndEndTime[1] }}
</sub> </sub>
</div> </div>
<span> <span>
<!-- <a-input-group compact> --> <a-space>
<a-select :default-value="1" style="width:25%" @change="changeSearchType"> <a-select :default-value="1" @change="changeSearchType">
<a-select-option :value="1"> <a-select-option :value="1"> 按事项 </a-select-option>
按事项 <a-select-option :value="2"> 按材料 </a-select-option>
</a-select-option>
<a-select-option :value="2">
按材料
</a-select-option>
</a-select> </a-select>
<a-input style="width:73%" v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索"> <a-input v-model="searchName" placeholder="请输入名称搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<!-- </a-input-group> --> <!-- </a-input-group> -->
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange"> <a-range-picker
v-model="BegindAndEndTime"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
class="range_picker_style"
>
</a-range-picker> </a-range-picker>
<a-button type="primary" @click="togetBillList">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
</a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<!-- 序号 -->
<span slot="index" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1
}}</span>
<template slot="事项名称" slot-scope="text, record, index"> <template slot="事项名称" slot-scope="text, record, index">
<div> <div>
{{record.matterName}} {{ record.matterName }}
</div>
<div class="tabFont">
事项全称:{{record.matterFullName}}
</div> </div>
<div class="tabFont">事项全称:{{ record.matterFullName }}</div>
</template> </template>
<template slot="材料名称" slot-scope="text, record, index"> <template slot="材料名称" slot-scope="text, record, index">
<div> <div>
{{record.materialName}} {{ record.materialName }}
</div>
<div class="tabFont">
样表全称:{{record.materialFullName}}
</div> </div>
<div class="tabFont">样表全称:{{ record.materialFullName }}</div>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -59,21 +79,21 @@ ...@@ -59,21 +79,21 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { getBillList } from "@/api/dataAdmin"; import { getBillList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "sampleForm", name: "sampleForm",
data() { data() {
return { return {
btnLoading: false,
tableHeaders: [ tableHeaders: [
{ {
title: "序号", title: "序号",
dataIndex: "index",
width: "60px", width: "60px",
key: "index",
align: "center", align: "center",
customRender: (text, record, index) => `${index + 1}`, scopedSlots: {
customRender: "index",
},
}, },
{ {
title: "事项名称", title: "事项名称",
...@@ -94,7 +114,9 @@ export default { ...@@ -94,7 +114,9 @@ export default {
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "deviceName", customRender: (text) => {
return text.deviceName ? text.deviceName : "--";
},
}, },
{ {
title: "操作时间", title: "操作时间",
...@@ -104,106 +126,80 @@ export default { ...@@ -104,106 +126,80 @@ export default {
{ {
title: "查看时间", title: "查看时间",
align: "center", align: "center",
dataIndex: "查看时间", customRender: (text) => {
return text.operTime ? text.operTime : "--";
},
}, },
], ],
BegindAndEndTime: [],//时间段 BegindAndEndTime: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
], //时间段
searchName: undefined, searchName: undefined,
searchType:1, searchType: 1,
siteId:undefined, siteId: localStorage.getItem("siteId"),
tableSelectedKeys: [],
tableSelectedRows: [],
tHeader: [
// 导出的表头名信息
"事项简称",
"事项全称",
"材料简称",
"材料全称",
"设备名称",
"操作时间",
"查看时间",
],
filterVal: [
// 导出的表头字段名,需要导出表格字段名
"matterName",
"matterFullName",
"materialName",
"materialFullName",
"deviceName",
"createTime",
"operTime",
],
}; };
}, },
components: { components: {},
},
mounted() { mounted() {
this.setMoment(); this.setMoment();
this.BegindAndEndTime=[this.$moment(new Date()).format("YYYY-MM-DD"),this.$moment(new Date()).format("YYYY-MM-DD")] this.togetBillList();
this.siteId = localStorage.getItem('siteId')
this.togetBillList()
}, },
methods: { methods: {
//导出 handleSearch() {
toexportTable() { this.tablePagination.current = 1;
let tableData = []; this.tableSelectedKeys = [];
if (this.tableSelectedRows.length == 0) { this.tableSelectedRows = [];
this.togetBillList();
let pramse = {
page:1,
size:-1,
siteId:this.siteId,
matterName:"%%",
materialName:"%%",
operTimeStart:this.BegindAndEndTime[0],
operTimeEnd:this.BegindAndEndTime[1]
}
if(this.searchType==1 && this.searchName){
pramse.matterName = '%'+this.searchName+'%'
}else if(this.searchName){
pramse.materialName='%'+this.searchName+'%'
}
getBillList(pramse).then((res)=>{
const{code,data} = res;
if(code == 1){
tableData = JSON.parse(JSON.stringify(data.data));
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
})
} else {
tableData = JSON.parse(JSON.stringify(this.tableSelectedRows));
let tableColumns = JSON.parse(JSON.stringify(this.tableHeaders));
let newTableData = tableData.map(item => {
let obj = {};
for (let key in item) {
obj[key] = item[key];
}
return obj;
})
let exprotExcelName = `${this.nowDay} / ${this.nowTime} / ${this.$route['meta']['title'] || '报表信息统计'}`;
this.exportExcel(tableColumns, newTableData, exprotExcelName);
}
}, },
togetBillList() {
togetBillList(){
let pramse = { let pramse = {
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
siteId:this.siteId, siteId: this.siteId,
matterName:"%%", matterName: "%%",
materialName:"%%", materialName: "%%",
operTimeStart:this.BegindAndEndTime[0], operTimeStart: this.BegindAndEndTime[0],
operTimeEnd:this.BegindAndEndTime[1] operTimeEnd: this.BegindAndEndTime[1],
} };
if(this.searchType==1 && this.searchName){ if (this.searchType == 1 && this.searchName) {
pramse.matterName = '%'+this.searchName+'%' pramse.matterName = "%" + this.searchName + "%";
}else if(this.searchName){ } else if (this.searchName) {
pramse.materialName='%'+this.searchName+'%' pramse.materialName = "%" + this.searchName + "%";
} }
getBillList(pramse).then((res)=>{ getBillList(pramse).then((res) => {
const{code,data} = res; const { code, data } = res;
if(code==1){ if (code == 1) {
this.tableSourceData = data.data this.tableSourceData = data.data;
this.tablePagination.total = data.total this.tablePagination.total = data.total;
} }
}) });
},
changeSearchType(val){
this.searchType = val
}, },
rangePickerChange(val) { changeSearchType(val) {
this.BegindAndEndTime=[this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] this.searchType = val;
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
case 0: case 0:
...@@ -215,7 +211,71 @@ export default { ...@@ -215,7 +211,71 @@ export default {
return "type0"; return "type0";
} }
}, },
// 重置
handleReset() {
this.BegindAndEndTime = [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.searchName = undefined;
this.searchType = 1;
this.tablePagination.current = 1;
this.tableSelectedKeys = [];
this.tableSelectedRows = [];
this.togetBillList();
},
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
handleExportTable() {
this.btnLoading = true;
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
let pramse = {
page: 1,
size: -1,
siteId: this.siteId,
matterName: "%%",
materialName: "%%",
operTimeStart: this.BegindAndEndTime[0],
operTimeEnd: this.BegindAndEndTime[1],
};
if (this.searchType == 1 && this.searchName) {
pramse.matterName = "%" + this.searchName + "%";
} else if (this.searchName) {
pramse.materialName = "%" + this.searchName + "%";
}
getBillList(pramse).then((res) => {
const { code, data } = res;
if (code == 1) {
if (!data.data.length) return;
export2Excel(
this.tHeader,
this.filterVal,
data.data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
});
}
this.btnLoading = false;
},
}, },
}; };
</script> </script>
...@@ -231,7 +291,7 @@ export default { ...@@ -231,7 +291,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
......
...@@ -55,26 +55,6 @@ ...@@ -55,26 +55,6 @@
{{ itm.censusName }} {{ itm.censusName }}
</li> </li>
</template> </template>
<li class="content_list" @click="pushRouter1">易政秀报表</li>
<li class="content_list" @click="pushRouter2">排队叫号报表</li>
<li class="content_list" @click="pushRouter3">预约记录报表</li>
<li class="content_list" @click="pushRouter4">服务类数据分析</li>
<li class="content_list" @click="pushRouter5">
无感一码通实时数据报表
</li>
<li class="content_list" @click="pushRouter6">
AI效能监察异常行为数据报表
</li>
<li class="content_list" @click="pushRouter7">
智能边缘物联网异常告警报表
</li>
<li class="content_list" @click="pushRouter8">取件记录报表</li>
<li class="content_list" @click="pushRouter9">短信记录报表</li>
<li class="content_list" @click="pushRouter10">评价记录报表</li>
<li class="content_list" @click="pushRouter11">样表记录报表</li>
<li class="content_list" @click="pushRouter12">填单记录样表</li>
<li class="content_list" @click="pushRouter13">微官网注册报表</li>
<li class="content_list" @click="pushRouter14">网络理政报表</li>
</ul> </ul>
<p class="bottom">协同类数据分析<a-icon type="swap-right" /></p> <p class="bottom">协同类数据分析<a-icon type="swap-right" /></p>
</li> </li>
...@@ -190,106 +170,105 @@ export default { ...@@ -190,106 +170,105 @@ export default {
CensusType_4, CensusType_4,
CensusType_5, CensusType_5,
} = res.data.data; } = res.data.data;
if (CensusType_1 && CensusType_1.length) this.CensusType_1 = CensusType_1; if (CensusType_1 && CensusType_1.length)
if (CensusType_2 && CensusType_2.length) this.CensusType_2 = CensusType_2; this.CensusType_1 = CensusType_1.filter((v) => v.status != 0);
if (CensusType_3 && CensusType_3.length) this.CensusType_3 = CensusType_3; if (CensusType_2 && CensusType_2.length)
if (CensusType_4 && CensusType_4.length) this.CensusType_4 = CensusType_4; this.CensusType_2 = CensusType_2.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length) this.CensusType_5 = CensusType_5; if (CensusType_3 && CensusType_3.length)
this.CensusType_3 = CensusType_3.filter((v) => v.status != 0);
if (CensusType_4 && CensusType_4.length)
this.CensusType_4 = CensusType_4.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length)
this.CensusType_5 = CensusType_5.filter((v) => v.status != 0);
}, },
// 查看数据 // 查看数据
handleCkeck(url) { handleCkeck(path) {
let a = document.createElement("a"); this.$router.push(path);
a.style.display = "none";
a.href = url;
a.target = "_blank";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
},
pushRouter1() {
// 易政秀报表
this.$router.push({
path: "/home/dataManagement/easyPoliticsShow/PoliticsShow",
});
},
pushRouter2() {
// 排队叫号
this.$router.push({
path: "/home/dataManagement/queueCall/queueRecord",
});
},
pushRouter3() {
// 预约记录
this.$router.push({
path: "/home/dataManagement/makeRecordReport/RecordReport",
});
},
pushRouter4() {
// 服务类数据分析
this.$router.push({
path: "/home/dataManagement/serviceDataAnalyse/makeTrendResearch",
});
},
pushRouter5() {
// 无感一码通实时数据报表
this.$router.push({
path: "/home/dataManagement/oneYardPass/reportForm",
});
},
pushRouter6() {
// AI效能监察异常行为数据报表
this.$router.push({
path: "/home/dataManagement/AIEfficiency/abnormalReportForm",
});
},
pushRouter7() {
// 智能边缘物联网异常告警报表
this.$router.push({
path: "/home/dataManagement/IOT/alerting",
});
},
pushRouter8() {
// 取件记录报表
this.$router.push({
path: "/home/dataManagement/pickUp/pickUpRecord",
});
},
pushRouter9() {
// 短信记录报表
this.$router.push({
path: "/home/dataManagement/SMS/SMSRecord",
});
},
pushRouter10() {
// 评价记录报表
this.$router.push({
path: "/home/dataManagement/evaluationRecordReport/windowsEvaluation",
});
},
pushRouter11() {
// 样记录报表
this.$router.push({
path: "/home/dataManagement/sampleRecordReport/sampleForm",
});
},
pushRouter12() {
// 填单记录样表
this.$router.push({
path: "/home/dataManagement/fillRecordReport/fillForm",
});
},
pushRouter13() {
// 微官网注册报表
this.$router.push({
path: "/home/dataManagement/microOfficialWebsite/microForm",
});
},
pushRouter14() {
// 网络理政报表
this.$router.push({
path: "/home/dataManagement/networkGovernance/networkForm",
});
}, },
// pushRouter1() {
// // 易政秀报表
// this.$router.push({
// path: "/home/dataManagement/easyPoliticsShow/PoliticsShow",
// });
// },
// pushRouter2() {
// // 排队叫号
// this.$router.push({
// path: "/home/dataManagement/queueCall/queueRecord",
// });
// },
// pushRouter3() {
// // 预约记录
// this.$router.push({
// path: "/home/dataManagement/makeRecordReport/RecordReport",
// });
// },
// pushRouter4() {
// // 服务类数据分析
// this.$router.push({
// path: "/home/dataManagement/serviceDataAnalyse/makeTrendResearch",
// });
// },
// pushRouter5() {
// // 无感一码通实时数据报表
// this.$router.push({
// path: "/home/dataManagement/oneYardPass/reportForm",
// });
// },
// pushRouter6() {
// // AI效能监察异常行为数据报表
// this.$router.push({
// path: "/home/dataManagement/AIEfficiency/abnormalReportForm",
// });
// },
// pushRouter7() {
// // 智能边缘物联网异常告警报表
// this.$router.push({
// path: "/home/dataManagement/IOT/alerting",
// });
// },
// pushRouter8() {
// // 取件记录报表
// this.$router.push({
// path: "/home/dataManagement/pickUp/pickUpRecord",
// });
// },
// pushRouter9() {
// // 短信记录报表
// this.$router.push({
// path: "/home/dataManagement/SMS/SMSRecord",
// });
// },
// pushRouter10() {
// // 评价记录报表
// this.$router.push({
// path: "/home/dataManagement/evaluationRecordReport/windowsEvaluation",
// });
// },
// pushRouter11() {
// // 样记录报表
// this.$router.push({
// path: "/home/dataManagement/sampleRecordReport/sampleForm",
// });
// },
// pushRouter12() {
// // 填单记录样表
// this.$router.push({
// path: "/home/dataManagement/fillRecordReport/fillForm",
// });
// },
// pushRouter13() {
// // 微官网注册报表
// this.$router.push({
// path: "/home/dataManagement/microOfficialWebsite/microForm",
// });
// },
// pushRouter14() {
// // 网络理政报表
// this.$router.push({
// path: "/home/dataManagement/networkGovernance/networkForm",
// });
// },
}, },
}; };
</script> </script>
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<profiles.log.level>INFO</profiles.log.level> <profiles.log.level>INFO</profiles.log.level>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<package.environment>yibin</package.environment> <package.environment>yibin</package.environment>
<skipUi>true</skipUi> <skipUi>false</skipUi>
</properties> </properties>
</profile> </profile>
......
{ {
"portal-local": { "portal-local": {
"baseUrl": "http://127.0.0.1:17214/zwfw" "baseUrl": "http://127.0.0.1:17212/zwfw"
}, },
"portal-dev": { "portal-dev": {
"baseUrl": "http://192.168.0.98:11072/zwfw" "baseUrl": "http://192.168.0.98:11072/zwfw"
......
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