dev_xds
parent
577d3b57ec
commit
ae19c41891
|
@ -781,11 +781,7 @@
|
||||||
<build-node-drawer ref="nodeDrawer"></build-node-drawer>
|
<build-node-drawer ref="nodeDrawer"></build-node-drawer>
|
||||||
<workTrainDrawer ref="workTrainDrawer"></workTrainDrawer>
|
<workTrainDrawer ref="workTrainDrawer"></workTrainDrawer>
|
||||||
<emergencyDrillDrawer ref="emergencyDrillDrawer"></emergencyDrillDrawer>
|
<emergencyDrillDrawer ref="emergencyDrillDrawer"></emergencyDrillDrawer>
|
||||||
<surProjectSpecialDrawer
|
<surProjectSpecialDrawer ref="projectSpecial"></surProjectSpecialDrawer>
|
||||||
size="50%"
|
|
||||||
:visible.sync="projectSpecialDrawerVisible"
|
|
||||||
:form-data="formData"
|
|
||||||
></surProjectSpecialDrawer>
|
|
||||||
<attendance-drawer ref="attDrawer"></attendance-drawer>
|
<attendance-drawer ref="attDrawer"></attendance-drawer>
|
||||||
<projectDeptWroksDrawer ref="deptWroksDrawer"></projectDeptWroksDrawer>
|
<projectDeptWroksDrawer ref="deptWroksDrawer"></projectDeptWroksDrawer>
|
||||||
<insuranceDrawer ref="insurance"></insuranceDrawer>
|
<insuranceDrawer ref="insurance"></insuranceDrawer>
|
||||||
|
@ -1068,7 +1064,7 @@ export default {
|
||||||
this.$refs.emergencyDrillDrawer.show(row);
|
this.$refs.emergencyDrillDrawer.show(row);
|
||||||
break;
|
break;
|
||||||
case "handleProjectSpecial":
|
case "handleProjectSpecial":
|
||||||
this.handleProjectSpecial(row);
|
this.$refs.projectSpecial.show(row);
|
||||||
break;
|
break;
|
||||||
case "handleProjectDeptWroks":
|
case "handleProjectDeptWroks":
|
||||||
this.$refs.deptWroksDrawer.show(row);
|
this.$refs.deptWroksDrawer.show(row);
|
||||||
|
|
|
@ -1,13 +1,27 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-bind="$attrs"
|
|
||||||
v-if="onOpen"
|
v-if="onOpen"
|
||||||
v-on="$listeners"
|
:visible.sync="onOpen"
|
||||||
@opened="onOpen"
|
direction="rtl"
|
||||||
@close="onClose"
|
size="60%"
|
||||||
style="padding-left: 20px"
|
style="padding-left: 20px"
|
||||||
>
|
>
|
||||||
|
<template slot="title">
|
||||||
|
<div>{{ drawerTitle + " 【特种人员管理】" }}</div>
|
||||||
|
</template>
|
||||||
|
<el-tabs
|
||||||
|
v-model="unitActiveName"
|
||||||
|
style="margin-left: 20px; margin-right: 20px"
|
||||||
|
@tab-click="getList"
|
||||||
|
>
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(it, idx) in nodes"
|
||||||
|
:label="it.unitName + ''"
|
||||||
|
:name="it.unitId + ''"
|
||||||
|
:key="idx"
|
||||||
|
></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<el-row
|
<el-row
|
||||||
:gutter="10"
|
:gutter="10"
|
||||||
class="mb8"
|
class="mb8"
|
||||||
|
@ -297,12 +311,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
ElImageViewer,
|
ElImageViewer,
|
||||||
},
|
},
|
||||||
props: {
|
props: {},
|
||||||
formData: {
|
|
||||||
projectId: String,
|
|
||||||
projectName: String,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dicts: ["sys_user_sex", "project_special_type"],
|
dicts: ["sys_user_sex", "project_special_type"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -330,6 +339,7 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
|
deptId: null,
|
||||||
activeName: null,
|
activeName: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
|
@ -376,17 +386,15 @@ export default {
|
||||||
wgq: "未过期(0)",
|
wgq: "未过期(0)",
|
||||||
ygq: "已过期(0)",
|
ygq: "已过期(0)",
|
||||||
},
|
},
|
||||||
|
project: null,
|
||||||
|
nodes: [],
|
||||||
|
unitActiveName: "",
|
||||||
|
onOpen: false,
|
||||||
|
drawerTitle: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {
|
watch: {},
|
||||||
formData: {
|
|
||||||
handler(value) {
|
|
||||||
this.formData = value;
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {},
|
created() {},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
beforeDestroy() {},
|
beforeDestroy() {},
|
||||||
|
@ -423,23 +431,37 @@ export default {
|
||||||
this.rules.credentialExpirationTime[0].required = false;
|
this.rules.credentialExpirationTime[0].required = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onOpen() {
|
show(project) {
|
||||||
this.queryParams.activeName = this.activeName;
|
this.project = project;
|
||||||
|
this.drawerTitle = project.projectName;
|
||||||
|
this.onOpen = true;
|
||||||
|
this.queryParams.projectId = project.id;
|
||||||
|
this.$api.publics
|
||||||
|
.queryUnitList({
|
||||||
|
projectId: project.id,
|
||||||
|
unitTypes: "2,4".split(","),
|
||||||
|
})
|
||||||
|
.then((d) => {
|
||||||
|
this.nodes = d.rows;
|
||||||
|
if (d.rows.length > 0) {
|
||||||
|
this.unitActiveName = this.nodes[0].unitId + "";
|
||||||
this.getList();
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.surProjectSpecialList = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onClose() {},
|
|
||||||
/** 查询特种人员列表 */
|
/** 查询特种人员列表 */
|
||||||
getList() {
|
getList() {
|
||||||
if (this.formData.projectId) {
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.projectId = this.formData.projectId;
|
this.queryParams.deptId = this.unitActiveName;
|
||||||
|
this.queryParams.activeName = this.activeName;
|
||||||
this.queryCount();
|
this.queryCount();
|
||||||
listSurProjectSpecial(this.queryParams).then((response) => {
|
listSurProjectSpecial(this.queryParams).then((response) => {
|
||||||
this.surProjectSpecialList = response.rows;
|
this.surProjectSpecialList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryCount() {
|
queryCount() {
|
||||||
findWorkSpecialCount(this.queryParams).then((response) => {
|
findWorkSpecialCount(this.queryParams).then((response) => {
|
||||||
|
@ -494,8 +516,9 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.credential = false;
|
this.credential = false;
|
||||||
this.form.projectId = this.formData.projectId;
|
this.form.projectId = this.project.id;
|
||||||
this.form.projectName = this.formData.projectName;
|
this.form.projectName = this.project.projectName;
|
||||||
|
this.form.deptId = this.unitActiveName;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加特种人员";
|
this.title = "添加特种人员";
|
||||||
},
|
},
|
||||||
|
@ -567,15 +590,4 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
@import "@/styles/mixin.scss";
|
|
||||||
|
|
||||||
::v-deep .el-drawer__header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@include action-bar;
|
|
||||||
|
|
||||||
.json-editor {
|
|
||||||
height: calc(100vh - 33px);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
||||||
videoDvrNumber: this.formData.videoDvrNumber,
|
videoDvrNumber: this.formData.videoDvrNumber,
|
||||||
passageState: "2",
|
passageState: "2",
|
||||||
};
|
};
|
||||||
editPassageState(param);
|
//editPassageState(param);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -164,7 +164,7 @@ export default {
|
||||||
videoDvrNumber: this.videoDvrNumber,
|
videoDvrNumber: this.videoDvrNumber,
|
||||||
passageState: "2",
|
passageState: "2",
|
||||||
};
|
};
|
||||||
editPassageState(param);
|
//editPassageState(param);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="emergency-container">
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-if="onOpen"
|
v-if="onOpen"
|
||||||
:visible.sync="onOpen"
|
:visible.sync="onOpen"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="65%"
|
size="60%"
|
||||||
style="padding-left: 20px"
|
style="padding-left: 20px"
|
||||||
>
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div>{{ title + " 【应急演练管理】" }}</div>
|
<div>{{ drawerTitle + " 【应急演练管理】" }}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-tabs
|
<el-tabs
|
||||||
v-model="activeName"
|
v-model="activeName"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<el-row
|
<el-row
|
||||||
:gutter="10"
|
:gutter="10"
|
||||||
class="mb8"
|
class="mb8"
|
||||||
style="margin-left: 25px; margin-top: 10px; margin-right: 0px"
|
style="margin-left: 25px; margin-top: 10px; margin-right: 20px"
|
||||||
>
|
>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -48,9 +48,8 @@
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="workTrainList"
|
:data="workTrainList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
style="margin-left: 25px"
|
|
||||||
>
|
>
|
||||||
<el-table-column label="演练主图" align="center" prop="mainImage" width="75">
|
<el-table-column label="演练主图" align="center" prop="mainImage" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-image
|
<el-image
|
||||||
ref="preview"
|
ref="preview"
|
||||||
|
@ -64,7 +63,7 @@
|
||||||
label="演练类型"
|
label="演练类型"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainNature"
|
prop="trainNature"
|
||||||
width="130"
|
width="180"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-if="false"
|
v-if="false"
|
||||||
>
|
>
|
||||||
|
@ -79,7 +78,7 @@
|
||||||
label="演练标题"
|
label="演练标题"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainTitle"
|
prop="trainTitle"
|
||||||
width="160"
|
width="220"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -97,7 +96,6 @@
|
||||||
label="演练内容"
|
label="演练内容"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainContent"
|
prop="trainContent"
|
||||||
width="170"
|
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -260,6 +258,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from "vuex";
|
||||||
import {
|
import {
|
||||||
listWorkTrain,
|
listWorkTrain,
|
||||||
getWorkTrain,
|
getWorkTrain,
|
||||||
|
@ -296,6 +295,7 @@ export default {
|
||||||
open: false,
|
open: false,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
drawerTitle: "",
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -356,12 +356,9 @@ export default {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onOpen() {
|
|
||||||
this.getworkTrainList();
|
|
||||||
},
|
|
||||||
show(project) {
|
show(project) {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
this.title = project.projectName;
|
this.drawerTitle = project.projectName;
|
||||||
this.onOpen = true;
|
this.onOpen = true;
|
||||||
this.queryParams.projectId = project.id;
|
this.queryParams.projectId = project.id;
|
||||||
this.$api.publics
|
this.$api.publics
|
||||||
|
@ -378,13 +375,6 @@ export default {
|
||||||
this.workTrainList = [];
|
this.workTrainList = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$api.publics
|
|
||||||
.selectProjectUnitUser({
|
|
||||||
projectId: project.id,
|
|
||||||
})
|
|
||||||
.then((d) => {
|
|
||||||
this.deptUserData = d.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 查询应急演练列表 */
|
/** 查询应急演练列表 */
|
||||||
getworkTrainList() {
|
getworkTrainList() {
|
||||||
|
@ -539,18 +529,4 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
@import "@/styles/mixin.scss";
|
|
||||||
|
|
||||||
::v-deep .el-drawer__header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@include action-bar;
|
|
||||||
|
|
||||||
.json-editor {
|
|
||||||
height: calc(100vh - 33px);
|
|
||||||
}
|
|
||||||
.div_tag {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
v-if="onOpen"
|
v-if="onOpen"
|
||||||
:visible.sync="onOpen"
|
:visible.sync="onOpen"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="65%"
|
size="60%"
|
||||||
style="padding-left: 20px"
|
style="padding-left: 20px"
|
||||||
>
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div>{{ title + " 【专项培训管理】" }}</div>
|
<div>{{ drawerTitle + " 【专项培训管理】" }}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-tabs
|
<el-tabs
|
||||||
v-model="activeName"
|
v-model="activeName"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<el-row
|
<el-row
|
||||||
:gutter="10"
|
:gutter="10"
|
||||||
class="mb8"
|
class="mb8"
|
||||||
style="margin-left: 25px; margin-top: 10px; margin-right: 0px"
|
style="margin-left: 20px; margin-top: 10px; margin-right: 20px"
|
||||||
>
|
>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -48,9 +48,8 @@
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="workTrainList"
|
:data="workTrainList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
style="margin-left: 25px"
|
|
||||||
>
|
>
|
||||||
<el-table-column label="培训主图" align="center" prop="mainImage" width="75">
|
<el-table-column label="培训主图" align="center" prop="mainImage" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-image
|
<el-image
|
||||||
ref="preview"
|
ref="preview"
|
||||||
|
@ -64,7 +63,7 @@
|
||||||
label="培训类型"
|
label="培训类型"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainNature"
|
prop="trainNature"
|
||||||
width="130"
|
width="180"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-if="false"
|
v-if="false"
|
||||||
>
|
>
|
||||||
|
@ -79,7 +78,7 @@
|
||||||
label="培训标题"
|
label="培训标题"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainTitle"
|
prop="trainTitle"
|
||||||
width="160"
|
width="220"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -97,7 +96,6 @@
|
||||||
label="培训内容"
|
label="培训内容"
|
||||||
align="center"
|
align="center"
|
||||||
prop="trainContent"
|
prop="trainContent"
|
||||||
width="170"
|
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -302,6 +300,7 @@ export default {
|
||||||
open: false,
|
open: false,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
drawerTitle: "",
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -362,12 +361,9 @@ export default {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onOpen() {
|
|
||||||
this.getworkTrainList();
|
|
||||||
},
|
|
||||||
show(project) {
|
show(project) {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
this.title = project.projectName;
|
this.drawerTitle = project.projectName;
|
||||||
this.onOpen = true;
|
this.onOpen = true;
|
||||||
this.queryParams.projectId = project.id;
|
this.queryParams.projectId = project.id;
|
||||||
this.$api.publics
|
this.$api.publics
|
||||||
|
@ -539,18 +535,4 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
@import "@/styles/mixin.scss";
|
|
||||||
|
|
||||||
::v-deep .el-drawer__header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@include action-bar;
|
|
||||||
|
|
||||||
.json-editor {
|
|
||||||
height: calc(100vh - 33px);
|
|
||||||
}
|
|
||||||
.div_tag {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
package com.ruoyi.web.project.controller;
|
package com.ruoyi.web.project.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.web.project.service.WxIProjectInfoService;
|
import com.ruoyi.web.project.service.WxIProjectInfoService;
|
||||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version : V1.0
|
* @version : V1.0
|
||||||
|
@ -23,6 +25,9 @@ import java.util.Map;
|
||||||
@RequestMapping("/wechat/project")
|
@RequestMapping("/wechat/project")
|
||||||
public class ProjectController extends BaseController {
|
public class ProjectController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
WxIProjectInfoService IProjectInfoService;
|
WxIProjectInfoService IProjectInfoService;
|
||||||
|
|
||||||
|
@ -56,7 +61,15 @@ public class ProjectController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/selectProjectByCompanyId")
|
@RequestMapping("/selectProjectByCompanyId")
|
||||||
public Object selectProjectByCompanyId(@RequestParam Map<String,Object> map) {
|
public Object selectProjectByCompanyId(@RequestParam Map<String,Object> map) {
|
||||||
return IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
//设置缓存
|
||||||
|
String key="wechat_project_selectProjectByCompanyId-deptId_"+map.get("deptId")+"-userId_"+map.get("userId")+"-minRoleId_"+map.get("minRoleId");
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> list = IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||||
|
redisCache.setCacheObject(key, list, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,7 +79,14 @@ public class ProjectController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/getProjectUnitList")
|
@RequestMapping("/getProjectUnitList")
|
||||||
public Object getProjectUnitList(String projectId){
|
public Object getProjectUnitList(String projectId){
|
||||||
return IProjectInfoService.getProjectUnitList(projectId);
|
String key="wechat_project_getProjectUnitList-projectId_"+projectId;
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
List<Map<String,Object>> list = IProjectInfoService.getProjectUnitList(projectId);
|
||||||
|
redisCache.setCacheObject(key, list, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
@ -4,13 +4,17 @@ import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.framework.web.service.SysLoginService;
|
import com.ruoyi.framework.web.service.SysLoginService;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.framework.web.service.TokenService;
|
||||||
import com.ruoyi.web.userLogin.service.IWechatUserLoginService;
|
import com.ruoyi.web.userLogin.service.IWechatUserLoginService;
|
||||||
|
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version : V1.0
|
* @version : V1.0
|
||||||
|
@ -23,6 +27,9 @@ import java.util.Map;
|
||||||
@RequestMapping("/wechat")
|
@RequestMapping("/wechat")
|
||||||
public class WechatUserLoginController extends BaseController {
|
public class WechatUserLoginController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysLoginService loginService;
|
private SysLoginService loginService;
|
||||||
|
|
||||||
|
@ -61,8 +68,18 @@ public class WechatUserLoginController extends BaseController {
|
||||||
public AjaxResult openIdLogin(@RequestBody LoginBody loginBody)
|
public AjaxResult openIdLogin(@RequestBody LoginBody loginBody)
|
||||||
{
|
{
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
Map<String,Object> data = null;
|
||||||
|
//设置缓存
|
||||||
|
String key="wechat_openIdLogin-"+loginBody.getOpenId();
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
data = (Map<String,Object>) obj;
|
||||||
|
ajax.put("data",data);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
ajax.put(Constants.TOKEN, "");
|
ajax.put(Constants.TOKEN, "");
|
||||||
Map<String,Object> data = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
data = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||||
|
redisCache.setCacheObject(key, data, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||||
if(data!=null){
|
if(data!=null){
|
||||||
ajax.put("data",data);
|
ajax.put("data",data);
|
||||||
return ajax;
|
return ajax;
|
||||||
|
@ -99,7 +116,17 @@ public class WechatUserLoginController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/selectDeptAll")
|
@RequestMapping("/selectDeptAll")
|
||||||
public AjaxResult selectDeptAll(@RequestParam Map<String,Object> map){
|
public AjaxResult selectDeptAll(@RequestParam Map<String,Object> map){
|
||||||
return success(wechatUserLoginService.getDeptAll(map));
|
Map<String,Object> data = null;
|
||||||
|
//设置缓存
|
||||||
|
String key="wechat_selectDeptAll-deptId_"+map.get("deptId")+"-userId_"+map.get("userId")+"-minRoleId_"+map.get("minRoleId");
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
data = (Map<String,Object>) obj;
|
||||||
|
return success(data);
|
||||||
|
}
|
||||||
|
data = wechatUserLoginService.getDeptAll(map);
|
||||||
|
redisCache.setCacheObject(key, data, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||||
|
return success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
|
||||||
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
|
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
|
||||||
{
|
{
|
||||||
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
|
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
|
||||||
surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
|
//surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
|
||||||
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
|
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
|
||||||
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
|
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
|
||||||
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);
|
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);
|
||||||
|
|
|
@ -62,8 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||||
<!--普通用户查询项目人员-->
|
<!--普通用户查询项目人员-->
|
||||||
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||||
|
<if test="deptId != null"> left join work_train_dept wtd2 on wtd2.train_id = wt.id and wtd2.is_main ='Y'</if>
|
||||||
<where>
|
<where>
|
||||||
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
||||||
|
<if test="deptId != null"> and wtd2.dept_id = #{deptId}</if>
|
||||||
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
|
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
|
||||||
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
|
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
|
||||||
<if test="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if>
|
<if test="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if>
|
||||||
|
@ -76,8 +78,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
|
||||||
<!--普通用户查询项目人员-->
|
<!--普通用户查询项目人员-->
|
||||||
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
Loading…
Reference in New Issue