Commit 7b5936e1cc7963909603c9c60ea882d820ea544b
1 parent
ae103c5f
11
Showing
30 changed files
with
2709 additions
and
19 deletions
trash-ui/src/api/office/handleAffairsCommon.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询办文办事-普通类列表 | ||
| 4 | +export function listHandleAffairsCommon(query) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/office/handleAffairsCommon/list', | ||
| 7 | + method: 'get', | ||
| 8 | + params: query | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 查询办文办事-普通类详细 | ||
| 13 | +export function getHandleAffairsCommon(id) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/office/handleAffairsCommon/' + id, | ||
| 16 | + method: 'get' | ||
| 17 | + }) | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +// 新增办文办事-普通类 | ||
| 21 | +export function addHandleAffairsCommon(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/office/handleAffairsCommon', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 修改办文办事-普通类 | ||
| 30 | +export function updateHandleAffairsCommon(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/office/handleAffairsCommon', | ||
| 33 | + method: 'put', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +// 删除办文办事-普通类 | ||
| 39 | +export function delHandleAffairsCommon(id) { | ||
| 40 | + return request({ | ||
| 41 | + url: '/office/handleAffairsCommon/' + id, | ||
| 42 | + method: 'delete' | ||
| 43 | + }) | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +// 导出办文办事-普通类 | ||
| 47 | +export function exportHandleAffairsCommon(query) { | ||
| 48 | + return request({ | ||
| 49 | + url: '/office/handleAffairsCommon/export', | ||
| 50 | + method: 'get', | ||
| 51 | + params: query | ||
| 52 | + }) | ||
| 53 | +} | ||
| 0 | \ No newline at end of file | 54 | \ No newline at end of file |
trash-ui/src/api/office/handleAffairsXF.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询办文办事信访类列表 | ||
| 4 | +export function listHandleAffairsXF(query) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/office/handleAffairsXF/list', | ||
| 7 | + method: 'get', | ||
| 8 | + params: query | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 查询办文办事信访类详细 | ||
| 13 | +export function getHandleAffairsXF(id) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/office/handleAffairsXF/' + id, | ||
| 16 | + method: 'get' | ||
| 17 | + }) | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +// 新增办文办事信访类 | ||
| 21 | +export function addHandleAffairsXF(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/office/handleAffairsXF', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 修改办文办事信访类 | ||
| 30 | +export function updateHandleAffairsXF(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/office/handleAffairsXF', | ||
| 33 | + method: 'put', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +// 删除办文办事信访类 | ||
| 39 | +export function delHandleAffairsXF(id) { | ||
| 40 | + return request({ | ||
| 41 | + url: '/office/handleAffairsXF/' + id, | ||
| 42 | + method: 'delete' | ||
| 43 | + }) | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +// 导出办文办事信访类 | ||
| 47 | +export function exportHandleAffairsXF(query) { | ||
| 48 | + return request({ | ||
| 49 | + url: '/office/handleAffairsXF/export', | ||
| 50 | + method: 'get', | ||
| 51 | + params: query | ||
| 52 | + }) | ||
| 53 | +} | ||
| 0 | \ No newline at end of file | 54 | \ No newline at end of file |
trash-ui/src/router/index.js
| @@ -209,6 +209,25 @@ export const constantRoutes = [ | @@ -209,6 +209,25 @@ export const constantRoutes = [ | ||
| 209 | }, | 209 | }, |
| 210 | ] | 210 | ] |
| 211 | }, | 211 | }, |
| 212 | + // { | ||
| 213 | + // path: '/task/handle', | ||
| 214 | + // component: Layout, | ||
| 215 | + // hidden: true, | ||
| 216 | + // children: [ | ||
| 217 | + // { | ||
| 218 | + // path: 'office/handleAffairsCommon', | ||
| 219 | + // component: (resolve) => require(['@/views/office/handleAffairsCommon'], resolve), | ||
| 220 | + // name: '办文办事普通类', | ||
| 221 | + // meta: { title: '办文办事普通类' } | ||
| 222 | + // }, | ||
| 223 | + // { | ||
| 224 | + // path: 'office/handleAffairsXF', | ||
| 225 | + // component: (resolve) => require(['@/views/office/handleAffairsXF'], resolve), | ||
| 226 | + // name: '办文办事信访类', | ||
| 227 | + // meta: { title: '办文办事信访类' } | ||
| 228 | + // }, | ||
| 229 | + // ] | ||
| 230 | + // } | ||
| 212 | ] | 231 | ] |
| 213 | 232 | ||
| 214 | export default new Router({ | 233 | export default new Router({ |
trash-ui/src/views/casefile/violationWarningInformation/index.vue
| @@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
| 129 | /> | 129 | /> |
| 130 | 130 | ||
| 131 | <!-- 添加或修改违规预警信息对话框 --> | 131 | <!-- 添加或修改违规预警信息对话框 --> |
| 132 | - <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body> | 132 | + <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false"> |
| 133 | <el-form ref="form" :model="form" :rules="rules" label-width="115px"> | 133 | <el-form ref="form" :model="form" :rules="rules" label-width="115px"> |
| 134 | <el-row :gutter="2"> | 134 | <el-row :gutter="2"> |
| 135 | <el-col :span="11"> | 135 | <el-col :span="11"> |
| @@ -249,7 +249,7 @@ | @@ -249,7 +249,7 @@ | ||
| 249 | </div> | 249 | </div> |
| 250 | </el-dialog> | 250 | </el-dialog> |
| 251 | 251 | ||
| 252 | - <el-dialog :title="title" :visible.sync="openInfo" width="850px" append-to-body> | 252 | + <el-dialog :title="title" :visible.sync="openInfo" width="850px" append-to-body :close-on-click-modal="false"> |
| 253 | <violationWarningInformationInfo :idInfo="idInfo" v-if="openInfo"/> | 253 | <violationWarningInformationInfo :idInfo="idInfo" v-if="openInfo"/> |
| 254 | <div slot="footer" class="dialog-footer"> | 254 | <div slot="footer" class="dialog-footer"> |
| 255 | <el-button @click="cancel">取 消</el-button> | 255 | <el-button @click="cancel">取 消</el-button> |
trash-ui/src/views/office/conference/index.vue
| @@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
| 120 | /> | 120 | /> |
| 121 | 121 | ||
| 122 | <!-- 添加或修改会议管理对话框 --> | 122 | <!-- 添加或修改会议管理对话框 --> |
| 123 | - <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body> | 123 | + <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false"> |
| 124 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 124 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 125 | <el-row :gutter="2"> | 125 | <el-row :gutter="2"> |
| 126 | <el-col :span="11"> | 126 | <el-col :span="11"> |
| @@ -207,7 +207,7 @@ | @@ -207,7 +207,7 @@ | ||
| 207 | <el-button @click="cancel">取 消</el-button> | 207 | <el-button @click="cancel">取 消</el-button> |
| 208 | </div> | 208 | </div> |
| 209 | </el-dialog> | 209 | </el-dialog> |
| 210 | - <el-dialog :title="title" :visible.sync="openInfo" width="850px" append-to-body> | 210 | + <el-dialog :title="title" :visible.sync="openInfo" width="850px" append-to-body :close-on-click-modal="false"> |
| 211 | <conferenceInfo :idInfo="idInfo" v-if="openInfo"/> | 211 | <conferenceInfo :idInfo="idInfo" v-if="openInfo"/> |
| 212 | <div slot="footer" class="dialog-footer"> | 212 | <div slot="footer" class="dialog-footer"> |
| 213 | <el-button @click="cancel">取 消</el-button> | 213 | <el-button @click="cancel">取 消</el-button> |
trash-ui/src/views/office/handleAffairsCommon/handleAffairsCommonInfo.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-form ref="form" :model="form" label-width="80px"> | ||
| 3 | + <el-form-item label="来文单位" prop="company"> | ||
| 4 | + <el-input v-model="form.company" placeholder="请输入来文单位" :disabled="true"/> | ||
| 5 | + </el-form-item> | ||
| 6 | + <el-form-item label="收文时间" prop="receiveTime"> | ||
| 7 | + <el-date-picker clearable size="small" style="width: 100%" | ||
| 8 | + v-model="form.receiveTime" | ||
| 9 | + type="datetime" | ||
| 10 | + value-format="yyyy-MM-dd HH:mm:ss" | ||
| 11 | + :disabled="true" | ||
| 12 | + placeholder="选择收文时间"> | ||
| 13 | + </el-date-picker> | ||
| 14 | + </el-form-item> | ||
| 15 | + <el-form-item label="文件标题" prop="title"> | ||
| 16 | + <el-input v-model="form.title" placeholder="请输入文件标题" :disabled="true"/> | ||
| 17 | + </el-form-item> | ||
| 18 | + <el-form-item label="相关部门意见" prop="deptOpinion"> | ||
| 19 | + <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容"/> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="综合部意见" prop="zhbOpinion"> | ||
| 22 | + <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容"/> | ||
| 23 | + </el-form-item> | ||
| 24 | + <el-row> | ||
| 25 | + <el-table :data="fileEntityList"> | ||
| 26 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | ||
| 27 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | ||
| 28 | + <template slot-scope="scope"> | ||
| 29 | + <el-button | ||
| 30 | + size="small" type="success" | ||
| 31 | + icon="el-icon-download" | ||
| 32 | + @click="downloadFA(scope.row)" | ||
| 33 | + v-hasPermi="['office:management:edit']" | ||
| 34 | + v-if="form.id!=null" | ||
| 35 | + round>下载 | ||
| 36 | + </el-button> | ||
| 37 | + </template> | ||
| 38 | + </el-table-column> | ||
| 39 | + </el-table> | ||
| 40 | + </el-row> | ||
| 41 | + </el-form> | ||
| 42 | +</template> | ||
| 43 | + | ||
| 44 | +<script> | ||
| 45 | +import {getHandleAffairsCommon} from "@/api/office/handleAffairsCommon"; | ||
| 46 | +import Editor from '@/components/ZcEditor'; | ||
| 47 | +export default { | ||
| 48 | + name: "handleAffairsCommonInfo", | ||
| 49 | + components: {Editor}, | ||
| 50 | + props: { | ||
| 51 | + businessKey: { | ||
| 52 | + type: String | ||
| 53 | + }, | ||
| 54 | + idInfo: { | ||
| 55 | + type: String | ||
| 56 | + } | ||
| 57 | + }, | ||
| 58 | + data() { | ||
| 59 | + return { | ||
| 60 | + form: {}, | ||
| 61 | + fileEntityList:[] | ||
| 62 | + } | ||
| 63 | + }, | ||
| 64 | + created() { | ||
| 65 | + this.init(); | ||
| 66 | + }, | ||
| 67 | + methods:{ | ||
| 68 | + init(){ | ||
| 69 | + getHandleAffairsCommon(this.idInfo).then(response => { | ||
| 70 | + this.form = response.data.handleAffairsCommon; | ||
| 71 | + let files = JSON.stringify(response.data.uploadFiles); | ||
| 72 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 73 | + }); | ||
| 74 | + }, | ||
| 75 | + /** 文件下载 */ | ||
| 76 | + downloadFA(row) { | ||
| 77 | + let name = row.name; | ||
| 78 | + let url = row.url; | ||
| 79 | + const a = document.createElement('a') | ||
| 80 | + a.setAttribute('download', name) | ||
| 81 | + a.setAttribute('target', '_blank') | ||
| 82 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 83 | + a.click() | ||
| 84 | + }, | ||
| 85 | + } | ||
| 86 | +} | ||
| 87 | +</script> | ||
| 88 | + | ||
| 89 | +<style scoped> | ||
| 90 | + | ||
| 91 | +</style> |
trash-ui/src/views/office/handleAffairsCommon/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 4 | + <el-form-item label="来文单位" prop="company"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="queryParams.company" | ||
| 7 | + placeholder="请输入来文单位" | ||
| 8 | + clearable | ||
| 9 | + size="small" | ||
| 10 | + @keyup.enter.native="handleQuery" | ||
| 11 | + /> | ||
| 12 | + </el-form-item> | ||
| 13 | + <el-form-item label="收文时间" prop="receiveTime"> | ||
| 14 | + <el-date-picker clearable size="small" style="width: 200px" | ||
| 15 | + v-model="queryParams.receiveTime" | ||
| 16 | + type="date" | ||
| 17 | + value-format="yyyy-MM-dd" | ||
| 18 | + placeholder="选择收文时间"> | ||
| 19 | + </el-date-picker> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="审批状态" prop="status"> | ||
| 22 | + <el-select v-model="queryParams.status" placeholder="请选择审批状态" clearable size="small"> | ||
| 23 | + <el-option label="审核中" value="0" /> | ||
| 24 | + <el-option label="审核完成" value="1" /> | ||
| 25 | + <el-option label="被驳回" value="2" /> | ||
| 26 | + </el-select> | ||
| 27 | + </el-form-item> | ||
| 28 | + <el-form-item> | ||
| 29 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 30 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 31 | + </el-form-item> | ||
| 32 | + </el-form> | ||
| 33 | + | ||
| 34 | + <el-row :gutter="10" class="mb8"> | ||
| 35 | + <el-col :span="1.5"> | ||
| 36 | + <el-button | ||
| 37 | + type="primary" | ||
| 38 | + icon="el-icon-plus" | ||
| 39 | + size="mini" | ||
| 40 | + @click="handleAdd" | ||
| 41 | + v-hasPermi="['office:handleAffairsCommon:add']" | ||
| 42 | + >新增</el-button> | ||
| 43 | + </el-col> | ||
| 44 | + <el-col :span="1.5"> | ||
| 45 | + <el-button | ||
| 46 | + type="success" | ||
| 47 | + icon="el-icon-edit" | ||
| 48 | + size="mini" | ||
| 49 | + :disabled="single" | ||
| 50 | + @click="handleUpdate" | ||
| 51 | + v-hasPermi="['office:handleAffairsCommon:edit']" | ||
| 52 | + >修改</el-button> | ||
| 53 | + </el-col> | ||
| 54 | +<!-- <el-col :span="1.5">--> | ||
| 55 | +<!-- <el-button--> | ||
| 56 | +<!-- type="danger"--> | ||
| 57 | +<!-- icon="el-icon-delete"--> | ||
| 58 | +<!-- size="mini"--> | ||
| 59 | +<!-- :disabled="multiple"--> | ||
| 60 | +<!-- @click="handleDelete"--> | ||
| 61 | +<!-- v-hasPermi="['office:handleAffairsCommon:remove']"--> | ||
| 62 | +<!-- >删除</el-button>--> | ||
| 63 | +<!-- </el-col>--> | ||
| 64 | + <el-col :span="1.5"> | ||
| 65 | + <el-button | ||
| 66 | + type="warning" | ||
| 67 | + icon="el-icon-download" | ||
| 68 | + size="mini" | ||
| 69 | + @click="handleExport" | ||
| 70 | + v-hasPermi="['office:handleAffairsCommon:export']" | ||
| 71 | + >导出</el-button> | ||
| 72 | + </el-col> | ||
| 73 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||
| 74 | + </el-row> | ||
| 75 | + | ||
| 76 | + <el-table v-loading="loading" :data="handleAffairsCommonList" @selection-change="handleSelectionChange"> | ||
| 77 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 78 | + <el-table-column label="来文单位" align="center" prop="company" /> | ||
| 79 | + <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> | ||
| 80 | + <template slot-scope="scope"> | ||
| 81 | + <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | ||
| 82 | + </template> | ||
| 83 | + </el-table-column> | ||
| 84 | + <el-table-column label="是否已阅" align="center" prop="isRead" /> | ||
| 85 | + <el-table-column label="审批状态" align="center" prop="status" > | ||
| 86 | + <template slot-scope="scope"> | ||
| 87 | + <span>{{ parseStatus(scope.row.status) }}</span> | ||
| 88 | + </template> | ||
| 89 | + </el-table-column> | ||
| 90 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 91 | + <template slot-scope="scope"> | ||
| 92 | + <el-button | ||
| 93 | + size="mini" | ||
| 94 | + type="text" | ||
| 95 | + icon="el-icon-edit" | ||
| 96 | + @click="handleInfo(scope.row)" | ||
| 97 | + v-hasPermi="['office:handleAffairsCommon:edit']" | ||
| 98 | + >详情</el-button> | ||
| 99 | + <el-button | ||
| 100 | + size="mini" | ||
| 101 | + type="text" | ||
| 102 | + icon="el-icon-edit" | ||
| 103 | + @click="handleUpdate(scope.row)" | ||
| 104 | + v-hasPermi="['office:handleAffairsCommon:edit']" | ||
| 105 | + >修改</el-button> | ||
| 106 | +<!-- <el-button--> | ||
| 107 | +<!-- size="mini"--> | ||
| 108 | +<!-- type="text"--> | ||
| 109 | +<!-- icon="el-icon-delete"--> | ||
| 110 | +<!-- @click="handleDelete(scope.row)"--> | ||
| 111 | +<!-- v-hasPermi="['office:handleAffairsCommon:remove']"--> | ||
| 112 | +<!-- >删除</el-button>--> | ||
| 113 | + </template> | ||
| 114 | + </el-table-column> | ||
| 115 | + </el-table> | ||
| 116 | + | ||
| 117 | + <pagination | ||
| 118 | + v-show="total>0" | ||
| 119 | + :total="total" | ||
| 120 | + :page.sync="queryParams.pageNum" | ||
| 121 | + :limit.sync="queryParams.pageSize" | ||
| 122 | + @pagination="getList" | ||
| 123 | + /> | ||
| 124 | + | ||
| 125 | + <!-- 添加或修改办文办事-普通类对话框 --> | ||
| 126 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | ||
| 127 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||
| 128 | + <el-form-item label="来文单位" prop="company"> | ||
| 129 | + <el-input v-model="form.company" placeholder="请输入来文单位" /> | ||
| 130 | + </el-form-item> | ||
| 131 | + <el-form-item label="收文时间" prop="receiveTime"> | ||
| 132 | + <el-date-picker clearable size="small" style="width: 100%" | ||
| 133 | + v-model="form.receiveTime" | ||
| 134 | + type="datetime" | ||
| 135 | + value-format="yyyy-MM-dd HH:mm:ss" | ||
| 136 | + placeholder="选择收文时间"> | ||
| 137 | + </el-date-picker> | ||
| 138 | + </el-form-item> | ||
| 139 | + <el-form-item label="文件标题" prop="title"> | ||
| 140 | + <el-input v-model="form.title" placeholder="请输入文件标题" /> | ||
| 141 | + </el-form-item> | ||
| 142 | +<!-- <el-form-item label="相关部门意见" prop="deptOpinion">--> | ||
| 143 | +<!-- <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" />--> | ||
| 144 | +<!-- </el-form-item>--> | ||
| 145 | +<!-- <el-form-item label="综合部意见" prop="zhbOpinion">--> | ||
| 146 | +<!-- <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" />--> | ||
| 147 | +<!-- </el-form-item>--> | ||
| 148 | + <el-row :gutter="2"> | ||
| 149 | + <el-col :span="11"> | ||
| 150 | + <el-form-item prop="fileEntityList" label="附件"> | ||
| 151 | + <el-upload | ||
| 152 | + ref="upload" | ||
| 153 | + action="" | ||
| 154 | + accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | ||
| 155 | + :on-change="fileChange" | ||
| 156 | + :auto-upload="false" | ||
| 157 | + :show-file-list="false" | ||
| 158 | + multiple | ||
| 159 | + :file-list="fileEntityList"> | ||
| 160 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 161 | + </el-upload> | ||
| 162 | + </el-form-item> | ||
| 163 | + </el-col> | ||
| 164 | + </el-row> | ||
| 165 | + <el-row> | ||
| 166 | + <el-table :data="fileEntityList"> | ||
| 167 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | ||
| 168 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | ||
| 169 | + <template slot-scope="scope"> | ||
| 170 | + <el-button | ||
| 171 | + size="small" type="success" | ||
| 172 | + icon="el-icon-download" | ||
| 173 | + @click="downloadFA(scope.row)" | ||
| 174 | + v-hasPermi="['office:management:edit']" | ||
| 175 | + v-if="form.id!=null" | ||
| 176 | + round>下载 | ||
| 177 | + </el-button> | ||
| 178 | + <el-button | ||
| 179 | + size="small" type="danger" | ||
| 180 | + icon="el-icon-delete" | ||
| 181 | + @click="handleDeleteFile(scope.$index)" | ||
| 182 | + v-hasPermi="['office:management:remove']" | ||
| 183 | + round>删除 | ||
| 184 | + </el-button> | ||
| 185 | + </template> | ||
| 186 | + </el-table-column> | ||
| 187 | + </el-table> | ||
| 188 | + </el-row> | ||
| 189 | + </el-form> | ||
| 190 | + <div slot="footer" class="dialog-footer"> | ||
| 191 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 192 | + <el-button @click="cancel">取 消</el-button> | ||
| 193 | + </div> | ||
| 194 | + </el-dialog> | ||
| 195 | + <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | ||
| 196 | + <handleAffairsCommonInfo :idInfo="idInfo" v-if="openInfo"/> | ||
| 197 | + <div slot="footer" class="dialog-footer"> | ||
| 198 | + <el-button @click="cancel">取 消</el-button> | ||
| 199 | + </div> | ||
| 200 | + </el-dialog> | ||
| 201 | + </div> | ||
| 202 | +</template> | ||
| 203 | + | ||
| 204 | +<script> | ||
| 205 | +import { listHandleAffairsCommon, getHandleAffairsCommon, delHandleAffairsCommon, addHandleAffairsCommon, updateHandleAffairsCommon, exportHandleAffairsCommon } from "@/api/office/handleAffairsCommon"; | ||
| 206 | +import handleAffairsCommonInfo from "./handleAffairsCommonInfo"; | ||
| 207 | + | ||
| 208 | +export default { | ||
| 209 | + name: "HandleAffairsCommon", | ||
| 210 | + components:{handleAffairsCommonInfo}, | ||
| 211 | + data() { | ||
| 212 | + return { | ||
| 213 | + // 遮罩层 | ||
| 214 | + loading: true, | ||
| 215 | + // 选中数组 | ||
| 216 | + ids: [], | ||
| 217 | + // 非单个禁用 | ||
| 218 | + single: true, | ||
| 219 | + // 非多个禁用 | ||
| 220 | + multiple: true, | ||
| 221 | + // 显示搜索条件 | ||
| 222 | + showSearch: true, | ||
| 223 | + // 总条数 | ||
| 224 | + total: 0, | ||
| 225 | + // 办文办事-普通类表格数据 | ||
| 226 | + handleAffairsCommonList: [], | ||
| 227 | + // 弹出层标题 | ||
| 228 | + title: "", | ||
| 229 | + // 是否显示弹出层 | ||
| 230 | + open: false, | ||
| 231 | + // 查询参数 | ||
| 232 | + queryParams: { | ||
| 233 | + pageNum: 1, | ||
| 234 | + pageSize: 10, | ||
| 235 | + company: null, | ||
| 236 | + receiveTime: null, | ||
| 237 | + title: null, | ||
| 238 | + deptOpinion: null, | ||
| 239 | + zhbOpinion: null, | ||
| 240 | + isRead: null, | ||
| 241 | + status: null, | ||
| 242 | + }, | ||
| 243 | + // 表单参数 | ||
| 244 | + form: {}, | ||
| 245 | + // 表单校验 | ||
| 246 | + rules: { | ||
| 247 | + company: [ | ||
| 248 | + { required: true, message: "必填", trigger: "blur" } | ||
| 249 | + ], | ||
| 250 | + receiveTime: [ | ||
| 251 | + { required: true, message: "必填", trigger: "blur" } | ||
| 252 | + ], | ||
| 253 | + title: [ | ||
| 254 | + { required: true, message: "必填", trigger: "blur" } | ||
| 255 | + ], | ||
| 256 | + }, | ||
| 257 | + fileEntityList: [], | ||
| 258 | + openInfo:false, | ||
| 259 | + idInfo:null, | ||
| 260 | + }; | ||
| 261 | + }, | ||
| 262 | + created() { | ||
| 263 | + this.getList(); | ||
| 264 | + }, | ||
| 265 | + methods: { | ||
| 266 | + /** 查询办文办事-普通类列表 */ | ||
| 267 | + getList() { | ||
| 268 | + this.loading = true; | ||
| 269 | + listHandleAffairsCommon(this.queryParams).then(response => { | ||
| 270 | + this.handleAffairsCommonList = response.rows; | ||
| 271 | + this.total = response.total; | ||
| 272 | + this.loading = false; | ||
| 273 | + }); | ||
| 274 | + }, | ||
| 275 | + // 取消按钮 | ||
| 276 | + cancel() { | ||
| 277 | + this.open = false; | ||
| 278 | + this.openInfo = false; | ||
| 279 | + this.idInfo = null; | ||
| 280 | + this.reset(); | ||
| 281 | + }, | ||
| 282 | + // 表单重置 | ||
| 283 | + reset() { | ||
| 284 | + this.fileEntityList=[]; | ||
| 285 | + this.form = { | ||
| 286 | + id: null, | ||
| 287 | + company: null, | ||
| 288 | + receiveTime: null, | ||
| 289 | + title: null, | ||
| 290 | + deptOpinion: null, | ||
| 291 | + zhbOpinion: null, | ||
| 292 | + isRead: null, | ||
| 293 | + status: 0, | ||
| 294 | + createTime: null, | ||
| 295 | + createBy: null, | ||
| 296 | + updateTime: null, | ||
| 297 | + updateBy: null | ||
| 298 | + }; | ||
| 299 | + this.resetForm("form"); | ||
| 300 | + }, | ||
| 301 | + /** 搜索按钮操作 */ | ||
| 302 | + handleQuery() { | ||
| 303 | + this.queryParams.pageNum = 1; | ||
| 304 | + this.getList(); | ||
| 305 | + }, | ||
| 306 | + /** 重置按钮操作 */ | ||
| 307 | + resetQuery() { | ||
| 308 | + this.resetForm("queryForm"); | ||
| 309 | + this.handleQuery(); | ||
| 310 | + }, | ||
| 311 | + // 多选框选中数据 | ||
| 312 | + handleSelectionChange(selection) { | ||
| 313 | + this.ids = selection.map(item => item.id) | ||
| 314 | + this.single = selection.length!==1 | ||
| 315 | + this.multiple = !selection.length | ||
| 316 | + }, | ||
| 317 | + /** 查看按钮操作 */ | ||
| 318 | + handleInfo(row){ | ||
| 319 | + this.reset(); | ||
| 320 | + this.idInfo = row.id; | ||
| 321 | + this.title = "办文办事-普通类详情"; | ||
| 322 | + this.openInfo = true; | ||
| 323 | + }, | ||
| 324 | + /** 新增按钮操作 */ | ||
| 325 | + handleAdd() { | ||
| 326 | + this.reset(); | ||
| 327 | + this.open = true; | ||
| 328 | + this.title = "添加办文办事-普通类"; | ||
| 329 | + }, | ||
| 330 | + /** 修改按钮操作 */ | ||
| 331 | + handleUpdate(row) { | ||
| 332 | + this.reset(); | ||
| 333 | + const id = row.id || this.ids | ||
| 334 | + getHandleAffairsCommon(id).then(response => { | ||
| 335 | + this.form = response.data.handleAffairsCommon; | ||
| 336 | + let files = JSON.stringify(response.data.uploadFiles); | ||
| 337 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 338 | + this.open = true; | ||
| 339 | + this.title = "修改办文办事-普通类"; | ||
| 340 | + }); | ||
| 341 | + }, | ||
| 342 | + /** 提交按钮 */ | ||
| 343 | + submitForm() { | ||
| 344 | + this.$refs["form"].validate(valid => { | ||
| 345 | + if (valid) { | ||
| 346 | + let formData = new FormData(); | ||
| 347 | + let form = this.form; | ||
| 348 | + //去掉params属性 | ||
| 349 | + delete form.params; | ||
| 350 | + formData.append('fileList', null); | ||
| 351 | + //将新增的文件放入formData | ||
| 352 | + this.fileEntityList.forEach(item => { | ||
| 353 | + if(item.id==null){ | ||
| 354 | + formData.append('fileList', item.raw) | ||
| 355 | + } | ||
| 356 | + }) | ||
| 357 | + if (this.form.id != null) { | ||
| 358 | + formData.append("handleAffairsCommon", JSON.stringify(form)); | ||
| 359 | + formData.append("uploadFilesList", null); | ||
| 360 | + this.fileEntityList.forEach(item => { | ||
| 361 | + delete item.params; | ||
| 362 | + if(item != "null" && item != null){ | ||
| 363 | + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 364 | + } | ||
| 365 | + }) | ||
| 366 | + updateHandleAffairsCommon(formData).then(response => { | ||
| 367 | + this.msgSuccess("修改成功"); | ||
| 368 | + this.open = false; | ||
| 369 | + this.getList(); | ||
| 370 | + }); | ||
| 371 | + } else { | ||
| 372 | + for (let key in form) { | ||
| 373 | + formData.append(key, form[key] == null ? "" : form[key]) | ||
| 374 | + } | ||
| 375 | + addHandleAffairsCommon(formData).then(response => { | ||
| 376 | + this.msgSuccess("新增成功"); | ||
| 377 | + this.open = false; | ||
| 378 | + this.getList(); | ||
| 379 | + }); | ||
| 380 | + } | ||
| 381 | + } | ||
| 382 | + }); | ||
| 383 | + }, | ||
| 384 | + /** 删除按钮操作 */ | ||
| 385 | + handleDelete(row) { | ||
| 386 | + const ids = row.id || this.ids; | ||
| 387 | + this.$confirm('是否确认删除办文办事-普通类编号为"' + ids + '"的数据项?', "警告", { | ||
| 388 | + confirmButtonText: "确定", | ||
| 389 | + cancelButtonText: "取消", | ||
| 390 | + type: "warning" | ||
| 391 | + }).then(function() { | ||
| 392 | + return delHandleAffairsCommon(ids); | ||
| 393 | + }).then(() => { | ||
| 394 | + this.getList(); | ||
| 395 | + this.msgSuccess("删除成功"); | ||
| 396 | + }) | ||
| 397 | + }, | ||
| 398 | + /** 导出按钮操作 */ | ||
| 399 | + handleExport() { | ||
| 400 | + const queryParams = this.queryParams; | ||
| 401 | + this.$confirm('是否确认导出所有办文办事-普通类数据项?', "警告", { | ||
| 402 | + confirmButtonText: "确定", | ||
| 403 | + cancelButtonText: "取消", | ||
| 404 | + type: "warning" | ||
| 405 | + }).then(function() { | ||
| 406 | + return exportHandleAffairsCommon(queryParams); | ||
| 407 | + }).then(response => { | ||
| 408 | + this.download(response.msg); | ||
| 409 | + }) | ||
| 410 | + }, | ||
| 411 | + /** | ||
| 412 | + * 文件改变时,限制文件上传格式和大小 | ||
| 413 | + * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | ||
| 414 | + * 大小不超过5M | ||
| 415 | + * */ | ||
| 416 | + fileChange(file, fileList) { | ||
| 417 | + let count = 0; | ||
| 418 | + for (let i = 0; i < fileList.length; i++) { | ||
| 419 | + // console.log(fileList.length) | ||
| 420 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 421 | + if (fileList[i].name == file.name) { | ||
| 422 | + count++; | ||
| 423 | + if (count == 2) { | ||
| 424 | + this.$message({ | ||
| 425 | + message: '已存在此文件!', | ||
| 426 | + type: 'warning' | ||
| 427 | + }); | ||
| 428 | + for (let j = fileList.length; j > 0; j--) { | ||
| 429 | + //如果存在此文件,去除新选择的重复文件 | ||
| 430 | + if (fileList[j - 1].name == file.name) { | ||
| 431 | + fileList.splice(j - 1, 1); | ||
| 432 | + i--; | ||
| 433 | + return false; | ||
| 434 | + } | ||
| 435 | + } | ||
| 436 | + } | ||
| 437 | + } | ||
| 438 | + } | ||
| 439 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 440 | + //格式符合后判断大小 | ||
| 441 | + if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 442 | + let max5M = file.size / 1024 / 1024 < 5; | ||
| 443 | + if (!max5M) { | ||
| 444 | + this.$message({ | ||
| 445 | + message: '上传文件大小不得超过5M!', | ||
| 446 | + type: 'warning' | ||
| 447 | + }); | ||
| 448 | + } else { | ||
| 449 | + //符合条件后进行添加 | ||
| 450 | + this.fileEntityList = fileList | ||
| 451 | + } | ||
| 452 | + } else { | ||
| 453 | + this.$message({ | ||
| 454 | + message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 455 | + type: 'warning' | ||
| 456 | + }); | ||
| 457 | + } | ||
| 458 | + }, | ||
| 459 | + // 删除文件 | ||
| 460 | + handleDeleteFile(index) { | ||
| 461 | + this.fileEntityList.splice(index, 1); | ||
| 462 | + }, | ||
| 463 | + /** 文件下载 */ | ||
| 464 | + downloadFA(row) { | ||
| 465 | + let name = row.name; | ||
| 466 | + let url = row.url; | ||
| 467 | + const a = document.createElement('a') | ||
| 468 | + a.setAttribute('download', name) | ||
| 469 | + a.setAttribute('target', '_blank') | ||
| 470 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 471 | + a.click() | ||
| 472 | + }, | ||
| 473 | + } | ||
| 474 | +}; | ||
| 475 | +</script> |
trash-ui/src/views/office/handleAffairsXF/handleAffairsXFInfo.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-form ref="form" :model="form" label-width="80px"> | ||
| 3 | + <el-form-item label="信访单位(人)" prop="company"> | ||
| 4 | + <el-input v-model="form.company" placeholder="请输入信访单位(人)" :disabled="true"/> | ||
| 5 | + </el-form-item> | ||
| 6 | + <el-form-item label="信访日期" prop="receiveDate"> | ||
| 7 | + <el-date-picker clearable size="small" style="width: 100%" | ||
| 8 | + v-model="form.receiveDate" | ||
| 9 | + type="date" | ||
| 10 | + value-format="yyyy-MM-dd" | ||
| 11 | + :disabled="true" | ||
| 12 | + placeholder="选择信访日期"> | ||
| 13 | + </el-date-picker> | ||
| 14 | + </el-form-item> | ||
| 15 | + <el-form-item label="诉求" prop="appeal"> | ||
| 16 | + <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" :disabled="true"/> | ||
| 17 | + </el-form-item> | ||
| 18 | + <el-form-item label="相关部门意见" prop="deptOpinion"> | ||
| 19 | + <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" /> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="综合部意见" prop="zhbOpinion"> | ||
| 22 | + <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" /> | ||
| 23 | + </el-form-item> | ||
| 24 | + <el-row> | ||
| 25 | + <el-table :data="fileEntityList"> | ||
| 26 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | ||
| 27 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | ||
| 28 | + <template slot-scope="scope"> | ||
| 29 | + <el-button | ||
| 30 | + size="small" type="success" | ||
| 31 | + icon="el-icon-download" | ||
| 32 | + @click="downloadFA(scope.row)" | ||
| 33 | + v-hasPermi="['office:management:edit']" | ||
| 34 | + v-if="form.id!=null" | ||
| 35 | + round>下载 | ||
| 36 | + </el-button> | ||
| 37 | + </template> | ||
| 38 | + </el-table-column> | ||
| 39 | + </el-table> | ||
| 40 | + </el-row> | ||
| 41 | + </el-form> | ||
| 42 | +</template> | ||
| 43 | + | ||
| 44 | +<script> | ||
| 45 | +import {getHandleAffairsXF} from "@/api/office/handleAffairsXF"; | ||
| 46 | +import Editor from '@/components/ZcEditor'; | ||
| 47 | +export default { | ||
| 48 | + name: "handleAffairsXFInfo", | ||
| 49 | + components: {Editor}, | ||
| 50 | + props: { | ||
| 51 | + businessKey: { | ||
| 52 | + type: String | ||
| 53 | + }, | ||
| 54 | + idInfo: { | ||
| 55 | + type: String | ||
| 56 | + } | ||
| 57 | + }, | ||
| 58 | + data() { | ||
| 59 | + return { | ||
| 60 | + form: {}, | ||
| 61 | + fileEntityList:[] | ||
| 62 | + } | ||
| 63 | + }, | ||
| 64 | + created() { | ||
| 65 | + this.init(); | ||
| 66 | + }, | ||
| 67 | + methods:{ | ||
| 68 | + init(){ | ||
| 69 | + getHandleAffairsXF(this.idInfo).then(response => { | ||
| 70 | + this.form = response.data.handleAffairsXf; | ||
| 71 | + let files = JSON.stringify(response.data.uploadFiles); | ||
| 72 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 73 | + }); | ||
| 74 | + }, | ||
| 75 | + /** 文件下载 */ | ||
| 76 | + downloadFA(row) { | ||
| 77 | + let name = row.name; | ||
| 78 | + let url = row.url; | ||
| 79 | + const a = document.createElement('a') | ||
| 80 | + a.setAttribute('download', name) | ||
| 81 | + a.setAttribute('target', '_blank') | ||
| 82 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 83 | + a.click() | ||
| 84 | + }, | ||
| 85 | + } | ||
| 86 | +} | ||
| 87 | +</script> | ||
| 88 | + | ||
| 89 | +<style scoped> | ||
| 90 | + | ||
| 91 | +</style> |
trash-ui/src/views/office/handleAffairsXF/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px"> | ||
| 4 | + <el-form-item label="信访单位(人)" prop="company"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="queryParams.company" | ||
| 7 | + placeholder="请输入信访单位(人)" | ||
| 8 | + clearable | ||
| 9 | + size="small" | ||
| 10 | + @keyup.enter.native="handleQuery" | ||
| 11 | + /> | ||
| 12 | + </el-form-item> | ||
| 13 | + <el-form-item label="信访日期" prop="receiveDate"> | ||
| 14 | + <el-date-picker clearable size="small" style="width: 200px" | ||
| 15 | + v-model="queryParams.receiveDate" | ||
| 16 | + type="date" | ||
| 17 | + value-format="yyyy-MM-dd" | ||
| 18 | + placeholder="选择信访日期"> | ||
| 19 | + </el-date-picker> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="审批状态" prop="status"> | ||
| 22 | + <el-select v-model="queryParams.status" placeholder="请选择审批状态" clearable size="small"> | ||
| 23 | + <el-option label="审核中" value="0" /> | ||
| 24 | + <el-option label="审核完成" value="1" /> | ||
| 25 | + <el-option label="被驳回" value="2" /> | ||
| 26 | + </el-select> | ||
| 27 | + </el-form-item> | ||
| 28 | + <el-form-item> | ||
| 29 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 30 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 31 | + </el-form-item> | ||
| 32 | + </el-form> | ||
| 33 | + | ||
| 34 | + <el-row :gutter="10" class="mb8"> | ||
| 35 | + <el-col :span="1.5"> | ||
| 36 | + <el-button | ||
| 37 | + type="primary" | ||
| 38 | + icon="el-icon-plus" | ||
| 39 | + size="mini" | ||
| 40 | + @click="handleAdd" | ||
| 41 | + v-hasPermi="['office:handleAffairsXF:add']" | ||
| 42 | + >新增</el-button> | ||
| 43 | + </el-col> | ||
| 44 | + <el-col :span="1.5"> | ||
| 45 | + <el-button | ||
| 46 | + type="success" | ||
| 47 | + icon="el-icon-edit" | ||
| 48 | + size="mini" | ||
| 49 | + :disabled="single" | ||
| 50 | + @click="handleUpdate" | ||
| 51 | + v-hasPermi="['office:handleAffairsXF:edit']" | ||
| 52 | + >修改</el-button> | ||
| 53 | + </el-col> | ||
| 54 | +<!-- <el-col :span="1.5">--> | ||
| 55 | +<!-- <el-button--> | ||
| 56 | +<!-- type="danger"--> | ||
| 57 | +<!-- icon="el-icon-delete"--> | ||
| 58 | +<!-- size="mini"--> | ||
| 59 | +<!-- :disabled="multiple"--> | ||
| 60 | +<!-- @click="handleDelete"--> | ||
| 61 | +<!-- v-hasPermi="['office:handleAffairsXF:remove']"--> | ||
| 62 | +<!-- >删除</el-button>--> | ||
| 63 | +<!-- </el-col>--> | ||
| 64 | + <el-col :span="1.5"> | ||
| 65 | + <el-button | ||
| 66 | + type="warning" | ||
| 67 | + icon="el-icon-download" | ||
| 68 | + size="mini" | ||
| 69 | + @click="handleExport" | ||
| 70 | + v-hasPermi="['office:handleAffairsXF:export']" | ||
| 71 | + >导出</el-button> | ||
| 72 | + </el-col> | ||
| 73 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||
| 74 | + </el-row> | ||
| 75 | + | ||
| 76 | + <el-table v-loading="loading" :data="handleAffairsXFList" @selection-change="handleSelectionChange"> | ||
| 77 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 78 | + <el-table-column label="信访单位(人)" align="center" prop="company" /> | ||
| 79 | + <el-table-column label="信访日期" align="center" prop="receiveDate" width="180"> | ||
| 80 | + <template slot-scope="scope"> | ||
| 81 | + <span>{{ parseTime(scope.row.receiveDate, '{y}-{m}-{d}') }}</span> | ||
| 82 | + </template> | ||
| 83 | + </el-table-column> | ||
| 84 | + <el-table-column label="诉求" align="center" prop="appeal" /> | ||
| 85 | + <el-table-column label="审批状态" align="center" prop="status"> | ||
| 86 | + <template slot-scope="scope"> | ||
| 87 | + <span>{{ parseStatus(scope.row.status) }}</span> | ||
| 88 | + </template> | ||
| 89 | + </el-table-column> | ||
| 90 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 91 | + <template slot-scope="scope"> | ||
| 92 | + <el-button | ||
| 93 | + size="mini" | ||
| 94 | + type="text" | ||
| 95 | + icon="el-icon-edit" | ||
| 96 | + @click="handleInfo(scope.row)" | ||
| 97 | + v-hasPermi="['office:handleAffairsCommon:edit']" | ||
| 98 | + >详情</el-button> | ||
| 99 | + <el-button | ||
| 100 | + size="mini" | ||
| 101 | + type="text" | ||
| 102 | + icon="el-icon-edit" | ||
| 103 | + @click="handleUpdate(scope.row)" | ||
| 104 | + v-hasPermi="['office:handleAffairsXF:edit']" | ||
| 105 | + >修改</el-button> | ||
| 106 | +<!-- <el-button--> | ||
| 107 | +<!-- size="mini"--> | ||
| 108 | +<!-- type="text"--> | ||
| 109 | +<!-- icon="el-icon-delete"--> | ||
| 110 | +<!-- @click="handleDelete(scope.row)"--> | ||
| 111 | +<!-- v-hasPermi="['office:handleAffairsXF:remove']"--> | ||
| 112 | +<!-- >删除</el-button>--> | ||
| 113 | + </template> | ||
| 114 | + </el-table-column> | ||
| 115 | + </el-table> | ||
| 116 | + | ||
| 117 | + <pagination | ||
| 118 | + v-show="total>0" | ||
| 119 | + :total="total" | ||
| 120 | + :page.sync="queryParams.pageNum" | ||
| 121 | + :limit.sync="queryParams.pageSize" | ||
| 122 | + @pagination="getList" | ||
| 123 | + /> | ||
| 124 | + | ||
| 125 | + <!-- 添加或修改办文办事信访类对话框 --> | ||
| 126 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | ||
| 127 | + <el-form ref="form" :model="form" :rules="rules" label-width="105px"> | ||
| 128 | + <el-form-item label="信访单位(人)" prop="company"> | ||
| 129 | + <el-input v-model="form.company" placeholder="请输入信访单位(人)" /> | ||
| 130 | + </el-form-item> | ||
| 131 | + <el-form-item label="信访日期" prop="receiveDate"> | ||
| 132 | + <el-date-picker clearable size="small" style="width: 100%" | ||
| 133 | + v-model="form.receiveDate" | ||
| 134 | + type="date" | ||
| 135 | + value-format="yyyy-MM-dd" | ||
| 136 | + placeholder="选择信访日期"> | ||
| 137 | + </el-date-picker> | ||
| 138 | + </el-form-item> | ||
| 139 | + <el-form-item label="诉求" prop="appeal"> | ||
| 140 | + <el-input v-model="form.appeal" type="textarea" placeholder="请输入内容" /> | ||
| 141 | + </el-form-item> | ||
| 142 | +<!-- <el-form-item label="相关部门意见" prop="deptOpinion">--> | ||
| 143 | +<!-- <el-input v-model="form.deptOpinion" type="textarea" placeholder="请输入内容" />--> | ||
| 144 | +<!-- </el-form-item>--> | ||
| 145 | +<!-- <el-form-item label="综合部意见" prop="zhbOpinion">--> | ||
| 146 | +<!-- <el-input v-model="form.zhbOpinion" type="textarea" placeholder="请输入内容" />--> | ||
| 147 | +<!-- </el-form-item>--> | ||
| 148 | + <el-row :gutter="2"> | ||
| 149 | + <el-col :span="11"> | ||
| 150 | + <el-form-item prop="fileEntityList" label="附件"> | ||
| 151 | + <el-upload | ||
| 152 | + ref="upload" | ||
| 153 | + action="" | ||
| 154 | + accept=".docx,.xlsx,.xls,.ppt,.rar,.zip,.doc,.pdf,.png,.jpeg,.png,.jpg" | ||
| 155 | + :on-change="fileChange" | ||
| 156 | + :auto-upload="false" | ||
| 157 | + :show-file-list="false" | ||
| 158 | + multiple | ||
| 159 | + :file-list="fileEntityList"> | ||
| 160 | + <el-button size="small" type="primary" icon="el-icon-upload">上传附件</el-button> | ||
| 161 | + </el-upload> | ||
| 162 | + </el-form-item> | ||
| 163 | + </el-col> | ||
| 164 | + </el-row> | ||
| 165 | + <el-row> | ||
| 166 | + <el-table :data="fileEntityList"> | ||
| 167 | + <el-table-column property="name" label="附件名称" header-align="center" align="center"></el-table-column> | ||
| 168 | + <el-table-column label="操作" class-name="small-padding fixed-width" header-align="center" align="center"> | ||
| 169 | + <template slot-scope="scope"> | ||
| 170 | + <el-button | ||
| 171 | + size="small" type="success" | ||
| 172 | + icon="el-icon-download" | ||
| 173 | + @click="downloadFA(scope.row)" | ||
| 174 | + v-hasPermi="['office:management:edit']" | ||
| 175 | + v-if="form.id!=null" | ||
| 176 | + round>下载 | ||
| 177 | + </el-button> | ||
| 178 | + <el-button | ||
| 179 | + size="small" type="danger" | ||
| 180 | + icon="el-icon-delete" | ||
| 181 | + @click="handleDeleteFile(scope.$index)" | ||
| 182 | + v-hasPermi="['office:management:remove']" | ||
| 183 | + round>删除 | ||
| 184 | + </el-button> | ||
| 185 | + </template> | ||
| 186 | + </el-table-column> | ||
| 187 | + </el-table> | ||
| 188 | + </el-row> | ||
| 189 | + </el-form> | ||
| 190 | + <div slot="footer" class="dialog-footer"> | ||
| 191 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 192 | + <el-button @click="cancel">取 消</el-button> | ||
| 193 | + </div> | ||
| 194 | + </el-dialog> | ||
| 195 | + | ||
| 196 | + <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> | ||
| 197 | + <handleAffairsXFInfo :idInfo="idInfo" v-if="openInfo"/> | ||
| 198 | + <div slot="footer" class="dialog-footer"> | ||
| 199 | + <el-button @click="cancel">取 消</el-button> | ||
| 200 | + </div> | ||
| 201 | + </el-dialog> | ||
| 202 | + </div> | ||
| 203 | +</template> | ||
| 204 | + | ||
| 205 | +<script> | ||
| 206 | +import { listHandleAffairsXF, getHandleAffairsXF, delHandleAffairsXF, addHandleAffairsXF, updateHandleAffairsXF, exportHandleAffairsXF } from "@/api/office/handleAffairsXF"; | ||
| 207 | +import handleAffairsXFInfo from "./handleAffairsXFInfo"; | ||
| 208 | +export default { | ||
| 209 | + name: "HandleAffairsXF", | ||
| 210 | + components:{handleAffairsXFInfo}, | ||
| 211 | + data() { | ||
| 212 | + return { | ||
| 213 | + // 遮罩层 | ||
| 214 | + loading: true, | ||
| 215 | + // 选中数组 | ||
| 216 | + ids: [], | ||
| 217 | + // 非单个禁用 | ||
| 218 | + single: true, | ||
| 219 | + // 非多个禁用 | ||
| 220 | + multiple: true, | ||
| 221 | + // 显示搜索条件 | ||
| 222 | + showSearch: true, | ||
| 223 | + // 总条数 | ||
| 224 | + total: 0, | ||
| 225 | + // 办文办事信访类表格数据 | ||
| 226 | + handleAffairsXFList: [], | ||
| 227 | + // 弹出层标题 | ||
| 228 | + title: "", | ||
| 229 | + // 是否显示弹出层 | ||
| 230 | + open: false, | ||
| 231 | + // 查询参数 | ||
| 232 | + queryParams: { | ||
| 233 | + pageNum: 1, | ||
| 234 | + pageSize: 10, | ||
| 235 | + company: null, | ||
| 236 | + receiveDate: null, | ||
| 237 | + appeal: null, | ||
| 238 | + deptOpinion: null, | ||
| 239 | + zhbOpinion: null, | ||
| 240 | + isRead: null, | ||
| 241 | + status: null, | ||
| 242 | + }, | ||
| 243 | + // 表单参数 | ||
| 244 | + form: {}, | ||
| 245 | + // 表单校验 | ||
| 246 | + rules: { | ||
| 247 | + company:[ | ||
| 248 | + { required: true, message: "必填", trigger: "blur" } | ||
| 249 | + ], | ||
| 250 | + receiveDate:[ | ||
| 251 | + { required: true, message: "必填", trigger: "blur" } | ||
| 252 | + ], | ||
| 253 | + appeal:[ | ||
| 254 | + { required: true, message: "必填", trigger: "blur" } | ||
| 255 | + ] | ||
| 256 | + }, | ||
| 257 | + fileEntityList: [], | ||
| 258 | + openInfo:false, | ||
| 259 | + idInfo:null, | ||
| 260 | + }; | ||
| 261 | + }, | ||
| 262 | + created() { | ||
| 263 | + this.getList(); | ||
| 264 | + }, | ||
| 265 | + methods: { | ||
| 266 | + /** 查询办文办事信访类列表 */ | ||
| 267 | + getList() { | ||
| 268 | + this.loading = true; | ||
| 269 | + listHandleAffairsXF(this.queryParams).then(response => { | ||
| 270 | + this.handleAffairsXFList = response.rows; | ||
| 271 | + this.total = response.total; | ||
| 272 | + this.loading = false; | ||
| 273 | + }); | ||
| 274 | + }, | ||
| 275 | + // 取消按钮 | ||
| 276 | + cancel() { | ||
| 277 | + this.open = false; | ||
| 278 | + this.openInfo = false; | ||
| 279 | + this.idInfo = null; | ||
| 280 | + this.reset(); | ||
| 281 | + }, | ||
| 282 | + // 表单重置 | ||
| 283 | + reset() { | ||
| 284 | + this.fileEntityList=[]; | ||
| 285 | + this.form = { | ||
| 286 | + company: null, | ||
| 287 | + receiveDate: null, | ||
| 288 | + appeal: null, | ||
| 289 | + deptOpinion: null, | ||
| 290 | + zhbOpinion: null, | ||
| 291 | + isRead: null, | ||
| 292 | + }; | ||
| 293 | + this.resetForm("form"); | ||
| 294 | + }, | ||
| 295 | + /** 搜索按钮操作 */ | ||
| 296 | + handleQuery() { | ||
| 297 | + this.queryParams.pageNum = 1; | ||
| 298 | + this.getList(); | ||
| 299 | + }, | ||
| 300 | + /** 重置按钮操作 */ | ||
| 301 | + resetQuery() { | ||
| 302 | + this.resetForm("queryForm"); | ||
| 303 | + this.handleQuery(); | ||
| 304 | + }, | ||
| 305 | + // 多选框选中数据 | ||
| 306 | + handleSelectionChange(selection) { | ||
| 307 | + this.ids = selection.map(item => item.id) | ||
| 308 | + this.single = selection.length!==1 | ||
| 309 | + this.multiple = !selection.length | ||
| 310 | + }, | ||
| 311 | + /** 查看按钮操作 */ | ||
| 312 | + handleInfo(row){ | ||
| 313 | + this.reset(); | ||
| 314 | + this.idInfo = row.id; | ||
| 315 | + this.title = "办文办事-信访类详情"; | ||
| 316 | + this.openInfo = true; | ||
| 317 | + }, | ||
| 318 | + /** 新增按钮操作 */ | ||
| 319 | + handleAdd() { | ||
| 320 | + this.reset(); | ||
| 321 | + this.open = true; | ||
| 322 | + this.title = "添加办文办事信访类"; | ||
| 323 | + }, | ||
| 324 | + /** 修改按钮操作 */ | ||
| 325 | + handleUpdate(row) { | ||
| 326 | + this.reset(); | ||
| 327 | + const id = row.id || this.ids | ||
| 328 | + getHandleAffairsXF(id).then(response => { | ||
| 329 | + this.form = response.data.handleAffairsXf; | ||
| 330 | + let files = JSON.stringify(response.data.uploadFiles); | ||
| 331 | + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")) | ||
| 332 | + this.open = true; | ||
| 333 | + this.title = "修改办文办事信访类"; | ||
| 334 | + }); | ||
| 335 | + }, | ||
| 336 | + /** 提交按钮 */ | ||
| 337 | + submitForm() { | ||
| 338 | + this.$refs["form"].validate(valid => { | ||
| 339 | + if (valid) { | ||
| 340 | + let formData = new FormData(); | ||
| 341 | + let form = this.form; | ||
| 342 | + //去掉params属性 | ||
| 343 | + delete form.params; | ||
| 344 | + formData.append('fileList', null); | ||
| 345 | + //将新增的文件放入formData | ||
| 346 | + this.fileEntityList.forEach(item => { | ||
| 347 | + if(item.id==null){ | ||
| 348 | + formData.append('fileList', item.raw) | ||
| 349 | + } | ||
| 350 | + }) | ||
| 351 | + if (this.form.id != null) { | ||
| 352 | + formData.append("handleAffairsXf", JSON.stringify(form)); | ||
| 353 | + formData.append("uploadFilesList", null); | ||
| 354 | + this.fileEntityList.forEach(item => { | ||
| 355 | + delete item.params; | ||
| 356 | + if(item != "null" && item != null){ | ||
| 357 | + formData.append('uploadFilesList', JSON.stringify(item).replaceAll("url", "filePath").replaceAll("name", "fileName")); | ||
| 358 | + } | ||
| 359 | + }) | ||
| 360 | + updateHandleAffairsXF(formData).then(response => { | ||
| 361 | + this.msgSuccess("修改成功"); | ||
| 362 | + this.open = false; | ||
| 363 | + this.getList(); | ||
| 364 | + }); | ||
| 365 | + } else { | ||
| 366 | + for (let key in form) { | ||
| 367 | + formData.append(key, form[key] == null ? "" : form[key]) | ||
| 368 | + } | ||
| 369 | + addHandleAffairsXF(formData).then(response => { | ||
| 370 | + this.msgSuccess("新增成功"); | ||
| 371 | + this.open = false; | ||
| 372 | + this.getList(); | ||
| 373 | + }); | ||
| 374 | + } | ||
| 375 | + } | ||
| 376 | + }); | ||
| 377 | + }, | ||
| 378 | + /** 删除按钮操作 */ | ||
| 379 | + handleDelete(row) { | ||
| 380 | + const ids = row.id || this.ids; | ||
| 381 | + this.$confirm('是否确认删除办文办事信访类编号为"' + ids + '"的数据项?', "警告", { | ||
| 382 | + confirmButtonText: "确定", | ||
| 383 | + cancelButtonText: "取消", | ||
| 384 | + type: "warning" | ||
| 385 | + }).then(function() { | ||
| 386 | + return delHandleAffairsXF(ids); | ||
| 387 | + }).then(() => { | ||
| 388 | + this.getList(); | ||
| 389 | + this.msgSuccess("删除成功"); | ||
| 390 | + }) | ||
| 391 | + }, | ||
| 392 | + /** 导出按钮操作 */ | ||
| 393 | + handleExport() { | ||
| 394 | + const queryParams = this.queryParams; | ||
| 395 | + this.$confirm('是否确认导出所有办文办事信访类数据项?', "警告", { | ||
| 396 | + confirmButtonText: "确定", | ||
| 397 | + cancelButtonText: "取消", | ||
| 398 | + type: "warning" | ||
| 399 | + }).then(function() { | ||
| 400 | + return exportHandleAffairsXF(queryParams); | ||
| 401 | + }).then(response => { | ||
| 402 | + this.download(response.msg); | ||
| 403 | + }) | ||
| 404 | + }, | ||
| 405 | + /** | ||
| 406 | + * 文件改变时,限制文件上传格式和大小 | ||
| 407 | + * 文件格式只能为docx/xlsx/xls/ppt/rar/zip/doc/pdf/png/jpeg/png/jpg | ||
| 408 | + * 大小不超过5M | ||
| 409 | + * */ | ||
| 410 | + fileChange(file, fileList) { | ||
| 411 | + let count = 0; | ||
| 412 | + for (let i = 0; i < fileList.length; i++) { | ||
| 413 | + // console.log(fileList.length) | ||
| 414 | + // console.log(this.fileEntityList[i].name+"111"+file.name) | ||
| 415 | + if (fileList[i].name == file.name) { | ||
| 416 | + count++; | ||
| 417 | + if (count == 2) { | ||
| 418 | + this.$message({ | ||
| 419 | + message: '已存在此文件!', | ||
| 420 | + type: 'warning' | ||
| 421 | + }); | ||
| 422 | + for (let j = fileList.length; j > 0; j--) { | ||
| 423 | + //如果存在此文件,去除新选择的重复文件 | ||
| 424 | + if (fileList[j - 1].name == file.name) { | ||
| 425 | + fileList.splice(j - 1, 1); | ||
| 426 | + i--; | ||
| 427 | + return false; | ||
| 428 | + } | ||
| 429 | + } | ||
| 430 | + } | ||
| 431 | + } | ||
| 432 | + } | ||
| 433 | + let fileType = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase(); | ||
| 434 | + //格式符合后判断大小 | ||
| 435 | + if ("docx,xlsx,xls,ppt,rar,zip,doc,pdf,png,jpeg,png,jpg".indexOf(fileType) != -1) { | ||
| 436 | + let max5M = file.size / 1024 / 1024 < 5; | ||
| 437 | + if (!max5M) { | ||
| 438 | + this.$message({ | ||
| 439 | + message: '上传文件大小不得超过5M!', | ||
| 440 | + type: 'warning' | ||
| 441 | + }); | ||
| 442 | + } else { | ||
| 443 | + //符合条件后进行添加 | ||
| 444 | + this.fileEntityList = fileList | ||
| 445 | + } | ||
| 446 | + } else { | ||
| 447 | + this.$message({ | ||
| 448 | + message: '上传文件只能是 docx、xlsx、xls、ppt、rar、zip、doc、pdf、png、jpeg、png、jpg格式!', | ||
| 449 | + type: 'warning' | ||
| 450 | + }); | ||
| 451 | + } | ||
| 452 | + }, | ||
| 453 | + // 删除文件 | ||
| 454 | + handleDeleteFile(index) { | ||
| 455 | + this.fileEntityList.splice(index, 1); | ||
| 456 | + }, | ||
| 457 | + /** 文件下载 */ | ||
| 458 | + downloadFA(row) { | ||
| 459 | + let name = row.name; | ||
| 460 | + let url = row.url; | ||
| 461 | + const a = document.createElement('a') | ||
| 462 | + a.setAttribute('download', name) | ||
| 463 | + a.setAttribute('target', '_blank') | ||
| 464 | + a.setAttribute('href', process.env.VUE_APP_BASE_API + url); | ||
| 465 | + a.click() | ||
| 466 | + }, | ||
| 467 | + } | ||
| 468 | +}; | ||
| 469 | +</script> |
trash-ui/src/views/office/leaveApplication/index.vue
| @@ -152,7 +152,7 @@ | @@ -152,7 +152,7 @@ | ||
| 152 | /> | 152 | /> |
| 153 | 153 | ||
| 154 | <!-- 添加或修改请假申请对话框 --> | 154 | <!-- 添加或修改请假申请对话框 --> |
| 155 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | 155 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> |
| 156 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 156 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 157 | 157 | ||
| 158 | <el-form-item label="联系方式" prop="phone"> | 158 | <el-form-item label="联系方式" prop="phone"> |
| @@ -237,7 +237,7 @@ | @@ -237,7 +237,7 @@ | ||
| 237 | </div> | 237 | </div> |
| 238 | </el-dialog> | 238 | </el-dialog> |
| 239 | 239 | ||
| 240 | - <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body> | 240 | + <el-dialog :title="title" :visible.sync="openInfo" width="500px" append-to-body :close-on-click-modal="false"> |
| 241 | <leaveApplicationInfo :idInfo="idInfo" v-if="openInfo"/> | 241 | <leaveApplicationInfo :idInfo="idInfo" v-if="openInfo"/> |
| 242 | <div slot="footer" class="dialog-footer"> | 242 | <div slot="footer" class="dialog-footer"> |
| 243 | <el-button @click="cancel">取 消</el-button> | 243 | <el-button @click="cancel">取 消</el-button> |
trash-ui/src/views/office/logistics/articleRequest.vue
0 → 100644
trash-ui/src/views/office/logistics/goods.vue
0 → 100644
trash-ui/src/views/office/logistics/index.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> | 3 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> |
| 4 | - <el-form-item label="申请类型" prop="type"> | ||
| 5 | - <el-select v-model="queryParams.type" placeholder="请选择申请类型" clearable size="small"> | ||
| 6 | - <el-option label="用章申请" value="用章申请" /> | ||
| 7 | - <el-option label="物品申请" value="物品申请" /> | ||
| 8 | - <el-option label="物品采购申请" value="物品采购申请" /> | ||
| 9 | - </el-select> | ||
| 10 | - </el-form-item> | ||
| 11 | <el-form-item label="申请部门" prop="deptId"> | 4 | <el-form-item label="申请部门" prop="deptId"> |
| 12 | <el-select v-model="queryParams.deptId" placeholder="请输入申请部门" clearable size="small"> | 5 | <el-select v-model="queryParams.deptId" placeholder="请输入申请部门" clearable size="small"> |
| 13 | <el-option label="部门1" value="1" /> | 6 | <el-option label="部门1" value="1" /> |
| @@ -239,6 +232,11 @@ import { listLogistics, getLogistics, delLogistics, addLogistics, updateLogistic | @@ -239,6 +232,11 @@ import { listLogistics, getLogistics, delLogistics, addLogistics, updateLogistic | ||
| 239 | import logisticsInfo from "./logisticsInfo"; | 232 | import logisticsInfo from "./logisticsInfo"; |
| 240 | export default { | 233 | export default { |
| 241 | name: "Logistics", | 234 | name: "Logistics", |
| 235 | + props: { | ||
| 236 | + type: { | ||
| 237 | + type: Number | ||
| 238 | + } | ||
| 239 | + }, | ||
| 242 | components: { | 240 | components: { |
| 243 | logisticsInfo | 241 | logisticsInfo |
| 244 | }, | 242 | }, |
trash-ui/src/views/office/logistics/seal.vue
0 → 100644
trash-ui/src/views/office/management/index.vue
| @@ -177,7 +177,7 @@ | @@ -177,7 +177,7 @@ | ||
| 177 | /> | 177 | /> |
| 178 | 178 | ||
| 179 | <!-- 添加或修改合同管理对话框 --> | 179 | <!-- 添加或修改合同管理对话框 --> |
| 180 | - <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body> | 180 | + <el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false"> |
| 181 | <el-form ref="form" :model="form" :rules="rules" label-width="105px"> | 181 | <el-form ref="form" :model="form" :rules="rules" label-width="105px"> |
| 182 | <el-row :gutter="2"> | 182 | <el-row :gutter="2"> |
| 183 | <el-col :span="11"> | 183 | <el-col :span="11"> |
| @@ -299,7 +299,7 @@ | @@ -299,7 +299,7 @@ | ||
| 299 | <el-button @click="cancel">取 消</el-button> | 299 | <el-button @click="cancel">取 消</el-button> |
| 300 | </div> | 300 | </div> |
| 301 | </el-dialog> | 301 | </el-dialog> |
| 302 | - <el-dialog :title="title" :visible.sync="openInfo"> | 302 | + <el-dialog :title="title" :visible.sync="openInfo" :close-on-click-modal="false"> |
| 303 | <contractInfo :idInfo="idInfo" v-if="openInfo"/> | 303 | <contractInfo :idInfo="idInfo" v-if="openInfo"/> |
| 304 | <div slot="footer" class="dialog-footer"> | 304 | <div slot="footer" class="dialog-footer"> |
| 305 | <el-button @click="cancel">取 消</el-button> | 305 | <el-button @click="cancel">取 消</el-button> |
trash-workFlow/src/main/java/com/trash/office/controller/HandleAffairsCommonController.java
0 → 100644
| 1 | +package com.trash.office.controller; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.ArrayList; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +import com.alibaba.fastjson.JSON; | ||
| 8 | +import com.trash.office.domain.Conference; | ||
| 9 | +import com.trash.office.domain.UploadFile; | ||
| 10 | +import com.trash.office.domain.vo.ConferenceVo; | ||
| 11 | +import com.trash.office.domain.vo.HandleAffairsCommonVo; | ||
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.web.bind.annotation.*; | ||
| 15 | +import com.trash.common.annotation.Log; | ||
| 16 | +import com.trash.common.core.controller.BaseController; | ||
| 17 | +import com.trash.common.core.domain.AjaxResult; | ||
| 18 | +import com.trash.common.enums.BusinessType; | ||
| 19 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 20 | +import com.trash.office.service.IHandleAffairsCommonService; | ||
| 21 | +import com.trash.common.utils.poi.ExcelUtil; | ||
| 22 | +import com.trash.common.core.page.TableDataInfo; | ||
| 23 | +import org.springframework.web.multipart.MultipartFile; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * 办文办事-普通类Controller | ||
| 27 | + * | ||
| 28 | + * @author 2c | ||
| 29 | + * @date 2023-05-11 | ||
| 30 | + */ | ||
| 31 | +@RestController | ||
| 32 | +@RequestMapping("/office/handleAffairsCommon") | ||
| 33 | +public class HandleAffairsCommonController extends BaseController | ||
| 34 | +{ | ||
| 35 | + @Autowired | ||
| 36 | + private IHandleAffairsCommonService handleAffairsCommonService; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 查询办文办事-普通类列表 | ||
| 40 | + */ | ||
| 41 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:list')") | ||
| 42 | + @GetMapping("/list") | ||
| 43 | + public TableDataInfo list(HandleAffairsCommon handleAffairsCommon) | ||
| 44 | + { | ||
| 45 | + startPage(); | ||
| 46 | + List<HandleAffairsCommon> list = handleAffairsCommonService.selectHandleAffairsCommonList(handleAffairsCommon); | ||
| 47 | + return getDataTable(list); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 导出办文办事-普通类列表 | ||
| 52 | + */ | ||
| 53 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:export')") | ||
| 54 | + @Log(title = "办文办事-普通类", businessType = BusinessType.EXPORT) | ||
| 55 | + @GetMapping("/export") | ||
| 56 | + public AjaxResult export(HandleAffairsCommon handleAffairsCommon) | ||
| 57 | + { | ||
| 58 | + List<HandleAffairsCommon> list = handleAffairsCommonService.selectHandleAffairsCommonList(handleAffairsCommon); | ||
| 59 | + ExcelUtil<HandleAffairsCommon> util = new ExcelUtil<HandleAffairsCommon>(HandleAffairsCommon.class); | ||
| 60 | + return util.exportExcel(list, "handleAffairsCommon"); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * 获取办文办事-普通类详细信息 | ||
| 65 | + */ | ||
| 66 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:query')") | ||
| 67 | + @GetMapping(value = "/{id}") | ||
| 68 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 69 | + { | ||
| 70 | + return AjaxResult.success(handleAffairsCommonService.selectHandleAffairsCommonById(id)); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 新增办文办事-普通类 | ||
| 75 | + */ | ||
| 76 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:add')") | ||
| 77 | + @Log(title = "办文办事-普通类", businessType = BusinessType.INSERT) | ||
| 78 | + @PostMapping | ||
| 79 | + public AjaxResult add(@RequestParam(value = "fileList") MultipartFile[] files, HandleAffairsCommon handleAffairsCommon) throws IOException | ||
| 80 | + { | ||
| 81 | + return toAjax(handleAffairsCommonService.insertHandleAffairsCommon(files,handleAffairsCommon)); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 修改办文办事-普通类 | ||
| 86 | + */ | ||
| 87 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:edit')") | ||
| 88 | + @Log(title = "办文办事-普通类", businessType = BusinessType.UPDATE) | ||
| 89 | + @PutMapping | ||
| 90 | + public AjaxResult edit(@RequestParam(value = "fileList") MultipartFile[] files,String handleAffairsCommon,String[] uploadFilesList) throws IOException | ||
| 91 | + { | ||
| 92 | + HandleAffairsCommonVo handleAffairsCommonVo = new HandleAffairsCommonVo(); | ||
| 93 | + handleAffairsCommonVo.setHandleAffairsCommon(JSON.parseObject(handleAffairsCommon, HandleAffairsCommon.class)); | ||
| 94 | + List<UploadFile> uploadFileList = new ArrayList<>(); | ||
| 95 | + for (String uploadFile : uploadFilesList) { | ||
| 96 | + UploadFile uploadFile1 = JSON.parseObject(uploadFile,UploadFile.class); | ||
| 97 | + if(uploadFile1!=null){ | ||
| 98 | + if(uploadFile1.getId()!=null){ | ||
| 99 | + uploadFileList.add(uploadFile1); | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + handleAffairsCommonVo.setUploadFiles(uploadFileList); | ||
| 104 | + return toAjax(handleAffairsCommonService.updateHandleAffairsCommon(files,handleAffairsCommonVo)); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + /** | ||
| 108 | + * 删除办文办事-普通类 | ||
| 109 | + */ | ||
| 110 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsCommon:remove')") | ||
| 111 | + @Log(title = "办文办事-普通类", businessType = BusinessType.DELETE) | ||
| 112 | + @DeleteMapping("/{ids}") | ||
| 113 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 114 | + { | ||
| 115 | + return toAjax(handleAffairsCommonService.deleteHandleAffairsCommonByIds(ids)); | ||
| 116 | + } | ||
| 117 | +} |
trash-workFlow/src/main/java/com/trash/office/controller/HandleAffairsXfController.java
0 → 100644
| 1 | +package com.trash.office.controller; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.ArrayList; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +import com.alibaba.fastjson.JSON; | ||
| 8 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 9 | +import com.trash.office.domain.UploadFile; | ||
| 10 | +import com.trash.office.domain.vo.HandleAffairsCommonVo; | ||
| 11 | +import com.trash.office.domain.vo.HandleAffairsXFVo; | ||
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.web.bind.annotation.*; | ||
| 15 | +import com.trash.common.annotation.Log; | ||
| 16 | +import com.trash.common.core.controller.BaseController; | ||
| 17 | +import com.trash.common.core.domain.AjaxResult; | ||
| 18 | +import com.trash.common.enums.BusinessType; | ||
| 19 | +import com.trash.office.domain.HandleAffairsXf; | ||
| 20 | +import com.trash.office.service.IHandleAffairsXfService; | ||
| 21 | +import com.trash.common.utils.poi.ExcelUtil; | ||
| 22 | +import com.trash.common.core.page.TableDataInfo; | ||
| 23 | +import org.springframework.web.multipart.MultipartFile; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * 办文办事信访类Controller | ||
| 27 | + * | ||
| 28 | + * @author 2c | ||
| 29 | + * @date 2023-05-11 | ||
| 30 | + */ | ||
| 31 | +@RestController | ||
| 32 | +@RequestMapping("/office/handleAffairsXF") | ||
| 33 | +public class HandleAffairsXfController extends BaseController | ||
| 34 | +{ | ||
| 35 | + @Autowired | ||
| 36 | + private IHandleAffairsXfService handleAffairsXfService; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 查询办文办事信访类列表 | ||
| 40 | + */ | ||
| 41 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:list')") | ||
| 42 | + @GetMapping("/list") | ||
| 43 | + public TableDataInfo list(HandleAffairsXf handleAffairsXf) | ||
| 44 | + { | ||
| 45 | + startPage(); | ||
| 46 | + List<HandleAffairsXf> list = handleAffairsXfService.selectHandleAffairsXfList(handleAffairsXf); | ||
| 47 | + return getDataTable(list); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 导出办文办事信访类列表 | ||
| 52 | + */ | ||
| 53 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:export')") | ||
| 54 | + @Log(title = "办文办事信访类", businessType = BusinessType.EXPORT) | ||
| 55 | + @GetMapping("/export") | ||
| 56 | + public AjaxResult export(HandleAffairsXf handleAffairsXf) | ||
| 57 | + { | ||
| 58 | + List<HandleAffairsXf> list = handleAffairsXfService.selectHandleAffairsXfList(handleAffairsXf); | ||
| 59 | + ExcelUtil<HandleAffairsXf> util = new ExcelUtil<HandleAffairsXf>(HandleAffairsXf.class); | ||
| 60 | + return util.exportExcel(list, "handleAffairsXF"); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * 获取办文办事信访类详细信息 | ||
| 65 | + */ | ||
| 66 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:query')") | ||
| 67 | + @GetMapping(value = "/{id}") | ||
| 68 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 69 | + { | ||
| 70 | + return AjaxResult.success(handleAffairsXfService.selectHandleAffairsXfById(id)); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 新增办文办事信访类 | ||
| 75 | + */ | ||
| 76 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:add')") | ||
| 77 | + @Log(title = "办文办事信访类", businessType = BusinessType.INSERT) | ||
| 78 | + @PostMapping | ||
| 79 | + public AjaxResult add(@RequestParam(value = "fileList") MultipartFile[] files, HandleAffairsXf handleAffairsXf) throws IOException | ||
| 80 | + { | ||
| 81 | + return toAjax(handleAffairsXfService.insertHandleAffairsXf(files,handleAffairsXf)); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 修改办文办事信访类 | ||
| 86 | + */ | ||
| 87 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:edit')") | ||
| 88 | + @Log(title = "办文办事信访类", businessType = BusinessType.UPDATE) | ||
| 89 | + @PutMapping | ||
| 90 | + public AjaxResult edit(@RequestParam(value = "fileList") MultipartFile[] files,String handleAffairsXf,String[] uploadFilesList) throws IOException { | ||
| 91 | + HandleAffairsXFVo handleAffairsXFVo = new HandleAffairsXFVo(); | ||
| 92 | + handleAffairsXFVo.setHandleAffairsXf(JSON.parseObject(handleAffairsXf, HandleAffairsXf.class)); | ||
| 93 | + List<UploadFile> uploadFileList = new ArrayList<>(); | ||
| 94 | + for (String uploadFile : uploadFilesList) { | ||
| 95 | + UploadFile uploadFile1 = JSON.parseObject(uploadFile,UploadFile.class); | ||
| 96 | + if(uploadFile1!=null){ | ||
| 97 | + if(uploadFile1.getId()!=null){ | ||
| 98 | + uploadFileList.add(uploadFile1); | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + handleAffairsXFVo.setUploadFiles(uploadFileList); | ||
| 103 | + return toAjax(handleAffairsXfService.updateHandleAffairsXf(files,handleAffairsXFVo)); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + /** | ||
| 107 | + * 删除办文办事信访类 | ||
| 108 | + */ | ||
| 109 | + @PreAuthorize("@ss.hasPermi('office:handleAffairsXF:remove')") | ||
| 110 | + @Log(title = "办文办事信访类", businessType = BusinessType.DELETE) | ||
| 111 | + @DeleteMapping("/{ids}") | ||
| 112 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 113 | + { | ||
| 114 | + return toAjax(handleAffairsXfService.deleteHandleAffairsXfByIds(ids)); | ||
| 115 | + } | ||
| 116 | +} |
trash-workFlow/src/main/java/com/trash/office/domain/HandleAffairsCommon.java
0 → 100644
| 1 | +package com.trash.office.domain; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 5 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 6 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 7 | +import com.trash.common.annotation.Excel; | ||
| 8 | +import com.trash.common.core.domain.BaseEntity; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 办文办事-普通类对象 office_handle_affairs_common | ||
| 12 | + * | ||
| 13 | + * @author 2c | ||
| 14 | + * @date 2023-05-11 | ||
| 15 | + */ | ||
| 16 | +public class HandleAffairsCommon extends BaseEntity | ||
| 17 | +{ | ||
| 18 | + private static final long serialVersionUID = 1L; | ||
| 19 | + | ||
| 20 | + /** $column.columnComment */ | ||
| 21 | + private Long id; | ||
| 22 | + | ||
| 23 | + /** 来文单位 */ | ||
| 24 | + @Excel(name = "来文单位") | ||
| 25 | + private String company; | ||
| 26 | + | ||
| 27 | + /** 收文时间 */ | ||
| 28 | + @JsonFormat(pattern = "yyyy-MM-dd") | ||
| 29 | + @Excel(name = "收文时间", width = 30, dateFormat = "yyyy-MM-dd") | ||
| 30 | + private Date receiveTime; | ||
| 31 | + | ||
| 32 | + /** 文件标题 */ | ||
| 33 | + @Excel(name = "文件标题") | ||
| 34 | + private String title; | ||
| 35 | + | ||
| 36 | + /** 相关部门意见 */ | ||
| 37 | + @Excel(name = "相关部门意见") | ||
| 38 | + private String deptOpinion; | ||
| 39 | + | ||
| 40 | + /** 综合部意见 */ | ||
| 41 | + @Excel(name = "综合部意见") | ||
| 42 | + private String zhbOpinion; | ||
| 43 | + | ||
| 44 | + /** 是否已阅 */ | ||
| 45 | + @Excel(name = "是否已阅") | ||
| 46 | + private Integer isRead; | ||
| 47 | + | ||
| 48 | + /** 审批状态 */ | ||
| 49 | + @Excel(name = "审批状态") | ||
| 50 | + private Integer status; | ||
| 51 | + | ||
| 52 | + public void setId(Long id) | ||
| 53 | + { | ||
| 54 | + this.id = id; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public Long getId() | ||
| 58 | + { | ||
| 59 | + return id; | ||
| 60 | + } | ||
| 61 | + public void setCompany(String company) | ||
| 62 | + { | ||
| 63 | + this.company = company; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public String getCompany() | ||
| 67 | + { | ||
| 68 | + return company; | ||
| 69 | + } | ||
| 70 | + public void setReceiveTime(Date receiveTime) | ||
| 71 | + { | ||
| 72 | + this.receiveTime = receiveTime; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public Date getReceiveTime() | ||
| 76 | + { | ||
| 77 | + return receiveTime; | ||
| 78 | + } | ||
| 79 | + public void setTitle(String title) | ||
| 80 | + { | ||
| 81 | + this.title = title; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public String getTitle() | ||
| 85 | + { | ||
| 86 | + return title; | ||
| 87 | + } | ||
| 88 | + public void setDeptOpinion(String deptOpinion) | ||
| 89 | + { | ||
| 90 | + this.deptOpinion = deptOpinion; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public String getDeptOpinion() | ||
| 94 | + { | ||
| 95 | + return deptOpinion; | ||
| 96 | + } | ||
| 97 | + public void setZhbOpinion(String zhbOpinion) | ||
| 98 | + { | ||
| 99 | + this.zhbOpinion = zhbOpinion; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public String getZhbOpinion() | ||
| 103 | + { | ||
| 104 | + return zhbOpinion; | ||
| 105 | + } | ||
| 106 | + public void setIsRead(Integer isRead) | ||
| 107 | + { | ||
| 108 | + this.isRead = isRead; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public Integer getIsRead() | ||
| 112 | + { | ||
| 113 | + return isRead; | ||
| 114 | + } | ||
| 115 | + public void setStatus(Integer status) | ||
| 116 | + { | ||
| 117 | + this.status = status; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public Integer getStatus() | ||
| 121 | + { | ||
| 122 | + return status; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + @Override | ||
| 126 | + public String toString() { | ||
| 127 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 128 | + .append("id", getId()) | ||
| 129 | + .append("company", getCompany()) | ||
| 130 | + .append("receiveTime", getReceiveTime()) | ||
| 131 | + .append("title", getTitle()) | ||
| 132 | + .append("deptOpinion", getDeptOpinion()) | ||
| 133 | + .append("zhbOpinion", getZhbOpinion()) | ||
| 134 | + .append("isRead", getIsRead()) | ||
| 135 | + .append("status", getStatus()) | ||
| 136 | + .append("createTime", getCreateTime()) | ||
| 137 | + .append("createBy", getCreateBy()) | ||
| 138 | + .append("updateTime", getUpdateTime()) | ||
| 139 | + .append("updateBy", getUpdateBy()) | ||
| 140 | + .toString(); | ||
| 141 | + } | ||
| 142 | +} |
trash-workFlow/src/main/java/com/trash/office/domain/HandleAffairsXf.java
0 → 100644
| 1 | +package com.trash.office.domain; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 5 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 6 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 7 | +import com.trash.common.annotation.Excel; | ||
| 8 | +import com.trash.common.core.domain.BaseEntity; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 办文办事信访类对象 office_handle_affairs_xf | ||
| 12 | + * | ||
| 13 | + * @author 2c | ||
| 14 | + * @date 2023-05-11 | ||
| 15 | + */ | ||
| 16 | +public class HandleAffairsXf extends BaseEntity | ||
| 17 | +{ | ||
| 18 | + private static final long serialVersionUID = 1L; | ||
| 19 | + | ||
| 20 | + /** $column.columnComment */ | ||
| 21 | + private Long id; | ||
| 22 | + | ||
| 23 | + /** 信访单位(人) */ | ||
| 24 | + @Excel(name = "信访单位(人)") | ||
| 25 | + private String company; | ||
| 26 | + | ||
| 27 | + /** 信访日期 */ | ||
| 28 | + @JsonFormat(pattern = "yyyy-MM-dd") | ||
| 29 | + @Excel(name = "信访日期", width = 30, dateFormat = "yyyy-MM-dd") | ||
| 30 | + private Date receiveDate; | ||
| 31 | + | ||
| 32 | + /** 诉求 */ | ||
| 33 | + @Excel(name = "诉求") | ||
| 34 | + private String appeal; | ||
| 35 | + | ||
| 36 | + /** 相关部门意见 */ | ||
| 37 | + @Excel(name = "相关部门意见") | ||
| 38 | + private String deptOpinion; | ||
| 39 | + | ||
| 40 | + /** 综合部意见 */ | ||
| 41 | + @Excel(name = "综合部意见") | ||
| 42 | + private String zhbOpinion; | ||
| 43 | + | ||
| 44 | + /** 是否已阅1:已阅0:未阅 */ | ||
| 45 | + @Excel(name = "是否已阅1:已阅0:未阅") | ||
| 46 | + private Integer isRead; | ||
| 47 | + | ||
| 48 | + /** 审批状态 */ | ||
| 49 | + @Excel(name = "审批状态") | ||
| 50 | + private Integer status; | ||
| 51 | + | ||
| 52 | + public void setId(Long id) | ||
| 53 | + { | ||
| 54 | + this.id = id; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public Long getId() | ||
| 58 | + { | ||
| 59 | + return id; | ||
| 60 | + } | ||
| 61 | + public void setCompany(String company) | ||
| 62 | + { | ||
| 63 | + this.company = company; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public String getCompany() | ||
| 67 | + { | ||
| 68 | + return company; | ||
| 69 | + } | ||
| 70 | + public void setReceiveDate(Date receiveDate) | ||
| 71 | + { | ||
| 72 | + this.receiveDate = receiveDate; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public Date getReceiveDate() | ||
| 76 | + { | ||
| 77 | + return receiveDate; | ||
| 78 | + } | ||
| 79 | + public void setAppeal(String appeal) | ||
| 80 | + { | ||
| 81 | + this.appeal = appeal; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public String getAppeal() | ||
| 85 | + { | ||
| 86 | + return appeal; | ||
| 87 | + } | ||
| 88 | + public void setDeptOpinion(String deptOpinion) | ||
| 89 | + { | ||
| 90 | + this.deptOpinion = deptOpinion; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public String getDeptOpinion() | ||
| 94 | + { | ||
| 95 | + return deptOpinion; | ||
| 96 | + } | ||
| 97 | + public void setZhbOpinion(String zhbOpinion) | ||
| 98 | + { | ||
| 99 | + this.zhbOpinion = zhbOpinion; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public String getZhbOpinion() | ||
| 103 | + { | ||
| 104 | + return zhbOpinion; | ||
| 105 | + } | ||
| 106 | + public void setIsRead(Integer isRead) | ||
| 107 | + { | ||
| 108 | + this.isRead = isRead; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public Integer getIsRead() | ||
| 112 | + { | ||
| 113 | + return isRead; | ||
| 114 | + } | ||
| 115 | + public void setStatus(Integer status) | ||
| 116 | + { | ||
| 117 | + this.status = status; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public Integer getStatus() | ||
| 121 | + { | ||
| 122 | + return status; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + @Override | ||
| 126 | + public String toString() { | ||
| 127 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 128 | + .append("id", getId()) | ||
| 129 | + .append("company", getCompany()) | ||
| 130 | + .append("receiveDate", getReceiveDate()) | ||
| 131 | + .append("appeal", getAppeal()) | ||
| 132 | + .append("deptOpinion", getDeptOpinion()) | ||
| 133 | + .append("zhbOpinion", getZhbOpinion()) | ||
| 134 | + .append("isRead", getIsRead()) | ||
| 135 | + .append("status", getStatus()) | ||
| 136 | + .append("createTime", getCreateTime()) | ||
| 137 | + .append("createBy", getCreateBy()) | ||
| 138 | + .append("updateTime", getUpdateTime()) | ||
| 139 | + .append("updateBy", getUpdateBy()) | ||
| 140 | + .toString(); | ||
| 141 | + } | ||
| 142 | +} |
trash-workFlow/src/main/java/com/trash/office/domain/vo/HandleAffairsCommonVo.java
0 → 100644
| 1 | +package com.trash.office.domain.vo; | ||
| 2 | + | ||
| 3 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 4 | +import com.trash.office.domain.UploadFile; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 办文办事普通类Vo | ||
| 10 | + * | ||
| 11 | + * @author 2c | ||
| 12 | + */ | ||
| 13 | +public class HandleAffairsCommonVo { | ||
| 14 | + private HandleAffairsCommon handleAffairsCommon; | ||
| 15 | + | ||
| 16 | + private List<UploadFile> uploadFiles; | ||
| 17 | + | ||
| 18 | + public List<UploadFile> getUploadFiles() { | ||
| 19 | + return uploadFiles; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public void setUploadFiles(List<UploadFile> uploadFiles) { | ||
| 23 | + this.uploadFiles = uploadFiles; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public HandleAffairsCommon getHandleAffairsCommon() { | ||
| 27 | + return handleAffairsCommon; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public void setHandleAffairsCommon(HandleAffairsCommon handleAffairsCommon) { | ||
| 31 | + this.handleAffairsCommon = handleAffairsCommon; | ||
| 32 | + } | ||
| 33 | +} |
trash-workFlow/src/main/java/com/trash/office/domain/vo/HandleAffairsXFVo.java
0 → 100644
| 1 | +package com.trash.office.domain.vo; | ||
| 2 | + | ||
| 3 | +import com.trash.office.domain.HandleAffairsXf; | ||
| 4 | +import com.trash.office.domain.UploadFile; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 办文办事信访类Vo | ||
| 10 | + * | ||
| 11 | + * @author 2c | ||
| 12 | + */ | ||
| 13 | +public class HandleAffairsXFVo { | ||
| 14 | + private HandleAffairsXf handleAffairsXf; | ||
| 15 | + | ||
| 16 | + private List<UploadFile> uploadFiles; | ||
| 17 | + | ||
| 18 | + public List<UploadFile> getUploadFiles() { | ||
| 19 | + return uploadFiles; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public void setUploadFiles(List<UploadFile> uploadFiles) { | ||
| 23 | + this.uploadFiles = uploadFiles; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public HandleAffairsXf getHandleAffairsXf() { | ||
| 27 | + return handleAffairsXf; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public void setHandleAffairsXf(HandleAffairsXf handleAffairsXf) { | ||
| 31 | + this.handleAffairsXf = handleAffairsXf; | ||
| 32 | + } | ||
| 33 | +} |
trash-workFlow/src/main/java/com/trash/office/mapper/HandleAffairsCommonMapper.java
0 → 100644
| 1 | +package com.trash.office.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 办文办事-普通类Mapper接口 | ||
| 8 | + * | ||
| 9 | + * @author 2c | ||
| 10 | + * @date 2023-05-11 | ||
| 11 | + */ | ||
| 12 | +public interface HandleAffairsCommonMapper | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询办文办事-普通类 | ||
| 16 | + * | ||
| 17 | + * @param id 办文办事-普通类ID | ||
| 18 | + * @return 办文办事-普通类 | ||
| 19 | + */ | ||
| 20 | + HandleAffairsCommon selectHandleAffairsCommonById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询办文办事-普通类列表 | ||
| 24 | + * | ||
| 25 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 26 | + * @return 办文办事-普通类集合 | ||
| 27 | + */ | ||
| 28 | + List<HandleAffairsCommon> selectHandleAffairsCommonList(HandleAffairsCommon handleAffairsCommon); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增办文办事-普通类 | ||
| 32 | + * | ||
| 33 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + int insertHandleAffairsCommon(HandleAffairsCommon handleAffairsCommon); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改办文办事-普通类 | ||
| 40 | + * | ||
| 41 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + int updateHandleAffairsCommon(HandleAffairsCommon handleAffairsCommon); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 删除办文办事-普通类 | ||
| 48 | + * | ||
| 49 | + * @param id 办文办事-普通类ID | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + int deleteHandleAffairsCommonById(Long id); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 批量删除办文办事-普通类 | ||
| 56 | + * | ||
| 57 | + * @param ids 需要删除的数据ID | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + int deleteHandleAffairsCommonByIds(Long[] ids); | ||
| 61 | +} |
trash-workFlow/src/main/java/com/trash/office/mapper/HandleAffairsXfMapper.java
0 → 100644
| 1 | +package com.trash.office.mapper; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.trash.office.domain.HandleAffairsXf; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 办文办事信访类Mapper接口 | ||
| 8 | + * | ||
| 9 | + * @author 2c | ||
| 10 | + * @date 2023-05-11 | ||
| 11 | + */ | ||
| 12 | +public interface HandleAffairsXfMapper | ||
| 13 | +{ | ||
| 14 | + /** | ||
| 15 | + * 查询办文办事信访类 | ||
| 16 | + * | ||
| 17 | + * @param id 办文办事信访类ID | ||
| 18 | + * @return 办文办事信访类 | ||
| 19 | + */ | ||
| 20 | + HandleAffairsXf selectHandleAffairsXfById(Long id); | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 查询办文办事信访类列表 | ||
| 24 | + * | ||
| 25 | + * @param handleAffairsXf 办文办事信访类 | ||
| 26 | + * @return 办文办事信访类集合 | ||
| 27 | + */ | ||
| 28 | + List<HandleAffairsXf> selectHandleAffairsXfList(HandleAffairsXf handleAffairsXf); | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 新增办文办事信访类 | ||
| 32 | + * | ||
| 33 | + * @param handleAffairsXf 办文办事信访类 | ||
| 34 | + * @return 结果 | ||
| 35 | + */ | ||
| 36 | + int insertHandleAffairsXf(HandleAffairsXf handleAffairsXf); | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 修改办文办事信访类 | ||
| 40 | + * | ||
| 41 | + * @param handleAffairsXf 办文办事信访类 | ||
| 42 | + * @return 结果 | ||
| 43 | + */ | ||
| 44 | + int updateHandleAffairsXf(HandleAffairsXf handleAffairsXf); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 删除办文办事信访类 | ||
| 48 | + * | ||
| 49 | + * @param id 办文办事信访类ID | ||
| 50 | + * @return 结果 | ||
| 51 | + */ | ||
| 52 | + int deleteHandleAffairsXfById(Long id); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 批量删除办文办事信访类 | ||
| 56 | + * | ||
| 57 | + * @param ids 需要删除的数据ID | ||
| 58 | + * @return 结果 | ||
| 59 | + */ | ||
| 60 | + int deleteHandleAffairsXfByIds(Long[] ids); | ||
| 61 | +} |
trash-workFlow/src/main/java/com/trash/office/service/IHandleAffairsCommonService.java
0 → 100644
| 1 | +package com.trash.office.service; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.List; | ||
| 5 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 6 | +import com.trash.office.domain.vo.HandleAffairsCommonVo; | ||
| 7 | +import org.springframework.web.multipart.MultipartFile; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 办文办事-普通类Service接口 | ||
| 11 | + * | ||
| 12 | + * @author 2c | ||
| 13 | + * @date 2023-05-11 | ||
| 14 | + */ | ||
| 15 | +public interface IHandleAffairsCommonService | ||
| 16 | +{ | ||
| 17 | + /** | ||
| 18 | + * 查询办文办事-普通类 | ||
| 19 | + * | ||
| 20 | + * @param id 办文办事-普通类ID | ||
| 21 | + * @return 办文办事-普通类 | ||
| 22 | + */ | ||
| 23 | + HandleAffairsCommonVo selectHandleAffairsCommonById(Long id); | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 查询办文办事-普通类列表 | ||
| 27 | + * | ||
| 28 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 29 | + * @return 办文办事-普通类集合 | ||
| 30 | + */ | ||
| 31 | + List<HandleAffairsCommon> selectHandleAffairsCommonList(HandleAffairsCommon handleAffairsCommon); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 新增办文办事-普通类 | ||
| 35 | + * | ||
| 36 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 37 | + * @return 结果 | ||
| 38 | + */ | ||
| 39 | + int insertHandleAffairsCommon(MultipartFile[] files, HandleAffairsCommon handleAffairsCommon) throws IOException; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 修改办文办事-普通类 | ||
| 43 | + * | ||
| 44 | + * @param handleAffairsCommonvo 办文办事-普通类 | ||
| 45 | + * @return 结果 | ||
| 46 | + */ | ||
| 47 | + int updateHandleAffairsCommon(MultipartFile[] files,HandleAffairsCommonVo handleAffairsCommonvo) throws IOException; | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 批量删除办文办事-普通类 | ||
| 51 | + * | ||
| 52 | + * @param ids 需要删除的办文办事-普通类ID | ||
| 53 | + * @return 结果 | ||
| 54 | + */ | ||
| 55 | + int deleteHandleAffairsCommonByIds(Long[] ids); | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 删除办文办事-普通类信息 | ||
| 59 | + * | ||
| 60 | + * @param id 办文办事-普通类ID | ||
| 61 | + * @return 结果 | ||
| 62 | + */ | ||
| 63 | + int deleteHandleAffairsCommonById(Long id); | ||
| 64 | +} |
trash-workFlow/src/main/java/com/trash/office/service/IHandleAffairsXfService.java
0 → 100644
| 1 | +package com.trash.office.service; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.List; | ||
| 5 | +import com.trash.office.domain.HandleAffairsXf; | ||
| 6 | +import com.trash.office.domain.vo.HandleAffairsXFVo; | ||
| 7 | +import org.springframework.web.multipart.MultipartFile; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 办文办事信访类Service接口 | ||
| 11 | + * | ||
| 12 | + * @author 2c | ||
| 13 | + * @date 2023-05-11 | ||
| 14 | + */ | ||
| 15 | +public interface IHandleAffairsXfService | ||
| 16 | +{ | ||
| 17 | + /** | ||
| 18 | + * 查询办文办事信访类 | ||
| 19 | + * | ||
| 20 | + * @param id 办文办事信访类ID | ||
| 21 | + * @return 办文办事信访类 | ||
| 22 | + */ | ||
| 23 | + HandleAffairsXFVo selectHandleAffairsXfById(Long id); | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 查询办文办事信访类列表 | ||
| 27 | + * | ||
| 28 | + * @param handleAffairsXf 办文办事信访类 | ||
| 29 | + * @return 办文办事信访类集合 | ||
| 30 | + */ | ||
| 31 | + List<HandleAffairsXf> selectHandleAffairsXfList(HandleAffairsXf handleAffairsXf); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 新增办文办事信访类 | ||
| 35 | + * | ||
| 36 | + * @param handleAffairsXf 办文办事信访类 | ||
| 37 | + * @return 结果 | ||
| 38 | + */ | ||
| 39 | + int insertHandleAffairsXf(MultipartFile[] files, HandleAffairsXf handleAffairsXf) throws IOException; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 修改办文办事信访类 | ||
| 43 | + * | ||
| 44 | + * @param handleAffairsXf 办文办事信访类 | ||
| 45 | + * @return 结果 | ||
| 46 | + */ | ||
| 47 | + int updateHandleAffairsXf(MultipartFile[] files,HandleAffairsXFVo handleAffairsXFVo) throws IOException; | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 批量删除办文办事信访类 | ||
| 51 | + * | ||
| 52 | + * @param ids 需要删除的办文办事信访类ID | ||
| 53 | + * @return 结果 | ||
| 54 | + */ | ||
| 55 | + int deleteHandleAffairsXfByIds(Long[] ids); | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 删除办文办事信访类信息 | ||
| 59 | + * | ||
| 60 | + * @param id 办文办事信访类ID | ||
| 61 | + * @return 结果 | ||
| 62 | + */ | ||
| 63 | + int deleteHandleAffairsXfById(Long id); | ||
| 64 | +} |
trash-workFlow/src/main/java/com/trash/office/service/impl/HandleAffairsCommonServiceImpl.java
0 → 100644
| 1 | +package com.trash.office.service.impl; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.List; | ||
| 5 | +import java.util.stream.Collectors; | ||
| 6 | + | ||
| 7 | +import com.trash.common.utils.DateUtils; | ||
| 8 | +import com.trash.common.utils.SecurityUtils; | ||
| 9 | +import com.trash.common.utils.file.FileUploadUtils; | ||
| 10 | +import com.trash.office.domain.Conference; | ||
| 11 | +import com.trash.office.domain.UploadFile; | ||
| 12 | +import com.trash.office.domain.vo.ConferenceVo; | ||
| 13 | +import com.trash.office.domain.vo.HandleAffairsCommonVo; | ||
| 14 | +import com.trash.office.mapper.UploadFileMapper; | ||
| 15 | +import com.trash.workflow.domain.Workflow; | ||
| 16 | +import org.activiti.api.process.model.ProcessInstance; | ||
| 17 | +import org.activiti.api.process.model.builders.ProcessPayloadBuilder; | ||
| 18 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 19 | +import org.springframework.stereotype.Service; | ||
| 20 | +import com.trash.office.mapper.HandleAffairsCommonMapper; | ||
| 21 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 22 | +import com.trash.office.service.IHandleAffairsCommonService; | ||
| 23 | +import org.springframework.transaction.annotation.Transactional; | ||
| 24 | +import org.springframework.web.multipart.MultipartFile; | ||
| 25 | + | ||
| 26 | +/** | ||
| 27 | + * 办文办事-普通类Service业务层处理 | ||
| 28 | + * | ||
| 29 | + * @author 2c | ||
| 30 | + * @date 2023-05-11 | ||
| 31 | + */ | ||
| 32 | +@Service | ||
| 33 | +public class HandleAffairsCommonServiceImpl implements IHandleAffairsCommonService | ||
| 34 | +{ | ||
| 35 | + @Autowired | ||
| 36 | + private HandleAffairsCommonMapper handleAffairsCommonMapper; | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 39 | + private UploadFileMapper uploadFileMapper; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 查询办文办事-普通类 | ||
| 43 | + * | ||
| 44 | + * @param id 办文办事-普通类ID | ||
| 45 | + * @return 办文办事-普通类 | ||
| 46 | + */ | ||
| 47 | + @Override | ||
| 48 | + public HandleAffairsCommonVo selectHandleAffairsCommonById(Long id) | ||
| 49 | + { | ||
| 50 | + HandleAffairsCommonVo handleAffairsCommonVo = new HandleAffairsCommonVo(); | ||
| 51 | + handleAffairsCommonVo.setHandleAffairsCommon(handleAffairsCommonMapper.selectHandleAffairsCommonById(id)); | ||
| 52 | + UploadFile uploadFile = new UploadFile(); | ||
| 53 | + uploadFile.setTableName("handle_affairs_common"); | ||
| 54 | + uploadFile.setTableNumber(handleAffairsCommonVo.getHandleAffairsCommon().getId().toString()); | ||
| 55 | + List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 56 | + handleAffairsCommonVo.setUploadFiles(list); | ||
| 57 | + return handleAffairsCommonVo; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 查询办文办事-普通类列表 | ||
| 62 | + * | ||
| 63 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 64 | + * @return 办文办事-普通类 | ||
| 65 | + */ | ||
| 66 | + @Override | ||
| 67 | + public List<HandleAffairsCommon> selectHandleAffairsCommonList(HandleAffairsCommon handleAffairsCommon) | ||
| 68 | + { | ||
| 69 | + return handleAffairsCommonMapper.selectHandleAffairsCommonList(handleAffairsCommon); | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 新增办文办事-普通类 | ||
| 74 | + * | ||
| 75 | + * @param handleAffairsCommon 办文办事-普通类 | ||
| 76 | + * @return 结果 | ||
| 77 | + */ | ||
| 78 | + @Override | ||
| 79 | + @Transactional | ||
| 80 | + public int insertHandleAffairsCommon(MultipartFile[] files,HandleAffairsCommon handleAffairsCommon) throws IOException { | ||
| 81 | + //新增办文办事-普通类 | ||
| 82 | + handleAffairsCommon.setCreateBy(SecurityUtils.getUsername()); | ||
| 83 | + handleAffairsCommon.setStatus(0); | ||
| 84 | + handleAffairsCommon.setIsRead(0); | ||
| 85 | + Integer result = handleAffairsCommonMapper.insertHandleAffairsCommon(handleAffairsCommon); | ||
| 86 | + //文件上传 | ||
| 87 | + for (MultipartFile file : files) { | ||
| 88 | + UploadFile uploadFile = new UploadFile(); | ||
| 89 | + uploadFile.setTableName("handle_affairs_common"); | ||
| 90 | + uploadFile.setTableNumber(handleAffairsCommon.getId().toString()); | ||
| 91 | + uploadFile.setFileName(file.getOriginalFilename()); | ||
| 92 | + uploadFile.setFilePath(FileUploadUtils.uploadFile(file)); | ||
| 93 | + uploadFileMapper.insertUploadFile(uploadFile); | ||
| 94 | + } | ||
| 95 | + return result; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 修改办文办事-普通类 | ||
| 100 | + * | ||
| 101 | + * @param handleAffairsCommonVo 办文办事-普通类 | ||
| 102 | + * @return 结果 | ||
| 103 | + */ | ||
| 104 | + @Override | ||
| 105 | + @Transactional | ||
| 106 | + public int updateHandleAffairsCommon(MultipartFile[] files,HandleAffairsCommonVo handleAffairsCommonVo) throws IOException { | ||
| 107 | + handleAffairsCommonVo.getHandleAffairsCommon().setUpdateBy(SecurityUtils.getUsername()); | ||
| 108 | + //查询文件上传数据然后删除数据库中的数据和文件 | ||
| 109 | + UploadFile uploadFile = new UploadFile(); | ||
| 110 | + uploadFile.setTableName("handle_affairs_common"); | ||
| 111 | + uploadFile.setTableNumber(handleAffairsCommonVo.getHandleAffairsCommon().getId().toString()); | ||
| 112 | + List<UploadFile> uploadFileList = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 113 | + //判断getUploadFiles里是否有旧文件,如果有文件上传则先删除数据库中的数据,再添加新的数据,如果没有文件上传,则删除数据库中的数据和文件 | ||
| 114 | + if (handleAffairsCommonVo.getUploadFiles().size() != 0) { | ||
| 115 | + //获取两个list的交集 | ||
| 116 | + List<UploadFile> distinctList = uploadFileList.stream().filter(item -> handleAffairsCommonVo.getUploadFiles().stream().anyMatch(item2 -> item.getId().equals(item2.getId()))).collect(Collectors.toList()); | ||
| 117 | + //去掉交集得到需要删除的数据 | ||
| 118 | + uploadFileList.removeAll(distinctList); | ||
| 119 | + | ||
| 120 | + for (UploadFile distinctFile : uploadFileList) { | ||
| 121 | + uploadFileMapper.deleteUploadFileById(distinctFile.getId()); | ||
| 122 | + //删除文件 | ||
| 123 | + FileUploadUtils.deleteFile(distinctFile.getFilePath()); | ||
| 124 | + } | ||
| 125 | + } else { | ||
| 126 | + for (UploadFile uploadFile1 : uploadFileList) { | ||
| 127 | + //删除数据库数据 | ||
| 128 | + uploadFileMapper.deleteUploadFileById(uploadFile1.getId()); | ||
| 129 | + //删除文件 | ||
| 130 | + FileUploadUtils.deleteFile(uploadFile1.getFilePath()); | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + //添加新的文件 | ||
| 135 | + for (MultipartFile file : files) { | ||
| 136 | + UploadFile newUploadFile = new UploadFile(); | ||
| 137 | + newUploadFile.setTableName("handle_affairs_common"); | ||
| 138 | + newUploadFile.setTableNumber(handleAffairsCommonVo.getHandleAffairsCommon().getId().toString()); | ||
| 139 | + newUploadFile.setFileName(file.getOriginalFilename()); | ||
| 140 | + newUploadFile.setFilePath(FileUploadUtils.uploadFile(file)); | ||
| 141 | + uploadFileMapper.insertUploadFile(newUploadFile); | ||
| 142 | + } | ||
| 143 | + return handleAffairsCommonMapper.updateHandleAffairsCommon(handleAffairsCommonVo.getHandleAffairsCommon()); | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 批量删除办文办事-普通类 | ||
| 148 | + * | ||
| 149 | + * @param ids 需要删除的办文办事-普通类ID | ||
| 150 | + * @return 结果 | ||
| 151 | + */ | ||
| 152 | + @Override | ||
| 153 | + @Transactional | ||
| 154 | + public int deleteHandleAffairsCommonByIds(Long[] ids) | ||
| 155 | + { | ||
| 156 | + for (Long id : ids) { | ||
| 157 | + HandleAffairsCommon handleAffairsCommon = handleAffairsCommonMapper.selectHandleAffairsCommonById(id); | ||
| 158 | + UploadFile uploadFile = new UploadFile(); | ||
| 159 | + uploadFile.setTableName("handle_affairs_common"); | ||
| 160 | + uploadFile.setTableNumber(handleAffairsCommon.getId().toString()); | ||
| 161 | + List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 162 | + //遍历删除文件 | ||
| 163 | + for (UploadFile file : list) { | ||
| 164 | + uploadFileMapper.deleteUploadFileById(file.getId()); | ||
| 165 | + FileUploadUtils.deleteFile(file.getFilePath()); | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + return handleAffairsCommonMapper.deleteHandleAffairsCommonByIds(ids); | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + /** | ||
| 172 | + * 删除办文办事-普通类信息 | ||
| 173 | + * | ||
| 174 | + * @param id 办文办事-普通类ID | ||
| 175 | + * @return 结果 | ||
| 176 | + */ | ||
| 177 | + @Override | ||
| 178 | + public int deleteHandleAffairsCommonById(Long id) | ||
| 179 | + { | ||
| 180 | + return handleAffairsCommonMapper.deleteHandleAffairsCommonById(id); | ||
| 181 | + } | ||
| 182 | +} |
trash-workFlow/src/main/java/com/trash/office/service/impl/HandleAffairsXfServiceImpl.java
0 → 100644
| 1 | +package com.trash.office.service.impl; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | +import java.util.List; | ||
| 5 | +import java.util.stream.Collectors; | ||
| 6 | + | ||
| 7 | +import com.trash.common.utils.DateUtils; | ||
| 8 | +import com.trash.common.utils.SecurityUtils; | ||
| 9 | +import com.trash.common.utils.file.FileUploadUtils; | ||
| 10 | +import com.trash.office.domain.HandleAffairsCommon; | ||
| 11 | +import com.trash.office.domain.UploadFile; | ||
| 12 | +import com.trash.office.domain.vo.HandleAffairsCommonVo; | ||
| 13 | +import com.trash.office.domain.vo.HandleAffairsXFVo; | ||
| 14 | +import com.trash.office.mapper.UploadFileMapper; | ||
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 16 | +import org.springframework.stereotype.Service; | ||
| 17 | +import com.trash.office.mapper.HandleAffairsXfMapper; | ||
| 18 | +import com.trash.office.domain.HandleAffairsXf; | ||
| 19 | +import com.trash.office.service.IHandleAffairsXfService; | ||
| 20 | +import org.springframework.transaction.annotation.Transactional; | ||
| 21 | +import org.springframework.web.multipart.MultipartFile; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * 办文办事信访类Service业务层处理 | ||
| 25 | + * | ||
| 26 | + * @author 2c | ||
| 27 | + * @date 2023-05-11 | ||
| 28 | + */ | ||
| 29 | +@Service | ||
| 30 | +public class HandleAffairsXfServiceImpl implements IHandleAffairsXfService | ||
| 31 | +{ | ||
| 32 | + @Autowired | ||
| 33 | + private HandleAffairsXfMapper handleAffairsXfMapper; | ||
| 34 | + | ||
| 35 | + @Autowired | ||
| 36 | + private UploadFileMapper uploadFileMapper; | ||
| 37 | + /** | ||
| 38 | + * 查询办文办事信访类 | ||
| 39 | + * | ||
| 40 | + * @param id 办文办事信访类ID | ||
| 41 | + * @return 办文办事信访类 | ||
| 42 | + */ | ||
| 43 | + @Override | ||
| 44 | + public HandleAffairsXFVo selectHandleAffairsXfById(Long id) | ||
| 45 | + { | ||
| 46 | + HandleAffairsXFVo handleAffairsCommonVo = new HandleAffairsXFVo(); | ||
| 47 | + handleAffairsCommonVo.setHandleAffairsXf(handleAffairsXfMapper.selectHandleAffairsXfById(id)); | ||
| 48 | + UploadFile uploadFile = new UploadFile(); | ||
| 49 | + uploadFile.setTableName("handle_affairs_xf"); | ||
| 50 | + uploadFile.setTableNumber(handleAffairsCommonVo.getHandleAffairsXf().getId().toString()); | ||
| 51 | + List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 52 | + handleAffairsCommonVo.setUploadFiles(list); | ||
| 53 | + return handleAffairsCommonVo; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 查询办文办事信访类列表 | ||
| 58 | + * | ||
| 59 | + * @param handleAffairsXf 办文办事信访类 | ||
| 60 | + * @return 办文办事信访类 | ||
| 61 | + */ | ||
| 62 | + @Override | ||
| 63 | + public List<HandleAffairsXf> selectHandleAffairsXfList(HandleAffairsXf handleAffairsXf) | ||
| 64 | + { | ||
| 65 | + return handleAffairsXfMapper.selectHandleAffairsXfList(handleAffairsXf); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * 新增办文办事信访类 | ||
| 70 | + * | ||
| 71 | + * @param handleAffairsXf 办文办事信访类 | ||
| 72 | + * @return 结果 | ||
| 73 | + */ | ||
| 74 | + @Override | ||
| 75 | + @Transactional | ||
| 76 | + public int insertHandleAffairsXf(MultipartFile[] files,HandleAffairsXf handleAffairsXf) throws IOException { | ||
| 77 | + //新增办文办事-普通类 | ||
| 78 | + handleAffairsXf.setCreateBy(SecurityUtils.getUsername()); | ||
| 79 | + handleAffairsXf.setStatus(0); | ||
| 80 | + handleAffairsXf.setIsRead(0); | ||
| 81 | + Integer result = handleAffairsXfMapper.insertHandleAffairsXf(handleAffairsXf); | ||
| 82 | + //文件上传 | ||
| 83 | + for (MultipartFile file : files) { | ||
| 84 | + UploadFile uploadFile = new UploadFile(); | ||
| 85 | + uploadFile.setTableName("handle_affairs_xf"); | ||
| 86 | + uploadFile.setTableNumber(handleAffairsXf.getId().toString()); | ||
| 87 | + uploadFile.setFileName(file.getOriginalFilename()); | ||
| 88 | + uploadFile.setFilePath(FileUploadUtils.uploadFile(file)); | ||
| 89 | + uploadFileMapper.insertUploadFile(uploadFile); | ||
| 90 | + } | ||
| 91 | + return result; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 修改办文办事信访类 | ||
| 96 | + * | ||
| 97 | + * @param handleAffairsXFVo 办文办事信访类 | ||
| 98 | + * @return 结果 | ||
| 99 | + */ | ||
| 100 | + @Override | ||
| 101 | + @Transactional | ||
| 102 | + public int updateHandleAffairsXf(MultipartFile[] files,HandleAffairsXFVo handleAffairsXFVo) throws IOException { | ||
| 103 | + handleAffairsXFVo.getHandleAffairsXf().setUpdateBy(SecurityUtils.getUsername()); | ||
| 104 | + //查询文件上传数据然后删除数据库中的数据和文件 | ||
| 105 | + UploadFile uploadFile = new UploadFile(); | ||
| 106 | + uploadFile.setTableName("handle_affairs_xf"); | ||
| 107 | + uploadFile.setTableNumber(handleAffairsXFVo.getHandleAffairsXf().getId().toString()); | ||
| 108 | + List<UploadFile> uploadFileList = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 109 | + //判断getUploadFiles里是否有旧文件,如果有文件上传则先删除数据库中的数据,再添加新的数据,如果没有文件上传,则删除数据库中的数据和文件 | ||
| 110 | + if (handleAffairsXFVo.getUploadFiles().size() != 0) { | ||
| 111 | + //获取两个list的交集 | ||
| 112 | + List<UploadFile> distinctList = uploadFileList.stream().filter(item -> handleAffairsXFVo.getUploadFiles().stream().anyMatch(item2 -> item.getId().equals(item2.getId()))).collect(Collectors.toList()); | ||
| 113 | + //去掉交集得到需要删除的数据 | ||
| 114 | + uploadFileList.removeAll(distinctList); | ||
| 115 | + | ||
| 116 | + for (UploadFile distinctFile : uploadFileList) { | ||
| 117 | + uploadFileMapper.deleteUploadFileById(distinctFile.getId()); | ||
| 118 | + //删除文件 | ||
| 119 | + FileUploadUtils.deleteFile(distinctFile.getFilePath()); | ||
| 120 | + } | ||
| 121 | + } else { | ||
| 122 | + for (UploadFile uploadFile1 : uploadFileList) { | ||
| 123 | + //删除数据库数据 | ||
| 124 | + uploadFileMapper.deleteUploadFileById(uploadFile1.getId()); | ||
| 125 | + //删除文件 | ||
| 126 | + FileUploadUtils.deleteFile(uploadFile1.getFilePath()); | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + //添加新的文件 | ||
| 131 | + for (MultipartFile file : files) { | ||
| 132 | + UploadFile newUploadFile = new UploadFile(); | ||
| 133 | + newUploadFile.setTableName("handle_affairs_xf"); | ||
| 134 | + newUploadFile.setTableNumber(handleAffairsXFVo.getHandleAffairsXf().getId().toString()); | ||
| 135 | + newUploadFile.setFileName(file.getOriginalFilename()); | ||
| 136 | + newUploadFile.setFilePath(FileUploadUtils.uploadFile(file)); | ||
| 137 | + uploadFileMapper.insertUploadFile(newUploadFile); | ||
| 138 | + } | ||
| 139 | + return handleAffairsXfMapper.updateHandleAffairsXf(handleAffairsXFVo.getHandleAffairsXf()); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + /** | ||
| 143 | + * 批量删除办文办事信访类 | ||
| 144 | + * | ||
| 145 | + * @param ids 需要删除的办文办事信访类ID | ||
| 146 | + * @return 结果 | ||
| 147 | + */ | ||
| 148 | + @Override | ||
| 149 | + @Transactional | ||
| 150 | + public int deleteHandleAffairsXfByIds(Long[] ids) | ||
| 151 | + { | ||
| 152 | + for (Long id : ids) { | ||
| 153 | + HandleAffairsXf handleAffairsXf = handleAffairsXfMapper.selectHandleAffairsXfById(id); | ||
| 154 | + UploadFile uploadFile = new UploadFile(); | ||
| 155 | + uploadFile.setTableName("handle_affairs_xf"); | ||
| 156 | + uploadFile.setTableNumber(handleAffairsXf.getId().toString()); | ||
| 157 | + List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 158 | + //遍历删除文件 | ||
| 159 | + for (UploadFile file : list) { | ||
| 160 | + uploadFileMapper.deleteUploadFileById(file.getId()); | ||
| 161 | + FileUploadUtils.deleteFile(file.getFilePath()); | ||
| 162 | + } | ||
| 163 | + } | ||
| 164 | + return handleAffairsXfMapper.deleteHandleAffairsXfByIds(ids); | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + /** | ||
| 168 | + * 删除办文办事信访类信息 | ||
| 169 | + * | ||
| 170 | + * @param id 办文办事信访类ID | ||
| 171 | + * @return 结果 | ||
| 172 | + */ | ||
| 173 | + @Override | ||
| 174 | + public int deleteHandleAffairsXfById(Long id) | ||
| 175 | + { | ||
| 176 | + return handleAffairsXfMapper.deleteHandleAffairsXfById(id); | ||
| 177 | + } | ||
| 178 | +} |
trash-workFlow/src/main/java/com/trash/office/service/impl/LeaveApplicationServiceImpl.java
| @@ -216,10 +216,10 @@ public class LeaveApplicationServiceImpl implements ILeaveApplicationService | @@ -216,10 +216,10 @@ public class LeaveApplicationServiceImpl implements ILeaveApplicationService | ||
| 216 | String numberDays = leaveApplication.getNumberDays(); | 216 | String numberDays = leaveApplication.getNumberDays(); |
| 217 | //新增工作台数据 | 217 | //新增工作台数据 |
| 218 | Workflow workflow = new Workflow(); | 218 | Workflow workflow = new Workflow(); |
| 219 | - workflow.setId(leaveApplication.getId().toString()); | ||
| 220 | - workflow.setTitle("请假申请:" + leaveApplication.getApplicant()); | ||
| 221 | - workflow.setType("请假申请"); | ||
| 222 | - workflow.setReason("请假申请"); | 219 | + workflow.setId("workflow_leave:"+leaveApplication.getId().toString()); |
| 220 | + workflow.setTitle(leaveApplication.getApplicant()+"的"+leaveApplication.getType()+"申请"); | ||
| 221 | + workflow.setType(leaveApplication.getType()); | ||
| 222 | + workflow.setReason(leaveApplication.getContent()); | ||
| 223 | workflow.setState("0"); | 223 | workflow.setState("0"); |
| 224 | workflow.setCreateBy(SecurityUtils.getUsername()); | 224 | workflow.setCreateBy(SecurityUtils.getUsername()); |
| 225 | workflow.setCreateTime(DateUtils.getNowDate()); | 225 | workflow.setCreateTime(DateUtils.getNowDate()); |
trash-workFlow/src/main/resources/mapper/office/HandleAffairsCommonMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.trash.office.mapper.HandleAffairsCommonMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="HandleAffairsCommon" id="HandleAffairsCommonResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="company" column="company" /> | ||
| 10 | + <result property="receiveTime" column="receive_time" /> | ||
| 11 | + <result property="title" column="title" /> | ||
| 12 | + <result property="deptOpinion" column="dept_opinion" /> | ||
| 13 | + <result property="zhbOpinion" column="zhb_opinion" /> | ||
| 14 | + <result property="isRead" column="is_read" /> | ||
| 15 | + <result property="status" column="status" /> | ||
| 16 | + <result property="createTime" column="create_time" /> | ||
| 17 | + <result property="createBy" column="create_by" /> | ||
| 18 | + <result property="updateTime" column="update_time" /> | ||
| 19 | + <result property="updateBy" column="update_by" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectHandleAffairsCommonVo"> | ||
| 23 | + select id, company, receive_time, title, dept_opinion, zhb_opinion, is_read, status, create_time, create_by, update_time, update_by from office_handle_affairs_common | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectHandleAffairsCommonList" parameterType="HandleAffairsCommon" resultMap="HandleAffairsCommonResult"> | ||
| 27 | + <include refid="selectHandleAffairsCommonVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="company != null and company != ''"> and company = #{company}</if> | ||
| 30 | + <if test="receiveTime != null "> and receive_time = #{receiveTime}</if> | ||
| 31 | + <if test="title != null and title != ''"> and title = #{title}</if> | ||
| 32 | + <if test="deptOpinion != null and deptOpinion != ''"> and dept_opinion = #{deptOpinion}</if> | ||
| 33 | + <if test="zhbOpinion != null and zhbOpinion != ''"> and zhb_opinion = #{zhbOpinion}</if> | ||
| 34 | + <if test="isRead != null "> and is_read = #{isRead}</if> | ||
| 35 | + <if test="status != null "> and status = #{status}</if> | ||
| 36 | + </where> | ||
| 37 | + </select> | ||
| 38 | + | ||
| 39 | + <select id="selectHandleAffairsCommonById" parameterType="Long" resultMap="HandleAffairsCommonResult"> | ||
| 40 | + <include refid="selectHandleAffairsCommonVo"/> | ||
| 41 | + where id = #{id} | ||
| 42 | + </select> | ||
| 43 | + | ||
| 44 | + <insert id="insertHandleAffairsCommon" parameterType="HandleAffairsCommon" useGeneratedKeys="true" keyProperty="id"> | ||
| 45 | + insert into office_handle_affairs_common | ||
| 46 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 47 | + create_time, | ||
| 48 | + <if test="company != null">company,</if> | ||
| 49 | + <if test="receiveTime != null">receive_time,</if> | ||
| 50 | + <if test="title != null">title,</if> | ||
| 51 | + <if test="deptOpinion != null">dept_opinion,</if> | ||
| 52 | + <if test="zhbOpinion != null">zhb_opinion,</if> | ||
| 53 | + <if test="isRead != null">is_read,</if> | ||
| 54 | + <if test="status != null">status,</if> | ||
| 55 | + <if test="createBy != null">create_by,</if> | ||
| 56 | + </trim> | ||
| 57 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 58 | + now(), | ||
| 59 | + <if test="company != null">#{company},</if> | ||
| 60 | + <if test="receiveTime != null">#{receiveTime},</if> | ||
| 61 | + <if test="title != null">#{title},</if> | ||
| 62 | + <if test="deptOpinion != null">#{deptOpinion},</if> | ||
| 63 | + <if test="zhbOpinion != null">#{zhbOpinion},</if> | ||
| 64 | + <if test="isRead != null">#{isRead},</if> | ||
| 65 | + <if test="status != null">#{status},</if> | ||
| 66 | + <if test="createBy != null">#{createBy},</if> | ||
| 67 | + </trim> | ||
| 68 | + </insert> | ||
| 69 | + | ||
| 70 | + <update id="updateHandleAffairsCommon" parameterType="HandleAffairsCommon"> | ||
| 71 | + update office_handle_affairs_common | ||
| 72 | + <trim prefix="SET" suffixOverrides=","> | ||
| 73 | + update_time = now(), | ||
| 74 | + <if test="company != null">company = #{company},</if> | ||
| 75 | + <if test="receiveTime != null">receive_time = #{receiveTime},</if> | ||
| 76 | + <if test="title != null">title = #{title},</if> | ||
| 77 | + <if test="deptOpinion != null">dept_opinion = #{deptOpinion},</if> | ||
| 78 | + <if test="zhbOpinion != null">zhb_opinion = #{zhbOpinion},</if> | ||
| 79 | + <if test="isRead != null">is_read = #{isRead},</if> | ||
| 80 | + <if test="status != null">status = #{status},</if> | ||
| 81 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 82 | + </trim> | ||
| 83 | + where id = #{id} | ||
| 84 | + </update> | ||
| 85 | + | ||
| 86 | + <delete id="deleteHandleAffairsCommonById" parameterType="Long"> | ||
| 87 | + delete from office_handle_affairs_common where id = #{id} | ||
| 88 | + </delete> | ||
| 89 | + | ||
| 90 | + <delete id="deleteHandleAffairsCommonByIds" parameterType="String"> | ||
| 91 | + delete from office_handle_affairs_common where id in | ||
| 92 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 93 | + #{id} | ||
| 94 | + </foreach> | ||
| 95 | + </delete> | ||
| 96 | + | ||
| 97 | +</mapper> | ||
| 0 | \ No newline at end of file | 98 | \ No newline at end of file |
trash-workFlow/src/main/resources/mapper/office/HandleAffairsXfMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.trash.office.mapper.HandleAffairsXfMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="HandleAffairsXf" id="HandleAffairsXfResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="company" column="company" /> | ||
| 10 | + <result property="receiveDate" column="receive_date" /> | ||
| 11 | + <result property="appeal" column="appeal" /> | ||
| 12 | + <result property="deptOpinion" column="dept_opinion" /> | ||
| 13 | + <result property="zhbOpinion" column="zhb_opinion" /> | ||
| 14 | + <result property="isRead" column="is_read" /> | ||
| 15 | + <result property="status" column="status" /> | ||
| 16 | + <result property="createTime" column="create_time" /> | ||
| 17 | + <result property="createBy" column="create_by" /> | ||
| 18 | + <result property="updateTime" column="update_time" /> | ||
| 19 | + <result property="updateBy" column="update_by" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectHandleAffairsXfVo"> | ||
| 23 | + select id, company, receive_date, appeal, dept_opinion, zhb_opinion, is_read, status, create_time, create_by, update_time, update_by from office_handle_affairs_xf | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectHandleAffairsXfList" parameterType="HandleAffairsXf" resultMap="HandleAffairsXfResult"> | ||
| 27 | + <include refid="selectHandleAffairsXfVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="company != null and company != ''"> and company = #{company}</if> | ||
| 30 | + <if test="receiveDate != null "> and receive_date = #{receiveDate}</if> | ||
| 31 | + <if test="appeal != null and appeal != ''"> and appeal = #{appeal}</if> | ||
| 32 | + <if test="deptOpinion != null and deptOpinion != ''"> and dept_opinion = #{deptOpinion}</if> | ||
| 33 | + <if test="zhbOpinion != null and zhbOpinion != ''"> and zhb_opinion = #{zhbOpinion}</if> | ||
| 34 | + <if test="isRead != null "> and is_read = #{isRead}</if> | ||
| 35 | + <if test="status != null "> and status = #{status}</if> | ||
| 36 | + </where> | ||
| 37 | + </select> | ||
| 38 | + | ||
| 39 | + <select id="selectHandleAffairsXfById" parameterType="Long" resultMap="HandleAffairsXfResult"> | ||
| 40 | + <include refid="selectHandleAffairsXfVo"/> | ||
| 41 | + where id = #{id} | ||
| 42 | + </select> | ||
| 43 | + | ||
| 44 | + <insert id="insertHandleAffairsXf" parameterType="HandleAffairsXf" useGeneratedKeys="true" keyProperty="id"> | ||
| 45 | + insert into office_handle_affairs_xf | ||
| 46 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 47 | + create_time, | ||
| 48 | + <if test="company != null">company,</if> | ||
| 49 | + <if test="receiveDate != null">receive_date,</if> | ||
| 50 | + <if test="appeal != null">appeal,</if> | ||
| 51 | + <if test="deptOpinion != null">dept_opinion,</if> | ||
| 52 | + <if test="zhbOpinion != null">zhb_opinion,</if> | ||
| 53 | + <if test="isRead != null">is_read,</if> | ||
| 54 | + <if test="status != null">status,</if> | ||
| 55 | + <if test="createTime != null">create_time,</if> | ||
| 56 | + <if test="createBy != null">create_by,</if> | ||
| 57 | + <if test="updateTime != null">update_time,</if> | ||
| 58 | + <if test="updateBy != null">update_by,</if> | ||
| 59 | + </trim> | ||
| 60 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 61 | + now(), | ||
| 62 | + <if test="company != null">#{company},</if> | ||
| 63 | + <if test="receiveDate != null">#{receiveDate},</if> | ||
| 64 | + <if test="appeal != null">#{appeal},</if> | ||
| 65 | + <if test="deptOpinion != null">#{deptOpinion},</if> | ||
| 66 | + <if test="zhbOpinion != null">#{zhbOpinion},</if> | ||
| 67 | + <if test="isRead != null">#{isRead},</if> | ||
| 68 | + <if test="status != null">#{status},</if> | ||
| 69 | + <if test="createBy != null">#{createBy},</if> | ||
| 70 | + </trim> | ||
| 71 | + </insert> | ||
| 72 | + | ||
| 73 | + <update id="updateHandleAffairsXf" parameterType="HandleAffairsXf"> | ||
| 74 | + update office_handle_affairs_xf | ||
| 75 | + <trim prefix="SET" suffixOverrides=","> | ||
| 76 | + update_time = now(), | ||
| 77 | + <if test="company != null">company = #{company},</if> | ||
| 78 | + <if test="receiveDate != null">receive_date = #{receiveDate},</if> | ||
| 79 | + <if test="appeal != null">appeal = #{appeal},</if> | ||
| 80 | + <if test="deptOpinion != null">dept_opinion = #{deptOpinion},</if> | ||
| 81 | + <if test="zhbOpinion != null">zhb_opinion = #{zhbOpinion},</if> | ||
| 82 | + <if test="isRead != null">is_read = #{isRead},</if> | ||
| 83 | + <if test="status != null">status = #{status},</if> | ||
| 84 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 85 | + </trim> | ||
| 86 | + where id = #{id} | ||
| 87 | + </update> | ||
| 88 | + | ||
| 89 | + <delete id="deleteHandleAffairsXfById" parameterType="Long"> | ||
| 90 | + delete from office_handle_affairs_xf where id = #{id} | ||
| 91 | + </delete> | ||
| 92 | + | ||
| 93 | + <delete id="deleteHandleAffairsXfByIds" parameterType="String"> | ||
| 94 | + delete from office_handle_affairs_xf where id in | ||
| 95 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 96 | + #{id} | ||
| 97 | + </foreach> | ||
| 98 | + </delete> | ||
| 99 | + | ||
| 100 | +</mapper> | ||
| 0 | \ No newline at end of file | 101 | \ No newline at end of file |