Commit 9e01b2525c40744cdff68b3e02e96655ecfba031
1 parent
fdd3fe73
失信管理
Showing
36 changed files
with
4469 additions
and
30 deletions
trash-ui/src/api/business/credit1.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询消纳场失信列表 | |
| 4 | +export function listCredit(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/EarthSites/credit/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询消纳场失信详细 | |
| 13 | +export function getCredit(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/EarthSites/credit/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +// 新增消纳场失信 | |
| 21 | +export function addCredit(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/EarthSites/credit', | |
| 24 | + method: 'post', | |
| 25 | + data: data | |
| 26 | + }) | |
| 27 | +} | |
| 28 | + | |
| 29 | +// 修改消纳场失信 | |
| 30 | +export function updateCredit(data) { | |
| 31 | + return request({ | |
| 32 | + url: '/EarthSites/credit', | |
| 33 | + method: 'put', | |
| 34 | + data: data | |
| 35 | + }) | |
| 36 | +} | |
| 37 | + | |
| 38 | +// 删除消纳场失信 | |
| 39 | +export function delCredit(id) { | |
| 40 | + return request({ | |
| 41 | + url: '/EarthSites/credit/' + id, | |
| 42 | + method: 'delete' | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// 导出消纳场失信 | |
| 47 | +export function exportCredit(query) { | |
| 48 | + return request({ | |
| 49 | + url: '/EarthSites/credit/export', | |
| 50 | + method: 'get', | |
| 51 | + params: query | |
| 52 | + }) | |
| 53 | +} | |
| 54 | + | |
| 55 | +export function getNames(query) { | |
| 56 | + return request({ | |
| 57 | + url: '/EarthSites/credit/names', | |
| 58 | + method: 'get', | |
| 59 | + params: query | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +export function historyCredit(query) { | |
| 64 | + return request({ | |
| 65 | + url: '/EarthSites/credit/historyCredit', | |
| 66 | + method: 'get', | |
| 67 | + params: query | |
| 68 | + }) | |
| 69 | +} | ... | ... |
trash-ui/src/api/business/credit2.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询企业失信列表 | |
| 4 | +export function listCredit(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/Company/credit/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询企业失信详细 | |
| 13 | +export function getCredit(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/Company/credit/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +export function getNames(query) { | |
| 21 | + return request({ | |
| 22 | + url: '/Company/credit/names', | |
| 23 | + method: 'get', | |
| 24 | + params: query | |
| 25 | + }) | |
| 26 | +} | |
| 27 | + | |
| 28 | +export function historyCredit(query) { | |
| 29 | + return request({ | |
| 30 | + url: '/Company/credit/historyCredit', | |
| 31 | + method: 'get', | |
| 32 | + params: query | |
| 33 | + }) | |
| 34 | +} | |
| 35 | + | |
| 36 | + | |
| 37 | +// 新增企业失信 | |
| 38 | +export function addCredit(data) { | |
| 39 | + return request({ | |
| 40 | + url: '/Company/credit', | |
| 41 | + method: 'post', | |
| 42 | + data: data | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// 修改企业失信 | |
| 47 | +export function updateCredit(data) { | |
| 48 | + return request({ | |
| 49 | + url: '/Company/credit', | |
| 50 | + method: 'put', | |
| 51 | + data: data | |
| 52 | + }) | |
| 53 | +} | |
| 54 | + | |
| 55 | +// 删除企业失信 | |
| 56 | +export function delCredit(id) { | |
| 57 | + return request({ | |
| 58 | + url: '/Company/credit/' + id, | |
| 59 | + method: 'delete' | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +// 导出企业失信 | |
| 64 | +export function exportCredit(query) { | |
| 65 | + return request({ | |
| 66 | + url: '/Company/credit/export', | |
| 67 | + method: 'get', | |
| 68 | + params: query | |
| 69 | + }) | |
| 70 | +} | ... | ... |
trash-ui/src/api/business/credit3.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询车辆失信列表 | |
| 4 | +export function listCredit(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/truck/credit/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询车辆失信详细 | |
| 13 | +export function getCredit(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/truck/credit/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +export function getNames(query) { | |
| 21 | + return request({ | |
| 22 | + url: '/truck/credit/names', | |
| 23 | + method: 'get', | |
| 24 | + params: query | |
| 25 | + }) | |
| 26 | +} | |
| 27 | + | |
| 28 | +export function historyCredit(query) { | |
| 29 | + return request({ | |
| 30 | + url: '/truck/credit/historyCredit', | |
| 31 | + method: 'get', | |
| 32 | + params: query | |
| 33 | + }) | |
| 34 | +} | |
| 35 | + | |
| 36 | + | |
| 37 | +// 新增车辆失信 | |
| 38 | +export function addCredit(data) { | |
| 39 | + return request({ | |
| 40 | + url: '/truck/credit', | |
| 41 | + method: 'post', | |
| 42 | + data: data | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// 修改车辆失信 | |
| 47 | +export function updateCredit(data) { | |
| 48 | + return request({ | |
| 49 | + url: '/truck/credit', | |
| 50 | + method: 'put', | |
| 51 | + data: data | |
| 52 | + }) | |
| 53 | +} | |
| 54 | + | |
| 55 | +// 删除车辆失信 | |
| 56 | +export function delCredit(id) { | |
| 57 | + return request({ | |
| 58 | + url: '/truck/credit/' + id, | |
| 59 | + method: 'delete' | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +// 导出车辆失信 | |
| 64 | +export function exportCredit(query) { | |
| 65 | + return request({ | |
| 66 | + url: '/truck/credit/export', | |
| 67 | + method: 'get', | |
| 68 | + params: query | |
| 69 | + }) | |
| 70 | +} | ... | ... |
trash-ui/src/api/business/credit4.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询驾驶员失信列表 | |
| 4 | +export function listCredit(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/driver/credit/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询驾驶员失信详细 | |
| 13 | +export function getCredit(id) { | |
| 14 | + return request({ | |
| 15 | + url: '/driver/credit/' + id, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +export function getNames(query) { | |
| 21 | + return request({ | |
| 22 | + url: '/driver/credit/names', | |
| 23 | + method: 'get', | |
| 24 | + params: query | |
| 25 | + }) | |
| 26 | +} | |
| 27 | + | |
| 28 | +export function historyCredit(query) { | |
| 29 | + return request({ | |
| 30 | + url: '/driver/credit/historyCredit', | |
| 31 | + method: 'get', | |
| 32 | + params: query | |
| 33 | + }) | |
| 34 | +} | |
| 35 | + | |
| 36 | + | |
| 37 | +// 新增驾驶员失信 | |
| 38 | +export function addCredit(data) { | |
| 39 | + return request({ | |
| 40 | + url: '/driver/credit', | |
| 41 | + method: 'post', | |
| 42 | + data: data | |
| 43 | + }) | |
| 44 | +} | |
| 45 | + | |
| 46 | +// 修改驾驶员失信 | |
| 47 | +export function updateCredit(data) { | |
| 48 | + return request({ | |
| 49 | + url: '/driver/credit', | |
| 50 | + method: 'put', | |
| 51 | + data: data | |
| 52 | + }) | |
| 53 | +} | |
| 54 | + | |
| 55 | +// 删除驾驶员失信 | |
| 56 | +export function delCredit(id) { | |
| 57 | + return request({ | |
| 58 | + url: '/driver/credit/' + id, | |
| 59 | + method: 'delete' | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +// 导出驾驶员失信 | |
| 64 | +export function exportCredit(query) { | |
| 65 | + return request({ | |
| 66 | + url: '/driver/credit/export', | |
| 67 | + method: 'get', | |
| 68 | + params: query | |
| 69 | + }) | |
| 70 | +} | ... | ... |
trash-ui/src/router/index.js
| ... | ... | @@ -135,30 +135,30 @@ export const constantRoutes = [ |
| 135 | 135 | name: '三查机制', |
| 136 | 136 | meta: { title: '三查机制' } |
| 137 | 137 | }, |
| 138 | - // { | |
| 139 | - // path: 'credit/EarthSitesCredit', | |
| 140 | - // component: (resolve) => require(['@/views/business/EarthSitesCredit'], resolve), | |
| 141 | - // name: '消纳场失信管理', | |
| 142 | - // meta: { title: '消纳场失信管理' } | |
| 143 | - // },{ | |
| 144 | - // path: 'credit/CompanyCredit', | |
| 145 | - // component: (resolve) => require(['@/views/businessCompanyCredit'], resolve), | |
| 146 | - // name: '企业失信管理', | |
| 147 | - // meta: { title: '企业失信管理' } | |
| 148 | - // }, | |
| 149 | - // { | |
| 150 | - // path: 'credit/TruckCredit', | |
| 151 | - // component: (resolve) => require(['@/views/business/TruckCredit'], resolve), | |
| 152 | - // name: '车辆失信管理', | |
| 153 | - // meta: { title: '车辆失信管理' } | |
| 154 | - // }, | |
| 155 | - // { | |
| 156 | - // path: 'credit/DriverCredit', | |
| 157 | - // component: (resolve) => require(['@/views/business/DriverCredit'], resolve), | |
| 158 | - // name: '驾驶员失信管理', | |
| 159 | - // meta: { title: '驾驶员失信管理' } | |
| 160 | - // }, | |
| 161 | - | |
| 138 | + { | |
| 139 | + path: 'credit/EarthSitesCredit', | |
| 140 | + component: (resolve) => require(['@/views/business/EarthSitesCredit'], resolve), | |
| 141 | + name: '消纳场失信管理', | |
| 142 | + meta: { title: '消纳场失信管理' } | |
| 143 | + }, | |
| 144 | + { | |
| 145 | + path: 'credit/CompanyCredit', | |
| 146 | + component: (resolve) => require(['@/views/business/CompanyCredit'], resolve), | |
| 147 | + name: '企业失信管理', | |
| 148 | + meta: { title: '企业失信管理' } | |
| 149 | + }, | |
| 150 | + { | |
| 151 | + path: 'credit/TruckCredit', | |
| 152 | + component: (resolve) => require(['@/views/business/TruckCredit'], resolve), | |
| 153 | + name: '车辆失信管理', | |
| 154 | + meta: { title: '车辆失信管理' } | |
| 155 | + }, | |
| 156 | + { | |
| 157 | + path: 'credit/DriverCredit', | |
| 158 | + component: (resolve) => require(['@/views/business/DriverCredit'], resolve), | |
| 159 | + name: '驾驶员失信管理', | |
| 160 | + meta: { title: '驾驶员失信管理' } | |
| 161 | + } | |
| 162 | 162 | ] |
| 163 | 163 | } |
| 164 | 164 | ] | ... | ... |
trash-ui/src/views/business/CompanyCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信企业</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信企业</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + <el-row type="flex" justify="center"> | |
| 14 | + <el-col> | |
| 15 | + <el-form-item label="运输企业" prop="name" | |
| 16 | + style="float:right;"> | |
| 17 | + <el-select v-model="queryParams.name" | |
| 18 | + filterable | |
| 19 | + reserve-keyword | |
| 20 | + placeholder="运输企业" | |
| 21 | + clearable | |
| 22 | + size="small" | |
| 23 | + :loading="loading"> | |
| 24 | + <el-option | |
| 25 | + v-for="item in dictNames" | |
| 26 | + :label="item" | |
| 27 | + :value="item"> | |
| 28 | + </el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + <el-col> | |
| 33 | + <el-form-item label="所属区域" prop="place"> | |
| 34 | + <el-select v-model="queryParams.place" placeholder="所属区域" clearable size="small"> | |
| 35 | + <el-option label="请选择字典生成" value="" /> | |
| 36 | + </el-select> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + </el-row> | |
| 40 | + <el-row type="flex" justify="center"> | |
| 41 | + <el-col> | |
| 42 | + </el-col><el-col> | |
| 43 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 44 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 45 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 46 | + </el-date-picker> | |
| 47 | + </el-form-item> | |
| 48 | + </el-col> | |
| 49 | + </el-row> | |
| 50 | + | |
| 51 | + </el-form> | |
| 52 | + | |
| 53 | + <el-row :gutter="10" class="mb8"> | |
| 54 | + <el-col :span="1.5"> | |
| 55 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['Company:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 56 | + </el-col> | |
| 57 | + <el-col :span="1.5"> | |
| 58 | + <el-button size="mini" @click="handleExport" v-hasPermi="['Company:credit:export']">导出</el-button> | |
| 59 | + </el-col> | |
| 60 | + | |
| 61 | + <el-col :span="20" style="height: 1px;"></el-col> | |
| 62 | + <el-col :span="1.5"> | |
| 63 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 64 | + </el-col> | |
| 65 | + <el-col :span="1.5"> | |
| 66 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 67 | + </el-col> | |
| 68 | + </el-row> | |
| 69 | + | |
| 70 | + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> | |
| 71 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 72 | + <el-table-column label="运输企业" align="center" prop="name" /> | |
| 73 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 74 | + <template slot-scope="scope"> | |
| 75 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 76 | + </template> | |
| 77 | + </el-table-column> | |
| 78 | + <el-table-column label="所属区域" align="center" prop="place" /> | |
| 79 | + <el-table-column label="失信原因" align="center" prop="reason" /> | |
| 80 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 81 | + <template slot-scope="scope"> | |
| 82 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 83 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">查看</el-button> | |
| 84 | + </template> | |
| 85 | + </el-table-column> | |
| 86 | + </el-table> | |
| 87 | + | |
| 88 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 89 | + @pagination="getList" /> | |
| 90 | + | |
| 91 | + <!-- 添加或修改工地对话框 --> | |
| 92 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 93 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 94 | + <el-form-item label="运输企业" prop="name"> | |
| 95 | + <el-select | |
| 96 | + v-model="form.name" | |
| 97 | + filterable | |
| 98 | + reserve-keyword | |
| 99 | + placeholder="运输企业"> | |
| 100 | + <el-option | |
| 101 | + @click.native="getObjId(item.id)" | |
| 102 | + v-for="item in names" | |
| 103 | + :key="item.value" | |
| 104 | + :label="item.label" | |
| 105 | + :value="item.label"> | |
| 106 | + </el-option> | |
| 107 | + </el-select> | |
| 108 | + </el-form-item> | |
| 109 | + | |
| 110 | + <el-form-item label="所属区域" prop="place"> | |
| 111 | + <el-select | |
| 112 | + v-model="form.place" | |
| 113 | + filterable | |
| 114 | + reserve-keyword | |
| 115 | + placeholder="所属区域"> | |
| 116 | + <el-option | |
| 117 | + v-for="item in places" | |
| 118 | + :key="item.id" | |
| 119 | + :label="item.label" | |
| 120 | + :value="item.value"> | |
| 121 | + </el-option> | |
| 122 | + </el-select> | |
| 123 | + </el-form-item> | |
| 124 | + <el-form-item label="失信原因" prop="reason"> | |
| 125 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 126 | + </el-form-item> | |
| 127 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 128 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 129 | + </el-form> | |
| 130 | + <div slot="footer" class="dialog-footer"> | |
| 131 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 132 | + <el-button @click="cancel">退出</el-button> | |
| 133 | + </div> | |
| 134 | + </el-dialog> | |
| 135 | + | |
| 136 | + | |
| 137 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body> | |
| 138 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> | |
| 139 | + <el-form-item label="情况说明" prop="reason"> | |
| 140 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 141 | + </el-form-item> | |
| 142 | + </el-form> | |
| 143 | + <div slot="footer" class="dialog-footer"> | |
| 144 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 145 | + <el-button @click="cancel">退出</el-button> | |
| 146 | + </div> | |
| 147 | + </el-dialog> | |
| 148 | + | |
| 149 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body center="true"> | |
| 150 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 151 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 152 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 153 | + <template slot-scope="scope"> | |
| 154 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 155 | + </template> | |
| 156 | + </el-table-column> | |
| 157 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 158 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 159 | + <template slot-scope="scope"> | |
| 160 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 161 | + </template> | |
| 162 | + </el-table-column> | |
| 163 | + </el-table> | |
| 164 | + </el-dialog> | |
| 165 | + </div> | |
| 166 | +</template> | |
| 167 | + | |
| 168 | +<script> | |
| 169 | + import { | |
| 170 | + listCredit, | |
| 171 | + getCredit, | |
| 172 | + delCredit, | |
| 173 | + addCredit, | |
| 174 | + updateCredit, | |
| 175 | + exportCredit, | |
| 176 | + getNames, | |
| 177 | + historyCredit | |
| 178 | + } from "@/api/business/credit2"; | |
| 179 | + | |
| 180 | + export default { | |
| 181 | + name: "Credit", | |
| 182 | + data() { | |
| 183 | + return { | |
| 184 | + // 遮罩层 | |
| 185 | + loading: true, | |
| 186 | + // 选中数组 | |
| 187 | + ids: [], | |
| 188 | + // 非单个禁用 | |
| 189 | + single: true, | |
| 190 | + // 非多个禁用 | |
| 191 | + multiple: true, | |
| 192 | + // 显示搜索条件 | |
| 193 | + showSearch: true, | |
| 194 | + infoDialog :false, | |
| 195 | + // 总条数 | |
| 196 | + total: 0, | |
| 197 | + // 工地表格数据 | |
| 198 | + creditList: [], | |
| 199 | + creditListInfo: [], | |
| 200 | + dictNames:[], | |
| 201 | + dictTypes:[], | |
| 202 | + dictPlaces:[], | |
| 203 | + names:[{label:"运输企业A",value:"运输企业A",id:"A"}, | |
| 204 | + {label:"运输企业B",value:"运输企业B",id:"B"}, | |
| 205 | + {label:"运输企业C",value:"运输企业C",id:"C"}, | |
| 206 | + {label:"运输企业D",value:"运输企业D",id:"D"}, | |
| 207 | + {label:"运输企业E",value:"运输企业E",id:"E"}], | |
| 208 | + types:[{label:"运输企业A",value:"运输企业A",id:"A"}, | |
| 209 | + {label:"运输企业B",value:"运输企业B",id:"B"}, | |
| 210 | + {label:"运输企业C",value:"运输企业C",id:"C"}, | |
| 211 | + {label:"运输企业D",value:"运输企业D",id:"D"}, | |
| 212 | + {label:"运输企业E",value:"运输企业E",id:"E"}], | |
| 213 | + places:[{label:"运输企业A",value:"运输企业A",id:"A"}, | |
| 214 | + {label:"运输企业B",value:"运输企业B",id:"B"}, | |
| 215 | + {label:"运输企业C",value:"运输企业C",id:"C"}, | |
| 216 | + {label:"运输企业D",value:"运输企业D",id:"D"}, | |
| 217 | + {label:"运输企业E",value:"运输企业E",id:"E"}], | |
| 218 | + // 弹出层标题 | |
| 219 | + title: "", | |
| 220 | + // 是否显示弹出层 | |
| 221 | + open: false, | |
| 222 | + isEdit:false, | |
| 223 | + // 查询参数 | |
| 224 | + queryParams: { | |
| 225 | + pageNum: 1, | |
| 226 | + pageSize: 10, | |
| 227 | + name: null, | |
| 228 | + time: null, | |
| 229 | + place: null, | |
| 230 | + reason: null, | |
| 231 | + status: 0, | |
| 232 | + lostCredit: 1 | |
| 233 | + }, | |
| 234 | + // 表单参数 | |
| 235 | + form: {}, | |
| 236 | + updateForm:{}, | |
| 237 | + // 表单校验 | |
| 238 | + rules: {name: [ | |
| 239 | + { required: true, message: '请选择运输企业', trigger: 'change' }, | |
| 240 | + ],place: [ | |
| 241 | + { required: true, message: '请选择所属区域', trigger: 'change' }, | |
| 242 | + ],time: [ | |
| 243 | + { required: true, message: '请选择失信时间', trigger: 'change' }, | |
| 244 | + ],reason: [ | |
| 245 | + { required: true, message: '请填写原因', trigger: 'blur' }, | |
| 246 | + ]} | |
| 247 | + }; | |
| 248 | + }, | |
| 249 | + created() { | |
| 250 | + this.getList(); | |
| 251 | + this.getNamesData(); | |
| 252 | + }, | |
| 253 | + methods: { | |
| 254 | + getDataInfo(row){ | |
| 255 | + console.log(row); | |
| 256 | + | |
| 257 | + let param ={"objectId":row.objectId} | |
| 258 | + | |
| 259 | + listCredit(param).then(response => { | |
| 260 | + this.creditListInfo = response.rows; | |
| 261 | + this.infoDialog = true; | |
| 262 | + }); | |
| 263 | + | |
| 264 | + }, | |
| 265 | + getNamesData(){ | |
| 266 | + getNames(this.queryParams).then(response => { | |
| 267 | + this.dictNames = response; | |
| 268 | + }); | |
| 269 | + }, | |
| 270 | + getData(stauts){ | |
| 271 | + this.queryParams.status=0; | |
| 272 | + this.queryParams.lostCredit=stauts; | |
| 273 | + this.getList(); | |
| 274 | + }, | |
| 275 | + getHistoryData(){ | |
| 276 | + this.queryParams.status=1; | |
| 277 | + this.getList(); | |
| 278 | + }, | |
| 279 | + colStyle(obj){ | |
| 280 | + if(obj.column.property == "id"){ | |
| 281 | + return {background:"#f8f8f9"} | |
| 282 | + } | |
| 283 | + }, | |
| 284 | + getObjId(a){ | |
| 285 | + this.form.objectId = a; | |
| 286 | + }, | |
| 287 | + getList() { | |
| 288 | + this.loading = true; | |
| 289 | + if(this.queryParams.status==0){ | |
| 290 | + listCredit(this.queryParams).then(response => { | |
| 291 | + this.creditList = response.rows; | |
| 292 | + this.total = response.total; | |
| 293 | + this.loading = false; | |
| 294 | + }); | |
| 295 | + } | |
| 296 | + if(this.queryParams.status==1){ | |
| 297 | + historyCredit(this.queryParams).then(response => { | |
| 298 | + this.creditList = response.rows; | |
| 299 | + this.total = response.total; | |
| 300 | + this.loading = false; | |
| 301 | + }); | |
| 302 | + } | |
| 303 | + | |
| 304 | + }, | |
| 305 | + // 取消按钮 | |
| 306 | + cancel() { | |
| 307 | + this.open = false; | |
| 308 | + this.isEdit = false; | |
| 309 | + this.reset(); | |
| 310 | + }, | |
| 311 | + // 表单重置 | |
| 312 | + reset() { | |
| 313 | + this.form = { | |
| 314 | + id: null, | |
| 315 | + name: null, | |
| 316 | + time: null, | |
| 317 | + place: null, | |
| 318 | + reason: null, | |
| 319 | + lostCredit: null, | |
| 320 | + objectId: null, | |
| 321 | + }; | |
| 322 | + this.resetForm("form"); | |
| 323 | + }, | |
| 324 | + /** 搜索按钮操作 */ | |
| 325 | + handleQuery() { | |
| 326 | + this.queryParams.pageNum = 1; | |
| 327 | + this.getList(); | |
| 328 | + }, | |
| 329 | + /** 重置按钮操作 */ | |
| 330 | + resetQuery() { | |
| 331 | + this.resetForm("queryForm"); | |
| 332 | + console.log(this.queryParams); | |
| 333 | + this.handleQuery(); | |
| 334 | + }, | |
| 335 | + // 多选框选中数据 | |
| 336 | + handleSelectionChange(selection) { | |
| 337 | + this.ids = selection.map(item => item.id) | |
| 338 | + this.single = selection.length !== 1 | |
| 339 | + this.multiple = !selection.length | |
| 340 | + }, | |
| 341 | + /** 新增按钮操作 */ | |
| 342 | + handleAdd() { | |
| 343 | + this.reset(); | |
| 344 | + this.open = true; | |
| 345 | + this.title = "企业信息录入"; | |
| 346 | + }, | |
| 347 | + /** 修改按钮操作 */ | |
| 348 | + handleUpdate(row) { | |
| 349 | + this.reset(); | |
| 350 | + const id = row.id || this.ids | |
| 351 | + getCredit(id).then(response => { | |
| 352 | + this.form = response.data; | |
| 353 | + this.isEdit = true; | |
| 354 | + }); | |
| 355 | + }, | |
| 356 | + /** 提交按钮 */ | |
| 357 | + submitForm() { | |
| 358 | + this.$refs["form"].validate(valid => { | |
| 359 | + if (valid) { | |
| 360 | + if (this.form.id != null) { | |
| 361 | + this.updateForm.id = this.form.id; | |
| 362 | + updateCredit(this.updateForm).then(response => { | |
| 363 | + this.msgSuccess("撤销成功"); | |
| 364 | + this.isEdit = false; | |
| 365 | + this.getList(); | |
| 366 | + }); | |
| 367 | + } else { | |
| 368 | + this.form.lostCredit = 1; | |
| 369 | + addCredit(this.form).then(response => { | |
| 370 | + this.msgSuccess("新增成功"); | |
| 371 | + this.open = false; | |
| 372 | + this.getList(); | |
| 373 | + this.getNamesData(); | |
| 374 | + }); | |
| 375 | + } | |
| 376 | + } | |
| 377 | + }); | |
| 378 | + }, | |
| 379 | + handleExport() { | |
| 380 | + const queryParams = this.queryParams; | |
| 381 | + this.$confirm('是否确认导出所有企业数据项?', "警告", { | |
| 382 | + confirmButtonText: "确定", | |
| 383 | + cancelButtonText: "取消", | |
| 384 | + type: "warning" | |
| 385 | + }).then(function() { | |
| 386 | + return exportCredit(queryParams); | |
| 387 | + }).then(response => { | |
| 388 | + this.download(response.msg); | |
| 389 | + }) | |
| 390 | + } | |
| 391 | + } | |
| 392 | + }; | |
| 393 | +</script> | ... | ... |
trash-ui/src/views/business/ConstructionCredit/index.vue
| ... | ... | @@ -172,15 +172,17 @@ |
| 172 | 172 | <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> |
| 173 | 173 | <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> |
| 174 | 174 | <el-table-column label="序号" align="center" prop="id" /> |
| 175 | - <el-table-column label="工地名称" align="center" prop="name" /> | |
| 176 | - <el-table-column label="建筑垃圾类型" align="center" prop="type" /> | |
| 177 | 175 | <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> |
| 178 | 176 | <template slot-scope="scope"> |
| 179 | 177 | <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> |
| 180 | 178 | </template> |
| 181 | 179 | </el-table-column> |
| 182 | - <el-table-column label="所属区域" align="center" prop="place" /> | |
| 183 | - <el-table-column label="失信原因" align="center" prop="reason" /> | |
| 180 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 181 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 182 | + <template slot-scope="scope"> | |
| 183 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 184 | + </template> | |
| 185 | + </el-table-column> | |
| 184 | 186 | </el-table> |
| 185 | 187 | </el-dialog> |
| 186 | 188 | </div> | ... | ... |
trash-ui/src/views/business/DriverCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信工地</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信工地</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + <el-row type="flex" justify="center"> | |
| 14 | + <el-col> | |
| 15 | + <el-form-item label="驾驶员姓名" prop="name" | |
| 16 | + style="float:right;"> | |
| 17 | + <el-select v-model="queryParams.name" | |
| 18 | + filterable | |
| 19 | + clearable | |
| 20 | + reserve-keyword | |
| 21 | + placeholder="驾驶员姓名" | |
| 22 | + size="small" | |
| 23 | + :loading="loading"> | |
| 24 | + <el-option | |
| 25 | + v-for="item in dictNames" | |
| 26 | + :label="item" | |
| 27 | + :value="item"> | |
| 28 | + </el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + | |
| 33 | + <el-col> | |
| 34 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 35 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 36 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 37 | + </el-date-picker> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-row> | |
| 41 | + | |
| 42 | + </el-form> | |
| 43 | + | |
| 44 | + <el-row :gutter="10" class="mb8"> | |
| 45 | + <el-col :span="1.5"> | |
| 46 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['driver:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="1.5"> | |
| 49 | + <el-button size="mini" @click="handleExport" v-hasPermi="['driver:credit:export']">导出</el-button> | |
| 50 | + </el-col> | |
| 51 | + | |
| 52 | + <el-col :span="20" style="height: 1px;"></el-col> | |
| 53 | + <el-col :span="1.5"> | |
| 54 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 55 | + </el-col> | |
| 56 | + <el-col :span="1.5"> | |
| 57 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 58 | + </el-col> | |
| 59 | + </el-row> | |
| 60 | + | |
| 61 | + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> | |
| 62 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 63 | + <el-table-column label="驾驶员姓名" align="center" prop="name" /> | |
| 64 | + <el-table-column label="证件号码" align="center" prop="idNumber" /> | |
| 65 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 66 | + <template slot-scope="scope"> | |
| 67 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 68 | + </template> | |
| 69 | + </el-table-column> | |
| 70 | + <el-table-column label="失信原因" align="center" prop="reason" /> | |
| 71 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 72 | + <template slot-scope="scope"> | |
| 73 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['driver:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 74 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">查看</el-button> | |
| 75 | + </template> | |
| 76 | + </el-table-column> | |
| 77 | + </el-table> | |
| 78 | + | |
| 79 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 80 | + @pagination="getList" /> | |
| 81 | + | |
| 82 | + <!-- 添加或修改工地对话框 --> | |
| 83 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 84 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 85 | + <el-form-item label="驾驶员姓名" prop="name"> | |
| 86 | + <el-select | |
| 87 | + v-model="form.name" | |
| 88 | + filterable | |
| 89 | + reserve-keyword | |
| 90 | + placeholder="驾驶员姓名"> | |
| 91 | + <el-option | |
| 92 | + @click.native="getObjId(item.id)" | |
| 93 | + v-for="item in names" | |
| 94 | + :key="item.value" | |
| 95 | + :label="item.label" | |
| 96 | + :value="item.label"> | |
| 97 | + </el-option> | |
| 98 | + </el-select> | |
| 99 | + </el-form-item> | |
| 100 | + | |
| 101 | + <el-form-item label="证件号码" prop="idNumber"> | |
| 102 | + <el-select | |
| 103 | + v-model="form.idNumber" | |
| 104 | + filterable | |
| 105 | + reserve-keyword | |
| 106 | + placeholder="证件号码"> | |
| 107 | + <el-option | |
| 108 | + v-for="item in idNumbers" | |
| 109 | + :key="item.id" | |
| 110 | + :label="item.label" | |
| 111 | + :value="item.value"> | |
| 112 | + </el-option> | |
| 113 | + </el-select> | |
| 114 | + </el-form-item> | |
| 115 | + <el-form-item label="失信原因" prop="reason"> | |
| 116 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 117 | + </el-form-item> | |
| 118 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 119 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 120 | + </el-form> | |
| 121 | + <div slot="footer" class="dialog-footer"> | |
| 122 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 123 | + <el-button @click="cancel">退出</el-button> | |
| 124 | + </div> | |
| 125 | + </el-dialog> | |
| 126 | + | |
| 127 | + | |
| 128 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body> | |
| 129 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> | |
| 130 | + <el-form-item label="情况说明" prop="reason"> | |
| 131 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 132 | + </el-form-item> | |
| 133 | + </el-form> | |
| 134 | + <div slot="footer" class="dialog-footer"> | |
| 135 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 136 | + <el-button @click="cancel">退出</el-button> | |
| 137 | + </div> | |
| 138 | + </el-dialog> | |
| 139 | + | |
| 140 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> | |
| 141 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 142 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 143 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 144 | + <template slot-scope="scope"> | |
| 145 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 146 | + </template> | |
| 147 | + </el-table-column> | |
| 148 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 149 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 150 | + <template slot-scope="scope"> | |
| 151 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 152 | + </template> | |
| 153 | + </el-table-column> | |
| 154 | + </el-table> | |
| 155 | + </el-dialog> | |
| 156 | + </div> | |
| 157 | +</template> | |
| 158 | + | |
| 159 | +<script> | |
| 160 | +import { | |
| 161 | + listCredit, | |
| 162 | + getCredit, | |
| 163 | + delCredit, | |
| 164 | + addCredit, | |
| 165 | + updateCredit, | |
| 166 | + exportCredit, | |
| 167 | + getNames, | |
| 168 | + historyCredit | |
| 169 | +} from "@/api/business/credit4"; | |
| 170 | + | |
| 171 | +import { | |
| 172 | + constructionsitesList | |
| 173 | +} from "@/api/dict"; | |
| 174 | + | |
| 175 | +export default { | |
| 176 | + name: "ConstructionCredit", | |
| 177 | + data() { | |
| 178 | + return { | |
| 179 | + // 遮罩层 | |
| 180 | + loading: true, | |
| 181 | + // 选中数组 | |
| 182 | + ids: [], | |
| 183 | + // 非单个禁用 | |
| 184 | + single: true, | |
| 185 | + // 非多个禁用 | |
| 186 | + multiple: true, | |
| 187 | + // 显示搜索条件 | |
| 188 | + showSearch: true, | |
| 189 | + infoDialog :false, | |
| 190 | + // 总条数 | |
| 191 | + total: 0, | |
| 192 | + // 工地表格数据 | |
| 193 | + creditList: [], | |
| 194 | + creditListInfo: [], | |
| 195 | + dictNames:[], | |
| 196 | + dictTypes:[], | |
| 197 | + dictPlaces:[], | |
| 198 | + names:[{label:"张三",value:"张三",id:"a"}, | |
| 199 | + {label:"李四",value:"李四",id:"B"}, | |
| 200 | + {label:"王五",value:"王五",id:"C"}, | |
| 201 | + {label:"赵六",value:"赵六",id:"D"}, | |
| 202 | + {label:"狗七",value:"狗七",id:"E"}], | |
| 203 | + idNumbers:[{label:"124547845124545698",value:"124547845124545698",id:"a"}, | |
| 204 | + {label:"124547845124545698",value:"124547845124545698",id:"B"}, | |
| 205 | + {label:"124547845124545698",value:"124547845124545698",id:"C"}, | |
| 206 | + {label:"124547845124545698",value:"124547845124545698",id:"D"}, | |
| 207 | + {label:"124547845124545698",value:"124547845124545698",id:"E"}], | |
| 208 | + places:[{label:"工地A",value:"工地A",id:"a"}, | |
| 209 | + {label:"工地B",value:"工地B",id:"B"}, | |
| 210 | + {label:"工地C",value:"工地C",id:"C"}, | |
| 211 | + {label:"工地D",value:"工地D",id:"D"}, | |
| 212 | + {label:"工地E",value:"工地E",id:"E"}], | |
| 213 | + // 弹出层标题 | |
| 214 | + title: "", | |
| 215 | + // 是否显示弹出层 | |
| 216 | + open: false, | |
| 217 | + isEdit:false, | |
| 218 | + // 查询参数 | |
| 219 | + queryParams: { | |
| 220 | + pageNum: 1, | |
| 221 | + pageSize: 10, | |
| 222 | + name: null, | |
| 223 | + idNumber: null, | |
| 224 | + time: null, | |
| 225 | + reason: null, | |
| 226 | + status: 0, | |
| 227 | + lostCredit: 1 | |
| 228 | + }, | |
| 229 | + // 表单参数 | |
| 230 | + form: {}, | |
| 231 | + updateForm:{}, | |
| 232 | + // 表单校验 | |
| 233 | + rules: {name: [ | |
| 234 | + { required: true, message: '请选择驾驶员', trigger: 'change' }, | |
| 235 | + ],idNumber: [ | |
| 236 | + { required: true, message: '请选择证件号码', trigger: 'change' }, | |
| 237 | + ],time: [ | |
| 238 | + { required: true, message: '请选择失信时间', trigger: 'change' }, | |
| 239 | + ],reason: [ | |
| 240 | + { required: true, message: '请填写原因', trigger: 'blur' }, | |
| 241 | + ]} | |
| 242 | + }; | |
| 243 | + }, | |
| 244 | + created() { | |
| 245 | + this.getList(); | |
| 246 | + this.getNamesData(); | |
| 247 | + | |
| 248 | + let query = { | |
| 249 | + 'page':1, | |
| 250 | + 'size':9999, | |
| 251 | + 'creditStatus':0 | |
| 252 | + } | |
| 253 | + | |
| 254 | + constructionsitesList(query).then(response => { | |
| 255 | + console.log(response); | |
| 256 | + }); | |
| 257 | + }, | |
| 258 | + methods: { | |
| 259 | + getDataInfo(row){ | |
| 260 | + let param ={"objectId":row.objectId} | |
| 261 | + listCredit(param).then(response => { | |
| 262 | + this.creditListInfo = response.rows; | |
| 263 | + this.infoDialog = true; | |
| 264 | + }); | |
| 265 | + | |
| 266 | + }, | |
| 267 | + getNamesData(){ | |
| 268 | + getNames(this.queryParams).then(response => { | |
| 269 | + this.dictNames = response; | |
| 270 | + }); | |
| 271 | + }, | |
| 272 | + getData(stauts){ | |
| 273 | + this.queryParams.status=0; | |
| 274 | + this.queryParams.lostCredit=stauts; | |
| 275 | + this.getList(); | |
| 276 | + }, | |
| 277 | + getHistoryData(){ | |
| 278 | + this.queryParams.status=1; | |
| 279 | + this.getList(); | |
| 280 | + }, | |
| 281 | + colStyle(obj){ | |
| 282 | + if(obj.column.property == "id"){ | |
| 283 | + return {background:"#f8f8f9"} | |
| 284 | + } | |
| 285 | + }, | |
| 286 | + getObjId(a){ | |
| 287 | + this.form.objectId = a; | |
| 288 | + }, | |
| 289 | + getList() { | |
| 290 | + this.loading = true; | |
| 291 | + if(this.queryParams.status==0){ | |
| 292 | + listCredit(this.queryParams).then(response => { | |
| 293 | + this.creditList = response.rows; | |
| 294 | + this.total = response.total; | |
| 295 | + this.loading = false; | |
| 296 | + }); | |
| 297 | + } | |
| 298 | + if(this.queryParams.status==1){ | |
| 299 | + historyCredit(this.queryParams).then(response => { | |
| 300 | + this.creditList = response.rows; | |
| 301 | + this.total = response.total; | |
| 302 | + this.loading = false; | |
| 303 | + }); | |
| 304 | + } | |
| 305 | + | |
| 306 | + }, | |
| 307 | + // 取消按钮 | |
| 308 | + cancel() { | |
| 309 | + this.open = false; | |
| 310 | + this.isEdit = false; | |
| 311 | + this.reset(); | |
| 312 | + }, | |
| 313 | + // 表单重置 | |
| 314 | + reset() { | |
| 315 | + this.form = { | |
| 316 | + id: null, | |
| 317 | + name: null, | |
| 318 | + idNumber: null, | |
| 319 | + time: null, | |
| 320 | + reason: null, | |
| 321 | + lostCredit: null, | |
| 322 | + objectId: null, | |
| 323 | + }; | |
| 324 | + this.resetForm("form"); | |
| 325 | + }, | |
| 326 | + /** 搜索按钮操作 */ | |
| 327 | + handleQuery() { | |
| 328 | + this.queryParams.pageNum = 1; | |
| 329 | + this.getList(); | |
| 330 | + }, | |
| 331 | + /** 重置按钮操作 */ | |
| 332 | + resetQuery() { | |
| 333 | + this.resetForm("queryForm"); | |
| 334 | + console.log(this.queryParams); | |
| 335 | + this.handleQuery(); | |
| 336 | + }, | |
| 337 | + // 多选框选中数据 | |
| 338 | + handleSelectionChange(selection) { | |
| 339 | + this.ids = selection.map(item => item.id) | |
| 340 | + this.single = selection.length !== 1 | |
| 341 | + this.multiple = !selection.length | |
| 342 | + }, | |
| 343 | + /** 新增按钮操作 */ | |
| 344 | + handleAdd() { | |
| 345 | + this.reset(); | |
| 346 | + this.open = true; | |
| 347 | + this.title = "添加驾驶员"; | |
| 348 | + }, | |
| 349 | + /** 修改按钮操作 */ | |
| 350 | + handleUpdate(row) { | |
| 351 | + this.reset(); | |
| 352 | + const id = row.id || this.ids | |
| 353 | + getCredit(id).then(response => { | |
| 354 | + this.form = response.data; | |
| 355 | + this.isEdit = true; | |
| 356 | + }); | |
| 357 | + }, | |
| 358 | + /** 提交按钮 */ | |
| 359 | + submitForm() { | |
| 360 | + this.$refs["form"].validate(valid => { | |
| 361 | + if (valid) { | |
| 362 | + if (this.form.id != null) { | |
| 363 | + this.updateForm.id = this.form.id; | |
| 364 | + updateCredit(this.updateForm).then(response => { | |
| 365 | + this.msgSuccess("撤销成功"); | |
| 366 | + this.isEdit = false; | |
| 367 | + this.getList(); | |
| 368 | + }); | |
| 369 | + } else { | |
| 370 | + this.form.lostCredit = 1; | |
| 371 | + addCredit(this.form).then(response => { | |
| 372 | + this.msgSuccess("新增成功"); | |
| 373 | + this.open = false; | |
| 374 | + this.getList(); | |
| 375 | + this.getNamesData(); | |
| 376 | + }); | |
| 377 | + } | |
| 378 | + } | |
| 379 | + }); | |
| 380 | + }, | |
| 381 | + handleExport() { | |
| 382 | + const queryParams = this.queryParams; | |
| 383 | + this.$confirm('是否确认导出所有驾驶员数据项?', "警告", { | |
| 384 | + confirmButtonText: "确定", | |
| 385 | + cancelButtonText: "取消", | |
| 386 | + type: "warning" | |
| 387 | + }).then(function() { | |
| 388 | + return exportCredit(queryParams); | |
| 389 | + }).then(response => { | |
| 390 | + this.download(response.msg); | |
| 391 | + }) | |
| 392 | + } | |
| 393 | + } | |
| 394 | +}; | |
| 395 | +</script> | ... | ... |
trash-ui/src/views/business/EarthSitesCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信消纳场</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信消纳场</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + <el-row type="flex" justify="center"> | |
| 14 | + <el-col> | |
| 15 | + <el-form-item label="消纳场名称" prop="name" | |
| 16 | + style="float:right;"> | |
| 17 | + <el-select v-model="queryParams.name" | |
| 18 | + filterable | |
| 19 | + clearable | |
| 20 | + reserve-keyword | |
| 21 | + placeholder="消纳场名称" | |
| 22 | + size="small" | |
| 23 | + :loading="loading"> | |
| 24 | + <el-option | |
| 25 | + v-for="item in dictNames" | |
| 26 | + :label="item" | |
| 27 | + :value="item"> | |
| 28 | + </el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + | |
| 33 | + <el-col> | |
| 34 | + <el-form-item label="所属场地" prop="place"> | |
| 35 | + <el-select v-model="queryParams.place" placeholder="所属场地" clearable size="small"> | |
| 36 | + <el-option label="请选择字典生成" value="" /> | |
| 37 | + </el-select> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-row> | |
| 41 | + <el-row type="flex" justify="center"> | |
| 42 | + <el-col> | |
| 43 | + <el-form-item label="消纳场类型" prop="type" | |
| 44 | + style="float:right;"> | |
| 45 | + <el-select v-model="queryParams.type" placeholder="建筑垃圾类型" clearable size="small"> | |
| 46 | + <el-option label="请选择字典生成" value="" /> | |
| 47 | + </el-select> | |
| 48 | + </el-form-item> | |
| 49 | + | |
| 50 | + </el-col><el-col> | |
| 51 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 52 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 53 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 54 | + </el-date-picker> | |
| 55 | + </el-form-item> | |
| 56 | + </el-col> | |
| 57 | + </el-row> | |
| 58 | + | |
| 59 | + </el-form> | |
| 60 | + | |
| 61 | + <el-row :gutter="10" class="mb8"> | |
| 62 | + <el-col :span="1.5"> | |
| 63 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['EarthSites:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 64 | + </el-col> | |
| 65 | + <el-col :span="1.5"> | |
| 66 | + <el-button size="mini" @click="handleExport" v-hasPermi="['EarthSites:credit:export']">导出</el-button> | |
| 67 | + </el-col> | |
| 68 | + | |
| 69 | + <el-col :span="20" style="height: 1px;"></el-col> | |
| 70 | + <el-col :span="1.5"> | |
| 71 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 72 | + </el-col> | |
| 73 | + <el-col :span="1.5"> | |
| 74 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 75 | + </el-col> | |
| 76 | + </el-row> | |
| 77 | + | |
| 78 | + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> | |
| 79 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 80 | + <el-table-column label="消纳场名称" align="center" prop="name" /> | |
| 81 | + <el-table-column label="消纳场类型" align="center" prop="type" /> | |
| 82 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 83 | + <template slot-scope="scope"> | |
| 84 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 85 | + </template> | |
| 86 | + </el-table-column> | |
| 87 | + <el-table-column label="所属区域" align="center" prop="place" /> | |
| 88 | + <el-table-column label="失信原因" align="center" prop="reason" /> | |
| 89 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 90 | + <template slot-scope="scope"> | |
| 91 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['EarthSites:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 92 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">查看</el-button> | |
| 93 | + </template> | |
| 94 | + </el-table-column> | |
| 95 | + </el-table> | |
| 96 | + | |
| 97 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 98 | + @pagination="getList" /> | |
| 99 | + | |
| 100 | + <!-- 添加或修改工地对话框 --> | |
| 101 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 102 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 103 | + <el-form-item label="消纳场名称" prop="name"> | |
| 104 | + <el-select | |
| 105 | + v-model="form.name" | |
| 106 | + filterable | |
| 107 | + reserve-keyword | |
| 108 | + placeholder="消纳场名称"> | |
| 109 | + <el-option | |
| 110 | + @click.native="getObjId(item.id)" | |
| 111 | + v-for="item in names" | |
| 112 | + :key="item.value" | |
| 113 | + :label="item.label" | |
| 114 | + :value="item.label"> | |
| 115 | + </el-option> | |
| 116 | + </el-select> | |
| 117 | + </el-form-item> | |
| 118 | + | |
| 119 | + <el-form-item label="消纳场类型" prop="type"> | |
| 120 | + <el-select | |
| 121 | + v-model="form.type" | |
| 122 | + filterable | |
| 123 | + reserve-keyword | |
| 124 | + placeholder="消纳场类型"> | |
| 125 | + <el-option | |
| 126 | + v-for="item in types" | |
| 127 | + :key="item.id" | |
| 128 | + :label="item.label" | |
| 129 | + :value="item.value"> | |
| 130 | + </el-option> | |
| 131 | + </el-select> | |
| 132 | + </el-form-item> | |
| 133 | + <el-form-item label="所属区域" prop="place"> | |
| 134 | + <el-select | |
| 135 | + v-model="form.place" | |
| 136 | + filterable | |
| 137 | + reserve-keyword | |
| 138 | + placeholder="所属区域"> | |
| 139 | + <el-option | |
| 140 | + v-for="item in places" | |
| 141 | + :key="item.id" | |
| 142 | + :label="item.label" | |
| 143 | + :value="item.value"> | |
| 144 | + </el-option> | |
| 145 | + </el-select> | |
| 146 | + </el-form-item> | |
| 147 | + <el-form-item label="失信原因" prop="reason"> | |
| 148 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 149 | + </el-form-item> | |
| 150 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 151 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 152 | + </el-form> | |
| 153 | + <div slot="footer" class="dialog-footer"> | |
| 154 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 155 | + <el-button @click="cancel">退出</el-button> | |
| 156 | + </div> | |
| 157 | + </el-dialog> | |
| 158 | + | |
| 159 | + | |
| 160 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body> | |
| 161 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> | |
| 162 | + <el-form-item label="情况说明" prop="reason"> | |
| 163 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 164 | + </el-form-item> | |
| 165 | + </el-form> | |
| 166 | + <div slot="footer" class="dialog-footer"> | |
| 167 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 168 | + <el-button @click="cancel">退出</el-button> | |
| 169 | + </div> | |
| 170 | + </el-dialog> | |
| 171 | + | |
| 172 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body> | |
| 173 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 174 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 175 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 176 | + <template slot-scope="scope"> | |
| 177 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 178 | + </template> | |
| 179 | + </el-table-column> | |
| 180 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 181 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 182 | + <template slot-scope="scope"> | |
| 183 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 184 | + </template> | |
| 185 | + </el-table-column> | |
| 186 | + </el-table> | |
| 187 | + </el-dialog> | |
| 188 | + </div> | |
| 189 | +</template> | |
| 190 | + | |
| 191 | +<script> | |
| 192 | +import { | |
| 193 | + listCredit, | |
| 194 | + getCredit, | |
| 195 | + delCredit, | |
| 196 | + addCredit, | |
| 197 | + updateCredit, | |
| 198 | + exportCredit, | |
| 199 | + getNames, | |
| 200 | + historyCredit | |
| 201 | +} from "@/api/business/credit1"; | |
| 202 | + | |
| 203 | +import { | |
| 204 | + constructionsitesList | |
| 205 | +} from "@/api/dict"; | |
| 206 | + | |
| 207 | +export default { | |
| 208 | + name: "ConstructionCredit", | |
| 209 | + data() { | |
| 210 | + return { | |
| 211 | + // 遮罩层 | |
| 212 | + loading: true, | |
| 213 | + // 选中数组 | |
| 214 | + ids: [], | |
| 215 | + // 非单个禁用 | |
| 216 | + single: true, | |
| 217 | + // 非多个禁用 | |
| 218 | + multiple: true, | |
| 219 | + // 显示搜索条件 | |
| 220 | + showSearch: true, | |
| 221 | + infoDialog :false, | |
| 222 | + // 总条数 | |
| 223 | + total: 0, | |
| 224 | + // 工地表格数据 | |
| 225 | + creditList: [], | |
| 226 | + creditListInfo: [], | |
| 227 | + dictNames:[], | |
| 228 | + dictTypes:[], | |
| 229 | + dictPlaces:[], | |
| 230 | + names:[{label:"消纳场A",value:"消纳场A",id:"a"}, | |
| 231 | + {label:"消纳场B",value:"消纳场B",id:"B"}, | |
| 232 | + {label:"消纳场C",value:"消纳场C",id:"C"}, | |
| 233 | + {label:"消纳场D",value:"消纳场D",id:"D"}, | |
| 234 | + {label:"消纳场E",value:"消纳场E",id:"E"}], | |
| 235 | + types:[{label:"消纳场A",value:"消纳场A",id:"a"}, | |
| 236 | + {label:"消纳场B",value:"消纳场B",id:"B"}, | |
| 237 | + {label:"消纳场C",value:"消纳场C",id:"C"}, | |
| 238 | + {label:"消纳场D",value:"消纳场D",id:"D"}, | |
| 239 | + {label:"消纳场E",value:"消纳场E",id:"E"}], | |
| 240 | + places:[{label:"消纳场A",value:"消纳场A",id:"a"}, | |
| 241 | + {label:"消纳场B",value:"消纳场B",id:"B"}, | |
| 242 | + {label:"消纳场C",value:"消纳场C",id:"C"}, | |
| 243 | + {label:"消纳场D",value:"消纳场D",id:"D"}, | |
| 244 | + {label:"消纳场E",value:"消纳场E",id:"E"}], | |
| 245 | + // 弹出层标题 | |
| 246 | + title: "", | |
| 247 | + // 是否显示弹出层 | |
| 248 | + open: false, | |
| 249 | + isEdit:false, | |
| 250 | + // 查询参数 | |
| 251 | + queryParams: { | |
| 252 | + pageNum: 1, | |
| 253 | + pageSize: 10, | |
| 254 | + name: null, | |
| 255 | + type: null, | |
| 256 | + time: null, | |
| 257 | + place: null, | |
| 258 | + reason: null, | |
| 259 | + status: 0, | |
| 260 | + lostCredit: 1 | |
| 261 | + }, | |
| 262 | + // 表单参数 | |
| 263 | + form: {}, | |
| 264 | + updateForm:{}, | |
| 265 | + // 表单校验 | |
| 266 | + rules: {name: [ | |
| 267 | + { required: true, message: '请选择消纳场', trigger: 'change' }, | |
| 268 | + ],type: [ | |
| 269 | + { required: true, message: '请选择消纳场类型', trigger: 'change' }, | |
| 270 | + ],place: [ | |
| 271 | + { required: true, message: '请选择所属区域', trigger: 'change' }, | |
| 272 | + ],time: [ | |
| 273 | + { required: true, message: '请选择失信时间', trigger: 'change' }, | |
| 274 | + ],reason: [ | |
| 275 | + { required: true, message: '请填写原因', trigger: 'blur' }, | |
| 276 | + ]} | |
| 277 | + }; | |
| 278 | + }, | |
| 279 | + created() { | |
| 280 | + this.getList(); | |
| 281 | + this.getNamesData(); | |
| 282 | + | |
| 283 | + let query = { | |
| 284 | + 'page':1, | |
| 285 | + 'size':9999, | |
| 286 | + 'creditStatus':0 | |
| 287 | + } | |
| 288 | + | |
| 289 | + constructionsitesList(query).then(response => { | |
| 290 | + console.log(response); | |
| 291 | + }); | |
| 292 | + }, | |
| 293 | + methods: { | |
| 294 | + getDataInfo(row){ | |
| 295 | + let param ={"objectId":row.objectId} | |
| 296 | + listCredit(param).then(response => { | |
| 297 | + this.creditListInfo = response.rows; | |
| 298 | + this.infoDialog = true; | |
| 299 | + }); | |
| 300 | + | |
| 301 | + }, | |
| 302 | + getNamesData(){ | |
| 303 | + getNames(this.queryParams).then(response => { | |
| 304 | + this.dictNames = response; | |
| 305 | + }); | |
| 306 | + }, | |
| 307 | + getData(stauts){ | |
| 308 | + this.queryParams.status=0; | |
| 309 | + this.queryParams.lostCredit=stauts; | |
| 310 | + this.getList(); | |
| 311 | + }, | |
| 312 | + getHistoryData(){ | |
| 313 | + this.queryParams.status=1; | |
| 314 | + this.getList(); | |
| 315 | + }, | |
| 316 | + colStyle(obj){ | |
| 317 | + if(obj.column.property == "id"){ | |
| 318 | + return {background:"#f8f8f9"} | |
| 319 | + } | |
| 320 | + }, | |
| 321 | + getObjId(a){ | |
| 322 | + this.form.objectId = a; | |
| 323 | + }, | |
| 324 | + getList() { | |
| 325 | + this.loading = true; | |
| 326 | + if(this.queryParams.status==0){ | |
| 327 | + listCredit(this.queryParams).then(response => { | |
| 328 | + this.creditList = response.rows; | |
| 329 | + this.total = response.total; | |
| 330 | + this.loading = false; | |
| 331 | + }); | |
| 332 | + } | |
| 333 | + if(this.queryParams.status==1){ | |
| 334 | + historyCredit(this.queryParams).then(response => { | |
| 335 | + this.creditList = response.rows; | |
| 336 | + this.total = response.total; | |
| 337 | + this.loading = false; | |
| 338 | + }); | |
| 339 | + } | |
| 340 | + | |
| 341 | + }, | |
| 342 | + // 取消按钮 | |
| 343 | + cancel() { | |
| 344 | + this.open = false; | |
| 345 | + this.isEdit = false; | |
| 346 | + this.reset(); | |
| 347 | + }, | |
| 348 | + // 表单重置 | |
| 349 | + reset() { | |
| 350 | + this.form = { | |
| 351 | + id: null, | |
| 352 | + name: null, | |
| 353 | + type: null, | |
| 354 | + time: null, | |
| 355 | + place: null, | |
| 356 | + reason: null, | |
| 357 | + lostCredit: null, | |
| 358 | + objectId: null, | |
| 359 | + }; | |
| 360 | + this.resetForm("form"); | |
| 361 | + }, | |
| 362 | + /** 搜索按钮操作 */ | |
| 363 | + handleQuery() { | |
| 364 | + this.queryParams.pageNum = 1; | |
| 365 | + this.getList(); | |
| 366 | + }, | |
| 367 | + /** 重置按钮操作 */ | |
| 368 | + resetQuery() { | |
| 369 | + this.resetForm("queryForm"); | |
| 370 | + console.log(this.queryParams); | |
| 371 | + this.handleQuery(); | |
| 372 | + }, | |
| 373 | + // 多选框选中数据 | |
| 374 | + handleSelectionChange(selection) { | |
| 375 | + this.ids = selection.map(item => item.id) | |
| 376 | + this.single = selection.length !== 1 | |
| 377 | + this.multiple = !selection.length | |
| 378 | + }, | |
| 379 | + /** 新增按钮操作 */ | |
| 380 | + handleAdd() { | |
| 381 | + this.reset(); | |
| 382 | + this.open = true; | |
| 383 | + this.title = "添加消纳场"; | |
| 384 | + }, | |
| 385 | + /** 修改按钮操作 */ | |
| 386 | + handleUpdate(row) { | |
| 387 | + this.reset(); | |
| 388 | + const id = row.id || this.ids | |
| 389 | + getCredit(id).then(response => { | |
| 390 | + this.form = response.data; | |
| 391 | + this.isEdit = true; | |
| 392 | + }); | |
| 393 | + }, | |
| 394 | + /** 提交按钮 */ | |
| 395 | + submitForm() { | |
| 396 | + this.$refs["form"].validate(valid => { | |
| 397 | + if (valid) { | |
| 398 | + if (this.form.id != null) { | |
| 399 | + this.updateForm.id = this.form.id; | |
| 400 | + updateCredit(this.updateForm).then(response => { | |
| 401 | + this.msgSuccess("撤销成功"); | |
| 402 | + this.isEdit = false; | |
| 403 | + this.getList(); | |
| 404 | + }); | |
| 405 | + } else { | |
| 406 | + this.form.lostCredit = 1; | |
| 407 | + addCredit(this.form).then(response => { | |
| 408 | + this.msgSuccess("新增成功"); | |
| 409 | + this.open = false; | |
| 410 | + this.getList(); | |
| 411 | + this.getNamesData(); | |
| 412 | + }); | |
| 413 | + } | |
| 414 | + } | |
| 415 | + }); | |
| 416 | + }, | |
| 417 | + handleExport() { | |
| 418 | + const queryParams = this.queryParams; | |
| 419 | + this.$confirm('是否确认导出所有消纳场数据项?', "警告", { | |
| 420 | + confirmButtonText: "确定", | |
| 421 | + cancelButtonText: "取消", | |
| 422 | + type: "warning" | |
| 423 | + }).then(function() { | |
| 424 | + return exportCredit(queryParams); | |
| 425 | + }).then(response => { | |
| 426 | + this.download(response.msg); | |
| 427 | + }) | |
| 428 | + } | |
| 429 | + } | |
| 430 | +}; | |
| 431 | +</script> | ... | ... |
trash-ui/src/views/business/TruckCredit/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-row :gutter="10" class="mb8"> | |
| 4 | + <el-col :span="1.5"> | |
| 5 | + <el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信车辆</el-button> | |
| 6 | + </el-col> | |
| 7 | + <el-col :span="1.5"> | |
| 8 | + <el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史失信车辆</el-button> | |
| 9 | + </el-col> | |
| 10 | + </el-row> | |
| 11 | + | |
| 12 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> | |
| 13 | + <el-row type="flex" justify="center"> | |
| 14 | + <el-col> | |
| 15 | + <el-form-item label="车牌号码" prop="licensePlate" | |
| 16 | + style="float:right;"> | |
| 17 | + <el-select v-model="queryParams.licensePlate" | |
| 18 | + filterable | |
| 19 | + reserve-keyword | |
| 20 | + placeholder="车牌号码" | |
| 21 | + clearable | |
| 22 | + size="small" | |
| 23 | + :loading="loading"> | |
| 24 | + <el-option | |
| 25 | + v-for="item in dictNames" | |
| 26 | + :label="item" | |
| 27 | + :value="item"> | |
| 28 | + </el-option> | |
| 29 | + </el-select> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + | |
| 33 | + <el-col> | |
| 34 | + <el-form-item label="企业运输" prop="companyId"> | |
| 35 | + <el-select v-model="queryParams.companyId" placeholder="企业运输" clearable size="small"> | |
| 36 | + <el-option label="请选择字典生成" value="" /> | |
| 37 | + </el-select> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-row> | |
| 41 | + <el-row type="flex" justify="center"> | |
| 42 | + <el-col> | |
| 43 | + </el-col><el-col> | |
| 44 | + <el-form-item label="失信日期" prop="time" v-show="queryParams.status==0"> | |
| 45 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.time" type="date" | |
| 46 | + value-format="yyyy-MM-dd" placeholder="失信日期"> | |
| 47 | + </el-date-picker> | |
| 48 | + </el-form-item> | |
| 49 | + </el-col> | |
| 50 | + </el-row> | |
| 51 | + | |
| 52 | + </el-form> | |
| 53 | + | |
| 54 | + <el-row :gutter="10" class="mb8"> | |
| 55 | + <el-col :span="1.5"> | |
| 56 | + <el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']" v-if="queryParams.status==0">新增</el-button> | |
| 57 | + </el-col> | |
| 58 | + <el-col :span="1.5"> | |
| 59 | + <el-button size="mini" @click="handleExport" v-hasPermi="['truck:credit:export']">导出</el-button> | |
| 60 | + </el-col> | |
| 61 | + | |
| 62 | + <el-col :span="20" style="height: 1px;"></el-col> | |
| 63 | + <el-col :span="1.5"> | |
| 64 | + <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> | |
| 65 | + </el-col> | |
| 66 | + <el-col :span="1.5"> | |
| 67 | + <el-button size="mini" @click="resetQuery">重置</el-button> | |
| 68 | + </el-col> | |
| 69 | + </el-row> | |
| 70 | + | |
| 71 | + <el-table v-loading="loading" :data="creditList" @selection-change="handleSelectionChange" :cell-style="colStyle" border> | |
| 72 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 73 | + <el-table-column label="企业运输" align="center" prop="companyId" /> | |
| 74 | + <el-table-column label="车牌号码" align="center" prop="licensePlate" /> | |
| 75 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 76 | + <template slot-scope="scope"> | |
| 77 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 78 | + </template> | |
| 79 | + </el-table-column> | |
| 80 | + <el-table-column label="失信原因" align="center" prop="reason" /> | |
| 81 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 82 | + <template slot-scope="scope"> | |
| 83 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['truck:credit:edit']" v-if="queryParams.status==0">撤销失信</el-button> | |
| 84 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(scope.row)" v-if="queryParams.status==1">查看</el-button> | |
| 85 | + </template> | |
| 86 | + </el-table-column> | |
| 87 | + </el-table> | |
| 88 | + | |
| 89 | + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 90 | + @pagination="getList" /> | |
| 91 | + | |
| 92 | + <!-- 添加或修改工地对话框 --> | |
| 93 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 94 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 95 | + <el-form-item label="运输企业" prop="companyId"> | |
| 96 | + <el-select | |
| 97 | + v-model="form.companyId" | |
| 98 | + filterable | |
| 99 | + reserve-keyword | |
| 100 | + placeholder="运输企业"> | |
| 101 | + <el-option | |
| 102 | + @click.native="getObjId(item.id)" | |
| 103 | + v-for="item in companyIds" | |
| 104 | + :key="item.value" | |
| 105 | + :label="item.label" | |
| 106 | + :value="item.label"> | |
| 107 | + </el-option> | |
| 108 | + </el-select> | |
| 109 | + </el-form-item> | |
| 110 | + <el-form-item label="车牌号码" prop="licensePlate"> | |
| 111 | + <el-select | |
| 112 | + v-model="form.licensePlate" | |
| 113 | + filterable | |
| 114 | + reserve-keyword | |
| 115 | + placeholder="车牌号码"> | |
| 116 | + <el-option | |
| 117 | + v-for="item in licensePlates" | |
| 118 | + :key="item.id" | |
| 119 | + :label="item.label" | |
| 120 | + :value="item.value"> | |
| 121 | + </el-option> | |
| 122 | + </el-select> | |
| 123 | + </el-form-item> | |
| 124 | + <el-form-item label="失信原因" prop="reason"> | |
| 125 | + <el-input v-model="form.reason" placeholder="失信原因" /> | |
| 126 | + </el-form-item> | |
| 127 | + <el-input v-model="form.lostCredit" value="1" type="hidden" /> | |
| 128 | + <el-input v-model="form.objectId" type="hidden" /> | |
| 129 | + </el-form> | |
| 130 | + <div slot="footer" class="dialog-footer"> | |
| 131 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 132 | + <el-button @click="cancel">退出</el-button> | |
| 133 | + </div> | |
| 134 | + </el-dialog> | |
| 135 | + | |
| 136 | + | |
| 137 | + <el-dialog title="撤销失信" :visible.sync="isEdit" width="500px" append-to-body> | |
| 138 | + <el-form ref="form" :model="updateForm" :rules="rules" label-width="120px"> | |
| 139 | + <el-form-item label="情况说明" prop="reason"> | |
| 140 | + <el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/> | |
| 141 | + </el-form-item> | |
| 142 | + </el-form> | |
| 143 | + <div slot="footer" class="dialog-footer"> | |
| 144 | + <el-button type="primary" @click="submitForm">保存</el-button> | |
| 145 | + <el-button @click="cancel">退出</el-button> | |
| 146 | + </div> | |
| 147 | + </el-dialog> | |
| 148 | + | |
| 149 | + <el-dialog title="历史失信" :visible.sync="infoDialog" width="800px" append-to-body center="true"> | |
| 150 | + <el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border> | |
| 151 | + <el-table-column label="序号" align="center" prop="id" /> | |
| 152 | + <el-table-column label="失信时间" align="center" prop="time" width="180" v-if="queryParams.status==0"> | |
| 153 | + <template slot-scope="scope"> | |
| 154 | + <span>{{ parseTime(scope.row.time, '{y}-{m}-{d}') }}</span> | |
| 155 | + </template> | |
| 156 | + </el-table-column> | |
| 157 | + <el-table-column label="情况说明" align="center" prop="reason" /> | |
| 158 | + <el-table-column label="操作历史" align="center" prop="lostCredit"> | |
| 159 | + <template slot-scope="scope"> | |
| 160 | + <span>{{ scope.row.lostCredit== 0 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span> | |
| 161 | + </template> | |
| 162 | + </el-table-column> | |
| 163 | + </el-table> | |
| 164 | + </el-dialog> | |
| 165 | + </div> | |
| 166 | +</template> | |
| 167 | + | |
| 168 | +<script> | |
| 169 | + import { | |
| 170 | + listCredit, | |
| 171 | + getCredit, | |
| 172 | + delCredit, | |
| 173 | + addCredit, | |
| 174 | + updateCredit, | |
| 175 | + exportCredit, | |
| 176 | + getNames, | |
| 177 | + historyCredit | |
| 178 | + } from "@/api/business/credit3"; | |
| 179 | + | |
| 180 | + export default { | |
| 181 | + name: "Credit", | |
| 182 | + data() { | |
| 183 | + return { | |
| 184 | + // 遮罩层 | |
| 185 | + loading: true, | |
| 186 | + // 选中数组 | |
| 187 | + ids: [], | |
| 188 | + // 非单个禁用 | |
| 189 | + single: true, | |
| 190 | + // 非多个禁用 | |
| 191 | + multiple: true, | |
| 192 | + // 显示搜索条件 | |
| 193 | + showSearch: true, | |
| 194 | + infoDialog :false, | |
| 195 | + // 总条数 | |
| 196 | + total: 0, | |
| 197 | + // 工地表格数据 | |
| 198 | + creditList: [], | |
| 199 | + creditListInfo: [], | |
| 200 | + dictNames:[], | |
| 201 | + dictTypes:[], | |
| 202 | + dictPlaces:[], | |
| 203 | + companyIds:[{label:"运输公司A",value:"1",id:"a"}, | |
| 204 | + {label:"运输公司B",value:"2",id:"B"}, | |
| 205 | + {label:"运输公司C",value:"3",id:"C"}, | |
| 206 | + {label:"运输公司D",value:"4",id:"D"}, | |
| 207 | + {label:"运输公司E",value:"5",id:"E"}], | |
| 208 | + licensePlates: | |
| 209 | + [{label:"XL:010101",value:"XL:010101",id:"a"}, | |
| 210 | + {label:"XL:010102",value:"XL:010102",id:"B"}, | |
| 211 | + {label:"XL:010103",value:"XL:010103",id:"C"}, | |
| 212 | + {label:"XL:010104",value:"XL:010104",id:"D"}, | |
| 213 | + {label:"XL:010105",value:"XL:010105",id:"E"}], | |
| 214 | + // 弹出层标题 | |
| 215 | + title: "", | |
| 216 | + // 是否显示弹出层 | |
| 217 | + open: false, | |
| 218 | + isEdit:false, | |
| 219 | + // 查询参数 | |
| 220 | + queryParams: { | |
| 221 | + pageNum: 1, | |
| 222 | + pageSize: 10, | |
| 223 | + companyId: null, | |
| 224 | + licensePlate:null, | |
| 225 | + time: null, | |
| 226 | + reason: null, | |
| 227 | + status: 0, | |
| 228 | + lostCredit: 1 | |
| 229 | + }, | |
| 230 | + // 表单参数 | |
| 231 | + form: {}, | |
| 232 | + updateForm:{}, | |
| 233 | + // 表单校验 | |
| 234 | + rules: {companyId: [ | |
| 235 | + { required: true, message: '请选择运输公司', trigger: 'change' }, | |
| 236 | + ],reason: [ | |
| 237 | + { required: true, message: '请填写原因', trigger: 'blur' }, | |
| 238 | + ],licensePlate :[ | |
| 239 | + { required: true, message: '请选择车辆', trigger: 'change'} | |
| 240 | + ],time: [ | |
| 241 | + { required: true, message: '请选择失信时间', trigger: 'change' }, | |
| 242 | + ],} | |
| 243 | + }; | |
| 244 | + }, | |
| 245 | + created() { | |
| 246 | + this.getList(); | |
| 247 | + this.getNamesData(); | |
| 248 | + }, | |
| 249 | + methods: { | |
| 250 | + getDataInfo(row){ | |
| 251 | + console.log(row); | |
| 252 | + | |
| 253 | + let param ={"objectId":row.objectId} | |
| 254 | + | |
| 255 | + listCredit(param).then(response => { | |
| 256 | + this.creditListInfo = response.rows; | |
| 257 | + this.infoDialog = true; | |
| 258 | + }); | |
| 259 | + | |
| 260 | + }, | |
| 261 | + getNamesData(){ | |
| 262 | + getNames(this.queryParams).then(response => { | |
| 263 | + this.dictNames = response; | |
| 264 | + }); | |
| 265 | + }, | |
| 266 | + getData(stauts){ | |
| 267 | + this.queryParams.status=0; | |
| 268 | + this.queryParams.lostCredit=stauts; | |
| 269 | + this.getList(); | |
| 270 | + }, | |
| 271 | + getHistoryData(){ | |
| 272 | + this.queryParams.status=1; | |
| 273 | + this.getList(); | |
| 274 | + }, | |
| 275 | + colStyle(obj){ | |
| 276 | + if(obj.column.property == "id"){ | |
| 277 | + return {background:"#f8f8f9"} | |
| 278 | + } | |
| 279 | + }, | |
| 280 | + getObjId(a){ | |
| 281 | + this.form.objectId = a; | |
| 282 | + }, | |
| 283 | + getList() { | |
| 284 | + this.loading = true; | |
| 285 | + if(this.queryParams.status==0){ | |
| 286 | + listCredit(this.queryParams).then(response => { | |
| 287 | + this.creditList = response.rows; | |
| 288 | + this.total = response.total; | |
| 289 | + this.loading = false; | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + if(this.queryParams.status==1){ | |
| 293 | + historyCredit(this.queryParams).then(response => { | |
| 294 | + this.creditList = response.rows; | |
| 295 | + this.total = response.total; | |
| 296 | + this.loading = false; | |
| 297 | + }); | |
| 298 | + } | |
| 299 | + | |
| 300 | + }, | |
| 301 | + // 取消按钮 | |
| 302 | + cancel() { | |
| 303 | + this.open = false; | |
| 304 | + this.isEdit = false; | |
| 305 | + this.reset(); | |
| 306 | + }, | |
| 307 | + // 表单重置 | |
| 308 | + reset() { | |
| 309 | + this.form = { | |
| 310 | + id: null, | |
| 311 | + companyId: null, | |
| 312 | + licensePlate:null, | |
| 313 | + time: null, | |
| 314 | + reason: null, | |
| 315 | + status: null, | |
| 316 | + lostCredit: null | |
| 317 | + }; | |
| 318 | + this.resetForm("form"); | |
| 319 | + }, | |
| 320 | + /** 搜索按钮操作 */ | |
| 321 | + handleQuery() { | |
| 322 | + this.queryParams.pageNum = 1; | |
| 323 | + this.getList(); | |
| 324 | + }, | |
| 325 | + /** 重置按钮操作 */ | |
| 326 | + resetQuery() { | |
| 327 | + this.resetForm("queryForm"); | |
| 328 | + console.log(this.queryParams); | |
| 329 | + this.handleQuery(); | |
| 330 | + }, | |
| 331 | + // 多选框选中数据 | |
| 332 | + handleSelectionChange(selection) { | |
| 333 | + this.ids = selection.map(item => item.id) | |
| 334 | + this.single = selection.length !== 1 | |
| 335 | + this.multiple = !selection.length | |
| 336 | + }, | |
| 337 | + /** 新增按钮操作 */ | |
| 338 | + handleAdd() { | |
| 339 | + this.reset(); | |
| 340 | + this.open = true; | |
| 341 | + this.title = "车辆失信录入"; | |
| 342 | + }, | |
| 343 | + /** 修改按钮操作 */ | |
| 344 | + handleUpdate(row) { | |
| 345 | + this.reset(); | |
| 346 | + const id = row.id || this.ids | |
| 347 | + getCredit(id).then(response => { | |
| 348 | + this.form = response.data; | |
| 349 | + this.isEdit = true; | |
| 350 | + }); | |
| 351 | + }, | |
| 352 | + /** 提交按钮 */ | |
| 353 | + submitForm() { | |
| 354 | + this.$refs["form"].validate(valid => { | |
| 355 | + if (valid) { | |
| 356 | + if (this.form.id != null) { | |
| 357 | + this.updateForm.id = this.form.id; | |
| 358 | + updateCredit(this.updateForm).then(response => { | |
| 359 | + this.msgSuccess("撤销成功"); | |
| 360 | + this.isEdit = false; | |
| 361 | + this.getList(); | |
| 362 | + }); | |
| 363 | + } else { | |
| 364 | + this.form.lostCredit = 1; | |
| 365 | + addCredit(this.form).then(response => { | |
| 366 | + this.msgSuccess("新增成功"); | |
| 367 | + this.open = false; | |
| 368 | + this.getList(); | |
| 369 | + this.getNamesData(); | |
| 370 | + }); | |
| 371 | + } | |
| 372 | + } | |
| 373 | + }); | |
| 374 | + }, | |
| 375 | + handleExport() { | |
| 376 | + const queryParams = this.queryParams; | |
| 377 | + this.$confirm('是否确认导出所有车辆数据项?', "警告", { | |
| 378 | + confirmButtonText: "确定", | |
| 379 | + cancelButtonText: "取消", | |
| 380 | + type: "warning" | |
| 381 | + }).then(function() { | |
| 382 | + return exportCredit(queryParams); | |
| 383 | + }).then(response => { | |
| 384 | + this.download(response.msg); | |
| 385 | + }) | |
| 386 | + } | |
| 387 | + } | |
| 388 | + }; | |
| 389 | +</script> | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/CompanyCreditController.java
0 → 100644
| 1 | +package com.trash.business.controller; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 11 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 12 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | +import com.trash.common.annotation.Log; | |
| 17 | +import com.trash.common.core.controller.BaseController; | |
| 18 | +import com.trash.common.core.domain.AjaxResult; | |
| 19 | +import com.trash.common.enums.BusinessType; | |
| 20 | +import com.trash.business.domain.CompanyCredit; | |
| 21 | +import com.trash.business.service.ICompanyCreditService; | |
| 22 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 23 | +import com.trash.common.core.page.TableDataInfo; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 企业失信Controller | |
| 27 | + * | |
| 28 | + * @author trash | |
| 29 | + * @date 2023-04-25 | |
| 30 | + */ | |
| 31 | +@RestController | |
| 32 | +@RequestMapping("/Company/credit") | |
| 33 | +public class CompanyCreditController extends BaseController | |
| 34 | +{ | |
| 35 | + @Autowired | |
| 36 | + private ICompanyCreditService companyCreditService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询企业失信列表 | |
| 40 | + */ | |
| 41 | + @PreAuthorize("@ss.hasPermi('Company:credit:list')") | |
| 42 | + @GetMapping("/list") | |
| 43 | + public TableDataInfo list(CompanyCredit companyCredit) | |
| 44 | + { | |
| 45 | + startPage(); | |
| 46 | + List<CompanyCredit> list = companyCreditService.selectCompanyCreditList(companyCredit); | |
| 47 | + return getDataTable(list); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PreAuthorize("@ss.hasPermi('business:credit:list')") | |
| 51 | + @GetMapping("/historyCredit") | |
| 52 | + public TableDataInfo historyCredit(CompanyCredit companyCredit) | |
| 53 | + { | |
| 54 | + startPage(); | |
| 55 | + List<CompanyCredit> list = companyCreditService.selectCompanyCreditHistory(companyCredit); | |
| 56 | + return getDataTable(list); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @GetMapping("/names") | |
| 60 | + public List<String> getNames(CompanyCredit companyCredit) | |
| 61 | + { | |
| 62 | + return companyCreditService.getNames(companyCredit); | |
| 63 | + } | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 导出企业失信列表 | |
| 67 | + */ | |
| 68 | + @PreAuthorize("@ss.hasPermi('Company:credit:export')") | |
| 69 | + @Log(title = "企业失信", businessType = BusinessType.EXPORT) | |
| 70 | + @GetMapping("/export") | |
| 71 | + public AjaxResult export(CompanyCredit companyCredit) | |
| 72 | + { | |
| 73 | + List<CompanyCredit> list = companyCreditService.selectCompanyCreditList(companyCredit); | |
| 74 | + ExcelUtil<CompanyCredit> util = new ExcelUtil<CompanyCredit>(CompanyCredit.class); | |
| 75 | + return util.exportExcel(list, "credit"); | |
| 76 | + } | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 获取企业失信详细信息 | |
| 80 | + */ | |
| 81 | + @PreAuthorize("@ss.hasPermi('Company:credit:query')") | |
| 82 | + @GetMapping(value = "/{id}") | |
| 83 | + public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 84 | + { | |
| 85 | + return AjaxResult.success(companyCreditService.selectCompanyCreditById(id)); | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 新增企业失信 | |
| 90 | + */ | |
| 91 | + @PreAuthorize("@ss.hasPermi('Company:credit:add')") | |
| 92 | + @Log(title = "企业失信", businessType = BusinessType.INSERT) | |
| 93 | + @PostMapping | |
| 94 | + public AjaxResult add(@RequestBody CompanyCredit companyCredit) | |
| 95 | + { | |
| 96 | + return toAjax(companyCreditService.insertCompanyCredit(companyCredit)); | |
| 97 | + } | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 修改企业失信 | |
| 101 | + */ | |
| 102 | + @PreAuthorize("@ss.hasPermi('Company:credit:edit')") | |
| 103 | + @Log(title = "企业失信", businessType = BusinessType.UPDATE) | |
| 104 | + @PutMapping | |
| 105 | + public AjaxResult edit(@RequestBody CompanyCredit companyCredit) | |
| 106 | + { | |
| 107 | + return toAjax(companyCreditService.updateCompanyCredit(companyCredit)); | |
| 108 | + } | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 删除企业失信 | |
| 112 | + */ | |
| 113 | + @PreAuthorize("@ss.hasPermi('Company:credit:remove')") | |
| 114 | + @Log(title = "企业失信", businessType = BusinessType.DELETE) | |
| 115 | + @DeleteMapping("/{ids}") | |
| 116 | + public AjaxResult remove(@PathVariable Long[] ids) | |
| 117 | + { | |
| 118 | + return toAjax(companyCreditService.deleteCompanyCreditByIds(ids)); | |
| 119 | + } | |
| 120 | +} | |
| 0 | 121 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/DriverCreditController.java
0 → 100644
| 1 | +package com.trash.business.controller; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 11 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 12 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | +import com.trash.common.annotation.Log; | |
| 17 | +import com.trash.common.core.controller.BaseController; | |
| 18 | +import com.trash.common.core.domain.AjaxResult; | |
| 19 | +import com.trash.common.enums.BusinessType; | |
| 20 | +import com.trash.business.domain.DriverCredit; | |
| 21 | +import com.trash.business.service.IDriverCreditService; | |
| 22 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 23 | +import com.trash.common.core.page.TableDataInfo; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 驾驶员失信Controller | |
| 27 | + * | |
| 28 | + * @author trash | |
| 29 | + * @date 2023-04-26 | |
| 30 | + */ | |
| 31 | +@RestController | |
| 32 | +@RequestMapping("/driver/credit") | |
| 33 | +public class DriverCreditController extends BaseController | |
| 34 | +{ | |
| 35 | + @Autowired | |
| 36 | + private IDriverCreditService driverCreditService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询驾驶员失信列表 | |
| 40 | + */ | |
| 41 | + @PreAuthorize("@ss.hasPermi('driver:credit:list')") | |
| 42 | + @GetMapping("/list") | |
| 43 | + public TableDataInfo list(DriverCredit driverCredit) | |
| 44 | + { | |
| 45 | + startPage(); | |
| 46 | + List<DriverCredit> list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 47 | + return getDataTable(list); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PreAuthorize("@ss.hasPermi('driver:credit:list')") | |
| 51 | + @GetMapping("/historyCredit") | |
| 52 | + public TableDataInfo historyCredit(DriverCredit driverCredit) | |
| 53 | + { | |
| 54 | + startPage(); | |
| 55 | + List<DriverCredit> list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 56 | + return getDataTable(list); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @GetMapping("/names") | |
| 60 | + public List<String> getNames(DriverCredit driverCredit) | |
| 61 | + { | |
| 62 | + return driverCreditService.getNames(driverCredit); | |
| 63 | + } | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 导出驾驶员失信列表 | |
| 67 | + */ | |
| 68 | + @PreAuthorize("@ss.hasPermi('driver:credit:export')") | |
| 69 | + @Log(title = "驾驶员失信", businessType = BusinessType.EXPORT) | |
| 70 | + @GetMapping("/export") | |
| 71 | + public AjaxResult export(DriverCredit driverCredit) | |
| 72 | + { | |
| 73 | + List<DriverCredit> list = driverCreditService.selectDriverCreditList(driverCredit); | |
| 74 | + ExcelUtil<DriverCredit> util = new ExcelUtil<DriverCredit>(DriverCredit.class); | |
| 75 | + return util.exportExcel(list, "credit"); | |
| 76 | + } | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 获取驾驶员失信详细信息 | |
| 80 | + */ | |
| 81 | + @PreAuthorize("@ss.hasPermi('driver:credit:query')") | |
| 82 | + @GetMapping(value = "/{id}") | |
| 83 | + public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 84 | + { | |
| 85 | + return AjaxResult.success(driverCreditService.selectDriverCreditById(id)); | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 新增驾驶员失信 | |
| 90 | + */ | |
| 91 | + @PreAuthorize("@ss.hasPermi('driver:credit:add')") | |
| 92 | + @Log(title = "驾驶员失信", businessType = BusinessType.INSERT) | |
| 93 | + @PostMapping | |
| 94 | + public AjaxResult add(@RequestBody DriverCredit driverCredit) | |
| 95 | + { | |
| 96 | + return toAjax(driverCreditService.insertDriverCredit(driverCredit)); | |
| 97 | + } | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 修改驾驶员失信 | |
| 101 | + */ | |
| 102 | + @PreAuthorize("@ss.hasPermi('driver:credit:edit')") | |
| 103 | + @Log(title = "驾驶员失信", businessType = BusinessType.UPDATE) | |
| 104 | + @PutMapping | |
| 105 | + public AjaxResult edit(@RequestBody DriverCredit driverCredit) | |
| 106 | + { | |
| 107 | + return toAjax(driverCreditService.updateDriverCredit(driverCredit)); | |
| 108 | + } | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 删除驾驶员失信 | |
| 112 | + */ | |
| 113 | + @PreAuthorize("@ss.hasPermi('driver:credit:remove')") | |
| 114 | + @Log(title = "驾驶员失信", businessType = BusinessType.DELETE) | |
| 115 | + @DeleteMapping("/{ids}") | |
| 116 | + public AjaxResult remove(@PathVariable Long[] ids) | |
| 117 | + { | |
| 118 | + return toAjax(driverCreditService.deleteDriverCreditByIds(ids)); | |
| 119 | + } | |
| 120 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/EarthsitesCreditController.java
0 → 100644
| 1 | +package com.trash.EarthSites.controller; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 11 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 12 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | +import com.trash.common.annotation.Log; | |
| 17 | +import com.trash.common.core.controller.BaseController; | |
| 18 | +import com.trash.common.core.domain.AjaxResult; | |
| 19 | +import com.trash.common.enums.BusinessType; | |
| 20 | +import com.trash.business.domain.EarthsitesCredit; | |
| 21 | +import com.trash.business.service.IEarthsitesCreditService; | |
| 22 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 23 | +import com.trash.common.core.page.TableDataInfo; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 消纳场失信Controller | |
| 27 | + * | |
| 28 | + * @author trash | |
| 29 | + * @date 2023-04-26 | |
| 30 | + */ | |
| 31 | +@RestController | |
| 32 | +@RequestMapping("/EarthSites/credit") | |
| 33 | +public class EarthsitesCreditController extends BaseController | |
| 34 | +{ | |
| 35 | + @Autowired | |
| 36 | + private IEarthsitesCreditService earthsitesCreditService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询消纳场失信列表 | |
| 40 | + */ | |
| 41 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:list')") | |
| 42 | + @GetMapping("/list") | |
| 43 | + public TableDataInfo list(EarthsitesCredit earthsitesCredit) | |
| 44 | + { | |
| 45 | + startPage(); | |
| 46 | + List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 47 | + return getDataTable(list); | |
| 48 | + } | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 导出消纳场失信列表 | |
| 52 | + */ | |
| 53 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:export')") | |
| 54 | + @Log(title = "消纳场失信", businessType = BusinessType.EXPORT) | |
| 55 | + @GetMapping("/export") | |
| 56 | + public AjaxResult export(EarthsitesCredit earthsitesCredit) | |
| 57 | + { | |
| 58 | + List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 59 | + ExcelUtil<EarthsitesCredit> util = new ExcelUtil<EarthsitesCredit>(EarthsitesCredit.class); | |
| 60 | + return util.exportExcel(list, "credit"); | |
| 61 | + } | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 获取消纳场失信详细信息 | |
| 65 | + */ | |
| 66 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:query')") | |
| 67 | + @GetMapping(value = "/{id}") | |
| 68 | + public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 69 | + { | |
| 70 | + return AjaxResult.success(earthsitesCreditService.selectEarthsitesCreditById(id)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 新增消纳场失信 | |
| 75 | + */ | |
| 76 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:add')") | |
| 77 | + @Log(title = "消纳场失信", businessType = BusinessType.INSERT) | |
| 78 | + @PostMapping | |
| 79 | + public AjaxResult add(@RequestBody EarthsitesCredit earthsitesCredit) | |
| 80 | + { | |
| 81 | + return toAjax(earthsitesCreditService.insertEarthsitesCredit(earthsitesCredit)); | |
| 82 | + } | |
| 83 | + | |
| 84 | + /** | |
| 85 | + * 修改消纳场失信 | |
| 86 | + */ | |
| 87 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:edit')") | |
| 88 | + @Log(title = "消纳场失信", businessType = BusinessType.UPDATE) | |
| 89 | + @PutMapping | |
| 90 | + public AjaxResult edit(@RequestBody EarthsitesCredit earthsitesCredit) | |
| 91 | + { | |
| 92 | + return toAjax(earthsitesCreditService.updateEarthsitesCredit(earthsitesCredit)); | |
| 93 | + } | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 删除消纳场失信 | |
| 97 | + */ | |
| 98 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:remove')") | |
| 99 | + @Log(title = "消纳场失信", businessType = BusinessType.DELETE) | |
| 100 | + @DeleteMapping("/{ids}") | |
| 101 | + public AjaxResult remove(@PathVariable Long[] ids) | |
| 102 | + { | |
| 103 | + return toAjax(earthsitesCreditService.deleteEarthsitesCreditByIds(ids)); | |
| 104 | + } | |
| 105 | + | |
| 106 | + @PreAuthorize("@ss.hasPermi('EarthSites:credit:list')") | |
| 107 | + @GetMapping("/historyCredit") | |
| 108 | + public TableDataInfo historyCredit(EarthsitesCredit earthsitesCredit) | |
| 109 | + { | |
| 110 | + startPage(); | |
| 111 | + List<EarthsitesCredit> list = earthsitesCreditService.selectEarthsitesCreditList(earthsitesCredit); | |
| 112 | + return getDataTable(list); | |
| 113 | + } | |
| 114 | + | |
| 115 | + @GetMapping("/names") | |
| 116 | + public List<String> getNames(EarthsitesCredit earthsitesCredit) | |
| 117 | + { | |
| 118 | + return earthsitesCreditService.getNames(earthsitesCredit); | |
| 119 | + } | |
| 120 | +} | |
| 0 | 121 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/controller/TruckCreditController.java
0 → 100644
| 1 | +package com.trash.business.controller; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 10 | +import org.springframework.web.bind.annotation.PutMapping; | |
| 11 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 12 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | +import com.trash.common.annotation.Log; | |
| 17 | +import com.trash.common.core.controller.BaseController; | |
| 18 | +import com.trash.common.core.domain.AjaxResult; | |
| 19 | +import com.trash.common.enums.BusinessType; | |
| 20 | +import com.trash.business.domain.TruckCredit; | |
| 21 | +import com.trash.business.service.ITruckCreditService; | |
| 22 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 23 | +import com.trash.common.core.page.TableDataInfo; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 车辆失信Controller | |
| 27 | + * | |
| 28 | + * @author trash | |
| 29 | + * @date 2023-04-25 | |
| 30 | + */ | |
| 31 | +@RestController | |
| 32 | +@RequestMapping("/truck/credit") | |
| 33 | +public class TruckCreditController extends BaseController | |
| 34 | +{ | |
| 35 | + @Autowired | |
| 36 | + private ITruckCreditService truckCreditService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询车辆失信列表 | |
| 40 | + */ | |
| 41 | + @PreAuthorize("@ss.hasPermi('truck:credit:list')") | |
| 42 | + @GetMapping("/list") | |
| 43 | + public TableDataInfo list(TruckCredit truckCredit) | |
| 44 | + { | |
| 45 | + startPage(); | |
| 46 | + List<TruckCredit> list = truckCreditService.selectTruckCreditList(truckCredit); | |
| 47 | + return getDataTable(list); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PreAuthorize("@ss.hasPermi('business:credit:list')") | |
| 51 | + @GetMapping("/historyCredit") | |
| 52 | + public TableDataInfo historyCredit(TruckCredit truckCredit) | |
| 53 | + { | |
| 54 | + startPage(); | |
| 55 | + List<TruckCredit> list = truckCreditService.selectTruckCreditHistory(truckCredit); | |
| 56 | + return getDataTable(list); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @GetMapping("/names") | |
| 60 | + public List<String> getNames(TruckCredit truckCredit) | |
| 61 | + { | |
| 62 | + return truckCreditService.getNames(truckCredit); | |
| 63 | + } | |
| 64 | + | |
| 65 | + /** | |
| 66 | + * 导出车辆失信列表 | |
| 67 | + */ | |
| 68 | + @PreAuthorize("@ss.hasPermi('truck:credit:export')") | |
| 69 | + @Log(title = "车辆失信", businessType = BusinessType.EXPORT) | |
| 70 | + @GetMapping("/export") | |
| 71 | + public AjaxResult export(TruckCredit truckCredit) | |
| 72 | + { | |
| 73 | + List<TruckCredit> list = truckCreditService.selectTruckCreditList(truckCredit); | |
| 74 | + ExcelUtil<TruckCredit> util = new ExcelUtil<TruckCredit>(TruckCredit.class); | |
| 75 | + return util.exportExcel(list, "credit"); | |
| 76 | + } | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 获取车辆失信详细信息 | |
| 80 | + */ | |
| 81 | + @PreAuthorize("@ss.hasPermi('truck:credit:query')") | |
| 82 | + @GetMapping(value = "/{id}") | |
| 83 | + public AjaxResult getInfo(@PathVariable("id") Long id) | |
| 84 | + { | |
| 85 | + return AjaxResult.success(truckCreditService.selectTruckCreditById(id)); | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 新增车辆失信 | |
| 90 | + */ | |
| 91 | + @PreAuthorize("@ss.hasPermi('truck:credit:add')") | |
| 92 | + @Log(title = "车辆失信", businessType = BusinessType.INSERT) | |
| 93 | + @PostMapping | |
| 94 | + public AjaxResult add(@RequestBody TruckCredit truckCredit) | |
| 95 | + { | |
| 96 | + return toAjax(truckCreditService.insertTruckCredit(truckCredit)); | |
| 97 | + } | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 修改车辆失信 | |
| 101 | + */ | |
| 102 | + @PreAuthorize("@ss.hasPermi('truck:credit:edit')") | |
| 103 | + @Log(title = "车辆失信", businessType = BusinessType.UPDATE) | |
| 104 | + @PutMapping | |
| 105 | + public AjaxResult edit(@RequestBody TruckCredit truckCredit) | |
| 106 | + { | |
| 107 | + return toAjax(truckCreditService.updateTruckCredit(truckCredit)); | |
| 108 | + } | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 删除车辆失信 | |
| 112 | + */ | |
| 113 | + @PreAuthorize("@ss.hasPermi('truck:credit:remove')") | |
| 114 | + @Log(title = "车辆失信", businessType = BusinessType.DELETE) | |
| 115 | + @DeleteMapping("/{ids}") | |
| 116 | + public AjaxResult remove(@PathVariable Long[] ids) | |
| 117 | + { | |
| 118 | + return toAjax(truckCreditService.deleteTruckCreditByIds(ids)); | |
| 119 | + } | |
| 120 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/CompanyCredit.java
0 → 100644
| 1 | +package com.trash.business.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 | + * 企业失信对象 company_credit | |
| 12 | + * | |
| 13 | + * @author trash | |
| 14 | + * @date 2023-04-25 | |
| 15 | + */ | |
| 16 | +public class CompanyCredit extends BaseEntity | |
| 17 | +{ | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** 序号 */ | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + /** 运输企业 */ | |
| 24 | + @Excel(name = "运输企业") | |
| 25 | + private String name; | |
| 26 | + | |
| 27 | + /** 失信时间 */ | |
| 28 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 29 | + @Excel(name = "失信时间", width = 30, dateFormat = "yyyy-MM-dd") | |
| 30 | + private Date time; | |
| 31 | + | |
| 32 | + /** 所属区域 */ | |
| 33 | + @Excel(name = "所属区域") | |
| 34 | + private String place; | |
| 35 | + | |
| 36 | + /** 失信原因 */ | |
| 37 | + @Excel(name = "失信原因") | |
| 38 | + private String reason; | |
| 39 | + | |
| 40 | + /** 0当前 1历史 */ | |
| 41 | + @Excel(name = "0当前 1历史") | |
| 42 | + private Long status; | |
| 43 | + | |
| 44 | + /** 0撤销 1失信 */ | |
| 45 | + @Excel(name = "0撤销 1失信") | |
| 46 | + private Long lostCredit; | |
| 47 | + | |
| 48 | + /** 基础数据ID */ | |
| 49 | + @Excel(name = "基础数据ID") | |
| 50 | + private String objectId; | |
| 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 setName(String name) | |
| 62 | + { | |
| 63 | + this.name = name; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public String getName() | |
| 67 | + { | |
| 68 | + return name; | |
| 69 | + } | |
| 70 | + public void setTime(Date time) | |
| 71 | + { | |
| 72 | + this.time = time; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public Date getTime() | |
| 76 | + { | |
| 77 | + return time; | |
| 78 | + } | |
| 79 | + public void setPlace(String place) | |
| 80 | + { | |
| 81 | + this.place = place; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public String getPlace() | |
| 85 | + { | |
| 86 | + return place; | |
| 87 | + } | |
| 88 | + public void setReason(String reason) | |
| 89 | + { | |
| 90 | + this.reason = reason; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public String getReason() | |
| 94 | + { | |
| 95 | + return reason; | |
| 96 | + } | |
| 97 | + public void setStatus(Long status) | |
| 98 | + { | |
| 99 | + this.status = status; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public Long getStatus() | |
| 103 | + { | |
| 104 | + return status; | |
| 105 | + } | |
| 106 | + public void setLostCredit(Long lostCredit) | |
| 107 | + { | |
| 108 | + this.lostCredit = lostCredit; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public Long getLostCredit() | |
| 112 | + { | |
| 113 | + return lostCredit; | |
| 114 | + } | |
| 115 | + public void setObjectId(String objectId) | |
| 116 | + { | |
| 117 | + this.objectId = objectId; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getObjectId() | |
| 121 | + { | |
| 122 | + return objectId; | |
| 123 | + } | |
| 124 | + | |
| 125 | + @Override | |
| 126 | + public String toString() { | |
| 127 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 128 | + .append("id", getId()) | |
| 129 | + .append("name", getName()) | |
| 130 | + .append("time", getTime()) | |
| 131 | + .append("place", getPlace()) | |
| 132 | + .append("reason", getReason()) | |
| 133 | + .append("status", getStatus()) | |
| 134 | + .append("lostCredit", getLostCredit()) | |
| 135 | + .append("objectId", getObjectId()) | |
| 136 | + .append("createBy", getCreateBy()) | |
| 137 | + .toString(); | |
| 138 | + } | |
| 139 | +} | |
| 0 | 140 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/DriverCredit.java
0 → 100644
| 1 | +package com.trash.business.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 | + * 驾驶员失信对象 driver_credit | |
| 12 | + * | |
| 13 | + * @author trash | |
| 14 | + * @date 2023-04-26 | |
| 15 | + */ | |
| 16 | +public class DriverCredit extends BaseEntity | |
| 17 | +{ | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** 序号 */ | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + /** 运输企业 */ | |
| 24 | + @Excel(name = "运输企业") | |
| 25 | + private String name; | |
| 26 | + | |
| 27 | + /** 证件号码 */ | |
| 28 | + @Excel(name = "证件号码") | |
| 29 | + private String idNumber; | |
| 30 | + | |
| 31 | + /** 失信时间 */ | |
| 32 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 33 | + @Excel(name = "失信时间", width = 30, dateFormat = "yyyy-MM-dd") | |
| 34 | + private Date time; | |
| 35 | + | |
| 36 | + /** 失信原因 */ | |
| 37 | + @Excel(name = "失信原因") | |
| 38 | + private String reason; | |
| 39 | + | |
| 40 | + /** 0当前 1历史 */ | |
| 41 | + @Excel(name = "0当前 1历史") | |
| 42 | + private Long status; | |
| 43 | + | |
| 44 | + /** 0撤销 1失信 */ | |
| 45 | + @Excel(name = "0撤销 1失信") | |
| 46 | + private Long lostCredit; | |
| 47 | + | |
| 48 | + /** 基础数据ID */ | |
| 49 | + @Excel(name = "基础数据ID") | |
| 50 | + private String objectId; | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + public void setId(Long id) | |
| 55 | + { | |
| 56 | + this.id = id; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public Long getId() | |
| 60 | + { | |
| 61 | + return id; | |
| 62 | + } | |
| 63 | + public void setName(String name) | |
| 64 | + { | |
| 65 | + this.name = name; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public String getName() | |
| 69 | + { | |
| 70 | + return name; | |
| 71 | + } | |
| 72 | + public void setIdNumber(String idNumber) | |
| 73 | + { | |
| 74 | + this.idNumber = idNumber; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public String getIdNumber() | |
| 78 | + { | |
| 79 | + return idNumber; | |
| 80 | + } | |
| 81 | + public void setTime(Date time) | |
| 82 | + { | |
| 83 | + this.time = time; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public Date getTime() | |
| 87 | + { | |
| 88 | + return time; | |
| 89 | + } | |
| 90 | + public void setReason(String reason) | |
| 91 | + { | |
| 92 | + this.reason = reason; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public String getReason() | |
| 96 | + { | |
| 97 | + return reason; | |
| 98 | + } | |
| 99 | + public void setStatus(Long status) | |
| 100 | + { | |
| 101 | + this.status = status; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public Long getStatus() | |
| 105 | + { | |
| 106 | + return status; | |
| 107 | + } | |
| 108 | + public void setLostCredit(Long lostCredit) | |
| 109 | + { | |
| 110 | + this.lostCredit = lostCredit; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public Long getLostCredit() | |
| 114 | + { | |
| 115 | + return lostCredit; | |
| 116 | + } | |
| 117 | + public void setObjectId(String objectId) | |
| 118 | + { | |
| 119 | + this.objectId = objectId; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public String getObjectId() | |
| 123 | + { | |
| 124 | + return objectId; | |
| 125 | + } | |
| 126 | + | |
| 127 | + @Override | |
| 128 | + public String toString() { | |
| 129 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 130 | + .append("id", getId()) | |
| 131 | + .append("name", getName()) | |
| 132 | + .append("idNumber", getIdNumber()) | |
| 133 | + .append("time", getTime()) | |
| 134 | + .append("reason", getReason()) | |
| 135 | + .append("status", getStatus()) | |
| 136 | + .append("lostCredit", getLostCredit()) | |
| 137 | + .append("objectId", getObjectId()) | |
| 138 | + .append("createBy", getCreateBy()) | |
| 139 | + .toString(); | |
| 140 | + } | |
| 141 | +} | |
| 0 | 142 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/EarthsitesCredit.java
0 → 100644
| 1 | +package com.trash.business.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 | + * 消纳场失信对象 earthsites_credit | |
| 12 | + * | |
| 13 | + * @author trash | |
| 14 | + * @date 2023-04-26 | |
| 15 | + */ | |
| 16 | +public class EarthsitesCredit extends BaseEntity | |
| 17 | +{ | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** 序号 */ | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + /** 消纳场名称 */ | |
| 24 | + @Excel(name = "消纳场名称") | |
| 25 | + private String name; | |
| 26 | + | |
| 27 | + /** 消纳场类型 */ | |
| 28 | + @Excel(name = "消纳场类型") | |
| 29 | + private String type; | |
| 30 | + | |
| 31 | + /** 失信时间 */ | |
| 32 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 33 | + @Excel(name = "失信时间", width = 30, dateFormat = "yyyy-MM-dd") | |
| 34 | + private Date time; | |
| 35 | + | |
| 36 | + /** 所属区域 */ | |
| 37 | + @Excel(name = "所属区域") | |
| 38 | + private String place; | |
| 39 | + | |
| 40 | + /** 失信原因 */ | |
| 41 | + @Excel(name = "失信原因") | |
| 42 | + private String reason; | |
| 43 | + | |
| 44 | + /** 0当前 1历史 */ | |
| 45 | + @Excel(name = "0当前 1历史") | |
| 46 | + private Long status; | |
| 47 | + | |
| 48 | + /** 0撤销 1失信 */ | |
| 49 | + @Excel(name = "0撤销 1失信") | |
| 50 | + private Long lostCredit; | |
| 51 | + | |
| 52 | + /** 基础数据ID */ | |
| 53 | + @Excel(name = "基础数据ID") | |
| 54 | + private String objectId; | |
| 55 | + | |
| 56 | + public void setId(Long id) | |
| 57 | + { | |
| 58 | + this.id = id; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public Long getId() | |
| 62 | + { | |
| 63 | + return id; | |
| 64 | + } | |
| 65 | + public void setName(String name) | |
| 66 | + { | |
| 67 | + this.name = name; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public String getName() | |
| 71 | + { | |
| 72 | + return name; | |
| 73 | + } | |
| 74 | + public void setType(String type) | |
| 75 | + { | |
| 76 | + this.type = type; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getType() | |
| 80 | + { | |
| 81 | + return type; | |
| 82 | + } | |
| 83 | + public void setTime(Date time) | |
| 84 | + { | |
| 85 | + this.time = time; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public Date getTime() | |
| 89 | + { | |
| 90 | + return time; | |
| 91 | + } | |
| 92 | + public void setPlace(String place) | |
| 93 | + { | |
| 94 | + this.place = place; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getPlace() | |
| 98 | + { | |
| 99 | + return place; | |
| 100 | + } | |
| 101 | + public void setReason(String reason) | |
| 102 | + { | |
| 103 | + this.reason = reason; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public String getReason() | |
| 107 | + { | |
| 108 | + return reason; | |
| 109 | + } | |
| 110 | + public void setStatus(Long status) | |
| 111 | + { | |
| 112 | + this.status = status; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public Long getStatus() | |
| 116 | + { | |
| 117 | + return status; | |
| 118 | + } | |
| 119 | + public void setLostCredit(Long lostCredit) | |
| 120 | + { | |
| 121 | + this.lostCredit = lostCredit; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public Long getLostCredit() | |
| 125 | + { | |
| 126 | + return lostCredit; | |
| 127 | + } | |
| 128 | + public void setObjectId(String objectId) | |
| 129 | + { | |
| 130 | + this.objectId = objectId; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public String getObjectId() | |
| 134 | + { | |
| 135 | + return objectId; | |
| 136 | + } | |
| 137 | + | |
| 138 | + @Override | |
| 139 | + public String toString() { | |
| 140 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 141 | + .append("id", getId()) | |
| 142 | + .append("name", getName()) | |
| 143 | + .append("type", getType()) | |
| 144 | + .append("time", getTime()) | |
| 145 | + .append("place", getPlace()) | |
| 146 | + .append("reason", getReason()) | |
| 147 | + .append("status", getStatus()) | |
| 148 | + .append("lostCredit", getLostCredit()) | |
| 149 | + .append("objectId", getObjectId()) | |
| 150 | + .toString(); | |
| 151 | + } | |
| 152 | +} | |
| 0 | 153 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/domain/TruckCredit.java
0 → 100644
| 1 | +package com.trash.business.domain; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import org.apache.commons.lang3.builder.ToStringBuilder; | |
| 5 | +import org.apache.commons.lang3.builder.ToStringStyle; | |
| 6 | +import com.trash.common.annotation.Excel; | |
| 7 | +import com.trash.common.core.domain.BaseEntity; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 车辆失信对象 truck_credit | |
| 13 | + * | |
| 14 | + * @author trash | |
| 15 | + * @date 2023-04-25 | |
| 16 | + */ | |
| 17 | +public class TruckCredit extends BaseEntity | |
| 18 | +{ | |
| 19 | + private static final long serialVersionUID = 1L; | |
| 20 | + | |
| 21 | + /** 序号 */ | |
| 22 | + private Long id; | |
| 23 | + | |
| 24 | + /** 运输企业编号 */ | |
| 25 | + @Excel(name = "运输企业编号") | |
| 26 | + private String companyId; | |
| 27 | + | |
| 28 | + /** 车牌号码 */ | |
| 29 | + @Excel(name = "车牌号码") | |
| 30 | + private String licensePlate; | |
| 31 | + | |
| 32 | + /** 失信原因 */ | |
| 33 | + @Excel(name = "失信原因") | |
| 34 | + private String reason; | |
| 35 | + | |
| 36 | + /** 0当前 1历史 */ | |
| 37 | + @Excel(name = "0当前 1历史") | |
| 38 | + private Long status; | |
| 39 | + | |
| 40 | + /** 0撤销 1失信 */ | |
| 41 | + @Excel(name = "0撤销 1失信") | |
| 42 | + private Long lostCredit; | |
| 43 | + | |
| 44 | + /** 基础数据ID */ | |
| 45 | + @Excel(name = "基础数据ID") | |
| 46 | + private String objectId; | |
| 47 | + | |
| 48 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 49 | + @Excel(name = "${失信时间}", readConverterExp = "$column.readConverterExp()") | |
| 50 | + private Date time; | |
| 51 | + | |
| 52 | + | |
| 53 | + public String getLicensePlate() { | |
| 54 | + return licensePlate; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setLicensePlate(String licensePlate) { | |
| 58 | + this.licensePlate = licensePlate; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public Date getTime() { | |
| 62 | + return time; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setTime(Date time) { | |
| 66 | + this.time = time; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setId(Long id) | |
| 70 | + { | |
| 71 | + this.id = id; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public Long getId() | |
| 75 | + { | |
| 76 | + return id; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setCompanyId(String companyId) | |
| 80 | + { | |
| 81 | + this.companyId = companyId; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public String getCompanyId() | |
| 85 | + { | |
| 86 | + return companyId; | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | + public void setReason(String reason) | |
| 91 | + { | |
| 92 | + this.reason = reason; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public String getReason() | |
| 96 | + { | |
| 97 | + return reason; | |
| 98 | + } | |
| 99 | + public void setStatus(Long status) | |
| 100 | + { | |
| 101 | + this.status = status; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public Long getStatus() | |
| 105 | + { | |
| 106 | + return status; | |
| 107 | + } | |
| 108 | + public void setLostCredit(Long lostCredit) | |
| 109 | + { | |
| 110 | + this.lostCredit = lostCredit; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public Long getLostCredit() | |
| 114 | + { | |
| 115 | + return lostCredit; | |
| 116 | + } | |
| 117 | + public void setObjectId(String objectId) | |
| 118 | + { | |
| 119 | + this.objectId = objectId; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public String getObjectId() | |
| 123 | + { | |
| 124 | + return objectId; | |
| 125 | + } | |
| 126 | + | |
| 127 | + @Override | |
| 128 | + public String toString() { | |
| 129 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |
| 130 | + .append("id", getId()) | |
| 131 | + .append("companyId", getCompanyId()) | |
| 132 | + .append("licensePlate", getLicensePlate()) | |
| 133 | + .append("reason", getReason()) | |
| 134 | + .append("status", getStatus()) | |
| 135 | + .append("lostCredit", getLostCredit()) | |
| 136 | + .append("objectId", getObjectId()) | |
| 137 | + .append("createBy", getCreateBy()) | |
| 138 | + .append("time",getTime()) | |
| 139 | + .toString(); | |
| 140 | + } | |
| 141 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/CompanyCreditMapper.java
0 → 100644
| 1 | +package com.trash.business.mapper; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.CompanyCredit; | |
| 4 | +import com.trash.business.domain.ConstructionCredit; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface CompanyCreditMapper { | |
| 9 | + /** | |
| 10 | + * 查询企业失信 | |
| 11 | + * | |
| 12 | + * @param id 企业失信ID | |
| 13 | + * @return 企业失信 | |
| 14 | + */ | |
| 15 | + public CompanyCredit selectCompanyCreditById(Long id); | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 查询企业失信列表 | |
| 19 | + * | |
| 20 | + * @param companyCredit 企业失信 | |
| 21 | + * @return 企业失信集合 | |
| 22 | + */ | |
| 23 | + public List<CompanyCredit> selectCompanyCreditList(CompanyCredit companyCredit); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 新增企业失信 | |
| 27 | + * | |
| 28 | + * @param companyCredit 企业失信 | |
| 29 | + * @return 结果 | |
| 30 | + */ | |
| 31 | + public int insertCompanyCredit(CompanyCredit companyCredit); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 修改企业失信 | |
| 35 | + * | |
| 36 | + * @param companyCredit 企业失信 | |
| 37 | + * @return 结果 | |
| 38 | + */ | |
| 39 | + public int updateCompanyCredit(CompanyCredit companyCredit); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 删除企业失信 | |
| 43 | + * | |
| 44 | + * @param id 企业失信ID | |
| 45 | + * @return 结果 | |
| 46 | + */ | |
| 47 | + public int deleteCompanyCreditById(Long id); | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 批量删除企业失信 | |
| 51 | + * | |
| 52 | + * @param ids 需要删除的数据ID | |
| 53 | + * @return 结果 | |
| 54 | + */ | |
| 55 | + public int deleteCompanyCreditByIds(Long[] ids); | |
| 56 | + | |
| 57 | + public List<String> getNames(CompanyCredit companyCredit); | |
| 58 | + | |
| 59 | + public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit); | |
| 60 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/DriverCreditMapper.java
0 → 100644
| 1 | +package com.trash.business.mapper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.trash.business.domain.DriverCredit; | |
| 5 | +import com.trash.business.domain.TruckCredit; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 驾驶员失信Mapper接口 | |
| 9 | + * | |
| 10 | + * @author trash | |
| 11 | + * @date 2023-04-26 | |
| 12 | + */ | |
| 13 | +public interface DriverCreditMapper | |
| 14 | +{ | |
| 15 | + /** | |
| 16 | + * 查询驾驶员失信 | |
| 17 | + * | |
| 18 | + * @param id 驾驶员失信ID | |
| 19 | + * @return 驾驶员失信 | |
| 20 | + */ | |
| 21 | + public DriverCredit selectDriverCreditById(Long id); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 查询驾驶员失信列表 | |
| 25 | + * | |
| 26 | + * @param driverCredit 驾驶员失信 | |
| 27 | + * @return 驾驶员失信集合 | |
| 28 | + */ | |
| 29 | + public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit); | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 新增驾驶员失信 | |
| 33 | + * | |
| 34 | + * @param driverCredit 驾驶员失信 | |
| 35 | + * @return 结果 | |
| 36 | + */ | |
| 37 | + public int insertDriverCredit(DriverCredit driverCredit); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 修改驾驶员失信 | |
| 41 | + * | |
| 42 | + * @param driverCredit 驾驶员失信 | |
| 43 | + * @return 结果 | |
| 44 | + */ | |
| 45 | + public int updateDriverCredit(DriverCredit driverCredit); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 删除驾驶员失信 | |
| 49 | + * | |
| 50 | + * @param id 驾驶员失信ID | |
| 51 | + * @return 结果 | |
| 52 | + */ | |
| 53 | + public int deleteDriverCreditById(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 批量删除驾驶员失信 | |
| 57 | + * | |
| 58 | + * @param ids 需要删除的数据ID | |
| 59 | + * @return 结果 | |
| 60 | + */ | |
| 61 | + public int deleteDriverCreditByIds(Long[] ids); | |
| 62 | + | |
| 63 | + public List<String> getNames(DriverCredit driverCredit); | |
| 64 | + | |
| 65 | + public List<DriverCredit> selectDriverCreditHistory(DriverCredit driverCredit); | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/EarthsitesCreditMapper.java
0 → 100644
| 1 | +package com.trash.business.mapper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import com.trash.business.domain.EarthsitesCredit; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 消纳场失信Mapper接口 | |
| 10 | + * | |
| 11 | + * @author trash | |
| 12 | + * @date 2023-04-26 | |
| 13 | + */ | |
| 14 | +public interface EarthsitesCreditMapper | |
| 15 | +{ | |
| 16 | + /** | |
| 17 | + * 查询消纳场失信 | |
| 18 | + * | |
| 19 | + * @param id 消纳场失信ID | |
| 20 | + * @return 消纳场失信 | |
| 21 | + */ | |
| 22 | + public EarthsitesCredit selectEarthsitesCreditById(Long id); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 查询消纳场失信列表 | |
| 26 | + * | |
| 27 | + * @param earthsitesCredit 消纳场失信 | |
| 28 | + * @return 消纳场失信集合 | |
| 29 | + */ | |
| 30 | + public List<EarthsitesCredit> selectEarthsitesCreditList(EarthsitesCredit earthsitesCredit); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 新增消纳场失信 | |
| 34 | + * | |
| 35 | + * @param earthsitesCredit 消纳场失信 | |
| 36 | + * @return 结果 | |
| 37 | + */ | |
| 38 | + public int insertEarthsitesCredit(EarthsitesCredit earthsitesCredit); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 修改消纳场失信 | |
| 42 | + * | |
| 43 | + * @param earthsitesCredit 消纳场失信 | |
| 44 | + * @return 结果 | |
| 45 | + */ | |
| 46 | + public int updateEarthsitesCredit(EarthsitesCredit earthsitesCredit); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 删除消纳场失信 | |
| 50 | + * | |
| 51 | + * @param id 消纳场失信ID | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + public int deleteEarthsitesCreditById(Long id); | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 批量删除消纳场失信 | |
| 58 | + * | |
| 59 | + * @param ids 需要删除的数据ID | |
| 60 | + * @return 结果 | |
| 61 | + */ | |
| 62 | + public int deleteEarthsitesCreditByIds(Long[] ids); | |
| 63 | + | |
| 64 | + public List<String> getNames(EarthsitesCredit earthsitesCredit); | |
| 65 | + | |
| 66 | + public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit); | |
| 67 | +} | |
| 0 | 68 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/mapper/TruckCreditMapper.java
0 → 100644
| 1 | +package com.trash.business.mapper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | + | |
| 6 | +import com.trash.business.domain.TruckCredit; | |
| 7 | +/** | |
| 8 | + * 车辆失信Mapper接口 | |
| 9 | + * | |
| 10 | + * @author trash | |
| 11 | + * @date 2023-04-25 | |
| 12 | + */ | |
| 13 | +public interface TruckCreditMapper | |
| 14 | +{ | |
| 15 | + /** | |
| 16 | + * 查询车辆失信 | |
| 17 | + * | |
| 18 | + * @param id 车辆失信ID | |
| 19 | + * @return 车辆失信 | |
| 20 | + */ | |
| 21 | + public TruckCredit selectTruckCreditById(Long id); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 查询车辆失信列表 | |
| 25 | + * | |
| 26 | + * @param truckCredit 车辆失信 | |
| 27 | + * @return 车辆失信集合 | |
| 28 | + */ | |
| 29 | + public List<TruckCredit> selectTruckCreditList(TruckCredit truckCredit); | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 新增车辆失信 | |
| 33 | + * | |
| 34 | + * @param truckCredit 车辆失信 | |
| 35 | + * @return 结果 | |
| 36 | + */ | |
| 37 | + public int insertTruckCredit(TruckCredit truckCredit); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 修改车辆失信 | |
| 41 | + * | |
| 42 | + * @param truckCredit 车辆失信 | |
| 43 | + * @return 结果 | |
| 44 | + */ | |
| 45 | + public int updateTruckCredit(TruckCredit truckCredit); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 删除车辆失信 | |
| 49 | + * | |
| 50 | + * @param id 车辆失信ID | |
| 51 | + * @return 结果 | |
| 52 | + */ | |
| 53 | + public int deleteTruckCreditById(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 批量删除车辆失信 | |
| 57 | + * | |
| 58 | + * @param ids 需要删除的数据ID | |
| 59 | + * @return 结果 | |
| 60 | + */ | |
| 61 | + public int deleteTruckCreditByIds(Long[] ids); | |
| 62 | + | |
| 63 | + public List<String> getNames(TruckCredit truckCredit); | |
| 64 | + | |
| 65 | + public List<TruckCredit> selectTruckCreditHistory(TruckCredit truckCredit); | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ICompanyCreditService.java
0 → 100644
| 1 | +package com.trash.business.service; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.CompanyCredit; | |
| 4 | +import com.trash.business.domain.ConstructionCredit; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface ICompanyCreditService { | |
| 9 | + /** | |
| 10 | + * 查询企业失信 | |
| 11 | + * | |
| 12 | + * @param id 企业失信ID | |
| 13 | + * @return 企业失信 | |
| 14 | + */ | |
| 15 | + public CompanyCredit selectCompanyCreditById(Long id); | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 查询企业失信列表 | |
| 19 | + * | |
| 20 | + * @param companyCredit 企业失信 | |
| 21 | + * @return 企业失信集合 | |
| 22 | + */ | |
| 23 | + public List<CompanyCredit> selectCompanyCreditList(CompanyCredit companyCredit); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 新增企业失信 | |
| 27 | + * | |
| 28 | + * @param companyCredit 企业失信 | |
| 29 | + * @return 结果 | |
| 30 | + */ | |
| 31 | + public int insertCompanyCredit(CompanyCredit companyCredit); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 修改企业失信 | |
| 35 | + * | |
| 36 | + * @param companyCredit 企业失信 | |
| 37 | + * @return 结果 | |
| 38 | + */ | |
| 39 | + public int updateCompanyCredit(CompanyCredit companyCredit); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 删除企业失信 | |
| 43 | + * | |
| 44 | + * @param id 企业失信ID | |
| 45 | + * @return 结果 | |
| 46 | + */ | |
| 47 | + public int deleteCompanyCreditById(Long id); | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 批量删除企业失信 | |
| 51 | + * | |
| 52 | + * @param ids 需要删除的数据ID | |
| 53 | + * @return 结果 | |
| 54 | + */ | |
| 55 | + public int deleteCompanyCreditByIds(Long[] ids); | |
| 56 | + | |
| 57 | + public List<String> getNames(CompanyCredit companyCredit); | |
| 58 | + | |
| 59 | + public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit); | |
| 60 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/IConstructionCreditService.java
trash-workFlow/src/main/java/com/trash/business/service/IDriverCreditService.java
0 → 100644
| 1 | +package com.trash.business.service; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.DriverCredit; | |
| 4 | + | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +public interface IDriverCreditService { | |
| 8 | + /** | |
| 9 | + * 查询驾驶员失信 | |
| 10 | + * | |
| 11 | + * @param id 驾驶员失信ID | |
| 12 | + * @return 驾驶员失信 | |
| 13 | + */ | |
| 14 | + public DriverCredit selectDriverCreditById(Long id); | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询驾驶员失信列表 | |
| 18 | + * | |
| 19 | + * @param driverCredit 驾驶员失信 | |
| 20 | + * @return 驾驶员失信集合 | |
| 21 | + */ | |
| 22 | + public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 新增驾驶员失信 | |
| 26 | + * | |
| 27 | + * @param driverCredit 驾驶员失信 | |
| 28 | + * @return 结果 | |
| 29 | + */ | |
| 30 | + public int insertDriverCredit(DriverCredit driverCredit); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 修改驾驶员失信 | |
| 34 | + * | |
| 35 | + * @param driverCredit 驾驶员失信 | |
| 36 | + * @return 结果 | |
| 37 | + */ | |
| 38 | + public int updateDriverCredit(DriverCredit driverCredit); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 删除驾驶员失信 | |
| 42 | + * | |
| 43 | + * @param id 驾驶员失信ID | |
| 44 | + * @return 结果 | |
| 45 | + */ | |
| 46 | + public int deleteDriverCreditById(Long id); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 批量删除驾驶员失信 | |
| 50 | + * | |
| 51 | + * @param ids 需要删除的数据ID | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + public int deleteDriverCreditByIds(Long[] ids); | |
| 55 | + | |
| 56 | + public List<String> getNames(DriverCredit driverCredit); | |
| 57 | + | |
| 58 | + public List<DriverCredit> selectDriverCreditHistory(DriverCredit driverCredit); | |
| 59 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/IEarthsitesCreditService.java
0 → 100644
| 1 | +package com.trash.business.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.trash.business.domain.ConstructionCredit; | |
| 6 | +import com.trash.business.domain.EarthsitesCredit; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 消纳场失信Service接口 | |
| 10 | + * | |
| 11 | + * @author trash | |
| 12 | + * @date 2023-04-26 | |
| 13 | + */ | |
| 14 | +public interface IEarthsitesCreditService | |
| 15 | +{ | |
| 16 | + /** | |
| 17 | + * 查询消纳场失信 | |
| 18 | + * | |
| 19 | + * @param id 消纳场失信ID | |
| 20 | + * @return 消纳场失信 | |
| 21 | + */ | |
| 22 | + public EarthsitesCredit selectEarthsitesCreditById(Long id); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 查询消纳场失信列表 | |
| 26 | + * | |
| 27 | + * @param earthsitesCredit 消纳场失信 | |
| 28 | + * @return 消纳场失信集合 | |
| 29 | + */ | |
| 30 | + public List<EarthsitesCredit> selectEarthsitesCreditList(EarthsitesCredit earthsitesCredit); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 新增消纳场失信 | |
| 34 | + * | |
| 35 | + * @param earthsitesCredit 消纳场失信 | |
| 36 | + * @return 结果 | |
| 37 | + */ | |
| 38 | + public int insertEarthsitesCredit(EarthsitesCredit earthsitesCredit); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 修改消纳场失信 | |
| 42 | + * | |
| 43 | + * @param earthsitesCredit 消纳场失信 | |
| 44 | + * @return 结果 | |
| 45 | + */ | |
| 46 | + public int updateEarthsitesCredit(EarthsitesCredit earthsitesCredit); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 批量删除消纳场失信 | |
| 50 | + * | |
| 51 | + * @param ids 需要删除的消纳场失信ID | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + public int deleteEarthsitesCreditByIds(Long[] ids); | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 删除消纳场失信信息 | |
| 58 | + * | |
| 59 | + * @param id 消纳场失信ID | |
| 60 | + * @return 结果 | |
| 61 | + */ | |
| 62 | + public int deleteEarthsitesCreditById(Long id); | |
| 63 | + | |
| 64 | + public List<String> getNames(EarthsitesCredit earthsitesCredit); | |
| 65 | + | |
| 66 | + public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit); | |
| 67 | +} | |
| 0 | 68 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/ITruckCreditService.java
0 → 100644
| 1 | +package com.trash.business.service; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.TruckCredit; | |
| 4 | + | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +public interface ITruckCreditService { | |
| 8 | + /** | |
| 9 | + * 查询车辆失信 | |
| 10 | + * | |
| 11 | + * @param id 车辆失信ID | |
| 12 | + * @return 车辆失信 | |
| 13 | + */ | |
| 14 | + public TruckCredit selectTruckCreditById(Long id); | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询车辆失信列表 | |
| 18 | + * | |
| 19 | + * @param truckCredit 车辆失信 | |
| 20 | + * @return 车辆失信集合 | |
| 21 | + */ | |
| 22 | + public List<TruckCredit> selectTruckCreditList(TruckCredit truckCredit); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 新增车辆失信 | |
| 26 | + * | |
| 27 | + * @param truckCredit 车辆失信 | |
| 28 | + * @return 结果 | |
| 29 | + */ | |
| 30 | + public int insertTruckCredit(TruckCredit truckCredit); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 修改车辆失信 | |
| 34 | + * | |
| 35 | + * @param truckCredit 车辆失信 | |
| 36 | + * @return 结果 | |
| 37 | + */ | |
| 38 | + public int updateTruckCredit(TruckCredit truckCredit); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 删除车辆失信 | |
| 42 | + * | |
| 43 | + * @param id 车辆失信ID | |
| 44 | + * @return 结果 | |
| 45 | + */ | |
| 46 | + public int deleteTruckCreditById(Long id); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 批量删除车辆失信 | |
| 50 | + * | |
| 51 | + * @param ids 需要删除的数据ID | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + public int deleteTruckCreditByIds(Long[] ids); | |
| 55 | + | |
| 56 | + public List<String> getNames(TruckCredit truckCredit); | |
| 57 | + | |
| 58 | + public List<TruckCredit> selectTruckCreditHistory(TruckCredit truckCredit); | |
| 59 | +} | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/CompanyCreditServiceImpl.java
0 → 100644
| 1 | +package com.trash.business.service.impl; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.CompanyCredit; | |
| 4 | +import com.trash.business.mapper.CompanyCreditMapper; | |
| 5 | +import com.trash.business.service.ICompanyCreditService; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import org.springframework.transaction.annotation.Transactional; | |
| 9 | + | |
| 10 | +import java.util.Date; | |
| 11 | +import java.util.List; | |
| 12 | +/** | |
| 13 | + * 企业失信Service业务层处理 | |
| 14 | + * | |
| 15 | + * @author trash | |
| 16 | + * @date 2023-04-25 | |
| 17 | + */ | |
| 18 | +@Service | |
| 19 | +public class CompanyCreditServiceImpl implements ICompanyCreditService | |
| 20 | +{ | |
| 21 | + @Autowired | |
| 22 | + private CompanyCreditMapper companyCreditMapper; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 查询企业失信 | |
| 26 | + * | |
| 27 | + * @param id 企业失信ID | |
| 28 | + * @return 企业失信 | |
| 29 | + */ | |
| 30 | + @Override | |
| 31 | + public CompanyCredit selectCompanyCreditById(Long id) | |
| 32 | + { | |
| 33 | + return companyCreditMapper.selectCompanyCreditById(id); | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 查询企业失信列表 | |
| 38 | + * | |
| 39 | + * @param companyCredit 企业失信 | |
| 40 | + * @return 企业失信 | |
| 41 | + */ | |
| 42 | + @Override | |
| 43 | + public List<CompanyCredit> selectCompanyCreditList(CompanyCredit companyCredit) | |
| 44 | + { | |
| 45 | + return companyCreditMapper.selectCompanyCreditList(companyCredit); | |
| 46 | + } | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 新增企业失信 | |
| 50 | + * | |
| 51 | + * @param companyCredit 企业失信 | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + @Override | |
| 55 | + public int insertCompanyCredit(CompanyCredit companyCredit) | |
| 56 | + { | |
| 57 | + companyCredit.setTime(new Date()); | |
| 58 | + | |
| 59 | + int i = companyCreditMapper.insertCompanyCredit(companyCredit); | |
| 60 | + | |
| 61 | + sentDataToRemoteServer(companyCredit); | |
| 62 | + | |
| 63 | + return i; | |
| 64 | + } | |
| 65 | + | |
| 66 | + | |
| 67 | + private void sentDataToRemoteServer(CompanyCredit companyCredit) { | |
| 68 | + | |
| 69 | + System.out.println("sendData!" + companyCredit.getObjectId() + "status" + companyCredit.getStatus() ); | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 修改企业失信 | |
| 75 | + * | |
| 76 | + * @param companyCredit 企业失信 | |
| 77 | + * @return 结果 | |
| 78 | + */ | |
| 79 | + @Override | |
| 80 | + @Transactional | |
| 81 | + public int updateCompanyCredit(CompanyCredit companyCredit) | |
| 82 | + { | |
| 83 | + | |
| 84 | + CompanyCredit cc = companyCreditMapper.selectCompanyCreditById(companyCredit.getId()); | |
| 85 | + | |
| 86 | + cc.setStatus(1L); | |
| 87 | + | |
| 88 | + try { | |
| 89 | + companyCreditMapper.updateCompanyCredit(cc); | |
| 90 | + | |
| 91 | + cc.setReason(companyCredit.getReason()); | |
| 92 | + cc.setLostCredit(0L); | |
| 93 | + | |
| 94 | + return insertCompanyCredit(cc); | |
| 95 | + | |
| 96 | + } catch (Exception e) { | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | + return 0; | |
| 101 | + } | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * 批量删除企业失信 | |
| 105 | + * | |
| 106 | + * @param ids 需要删除的企业失信ID | |
| 107 | + * @return 结果 | |
| 108 | + */ | |
| 109 | + @Override | |
| 110 | + public int deleteCompanyCreditByIds(Long[] ids) | |
| 111 | + { | |
| 112 | + return companyCreditMapper.deleteCompanyCreditByIds(ids); | |
| 113 | + } | |
| 114 | + | |
| 115 | + public List<String> getNames(CompanyCredit companyCredit){ | |
| 116 | + return companyCreditMapper.getNames(companyCredit); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @Override | |
| 120 | + public List<CompanyCredit> selectCompanyCreditHistory(CompanyCredit companyCredit) | |
| 121 | + { | |
| 122 | + return companyCreditMapper.selectCompanyCreditHistory(companyCredit); | |
| 123 | + } | |
| 124 | + | |
| 125 | + /** | |
| 126 | + * 删除企业失信信息 | |
| 127 | + * | |
| 128 | + * @param id 企业失信ID | |
| 129 | + * @return 结果 | |
| 130 | + */ | |
| 131 | + @Override | |
| 132 | + public int deleteCompanyCreditById(Long id) | |
| 133 | + { | |
| 134 | + return companyCreditMapper.deleteCompanyCreditById(id); | |
| 135 | + } | |
| 136 | +} | |
| 0 | 137 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/DriverCreditServiceImpl.java
0 → 100644
| 1 | +package com.trash.business.service.impl; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import com.trash.business.domain.TruckCredit; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | +import com.trash.business.mapper.DriverCreditMapper; | |
| 10 | +import com.trash.business.domain.DriverCredit; | |
| 11 | +import com.trash.business.service.IDriverCreditService; | |
| 12 | +import org.springframework.transaction.annotation.Transactional; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 驾驶员失信Service业务层处理 | |
| 16 | + * | |
| 17 | + * @author trash | |
| 18 | + * @date 2023-04-26 | |
| 19 | + */ | |
| 20 | +@Service | |
| 21 | +public class DriverCreditServiceImpl implements IDriverCreditService | |
| 22 | +{ | |
| 23 | + @Autowired | |
| 24 | + private DriverCreditMapper driverCreditMapper; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 查询驾驶员失信 | |
| 28 | + * | |
| 29 | + * @param id 驾驶员失信ID | |
| 30 | + * @return 驾驶员失信 | |
| 31 | + */ | |
| 32 | + @Override | |
| 33 | + public DriverCredit selectDriverCreditById(Long id) | |
| 34 | + { | |
| 35 | + return driverCreditMapper.selectDriverCreditById(id); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询驾驶员失信列表 | |
| 40 | + * | |
| 41 | + * @param driverCredit 驾驶员失信 | |
| 42 | + * @return 驾驶员失信 | |
| 43 | + */ | |
| 44 | + @Override | |
| 45 | + public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit) | |
| 46 | + { | |
| 47 | + return driverCreditMapper.selectDriverCreditList(driverCredit); | |
| 48 | + } | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 新增驾驶员失信 | |
| 52 | + * | |
| 53 | + * @param driverCredit 驾驶员失信 | |
| 54 | + * @return 结果 | |
| 55 | + */ | |
| 56 | + @Override | |
| 57 | + public int insertDriverCredit(DriverCredit driverCredit) | |
| 58 | + { | |
| 59 | + driverCredit.setTime(new Date()); | |
| 60 | + | |
| 61 | + int i = driverCreditMapper.insertDriverCredit(driverCredit); | |
| 62 | + | |
| 63 | + sentDataToRemoteServer(driverCredit); | |
| 64 | + | |
| 65 | + return i; | |
| 66 | + } | |
| 67 | + | |
| 68 | + private void sentDataToRemoteServer(DriverCredit driverCredit) { | |
| 69 | + | |
| 70 | + System.out.println("sendData!" + driverCredit.getObjectId() + "status" + driverCredit.getStatus() ); | |
| 71 | + | |
| 72 | + } | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 修改驾驶员失信 | |
| 76 | + * | |
| 77 | + * @param driverCredit 驾驶员失信 | |
| 78 | + * @return 结果 | |
| 79 | + */ | |
| 80 | + @Override | |
| 81 | + @Transactional | |
| 82 | + public int updateDriverCredit(DriverCredit driverCredit) | |
| 83 | + { | |
| 84 | + DriverCredit cc = driverCreditMapper.selectDriverCreditById(driverCredit.getId()); | |
| 85 | + | |
| 86 | + cc.setStatus(1L); | |
| 87 | + | |
| 88 | + try { | |
| 89 | + driverCreditMapper.updateDriverCredit(cc); | |
| 90 | + | |
| 91 | + cc.setReason(driverCredit.getReason()); | |
| 92 | + cc.setLostCredit(0L); | |
| 93 | + | |
| 94 | + return insertDriverCredit(cc); | |
| 95 | + | |
| 96 | + } catch (Exception e) { | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | + return 0; | |
| 101 | + } | |
| 102 | + | |
| 103 | + @Override | |
| 104 | + public List<DriverCredit> selectDriverCreditHistory(DriverCredit driverCredit) | |
| 105 | + { | |
| 106 | + return driverCreditMapper.selectDriverCreditHistory(driverCredit); | |
| 107 | + } | |
| 108 | + | |
| 109 | + /** | |
| 110 | + * 批量删除驾驶员失信 | |
| 111 | + * | |
| 112 | + * @param ids 需要删除的驾驶员失信ID | |
| 113 | + * @return 结果 | |
| 114 | + */ | |
| 115 | + @Override | |
| 116 | + public int deleteDriverCreditByIds(Long[] ids) | |
| 117 | + { | |
| 118 | + return driverCreditMapper.deleteDriverCreditByIds(ids); | |
| 119 | + } | |
| 120 | + | |
| 121 | + public List<String> getNames(DriverCredit driverCredit) { | |
| 122 | + return driverCreditMapper.getNames(driverCredit); | |
| 123 | + } | |
| 124 | + | |
| 125 | + /** | |
| 126 | + * 删除驾驶员失信信息 | |
| 127 | + * | |
| 128 | + * @param id 驾驶员失信ID | |
| 129 | + * @return 结果 | |
| 130 | + */ | |
| 131 | + @Override | |
| 132 | + public int deleteDriverCreditById(Long id) | |
| 133 | + { | |
| 134 | + return driverCreditMapper.deleteDriverCreditById(id); | |
| 135 | + } | |
| 136 | +} | |
| 0 | 137 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/EarthsitesCreditServiceImpl.java
0 → 100644
| 1 | +package com.trash.business.service.impl; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import com.trash.business.mapper.EarthsitesCreditMapper; | |
| 9 | +import com.trash.business.domain.EarthsitesCredit; | |
| 10 | +import com.trash.business.service.IEarthsitesCreditService; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 消纳场失信Service业务层处理 | |
| 14 | + * | |
| 15 | + * @author trash | |
| 16 | + * @date 2023-04-26 | |
| 17 | + */ | |
| 18 | +@Service | |
| 19 | +public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService | |
| 20 | +{ | |
| 21 | + @Autowired | |
| 22 | + private EarthsitesCreditMapper earthsitesCreditMapper; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 查询消纳场失信 | |
| 26 | + * | |
| 27 | + * @param id 消纳场失信ID | |
| 28 | + * @return 消纳场失信 | |
| 29 | + */ | |
| 30 | + @Override | |
| 31 | + public EarthsitesCredit selectEarthsitesCreditById(Long id) | |
| 32 | + { | |
| 33 | + return earthsitesCreditMapper.selectEarthsitesCreditById(id); | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 查询消纳场失信列表 | |
| 38 | + * | |
| 39 | + * @param earthsitesCredit 消纳场失信 | |
| 40 | + * @return 消纳场失信 | |
| 41 | + */ | |
| 42 | + @Override | |
| 43 | + public List<EarthsitesCredit> selectEarthsitesCreditList(EarthsitesCredit earthsitesCredit) | |
| 44 | + { | |
| 45 | + return earthsitesCreditMapper.selectEarthsitesCreditList(earthsitesCredit); | |
| 46 | + } | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 新增消纳场失信 | |
| 50 | + * | |
| 51 | + * @param earthsitesCredit 消纳场失信 | |
| 52 | + * @return 结果 | |
| 53 | + */ | |
| 54 | + @Override | |
| 55 | + public int insertEarthsitesCredit(EarthsitesCredit earthsitesCredit) | |
| 56 | + { | |
| 57 | + earthsitesCredit.setTime(new Date()); | |
| 58 | + | |
| 59 | + int i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit); | |
| 60 | + | |
| 61 | + sentDataToRemoteServer(earthsitesCredit); | |
| 62 | + | |
| 63 | + return i; | |
| 64 | + } | |
| 65 | + | |
| 66 | + private void sentDataToRemoteServer(EarthsitesCredit earthsitesCredit) { | |
| 67 | + System.out.println("sendData!" + earthsitesCredit.getObjectId() + "status" + earthsitesCredit.getStatus() ); | |
| 68 | + } | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 修改消纳场失信 | |
| 72 | + * | |
| 73 | + * @param earthsitesCredit 消纳场失信 | |
| 74 | + * @return 结果 | |
| 75 | + */ | |
| 76 | + @Override | |
| 77 | + public int updateEarthsitesCredit(EarthsitesCredit earthsitesCredit) | |
| 78 | + { | |
| 79 | + | |
| 80 | + EarthsitesCredit cc = earthsitesCreditMapper.selectEarthsitesCreditById(earthsitesCredit.getId()); | |
| 81 | + | |
| 82 | + cc.setStatus(1L); | |
| 83 | + | |
| 84 | + try { | |
| 85 | + earthsitesCreditMapper.updateEarthsitesCredit(cc); | |
| 86 | + | |
| 87 | + cc.setReason(earthsitesCredit.getReason()); | |
| 88 | + cc.setLostCredit(0L); | |
| 89 | + | |
| 90 | + return insertEarthsitesCredit(cc); | |
| 91 | + | |
| 92 | + } catch (Exception e) { | |
| 93 | + | |
| 94 | + } | |
| 95 | + | |
| 96 | + return 0; | |
| 97 | + } | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 批量删除消纳场失信 | |
| 101 | + * | |
| 102 | + * @param ids 需要删除的消纳场失信ID | |
| 103 | + * @return 结果 | |
| 104 | + */ | |
| 105 | + @Override | |
| 106 | + public int deleteEarthsitesCreditByIds(Long[] ids) | |
| 107 | + { | |
| 108 | + return earthsitesCreditMapper.deleteEarthsitesCreditByIds(ids); | |
| 109 | + } | |
| 110 | + | |
| 111 | + /** | |
| 112 | + * 删除消纳场失信信息 | |
| 113 | + * | |
| 114 | + * @param id 消纳场失信ID | |
| 115 | + * @return 结果 | |
| 116 | + */ | |
| 117 | + @Override | |
| 118 | + public int deleteEarthsitesCreditById(Long id) | |
| 119 | + { | |
| 120 | + return earthsitesCreditMapper.deleteEarthsitesCreditById(id); | |
| 121 | + } | |
| 122 | + | |
| 123 | + | |
| 124 | + public List<String> getNames(EarthsitesCredit earthsitesCredit) { | |
| 125 | + return earthsitesCreditMapper.getNames(earthsitesCredit); | |
| 126 | + } | |
| 127 | + | |
| 128 | + @Override | |
| 129 | + public List<EarthsitesCredit> selectEarthsitesCreditHistory(EarthsitesCredit earthsitesCredit) { | |
| 130 | + return earthsitesCreditMapper.selectEarthsitesCreditHistory(earthsitesCredit); | |
| 131 | + } | |
| 132 | +} | |
| 0 | 133 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckCreditServiceImpl.java
0 → 100644
| 1 | +package com.trash.business.service.impl; | |
| 2 | + | |
| 3 | +import com.trash.business.domain.ConstructionCredit; | |
| 4 | +import com.trash.business.domain.TruckCredit; | |
| 5 | +import com.trash.business.mapper.TruckCreditMapper; | |
| 6 | +import com.trash.business.service.ITruckCreditService; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | +import org.springframework.transaction.annotation.Transactional; | |
| 10 | + | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 车辆失信Service业务层处理 | |
| 16 | + * | |
| 17 | + * @author trash | |
| 18 | + * @date 2023-04-25 | |
| 19 | + */ | |
| 20 | +@Service | |
| 21 | +public class TruckCreditServiceImpl implements ITruckCreditService | |
| 22 | +{ | |
| 23 | + @Autowired | |
| 24 | + private TruckCreditMapper truckCreditMapper; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 查询车辆失信 | |
| 28 | + * | |
| 29 | + * @param id 车辆失信ID | |
| 30 | + * @return 车辆失信 | |
| 31 | + */ | |
| 32 | + @Override | |
| 33 | + public TruckCredit selectTruckCreditById(Long id) | |
| 34 | + { | |
| 35 | + return truckCreditMapper.selectTruckCreditById(id); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 查询车辆失信列表 | |
| 40 | + * | |
| 41 | + * @param truckCredit 车辆失信 | |
| 42 | + * @return 车辆失信 | |
| 43 | + */ | |
| 44 | + @Override | |
| 45 | + public List<TruckCredit> selectTruckCreditList(TruckCredit truckCredit) | |
| 46 | + { | |
| 47 | + return truckCreditMapper.selectTruckCreditList(truckCredit); | |
| 48 | + } | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 新增车辆失信 | |
| 52 | + * | |
| 53 | + * @param truckCredit 车辆失信 | |
| 54 | + * @return 结果 | |
| 55 | + */ | |
| 56 | + @Override | |
| 57 | + public int insertTruckCredit(TruckCredit truckCredit) | |
| 58 | + { | |
| 59 | + truckCredit.setTime(new Date()); | |
| 60 | + | |
| 61 | + int i = truckCreditMapper.insertTruckCredit(truckCredit); | |
| 62 | + | |
| 63 | + sentDataToRemoteServer(truckCredit); | |
| 64 | + | |
| 65 | + return i; | |
| 66 | + } | |
| 67 | + | |
| 68 | + private void sentDataToRemoteServer(TruckCredit truckCredit) { | |
| 69 | + | |
| 70 | + System.out.println("sendData!" + truckCredit.getObjectId() + "status" + truckCredit.getStatus() ); | |
| 71 | + | |
| 72 | + } | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 修改车辆失信 | |
| 76 | + * | |
| 77 | + * @param truckCredit 车辆失信 | |
| 78 | + * @return 结果 | |
| 79 | + */ | |
| 80 | + @Override | |
| 81 | + @Transactional | |
| 82 | + public int updateTruckCredit(TruckCredit truckCredit) | |
| 83 | + { | |
| 84 | + TruckCredit cc = truckCreditMapper.selectTruckCreditById(truckCredit.getId()); | |
| 85 | + | |
| 86 | + cc.setStatus(1L); | |
| 87 | + | |
| 88 | + try { | |
| 89 | + truckCreditMapper.updateTruckCredit(cc); | |
| 90 | + | |
| 91 | + cc.setReason(truckCredit.getReason()); | |
| 92 | + cc.setLostCredit(0L); | |
| 93 | + | |
| 94 | + return insertTruckCredit(cc); | |
| 95 | + | |
| 96 | + } catch (Exception e) { | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | + return 0; | |
| 101 | + } | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * 批量删除车辆失信 | |
| 105 | + * | |
| 106 | + * @param ids 需要删除的车辆失信ID | |
| 107 | + * @return 结果 | |
| 108 | + */ | |
| 109 | + @Override | |
| 110 | + public int deleteTruckCreditByIds(Long[] ids) | |
| 111 | + { | |
| 112 | + return truckCreditMapper.deleteTruckCreditByIds(ids); | |
| 113 | + } | |
| 114 | + | |
| 115 | + | |
| 116 | + @Override | |
| 117 | + public List<TruckCredit> selectTruckCreditHistory(TruckCredit truckCredit) | |
| 118 | + { | |
| 119 | + return truckCreditMapper.selectTruckCreditHistory(truckCredit); | |
| 120 | + } | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * 删除车辆失信信息 | |
| 124 | + * | |
| 125 | + * @param id 车辆失信ID | |
| 126 | + * @return 结果 | |
| 127 | + */ | |
| 128 | + @Override | |
| 129 | + public int deleteTruckCreditById(Long id) | |
| 130 | + { | |
| 131 | + return truckCreditMapper.deleteTruckCreditById(id); | |
| 132 | + } | |
| 133 | + | |
| 134 | + public List<String> getNames(TruckCredit truckCredit){ | |
| 135 | + return truckCreditMapper.getNames(truckCredit); | |
| 136 | + } | |
| 137 | +} | ... | ... |
trash-workFlow/src/main/resources/mapper/CompanyCreditMapper.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.business.mapper.CompanyCreditMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="com.trash.business.domain.CompanyCredit" id="CompanyCreditResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="name" column="name" /> | |
| 10 | + <result property="time" column="time" /> | |
| 11 | + <result property="place" column="place" /> | |
| 12 | + <result property="reason" column="reason" /> | |
| 13 | + <result property="status" column="status" /> | |
| 14 | + <result property="lostCredit" column="lost_credit" /> | |
| 15 | + <result property="objectId" column="object_id" /> | |
| 16 | + <result property="createBy" column="create_by" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <sql id="selectCompanyCreditVo"> | |
| 20 | + select id, name, time, place, reason, status, lost_credit, object_id, create_by from company_credit | |
| 21 | + </sql> | |
| 22 | + | |
| 23 | + <select id="selectCompanyCreditList" parameterType="CompanyCredit" resultMap="CompanyCreditResult"> | |
| 24 | + <include refid="selectCompanyCreditVo"/> | |
| 25 | + <where> | |
| 26 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 27 | + <if test="time != null "> and time = #{time}</if> | |
| 28 | + <if test="place != null and place != ''"> and place = #{place}</if> | |
| 29 | + <if test="reason != null and reason != ''"> and reason = #{reason}</if> | |
| 30 | + <if test="status != null "> and status = #{status}</if> | |
| 31 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 32 | + <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | |
| 33 | + </where> | |
| 34 | + </select> | |
| 35 | + | |
| 36 | + <select id="selectCompanyCreditById" parameterType="Long" resultMap="CompanyCreditResult"> | |
| 37 | + <include refid="selectCompanyCreditVo"/> | |
| 38 | + where id = #{id} | |
| 39 | + </select> | |
| 40 | + | |
| 41 | + <insert id="insertCompanyCredit" parameterType="CompanyCredit" useGeneratedKeys="true" keyProperty="id"> | |
| 42 | + insert into company_credit | |
| 43 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 44 | + <if test="name != null">name,</if> | |
| 45 | + <if test="time != null">time,</if> | |
| 46 | + <if test="place != null">place,</if> | |
| 47 | + <if test="reason != null">reason,</if> | |
| 48 | + <if test="status != null">status,</if> | |
| 49 | + <if test="lostCredit != null">lost_credit,</if> | |
| 50 | + <if test="objectId != null">object_id,</if> | |
| 51 | + <if test="createBy != null">create_by,</if> | |
| 52 | + </trim> | |
| 53 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 54 | + <if test="name != null">#{name},</if> | |
| 55 | + <if test="time != null">#{time},</if> | |
| 56 | + <if test="place != null">#{place},</if> | |
| 57 | + <if test="reason != null">#{reason},</if> | |
| 58 | + <if test="status != null">#{status},</if> | |
| 59 | + <if test="lostCredit != null">#{lostCredit},</if> | |
| 60 | + <if test="objectId != null">#{objectId},</if> | |
| 61 | + <if test="createBy != null">#{createBy},</if> | |
| 62 | + </trim> | |
| 63 | + </insert> | |
| 64 | + | |
| 65 | + <update id="updateCompanyCredit" parameterType="CompanyCredit"> | |
| 66 | + update company_credit | |
| 67 | + <trim prefix="SET" suffixOverrides=","> | |
| 68 | + <if test="name != null">name = #{name},</if> | |
| 69 | + <if test="time != null">time = #{time},</if> | |
| 70 | + <if test="place != null">place = #{place},</if> | |
| 71 | + <if test="reason != null">reason = #{reason},</if> | |
| 72 | + <if test="status != null">status = #{status},</if> | |
| 73 | + <if test="lostCredit != null">lost_credit = #{lostCredit},</if> | |
| 74 | + <if test="objectId != null">object_id = #{objectId},</if> | |
| 75 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 76 | + </trim> | |
| 77 | + where id = #{id} | |
| 78 | + </update> | |
| 79 | + | |
| 80 | + <delete id="deleteCompanyCreditById" parameterType="Long"> | |
| 81 | + delete from company_credit where id = #{id} | |
| 82 | + </delete> | |
| 83 | + | |
| 84 | + <delete id="deleteCompanyCreditByIds" parameterType="String"> | |
| 85 | + delete from company_credit where id in | |
| 86 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 87 | + #{id} | |
| 88 | + </foreach> | |
| 89 | + </delete> | |
| 90 | + | |
| 91 | + <select id="getNames" parameterType="CompanyCredit" resultType="String"> | |
| 92 | + | |
| 93 | + select DISTINCT name from construction_credit | |
| 94 | + <where> | |
| 95 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 96 | + <if test="status != null "> and status = #{status}</if> | |
| 97 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 98 | + </where> | |
| 99 | + </select> | |
| 100 | + | |
| 101 | + | |
| 102 | + <select id="selectCompanyCreditHistory" parameterType="CompanyCredit" resultMap="CompanyCreditResult"> | |
| 103 | + | |
| 104 | + select c.* from (select a.* from company_credit a where not exists (select b.* from company_credit b where a.name = b.name and a.id < id )) c | |
| 105 | + | |
| 106 | + <where> | |
| 107 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 108 | + <if test="place != null and place != ''"> and place = #{place}</if> | |
| 109 | + </where> | |
| 110 | + </select> | |
| 111 | + | |
| 112 | +</mapper> | |
| 0 | 113 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/ConstructionCreditMapper.xml
| ... | ... | @@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 89 | 89 | </foreach> |
| 90 | 90 | </delete> |
| 91 | 91 | |
| 92 | - <select id="getNames" parameterType="ConstructionCredit" resultType="String"> | |
| 92 | + <select id="getNames" parameterType="ConstructionCredit" resultType="String"> | |
| 93 | 93 | |
| 94 | 94 | select DISTINCT name from construction_credit |
| 95 | 95 | <where> | ... | ... |
trash-workFlow/src/main/resources/mapper/DriverCreditMapper.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.business.mapper.DriverCreditMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="com.trash.business.domain.DriverCredit" id="DriverCreditResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="name" column="name" /> | |
| 10 | + <result property="idNumber" column="id_number" /> | |
| 11 | + <result property="time" column="time" /> | |
| 12 | + <result property="reason" column="reason" /> | |
| 13 | + <result property="status" column="status" /> | |
| 14 | + <result property="lostCredit" column="lost_credit" /> | |
| 15 | + <result property="objectId" column="object_id" /> | |
| 16 | + <result property="createBy" column="create_by" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <sql id="selectDriverCreditVo"> | |
| 20 | + select id, name, id_number, time, reason, status, lost_credit, object_id, create_by from driver_credit | |
| 21 | + </sql> | |
| 22 | + | |
| 23 | + <select id="selectDriverCreditList" parameterType="DriverCredit" resultMap="DriverCreditResult"> | |
| 24 | + <include refid="selectDriverCreditVo"/> | |
| 25 | + <where> | |
| 26 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 27 | + <if test="idNumber != null and idNumber != ''"> and id_number = #{idNumber}</if> | |
| 28 | + <if test="time != null "> and time = #{time}</if> | |
| 29 | + <if test="reason != null and reason != ''"> and reason = #{reason}</if> | |
| 30 | + <if test="status != null "> and status = #{status}</if> | |
| 31 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 32 | + <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | |
| 33 | + </where> | |
| 34 | + </select> | |
| 35 | + | |
| 36 | + <select id="selectDriverCreditById" parameterType="Long" resultMap="DriverCreditResult"> | |
| 37 | + <include refid="selectDriverCreditVo"/> | |
| 38 | + where id = #{id} | |
| 39 | + </select> | |
| 40 | + | |
| 41 | + <insert id="insertDriverCredit" parameterType="DriverCredit" useGeneratedKeys="true" keyProperty="id"> | |
| 42 | + insert into driver_credit | |
| 43 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 44 | + <if test="name != null">name,</if> | |
| 45 | + <if test="idNumber != null">id_number,</if> | |
| 46 | + <if test="time != null">time,</if> | |
| 47 | + <if test="reason != null">reason,</if> | |
| 48 | + <if test="status != null">status,</if> | |
| 49 | + <if test="lostCredit != null">lost_credit,</if> | |
| 50 | + <if test="objectId != null">object_id,</if> | |
| 51 | + <if test="createBy != null">create_by,</if> | |
| 52 | + </trim> | |
| 53 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 54 | + <if test="name != null">#{name},</if> | |
| 55 | + <if test="idNumber != null">#{idNumber},</if> | |
| 56 | + <if test="time != null">#{time},</if> | |
| 57 | + <if test="reason != null">#{reason},</if> | |
| 58 | + <if test="status != null">#{status},</if> | |
| 59 | + <if test="lostCredit != null">#{lostCredit},</if> | |
| 60 | + <if test="objectId != null">#{objectId},</if> | |
| 61 | + <if test="createBy != null">#{createBy},</if> | |
| 62 | + </trim> | |
| 63 | + </insert> | |
| 64 | + | |
| 65 | + <update id="updateDriverCredit" parameterType="DriverCredit"> | |
| 66 | + update driver_credit | |
| 67 | + <trim prefix="SET" suffixOverrides=","> | |
| 68 | + <if test="name != null">name = #{name},</if> | |
| 69 | + <if test="idNumber != null">id_number = #{idNumber},</if> | |
| 70 | + <if test="time != null">time = #{time},</if> | |
| 71 | + <if test="reason != null">reason = #{reason},</if> | |
| 72 | + <if test="status != null">status = #{status},</if> | |
| 73 | + <if test="lostCredit != null">lost_credit = #{lostCredit},</if> | |
| 74 | + <if test="objectId != null">object_id = #{objectId},</if> | |
| 75 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 76 | + </trim> | |
| 77 | + where id = #{id} | |
| 78 | + </update> | |
| 79 | + | |
| 80 | + <delete id="deleteDriverCreditById" parameterType="Long"> | |
| 81 | + delete from driver_credit where id = #{id} | |
| 82 | + </delete> | |
| 83 | + | |
| 84 | + <delete id="deleteDriverCreditByIds" parameterType="String"> | |
| 85 | + delete from driver_credit where id in | |
| 86 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 87 | + #{id} | |
| 88 | + </foreach> | |
| 89 | + </delete> | |
| 90 | + | |
| 91 | + <select id="getNames" parameterType="DriverCredit" resultType="String"> | |
| 92 | + | |
| 93 | + select DISTINCT name from driver_credit | |
| 94 | + <where> | |
| 95 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 96 | + <if test="status != null "> and status = #{status}</if> | |
| 97 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 98 | + </where> | |
| 99 | + </select> | |
| 100 | + | |
| 101 | + | |
| 102 | + <select id="selectDriverCreditHistory" parameterType="DriverCredit" resultMap="DriverCreditResult"> | |
| 103 | + | |
| 104 | + select c.* from (select a.* from driver_credit a where not exists (select b.* from driver_credit b where a.name = b.name and a.id < id )) c | |
| 105 | + | |
| 106 | + <where> | |
| 107 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 108 | + </where> | |
| 109 | + </select> | |
| 110 | +</mapper> | |
| 0 | 111 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/EarthsitesCreditMapper.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.business.mapper.EarthsitesCreditMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="com.trash.business.domain.EarthsitesCredit" id="EarthsitesCreditResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="name" column="name" /> | |
| 10 | + <result property="type" column="type" /> | |
| 11 | + <result property="time" column="time" /> | |
| 12 | + <result property="place" column="place" /> | |
| 13 | + <result property="reason" column="reason" /> | |
| 14 | + <result property="status" column="status" /> | |
| 15 | + <result property="lostCredit" column="lost_credit" /> | |
| 16 | + <result property="objectId" column="object_id" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <sql id="selectEarthsitesCreditVo"> | |
| 20 | + select id, name, type, time, place, reason, status, lost_credit, object_id from earthsites_credit | |
| 21 | + </sql> | |
| 22 | + | |
| 23 | + <select id="selectEarthsitesCreditList" parameterType="EarthsitesCredit" resultMap="EarthsitesCreditResult"> | |
| 24 | + <include refid="selectEarthsitesCreditVo"/> | |
| 25 | + <where> | |
| 26 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 27 | + <if test="type != null and type != ''"> and type = #{type}</if> | |
| 28 | + <if test="time != null "> and time = #{time}</if> | |
| 29 | + <if test="place != null and place != ''"> and place = #{place}</if> | |
| 30 | + <if test="reason != null and reason != ''"> and reason = #{reason}</if> | |
| 31 | + <if test="status != null "> and status = #{status}</if> | |
| 32 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 33 | + <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | |
| 34 | + </where> | |
| 35 | + </select> | |
| 36 | + | |
| 37 | + <select id="selectEarthsitesCreditById" parameterType="Long" resultMap="EarthsitesCreditResult"> | |
| 38 | + <include refid="selectEarthsitesCreditVo"/> | |
| 39 | + where id = #{id} | |
| 40 | + </select> | |
| 41 | + | |
| 42 | + <insert id="insertEarthsitesCredit" parameterType="EarthsitesCredit" useGeneratedKeys="true" keyProperty="id"> | |
| 43 | + insert into earthsites_credit | |
| 44 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 45 | + <if test="name != null">name,</if> | |
| 46 | + <if test="type != null">type,</if> | |
| 47 | + <if test="time != null">time,</if> | |
| 48 | + <if test="place != null">place,</if> | |
| 49 | + <if test="reason != null">reason,</if> | |
| 50 | + <if test="status != null">status,</if> | |
| 51 | + <if test="lostCredit != null">lost_credit,</if> | |
| 52 | + <if test="objectId != null">object_id,</if> | |
| 53 | + </trim> | |
| 54 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 55 | + <if test="name != null">#{name},</if> | |
| 56 | + <if test="type != null">#{type},</if> | |
| 57 | + <if test="time != null">#{time},</if> | |
| 58 | + <if test="place != null">#{place},</if> | |
| 59 | + <if test="reason != null">#{reason},</if> | |
| 60 | + <if test="status != null">#{status},</if> | |
| 61 | + <if test="lostCredit != null">#{lostCredit},</if> | |
| 62 | + <if test="objectId != null">#{objectId},</if> | |
| 63 | + </trim> | |
| 64 | + </insert> | |
| 65 | + | |
| 66 | + <update id="updateEarthsitesCredit" parameterType="EarthsitesCredit"> | |
| 67 | + update earthsites_credit | |
| 68 | + <trim prefix="SET" suffixOverrides=","> | |
| 69 | + <if test="name != null">name = #{name},</if> | |
| 70 | + <if test="type != null">type = #{type},</if> | |
| 71 | + <if test="time != null">time = #{time},</if> | |
| 72 | + <if test="place != null">place = #{place},</if> | |
| 73 | + <if test="reason != null">reason = #{reason},</if> | |
| 74 | + <if test="status != null">status = #{status},</if> | |
| 75 | + <if test="lostCredit != null">lost_credit = #{lostCredit},</if> | |
| 76 | + <if test="objectId != null">object_id = #{objectId},</if> | |
| 77 | + </trim> | |
| 78 | + where id = #{id} | |
| 79 | + </update> | |
| 80 | + | |
| 81 | + <delete id="deleteEarthsitesCreditById" parameterType="Long"> | |
| 82 | + delete from earthsites_credit where id = #{id} | |
| 83 | + </delete> | |
| 84 | + | |
| 85 | + <delete id="deleteEarthsitesCreditByIds" parameterType="String"> | |
| 86 | + delete from earthsites_credit where id in | |
| 87 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 88 | + #{id} | |
| 89 | + </foreach> | |
| 90 | + </delete> | |
| 91 | + | |
| 92 | + | |
| 93 | + <select id="getNames" parameterType="EarthsitesCredit" resultType="String"> | |
| 94 | + | |
| 95 | + select DISTINCT name from earthsites_credit | |
| 96 | + <where> | |
| 97 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 98 | + <if test="status != null "> and status = #{status}</if> | |
| 99 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 100 | + </where> | |
| 101 | + </select> | |
| 102 | + | |
| 103 | + <select id="selectEarthsitesCreditHistory" parameterType="EarthsitesCredit" resultMap="EarthsitesCreditResult"> | |
| 104 | + | |
| 105 | + select c.* from (select a.* from earthsites_credit a where not exists (select b.* from earthsites_credit b where a.name = b.name and a.id < id )) c | |
| 106 | + | |
| 107 | + <where> | |
| 108 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | |
| 109 | + <if test="type != null and type != ''"> and type = #{type}</if> | |
| 110 | + <if test="place != null and place != ''"> and place = #{place}</if> | |
| 111 | + </where> | |
| 112 | + </select> | |
| 113 | + | |
| 114 | +</mapper> | |
| 0 | 115 | \ No newline at end of file | ... | ... |
trash-workFlow/src/main/resources/mapper/TruckCreditMapper.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.business.mapper.TruckCreditMapper"> | |
| 6 | + | |
| 7 | + <resultMap type="com.trash.business.domain.TruckCredit" id="TruckCreditResult"> | |
| 8 | + <result property="id" column="id" /> | |
| 9 | + <result property="companyId" column="company_id" /> | |
| 10 | + <result property="licensePlate" column="license_plate"/> | |
| 11 | + <result property="reason" column="reason" /> | |
| 12 | + <result property="status" column="status" /> | |
| 13 | + <result property="lostCredit" column="lost_credit" /> | |
| 14 | + <result property="objectId" column="object_id" /> | |
| 15 | + <result property="createBy" column="create_by" /> | |
| 16 | + <result property="time" column="time" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <sql id="selectTruckCreditVo"> | |
| 20 | + select id, company_id,time,license_plate, reason, status, lost_credit, object_id, create_by from truck_credit | |
| 21 | + </sql> | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + <select id="selectTruckCreditList" parameterType="TruckCredit" resultMap="TruckCreditResult"> | |
| 26 | + <include refid="selectTruckCreditVo"/> | |
| 27 | + <where> | |
| 28 | + <if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if> | |
| 29 | + <if test="licensePlate != null and licensePlate != ''"> and license_plate = #{licensePlate}</if> | |
| 30 | + <if test="reason != null and reason != ''"> and reason = #{reason}</if> | |
| 31 | + <if test="status != null "> and status = #{status}</if> | |
| 32 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 33 | + <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | |
| 34 | + <if test="time != null "> and time = #{time}</if> | |
| 35 | + </where> | |
| 36 | + </select> | |
| 37 | + | |
| 38 | + <select id="selectTruckCreditById" parameterType="Long" resultMap="TruckCreditResult"> | |
| 39 | + <include refid="selectTruckCreditVo"/> | |
| 40 | + where id = #{id} | |
| 41 | + </select> | |
| 42 | + | |
| 43 | + <insert id="insertTruckCredit" parameterType="TruckCredit" useGeneratedKeys="true" keyProperty="id"> | |
| 44 | + insert into truck_credit | |
| 45 | + <trim prefix="(" suffix=")" suffixOverrides=","> | |
| 46 | + <if test="companyId != null">company_id,</if> | |
| 47 | + <if test="licensePlate != null">license_plate,</if> | |
| 48 | + <if test="reason != null">reason,</if> | |
| 49 | + <if test="status != null">status,</if> | |
| 50 | + <if test="lostCredit != null">lost_credit,</if> | |
| 51 | + <if test="objectId != null">object_id,</if> | |
| 52 | + <if test="createBy != null">create_by,</if> | |
| 53 | + <if test="time != null">time,</if> | |
| 54 | + </trim> | |
| 55 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | |
| 56 | + <if test="companyId != null">#{companyId},</if> | |
| 57 | + <if test="licensePlate != null">#{licensePlate},</if> | |
| 58 | + <if test="reason != null">#{reason},</if> | |
| 59 | + <if test="status != null">#{status},</if> | |
| 60 | + <if test="lostCredit != null">#{lostCredit},</if> | |
| 61 | + <if test="objectId != null">#{objectId},</if> | |
| 62 | + <if test="createBy != null">#{createBy},</if> | |
| 63 | + <if test="time != null">#{time},</if> | |
| 64 | + </trim> | |
| 65 | + </insert> | |
| 66 | + | |
| 67 | + <update id="updateTruckCredit" parameterType="TruckCredit"> | |
| 68 | + update truck_credit | |
| 69 | + <trim prefix="SET" suffixOverrides=","> | |
| 70 | + <if test="companyId != null">company_id = #{companyId},</if> | |
| 71 | + <if test="licensePlate != null"> | |
| 72 | + | |
| 73 | + license_plate = #{ | |
| 74 | + | |
| 75 | +licensePlate},</if> | |
| 76 | + <if test="reason != null">reason = #{reason},</if> | |
| 77 | + <if test="status != null">status = #{status},</if> | |
| 78 | + <if test="lostCredit != null">lost_credit = #{lostCredit},</if> | |
| 79 | + <if test="objectId != null">object_id = #{objectId},</if> | |
| 80 | + <if test="createBy != null">create_by = #{createBy},</if> | |
| 81 | + <if test="time != null">time = #{time},</if> | |
| 82 | + </trim> | |
| 83 | + where id = #{id} | |
| 84 | + </update> | |
| 85 | + | |
| 86 | + <delete id="deleteTruckCreditById" parameterType="Long"> | |
| 87 | + delete from truck_credit where id = #{id} | |
| 88 | + </delete> | |
| 89 | + | |
| 90 | + <delete id="deleteTruckCreditByIds" parameterType="String"> | |
| 91 | + delete from truck_credit where id in | |
| 92 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | |
| 93 | + #{id} | |
| 94 | + </foreach> | |
| 95 | + </delete> | |
| 96 | + | |
| 97 | + <select id="getNames" parameterType="TruckCredit" resultType="String"> | |
| 98 | + | |
| 99 | + select DISTINCT license_plate from truck_credit | |
| 100 | + <where> | |
| 101 | + <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%',#{license_plate},'%')</if> | |
| 102 | + <if test="status != null "> and status = #{status}</if> | |
| 103 | + <if test="lostCredit != null "> and lost_credit = #{lostCredit}</if> | |
| 104 | + </where> | |
| 105 | + </select> | |
| 106 | + | |
| 107 | + | |
| 108 | + <select id="selectTruckCreditHistory" parameterType="TruckCredit" resultMap="TruckCreditResult"> | |
| 109 | + | |
| 110 | + select c.* from (select a.* from truck_credit a where not exists (select b.* from truck_credit b where a.license_plate = b.license_plate and a.id < id )) c | |
| 111 | + | |
| 112 | + <where> | |
| 113 | + <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{license_plate}, '%')</if> | |
| 114 | + </where> | |
| 115 | + </select> | |
| 116 | + | |
| 117 | +</mapper> | |
| 0 | 118 | \ No newline at end of file | ... | ... |