Commit 5dd836e0 authored by 赵啸非's avatar 赵啸非

app-ui

parent c1446d69
Pipeline #2994 failed with stages
import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component
// register globally
Vue.component('svg-icon', SvgIcon)
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
......@@ -10,7 +10,8 @@ import FormField from '@/components/FormField';
import Upload from '@/components/Upload';
import TreeTable from '@/components/TreeTable.vue';
import TopicInfo from '@/components/TopicInfo.vue';
import LimitIndex from '@/components/LimitIndex.vue';
const Prototype = function() {};
......@@ -27,7 +28,6 @@ Prototype.install = (Vue, options) => {
Vue.component('TreeTable', TreeTable) // 文件上传
Vue.component('TopicInfo', TopicInfo) // 文件上传
Vue.component('LimitIndex', LimitIndex) // 文件上传
}
export default Prototype;
......@@ -16,6 +16,9 @@ export default {
data() {
return {}
},
created() {
console.log(33333)
},
props: {
rule: {
type: Object,
......
<template>
<el-form inline :form="data" :label-width="'150px'" label-position="right">
<LimitLevel
:rule="data"
:moIndex="mo_index"
></LimitLevel>
</el-form>
</template>
<script>
import LimitLevel from "./LimitLevel";
export default {
components: {
LimitLevel,
},
created() {
//self = this;
console.log("111")
this.data=this.rule
console.log(this.data)
},
methods: {
submitAns(data, label, all_data, index) {
let ans = null;
if (data) {
ans = deepClone(data);
}
this.$emit('submitAns', data, label, all_data, this.moIndex);
}
},
data() {
return {
mo_index: 0,
data:[],
rule: [
{
type: "select",
name: "wr1",
label: "问题块根-问题1",
ans: null,
child: null,
content: [
{
value: "wr11",
label: "问题块根-问题1-答案1",
children: [
{
type: "select",
name: "w11",
label: "问题块1-问题1",
ans: null,
child: null,
content: [
{
value: "w11",
label: "问题块1-问题1-答案1",
children: [
{
type: "end",
},
],
},
{
value: "w11",
label: "问题块1-问题1-答案2",
children: [
{
type: "select",
name: "wa1",
label: "问题块a-问题1",
ans: null,
child: null,
content: [
{
value: "wa11",
label: "问题块a-问题1-答案1",
children: null,
},
{
value: "wa11",
label: "问题块a-问题1-答案2",
children: null,
},
],
},
{
type: "select",
name: "wa2",
label: "问题块a-问题2",
ans: null,
child: null,
content: [
{
value: "问题块a-问题2-答案1",
label: "wa21",
children: null,
},
{
value: "问题块a-问题2-答案1",
label: "wa22",
children: null,
},
],
},
{
type: "end",
},
],
},
],
},
],
},
{
value: "wr12",
label: "问题块根-问题1-答案2",
children: [
{
type: "select",
name: "wb1",
label: "问题块b-问题1",
ans: null,
child: null,
content: [
{
value: "wb11",
label: "问题块b-问题1-答案1",
children: [
{
type: "textarea",
name: "wb111",
label: "问题块b1-问题1",
ans: null,
child: null,
},
{
type: "end",
},
],
},
{
value: "wb12",
label: "问题块b-问题1-答案2",
children: [
{
type: "daterange",
label: "问题块b2-问题1",
name: "wb121",
ans: null,
child: null,
},
],
},
{
value: "wb13",
label: "问题块b-问题1-答案3",
children: [
{
type: "end",
},
],
},
],
},
],
},
],
},
],
text: "11",
form: "22",
table: "",
};
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
// level组件:
<template>
{{data}}
<div v-if="data">
<template v-for="(item, index) in data">
// 通过type不同选择不同的代码。。。不全部展示
<div v-if="item.type == 'end'" :key="item.label">
<limitEnd :rule="item" @submitAns="submitAns"></limitEnd>
</div>
<div v-if="item.type == 'select'" :key="item.label">
<el-form-item
:label="item.label ? item.label: ''"
:rules="[
{ required: true, message: '请选择', trigger: 'change' }
]">
<el-select v-model="item.ans" placeholder="请选择" @change="changeSelect(index)">
<el-option v-for="(option, option_index) in item.content" :key="option.label" :label="option.label" :value="option_index"></el-option>
:label="item.label ? item.label : ''"
:rules="[{ required: true, message: '请选择', trigger: 'change' }]"
>
<el-select
v-model="item.ans"
placeholder="请选择"
@change="changeSelect(index)"
>
<el-option
v-for="(option, option_index) in item.content"
:key="option.label"
:label="option.label"
:value="option_index"
></el-option>
</el-select>
</el-form-item>
<template v-if="item.child">
<limitLevel :rule="item.child" :moIndex="item.index" @submitAns="submitAns"></limitLevel>
<limitLevel
:rule="item.child"
:moIndex="item.index"
@submitAns="submitAns"
></limitLevel>
</template>
</div>
</template>
</div>
</template>
<script>
import limitEnd from './LimitEnd'
import limitEnd from "./LimitEnd";
export default {
name: 'limitLevel',
name: "LimitLevel",
components: {
limitEnd
limitEnd,
},
data() {
return {
......@@ -37,40 +47,46 @@ export default {
value_index: null,
value: null,
child: null,
}
};
},
props: {
rule: {
data: {
type: Array,
required: true,
default: null
default: null,
},
moIndex: {
type: Number,
required: true,
default: null
default: null,
},
},
created() {
this.data = deepClone(this.rule);
console.log(222)
this.fileList = this.list;
},
watch: {
$route() {
console.log(2222)
}
},
methods: {
changeSelect(index) {
this.$set(this.data[index], 'child', null);
this.$set(this.data[index], "child", null);
this.$nextTick(() => {
let ans = this.data[index].ans;
let option = this.data[index].content[ans];
this.$set(this.data[index], 'child', option.children);
this.$set(this.data[index], 'index', index);
})
this.$set(this.data[index], "child", option.children);
this.$set(this.data[index], "index", index);
});
},
judgeAnsIsNull(item, label) {
if (!item && item != 0) {
this.$message({
type: 'error',
message: '请填写' + label
})
type: "error",
message: "请填写" + label,
});
return false;
}
......@@ -78,10 +94,10 @@ export default {
},
submitAns(data, des, all_data, mo_index) {
let ans = null;
let label = '';
let label = "";
if (mo_index || mo_index == 0) {
this.$set(this.data[mo_index], 'child', all_data);
this.$set(this.data[mo_index], "child", all_data);
}
if (data) {
......@@ -90,32 +106,30 @@ export default {
ans = {};
}
for(let i = 0; i < this.data.length; i++) {
for (let i = 0; i < this.data.length; i++) {
// 没有答案,提醒填写
if (this.data[i].type == 'end') {
if (this.data[i].type == "end") {
continue;
}
switch(this.data[i].type) {
case 'end':
switch (this.data[i].type) {
case "end":
break;
case 'select':
case "select":
this.judgeAnsIsNull(this.data[i].ans, this.data[i].label);
let index = this.data[i].ans;
let option = this.data[i].content[index];
ans[this.data[i].name] = option.value;
label += ' ' + option.label;
label += " " + option.label;
break;
default:
break;
}
}
this.$emit('submitAns', ans, label + ' ' +des, this.data, this.moIndex);
}
}
}
\ No newline at end of file
this.$emit("submitAns", ans, label + " " + des, this.data, this.moIndex);
},
},
};
......@@ -12,6 +12,8 @@ const router = new Router({
builder('/go', 'codeGen/index'),
builder('/index', 'home/index'),
builder1('/test', 'components/LimitIndex'),
builder('/question', 'home/question'),
]
......@@ -52,6 +54,26 @@ function builder(path, component = path, requiresAuth = false) {
}
}
function builder1(path, component = path, requiresAuth = false) {
return {
path: path,
name: path || 'homepage',
component: getComponent1(component),
meta: {
requiresAuth: requiresAuth
}
}
}
function getComponent1(fileName) {
try {
return require('./' + fileName).default
} catch (error) {
return fileNotFound;
}
}
function getComponent(fileName) {
try {
return require('./views/' + fileName).default
......
......@@ -59,10 +59,8 @@
<script>
import LimitIndex from "@/components/LimitIndex.vue";
export default {
components: {
LimitIndex,
},
created() {
this.$post("/zwfw/proced/thing/oneTopiclist", {
......
<template>
<mu-container class="demo-container is-stripe">
<el-form :label-width="'150px'" label-position="right">
<template v-for="(item, index) in rule">
<el-form-item
:key="index"
:label="item.label ? item.label : ''"
style="width: 100%"
>
<el-select v-model="item.ans" placeholder="请选择">
<el-option
v-for="(option, option_index) in item.content"
:key="option.label"
:label="option.label"
:value="option_index"
></el-option>
</el-select>
</el-form-item>
</template>
<el-form-item>
<div style="text-align: center; width: 500px">
<el-button
size="small"
type="primary"
style="margin-right: 50px"
@click="submitAns"
>确定</el-button
>
<el-button size="small">取消</el-button>
</div>
</el-form-item>
<el-form inline :form="data" :label-width="'150px'" label-position="right">
<limitLevel
:rule="data"
:moIndex="mo_index"
></limitLevel>
</el-form>
</mu-container>
</template>
<script>
let self = null;
export default {
components: {},
components: {
limitLevel
},
created() {
console.log(1111);
self = this;
this.data=this.rule
console.log(this.rule)
},
methods: {
submitAns() {
console.log(this.rule)
let ans = {};
for (let i = 0; i < this.rule.length; i++) {
let item = this.rule[i];
if ((!item.fa && item.fa != 0) || this.rule[item.fa].ans == item.faV) {
if (!item.ans && item.ans != 0) {
this.$message({
type: "warning",
message: "请检查您的" + item.label + "是否填写",
});
return false;
submitAns(data, label, all_data, index) {
let ans = null;
if (data) {
ans = deepClone(data);
}
ans[item.name] = item.ans;
console.log(this.rule);
this.$emit('submitAns', data, label, all_data, this.moIndex);
}
}
console.log(ans);
},
},
data() {
return {
mo_index: 0,
data:[],
rule: [
{
type: "select",
name: "w1",
label: "问题1",
name: "wr1",
label: "问题块根-问题1",
ans: null,
child: null,
content: [
{
value: "wr11",
label: "问题块根-问题1-答案1",
children: [
{
type: "select",
name: "w11",
label: "问题块1-问题1",
ans: null,
fa: null,
child: null,
content: [
{
value: "w11",
label: "问题1-答案1",
label: "问题块1-问题1-答案1",
children: [
{
type: "end",
},
],
},
{
value: "w11",
label: "问题块1-问题1-答案2",
children: [
{
type: "select",
name: "wa1",
label: "问题块a-问题1",
ans: null,
child: null,
content: [
{
value: "w12",
label: "问题1-答案2",
value: "wa11",
label: "问题块a-问题1-答案1",
children: null,
},
{
value: "wa11",
label: "问题块a-问题1-答案2",
children: null,
},
],
},
{
type: "select",
name: "w2",
label: "问题2",
name: "wa2",
label: "问题块a-问题2",
ans: null,
fa: 0,
faV: 0,
child: null,
content: [
{
value: "w21",
label: "问题2-答案1",
value: "问题块a-问题2-答案1",
label: "wa21",
children: null,
},
{
value: "问题块a-问题2-答案1",
label: "wa22",
children: null,
},
],
},
{
value: "w22",
label: "问题2-答案2",
type: "end",
},
],
},
],
},
],
},
{
value: "wr12",
label: "问题块根-问题1-答案2",
children: [
{
type: "select",
name: "wb1",
label: "问题块b-问题1",
ans: null,
child: null,
content: [
{
value: "wb11",
label: "问题块b-问题1-答案1",
children: [
{
type: "textarea",
name: "wb111",
label: "问题块b1-问题1",
ans: null,
child: null,
},
{
type: "end",
},
],
},
{
value: "wb12",
label: "问题块b-问题1-答案2",
children: [
{
type: "daterange",
label: "问题块b2-问题1",
name: "wb121",
ans: null,
child: null,
},
],
},
{
value: "wb13",
label: "问题块b-问题1-答案3",
children: [
{
type: "end",
},
],
},
],
},
],
},
],
},
......
import Vue from 'vue'
import Router from 'vue-router'
import Store from './store'
import Layout from './views/Layout.vue'
import fileNotFound from './views/errors/fileNotFound.vue'
Vue.use(Router);
const router = new Router({
routes: [
builder('/authentication', 'login/authentication'),
builder('/login', 'login/login'),
builder('/go', 'codeGen/index'),
{
path: '/',
name: 'layout',
component: Layout,
meta: {
requiresAuth: true
},
children: [
...restBuilder('oper/log', 'system/log'), // 系统管理-操作日志
...restBuilder('validcode', 'system/validcode'), // 接入管理-接入信息
...restBuilder('menu', 'system/menu'), // 系统管理--菜单管理
...restBuilder('resource', 'system/resource'), // 系统管理--资源管理
...restBuilder('role', 'system/role'), // 系统管理--角色管理
...restBuilder('user', 'system/user'), // 用户管理 -- 管理用户
...restBuilder('param', 'system/param'), // 系统管理--参数管理
...restBuilder('task', 'system/task'), // 系统管理--任务管理
...restBuilder('area', 'system/area'), // 系统管理-区域管理
...restBuilder('device/connhistory', 'device/connhistory'), // 设备管理-连接历史
...restBuilder('device', 'device'), // 系统管理-区域管理
//在此添加业务模块
//以下为基础路由配置
builder('', 'Home'),
builder('index', 'Home'),
builder('login/updatePwd', 'login/updatePwd'),
builder('403', 'errors/403'),
builder('*', 'errors/404'),
]
},
]
})
/**
* rest路由生成器
*
* @param {string} path 路径
* @param {string} [component=path] 文件地址
* @returns {array} [] reset路由数组,包含list/edit/add/view
*/
function restBuilder(path, component = path) {
let arr = [];
arr.push(builder(`${path}/list`, `${component}/list`));
arr.push(builder(`${path}/edit`, `${component}/show`));
arr.push(builder(`${path}/add`, `${component}/show`));
arr.push(builder(`${path}/view`, `${component}/show`));
return arr;
}
/**
* 路由生成器
*
* @param {string} path 路径
* @param {string} [component=path] 文件地址
* @param {boolean} [requiresAuth=false] 是否登录后才能访问
* @returns {any} {} 路由对象
*/
function builder(path, component = path, requiresAuth = false) {
return {
path: path,
name: path || 'homepage',
component: getComponent(component),
meta: {
requiresAuth: requiresAuth
}
}
}
function getComponent(fileName) {
try {
return require('./views/' + fileName).default
} catch (error) {
return fileNotFound;
}
}
//检查是否跳转到sso地址
function ssoCheck (to, from, next) {
let redirect = (to.path === '/login/updatePwd') ? '/#/updatePwd' : ''
redirect = (redirect === '' && to.path === '/login') ? (location.protocol + '//' + location.host + '/#' + from.fullPath) : redirect
if (redirect != '') {
next(false)
window.location.href = '//' + location.host + '/m/login/logout?redirect=' + encodeURIComponent(redirect)
return true;
}
return false;
}
router.afterEach(() => {
document.body.scrollTop = 0
document.documentElement.scrollTop = 0
})
// 路由鉴权
router.beforeEach((to, from, next) => {
// if (ssoCheck(to, from, next)) { //sso鉴权检查
// return
// }
if (to.matched.some(record => record.meta.requiresAuth)) {
if (Store.state.isLogin) {
next();
} else {
next({
path: '/authentication',
query: {
redirect: to.fullPath
}
})
}
} else {
next();
}
})
export default router;
\ No newline at end of file
......@@ -20,10 +20,4 @@ public class ApiResp<T> {
*/
private T data;
// public boolean isSuccess() {
// if (YesNoEnum.YES.getValue() == code) {
// return true;
// }
// return false;
// }
}
......@@ -34,7 +34,7 @@
>{{$label}}</el-checkbox>
</el-checkbox-group>
<el-date-picker :disabled='disabled' type="date" value-format="yyyy-MM-dd HH:mm:ss" v-model="field" @change="emit" @input="emit" placeholder="选择日期" v-if='type === "date"'></el-date-picker>
<el-date-picker :disabled='disabled' type="date" value-format="yyyy-MM-dd" v-model="field" @change="emit" @input="emit" placeholder="选择日期" v-if='type === "date"'></el-date-picker>
<el-date-picker :disabled='disabled' type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="field" @change="emit" @input="emit" placeholder="选择日期" v-if='type === "datetime"'></el-date-picker>
</slot>
......
......@@ -181,7 +181,7 @@
{label: "字段3", prop: "fieldThree"},
{label: "测试详细",
width: 120,
prop: "subColumns",
prop: "demoDetailList",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width);
......
......@@ -4,7 +4,7 @@
<div class="page page-login flex flex-v">
<div class="form-wrap flex flex-1">
<el-form @submit.prevent='onSubmit' ref="form" :model="form" label-width="80px" size="small">
<h1>工作流管理平台</h1>
<h1>设备管理平台</h1>
<el-form-item label="用户名">
<el-input v-model="form.loginName"></el-input>
</el-form-item>
......
......@@ -17,6 +17,12 @@
<el-input v-model="topicform.topicalName"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="描述信息">
<el-input v-model="topicform.remark"></el-input>
</el-form-item>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -40,82 +46,41 @@
:rules="topicPacksRules"
ref="topicPacksform"
>
<el-row>
<el-col :span="12">
<el-form-item prop="classifyName" label="主题名称">
<el-form-item prop="classifyName" label="主题事项名称">
<el-input v-model="classifyform.classifyName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="sortRemarks" label="主题说明">
<el-form-item prop="sortRemarks" label="主题事项说明">
<el-input v-model="classifyform.sortRemarks"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item prop="mainPicUrl" label="终端主题包图标">
<el-upload
class="avatar-uploader"
action="/m/file/upload"
:show-file-list="false"
:on-success="handleSuccess"
name="uploadFile"
:data="{ prePath: '/image/plm/materia' }"
:before-upload="beforeUpload"
>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="mainPicUrl" label="移动主题包图标">
<el-upload
class="avatar-uploader"
action="/m/file/upload"
:show-file-list="false"
:on-success="handleSuccess"
name="uploadFile"
:data="{ prePath: '/image/plm/materia' }"
:before-upload="beforeUpload"
>
</el-upload>
</el-form-item>
</el-col>
</el-row> -->
<el-row>
<el-col :span="12">
<el-form-item prop="deliveryPeriod" label="承诺办结时限">
<el-input
placeholder="请输入内容"
:disabled="topicPacksform.overWay == '1'"
v-model="topicPacksform.overTime"
class="input-with-select"
>
<el-select
v-model="topicPacksform.overWay"
slot="prepend"
placeholder="请选择"
>
<el-option label="即刻" value="1"></el-option>
<el-option label="工作日" value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="deliveryPeriod" label="到现场次数">
<el-input v-model="topicPacksform.presenceNum"></el-input>
</el-form-item>
</el-col>
</el-row>
<Field label="办理机构" prop="jointInfoShow" v-model="topicPacksform.jointInfoShow" placeholder="请输入办理机构"/>
<Field label="法定时限" prop="legalTimeLimitShow" v-model="topicPacksform.legalTimeLimitShow" placeholder="请输入法定时限"/>
<Field label="承诺时限" prop="promiseTimeLimitShow" v-model="topicPacksform.promiseTimeLimitShow" placeholder="请输入承诺时限"/>
<Field label="收费标准" prop="isChargesShow" v-model="topicPacksform.isChargesShow" placeholder="请输入收费标准"/>
<Field label="收费金额" prop="charges" v-model="topicPacksform.charges" placeholder="请输入收费金额"/>
<Field label="办理时间" prop="handleTimeShow" v-model="topicPacksform.handleTimeShow" placeholder="请输入办理时间"/>
<Field label="办理地点" prop="handlePlaceShow" v-model="topicPacksform.handlePlaceShow" placeholder="请输入办理地点"/>
<Field label="咨询方式" prop="cousultingTelephoneShow" v-model="topicPacksform.cousultingTelephoneShow" placeholder="请输入咨询方式"/>
<Field label="结果信息" prop="resultInfo" v-model="topicPacksform.resultInfo" placeholder="请输入结果信息"/>
<Field label="投诉电话" prop="supervisoryTelephoneShow" v-model="topicPacksform.supervisoryTelephoneShow" placeholder="请输入投诉电话"/>
</el-form>
</el-row>
<el-divider></el-divider>
<el-row>
<!--搜索-->
<div>
<el-form :inline="true" size="mini">
<el-form-item>
......@@ -177,7 +142,6 @@
</el-table-column>
</el-table>
<!-- 分页器 -->
<el-row type="flex" justify="end">
<el-pagination
@current-change="handleCurrentChange"
......@@ -481,11 +445,14 @@
<script>
import Pagination from "@/components/Pagination.vue";
import table from "@/assets/mixins/table";
import Form from "../../../components/Form.vue";
//import Form from "../../../components/Form.vue";
//import topicClassify from "./topicClassify.vue";
export default {
components: {
Pagination,
// topicClassify
},
name: "topic",
mixins: [table],
......
<template>
<!-- 新增主题包 -->
<el-dialog
:title="topicPacksDialog.title"
:visible.sync="topicPacksDialog.visible"
width="95%"
>
<el-row>
<el-row>
<el-form
:model="topicPacksform"
:label-width="formLabelWidth"
:rules="topicPacksRules"
ref="topicPacksform"
>
<el-row>
<el-col :span="12">
<el-form-item prop="classifyName" label="主题事项名称">
<el-input v-model="classifyform.classifyName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="sortRemarks" label="主题事项说明">
<el-input v-model="classifyform.sortRemarks"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="deliveryPeriod" label="承诺办结时限">
<el-input
placeholder="请输入内容"
:disabled="topicPacksform.overWay == '1'"
v-model="topicPacksform.overTime"
class="input-with-select"
>
<el-select
v-model="topicPacksform.overWay"
slot="prepend"
placeholder="请选择"
>
<el-option label="即刻" value="1"></el-option>
<el-option label="工作日" value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="deliveryPeriod" label="到现场次数">
<el-input v-model="topicPacksform.presenceNum"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
<el-divider></el-divider>
<el-row>
<!--搜索-->
<div>
<el-form :inline="true" size="mini">
<el-form-item>
<el-button plain @click="matterBatchAdd">批量添加</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button plain @click="matterSearchConfirm">查询</el-button>
</el-form-item>
<el-form-item label="事项名称" style="float: right">
<el-input
v-model="searchform.matterName"
placeholder="事项名称"
></el-input>
</el-form-item>
</el-form>
</div>
<!--事项列表-->
<el-table
size="mini"
ref="multipleTable"
:data="matterPageInfoData"
tooltip-effect="dark"
border
v-loading="loading"
highlight-current-row
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column prop="matterName" label="事项名称" :show-overflow-tooltip="true" />
<el-table-column width="400" prop="datumn" label="关联材料">
<template slot-scope="scope">
<el-row
v-for="(item, index) in scope.row.datumList"
:key="index"
>
<el-tag
style="
font-size: 12px;
white-space: pre-wrap;
margin-bottom: 5px;
"
>
{{ item.materialName | ellipsis2 }}
</el-tag>
</el-row>
</template>
</el-table-column>
<el-table-column width="100" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleAdd(scope.$index, scope.row)"
>加入</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页器 -->
<el-row type="flex" justify="end">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="matterPageInfo.currPage"
:page-size="matterPageInfo.prePageResult"
:page-sizes="[10, 20, 50, 100, 200]"
layout="sizes, total, prev, pager, next, jumper"
:total="matterPageInfo.totalResult"
>
</el-pagination>
</el-row>
<el-row
style="margin-bottom: 10px"
v-for="item in matterTags"
:key="item.id"
>
<el-tag closable @close="handleClose(item.id)">
{{ item.matterName | ellipsis }}
</el-tag>
</el-row>
<el-row type="flex" justify="end">
<el-button @click="topicPacksDialog.visible = false"
>取 消</el-button
>
<el-button type="primary" @click="selectMatterConfirm"
>确 定</el-button
>
</el-row>
</el-row>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: "basicInfoForm",
props: {
info: {
type: Object,
default: null
}
},
created() {
},
data() {
return {
};
}
};
</script>
......@@ -15,6 +15,9 @@ import org.springframework.context.annotation.ImportResource;
//@EnableBinding({ProcessTaskSink.class})
public class ManagerApplication extends BaseWebApplication {
public static void main(String[] args) {
SpringApplication.run(ManagerApplication.class, args);
}
......
......@@ -50,7 +50,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
@Slf4j
@Aspect
@Configuration(proxyBeanMethods = false)
@Profile({"develop1", "test"})
@Profile({"develop", "test"})
public class RequestLogAspect {
private static final ParameterNameDiscoverer PARAMETER_NAME_DISCOVERER = new DefaultParameterNameDiscoverer();
......
......@@ -31,6 +31,9 @@ public class AuthMessageHandler implements MessageHandler<AuthRequest> {
// 判断是否认证成功。这里,假装直接成功
WebSocketUtil.send(session, AuthResponse.TYPE, new AuthResponse().setCode(0));
//WebSocketUtil.broadcast();
// 通知所有人,某个人加入了。这个是可选逻辑,仅仅是为了演示
// WebSocketUtil.broadcast(UserJoinNoticeRequest.TYPE,
// new UserJoinNoticeRequest().setNickname(message.getAccessToken())); // 考虑到代码简化,我们先直接使用 accessToken 作为 User
......
......@@ -131,6 +131,7 @@ public class WebSocketHandler extends TextWebSocketHandler implements Initializi
public static void main(String[] args) {
WebSocketHandler webSocketHandler = new WebSocketHandler();
}
}
......@@ -3,6 +3,7 @@ package com.mortals.xhx.base.system.gentable.web;
import cn.hutool.core.convert.Convert;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonController;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.system.gentable.model.GentableColumnEntity;
import com.mortals.xhx.base.system.gentable.model.GentableColumnQuery;
......@@ -43,7 +44,7 @@ import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
*/
@RestController
@RequestMapping("gentable")
public class GentableController extends BaseCRUDJsonMappingController<GentableService, GentableForm, GentableEntity, Long> {
public class GentableController extends BaseCRUDJsonController<GentableService, GentableForm, GentableEntity, Long> {
@Autowired
private GentableColumnService gentableColumnService;
......
......@@ -61,6 +61,10 @@ public class UploadServiceImpl implements UploadService {
log.error("文件上传大小超过限制,当前文件---" + tempFile.getSize() + ",允许大小----------" + type.getMaxSize());
throw new AppException("文件上传大小超过限制!");
}
if(tempFile.getSize()==0){
throw new AppException("当前文件为空!");
}
if (null != fileName && fileName.length() > 50) {
throw new AppException("文件名称过长,无法上传!");
}
......
###一件事查询列表
POST {{baseUrl}}/m/zwfw/proced/thing/getList
Content-Type: application/x-www-form-urlencoded
name=退休&openId=3&limit=10&page=0
###一件事查询列表
POST {{baseUrl}}/m/zwfw/proced/thing/getList
Content-Type: application/x-www-form-urlencoded
#topicId=13&name=退休&openId=3&limit=10&page=0
topicId=13&openId=3
###主题包列表
POST {{baseUrl}}/m/zwfw/proced/thing/getTopicList
Content-Type: application/x-www-form-urlencoded
type=1&openId=3
###主题包列表
POST {{baseUrl}}/m/zwfw/proced/thing/oneTopiclist
Content-Type: application/x-www-form-urlencoded
......@@ -12,11 +32,13 @@ Content-Type: application/x-www-form-urlencoded
id=1
###事项详细数据
POST {{baseUrl}}/m/zwfw/proced/thing/oneBasicsInfo
###回答基础数据
POST {{baseUrl}}/m/zwfw/proced/thing/ansResults
Content-Type: application/x-www-form-urlencoded
id=1
optionIds[0]=17&optionIds[1]=20
###根据openid 查询用户
POST {{baseUrl}}/m/zwfw/proced/thing/searchMember
......@@ -24,11 +46,7 @@ Content-Type: application/x-www-form-urlencoded
openId=abc
###问答基础数据
POST {{baseUrl}}/m/zwfw/proced/thing/ansResults
Content-Type: application/x-www-form-urlencoded
optionIds[0]=17&optionIds[1]=20
###微信用户校验创建更新
POST {{baseUrl}}/m/zwfw/wechatinter/base/checkCard
......@@ -42,10 +60,10 @@ POST {{baseUrl}}/m/zwfw/proced/thing/uploadFile
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="test.xlsx"
Content-Disposition: form-data; name="file"; filename="1.png"
Content-Type: multipart/form-data
< ./test.xlsx
< ./1.png
--WebAppBoundary--
###删除文件
......
......@@ -62,8 +62,6 @@ public class WxWechatApiController {
}
memberService.checkMember(req);
} catch (Exception e) {
log.error("微信注册认证失败", e);
rsp.setCode(ApiRespCodeEnum.FAILED.getValue());
......
......@@ -15,23 +15,41 @@ import java.util.Map;
@Data
public class OneProblemInfo {
/**
* 问题与答案id,唯一
*/
private Long id;
/**
* 问题答案名称
*/
private String name;
/**
* 是否为叶子节点(0:否,1:是)
*/
private Integer isLeaf;
/**
* 是问题还是选项答案(0:问题,1:选项答案)
*/
private Integer isAns;
/**
* 父节点id
*/
private Long parentId;
/**
* 事项id “,”号分割
*/
private String matterIds;
/**
* 树的层级
*/
private Integer level;
/**
* 备注信息
*/
private String remark;
/**
* 当前节点的子集
*/
private List<OneProblemInfo> children;
}
package com.mortals.xhx.busiz.oneProblemlist.mapper;
import com.mortals.xhx.busiz.oneProblemlist.OneProblemInfo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
......@@ -14,25 +15,25 @@ import org.mapstruct.factory.Mappers;
@Mapper
public interface ProblemMapper {
ProblemMapper INSTANCE = Mappers.getMapper( ProblemMapper.class );
/*
@Mapping(source = "basicsId", target = "basics_id")
OneProblemInfo classifyEntity2Info(ClassifyEntity entity);
@Mapping(source = "classifyId", target = "classify_id")
@Mapping(source = "classifyNextId", target = "classify_next_id")
@Mapping(source = "basicsinfoId", target = "basicsinfo_id")
@Mapping(source = "acceptId", target = "accept_id")
@Mapping(source = "flowlimitId", target = "flowlimit_id")
@Mapping(source = "matterId", target = "matter_id")
@Mapping(source = "datumId", target = "datum_id")
@Mapping(source = "summaryType", target = "summary_type")
OptionDetailInfo classifyOptionEntity2DetailInfo(ClassifyOptionEntity entity);
*/
// ProblemMapper INSTANCE = Mappers.getMapper( ProblemMapper.class );
//
//
//
// @Mapping(source = "basicsId", target = "basics_id")
// OneProblemInfo classifyEntity2Info(ClassifyEntity entity);
//
//
// @Mapping(source = "classifyId", target = "classify_id")
// @Mapping(source = "classifyNextId", target = "classify_next_id")
// @Mapping(source = "basicsinfoId", target = "basicsinfo_id")
// @Mapping(source = "acceptId", target = "accept_id")
// @Mapping(source = "flowlimitId", target = "flowlimit_id")
// @Mapping(source = "matterId", target = "matter_id")
// @Mapping(source = "datumId", target = "datum_id")
// @Mapping(source = "summaryType", target = "summary_type")
// OptionDetailInfo classifyOptionEntity2DetailInfo(ClassifyOptionEntity entity);
//
//
......
package com.mortals.xhx.busiz.onethinglist;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author: zxfei
* @date: 2021/9/6 9:32
......@@ -18,21 +22,23 @@ public class OneThineInfo {
/**
* 名称
*/
private String tname;
private String name;
/**
* 事项关联id
* 归属主题类型(1,个人服务,2 企业服务)
*/
private String matter_ids;
private Integer topicalType;
/**
* 是否删除( 0正常 1删除)
* 归属主题名称
*/
private Integer valid;
private String topicalName;
/**
* 创建时间
*/
private Long create_time;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
}
......@@ -24,6 +24,12 @@ public class OneThingReq extends BaseReq implements Serializable {
@ApiModelProperty(value = "主题包类型")
private int type;
/**
* 主题包Id
*/
@ApiModelProperty(value = "主题包Id")
private Long topicId;
/**
* 当前请求页数
*/
......@@ -36,11 +42,12 @@ public class OneThingReq extends BaseReq implements Serializable {
@ApiModelProperty(value = "每页记录数")
private int limit;
/**
* 搜索关键词
* 一件事名称
*/
@ApiModelProperty(value = "搜索关键词")
private String keywords;
@ApiModelProperty(value = "搜索")
private String name;
}
......@@ -24,10 +24,8 @@ public class AnswerReq extends BaseReq implements Serializable {
private List<Long> optionIds;
/**
* 问题路线id?
* 主题事项Id
*/
@ApiModelProperty(value = "问题路线id")
private String key;
private Long classifyId;
}
......@@ -11,74 +11,54 @@ import lombok.Data;
@Data
public class BasicsInfo {
private Long id;
/**
* 模板标题
* 移动主题包图标
*/
private String title;
private String moveIcon;
/**
* 一件事基础表id
* 到现场次数
*/
private Long basics_id;
private Integer presenceNum;
/**
* 办理机构
*/
private String jointInfoShow;
/**
* 法定时限
*/
private String legalTimeLimitShow;
/**
* 承诺时限
*/
private String promiseTimeLimitShow;
/**
* 是否收费,0,否,1是 默认0
* 收费标准
*/
private Integer isChargesShow;
private String isChargesShow;
/**
* 收费金额
*/
private String Charges;
private String charges;
/**
* 办时间
* 办时间
*/
private String handleTimeShow;
/**
* 办公地址
* 办理地点
*/
private String handlePlaceShow;
/**
* 咨询电话
* 咨询方式
*/
private String cousultingTelephoneShow;
/**
* 投诉电话
*/
private String supervisoryTelephoneShow;
/**
* 结果信息
*/
private String resultInfo;
/**
* 常见问题
* 投诉电话
*/
private String qa;
private Long create_time;
private String supervisoryTelephoneShow;
}
......@@ -13,6 +13,11 @@ import java.util.List;
@Data
public class QuestionInfo {
/**
* 基本信息
*/
private BasicsInfo basicsInfo;
/**
* 事项列表列表
*/
......
......@@ -18,19 +18,17 @@ import java.util.List;
@ApiModel(value = "SubmitDatumReq", description = "请求参数")
public class SubmitDatumReq extends BaseReq implements Serializable {
/**
* 申请主题id
* 申请主题id
*/
@ApiModelProperty(value = "申请主题id")
@ApiModelProperty(value = "申请主题id")
private Long classifyTopicId;
/**
* 站点ID
*/
@ApiModelProperty(value = "数据下的站点id")
@ApiModelProperty(value = "数据下的站点id")
private Long siteId;
......
......@@ -8,14 +8,14 @@ import java.util.Map;
* @author
*
*/
public enum SiteSatusEnum {
public enum SatusEnum {
DISENABLE(0, "禁用"),
ENABLE(1, "启用");
private int value;
private String desc;
SiteSatusEnum(int value, String desc) {
SatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
......@@ -30,8 +30,8 @@ public enum SiteSatusEnum {
return desc;
}
public static SiteSatusEnum getByValue(int value) {
for (SiteSatusEnum examStatus : SiteSatusEnum.values()) {
public static SatusEnum getByValue(int value) {
for (SatusEnum examStatus : SatusEnum.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
......@@ -46,7 +46,7 @@ public enum SiteSatusEnum {
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (SiteSatusEnum item : SiteSatusEnum.values()) {
for (SatusEnum item : SatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
......
......@@ -97,3 +97,11 @@ POST {{baseUrl}}/m/member/test
Content-Type: application/json
{"affairCode":"510184-20200624-000003","name":"11111","systemCode":"dadfasdf"}
###测试截取topic
POST {{baseUrl}}/m/topic/sys/a1GFjLP****/device123/_thing/service/post
Content-Type: application/json
{"affairCode":"510184-20200624-000003","name":"11111","systemCode":"dadfasdf"}
package com.mortals.xhx.module.matter.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
......
package com.mortals.xhx.module.one.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
import java.util.List;
/**
*
* Description:OneClassify
* date: 2021-9-13 16:21:34
*/
@Setter
@Getter
public class OneClassifyEntityExt extends BaseEntityLong{
private List<OneClassifyEntity> children;
private boolean hasChildren;
private String matterNames;
private List<String> matterNameList;
}
\ No newline at end of file
package com.mortals.xhx.module.one.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.one.model.vo.OneTopicalVo;
/**
* 主题实体对象
*
* Description:OneTopical
* date: 2021-9-13 16:21:34
* @author zxfei
* @date 2021-11-16
*/
public class OneTopicalEntity extends BaseEntityLong{
private static final long serialVersionUID = 1631521294937L;
public class OneTopicalEntity extends OneTopicalVo {
private static final long serialVersionUID = 1L;
/**
* 主题名称
*/
private String topicalName;
/**
* 主题排序
*/
private Integer topicalRank;
/**
* 站点id
*/
private Long siteId;
/**
* 主题类型(1 个人服务,2 企业服务)
*/
private Integer topicalType;
/**
*
* 描述信息
*/
private Integer deleted;
private String remark;
/**
* 创建人id
*
*/
private Long createUserId;
private Integer deleted;
/**
* 创建人名称
*/
private String createUserName;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改人
*/
private Long updateUserId;
/**
* 修改人名称
*/
private String updateUserName;
/**
* 更新时间
*/
private Date updateTime;
public OneTopicalEntity(){
}
public OneTopicalEntity(){}
/**
* 获取 主题名称
* @return topicalName
* @return String
*/
public String getTopicalName() {
return this.topicalName;
public String getTopicalName(){
return topicalName;
}
/**
* 设置 主题名称
* @param topicalName
*/
public void setTopicalName(String topicalName) {
public void setTopicalName(String topicalName){
this.topicalName = topicalName;
}
/**
* 获取 主题排序
* @return topicalRank
* @return Integer
*/
public Integer getTopicalRank() {
return this.topicalRank;
public Integer getTopicalRank(){
return topicalRank;
}
/**
* 设置 主题排序
* @param topicalRank
*/
public void setTopicalRank(Integer topicalRank) {
public void setTopicalRank(Integer topicalRank){
this.topicalRank = topicalRank;
}
/**
* 获取 站点id
* @return siteId
* @return Long
*/
public Long getSiteId() {
return this.siteId;
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点id
* @param siteId
*/
public void setSiteId(Long siteId) {
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 主题类型(1 个人服务,2 企业服务)
* @return topicalType
* @return Integer
*/
public Integer getTopicalType() {
return this.topicalType;
public Integer getTopicalType(){
return topicalType;
}
/**
* 设置 主题类型(1 个人服务,2 企业服务)
* @param topicalType
*/
public void setTopicalType(Integer topicalType) {
public void setTopicalType(Integer topicalType){
this.topicalType = topicalType;
}
/**
* 获取
* @return deleted
* 获取 描述信息
* @return String
*/
public Integer getDeleted() {
return this.deleted;
public String getRemark(){
return remark;
}
/**
* 设置
* @param deleted
* 设置 描述信息
* @param remark
*/
public void setDeleted(Integer deleted) {
this.deleted = deleted;
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 创建人id
* @return createUserId
* 获取
* @return Integer
*/
public Long getCreateUserId() {
return this.createUserId;
public Integer getDeleted(){
return deleted;
}
/**
* 设置 创建人id
* @param createUserId
* 设置
* @param deleted
*/
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
public void setDeleted(Integer deleted){
this.deleted = deleted;
}
/**
* 获取 创建人名称
* @return createUserName
* @return String
*/
public String getCreateUserName() {
return this.createUserName;
public String getCreateUserName(){
return createUserName;
}
/**
* 设置 创建人名称
* @param createUserName
*/
public void setCreateUserName(String createUserName) {
public void setCreateUserName(String createUserName){
this.createUserName = createUserName;
}
/**
* 获取 创建时间
* @return createTime
*/
public Date getCreateTime() {
return this.createTime;
}
/**
* 设置 创建时间
* @param createTime
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取 修改人
* @return updateUserId
*/
public Long getUpdateUserId() {
return this.updateUserId;
}
/**
* 设置 修改人
* @param updateUserId
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 获取 修改人名称
* @return updateUserName
* @return String
*/
public String getUpdateUserName() {
return this.updateUserName;
public String getUpdateUserName(){
return updateUserName;
}
/**
* 设置 修改人名称
* @param updateUserName
*/
public void setUpdateUserName(String updateUserName) {
public void setUpdateUserName(String updateUserName){
this.updateUserName = updateUserName;
}
/**
* 获取 更新时间
* @return updateTime
*/
public Date getUpdateTime() {
return this.updateTime;
}
/**
* 设置 更新时间
* @param updateTime
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public int hashCode() {
......@@ -230,11 +172,10 @@ public class OneTopicalEntity extends BaseEntityLong{
}
@Override
public boolean equals(Object obj) {
if (obj == null)
return false;
if (obj == null) return false;
if (obj instanceof OneTopicalEntity) {
OneTopicalEntity tmp = (OneTopicalEntity) obj;
if (this.getId().longValue() == tmp.getId().longValue()) {
if (this.getId() == tmp.getId()) {
return true;
}
}
......@@ -243,20 +184,14 @@ public class OneTopicalEntity extends BaseEntityLong{
public String toString(){
StringBuilder sb = new StringBuilder("");
sb
.append(",id:").append(getId())
.append(",topicalName:").append(getTopicalName())
.append(",topicalRank:").append(getTopicalRank())
.append(",siteId:").append(getSiteId())
.append(",topicalType:").append(getTopicalType())
.append(",deleted:").append(getDeleted())
.append(",createUserId:").append(getCreateUserId())
.append(",createUserName:").append(getCreateUserName())
.append(",createTime:").append(getCreateTime())
.append(",updateUserId:").append(getUpdateUserId())
.append(",updateUserName:").append(getUpdateUserName())
.append(",updateTime:").append(getUpdateTime())
;
sb.append(",topicalName:").append(getTopicalName());
sb.append(",topicalRank:").append(getTopicalRank());
sb.append(",siteId:").append(getSiteId());
sb.append(",topicalType:").append(getTopicalType());
sb.append(",remark:").append(getRemark());
sb.append(",deleted:").append(getDeleted());
sb.append(",createUserName:").append(getCreateUserName());
sb.append(",updateUserName:").append(getUpdateUserName());
return sb.toString();
}
......@@ -265,12 +200,9 @@ public class OneTopicalEntity extends BaseEntityLong{
this.topicalRank = null;
this.siteId = null;
this.topicalType = null;
this.deleted = null;
this.createUserId = null;
this.remark = null;
this.deleted = 0;
this.createUserName = null;
this.createTime = null;
this.updateUserId = null;
this.updateUserName = null;
this.updateTime = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.one.service;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.busiz.onethinglist.OneThingReq;
import com.mortals.xhx.module.one.model.OneClassifyEntity;
import com.mortals.xhx.module.one.model.OneTopicalEntity;
import java.util.List;
......@@ -19,5 +22,8 @@ public interface OneTopicalService extends ICRUDService<OneTopicalEntity, Long>
List<Map<String, Object>> getTreeList(Integer type);
Result<OneClassifyEntity> getList(OneThingReq req);
void upOrDownTopicList(Long id, Integer type);
}
\ No newline at end of file
......@@ -53,12 +53,16 @@ public class OneClassifyServiceImpl extends AbstractCRUDCacheServiceImpl<OneClas
if(oneClassifyEntity.getClassifyLevel()>1){
if(oneClassifyEntity.getIsAns()==YesNoEnum.NO.getValue()){
entity.setIsAns(YesNoEnum.YES.getValue());
}else if(oneClassifyEntity.getIsAns()==YesNoEnum.YES.getValue()){
//判断当前节点是否是问题 且父节点是否已经存在问题
List<OneClassifyEntity> list = this.find(new OneClassifyQuery().parentId(entity.getParentId()).deleted(YesNoEnum.NO.getValue()));
if(list.size()>0){
throw new AppException("当前选项已经存在关联问题!");
}
}
}
}
super.saveBefore(entity, context);
}
......@@ -80,7 +84,6 @@ public class OneClassifyServiceImpl extends AbstractCRUDCacheServiceImpl<OneClas
@Override
protected void updateAfter(OneClassifyEntity entity, Context context) throws AppException {
//更新事项数据
List<Long> matterIds = Arrays.asList(entity.getMatterIds().split(",")).stream().filter(e->!ObjectUtils.isEmpty(e)).map(Long::valueOf).collect(Collectors.toList());
if(!ObjectUtils.isEmpty(matterIds)){
......
......@@ -39,6 +39,8 @@ public class OneClassifyTopicalServiceImpl extends AbstractCRUDServiceImpl<OneCl
@Autowired
private OneClassifyService oneClassifyService;
@Autowired
private OneClassifyTopicalService oneClassifyTopicalService;
@Autowired
private MatterService matterService;
@Autowired
private MatterDatumService matterDatumService;
......@@ -117,15 +119,13 @@ public class OneClassifyTopicalServiceImpl extends AbstractCRUDServiceImpl<OneCl
@Override
public OneProblemInfo findAllQuestion(Long id) {
//获取根节点,递归获取所有树节点
OneProblemInfo info = new OneProblemInfo();
OneClassifyEntity rootClassify = oneClassifyService.get(id);
if (!ObjectUtils.isEmpty(rootClassify)) {
info.setId(rootClassify.getId());
info.setIsLeaf(rootClassify.getIsLeaf());
info.setLevel(rootClassify.getClassifyLevel());
info.setLevel(rootClassify.getClassifyLevel().intValue());
info.setMatterIds(rootClassify.getMatterIds());
info.setName(rootClassify.getClassifyName());
info.setParentId(rootClassify.getParentId());
......@@ -146,7 +146,7 @@ public class OneClassifyTopicalServiceImpl extends AbstractCRUDServiceImpl<OneCl
OneProblemInfo info = new OneProblemInfo();
info.setId(item.getId());
info.setIsLeaf(item.getIsLeaf());
info.setLevel(item.getClassifyLevel());
info.setLevel(item.getClassifyLevel().intValue());
info.setMatterIds(item.getMatterIds());
info.setName(item.getClassifyName());
info.setParentId(item.getParentId());
......@@ -178,9 +178,18 @@ public class OneClassifyTopicalServiceImpl extends AbstractCRUDServiceImpl<OneCl
Map<String, String> isMustMap = paramService.getParamByFirstOrganize(Constant.Param_isMust);
//基本信息
OneClassifyTopicalEntity classifyTopicalEntity = oneClassifyTopicalService.selectOne(new OneClassifyTopicalQuery().classifyId(req.getClassifyId()));
if(!ObjectUtils.isEmpty(classifyTopicalEntity)){
BasicsInfo basicsInfo = new BasicsInfo();
BeanUtils.copyProperties(classifyTopicalEntity,basicsInfo);
questionInfo.setBasicsInfo(basicsInfo);
}
//获取关联的所有事项
List<Long> matterIdsList = oneClassifyService.find(new OneClassifyQuery().idList(req.getOptionIds()))
.stream().flatMap(item ->
.stream().filter(f->!"".equals(f.getMatterIds())).flatMap(item ->
Arrays.asList(item.getMatterIds().split(",")).stream()
).map(Long::valueOf).distinct().collect(Collectors.toList());
//根据事项获取所有材料
......@@ -252,6 +261,10 @@ public class OneClassifyTopicalServiceImpl extends AbstractCRUDServiceImpl<OneCl
}).collect(Collectors.toList());
questionInfo.setQAndAInfoList(qAndAInfoList);
return questionInfo;
}
}
\ No newline at end of file
......@@ -3,6 +3,9 @@ package com.mortals.xhx.module.one.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.onethinglist.OneThingReq;
import com.mortals.xhx.common.code.TreeTypeEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.one.model.*;
......@@ -38,12 +41,12 @@ public class OneTopicalServiceImpl extends AbstractCRUDServiceImpl<OneTopicalDao
OneClassifyTopicalQuery oneClassifyTopicalQuery = new OneClassifyTopicalQuery().deleted(YesNoEnum.NO.getValue());
oneClassifyTopicalQuery.setOrderColList(Arrays.asList(new OrderCol("classify_rank", OrderCol.ASCENDING)));
oneClassifyTopicalQuery.setOrderColList(Arrays.asList(new OrderCol("classifyRank", OrderCol.ASCENDING)));
List<OneClassifyTopicalEntity> classifyTopicalEntityList = oneClassifyTopicalService.find(oneClassifyTopicalQuery);
OneTopicalQuery oneTopicalQuery = new OneTopicalQuery().deleted(YesNoEnum.NO.getValue()).topicalType(type);
oneTopicalQuery.setOrderColList(Arrays.asList(new OrderCol("topical_rank", OrderCol.ASCENDING)));
oneTopicalQuery.setOrderColList(Arrays.asList(new OrderCol("topicalRank", OrderCol.ASCENDING)));
List<Map<String, Object>> collect = this.find(oneTopicalQuery).stream().map(item -> {
Map<String, Object> data = new HashMap<>();
......@@ -55,7 +58,7 @@ public class OneTopicalServiceImpl extends AbstractCRUDServiceImpl<OneTopicalDao
data.put("isLeaf", true);
List<Map<String, Object>> children = classifyTopicalEntityList
.stream().filter(f->f.getTopicalId()==item.getId()).map(classifyTopic -> {
.stream().filter(f -> f.getTopicalId() == item.getId()).map(classifyTopic -> {
OneClassifyEntity oneClassifyEntity = oneClassifyService.getCache(classifyTopic.getClassifyId().toString());
Map<String, Object> map = new HashMap<>();
map.put("id", classifyTopic.getId());
......@@ -78,6 +81,17 @@ public class OneTopicalServiceImpl extends AbstractCRUDServiceImpl<OneTopicalDao
return collect;
}
@Override
public Result<OneClassifyEntity> getList(OneThingReq req) {
//分页查询
PageInfo pageInfo = new PageInfo();
pageInfo.setPrePageResult(req.getLimit());
pageInfo.setCurrPage(req.getPage());
return oneClassifyService.find(new OneClassifyQuery().classifyLevel(1L).classifyName("%"+req.getName()+"%").deleted(YesNoEnum.NO.getValue()), pageInfo, null);
}
@Override
public void upOrDownTopicList(Long id, Integer type) {
OneTopicalQuery query = new OneTopicalQuery().deleted(YesNoEnum.NO.getValue());
......
......@@ -3,6 +3,9 @@ package com.mortals.xhx.module.site.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.site.model.SiteEntity;
import java.util.List;
import java.util.Map;
/**
* <p>Title: 站点信息表</p>
* <p>Description: SiteDao DAO接口 </p>
......@@ -12,4 +15,12 @@ import com.mortals.xhx.module.site.model.SiteEntity;
public interface SiteDao extends ICRUDDao<SiteEntity,Long>{
/**
* 查询子站点
*
* @param
* @return
*/
List<SiteEntity> selectChildrenSiteById(String siteId);
}
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