From dd033b96c11cb484a6b7b99381b9b7bc820307de Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 21 八月 2024 17:11:24 +0800
Subject: [PATCH] 最新版本
---
admin/src/components/common/RichEditor.vue | 46 +-
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 3
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java | 24 +
server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java | 22 +
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java | 3
admin/src/components/system/dict/OperaDictDataWindow.vue | 6
server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml | 2
admin/src/components/business/OperaPlatformApproveTemplWindow.vue | 708 +++++++++++++++++++++++++++++++++++++++++
admin/src/views/platform/platformReason.vue | 6
server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java | 23 +
admin/src/api/system/common.js | 9
admin/src/views/platform/set/application.vue | 51 ++
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java | 9
server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java | 5
admin/src/components/system/dict/DictDataManagerWindow.vue | 1
server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java | 50 ++
admin/src/api/business/index.js | 3
17 files changed, 934 insertions(+), 37 deletions(-)
diff --git a/admin/src/api/business/index.js b/admin/src/api/business/index.js
index 9527106..e77b0cd 100644
--- a/admin/src/api/business/index.js
+++ b/admin/src/api/business/index.js
@@ -11,4 +11,7 @@
export function approveTemplByType (type) {
return request.get(`/visitsAdmin/cloudService/business/approveTempl/${type}`)
}
+export function approveTemplById (id) {
+ return request.get(`/visitsAdmin/cloudService/business/approveTempl/findById/${id}`)
+}
export const uploadUrl = 'visitsAdmin/cloudService/public/upload'
diff --git a/admin/src/api/system/common.js b/admin/src/api/system/common.js
index 3ccd1e5..00464f8 100644
--- a/admin/src/api/system/common.js
+++ b/admin/src/api/system/common.js
@@ -41,6 +41,15 @@
export function updateVisitConfig (data) {
return request.post('/visitsAdmin/cloudService/system/dictData/updateVisitConfig', data)
}
+// 鏈堝彴鍩虹璁剧疆閰嶇疆
+export function getPlatformConfigDTO () {
+ return request.get('/visitsAdmin/cloudService/system/dictData/getPlatformConfigDTO')
+}
+
+// 鏈堝彴鍩虹璁剧疆閰嶇疆淇敼
+export function updatePlatformConfig (data) {
+ return request.post('/visitsAdmin/cloudService/system/dictData/updatePlatformConfig', data)
+}
// 淇敼鍔冲姟鏉ヨ閰嶇疆
export function updateLaborConfigDTO (data) {
diff --git a/admin/src/components/business/OperaPlatformApproveTemplWindow.vue b/admin/src/components/business/OperaPlatformApproveTemplWindow.vue
new file mode 100644
index 0000000..902bf73
--- /dev/null
+++ b/admin/src/components/business/OperaPlatformApproveTemplWindow.vue
@@ -0,0 +1,708 @@
+<template>
+ <GlobalWindow
+ :title="title"
+ width="100%"
+ :visible.sync="visible"
+ :confirm-working="isWorking"
+ @confirm="confirm"
+ >
+ <TableLayout>
+ <template v-slot:table-wrap>
+ <div class="config">
+ <div class="config_list">
+ <div class="config_list_head">
+ <span>閰嶇疆娴佺▼</span>
+ </div>
+ <div class="config_content">
+ <div class="item">
+ <div class="head">鍙戣捣浜�</div>
+ <div class="content">鐗╂祦鍙告満</div>
+ </div>
+ <div class="arrows">
+ <div class="line"></div>
+ <img src="@/assets/images/peizhi_ar@2x.png" alt="" />
+ </div>
+ <div v-for="(item, index) in apprList" :key="index">
+ <div
+ class="item yellow"
+ :class="{
+ active: activeIndex == index,
+ blue: item.type == '1',
+ }"
+ @click="flowClick(index)"
+ >
+ <div class="head">{{ item.remark }}</div>
+ <div class="content">
+ <!-- 瀹℃壒 -->
+ <template v-if="item.type == 0">
+ <template v-if="item.memberType == '2'">
+ <div>閮ㄩ棬涓荤</div>
+ </template>
+ <template v-if="item.memberType == '1'">
+ <div v-if="item.objIds && item.objIds.length === 1">
+ <span
+ >{{ item.objIds[0].name }}
+ {{ item.objIds[0].companyName }}</span
+ >
+ <span v-if="item.approveType == 0 && item.type == '0'">
+ 鎴栫</span
+ >
+ <span v-if="item.approveType == 1 && item.type == '0'">
+ 浼氱</span
+ >
+ </div>
+ <div v-else-if="item.objIds && item.objIds.length > 1">
+ <span>{{ item.objIds[0].name }} 绛�</span>
+ <span v-if="item.approveType == 0 && item.type == '0'">
+ 鎴栫</span
+ >
+ <span v-if="item.approveType == 1 && item.type == '0'">
+ 浼氱</span
+ >
+ </div>
+ <div v-else>璇烽�夋嫨</div>
+ <i class="el-icon-arrow-right"></i>
+ </template>
+ </template>
+ <!-- 鎶勯�� -->
+ <template v-if="item.type == 1">
+ <div v-if="item.objIds && item.objIds.length === 1">
+ <span
+ >{{ item.objIds[0].name }}
+ {{ item.objIds[0].companyName }}</span
+ >
+ </div>
+ <div v-else-if="item.objIds && item.objIds.length > 1">
+ <span>{{ item.objIds[0].name }} 绛�</span>
+ </div>
+ <div v-else>璇烽�夋嫨</div>
+ <i
+ v-if="item.memberType == '1'"
+ class="el-icon-arrow-right"
+ ></i>
+ </template>
+ </div>
+ </div>
+ <div class="arrows">
+ <template v-if="apprList.length - 1 !== index">
+ <div class="line"></div>
+ <img src="@/assets/images/peizhi_ar@2x.png" alt="" />
+ </template>
+ <i
+ v-if="apprList.length - 2 === index"
+ @click="handleAddAppr()"
+ class="el-icon-circle-plus add"
+ ></i>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="config_data">
+ <div class="config_data_item">
+ <div class="config_data_item_label">閫夋嫨璇ヨ妭鐐圭殑瀹℃壒浜�</div>
+ <div class="df_ac mb10">
+ <div>瀹℃壒鑺傜偣鍚嶇О</div>
+ <el-input
+ class="w200 ml10"
+ v-model="apprList[activeIndex].remark"
+ ></el-input>
+ </div>
+ <!-- 鎶勯�佷汉 -->
+ <template v-if="apprList[activeIndex].type == '1'">
+ <div class="config_data_item_reviewed_content">
+ <div
+ v-for="mem in apprList[activeIndex].objIds"
+ :key="mem.id"
+ class="config_data_item_reviewed_content_item"
+ >
+ <span>{{ mem.name }}</span>
+ <i class="el-icon-close"></i>
+ </div>
+ <span class="add" @click="selStaff">+娣诲姞</span>
+ </div>
+ </template>
+ <el-radio-group
+ v-if="apprList[activeIndex].type == '0'"
+ v-model="apprList[activeIndex].memberType"
+ >
+<!-- <el-radio :label="0">鐢宠浜�</el-radio>-->
+ <el-radio :label="1">鎸囧畾浜哄憳</el-radio>
+ <el-radio :label="2">閮ㄩ棬涓荤</el-radio>
+ </el-radio-group>
+ <div
+ class="config_data_item_reviewed"
+ v-if="apprList[activeIndex].memberType == 1"
+ >
+ <div class="config_data_item_reviewed_label">
+ <span>鎸囧畾瀹℃牳浜�</span>
+ <span>涓嶈秴杩�20浜�</span>
+ </div>
+ <div class="config_data_item_reviewed_content">
+ <div
+ v-for="(mem, memIndex) in apprList[activeIndex].objIds"
+ :key="mem.id"
+ class="config_data_item_reviewed_content_item"
+ >
+ <span>{{ mem.name }}</span>
+ <i class="el-icon-close" @click="memDel(memIndex)"></i>
+ </div>
+ <span class="add" @click="selStaff">+娣诲姞</span>
+ </div>
+ </div>
+ <div
+ class="config_data_item_reviewed"
+ v-if="apprList[activeIndex].memberType == 2"
+ >
+ <div class="config_data_item_reviewed_label">
+ <span>閮ㄩ棬涓荤</span>
+ </div>
+ <div class="config_data_item_reviewed_r">
+ <span>鐢宠浜虹殑</span>
+ <el-select
+ v-model="apprList[activeIndex].objLevel"
+ placeholder="璇烽�夋嫨"
+ style="margin: 0 20px 0 10px"
+ >
+ <el-option label="鐩存帴涓荤" :value="0" />
+ <el-option label="浜岀骇涓荤" :value="1" />
+ <el-option label="涓夌骇涓荤" :value="2" />
+ <el-option label="鍥涚骇涓荤" :value="4" />
+ </el-select>
+ <el-checkbox
+ v-model="apprList[activeIndex].noleaderOpt"
+ :true-label="1"
+ :false-label="0"
+ >鎵句笉鍒颁富绠℃椂锛岀敱涓婄骇涓荤浠e鏍�</el-checkbox>
+ </div>
+ </div>
+ </div>
+ <div
+ class="config_data_item"
+ v-if="
+ (apprList[activeIndex].memberType == 1 ||
+ apprList[activeIndex].memberType == 2) &&
+ apprList[activeIndex].type == '0'
+ "
+ >
+ <div class="config_data_item_label">
+ 瀹℃壒鏂瑰紡
+ <span>瀹℃壒浜轰负澶氫釜鏃讹紝閲囩敤鐨勫鎵规柟寮�</span>
+ </div>
+ <el-radio-group
+ v-model="apprList[activeIndex].approveType"
+ style="display: flex; flex-direction: column"
+ >
+ <el-radio :label="0" style="margin-bottom: 20px"
+ >鎴栫锛堝叾涓竴鍚嶅鎵逛汉鍚屾剰鎴栨嫆缁濆嵆鍙級</el-radio
+ >
+ <el-radio :label="1">浼氱锛堟墍鏈夊鎵逛汉閮藉悓鎰忔墠鍙�氳繃锛�</el-radio>
+ </el-radio-group>
+ </div>
+ <div class="config_data_submit">
+ <el-button
+ @click="onSubmit"
+ :loading="subLoading"
+ style="background: #435ebe"
+ type="primary"
+ >淇濆瓨閰嶇疆椤�</el-button
+ >
+ <el-button
+ v-if="activeIndex !== 0 && activeIndex !== apprList.length - 1"
+ type="danger"
+ plain
+ @click="handleDel"
+ >鍒犻櫎鑺傜偣</el-button
+ >
+ </div>
+ </div>
+ </div>
+ </template>
+ <!-- -->
+ <el-dialog title="閫夋嫨鍛樺伐" :visible.sync="isShowTransfer" width="1000px" style="z-index: 99999" append-to-body>
+ <div class="staff_modal">
+ <div class="left">
+ <div
+ style="
+ width: 100%;
+ height: 50px;
+ background: rgba(242, 242, 242, 1);
+ line-height: 50px;
+ text-align: center;
+ font-size: 14px;
+ "
+ >
+ 浼佷笟缁勭粐鏋舵瀯
+ </div>
+ <div style="width: 100%; height: 100%; overflow-y: scroll">
+ <Tree
+ :list="companyTree"
+ :defaultProps="{
+ name: 'name',
+ status: 'fsStatus',
+ children: 'childList',
+ id: 'id',
+ }"
+ @callback="callback"
+ />
+ </div>
+ </div>
+ <el-transfer
+ filterable
+ :title="['鏈��', '宸查��']"
+ openAll
+ :props="{ label: 'name', key: 'keyTemp' }"
+ filter-placeholder="鎼滅储鍛樺伐"
+ v-model="searchForm.objIds"
+ :data="memberList"
+ class="transfer"
+ >
+ </el-transfer>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="isShowTransfer = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="TransferSub">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </TableLayout>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="visible= false">杩斿洖</el-button>
+ </span>
+ </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import TableLayout from '@/layouts/TableLayout'
+import Tree from '@/components/common/Tree'
+import {approveTemplSave, approveTemplById} from '@/api'
+import { fetchList } from '@/api/business/company'
+import { fetchList as memberListPost } from '@/api/business/member'
+import GlobalWindow from '@/components/common/GlobalWindow'
+export default {
+ name: 'OperaPlatformReasonWindow',
+ extends: BaseOpera,
+ components: { Tree, GlobalWindow, TableLayout },
+ data () {
+ return {
+ model:{},
+ reasonId: null,
+ activeType: '6',
+ subLoading: false,
+ apprList: [
+ { remark: '瀹℃壒浜�', active: false,memberType:1, type: '1', objIds: [] },
+ { remark: '鎶勯�佷汉', active: false, type: '1', objIds: [] }
+ ],
+ activeIndex: 0,
+ param: {},
+ searchForm: {},
+ isShowTransfer: false,
+ memberList: [],
+ companyTree: []
+ }
+ },
+ created () {
+
+ },
+ methods: {
+ open (title, row) {
+ this.title = title + '銆�' + row.reason + '銆�'
+ this.visible = true
+ this.reasonId = row.id
+ this.model = row
+ this.getfindCompanyTreePage()
+ this.apprList = [
+ { remark: '瀹℃壒浜�', active: false, type: '0',memberType:1, objIds: [] },
+ { remark: '鎶勯�佷汉', active: false, type: '1', objIds: [] }
+ ]
+ this.param = {}
+ this.searchForm = {}
+ this.isShowTransfer = false
+ this.memberList = []
+ this.companyTree = []
+ this.initDate()
+ },
+ flowClick (i) {
+ this.activeIndex = i
+ this.apprList.forEach((item, index) => {
+ if (i === index) {
+ item.active = true
+ if (item.objIds && item.objIds.length > 0) {
+ const objIds = item.objIds.map(i => {
+ return `${i.id}-${i.name}${i.companyName ? '-' + i.companyName : ''}`
+ })
+ this.$set(this.searchForm, 'objIds', objIds)
+ } else {
+ this.$set(this.searchForm, 'objIds', [])
+ }
+ } else {
+ item.active = false
+ }
+ })
+ },
+ initDate () {
+ if(this.model.approveTemplId){
+ approveTemplById(this.model.approveTemplId).then(res => {
+ if (res && res.paramList) {
+ const arr = res.paramList || []
+ arr.forEach(item => {
+ if (item.memberList && item.memberList.length > 0) {
+ item.objIds = item.memberList.map(i => {
+ return {
+ id: i.id,
+ name: i.name,
+ companyName: i.companyName
+ }
+ })
+ }
+ })
+ this.apprList = arr
+ this.flowClick(0)
+ this.$forceUpdate()
+ }
+ // console.log(res);
+ })
+ }
+ },
+ onSubmit () {
+ const { apprList, activeType } = this
+ const temp = JSON.parse(JSON.stringify(apprList))
+ temp.forEach((item, index) => {
+ item.level = index + 1
+ if (item.objIds && item.objIds.length > 0) {
+ item.objIds = item.objIds.map(i => i.id).join(',')
+ } else {
+ item.objIds = ''
+ }
+ })
+ this.subLoading = true
+ approveTemplSave({
+ type: activeType,
+ reasonId:this.model.id,
+ paramList: temp
+ }).then(res => {
+ this.subLoading = false
+ this.$emit('success')
+ this.$tip.success('淇濆瓨鎴愬姛')
+ }, () => {
+ this.subLoading = false
+ })
+ },
+ handleDel () {
+ const { activeIndex } = this
+ this.apprList.splice(activeIndex, 1)
+ this.activeIndex = 0
+ },
+ handleAddAppr () {
+ this.apprList.splice(this.apprList.length - 1, 0, { remark: '瀹℃壒浜�', active: false,memberType:1, type: 0, objIds: [] })
+ // this.apprList.push({ remark: '瀹℃壒浜�', active: false, type: '0' })
+ },
+ // 鑾峰彇缁勭粐鏍�
+ getfindCompanyTreePage () {
+ fetchList()
+ .then(res => {
+ if (res && res.length > 0) {
+ res[0].fsStatus = 1
+ this.companyTree = res
+ // // this.searchForm.erpOrgId = res[0].erpId
+ // this.search()
+ // this.department = this.getDepartmentTree(res)
+ }
+ })
+ },
+ getMemberList () {
+ memberListPost({
+ model: {
+ companyId: this.searchForm.companyId || '',
+ canVisit: '',
+ companyType: 1,
+ erpOrgId: '',
+ hasFace: '',
+ hkStatus: '',
+ includeChild: false,
+ type: 2
+ },
+ page: 1,
+ capacity: 30
+ }).then(res => {
+ this.memberList = res.records || []
+ this.memberList.forEach(item => {
+ item.keyTemp = item.id + '-' + item.name + '-' + item.companyName || ''
+ })
+ // console.log('defaultProps', res)
+ })
+ },
+ callback (row) {
+ console.log(row)
+ this.$set(this.searchForm, 'companyId', row.id)
+ this.$set(this.searchForm, 'erpOrgId', row.erpId)
+ this.getMemberList()
+ },
+ TransferSub () {
+ const { activeIndex } = this
+ if (this.searchForm.objIds && this.searchForm.objIds.length > 0) {
+ if (this.searchForm.objIds.length > 20) return this.$message.warning('鏈�澶氶�夋嫨20浜�')
+ const arr = this.searchForm.objIds.map(ii => {
+ const obj = ii.split('-')
+ return {
+ id: Number(obj[0]),
+ name: obj[1],
+ companyName: obj[2] || ''
+ }
+ })
+ this.apprList.forEach((item, index) => {
+ if (activeIndex === index) {
+ item.objIds = arr
+ }
+ })
+ }
+ this.isShowTransfer = false
+ console.log(this.searchForm.objIds)
+ },
+ memDel (memIndex) {
+ const { activeIndex } = this
+ this.apprList.forEach((item, index) => {
+ if (activeIndex === index) {
+ item.objIds.splice(memIndex, 1)
+ const objIds = item.objIds.map(i => {
+ return i.id + '-' + i.name
+ })
+ this.$set(this.searchForm, 'objIds', objIds)
+ }
+ })
+ },
+ selStaff () {
+ this.isShowTransfer = true
+ this.getMemberList()
+ },
+ seleItem (i) {
+ this.list.forEach((item, index) => {
+ item.active = index === i
+ })
+ }
+ }
+}
+</script>
+<style lang="scss" scoped>
+.labelTip{
+ font-size: 12px;
+ color: #666666;
+}
+.config {
+ width: 100%;
+ padding-bottom: 20px;
+ box-sizing: border-box;
+ height: calc(100vh - 140px);
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+.config_list {
+ width: 543px;
+ height: 100%;
+ flex-shrink: 0;
+ border-radius: 2px;
+ padding: 20px;
+ box-sizing: border-box;
+ border: 1px solid #eeeeee;
+ background: #f7f7f7;
+.config_list_head {
+ width: 100%;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+span {
+ font-size: 18px;
+ font-weight: 500;
+ color: #222222;
+}
+}
+.config_content {
+ width: 100%;
+ height: calc(100% - 40px);
+ padding-top: 45px;
+ box-sizing: border-box;
+ overflow-y: scroll;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+&::-webkit-scrollbar {
+ width: 0;
+ }
+.active {
+ border: 2px solid #4456ac !important;
+}
+.yellow {
+ background: #e89e42 !important;
+}
+.blue {
+ background: #5094f3 !important;
+}
+.arrows {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ position: relative;
+.line {
+ width: 1px;
+ height: 60px;
+ background-color: #ccc;
+}
+.add {
+ font-size: 40px;
+ color: #2080f7;
+ position: absolute;
+ cursor: pointer;
+ z-index: 999;
+ top: 10px;
+}
+img {
+ width: 12px;
+}
+}
+.item {
+ width: 200px;
+ cursor: pointer;
+ border: 2px solid #f7f7f7;
+ height: 80px;
+ background: #4456ac;
+ border-radius: 2px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+.head {
+ height: 32px;
+ line-height: 32px;
+ padding: 2px 12px;
+ color: #fff;
+}
+.content {
+ flex: 1;
+ background-color: #fff;
+ display: flex;
+ align-items: center;
+ padding: 0 12px;
+ justify-content: space-between;
+}
+&:last-child {
+ margin: 0 !important;
+ }
+}
+}
+}
+.config_data {
+ flex: 1;
+ height: 100%;
+ margin-left: 20px;
+.config_data_submit {
+ margin-top: 50px;
+}
+.config_data_item {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 30px;
+&:last-child {
+ margin: 0 !important;
+ }
+.config_data_item_label {
+ font-size: 16px;
+ font-weight: 500;
+ color: #222222;
+ margin-bottom: 20px;
+span {
+ font-size: 12px;
+ font-weight: 400;
+ color: #999999;
+ margin-left: 10px;
+}
+}
+.config_data_item_reviewed {
+ width: 100%;
+ margin-top: 20px;
+.config_data_item_reviewed_r {
+ margin-top: 10px;
+ width: 100%;
+ display: flex;
+ align-items: center;
+span {
+ flex-shrink: 0;
+ font-size: 14px;
+ font-weight: 400;
+ color: #666666;
+}
+}
+.config_data_item_reviewed_label {
+ display: flex;
+ align-items: center;
+span {
+&:nth-child(1) {
+ font-size: 14px;
+ font-weight: 400;
+ color: #222222;
+ }
+&:nth-child(2) {
+ font-size: 12px;
+ font-weight: 400;
+ color: #999999;
+ margin-left: 8px;
+ }
+}
+}
+}
+}
+}
+}
+.config_data_item_reviewed_content {
+ width: 400px;
+ margin-top: 10px;
+ height: 110px;
+ padding: 12px;
+ box-sizing: border-box;
+ border-radius: 2px;
+ border: 1px solid #dfe2e8;
+ display: flex;
+ align-items: flex-start;
+ flex-wrap: wrap;
+.add {
+ font-size: 12px;
+ font-weight: 400;
+ color: #435ebe;
+ cursor: pointer;
+ margin-top: 3px;
+}
+.config_data_item_reviewed_content_item {
+ padding: 3px 5px;
+ background: #f4f7fc;
+ border-radius: 2px;
+ box-sizing: border-box;
+ margin-right: 10px;
+ margin-bottom: 10px;
+span {
+ font-size: 12px;
+ font-weight: 400;
+ color: #333333;
+}
+i {
+ color: #949ba2;
+ margin-left: 10px;
+ cursor: pointer;
+}
+}
+}
+.staff_modal {
+ display: flex;
+.left {
+ width: 300px;
+ margin-right: 20px;
+}
+.transfer {
+ height: 600px;
+::v-deep .el-transfer-panel__body {
+ height: 500px;
+}
+::v-deep .el-transfer-panel__list.is-filterable {
+ height: 480px;
+}
+}
+}
+</style>
diff --git a/admin/src/components/common/RichEditor.vue b/admin/src/components/common/RichEditor.vue
index bdcf1bf..09786fb 100644
--- a/admin/src/components/common/RichEditor.vue
+++ b/admin/src/components/common/RichEditor.vue
@@ -69,23 +69,23 @@
// "numberedList", // 鏈夊簭鍒楄〃
// "codeSelectLang" // 閫夋嫨璇█
// 琛ㄦ牸鍔熻兘鍒嗙粍
- /* {
- key: 'table-style', // 蹇呭~锛岃浠� group 寮�澶�
- title: '琛ㄦ牸', // 蹇呭~
- // iconSvg: '<svg>....</svg>', // 鍙��
- menuKeys: [
- "insertTable", // 鎻掑叆琛ㄦ牸
- "deleteTable", // 鍒犻櫎琛ㄦ牸
- "insertTableRow", // 鎻掑叆琛�
- "deleteTableRow", // 鍒犻櫎琛�
- "insertTableCol", // 鎻掑叆鍒�
- "deleteTableCol", // 鍒犻櫎鍒�
- "tableHeader", // 琛ㄥご
- "tableFullWidth", // 瀹藉害鑷�傚簲
- ] // 涓嬬骇鑿滃崟 key 锛屽繀濉�
- },*/
+ /* {
+ key: 'table-style', // 蹇呭~锛岃浠� group 寮�澶�
+ title: '琛ㄦ牸', // 蹇呭~
+ // iconSvg: '<svg>....</svg>', // 鍙��
+ menuKeys: [
+ "insertTable", // 鎻掑叆琛ㄦ牸
+ "deleteTable", // 鍒犻櫎琛ㄦ牸
+ "insertTableRow", // 鎻掑叆琛�
+ "deleteTableRow", // 鍒犻櫎琛�
+ "insertTableCol", // 鎻掑叆鍒�
+ "deleteTableCol", // 鍒犻櫎鍒�
+ "tableHeader", // 琛ㄥご
+ "tableFullWidth", // 瀹藉害鑷�傚簲
+ ] // 涓嬬骇鑿滃崟 key 锛屽繀濉�
+ },*/
// 涓婁紶鍥剧墖鍒嗙粍
- /* {
+ {
key: 'img-style', // 蹇呭~锛岃浠� group 寮�澶�
title: '鍥剧墖', // 蹇呭~
// iconSvg: '<svg>....</svg>', // 鍙��
@@ -98,9 +98,9 @@
"imageWidth50", // 鍥剧墖瀹藉害鐩稿浜庣紪杈戝櫒瀹藉害鐨勭櫨鍒嗘瘮50
"imageWidth100", // 鍥剧墖瀹藉害鐩稿浜庣紪杈戝櫒瀹藉害鐨勭櫨鍒嗘瘮100
] // 涓嬬骇鑿滃崟 key 锛屽繀濉�
- },*/
+ },
// 瑙嗛鍒嗙粍
- /* {
+ {
key: 'video-style', // 蹇呭~锛岃浠� group 寮�澶�
title: '瑙嗛', // 蹇呭~
// iconSvg: '<svg>....</svg>', // 鍙��
@@ -109,7 +109,7 @@
"uploadVideo", // 涓婁紶瑙嗛
"editVideoSize", // 淇敼瑙嗛灏哄
] // 涓嬬骇鑿滃崟 key 锛屽繀濉�
- },*/
+ },
"fullScreen", // 鍏ㄥ睆
],
excludeKeys: [ // 闅愯棌鎸囧畾鐨勮彍鍗曢」
@@ -128,7 +128,7 @@
MENU_CONF: {
// 鍥剧墖涓婁紶
uploadImage: {
- server: process.env.VUE_APP_BASE_API + "/common/upload",
+ server: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload?folder=richeditor',
fieldName: 'file',
// 鍗曚釜鏂囦欢鐨勬渶澶т綋绉檺鍒讹紝榛樿涓� 2M
maxFileSize: 10 * 1024 * 1024, // 10M
@@ -177,7 +177,7 @@
// message: `${res.data.originalName} 涓婁紶澶辫触锛岃閲嶆柊灏濊瘯`
// });
}
- insertFn(res.url, res.originalFilename, res.newFileName);
+ insertFn(res.data.url, res.data.originname, res.data.imgname);
},
// 鍗曚釜鏂囦欢涓婁紶鎴愬姛涔嬪悗
@@ -201,7 +201,7 @@
// 瑙嗛涓婁紶
uploadVideo: {
fieldName: 'file',
- server: process.env.VUE_APP_BASE_API + "/common/upload",
+ server: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=richeditor',
// 鍗曚釜鏂囦欢鐨勬渶澶т綋绉檺鍒讹紝榛樿涓� 10M
maxFileSize: 50 * 1024 * 1024, // 50M
// 鏈�澶氬彲涓婁紶鍑犱釜鏂囦欢锛岄粯璁や负 5
@@ -243,7 +243,7 @@
// message: `${res.data.originalName} 涓婁紶澶辫触锛岃閲嶆柊灏濊瘯`
// });
}
- insertFn(res.data.link, res.data.link);
+ insertFn(res.data.url, res.data.url);
},
// 涓婁紶杩涘害鐨勫洖璋冨嚱鏁�
onProgress(progress) {
diff --git a/admin/src/components/system/dict/DictDataManagerWindow.vue b/admin/src/components/system/dict/DictDataManagerWindow.vue
index 47040b9..f1e0f4a 100644
--- a/admin/src/components/system/dict/DictDataManagerWindow.vue
+++ b/admin/src/components/system/dict/DictDataManagerWindow.vue
@@ -37,6 +37,7 @@
<el-table-column prop="updateUser" label="鏇存柊浜�" min-width="100px">
<template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template>
</el-table-column>
+ <el-table-column prop="remark" label="璇存槑" min-width="100px"></el-table-column>
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="100px"></el-table-column>
<el-table-column prop="updateTime" label="鏇存柊鏃堕棿" min-width="100px"></el-table-column>
<el-table-column
diff --git a/admin/src/components/system/dict/OperaDictDataWindow.vue b/admin/src/components/system/dict/OperaDictDataWindow.vue
index c544b59..e4b331a 100644
--- a/admin/src/components/system/dict/OperaDictDataWindow.vue
+++ b/admin/src/components/system/dict/OperaDictDataWindow.vue
@@ -6,6 +6,9 @@
@confirm="confirm"
>
<el-form :model="form" ref="form" :rules="rules">
+ <el-form-item label="鏁版嵁璇存槑" prop="label" required>
+ <el-input v-model="form.remark" placeholder="璇疯緭鍏ユ暟鎹鏄�" v-trim maxlength="50"/>
+ </el-form-item>
<el-form-item label="鏁版嵁鏍囩" prop="label" required>
<el-input v-model="form.label" placeholder="璇疯緭鍏ユ暟鎹爣绛�" v-trim maxlength="50"/>
</el-form-item>
@@ -43,7 +46,8 @@
code: '',
label: '',
disabled: false,
- istext: false
+ istext: false,
+ remark:''
},
// 楠岃瘉瑙勫垯
rules: {
diff --git a/admin/src/views/platform/platformReason.vue b/admin/src/views/platform/platformReason.vue
index 181267c..ff23a60 100644
--- a/admin/src/views/platform/platformReason.vue
+++ b/admin/src/views/platform/platformReason.vue
@@ -60,7 +60,7 @@
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('缂栬緫鏈堝彴鍏ュ洯鍘熷洜', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">瀹℃壒娴�</el-button>
+ <el-button type="text" @click="$refs.OperaPlatformApproveTemplWindow.open('鏈堝彴鍏ュ洯鍘熷洜瀹℃壒娴�', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">瀹℃壒娴�</el-button>
<el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('缂栬緫鏈堝彴鍏ュ洯鍘熷洜', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">缂栬緫</el-button>
<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:platformreason:delete']">鍒犻櫎</el-button>
</template>
@@ -75,6 +75,7 @@
</template>
<!-- 鏂板缓/淇敼 -->
<OperaPlatformReasonWindow ref="OperaPlatformReasonWindow" @success="handlePageChange"/>
+ <OperaPlatformApproveTemplWindow ref="OperaPlatformApproveTemplWindow" @success="handlePageChange"/>
</TableLayout>
</template>
@@ -84,11 +85,12 @@
import SearchFormCollapse from '@/components/common/SearchFormCollapse'
import Pagination from '@/components/common/Pagination'
import OperaPlatformReasonWindow from '@/components/business/OperaPlatformReasonWindow'
+import OperaPlatformApproveTemplWindow from '@/components/business/OperaPlatformApproveTemplWindow'
import { allList } from '@/api/platform/platformGroup'
export default {
name: 'Platform',
extends: BaseTable,
- components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformReasonWindow },
+ components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformReasonWindow, OperaPlatformApproveTemplWindow },
data () {
return {
groupList: [],
diff --git a/admin/src/views/platform/set/application.vue b/admin/src/views/platform/set/application.vue
index 078a60c..da1562e 100644
--- a/admin/src/views/platform/set/application.vue
+++ b/admin/src/views/platform/set/application.vue
@@ -1,7 +1,7 @@
<template>
<div class="main_app">
<el-form
- :model="param"
+ :model="form"
:rules="rules"
label-suffix="锛�"
ref="ruleForm"
@@ -11,19 +11,19 @@
<el-select v-model="param.aa" class="w400" placeholder="璇烽�夋嫨锛屽閫�">
<el-option></el-option>
</el-select>
- </el-form-item> -->
+ </el-form-item>
<el-form-item label="甯傚叕鍙告棩浣滀笟閲�">
<el-input v-model="param.bbb" class="w400" placeholder="璇疯緭鍏�"></el-input>
<span>涓囨敮</span>
+ </el-form-item>-->
+ <el-form-item label="鐗╂祦杞﹂绾︽寚鍗�" required label-width="180px">
+ <RichEditor :richData="form.bookTips" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/>
</el-form-item>
- <el-form-item label="鐗╂祦杞﹂绾︽寚鍗�">
- <RichEditor v-model="param.context" style="width: 900px" :default="param.context" />
- </el-form-item>
- <el-form-item label="鐗╂祦杞﹀洯鍖哄瑙堝浘">
- <RichEditor v-model="param.context" style="width: 900px" placeholder="璇疯緭鍏ュ唴瀹�" :default="param.context" />
+ <el-form-item label="鐗╂祦杞﹀洯鍖哄瑙堝浘" required label-width="180px">
+ <RichEditor :richData="form.tipsImg" :styleEditor="styleEditor" @getWangedditor="getWangedditor1" :readonly="false"/>
</el-form-item>
<el-form-item>
- <el-button type="primary">淇濆瓨閰嶇疆椤�</el-button>
+ <el-button type="primary" @click="submit">淇濆瓨閰嶇疆椤�</el-button>
</el-form-item>
</el-form>
@@ -32,17 +32,48 @@
<script>
import RichEditor from '@/components/common/RichEditor'
+import { getPlatformConfigDTO, updatePlatformConfig } from '@/api/system/common'
export default {
components: {
RichEditor: RichEditor
},
data () {
return {
- param: {
- context: 'qqq'
+ styleEditor:'border: 1px solid #ccc;display: inline-block;',
+ form: {
+ bookTips: '',
+ tipsImg: ''
},
rules: {}
}
+ },
+ created () {
+ this.getData()
+ },
+ methods: {
+ getWangedditor(val){
+ this.form.bookTips =val
+ },
+ getWangedditor1(val){
+ this.form.tipsImg =val
+ },
+ getData: function () {
+ getPlatformConfigDTO({})
+ .then(res => {
+ this.form.tipsImg = res.tipsImg
+ this.form.bookTips = res.bookTips
+ })
+ },
+ submit () {
+ updatePlatformConfig({
+ tipsImg: this.form.tipsImg,
+ bookTips: this.form.bookTips
+ }).then(res => {
+ this.$message.success('淇濆瓨鎴愬姛')
+ this.getData()
+ })
+ }
+
}
}
</script>
diff --git a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
index ffdaee2..868ae70 100644
--- a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
+++ b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
@@ -9,6 +9,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
+import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDictData;
@@ -121,4 +122,25 @@
systemDictDataService.updateVisitConfig(visitConfigDTO);
return ApiResponse.success(null);
};
+ /**
+ * 璁垮鏉ヨ閰嶇疆
+ * @return
+ */
+ @ApiOperation(value = "璁垮鏉ヨ閰嶇疆" )
+ @GetMapping("/getPlatformConfigDTO")
+ public ApiResponse<PlatformConfigDTO> getPlatformConfigDTO(){
+ return ApiResponse.success(systemDictDataService.getPlatformConfigDTO());
+ };
+
+ /**
+ * 淇敼璁垮鏉ヨ閰嶇疆
+ * @param visitConfigDTO
+ */
+ @ApiOperation(value = "淇敼璁垮鏉ヨ閰嶇疆" )
+ @PostMapping("/updatePlatformConfig")
+ public ApiResponse updatePlatformConfig(@RequestBody PlatformConfigDTO visitConfigDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ visitConfigDTO.setLoginUserInfo(this.getLoginUser(token));
+ systemDictDataService.updatePlatformConfig(visitConfigDTO);
+ return ApiResponse.success(null);
+ };
}
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index fde9d51..a7b492b 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -112,6 +112,8 @@
public static final String LOG_DEL_DAYS_LIMIT ="LOG_DEL_DAYS_LIMIT" ;
public static final String HK_LOG_DEL_DAYS_LIMIT ="HK_LOG_DEL_DAYS_LIMIT" ;
public static final String HK_NGINX_URL = "HK_NGINX_URL";
+ public static final String PLATFORM_BOOKING_TIPS = "PLATFORM_BOOKING_TIPS";
+ public static final String PLATFORM_GUIDEMAP = "PLATFORM_GUIDEMAP";
public static boolean DEALING_HK_SYNCPRIVILEGE= false;
public static boolean DEALING_HK_SYNCDEVICE = false;
public static boolean DEALING_HK_SYNCPLATFORM = false;
@@ -801,6 +803,7 @@
IN_CITY_CAR_USE(3, "鍏溅甯傚唴鐢ㄨ溅 ", "鍏溅甯傚唴鐢ㄨ溅 "),
OUT_CITY_CAR_USE(4, "鍏溅瀹ゅ鐢ㄨ溅 ", "鍏溅瀹ゅ鐢ㄨ溅 "),
CITY_WLC_BOOK(5, "甯傚叕鍙哥墿娴佽溅棰勭害 ", "5甯傚叕鍙哥墿娴佽溅棰勭害 "),
+ PLATFROM_REASON(6, "鏈堝彴鍏ュ洯鍘熷洜瀹℃壒 ", "鏈堝彴鍏ュ洯鍘熷洜瀹℃壒 "),
;
// 鎴愬憳鍙橀噺
private String name;
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java b/server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java
new file mode 100644
index 0000000..c328087
--- /dev/null
+++ b/server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java
@@ -0,0 +1,23 @@
+package com.doumee.dao.system.dto;
+
+import com.doumee.core.model.LoginUserModel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * @author T14
+ */
+@Data
+@ApiModel("鏈堝彴鍩虹缃�")
+public class PlatformConfigDTO extends LoginUserModel {
+
+ @ApiModelProperty(value = "鐗╂祦杞﹂绾︽寚鍗�")
+ private String bookTips;
+ @ApiModelProperty(value = "鐗╂祦杞﹀洯鍖哄瑙堝浘")
+ private String tipsImg;
+
+
+
+}
diff --git a/server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java b/server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java
index 224a96c..c8fbcf9 100644
--- a/server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java
+++ b/server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java
@@ -2,6 +2,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDictData;
@@ -117,4 +118,8 @@
* @param miniProgrammeDTO
*/
void updateVisitConfig(VisitConfigDTO miniProgrammeDTO);
+
+ PlatformConfigDTO getPlatformConfigDTO();
+
+ void updatePlatformConfig(PlatformConfigDTO visitConfigDTO);
}
diff --git a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
index 77e2238..7d005ce 100644
--- a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
+++ b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -10,6 +10,7 @@
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.SystemDictDataMapper;
import com.doumee.dao.system.SystemDictMapper;
+import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDict;
@@ -173,6 +174,55 @@
}
return "";
}
+ @Override
+ public PlatformConfigDTO getPlatformConfigDTO(){
+ PlatformConfigDTO visitConfigDTO = new PlatformConfigDTO();
+ SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM));
+ if(Objects.isNull(systemDict)){
+ throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀绫讳笉瀛樺湪");
+ }
+ List<SystemDictData> systemDictList = systemDictDataMapper.selectList(
+ new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId()));
+ if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){
+ throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀涓嶅瓨鍦�");
+ }
+ visitConfigDTO.setBookTips( setDataByLabel(systemDictList,Constants.PLATFORM_BOOKING_TIPS));
+ visitConfigDTO.setTipsImg( setDataByLabel(systemDictList,Constants.PLATFORM_GUIDEMAP));
+ return visitConfigDTO;
+ }
+ @Override
+ @Transactional
+ public void updatePlatformConfig(PlatformConfigDTO visitConfigDTO) {
+ if(Objects.isNull(visitConfigDTO)
+ && Objects.isNull(visitConfigDTO.getBookTips())
+ && Objects.isNull(visitConfigDTO.getTipsImg())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(loginUserInfo == null){
+ loginUserInfo = visitConfigDTO.getLoginUserInfo();
+ }
+ SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM));
+ if(Objects.isNull(systemDict)){
+ systemDict = new SystemDict();
+ systemDict.setCreateUser(loginUserInfo.getId());
+ systemDict.setCreateTime(new Date());
+ systemDict.setUpdateUser(systemDict.getCreateUser());
+ systemDict.setUpdateTime(systemDict.getCreateTime());
+ systemDict.setCode(Constants.PLATFORM);
+ systemDict.setRemark("鏈堝彴鐩稿叧閰嶇疆");
+ systemDict.setDeleted(Boolean.FALSE);
+ systemDictMapper.insert(systemDict);
+ }
+ List<SystemDictData> systemDictList = systemDictDataMapper.selectList(
+ new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId()));
+ if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){
+ throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"瀛楀吀涓嶅瓨鍦�");
+ }
+ dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_GUIDEMAP,"鐗╂祦杞﹀洯鍖哄瑙堝浘",loginUserInfo, visitConfigDTO.getTipsImg()==null?"":visitConfigDTO.getTipsImg().toString());
+ dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_BOOKING_TIPS,"鐗╂祦杞﹂绾︽寚鍗�",loginUserInfo, visitConfigDTO.getBookTips()==null?"":visitConfigDTO.getBookTips().toString());
+ }
@Override
@Transactional
diff --git a/server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml b/server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml
index ae3a515..800925e 100644
--- a/server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml
+++ b/server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml
@@ -16,7 +16,7 @@
</resultMap>
<select id="selectManageList" parameterType="com.doumee.dao.system.dto.QuerySystemDictDataDTO" resultMap="SystemDictDataListVO">
SELECT
- dict_data.`ID`, dict_data.`DICT_ID`, dict_data.`CODE`, dict_data.`LABEL`, dict_data.`SORT`, dict_data.`DISABLED`, dict_data.`CREATE_TIME`, dict_data.`UPDATE_TIME`, dict_data.`CREATE_USER`, dict_data.`UPDATE_USER`,
+ dict_data.`ID`, dict_data.`remark`, dict_data.`DICT_ID`, dict_data.`CODE`, dict_data.`LABEL`, dict_data.`SORT`, dict_data.`DISABLED`, dict_data.`CREATE_TIME`, dict_data.`UPDATE_TIME`, dict_data.`CREATE_USER`, dict_data.`UPDATE_USER`,
create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME,
update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME
FROM SYSTEM_DICT_DATA dict_data
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java
index 1caef74..2fc63a8 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java
@@ -95,6 +95,15 @@
templ.setType(type);
return ApiResponse.success(approveTemplService.findOne(templ));
}
+ @ApiOperation("鏍规嵁reasonId鏌ヨ")
+ @GetMapping("/findById/{id}")
+ @CloudRequiredPermission("business:approvetempl:query")
+ public ApiResponse<ApproveTempl> findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
+ ApproveTempl templ =new ApproveTempl();
+ templ.setIsdeleted(Constants.ZERO);
+ templ.setId(id);
+ return ApiResponse.success(approveTemplService.findOne(templ));
+ }
// @ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java
index 2d89301..eef7d41 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java
@@ -67,5 +67,8 @@
@ApiModelProperty(value = "瀹℃壒妯$増閰嶇疆鏄庣粏闆嗗悎")
@TableField(exist = false)
private List<ApproveParam> paramList;
+ @ApiModelProperty(value = "鏈堝彴鍏ュ洯鍖哄師鍥犵紪鐮�")
+ @TableField(exist = false)
+ private Integer reasonId;
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java
index f1b227b..9150d38 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java
@@ -9,6 +9,7 @@
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.ApproveParamMapper;
import com.doumee.dao.business.ApproveTemplMapper;
+import com.doumee.dao.business.PlatformReasonMapper;
import com.doumee.dao.business.join.MemberJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.service.business.ApproveTemplService;
@@ -41,6 +42,8 @@
private ApproveParamMapper approveParamMapper;
@Autowired
private MemberJoinMapper memberJoinMapper;
+ @Autowired
+ private PlatformReasonMapper platformReasonMapper;
@Override
@Transactional(rollbackFor = {BusinessException.class,Exception.class})
@@ -52,9 +55,21 @@
if(model.getType() == null || Constants.ApproveTmplType.getName(model.getType()) == null){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ PlatformReason reason = null;
+ if(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey())){
+ if(model.getReasonId() ==null){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ reason = platformReasonMapper.selectById(model.getReasonId());
+ if(reason ==null){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"瀵逛笉璧凤紝鍏ュ洯鍘熷洜淇℃伅涓嶅瓨鍦紝璇疯繑鍥炲埛鏂伴〉闈㈤噸璇曪紒");
+ }
+ }
ApproveTempl template = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda()
.eq(ApproveTempl::getType,model.getType() )
.eq(ApproveTempl::getIsdeleted,Constants.ZERO)
+ //濡傛灉鏄叆鍥師鍥犻厤缃紝鏍规嵁ID鏌ヨ瀵瑰簲鐨勬ā鐗堜俊鎭�
+ .eq(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey()),ApproveTempl::getId,model.getReasonId())
.last("limit 1"));
Date date =new Date();
if(template == null){
@@ -73,6 +88,7 @@
if(model.getParamList()!=null && model.getParamList().size()>0){
for(ApproveParam param : model.getParamList()){
param.setCreateDate(date);
+ param.setId(null);
param.setCreator(loginUserInfo.getId());
param.setEditDate(date);
param.setEditor(loginUserInfo.getId());
@@ -92,6 +108,14 @@
//鎵归噺鎻掑叆鏂扮殑閰嶇疆
approveParamMapper.insert(model.getParamList());
}
+ if(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey())){
+ PlatformReason r = new PlatformReason();
+ r.setApproveTemplId(template.getId());
+ r.setId(model.getReasonId());
+ r.setEditor(template.getEditor());
+ r.setEditDate(new Date());
+ platformReasonMapper.updateById(r);
+ }
return 1;
}
--
Gitblit v1.9.3