Commit 6e564d0789cabb1790421894f86a20cdab6ef2b5
1 parent
cb6cea09
修复bug
Showing
31 changed files
with
963 additions
and
633 deletions
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
| @@ -42,6 +42,8 @@ public class RemoteServerUtils { | @@ -42,6 +42,8 @@ public class RemoteServerUtils { | ||
| 42 | public static String EarthSitesList = "//api/siteservice/cs/earthsites/ledger/list"; | 42 | public static String EarthSitesList = "//api/siteservice/cs/earthsites/ledger/list"; |
| 43 | 43 | ||
| 44 | public static String ConstructionInfo = "/api/siteservice/cs/constructionsites/"; | 44 | public static String ConstructionInfo = "/api/siteservice/cs/constructionsites/"; |
| 45 | + | ||
| 46 | + public static String ConstructionList = "/api/siteservice/cs/constructionsites/search"; | ||
| 45 | 47 | ||
| 46 | public static String UpdateConstruction= "/api/siteservice/cs/constructionsites/status"; | 48 | public static String UpdateConstruction= "/api/siteservice/cs/constructionsites/status"; |
| 47 | 49 | ||
| @@ -67,7 +69,19 @@ public class RemoteServerUtils { | @@ -67,7 +69,19 @@ public class RemoteServerUtils { | ||
| 67 | 69 | ||
| 68 | return list; | 70 | return list; |
| 69 | } | 71 | } |
| 70 | - | 72 | + |
| 73 | + public static JSONArray getConstructionList(Map map){ | ||
| 74 | + JSONArray list=null; | ||
| 75 | + Object object = post(ConstructionList,map); | ||
| 76 | + | ||
| 77 | + if(object != null){ | ||
| 78 | + JSONObject jsonObject = JSON.parseObject(object.toString()); | ||
| 79 | + list = jsonObject.getJSONArray("list"); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + return list; | ||
| 83 | + } | ||
| 84 | + | ||
| 71 | public static JSONArray getTruckOnline(Map map){ | 85 | public static JSONArray getTruckOnline(Map map){ |
| 72 | JSONArray turckList=null; | 86 | JSONArray turckList=null; |
| 73 | Object object = post(TruckStatusListRequestPath,map); | 87 | Object object = post(TruckStatusListRequestPath,map); |
trash-ui/src/api/casefile/remoteServer.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询工地列表 | ||
| 4 | +export function getConstructionList() { | ||
| 5 | + return request({ | ||
| 6 | + url: '/remoteServer/getConstructionList', | ||
| 7 | + method: 'post' | ||
| 8 | + }) | ||
| 9 | +} | ||
| 10 | +//查询消纳场列表 | ||
| 11 | +export function getEarthSitesList() { | ||
| 12 | + return request({ | ||
| 13 | + url: '/remoteServer/getEarthSitesList', | ||
| 14 | + method: 'post' | ||
| 15 | + }) | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +export function getAreaList() { | ||
| 19 | + return request({ | ||
| 20 | + url: '/remoteServer/getAreaList', | ||
| 21 | + method: 'post' | ||
| 22 | + }) | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +export function getCompanyList() { | ||
| 26 | + return request({ | ||
| 27 | + url: '/remoteServer/getCompanyList', | ||
| 28 | + method: 'post' | ||
| 29 | + }) | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | + |
trash-ui/src/views/activiti/task/index.vue
| @@ -236,7 +236,7 @@ | @@ -236,7 +236,7 @@ | ||
| 236 | <!-- 办文办事 --> | 236 | <!-- 办文办事 --> |
| 237 | <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body | 237 | <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body |
| 238 | :close-on-click-modal="false"> | 238 | :close-on-click-modal="false"> |
| 239 | - <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts" | 239 | + <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" |
| 240 | :businessKey="definitionKey" | 240 | :businessKey="definitionKey" |
| 241 | :controlId="controlId"/> | 241 | :controlId="controlId"/> |
| 242 | <el-form label-width="110px" v-if="definitionKey=='yuelan'"> | 242 | <el-form label-width="110px" v-if="definitionKey=='yuelan'"> |
trash-ui/src/views/business/truckActivate/index.vue
| @@ -13,25 +13,27 @@ | @@ -13,25 +13,27 @@ | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | 15 | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 16 | - <el-form-item label="所属企业" prop="company"> | ||
| 17 | - <el-input | ||
| 18 | - v-model="queryParams.company" | ||
| 19 | - placeholder="请输入所属企业" | ||
| 20 | - | ||
| 21 | - size="small" | ||
| 22 | - | ||
| 23 | - /> | ||
| 24 | - </el-form-item> | ||
| 25 | <el-form-item label="车牌号" prop="licensePlate"> | 16 | <el-form-item label="车牌号" prop="licensePlate"> |
| 26 | <el-input | 17 | <el-input |
| 27 | v-model="queryParams.licensePlate" | 18 | v-model="queryParams.licensePlate" |
| 28 | placeholder="请输入车牌号" | 19 | placeholder="请输入车牌号" |
| 29 | - | 20 | + |
| 30 | size="small" | 21 | size="small" |
| 31 | - | 22 | + |
| 32 | /> | 23 | /> |
| 33 | </el-form-item> | 24 | </el-form-item> |
| 34 | - <el-form-item label="激活时间" prop="activateTime"> | 25 | + <el-form-item label="所属企业" prop="company"> |
| 26 | + <el-select v-model="form.projectName" :filterable="true" :remote-method="ConpanyNameLoadOptions" :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;"> | ||
| 27 | + <el-option v-for="item in truckActivateList" :key="item.company" :label="item.company" :value="item.company"></el-option> | ||
| 28 | + </el-select> | ||
| 29 | + </el-form-item> | ||
| 30 | + <el-form-item label="激活状态" prop="status"> | ||
| 31 | + <el-select v-model="queryParams.status" placeholder="请选择激活状态" size="small"> | ||
| 32 | + <el-option label="未激活" value="1"/> | ||
| 33 | + <el-option label="已激活" value="0"/> | ||
| 34 | + </el-select> | ||
| 35 | + </el-form-item> | ||
| 36 | + <el-form-item label="激活时间" prop="activateTime" v-if="openActivateTime"> | ||
| 35 | <el-date-picker size="small" style="width: 200px" | 37 | <el-date-picker size="small" style="width: 200px" |
| 36 | v-model="queryParams.activateTime" | 38 | v-model="queryParams.activateTime" |
| 37 | type="date" | 39 | type="date" |
| @@ -53,7 +55,7 @@ | @@ -53,7 +55,7 @@ | ||
| 53 | size="mini" | 55 | size="mini" |
| 54 | @click="handleAdd" | 56 | @click="handleAdd" |
| 55 | v-hasPermi="['business:truckActivate:add']" | 57 | v-hasPermi="['business:truckActivate:add']" |
| 56 | - >添加车辆并激活</el-button> | 58 | + >手动激活</el-button> |
| 57 | </el-col> | 59 | </el-col> |
| 58 | <el-col :span="1.5"> | 60 | <el-col :span="1.5"> |
| 59 | <el-button | 61 | <el-button |
| @@ -67,25 +69,18 @@ | @@ -67,25 +69,18 @@ | ||
| 67 | 69 | ||
| 68 | <el-table v-loading="loading" :data="truckActivateList" @selection-change="handleSelectionChange"> | 70 | <el-table v-loading="loading" :data="truckActivateList" @selection-change="handleSelectionChange"> |
| 69 | <el-table-column label="序号" align="center" type="index" /> | 71 | <el-table-column label="序号" align="center" type="index" /> |
| 70 | - <el-table-column label="所属企业" align="center" prop="company" /> | 72 | + <el-table-column label="工地名称" align="center" prop="construction" /> |
| 71 | <el-table-column label="车牌号" align="center" prop="licensePlate" /> | 73 | <el-table-column label="车牌号" align="center" prop="licensePlate" /> |
| 72 | - <el-table-column label="所属工地" align="center" prop="construction" /> | 74 | + <el-table-column label="运输企业" align="center" prop="company" /> |
| 73 | <el-table-column label="消纳场" align="center" prop="earthsite" /> | 75 | <el-table-column label="消纳场" align="center" prop="earthsite" /> |
| 74 | <el-table-column label="激活时间" align="center" prop="activateTime" width="180"> | 76 | <el-table-column label="激活时间" align="center" prop="activateTime" width="180"> |
| 75 | <template slot-scope="scope"> | 77 | <template slot-scope="scope"> |
| 76 | - <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d}') }}</span> | 78 | + <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| 77 | </template> | 79 | </template> |
| 78 | </el-table-column> | 80 | </el-table-column> |
| 79 | <el-table-column label="激活状态" prop="objectId"> | 81 | <el-table-column label="激活状态" prop="objectId"> |
| 80 | <template slot-scope="scope"> | 82 | <template slot-scope="scope"> |
| 81 | - <span v-if="scope.row.activateTime!=null">已激活</span> | ||
| 82 | - | ||
| 83 | - <el-button v-if="scope.row.activateTime==null" | ||
| 84 | - size="mini" | ||
| 85 | - type="text" | ||
| 86 | - @click="handleUpdate(scope.row)" | ||
| 87 | - v-hasPermi="['business:truckActivate:edit']" | ||
| 88 | - >手动激活</el-button> | 83 | + {{ scope.row.status == 0 ? '已激活' : '未激活' }} |
| 89 | </template> | 84 | </template> |
| 90 | </el-table-column> | 85 | </el-table-column> |
| 91 | 86 | ||
| @@ -210,6 +205,8 @@ export default { | @@ -210,6 +205,8 @@ export default { | ||
| 210 | construction : null, | 205 | construction : null, |
| 211 | truck : null, | 206 | truck : null, |
| 212 | company:null, | 207 | company:null, |
| 208 | + openActivateTime:false, | ||
| 209 | + isLoading:false, | ||
| 213 | }; | 210 | }; |
| 214 | }, | 211 | }, |
| 215 | created() { | 212 | created() { |
| @@ -219,10 +216,13 @@ export default { | @@ -219,10 +216,13 @@ export default { | ||
| 219 | /** 查询车辆激活列表 */ | 216 | /** 查询车辆激活列表 */ |
| 220 | getList(index) { | 217 | getList(index) { |
| 221 | if(index == 0){ | 218 | if(index == 0){ |
| 222 | - this.queryParams.status = 0; | 219 | + this.queryParams.status = "0"; |
| 220 | + this.openActivateTime = false; | ||
| 221 | + this.queryParams.activateTime = null; | ||
| 223 | } | 222 | } |
| 224 | if(index == 1){ | 223 | if(index == 1){ |
| 225 | - this.queryParams.status = 1; | 224 | + this.openActivateTime = true; |
| 225 | + this.queryParams.status = "1"; | ||
| 226 | } | 226 | } |
| 227 | this.loading = true; | 227 | this.loading = true; |
| 228 | listTruckActivate(this.queryParams).then(response => { | 228 | listTruckActivate(this.queryParams).then(response => { |
| @@ -382,7 +382,21 @@ export default { | @@ -382,7 +382,21 @@ export default { | ||
| 382 | }).then(response => { | 382 | }).then(response => { |
| 383 | this.download(response.message); | 383 | this.download(response.message); |
| 384 | }) | 384 | }) |
| 385 | - } | 385 | + }, |
| 386 | + ConpanyNameLoadOptions(query) { | ||
| 387 | + // 根据输入的关键字query异步加载选项数据 | ||
| 388 | + this.isLoading = true | ||
| 389 | + setTimeout(() => { | ||
| 390 | + // 模拟异步加载数据 | ||
| 391 | + const data = [ | ||
| 392 | + { name:'项目1' }, | ||
| 393 | + { name:'项目2' }, | ||
| 394 | + { name:'项目3' } | ||
| 395 | + ].filter(item => item.name.includes(query)) | ||
| 396 | + this.projectNameList = data | ||
| 397 | + this.isLoading = false | ||
| 398 | + }, 200) | ||
| 399 | + }, | ||
| 386 | } | 400 | } |
| 387 | }; | 401 | }; |
| 388 | </script> | 402 | </script> |
trash-ui/src/views/casefile/violationCaseFile/violationCaseTable.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-table :data="tableData" :span-method="spanMethod" show-summary="true" :summary-method="getSummaries"> | ||
| 3 | - <el-table-column label="行政范围" header-align="center" align="center" > | 2 | + <div class="app-container"> |
| 3 | + <el-form ref="queryForm" :inline="true" label-width="105px"> | ||
| 4 | + <el-form-item label="所属区域" prop="owningRegion"> | ||
| 5 | + <el-select v-model="owningRegion" placeholder="请选择违规类型" clearable size="small"> | ||
| 6 | + <el-option v-for="item in areas" :label="item.name" :value="item.name"/> | ||
| 7 | + </el-select> | ||
| 8 | + </el-form-item> | ||
| 9 | + <el-form-item label="日期" prop="createTime"> | ||
| 10 | + <el-date-picker | ||
| 11 | + v-model="createTime" | ||
| 12 | + type="daterange" | ||
| 13 | + range-separator="至" | ||
| 14 | + start-placeholder="开始日期" | ||
| 15 | + end-placeholder="结束日期"> | ||
| 16 | + </el-date-picker> | ||
| 17 | + </el-form-item> | ||
| 18 | + <el-form-item> | ||
| 19 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 20 | + </el-form-item> | ||
| 21 | + </el-form> | ||
| 22 | + <el-table :data="tableData" :span-method="spanMethod" :show-summary="true" :summary-method="getSummaries" v-if="hackReset"> | ||
| 23 | + <el-table-column label="行政范围" header-align="center" align="center"> | ||
| 4 | <template slot-scope="scope"> | 24 | <template slot-scope="scope"> |
| 5 | - 长沙市 | 25 | + {{owningRegion!=""&&owningRegion!=null?owningRegion:"长沙市"}} |
| 6 | </template> | 26 | </template> |
| 7 | </el-table-column> | 27 | </el-table-column> |
| 8 | <el-table-column property="type" label="案卷类型" header-align="center" align="center"></el-table-column> | 28 | <el-table-column property="type" label="案卷类型" header-align="center" align="center"></el-table-column> |
| 9 | <el-table-column property="count" label="违规案卷数" header-align="center" align="center"></el-table-column> | 29 | <el-table-column property="count" label="违规案卷数" header-align="center" align="center"></el-table-column> |
| 10 | - <el-table-column property="repCount" label="违规案卷回复数" header-align="center" align="center"></el-table-column> | 30 | + <el-table-column property="repCount" label="违规案卷回复数" header-align="center" |
| 31 | + align="center"></el-table-column> | ||
| 11 | <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column> | 32 | <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column> |
| 12 | </el-table> | 33 | </el-table> |
| 34 | + </div> | ||
| 13 | </template> | 35 | </template> |
| 14 | 36 | ||
| 15 | <script> | 37 | <script> |
| 16 | 38 | ||
| 17 | import {caseTable} from "@/api/casefile/violationCaseFile"; | 39 | import {caseTable} from "@/api/casefile/violationCaseFile"; |
| 40 | +import {getAreaList} from "@/api/casefile/remoteServer"; | ||
| 18 | export default { | 41 | export default { |
| 19 | name: "caseTable", | 42 | name: "caseTable", |
| 20 | props: { | 43 | props: { |
| @@ -22,58 +45,74 @@ export default { | @@ -22,58 +45,74 @@ export default { | ||
| 22 | data() { | 45 | data() { |
| 23 | return { | 46 | return { |
| 24 | tableData:[], | 47 | tableData:[], |
| 48 | + owningRegion: "", | ||
| 49 | + createTime: [], | ||
| 50 | + areas: [], | ||
| 51 | + hackReset:false, | ||
| 25 | } | 52 | } |
| 26 | }, | 53 | }, |
| 27 | created() { | 54 | created() { |
| 28 | - caseTable().then(res=>{ | ||
| 29 | - | ||
| 30 | - this.tableData = res.data; | ||
| 31 | - | ||
| 32 | - }); | 55 | + caseTable({owningRegion:"",startDate:"",endDate:""}).then(res => { |
| 56 | + this.tableData = res.data; | ||
| 57 | + this.hackReset = true; | ||
| 58 | + }); | ||
| 59 | + getAreaList().then(res => { | ||
| 60 | + this.areas = res.data; | ||
| 61 | + }); | ||
| 33 | }, | 62 | }, |
| 34 | methods:{ | 63 | methods:{ |
| 35 | - spanMethod({ row, column, rowIndex, columnIndex }) { | ||
| 36 | - if(columnIndex == 0) { | ||
| 37 | - if(rowIndex == 0){ | ||
| 38 | - return {rowspan:300 , colspan:1} | ||
| 39 | - }else{ | ||
| 40 | - return {rowspan:0 , colspan:0} | 64 | + spanMethod({row, column, rowIndex, columnIndex}) { |
| 65 | + if (columnIndex == 0) { | ||
| 66 | + if (rowIndex == 0) { | ||
| 67 | + return {rowspan: 300, colspan: 1} | ||
| 68 | + } else { | ||
| 69 | + return {rowspan: 0, colspan: 0} | ||
| 41 | } | 70 | } |
| 42 | } | 71 | } |
| 43 | }, | 72 | }, |
| 44 | - getSummaries(param){ | ||
| 45 | - const { columns, data } = param; | ||
| 46 | - const sums = []; | 73 | + getSummaries(param) { |
| 74 | + const {columns, data} = param; | ||
| 75 | + const sums = []; | ||
| 47 | 76 | ||
| 48 | - let allCount = 0; | ||
| 49 | - let allRepCount = 0; | ||
| 50 | - for(let i in data){ | 77 | + let allCount = 0; |
| 78 | + let allRepCount = 0; | ||
| 79 | + for (let i in data) { | ||
| 51 | 80 | ||
| 52 | - allCount += Number(data[i].count ); | ||
| 53 | - allRepCount += Number(data[i].repCount ); | 81 | + allCount += Number(data[i].count); |
| 82 | + allRepCount += Number(data[i].repCount); | ||
| 54 | 83 | ||
| 55 | - } | 84 | + } |
| 56 | 85 | ||
| 57 | - columns.forEach((column, index) => { | ||
| 58 | - if (index == 0 || index == 1) { | ||
| 59 | - return; | ||
| 60 | - } | 86 | + columns.forEach((column, index) => { |
| 87 | + if (index == 0 || index == 1) { | ||
| 88 | + return; | ||
| 89 | + } | ||
| 61 | 90 | ||
| 62 | - if(index == 2){ | ||
| 63 | - sums[2] = allCount; | ||
| 64 | - } | 91 | + if (index == 2) { |
| 92 | + sums[2] = allCount; | ||
| 93 | + } | ||
| 65 | 94 | ||
| 66 | - if(index == 3){ | ||
| 67 | - sums[3] = allRepCount; | ||
| 68 | - } | 95 | + if (index == 3) { |
| 96 | + sums[3] = allRepCount; | ||
| 97 | + } | ||
| 69 | 98 | ||
| 70 | - if(index == 4){ | ||
| 71 | - sums[4] = ((allRepCount/allCount)*100 ).toFixed(2)+ "%"; | ||
| 72 | - } | ||
| 73 | - }) | 99 | + if (index == 4) { |
| 100 | + sums[4] = ((allRepCount / allCount) * 100).toFixed(2) + "%"; | ||
| 101 | + } | ||
| 102 | + }) | ||
| 74 | 103 | ||
| 75 | - return sums; | 104 | + return sums; |
| 76 | }, | 105 | }, |
| 106 | + handleQuery(){ | ||
| 107 | + console.log(this.createTime); | ||
| 108 | + caseTable({owningRegion:this.owningRegion,startDate:this.createTime[0],endDate:this.createTime[1]}).then(res => { | ||
| 109 | + this.tableData = res.data; | ||
| 110 | + this.hackReset = false; | ||
| 111 | + this.$nextTick(() => { | ||
| 112 | + this.hackReset = true | ||
| 113 | + }) | ||
| 114 | + }); | ||
| 115 | + } | ||
| 77 | 116 | ||
| 78 | } | 117 | } |
| 79 | } | 118 | } |
trash-ui/src/views/casefile/violationWarningInformation/index.vue
| @@ -272,6 +272,7 @@ import { | @@ -272,6 +272,7 @@ import { | ||
| 272 | companyList, | 272 | companyList, |
| 273 | truckList, | 273 | truckList, |
| 274 | } from "@/api/dict"; | 274 | } from "@/api/dict"; |
| 275 | +import {getEarthSitesList,getConstructionList,getCompanyList,getAreaList} from "@/api/casefile/remoteServer"; | ||
| 275 | export default { | 276 | export default { |
| 276 | name: "ViolationWarningInformation", | 277 | name: "ViolationWarningInformation", |
| 277 | components: { violationWarningInformationInfo }, | 278 | components: { violationWarningInformationInfo }, |
| @@ -366,25 +367,25 @@ export default { | @@ -366,25 +367,25 @@ export default { | ||
| 366 | }; | 367 | }; |
| 367 | }, | 368 | }, |
| 368 | created() { | 369 | created() { |
| 369 | - getArea().then(res=>{ | ||
| 370 | - | ||
| 371 | - this.areas = res.result; | 370 | + getAreaList().then(res=>{ |
| 371 | + this.areas = res.data; | ||
| 372 | }); | 372 | }); |
| 373 | 373 | ||
| 374 | 374 | ||
| 375 | - constructionsitesList(this.remoteQueryData).then(res => { | ||
| 376 | - this.projectNameList = res.result.list; | ||
| 377 | - earthsitesList(this.remoteQueryData).then(res => { | ||
| 378 | - for(var i in res.result.list){ | ||
| 379 | - this.projectNameList.push(res.result.list[i]); | ||
| 380 | - } | ||
| 381 | - }); | 375 | + getEarthSitesList().then(res => { |
| 376 | + for(var i in res.data){ | ||
| 377 | + this.projectNameList.push({name:res.data[i].name}); | ||
| 378 | + } | ||
| 379 | + }); | ||
| 380 | + getConstructionList().then(res => { | ||
| 381 | + for(var i in res.data){ | ||
| 382 | + this.projectNameList.push({name:res.data[i].name}); | ||
| 383 | + } | ||
| 382 | }); | 384 | }); |
| 383 | 385 | ||
| 384 | - console.log(this.data); | ||
| 385 | 386 | ||
| 386 | - companyList(this.remoteQueryData).then(res => { | ||
| 387 | - this.companyList = res.result.list; | 387 | + getCompanyList(this.remoteQueryData).then(res => { |
| 388 | + this.companyList = res.data; | ||
| 388 | }); | 389 | }); |
| 389 | this.getList(); | 390 | this.getList(); |
| 390 | }, | 391 | }, |
| @@ -392,7 +393,6 @@ export default { | @@ -392,7 +393,6 @@ export default { | ||
| 392 | selectArea(item){ | 393 | selectArea(item){ |
| 393 | 394 | ||
| 394 | this.form.owningRegion = item.name; | 395 | this.form.owningRegion = item.name; |
| 395 | - this.form.projectName = null; | ||
| 396 | 396 | ||
| 397 | }, | 397 | }, |
| 398 | /** 查询违规预警信息列表 */ | 398 | /** 查询违规预警信息列表 */ |
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationTable.vue
| 1 | <template> | 1 | <template> |
| 2 | - <el-table :data="tableData" :span-method="spanMethod" show-summary="true" :summary-method="getSummaries"> | ||
| 3 | - <el-table-column label="行政范围" header-align="center" align="center" > | 2 | + <div class="app-container"> |
| 3 | + <el-form ref="queryForm" :inline="true" label-width="105px"> | ||
| 4 | + <el-form-item label="所属区域" prop="owningRegion"> | ||
| 5 | + <el-select v-model="owningRegion" placeholder="请选择违规类型" clearable size="small"> | ||
| 6 | + <el-option v-for="item in areas" :label="item.name" :value="item.name"/> | ||
| 7 | + </el-select> | ||
| 8 | + </el-form-item> | ||
| 9 | + <el-form-item label="日期" prop="createTime"> | ||
| 10 | + <el-date-picker | ||
| 11 | + v-model="createTime" | ||
| 12 | + type="daterange" | ||
| 13 | + range-separator="至" | ||
| 14 | + start-placeholder="开始日期" | ||
| 15 | + end-placeholder="结束日期"> | ||
| 16 | + </el-date-picker> | ||
| 17 | + </el-form-item> | ||
| 18 | + <el-form-item> | ||
| 19 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 20 | + </el-form-item> | ||
| 21 | + </el-form> | ||
| 22 | + <el-table :data="tableData" :span-method="spanMethod" :show-summary="true" :summary-method="getSummaries" v-if="hackReset"> | ||
| 23 | + <el-table-column label="行政范围" header-align="center" align="center"> | ||
| 4 | <template slot-scope="scope"> | 24 | <template slot-scope="scope"> |
| 5 | - 长沙市 | 25 | + {{owningRegion!=""&&owningRegion!=null?owningRegion:"长沙市"}} |
| 6 | </template> | 26 | </template> |
| 7 | </el-table-column> | 27 | </el-table-column> |
| 8 | <el-table-column property="type" label="案卷类型" header-align="center" align="center"></el-table-column> | 28 | <el-table-column property="type" label="案卷类型" header-align="center" align="center"></el-table-column> |
| 9 | <el-table-column property="count" label="违规案卷数" header-align="center" align="center"></el-table-column> | 29 | <el-table-column property="count" label="违规案卷数" header-align="center" align="center"></el-table-column> |
| 10 | - <el-table-column property="repCount" label="违规案卷回复数" header-align="center" align="center"></el-table-column> | 30 | + <el-table-column property="repCount" label="违规案卷回复数" header-align="center" |
| 31 | + align="center"></el-table-column> | ||
| 11 | <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column> | 32 | <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column> |
| 12 | </el-table> | 33 | </el-table> |
| 34 | + </div> | ||
| 13 | </template> | 35 | </template> |
| 14 | 36 | ||
| 15 | <script> | 37 | <script> |
| 16 | 38 | ||
| 17 | import {caseTable} from "@/api/casefile/violationWarningInformation"; | 39 | import {caseTable} from "@/api/casefile/violationWarningInformation"; |
| 40 | +import {getAreaList} from "@/api/casefile/remoteServer"; | ||
| 41 | + | ||
| 18 | export default { | 42 | export default { |
| 19 | name: "caseTable", | 43 | name: "caseTable", |
| 20 | - props: { | ||
| 21 | - }, | 44 | + props: {}, |
| 22 | data() { | 45 | data() { |
| 23 | return { | 46 | return { |
| 24 | - tableData:[], | 47 | + tableData: [], |
| 48 | + owningRegion: "", | ||
| 49 | + createTime: [], | ||
| 50 | + areas: [], | ||
| 51 | + hackReset:false, | ||
| 25 | } | 52 | } |
| 26 | }, | 53 | }, |
| 27 | created() { | 54 | created() { |
| 28 | - caseTable().then(res=>{ | ||
| 29 | - | ||
| 30 | - this.tableData = res.data; | ||
| 31 | - | ||
| 32 | - }); | 55 | + caseTable({owningRegion:"",startDate:"",endDate:""}).then(res => { |
| 56 | + this.tableData = res.data; | ||
| 57 | + this.hackReset = true; | ||
| 58 | + }); | ||
| 59 | + getAreaList().then(res => { | ||
| 60 | + this.areas = res.data; | ||
| 61 | + }); | ||
| 33 | }, | 62 | }, |
| 34 | - methods:{ | ||
| 35 | - spanMethod({ row, column, rowIndex, columnIndex }) { | ||
| 36 | - if(columnIndex == 0) { | ||
| 37 | - if(rowIndex == 0){ | ||
| 38 | - return {rowspan:300 , colspan:1} | ||
| 39 | - }else{ | ||
| 40 | - return {rowspan:0 , colspan:0} | 63 | + methods: { |
| 64 | + spanMethod({row, column, rowIndex, columnIndex}) { | ||
| 65 | + if (columnIndex == 0) { | ||
| 66 | + if (rowIndex == 0) { | ||
| 67 | + return {rowspan: 300, colspan: 1} | ||
| 68 | + } else { | ||
| 69 | + return {rowspan: 0, colspan: 0} | ||
| 41 | } | 70 | } |
| 42 | } | 71 | } |
| 43 | }, | 72 | }, |
| 44 | - getSummaries(param){ | ||
| 45 | - const { columns, data } = param; | ||
| 46 | - const sums = []; | 73 | + getSummaries(param) { |
| 74 | + const {columns, data} = param; | ||
| 75 | + const sums = []; | ||
| 47 | 76 | ||
| 48 | - let allCount = 0; | ||
| 49 | - let allRepCount = 0; | ||
| 50 | - for(let i in data){ | 77 | + let allCount = 0; |
| 78 | + let allRepCount = 0; | ||
| 79 | + for (let i in data) { | ||
| 51 | 80 | ||
| 52 | - allCount += Number(data[i].count ); | ||
| 53 | - allRepCount += Number(data[i].repCount ); | 81 | + allCount += Number(data[i].count); |
| 82 | + allRepCount += Number(data[i].repCount); | ||
| 54 | 83 | ||
| 55 | - } | 84 | + } |
| 56 | 85 | ||
| 57 | - columns.forEach((column, index) => { | ||
| 58 | - if (index == 0 || index == 1) { | ||
| 59 | - return; | ||
| 60 | - } | 86 | + columns.forEach((column, index) => { |
| 87 | + if (index == 0 || index == 1) { | ||
| 88 | + return; | ||
| 89 | + } | ||
| 61 | 90 | ||
| 62 | - if(index == 2){ | ||
| 63 | - sums[2] = allCount; | ||
| 64 | - } | 91 | + if (index == 2) { |
| 92 | + sums[2] = allCount; | ||
| 93 | + } | ||
| 65 | 94 | ||
| 66 | - if(index == 3){ | ||
| 67 | - sums[3] = allRepCount; | ||
| 68 | - } | 95 | + if (index == 3) { |
| 96 | + sums[3] = allRepCount; | ||
| 97 | + } | ||
| 69 | 98 | ||
| 70 | - if(index == 4){ | ||
| 71 | - sums[4] = ((allRepCount/allCount)*100 ).toFixed(2)+ "%"; | ||
| 72 | - } | ||
| 73 | - }) | 99 | + if (index == 4) { |
| 100 | + sums[4] = ((allRepCount / allCount) * 100).toFixed(2) + "%"; | ||
| 101 | + } | ||
| 102 | + }) | ||
| 74 | 103 | ||
| 75 | - return sums; | 104 | + return sums; |
| 76 | }, | 105 | }, |
| 106 | + handleQuery(){ | ||
| 107 | + console.log(this.createTime); | ||
| 108 | + caseTable({owningRegion:this.owningRegion,startDate:this.createTime[0],endDate:this.createTime[1]}).then(res => { | ||
| 109 | + this.tableData = res.data; | ||
| 110 | + this.hackReset = false; | ||
| 111 | + this.$nextTick(() => { | ||
| 112 | + this.hackReset = true | ||
| 113 | + }) | ||
| 114 | + }); | ||
| 115 | + } | ||
| 77 | 116 | ||
| 78 | } | 117 | } |
| 79 | } | 118 | } |
trash-ui/src/views/office/handle/handleInfo.vue
| @@ -122,9 +122,6 @@ export default { | @@ -122,9 +122,6 @@ export default { | ||
| 122 | idInfo: { | 122 | idInfo: { |
| 123 | type: String | 123 | type: String |
| 124 | }, | 124 | }, |
| 125 | - depts: { | ||
| 126 | - type: Array | ||
| 127 | - }, | ||
| 128 | controlId: { | 125 | controlId: { |
| 129 | type: String | 126 | type: String |
| 130 | } | 127 | } |
| @@ -137,6 +134,32 @@ export default { | @@ -137,6 +134,32 @@ export default { | ||
| 137 | opinion: null, | 134 | opinion: null, |
| 138 | opinion1: null, | 135 | opinion1: null, |
| 139 | opinion2: null, | 136 | opinion2: null, |
| 137 | + depts:[ | ||
| 138 | + { | ||
| 139 | + "code": 1, | ||
| 140 | + "name": "勘察部" | ||
| 141 | + }, | ||
| 142 | + { | ||
| 143 | + "code": 2, | ||
| 144 | + "name": "科信部" | ||
| 145 | + }, | ||
| 146 | + { | ||
| 147 | + "code": 3, | ||
| 148 | + "name": "综合部" | ||
| 149 | + }, | ||
| 150 | + { | ||
| 151 | + "code": 4, | ||
| 152 | + "name": "消纳部" | ||
| 153 | + }, | ||
| 154 | + { | ||
| 155 | + "code": 5, | ||
| 156 | + "name": "行业部" | ||
| 157 | + }, | ||
| 158 | + { | ||
| 159 | + "code": 6, | ||
| 160 | + "name": "治理部" | ||
| 161 | + }, | ||
| 162 | + ] | ||
| 140 | } | 163 | } |
| 141 | }, | 164 | }, |
| 142 | created() { | 165 | created() { |
trash-ui/src/views/office/handle/index.vue
| @@ -110,18 +110,18 @@ | @@ -110,18 +110,18 @@ | ||
| 110 | </template> | 110 | </template> |
| 111 | </el-table-column> | 111 | </el-table-column> |
| 112 | <el-table-column label="公文类" align="center"> | 112 | <el-table-column label="公文类" align="center"> |
| 113 | - <el-table-column label="来文单位" align="center" prop="company" /> | 113 | + <el-table-column label="来文单位" align="center" prop="company" show-overflow-tooltip="true"/> |
| 114 | <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> | 114 | <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> |
| 115 | <template slot-scope="scope"> | 115 | <template slot-scope="scope"> |
| 116 | <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d}') }}</span> | 116 | <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d}') }}</span> |
| 117 | </template> | 117 | </template> |
| 118 | </el-table-column> | 118 | </el-table-column> |
| 119 | - <el-table-column label="文件标题" align="center" prop="title" /> | 119 | + <el-table-column label="文件标题" align="center" prop="title" show-overflow-tooltip="true"/> |
| 120 | </el-table-column> | 120 | </el-table-column> |
| 121 | <el-table-column label="信访类" align="center"> | 121 | <el-table-column label="信访类" align="center"> |
| 122 | - <el-table-column label="信访单位(人)" align="center" prop="sendPerson" /> | 122 | + <el-table-column label="信访单位(人)" align="center" prop="sendPerson" show-overflow-tooltip="true"/> |
| 123 | <el-table-column label="信访日期" align="center" prop="sendDate" /> | 123 | <el-table-column label="信访日期" align="center" prop="sendDate" /> |
| 124 | - <el-table-column label="诉求" align="center" prop="appeal" /> | 124 | + <el-table-column label="诉求" align="center" prop="appeal" show-overflow-tooltip="true"/> |
| 125 | </el-table-column> | 125 | </el-table-column> |
| 126 | <el-table-column label="审批状态" align="center" prop="status"> | 126 | <el-table-column label="审批状态" align="center" prop="status"> |
| 127 | <template slot-scope="scope"> | 127 | <template slot-scope="scope"> |
trash-ui/src/views/office/logistics/index.vue
| @@ -164,8 +164,8 @@ | @@ -164,8 +164,8 @@ | ||
| 164 | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> | 164 | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> |
| 165 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 165 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 166 | <el-form-item label="申请部门" prop="deptName"> | 166 | <el-form-item label="申请部门" prop="deptName"> |
| 167 | - <el-select v-model="form.deptName" placeholder="请输入申请部门" style="width: 100%"> | ||
| 168 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | 167 | + <el-select ref="deptIdRef" v-model="form.deptId" placeholder="请输入申请部门" style="width: 100%"> |
| 168 | + <el-option v-for="item in depts" :label="item.name" :value="item.code" :key="item.code"/> | ||
| 169 | </el-select> | 169 | </el-select> |
| 170 | </el-form-item> | 170 | </el-form-item> |
| 171 | <el-form-item label="用章类型" prop="sealType" v-if="type==0"> | 171 | <el-form-item label="用章类型" prop="sealType" v-if="type==0"> |
| @@ -403,6 +403,7 @@ export default { | @@ -403,6 +403,7 @@ export default { | ||
| 403 | /** 提交按钮 */ | 403 | /** 提交按钮 */ |
| 404 | submitForm() { | 404 | submitForm() { |
| 405 | this.form.type = this.type; | 405 | this.form.type = this.type; |
| 406 | + this.form.deptName = this.$refs.deptIdRef.selected.label; | ||
| 406 | this.$refs["form"].validate(valid => { | 407 | this.$refs["form"].validate(valid => { |
| 407 | if (valid) { | 408 | if (valid) { |
| 408 | if (this.form.id != null) { | 409 | if (this.form.id != null) { |
trash-ui/src/views/office/logistics/logisticsInfo.vue
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <el-form ref="form" :model="form" label-width="80px"> | 2 | <el-form ref="form" :model="form" label-width="80px"> |
| 3 | <el-form-item label="申请部门" prop="deptId"> | 3 | <el-form-item label="申请部门" prop="deptId"> |
| 4 | <el-select v-model="form.deptId" placeholder="请输入申请部门" style="width: 100%" :disabled="true"> | 4 | <el-select v-model="form.deptId" placeholder="请输入申请部门" style="width: 100%" :disabled="true"> |
| 5 | - <el-option v-for="item in depts" :label="item.name" :value="item.name" :key="item.code"/> | 5 | + <el-option v-for="item in depts" :label="item.name" :value="item.code" :key="item.code"/> |
| 6 | </el-select> | 6 | </el-select> |
| 7 | </el-form-item> | 7 | </el-form-item> |
| 8 | <el-form-item label="用章类型" prop="sealType" v-if="type==0"> | 8 | <el-form-item label="用章类型" prop="sealType" v-if="type==0"> |
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
| @@ -71,7 +71,7 @@ public class TruckActivateController extends BaseController | @@ -71,7 +71,7 @@ public class TruckActivateController extends BaseController | ||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | ExcelUtil<TruckActivate> util = new ExcelUtil<TruckActivate>(TruckActivate.class); | 73 | ExcelUtil<TruckActivate> util = new ExcelUtil<TruckActivate>(TruckActivate.class); |
| 74 | - return util.exportExcel(list, "truckActivate"); | 74 | + return util.exportExcel(list, "车辆激活"); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | /** | 77 | /** |
trash-workFlow/src/main/java/com/trash/business/domain/TruckActivate.java
| @@ -20,24 +20,25 @@ public class TruckActivate extends BaseEntity | @@ -20,24 +20,25 @@ public class TruckActivate extends BaseEntity | ||
| 20 | /** 序号 */ | 20 | /** 序号 */ |
| 21 | private Long id; | 21 | private Long id; |
| 22 | 22 | ||
| 23 | - /** 所属企业 */ | ||
| 24 | - @Excel(name = "所属企业") | ||
| 25 | - private String company; | 23 | + /** 所属工地 */ |
| 24 | + @Excel(name = "工地名称") | ||
| 25 | + private String construction; | ||
| 26 | 26 | ||
| 27 | /** 车牌号 | 27 | /** 车牌号 |
| 28 | */ | 28 | */ |
| 29 | @Excel(name = "车牌号") | 29 | @Excel(name = "车牌号") |
| 30 | private String licensePlate; | 30 | private String licensePlate; |
| 31 | 31 | ||
| 32 | + /** 所属企业 */ | ||
| 33 | + @Excel(name = "运输企业") | ||
| 34 | + private String company; | ||
| 35 | + | ||
| 32 | /** 失信时间 */ | 36 | /** 失信时间 */ |
| 33 | @JsonFormat(pattern = "yyyy-MM-dd") | 37 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 34 | private Date time; | 38 | private Date time; |
| 35 | 39 | ||
| 36 | - /** 所属工地 */ | ||
| 37 | - @Excel(name = "所属工地") | ||
| 38 | - private String construction; | ||
| 39 | - | ||
| 40 | /** 状态 0当前 1历史 */ | 40 | /** 状态 0当前 1历史 */ |
| 41 | + @Excel(name = "激活状态", readConverterExp = "1=未激活,0=已激活") | ||
| 41 | private Long status; | 42 | private Long status; |
| 42 | 43 | ||
| 43 | /** 消纳场 */ | 44 | /** 消纳场 */ |
| @@ -51,18 +52,25 @@ public class TruckActivate extends BaseEntity | @@ -51,18 +52,25 @@ public class TruckActivate extends BaseEntity | ||
| 51 | private Integer createType; | 52 | private Integer createType; |
| 52 | 53 | ||
| 53 | /** 激活时间 */ | 54 | /** 激活时间 */ |
| 54 | - @JsonFormat(pattern = "yyyy-MM-dd") | ||
| 55 | - @Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd") | 55 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 56 | + @Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") | ||
| 56 | private Date activateTime; | 57 | private Date activateTime; |
| 57 | 58 | ||
| 58 | - @Excel(name = "状态") | 59 | + |
| 59 | private String isAct; | 60 | private String isAct; |
| 60 | 61 | ||
| 61 | private String startTime; | 62 | private String startTime; |
| 62 | private String endTime; | 63 | private String endTime; |
| 63 | 64 | ||
| 64 | - | ||
| 65 | - | 65 | + private String activateDate; |
| 66 | + | ||
| 67 | + public String getActivateDate() { | ||
| 68 | + return activateDate; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setActivateDate(String activateDate) { | ||
| 72 | + this.activateDate = activateDate; | ||
| 73 | + } | ||
| 66 | 74 | ||
| 67 | public String getStartTime() { | 75 | public String getStartTime() { |
| 68 | return startTime; | 76 | return startTime; |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| 1 | package com.trash.business.service.impl; | 1 | package com.trash.business.service.impl; |
| 2 | 2 | ||
| 3 | +import java.text.DateFormat; | ||
| 3 | import java.text.SimpleDateFormat; | 4 | import java.text.SimpleDateFormat; |
| 4 | import java.util.Date; | 5 | import java.util.Date; |
| 5 | import java.util.List; | 6 | import java.util.List; |
| 6 | import com.trash.common.utils.DateUtils; | 7 | import com.trash.common.utils.DateUtils; |
| 8 | +import org.apache.commons.lang3.time.DateFormatUtils; | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 9 | 11 | ||
| @@ -52,6 +54,10 @@ public class TruckActivateServiceImpl implements ITruckActivateService | @@ -52,6 +54,10 @@ public class TruckActivateServiceImpl implements ITruckActivateService | ||
| 52 | @Override | 54 | @Override |
| 53 | public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate) | 55 | public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate) |
| 54 | { | 56 | { |
| 57 | + if(truckActivate.getActivateTime()!=null){ | ||
| 58 | + truckActivate.setActivateDate(DateFormatUtils.format(truckActivate.getActivateTime(),"yyyy-MM-dd")); | ||
| 59 | + } | ||
| 60 | + | ||
| 55 | return truckActivateMapper.selectTruckActivateList(truckActivate); | 61 | return truckActivateMapper.selectTruckActivateList(truckActivate); |
| 56 | } | 62 | } |
| 57 | 63 |
trash-workFlow/src/main/java/com/trash/casefile/controller/RemoteServerController.java
0 → 100644
| 1 | +package com.trash.casefile.controller; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSONArray; | ||
| 4 | +import com.trash.common.core.domain.AjaxResult; | ||
| 5 | +import com.trash.common.core.redis.RedisCache; | ||
| 6 | +import com.trash.common.utils.RemoteServerUtils; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import java.util.HashMap; | ||
| 13 | +import java.util.Map; | ||
| 14 | +import java.util.concurrent.TimeUnit; | ||
| 15 | + | ||
| 16 | +@RestController | ||
| 17 | +@RequestMapping("/remoteServer") | ||
| 18 | +public class RemoteServerController { | ||
| 19 | + | ||
| 20 | + @Autowired | ||
| 21 | + RedisCache redisCache; | ||
| 22 | + | ||
| 23 | + @PostMapping("/getConstructionList") | ||
| 24 | + public AjaxResult getConstructionList(){ | ||
| 25 | + JSONArray jsonArray = redisCache.getCacheObject("constructionList"); | ||
| 26 | + if(jsonArray==null||jsonArray.size()==0){ | ||
| 27 | + Map<String, Object> map = new HashMap<>(); | ||
| 28 | + map.put("size",999); | ||
| 29 | + map.put("page",1); | ||
| 30 | + jsonArray = RemoteServerUtils.getConstructionList(map); | ||
| 31 | + if(jsonArray!=null&&jsonArray.size()>0){ | ||
| 32 | + redisCache.setCacheObject("constructionList",jsonArray,1, TimeUnit.HOURS); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + } | ||
| 36 | + return AjaxResult.success(jsonArray); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + @PostMapping("/getEarthSitesList") | ||
| 40 | + public AjaxResult getEarthSitesList(){ | ||
| 41 | + JSONArray jsonArray = redisCache.getCacheObject("earthSitesList"); | ||
| 42 | + if(jsonArray==null||jsonArray.size()==0){ | ||
| 43 | + Map<String, Object> map = new HashMap<>(); | ||
| 44 | + map.put("size",999); | ||
| 45 | + map.put("page",1); | ||
| 46 | + jsonArray = RemoteServerUtils.getEarthSitesList(map); | ||
| 47 | + if(jsonArray!=null&&jsonArray.size()>0) { | ||
| 48 | + redisCache.setCacheObject("earthSitesList",jsonArray,1, TimeUnit.HOURS); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + return AjaxResult.success(jsonArray); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + @PostMapping("/getAreaList") | ||
| 56 | + public AjaxResult getAreaList(){ | ||
| 57 | + JSONArray jsonArray = redisCache.getCacheObject("areaList"); | ||
| 58 | + if(jsonArray==null||jsonArray.size()==0){ | ||
| 59 | + jsonArray = RemoteServerUtils.getAreas(); | ||
| 60 | + if(jsonArray!=null&&jsonArray.size()>0) { | ||
| 61 | + redisCache.setCacheObject("areaList", jsonArray, 1, TimeUnit.HOURS); | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + return AjaxResult.success(jsonArray); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @PostMapping("/getCompanyList") | ||
| 68 | + public AjaxResult getCompanyList(){ | ||
| 69 | + JSONArray jsonArray = redisCache.getCacheObject("companyList"); | ||
| 70 | + if(jsonArray==null||jsonArray.size()==0){ | ||
| 71 | + Map<String, Object> map = new HashMap<>(); | ||
| 72 | + map.put("size",999); | ||
| 73 | + map.put("page",1); | ||
| 74 | + jsonArray = RemoteServerUtils.getCompanyList(map); | ||
| 75 | + if(jsonArray!=null&&jsonArray.size()>0) { | ||
| 76 | + redisCache.setCacheObject("companyList", jsonArray, 1, TimeUnit.HOURS); | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + return AjaxResult.success(jsonArray); | ||
| 80 | + } | ||
| 81 | +} |
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
| @@ -134,12 +134,15 @@ public class ViolationCaseFileController extends BaseController | @@ -134,12 +134,15 @@ public class ViolationCaseFileController extends BaseController | ||
| 134 | "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"}; | 134 | "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"}; |
| 135 | 135 | ||
| 136 | @GetMapping(value = "/caseTable") | 136 | @GetMapping(value = "/caseTable") |
| 137 | - public AjaxResult getTable(){ | 137 | + public AjaxResult getTable(String owningRegion,String startDate,String endDate){ |
| 138 | List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>(); | 138 | List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>(); |
| 139 | + | ||
| 140 | + if(startDate != null && endDate != null&&startDate!=""&&endDate!=""){ | ||
| 141 | + startDate = startDate.substring(0,10); | ||
| 142 | + endDate = endDate.substring(0,10); | ||
| 143 | + } | ||
| 139 | 144 | ||
| 140 | - | ||
| 141 | - | ||
| 142 | - List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(new ViolationCaseFile()); | 145 | + List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileListByTable(owningRegion,startDate,endDate); |
| 143 | 146 | ||
| 144 | for(String type:caseType){ | 147 | for(String type:caseType){ |
| 145 | 148 |
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationWarningInformationController.java
| @@ -2,10 +2,12 @@ package com.trash.casefile.controller; | @@ -2,10 +2,12 @@ package com.trash.casefile.controller; | ||
| 2 | 2 | ||
| 3 | import java.io.IOException; | 3 | import java.io.IOException; |
| 4 | import java.util.ArrayList; | 4 | import java.util.ArrayList; |
| 5 | +import java.util.Date; | ||
| 5 | import java.util.HashMap; | 6 | import java.util.HashMap; |
| 6 | import java.util.List; | 7 | import java.util.List; |
| 7 | 8 | ||
| 8 | import com.alibaba.fastjson.JSON; | 9 | import com.alibaba.fastjson.JSON; |
| 10 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 9 | import com.trash.casefile.domain.ViolationCaseFile; | 11 | import com.trash.casefile.domain.ViolationCaseFile; |
| 10 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; | 12 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; |
| 11 | import com.trash.common.utils.DateUtils; | 13 | import com.trash.common.utils.DateUtils; |
| @@ -127,18 +129,21 @@ public class ViolationWarningInformationController extends BaseController | @@ -127,18 +129,21 @@ public class ViolationWarningInformationController extends BaseController | ||
| 127 | } | 129 | } |
| 128 | 130 | ||
| 129 | 131 | ||
| 130 | - String[] caseType = {"进入非专用车辆","无许可手续(工)","无许可手续(消)","黄土覆盖情况","出入口路面污染","出入口道路硬化","车辆冲洗是否到位", | ||
| 131 | - "雾炮机是否正常开启","使用费专用车运输","监控点位未对准","未报开工作业","视频设备离线超时报警","三无车辆进入工地","未按时间作业", | ||
| 132 | - "未报开工作业","视频设备离线超时报警","三无车辆进入消纳场","未到指定的消纳场作业","离线运输报警(工)","离线运输报警(消)","未激活车辆作业", | ||
| 133 | - "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"}; | 132 | + String[] caseType = {"工地预警-未报开工作业", "工地预警-视频设备离线超时报警", "工地预警-三无车辆进入工地", "工地预警-未按时间作业", |
| 133 | + "消纳场预警-未报开工作业", "消纳场预警-视频设备离线超时报警", "消纳场预警-三无车辆进入消纳场", "消纳场预警-未到指定的消纳场作业", | ||
| 134 | + "离线运输报警(工)", "离线运输报警(消)", "未激活车辆作业", "未核准作业车辆作业", "未按线路行驶", | ||
| 135 | + "闯禁行驶", "失信车辆作业"}; | ||
| 134 | 136 | ||
| 135 | @GetMapping(value = "/caseTable") | 137 | @GetMapping(value = "/caseTable") |
| 136 | - public AjaxResult getTable(){ | 138 | + public AjaxResult getTable(String owningRegion,String startDate,String endDate){ |
| 137 | List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>(); | 139 | List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>(); |
| 138 | 140 | ||
| 139 | 141 | ||
| 140 | - | ||
| 141 | - List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationList(new ViolationWarningInformation()); | 142 | + if(startDate != null && endDate != null&&startDate!=""&&endDate!=""){ |
| 143 | + startDate = startDate.substring(0,10); | ||
| 144 | + endDate = endDate.substring(0,10); | ||
| 145 | + } | ||
| 146 | + List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate); | ||
| 142 | 147 | ||
| 143 | for(String type:caseType){ | 148 | for(String type:caseType){ |
| 144 | 149 |
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
| @@ -77,7 +77,17 @@ public class ViolationCaseFile extends BaseEntity | @@ -77,7 +77,17 @@ public class ViolationCaseFile extends BaseEntity | ||
| 77 | @Excel(name = "阅览时间", width = 30, dateFormat = "yyyy-MM-dd") | 77 | @Excel(name = "阅览时间", width = 30, dateFormat = "yyyy-MM-dd") |
| 78 | private Date readTime; | 78 | private Date readTime; |
| 79 | 79 | ||
| 80 | - public void setId(Long id) | 80 | + private String abbreviation; |
| 81 | + | ||
| 82 | + public String getAbbreviation() { | ||
| 83 | + return abbreviation; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public void setAbbreviation(String abbreviation) { | ||
| 87 | + this.abbreviation = abbreviation; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public void setId(Long id) | ||
| 81 | { | 91 | { |
| 82 | this.id = id; | 92 | this.id = id; |
| 83 | } | 93 | } |
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
| @@ -63,14 +63,14 @@ public class Consumer { | @@ -63,14 +63,14 @@ public class Consumer { | ||
| 63 | loginService.loginByRemote(trashConfig.getToken()); | 63 | loginService.loginByRemote(trashConfig.getToken()); |
| 64 | } | 64 | } |
| 65 | ViolationWarningInformation violationWarningInformation1 = null; | 65 | ViolationWarningInformation violationWarningInformation1 = null; |
| 66 | - JSONArray company1 = redisCache.getCacheObject("company"); | 66 | + JSONArray company1 = redisCache.getCacheObject("companyList"); |
| 67 | JSONObject basevehicleInfo = RemoteServerUtils.getBasevehicleInfo(jsonObject.getString("vehicleId"),trashConfig.getToken()); | 67 | JSONObject basevehicleInfo = RemoteServerUtils.getBasevehicleInfo(jsonObject.getString("vehicleId"),trashConfig.getToken()); |
| 68 | if(company1==null){ | 68 | if(company1==null){ |
| 69 | Map map = new HashMap<>(); | 69 | Map map = new HashMap<>(); |
| 70 | map.put("size",9999); | 70 | map.put("size",9999); |
| 71 | map.put("page",1); | 71 | map.put("page",1); |
| 72 | company1 = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); | 72 | company1 = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); |
| 73 | - redisCache.setCacheObject("company",company1,1, TimeUnit.HOURS); | 73 | + redisCache.setCacheObject("companyList",company1,1, TimeUnit.HOURS); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | //这两种类型无需累加 | 76 | //这两种类型无需累加 |
trash-workFlow/src/main/java/com/trash/casefile/mapper/ViolationCaseFileMapper.java
| @@ -2,6 +2,7 @@ package com.trash.casefile.mapper; | @@ -2,6 +2,7 @@ package com.trash.casefile.mapper; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import com.trash.casefile.domain.ViolationCaseFile; | 4 | import com.trash.casefile.domain.ViolationCaseFile; |
| 5 | +import org.apache.ibatis.annotations.Param; | ||
| 5 | 6 | ||
| 6 | /** | 7 | /** |
| 7 | * 平台违规案卷Mapper接口 | 8 | * 平台违规案卷Mapper接口 |
| @@ -27,6 +28,8 @@ public interface ViolationCaseFileMapper | @@ -27,6 +28,8 @@ public interface ViolationCaseFileMapper | ||
| 27 | */ | 28 | */ |
| 28 | List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile); | 29 | List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile); |
| 29 | 30 | ||
| 31 | + List<ViolationCaseFile> selectViolationCaseFileListByTable(@Param("owningRegion") String owningRegion, @Param("startDate")String startDate, @Param("endDate")String endDate); | ||
| 32 | + | ||
| 30 | /** | 33 | /** |
| 31 | * 新增平台违规案卷 | 34 | * 新增平台违规案卷 |
| 32 | * | 35 | * |
trash-workFlow/src/main/java/com/trash/casefile/mapper/ViolationWarningInformationMapper.java
| @@ -37,7 +37,7 @@ public interface ViolationWarningInformationMapper | @@ -37,7 +37,7 @@ public interface ViolationWarningInformationMapper | ||
| 37 | * @return 违规预警信息集合 | 37 | * @return 违规预警信息集合 |
| 38 | */ | 38 | */ |
| 39 | List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation); | 39 | List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation); |
| 40 | - | 40 | + List<ViolationWarningInformation> selectViolationWarningInformationListByTable(@Param("owningRegion") String owningRegion,@Param("startDate")String startDate,@Param("endDate")String endDate); |
| 41 | /** | 41 | /** |
| 42 | * 新增违规预警信息 | 42 | * 新增违规预警信息 |
| 43 | * | 43 | * |
trash-workFlow/src/main/java/com/trash/casefile/service/IViolationCaseFileService.java
| @@ -30,6 +30,8 @@ public interface IViolationCaseFileService | @@ -30,6 +30,8 @@ public interface IViolationCaseFileService | ||
| 30 | */ | 30 | */ |
| 31 | List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile); | 31 | List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile); |
| 32 | 32 | ||
| 33 | + List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate); | ||
| 34 | + | ||
| 33 | /** | 35 | /** |
| 34 | * 新增平台违规案卷 | 36 | * 新增平台违规案卷 |
| 35 | * | 37 | * |
trash-workFlow/src/main/java/com/trash/casefile/service/IViolationWarningInformationService.java
| @@ -32,6 +32,8 @@ public interface IViolationWarningInformationService { | @@ -32,6 +32,8 @@ public interface IViolationWarningInformationService { | ||
| 32 | */ | 32 | */ |
| 33 | List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation); | 33 | List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation); |
| 34 | 34 | ||
| 35 | + List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate,String endDate); | ||
| 36 | + | ||
| 35 | /** | 37 | /** |
| 36 | * 新增违规预警信息 | 38 | * 新增违规预警信息 |
| 37 | * | 39 | * |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
| @@ -5,6 +5,9 @@ import java.sql.Date; | @@ -5,6 +5,9 @@ import java.sql.Date; | ||
| 5 | import java.util.List; | 5 | import java.util.List; |
| 6 | import java.util.stream.Collectors; | 6 | import java.util.stream.Collectors; |
| 7 | 7 | ||
| 8 | +import com.alibaba.fastjson.JSONArray; | ||
| 9 | +import com.alibaba.fastjson.JSONObject; | ||
| 10 | +import com.trash.common.core.redis.RedisCache; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 10 | import org.springframework.transaction.annotation.Transactional; | 13 | import org.springframework.transaction.annotation.Transactional; |
| @@ -37,6 +40,9 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | @@ -37,6 +40,9 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | ||
| 37 | 40 | ||
| 38 | @Autowired | 41 | @Autowired |
| 39 | IWorkflowService WorkflowService; | 42 | IWorkflowService WorkflowService; |
| 43 | + | ||
| 44 | + @Autowired | ||
| 45 | + RedisCache redisCache; | ||
| 40 | /** | 46 | /** |
| 41 | * 查询平台违规案卷 | 47 | * 查询平台违规案卷 |
| 42 | * | 48 | * |
| @@ -68,6 +74,12 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | @@ -68,6 +74,12 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | ||
| 68 | return violationCaseFileMapper.selectViolationCaseFileList(violationCaseFile); | 74 | return violationCaseFileMapper.selectViolationCaseFileList(violationCaseFile); |
| 69 | } | 75 | } |
| 70 | 76 | ||
| 77 | + @Override | ||
| 78 | + public List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate) | ||
| 79 | + { | ||
| 80 | + return violationCaseFileMapper.selectViolationCaseFileListByTable(owningRegion,startDate,endDate); | ||
| 81 | + } | ||
| 82 | + | ||
| 71 | /** | 83 | /** |
| 72 | * 新增平台违规案卷 | 84 | * 新增平台违规案卷 |
| 73 | * | 85 | * |
| @@ -82,6 +94,14 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | @@ -82,6 +94,14 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService | ||
| 82 | violationCaseFile.setStatus(0); | 94 | violationCaseFile.setStatus(0); |
| 83 | 95 | ||
| 84 | violationCaseFile.setCreateTime(DateUtils.getNowDate()); | 96 | violationCaseFile.setCreateTime(DateUtils.getNowDate()); |
| 97 | + | ||
| 98 | + JSONArray companyList = redisCache.getCacheObject("companyList"); | ||
| 99 | + for(Object o:companyList){ | ||
| 100 | + JSONObject jo = (JSONObject) o; | ||
| 101 | + if(violationCaseFile.getCompanyName().equals(jo.getString("name"))){ | ||
| 102 | + violationCaseFile.setAbbreviation(jo.getString("abbreviation")); | ||
| 103 | + } | ||
| 104 | + } | ||
| 85 | 105 | ||
| 86 | Integer result = violationCaseFileMapper.insertViolationCaseFile(violationCaseFile); | 106 | Integer result = violationCaseFileMapper.insertViolationCaseFile(violationCaseFile); |
| 87 | //文件上传 | 107 | //文件上传 |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
| @@ -4,8 +4,11 @@ import java.io.IOException; | @@ -4,8 +4,11 @@ import java.io.IOException; | ||
| 4 | import java.util.List; | 4 | import java.util.List; |
| 5 | import java.util.stream.Collectors; | 5 | import java.util.stream.Collectors; |
| 6 | 6 | ||
| 7 | +import com.alibaba.fastjson.JSONArray; | ||
| 8 | +import com.alibaba.fastjson.JSONObject; | ||
| 7 | import com.trash.casefile.domain.ViolationCaseFile; | 9 | import com.trash.casefile.domain.ViolationCaseFile; |
| 8 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; | 10 | import com.trash.casefile.domain.vo.ViolationWarningInformationVo; |
| 11 | +import com.trash.common.core.redis.RedisCache; | ||
| 9 | import com.trash.common.utils.DateUtils; | 12 | import com.trash.common.utils.DateUtils; |
| 10 | import com.trash.common.utils.SecurityUtils; | 13 | import com.trash.common.utils.SecurityUtils; |
| 11 | import com.trash.common.utils.StringUtils; | 14 | import com.trash.common.utils.StringUtils; |
| @@ -39,7 +42,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -39,7 +42,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 39 | private UploadFileMapper uploadFileMapper; | 42 | private UploadFileMapper uploadFileMapper; |
| 40 | @Autowired | 43 | @Autowired |
| 41 | IWorkflowService WorkflowService; | 44 | IWorkflowService WorkflowService; |
| 42 | - | 45 | + @Autowired |
| 46 | + RedisCache redisCache; | ||
| 43 | /** | 47 | /** |
| 44 | * 查询违规预警信息 | 48 | * 查询违规预警信息 |
| 45 | * | 49 | * |
| @@ -70,6 +74,12 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -70,6 +74,12 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 70 | return violationWarningInformationMapper.selectViolationWarningInformationList(violationWarningInformation); | 74 | return violationWarningInformationMapper.selectViolationWarningInformationList(violationWarningInformation); |
| 71 | } | 75 | } |
| 72 | 76 | ||
| 77 | + @Override | ||
| 78 | + public List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate,String endDate) | ||
| 79 | + { | ||
| 80 | + return violationWarningInformationMapper.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate); | ||
| 81 | + } | ||
| 82 | + | ||
| 73 | /** | 83 | /** |
| 74 | * 新增违规预警信息 | 84 | * 新增违规预警信息 |
| 75 | * | 85 | * |
| @@ -82,6 +92,13 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -82,6 +92,13 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 82 | if(StringUtils.isEmpty(violationWarningInformation.getCreateBy())){ | 92 | if(StringUtils.isEmpty(violationWarningInformation.getCreateBy())){ |
| 83 | violationWarningInformation.setCreateBy(SecurityUtils.getUsername()); | 93 | violationWarningInformation.setCreateBy(SecurityUtils.getUsername()); |
| 84 | } | 94 | } |
| 95 | + JSONArray companyList = redisCache.getCacheObject("companyList"); | ||
| 96 | + for(Object o:companyList){ | ||
| 97 | + JSONObject jo = (JSONObject) o; | ||
| 98 | + if(violationWarningInformation.getCompanyName().equals(jo.getString("name"))){ | ||
| 99 | + violationWarningInformation.setAbbreviation(jo.getString("abbreviation")); | ||
| 100 | + } | ||
| 101 | + } | ||
| 85 | violationWarningInformation.setCreateTime(DateUtils.getNowDate()); | 102 | violationWarningInformation.setCreateTime(DateUtils.getNowDate()); |
| 86 | violationWarningInformation.setStatus(0); | 103 | violationWarningInformation.setStatus(0); |
| 87 | Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation); | 104 | Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation); |
trash-workFlow/src/main/java/com/trash/office/service/impl/HandleAffairsServiceImpl.java
| @@ -62,11 +62,13 @@ public class HandleAffairsServiceImpl implements IHandleAffairsService { | @@ -62,11 +62,13 @@ public class HandleAffairsServiceImpl implements IHandleAffairsService { | ||
| 62 | public HandleAffairsVo selectHandleAffairsById(Long id) { | 62 | public HandleAffairsVo selectHandleAffairsById(Long id) { |
| 63 | HandleAffairsVo handleAffairsVo = new HandleAffairsVo(); | 63 | HandleAffairsVo handleAffairsVo = new HandleAffairsVo(); |
| 64 | handleAffairsVo.setHandleAffairs(handleAffairsMapper.selectHandleAffairsById(id)); | 64 | handleAffairsVo.setHandleAffairs(handleAffairsMapper.selectHandleAffairsById(id)); |
| 65 | - UploadFile uploadFile = new UploadFile(); | ||
| 66 | - uploadFile.setTableName("handle_affairs"); | ||
| 67 | - uploadFile.setTableNumber(handleAffairsVo.getHandleAffairs().getId().toString()); | ||
| 68 | - List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 69 | - handleAffairsVo.setUploadFiles(list); | 65 | + if(handleAffairsVo.getHandleAffairs()!=null){ |
| 66 | + UploadFile uploadFile = new UploadFile(); | ||
| 67 | + uploadFile.setTableName("handle_affairs"); | ||
| 68 | + uploadFile.setTableNumber(handleAffairsVo.getHandleAffairs().getId().toString()); | ||
| 69 | + List<UploadFile> list = uploadFileMapper.selectUploadFileList(uploadFile); | ||
| 70 | + handleAffairsVo.setUploadFiles(list); | ||
| 71 | + } | ||
| 70 | return handleAffairsVo; | 72 | return handleAffairsVo; |
| 71 | } | 73 | } |
| 72 | 74 |
trash-workFlow/src/main/java/com/trash/office/service/impl/LogisticsManagementServiceImpl.java
| @@ -203,9 +203,8 @@ public class LogisticsManagementServiceImpl implements ILogisticsManagementServi | @@ -203,9 +203,8 @@ public class LogisticsManagementServiceImpl implements ILogisticsManagementServi | ||
| 203 | Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | 203 | Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); |
| 204 | 204 | ||
| 205 | if (task != null) { | 205 | if (task != null) { |
| 206 | - if(route==2){ | ||
| 207 | - task.setDescription(SecurityUtils.getLoginUser().getUser().getRoleIds().get(0)); | ||
| 208 | - } | 206 | + //将申请部门加入到审批流里 |
| 207 | + task.setDescription(logisticsManagement.getDeptId().toString()); | ||
| 209 | 208 | ||
| 210 | List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | 209 | List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); |
| 211 | 210 |
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
| @@ -57,537 +57,526 @@ import com.trash.workflow.service.IWorkflowService; | @@ -57,537 +57,526 @@ import com.trash.workflow.service.IWorkflowService; | ||
| 57 | @Service | 57 | @Service |
| 58 | public class WorkflowServiceImpl implements IWorkflowService { | 58 | public class WorkflowServiceImpl implements IWorkflowService { |
| 59 | 59 | ||
| 60 | - @Autowired | ||
| 61 | - private WorkflowMapper workflowMapper; | ||
| 62 | - @Autowired | ||
| 63 | - private ProcessRuntime processRuntime; | ||
| 64 | - @Autowired | ||
| 65 | - private ISysUserService sysUserService; | ||
| 66 | - @Autowired | ||
| 67 | - private TaskService taskService; | 60 | + @Autowired |
| 61 | + private WorkflowMapper workflowMapper; | ||
| 62 | + @Autowired | ||
| 63 | + private ProcessRuntime processRuntime; | ||
| 64 | + @Autowired | ||
| 65 | + private ISysUserService sysUserService; | ||
| 66 | + @Autowired | ||
| 67 | + private TaskService taskService; | ||
| 68 | 68 | ||
| 69 | - @Autowired | ||
| 70 | - private TaskRuntime taskRuntime; | 69 | + @Autowired |
| 70 | + private TaskRuntime taskRuntime; | ||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | - @Autowired | ||
| 74 | - com.trash.common.config.trashConfig trashConfig; | 73 | + @Autowired |
| 74 | + com.trash.common.config.trashConfig trashConfig; | ||
| 75 | 75 | ||
| 76 | - @Autowired | ||
| 77 | - SysLoginService loginService; | 76 | + @Autowired |
| 77 | + SysLoginService loginService; | ||
| 78 | 78 | ||
| 79 | - String siteType[] = { "消纳场", "建筑垃圾资源化处置场", "盾构土环保处置场", "盾构土应急消纳场", "回填场" }; | 79 | + String siteType[] = {"消纳场", "建筑垃圾资源化处置场", "盾构土环保处置场", "盾构土应急消纳场", "回填场"}; |
| 80 | 80 | ||
| 81 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 81 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 82 | 82 | ||
| 83 | - @Autowired | ||
| 84 | - RuntimeService runtimeService; | 83 | + @Autowired |
| 84 | + RuntimeService runtimeService; | ||
| 85 | 85 | ||
| 86 | - @Autowired | ||
| 87 | - ISupervisionThreestepService server; | 86 | + @Autowired |
| 87 | + ISupervisionThreestepService server; | ||
| 88 | 88 | ||
| 89 | - @Autowired | ||
| 90 | - RedisCache redisCache; | 89 | + @Autowired |
| 90 | + RedisCache redisCache; | ||
| 91 | 91 | ||
| 92 | - @Override | ||
| 93 | - @Transactional | ||
| 94 | - public int createWorkFlow(Map<String, Object> data) { //第三方通用接收接口 | 92 | + @Override |
| 93 | + @Transactional | ||
| 94 | + public int createWorkFlow(Map<String, Object> data) { //第三方通用接收接口 | ||
| 95 | + | ||
| 96 | + String flowType = data.get("type").toString(); | ||
| 97 | + | ||
| 98 | + Map map = (Map) data.get("data"); | ||
| 99 | + | ||
| 100 | + String businessKey = flowType + ":" + map.get("id"); // 流程对应事务key | ||
| 101 | + String title = map.get("title").toString(); | ||
| 95 | 102 | ||
| 96 | - String flowType = data.get("type").toString(); | 103 | + String reason = map.get("reason").toString(); |
| 104 | + String startTime = map.get("startTime").toString(); | ||
| 105 | + String endTime = map.get("endTime").toString(); | ||
| 97 | 106 | ||
| 98 | - Map map = (Map) data.get("data"); | 107 | + ProcessInstance processInstance = null; |
| 99 | 108 | ||
| 100 | - String businessKey = flowType + ":" + map.get("id"); // 流程对应事务key | ||
| 101 | - String title = map.get("title").toString(); | 109 | + try { |
| 102 | 110 | ||
| 103 | - String reason = map.get("reason").toString(); | ||
| 104 | - String startTime = map.get("startTime").toString(); | ||
| 105 | - String endTime = map.get("endTime").toString(); | 111 | + processInstance = processRuntime.start(ProcessPayloadBuilder.start().withProcessDefinitionKey(flowType) |
| 112 | + .withName(title).withBusinessKey(businessKey).build()); | ||
| 106 | 113 | ||
| 107 | - ProcessInstance processInstance = null; | ||
| 108 | 114 | ||
| 109 | - try { | 115 | + if (flowType.equals("workflow_earthsites")) { |
| 116 | + JSONObject earthsites = RemoteServerUtils.getEarthSitesInfo(map.get("id").toString()); | ||
| 110 | 117 | ||
| 111 | - processInstance = processRuntime.start(ProcessPayloadBuilder.start().withProcessDefinitionKey(flowType) | ||
| 112 | - .withName(title).withBusinessKey(businessKey).build()); | 118 | + if (earthsites != null) { |
| 119 | + updateProcess(processInstance, earthsites.getString("areaName")); | ||
| 120 | + } | ||
| 121 | + } | ||
| 113 | 122 | ||
| 114 | - | ||
| 115 | - if(flowType.equals("workflow_earthsites")){ | ||
| 116 | - JSONObject earthsites = RemoteServerUtils.getEarthSitesInfo(map.get("id").toString()); | ||
| 117 | - | ||
| 118 | - if(earthsites != null){ | ||
| 119 | - updateProcess(processInstance,earthsites.getString("areaName")); | ||
| 120 | - } | ||
| 121 | - } | ||
| 122 | - | ||
| 123 | - Workflow workflow = new Workflow(); | ||
| 124 | - workflow.setId(businessKey); | ||
| 125 | - workflow.setTitle(title); | ||
| 126 | - workflow.setReason(reason); | ||
| 127 | - workflow.setStartTime(startTime); | ||
| 128 | - workflow.setEndTime(endTime); | ||
| 129 | - workflow.setType(map.get("type").toString()); | ||
| 130 | - workflow.setInstanceId(processInstance.getId()); | ||
| 131 | - workflow.setState("0"); | ||
| 132 | - | ||
| 133 | - | 123 | + Workflow workflow = new Workflow(); |
| 124 | + workflow.setId(businessKey); | ||
| 125 | + workflow.setTitle(title); | ||
| 126 | + workflow.setReason(reason); | ||
| 127 | + workflow.setStartTime(startTime); | ||
| 128 | + workflow.setEndTime(endTime); | ||
| 129 | + workflow.setType(map.get("type").toString()); | ||
| 130 | + workflow.setInstanceId(processInstance.getId()); | ||
| 131 | + workflow.setState("0"); | ||
| 134 | 132 | ||
| 135 | - return workflowMapper.insertWorkflow(workflow); | ||
| 136 | - } catch (Exception e) { | ||
| 137 | 133 | ||
| 138 | - processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | 134 | + return workflowMapper.insertWorkflow(workflow); |
| 135 | + } catch (Exception e) { | ||
| 139 | 136 | ||
| 140 | - e.printStackTrace(); | ||
| 141 | - } | 137 | + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); |
| 138 | + | ||
| 139 | + e.printStackTrace(); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + return 0; | ||
| 143 | + } | ||
| 142 | 144 | ||
| 143 | - return 0; | ||
| 144 | - } | ||
| 145 | 145 | ||
| 146 | - | ||
| 147 | @Override | 146 | @Override |
| 148 | @Transactional | 147 | @Transactional |
| 149 | - public int createLeaveWorkFlow(Workflow workflow,int index) { | ||
| 150 | - ProcessInstance processInstance = null; | ||
| 151 | - | ||
| 152 | - try { | ||
| 153 | - | ||
| 154 | - processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 155 | - .start() | ||
| 156 | - .withProcessDefinitionKey("workflow_leave") | ||
| 157 | - .withName(workflow.getTitle()) | ||
| 158 | - .withBusinessKey(workflow.getId()) | ||
| 159 | - .withVariable("route",index) | ||
| 160 | - .build()); | ||
| 161 | - | ||
| 162 | - | ||
| 163 | - Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 164 | - | ||
| 165 | - if(task != null){ | ||
| 166 | - | ||
| 167 | - task.setDescription(SecurityUtils.getLoginUser().getUser().getRoleIds().get(0)); | ||
| 168 | - | ||
| 169 | - List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | ||
| 170 | - | ||
| 171 | - if(list.size() == 1){ | ||
| 172 | - taskService.addCandidateUser(task.getId(), task.getDescription()); | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | - taskService.saveTask(task); | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - | ||
| 179 | - workflow.setInstanceId(processInstance.getId()); | ||
| 180 | - | ||
| 181 | - return workflowMapper.insertWorkflow(workflow); | ||
| 182 | - } catch (Exception e) { | ||
| 183 | - | ||
| 184 | - processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 185 | - | ||
| 186 | - e.printStackTrace(); | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - return 0; | 148 | + public int createLeaveWorkFlow(Workflow workflow, int index) { |
| 149 | + ProcessInstance processInstance = null; | ||
| 150 | + | ||
| 151 | + try { | ||
| 152 | + | ||
| 153 | + processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 154 | + .start() | ||
| 155 | + .withProcessDefinitionKey("workflow_leave") | ||
| 156 | + .withName(workflow.getTitle()) | ||
| 157 | + .withBusinessKey(workflow.getId()) | ||
| 158 | + .withVariable("route", index) | ||
| 159 | + .build()); | ||
| 160 | + | ||
| 161 | + | ||
| 162 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 163 | + | ||
| 164 | + if (task != null) { | ||
| 165 | + | ||
| 166 | + task.setDescription(SecurityUtils.getLoginUser().getUser().getRoleIds().get(0)); | ||
| 167 | + | ||
| 168 | + List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | ||
| 169 | + | ||
| 170 | + if (list.size() == 1) { | ||
| 171 | + taskService.addCandidateUser(task.getId(), task.getDescription()); | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + taskService.saveTask(task); | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + | ||
| 178 | + workflow.setInstanceId(processInstance.getId()); | ||
| 179 | + | ||
| 180 | + return workflowMapper.insertWorkflow(workflow); | ||
| 181 | + } catch (Exception e) { | ||
| 182 | + | ||
| 183 | + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 184 | + | ||
| 185 | + e.printStackTrace(); | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + return 0; | ||
| 190 | } | 189 | } |
| 191 | - | 190 | + |
| 192 | @Override | 191 | @Override |
| 193 | @Transactional | 192 | @Transactional |
| 194 | - public int createThreeStepWorkFlow(SupervisionThreestep supervision){ //三查 | ||
| 195 | - ProcessInstance processInstance = null; | ||
| 196 | - try { | ||
| 197 | - processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 198 | - .start() | ||
| 199 | - .withProcessDefinitionKey("workflow_threestep") | ||
| 200 | - .withName("报工自查:" + supervision.getContract()) | ||
| 201 | - .withBusinessKey("workflow_threestep:" + supervision.getId()) | ||
| 202 | - .build()); | ||
| 203 | - | ||
| 204 | - PorcThreeStepTask(processInstance,supervision.getPlace()); | ||
| 205 | - | ||
| 206 | - | ||
| 207 | - Workflow workflow = new Workflow(); | ||
| 208 | - workflow.setId("workflow_threestep:" + supervision.getId()); | ||
| 209 | - workflow.setTitle("报工自查-合同编号:" + supervision.getContract()); | ||
| 210 | - workflow.setReason("报工自查"); | ||
| 211 | - workflow.setStartTime(sdf.format(supervision.getSelfCheckTime())); | ||
| 212 | - workflow.setEndTime(sdf.format(supervision.getSelfCheckTime())); | ||
| 213 | - workflow.setType(supervision.getType() + ""); | ||
| 214 | - workflow.setInstanceId(processInstance.getId()); | ||
| 215 | - workflow.setState("0"); | ||
| 216 | - | ||
| 217 | - return workflowMapper.insertWorkflow(workflow); | ||
| 218 | - } catch (Exception e) { | ||
| 219 | - e.printStackTrace(); | ||
| 220 | - processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 221 | - } | ||
| 222 | - | ||
| 223 | - return 0; | 193 | + public int createThreeStepWorkFlow(SupervisionThreestep supervision) { //三查 |
| 194 | + ProcessInstance processInstance = null; | ||
| 195 | + try { | ||
| 196 | + processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 197 | + .start() | ||
| 198 | + .withProcessDefinitionKey("workflow_threestep") | ||
| 199 | + .withName("报工自查:" + supervision.getContract()) | ||
| 200 | + .withBusinessKey("workflow_threestep:" + supervision.getId()) | ||
| 201 | + .build()); | ||
| 202 | + | ||
| 203 | + PorcThreeStepTask(processInstance, supervision.getPlace()); | ||
| 204 | + | ||
| 205 | + | ||
| 206 | + Workflow workflow = new Workflow(); | ||
| 207 | + workflow.setId("workflow_threestep:" + supervision.getId()); | ||
| 208 | + workflow.setTitle("报工自查-合同编号:" + supervision.getContract()); | ||
| 209 | + workflow.setReason("报工自查"); | ||
| 210 | + workflow.setStartTime(sdf.format(supervision.getSelfCheckTime())); | ||
| 211 | + workflow.setEndTime(sdf.format(supervision.getSelfCheckTime())); | ||
| 212 | + workflow.setType(supervision.getType() + ""); | ||
| 213 | + workflow.setInstanceId(processInstance.getId()); | ||
| 214 | + workflow.setState("0"); | ||
| 215 | + | ||
| 216 | + return workflowMapper.insertWorkflow(workflow); | ||
| 217 | + } catch (Exception e) { | ||
| 218 | + e.printStackTrace(); | ||
| 219 | + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + return 0; | ||
| 224 | } | 223 | } |
| 225 | - | ||
| 226 | - | 224 | + |
| 225 | + | ||
| 227 | @Override | 226 | @Override |
| 228 | @Transactional | 227 | @Transactional |
| 229 | - public int createCaseFile(ViolationCaseFile caseFile,int index){ //三查 | ||
| 230 | - ProcessInstance processInstance = null; | ||
| 231 | - String title = "案卷号:" + caseFile.getNumber(); | ||
| 232 | - String flowType = "workflow_casefile"; | ||
| 233 | - try { | ||
| 234 | - | ||
| 235 | - processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 236 | - .start() | ||
| 237 | - .withProcessDefinitionKey(flowType) | ||
| 238 | - .withName(title) | ||
| 239 | - .withBusinessKey(flowType + ":" + caseFile.getId()) | ||
| 240 | - .withVariable("route", index) | ||
| 241 | - .build()); | ||
| 242 | - | ||
| 243 | - | ||
| 244 | - if(index == 0){ | ||
| 245 | - Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 246 | - | ||
| 247 | - task.setAssignee(caseFile.getCompanyName()); | ||
| 248 | - | ||
| 249 | - taskService.saveTask(task); | ||
| 250 | - }else{ | ||
| 251 | - updateProcess(processInstance,caseFile.getOwningRegion()); | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - | ||
| 255 | - | ||
| 256 | - Workflow workflow = new Workflow(); | ||
| 257 | - workflow.setId(flowType + ":" + caseFile.getId()); | ||
| 258 | - workflow.setTitle(title); | ||
| 259 | - workflow.setReason("平台案卷"); | ||
| 260 | - workflow.setStartTime(sdf.format(caseFile.getCreateTime())); | ||
| 261 | - workflow.setEndTime(sdf.format(caseFile.getCreateTime())); | ||
| 262 | - workflow.setType("案卷"); | ||
| 263 | - workflow.setInstanceId(processInstance.getId()); | ||
| 264 | - workflow.setState("0"); | ||
| 265 | - | ||
| 266 | - return workflowMapper.insertWorkflow(workflow); | ||
| 267 | - } catch (Exception e) { | ||
| 268 | - e.printStackTrace(); | ||
| 269 | - processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 270 | - } | ||
| 271 | - | ||
| 272 | - return 0; | ||
| 273 | - | 228 | + public int createCaseFile(ViolationCaseFile caseFile, int index) { //三查 |
| 229 | + ProcessInstance processInstance = null; | ||
| 230 | + String title = "案卷号:" + caseFile.getNumber(); | ||
| 231 | + String flowType = "workflow_casefile"; | ||
| 232 | + try { | ||
| 233 | + | ||
| 234 | + processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 235 | + .start() | ||
| 236 | + .withProcessDefinitionKey(flowType) | ||
| 237 | + .withName(title) | ||
| 238 | + .withBusinessKey(flowType + ":" + caseFile.getId()) | ||
| 239 | + .withVariable("route", index) | ||
| 240 | + .build()); | ||
| 241 | + | ||
| 242 | + | ||
| 243 | + if (index == 0) { | ||
| 244 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 245 | + | ||
| 246 | + task.setAssignee(caseFile.getAbbreviation()); | ||
| 247 | + | ||
| 248 | + taskService.saveTask(task); | ||
| 249 | + } else { | ||
| 250 | + updateProcess(processInstance, caseFile.getOwningRegion()); | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + | ||
| 254 | + Workflow workflow = new Workflow(); | ||
| 255 | + workflow.setId(flowType + ":" + caseFile.getId()); | ||
| 256 | + workflow.setTitle(title); | ||
| 257 | + workflow.setReason("平台案卷"); | ||
| 258 | + workflow.setStartTime(sdf.format(caseFile.getCreateTime())); | ||
| 259 | + workflow.setEndTime(sdf.format(caseFile.getCreateTime())); | ||
| 260 | + workflow.setType("案卷"); | ||
| 261 | + workflow.setInstanceId(processInstance.getId()); | ||
| 262 | + workflow.setState("0"); | ||
| 263 | + | ||
| 264 | + return workflowMapper.insertWorkflow(workflow); | ||
| 265 | + } catch (Exception e) { | ||
| 266 | + e.printStackTrace(); | ||
| 267 | + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 268 | + throw new RuntimeException(e); | ||
| 269 | + } | ||
| 274 | } | 270 | } |
| 275 | 271 | ||
| 276 | - @Override | ||
| 277 | - @Transactional | ||
| 278 | - public int createCaseFile1(ViolationWarningInformation caseFile, int index,int isAuto){ //违规预警案卷 | ||
| 279 | - if(isAuto==1){ | ||
| 280 | - if(StringUtils.isEmpty(RemoteServerUtils.remote)){ | ||
| 281 | - RemoteServerUtils.remote = trashConfig.getRemotePath(); | ||
| 282 | - } | ||
| 283 | - loginService.loginByRemote(trashConfig.getToken()); | ||
| 284 | - } | ||
| 285 | - SecurityContextImpl securityContextImpl = new SecurityContextImpl(); | ||
| 286 | - | ||
| 287 | - securityContextImpl.setAuthentication(SecurityContextHolder.getContext().getAuthentication()); | ||
| 288 | - org.activiti.engine.runtime.ProcessInstance instance = null; | ||
| 289 | - String title = "案卷号:" + caseFile.getNumber(); | ||
| 290 | - String flowType = "violation_warning"; | ||
| 291 | - try { | ||
| 292 | - Map map = new HashedMap<>(); | ||
| 293 | - | ||
| 294 | - map.put("route", index); | ||
| 295 | - instance = runtimeService.createProcessInstanceBuilder() | ||
| 296 | - .businessKey(flowType + ":" + caseFile.getId()) | ||
| 297 | - .variable("route", index) | ||
| 298 | - .processDefinitionKey(flowType) | ||
| 299 | - .variables(map) | ||
| 300 | - .start(); | ||
| 301 | - | ||
| 302 | - | ||
| 303 | - | ||
| 304 | - | ||
| 305 | - //runtimeService.startProcessInstanceById(instance.getProcessDefinitionId(),map); | ||
| 306 | - | ||
| 307 | - | ||
| 308 | - if(index == 0){ | ||
| 309 | - Task task = taskService.createTaskQuery().processInstanceId(instance.getId()).singleResult(); | ||
| 310 | - | ||
| 311 | - task.setAssignee(caseFile.getAbbreviation()); | ||
| 312 | - | ||
| 313 | - taskService.saveTask(task); | ||
| 314 | - }else{ | ||
| 315 | - updateProcessKafka(instance,caseFile.getOwningRegion(), trashConfig.getToken()); | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - Workflow workflow = new Workflow(); | ||
| 319 | - workflow.setId(flowType + ":" + caseFile.getId()); | ||
| 320 | - workflow.setTitle(title); | ||
| 321 | - workflow.setReason("违规预警信息"); | ||
| 322 | - workflow.setStartTime(sdf.format(caseFile.getCreateTime())); | ||
| 323 | - workflow.setEndTime(sdf.format(caseFile.getCreateTime())); | ||
| 324 | - workflow.setType("违规预警信息案卷"); | ||
| 325 | - workflow.setInstanceId(instance.getId()); | ||
| 326 | - workflow.setState("0"); | ||
| 327 | - | ||
| 328 | - return workflowMapper.insertWorkflow(workflow); | ||
| 329 | - } catch (Exception e) { | ||
| 330 | - runtimeService.deleteProcessInstance(instance.getId(), "创建失败"); | ||
| 331 | - throw new RuntimeException(e); | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - } | ||
| 335 | - | ||
| 336 | - | ||
| 337 | @Override | 272 | @Override |
| 338 | @Transactional | 273 | @Transactional |
| 339 | - public int createCaseOffline(CaseOffline caseOffline){ //三查 | ||
| 340 | - ProcessInstance processInstance = null; | ||
| 341 | - try { | ||
| 342 | - | ||
| 343 | - String title = "案卷号:" + caseOffline.getNumber(); | ||
| 344 | - | ||
| 345 | - processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 346 | - .start() | ||
| 347 | - .withProcessDefinitionKey("workflow_caseoffline") | ||
| 348 | - .withName(title) | ||
| 349 | - .withBusinessKey("workflow_caseoffline:" + caseOffline.getId()) | ||
| 350 | - .build()); | ||
| 351 | - | ||
| 352 | - PorcThreeStepTask(processInstance,caseOffline.getPlace()); | ||
| 353 | - | ||
| 354 | - | ||
| 355 | - Workflow workflow = new Workflow(); | ||
| 356 | - workflow.setId("workflow_caseoffline:" + caseOffline.getId()); | ||
| 357 | - workflow.setTitle(title); | ||
| 358 | - workflow.setReason("案卷线下交办"); | ||
| 359 | - workflow.setStartTime(sdf.format(caseOffline.getCreateTime())); | ||
| 360 | - workflow.setEndTime(sdf.format(caseOffline.getCreateTime())); | ||
| 361 | - workflow.setType("案卷"); | ||
| 362 | - workflow.setInstanceId(processInstance.getId()); | ||
| 363 | - workflow.setState("0"); | ||
| 364 | - | ||
| 365 | - return workflowMapper.insertWorkflow(workflow); | ||
| 366 | - } catch (Exception e) { | ||
| 367 | - e.printStackTrace(); | ||
| 368 | - processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 369 | - } | ||
| 370 | - | ||
| 371 | - return 0; | 274 | + public int createCaseFile1(ViolationWarningInformation caseFile, int index, int isAuto) { //违规预警案卷 |
| 275 | + if (isAuto == 1) { | ||
| 276 | + if (StringUtils.isEmpty(RemoteServerUtils.remote)) { | ||
| 277 | + RemoteServerUtils.remote = trashConfig.getRemotePath(); | ||
| 278 | + } | ||
| 279 | + loginService.loginByRemote(trashConfig.getToken()); | ||
| 280 | + } | ||
| 281 | + SecurityContextImpl securityContextImpl = new SecurityContextImpl(); | ||
| 282 | + | ||
| 283 | + securityContextImpl.setAuthentication(SecurityContextHolder.getContext().getAuthentication()); | ||
| 284 | + org.activiti.engine.runtime.ProcessInstance instance = null; | ||
| 285 | + String title = "案卷号:" + caseFile.getNumber(); | ||
| 286 | + String flowType = "violation_warning"; | ||
| 287 | + try { | ||
| 288 | + Map map = new HashedMap<>(); | ||
| 289 | + | ||
| 290 | + map.put("route", index); | ||
| 291 | + instance = runtimeService.createProcessInstanceBuilder() | ||
| 292 | + .businessKey(flowType + ":" + caseFile.getId()) | ||
| 293 | + .variable("route", index) | ||
| 294 | + .processDefinitionKey(flowType) | ||
| 295 | + .variables(map) | ||
| 296 | + .start(); | ||
| 297 | + | ||
| 298 | + | ||
| 299 | + //runtimeService.startProcessInstanceById(instance.getProcessDefinitionId(),map); | ||
| 300 | + | ||
| 301 | + | ||
| 302 | + if (index == 0) { | ||
| 303 | + Task task = taskService.createTaskQuery().processInstanceId(instance.getId()).singleResult(); | ||
| 304 | + | ||
| 305 | + task.setAssignee(caseFile.getAbbreviation()); | ||
| 306 | + | ||
| 307 | + taskService.saveTask(task); | ||
| 308 | + } else { | ||
| 309 | + updateProcessKafka(instance, caseFile.getOwningRegion(), trashConfig.getToken()); | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + Workflow workflow = new Workflow(); | ||
| 313 | + workflow.setId(flowType + ":" + caseFile.getId()); | ||
| 314 | + workflow.setTitle(title); | ||
| 315 | + workflow.setReason("违规预警信息"); | ||
| 316 | + workflow.setStartTime(sdf.format(caseFile.getCreateTime())); | ||
| 317 | + workflow.setEndTime(sdf.format(caseFile.getCreateTime())); | ||
| 318 | + workflow.setType("违规预警信息案卷"); | ||
| 319 | + workflow.setInstanceId(instance.getId()); | ||
| 320 | + workflow.setState("0"); | ||
| 321 | + | ||
| 322 | + return workflowMapper.insertWorkflow(workflow); | ||
| 323 | + } catch (Exception e) { | ||
| 324 | + runtimeService.deleteProcessInstance(instance.getId(), "创建失败"); | ||
| 325 | + throw new RuntimeException(e); | ||
| 326 | + } | ||
| 327 | + | ||
| 372 | } | 328 | } |
| 373 | - | ||
| 374 | - | ||
| 375 | - public void PorcThreeStepTask(ProcessInstance processInstance,String place) { | ||
| 376 | - | ||
| 377 | - JSONArray array = RemoteServerUtils.getAreas(); | ||
| 378 | 329 | ||
| 379 | 330 | ||
| 380 | - String placeName = null; | 331 | + @Override |
| 332 | + @Transactional | ||
| 333 | + public int createCaseOffline(CaseOffline caseOffline) { //三查 | ||
| 334 | + ProcessInstance processInstance = null; | ||
| 335 | + try { | ||
| 336 | + | ||
| 337 | + String title = "案卷号:" + caseOffline.getNumber(); | ||
| 338 | + | ||
| 339 | + processInstance = processRuntime.start(ProcessPayloadBuilder | ||
| 340 | + .start() | ||
| 341 | + .withProcessDefinitionKey("workflow_caseoffline") | ||
| 342 | + .withName(title) | ||
| 343 | + .withBusinessKey("workflow_caseoffline:" + caseOffline.getId()) | ||
| 344 | + .build()); | ||
| 345 | + | ||
| 346 | + PorcThreeStepTask(processInstance, caseOffline.getPlace()); | ||
| 347 | + | ||
| 348 | + | ||
| 349 | + Workflow workflow = new Workflow(); | ||
| 350 | + workflow.setId("workflow_caseoffline:" + caseOffline.getId()); | ||
| 351 | + workflow.setTitle(title); | ||
| 352 | + workflow.setReason("案卷线下交办"); | ||
| 353 | + workflow.setStartTime(sdf.format(caseOffline.getCreateTime())); | ||
| 354 | + workflow.setEndTime(sdf.format(caseOffline.getCreateTime())); | ||
| 355 | + workflow.setType("案卷"); | ||
| 356 | + workflow.setInstanceId(processInstance.getId()); | ||
| 357 | + workflow.setState("0"); | ||
| 358 | + | ||
| 359 | + return workflowMapper.insertWorkflow(workflow); | ||
| 360 | + } catch (Exception e) { | ||
| 361 | + e.printStackTrace(); | ||
| 362 | + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance)); | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + return 0; | ||
| 366 | + } | ||
| 367 | + | ||
| 381 | 368 | ||
| 382 | - for(Object obj:array){ | ||
| 383 | - if(((JSONObject)(obj)).getString("code").equals(place)){ | 369 | + public void PorcThreeStepTask(ProcessInstance processInstance, String place) { |
| 384 | 370 | ||
| 385 | - placeName = ((JSONObject)(obj)).getString("name"); | 371 | + JSONArray array = RemoteServerUtils.getAreas(); |
| 386 | 372 | ||
| 387 | - break; | ||
| 388 | - } | ||
| 389 | 373 | ||
| 390 | - } | 374 | + String placeName = null; |
| 391 | 375 | ||
| 392 | - if(placeName != null){ | 376 | + for (Object obj : array) { |
| 377 | + if (((JSONObject) (obj)).getString("code").equals(place)) { | ||
| 393 | 378 | ||
| 394 | - updateProcess(processInstance,placeName); | ||
| 395 | - } | ||
| 396 | - | ||
| 397 | - } | 379 | + placeName = ((JSONObject) (obj)).getString("name"); |
| 398 | 380 | ||
| 399 | - void updateProcess(ProcessInstance processInstance,String placeName){ | ||
| 400 | - Map map = new HashedMap<>(); | 381 | + break; |
| 382 | + } | ||
| 401 | 383 | ||
| 402 | - map.put("type", "CSUserDepartmentType"); | 384 | + } |
| 385 | + | ||
| 386 | + if (placeName != null) { | ||
| 387 | + | ||
| 388 | + updateProcess(processInstance, placeName); | ||
| 389 | + } | ||
| 390 | + | ||
| 391 | + } | ||
| 403 | 392 | ||
| 404 | - JSONArray array2 = RemoteServerUtils.getDict(map); | 393 | + void updateProcess(ProcessInstance processInstance, String placeName) { |
| 394 | + Map map = new HashedMap<>(); | ||
| 405 | 395 | ||
| 396 | + map.put("type", "CSUserDepartmentType"); | ||
| 406 | 397 | ||
| 407 | - String placeCode = null; | ||
| 408 | - String code = null; | 398 | + JSONArray array2 = RemoteServerUtils.getDict(map); |
| 409 | 399 | ||
| 410 | - for(Object obj:array2){ | ||
| 411 | - if(((JSONObject)obj).getString("name").equals("渣土办")){ | ||
| 412 | - code = ((JSONObject)(obj)).getString("code"); | ||
| 413 | - } | ||
| 414 | - if(((JSONObject)obj).getString("name").replace("渣土办", "").equals(placeName)){ | ||
| 415 | - placeCode = ((JSONObject)(obj)).getString("code"); | ||
| 416 | 400 | ||
| 417 | - if(code != null){ | ||
| 418 | - break; | ||
| 419 | - } | ||
| 420 | - } | 401 | + String placeCode = null; |
| 402 | + String code = null; | ||
| 421 | 403 | ||
| 422 | - } | 404 | + for (Object obj : array2) { |
| 405 | + if (((JSONObject) obj).getString("name").equals("渣土办")) { | ||
| 406 | + code = ((JSONObject) (obj)).getString("code"); | ||
| 407 | + } | ||
| 408 | + if (((JSONObject) obj).getString("name").replace("渣土办", "").equals(placeName)) { | ||
| 409 | + placeCode = ((JSONObject) (obj)).getString("code"); | ||
| 423 | 410 | ||
| 424 | - if(placeCode != null){ | ||
| 425 | - Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | 411 | + if (code != null) { |
| 412 | + break; | ||
| 413 | + } | ||
| 414 | + } | ||
| 426 | 415 | ||
| 416 | + } | ||
| 427 | 417 | ||
| 428 | - List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | 418 | + if (placeCode != null) { |
| 419 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 429 | 420 | ||
| 430 | - for(IdentityLink identityLink:list){ | 421 | + |
| 422 | + List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | ||
| 423 | + | ||
| 424 | + for (IdentityLink identityLink : list) { | ||
| 431 | // if(identityLink.getGroupId() != null) | 425 | // if(identityLink.getGroupId() != null) |
| 432 | // taskService.deleteGroupIdentityLink(task.getId(), identityLink.getGroupId(), identityLink.getType()); | 426 | // taskService.deleteGroupIdentityLink(task.getId(), identityLink.getGroupId(), identityLink.getType()); |
| 433 | - if(identityLink.getUserId() != null) | ||
| 434 | - taskService.deleteUserIdentityLink(task.getId(), identityLink.getUserId(), identityLink.getType()); | ||
| 435 | - } | 427 | + if (identityLink.getUserId() != null) |
| 428 | + taskService.deleteUserIdentityLink(task.getId(), identityLink.getUserId(), identityLink.getType()); | ||
| 429 | + } | ||
| 436 | 430 | ||
| 437 | - taskService.addCandidateUser(task.getId(), placeCode); | 431 | + taskService.addCandidateUser(task.getId(), placeCode); |
| 438 | 432 | ||
| 439 | - task.setDescription(placeCode); | 433 | + task.setDescription(placeCode); |
| 440 | 434 | ||
| 441 | - taskService.saveTask(task); | ||
| 442 | - } | ||
| 443 | - }; | 435 | + taskService.saveTask(task); |
| 436 | + } | ||
| 437 | + } | ||
| 444 | 438 | ||
| 445 | - void updateProcessKafka(org.activiti.engine.runtime.ProcessInstance processInstance,String placeName,String token){ | ||
| 446 | - Map map = new HashedMap<>(); | 439 | + ; |
| 447 | 440 | ||
| 448 | - map.put("type", "CSUserDepartmentType"); | 441 | + void updateProcessKafka(org.activiti.engine.runtime.ProcessInstance processInstance, String placeName, String token) { |
| 442 | + Map map = new HashedMap<>(); | ||
| 449 | 443 | ||
| 444 | + map.put("type", "CSUserDepartmentType"); | ||
| 450 | 445 | ||
| 451 | - JSONArray array2 = redisCache.getCacheObject("dict"); | ||
| 452 | - if(array2==null||array2.size()==0){ | ||
| 453 | - array2 = RemoteServerUtils.getDict(map,token); | ||
| 454 | - redisCache.setCacheObject("dict",array2,24, TimeUnit.HOURS); | ||
| 455 | - } | ||
| 456 | - String placeCode = null; | ||
| 457 | - String code = null; | ||
| 458 | 446 | ||
| 459 | - for(Object obj:array2){ | ||
| 460 | - if(((JSONObject)obj).getString("name").equals("渣土办")){ | ||
| 461 | - code = ((JSONObject)(obj)).getString("code"); | ||
| 462 | - } | ||
| 463 | - if(((JSONObject)obj).getString("name").replace("渣土办", "").equals(placeName)){ | ||
| 464 | - placeCode = ((JSONObject)(obj)).getString("code"); | 447 | + JSONArray array2 = redisCache.getCacheObject("dict"); |
| 448 | + if (array2 == null || array2.size() == 0) { | ||
| 449 | + array2 = RemoteServerUtils.getDict(map, token); | ||
| 450 | + redisCache.setCacheObject("dict", array2, 24, TimeUnit.HOURS); | ||
| 451 | + } | ||
| 452 | + String placeCode = null; | ||
| 453 | + String code = null; | ||
| 465 | 454 | ||
| 466 | - if(code != null){ | ||
| 467 | - break; | ||
| 468 | - } | ||
| 469 | - } | 455 | + for (Object obj : array2) { |
| 456 | + if (((JSONObject) obj).getString("name").equals("渣土办")) { | ||
| 457 | + code = ((JSONObject) (obj)).getString("code"); | ||
| 458 | + } | ||
| 459 | + if (((JSONObject) obj).getString("name").replace("渣土办", "").equals(placeName)) { | ||
| 460 | + placeCode = ((JSONObject) (obj)).getString("code"); | ||
| 470 | 461 | ||
| 471 | - } | 462 | + if (code != null) { |
| 463 | + break; | ||
| 464 | + } | ||
| 465 | + } | ||
| 472 | 466 | ||
| 473 | - if(placeCode != null){ | ||
| 474 | - Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | 467 | + } |
| 475 | 468 | ||
| 469 | + if (placeCode != null) { | ||
| 470 | + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); | ||
| 476 | 471 | ||
| 477 | - List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); | ||
| 478 | 472 | ||
| 479 | - for(IdentityLink identityLink:list){ | 473 | + List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId()); |
| 474 | + | ||
| 475 | + for (IdentityLink identityLink : list) { | ||
| 480 | // if(identityLink.getGroupId() != null) | 476 | // if(identityLink.getGroupId() != null) |
| 481 | // taskService.deleteGroupIdentityLink(task.getId(), identityLink.getGroupId(), identityLink.getType()); | 477 | // taskService.deleteGroupIdentityLink(task.getId(), identityLink.getGroupId(), identityLink.getType()); |
| 482 | - if(identityLink.getUserId() != null) | ||
| 483 | - taskService.deleteUserIdentityLink(task.getId(), identityLink.getUserId(), identityLink.getType()); | ||
| 484 | - } | ||
| 485 | - | ||
| 486 | - taskService.addCandidateUser(task.getId(), placeCode); | ||
| 487 | - | ||
| 488 | - task.setDescription(placeCode); | ||
| 489 | - | ||
| 490 | - taskService.saveTask(task); | ||
| 491 | - } | ||
| 492 | - } | ||
| 493 | - | ||
| 494 | - /** | ||
| 495 | - * 查询请假 | ||
| 496 | - * | ||
| 497 | - * @param id | ||
| 498 | - * 请假ID | ||
| 499 | - * @return 请假 | ||
| 500 | - */ | ||
| 501 | - @Override | ||
| 502 | - public Workflow selectWorkflowById(String id) { | ||
| 503 | - return workflowMapper.selectWorkflowById(id); | ||
| 504 | - } | ||
| 505 | - | ||
| 506 | - /** | ||
| 507 | - * 查询请假列表 | ||
| 508 | - * | ||
| 509 | - * @param Workflow | ||
| 510 | - * 请假 | ||
| 511 | - * @return 请假 | ||
| 512 | - */ | ||
| 513 | - @Override | ||
| 514 | - public List<Workflow> selectWorkflowList(Workflow Workflow) { | ||
| 515 | - return workflowMapper.selectWorkflowListByWorkflowAndDeptId(Workflow, | ||
| 516 | - SecurityUtils.getLoginUser().getUser().getDeptId()); | ||
| 517 | - } | ||
| 518 | - | ||
| 519 | - /** | ||
| 520 | - * 查询请假列表带任务状态 | ||
| 521 | - * | ||
| 522 | - * @param Workflow | ||
| 523 | - * 请假 | ||
| 524 | - * @return 请假 | ||
| 525 | - */ | ||
| 526 | - @Override | ||
| 527 | - public List<Workflow> selectWorkflowAndTaskNameList(Workflow Workflow) { | ||
| 528 | - List<Workflow> Workflows = workflowMapper.selectWorkflowList(Workflow); | ||
| 529 | - List<String> collect = Workflows.parallelStream().map(wl -> wl.getInstanceId()).collect(Collectors.toList()); | ||
| 530 | - if (collect != null && !collect.isEmpty()) { | ||
| 531 | - List<Task> tasks = taskService.createTaskQuery().processInstanceIdIn(collect).list(); | ||
| 532 | - Workflows.forEach(wl -> { | ||
| 533 | - Task task = tasks.parallelStream().filter(t -> t.getProcessInstanceId().equals(wl.getInstanceId())) | ||
| 534 | - .findAny().orElse(null); | ||
| 535 | - if (task != null) { | ||
| 536 | - wl.setTaskName(task.getName()); | ||
| 537 | - } | ||
| 538 | - }); | ||
| 539 | - } | ||
| 540 | - return Workflows; | ||
| 541 | - } | ||
| 542 | - | ||
| 543 | - | ||
| 544 | - | ||
| 545 | - /** | ||
| 546 | - * 修改请假 | ||
| 547 | - * | ||
| 548 | - * @param Workflow | ||
| 549 | - * 请假 | ||
| 550 | - * @return 结果 | ||
| 551 | - */ | ||
| 552 | - @Override | ||
| 553 | - public int updateWorkflow(Workflow Workflow) { | ||
| 554 | - Workflow.setUpdateTime(DateUtils.getNowDate()); | ||
| 555 | - return workflowMapper.updateWorkflow(Workflow); | ||
| 556 | - } | ||
| 557 | - | ||
| 558 | - /** | ||
| 559 | - * 批量删除请假 | ||
| 560 | - * | ||
| 561 | - * @param ids | ||
| 562 | - * 需要删除的请假ID | ||
| 563 | - * @return 结果 | ||
| 564 | - */ | ||
| 565 | - @Override | ||
| 566 | - public int deleteWorkflowByIds(String[] ids) { | ||
| 567 | - return workflowMapper.deleteWorkflowByIds(ids); | ||
| 568 | - } | ||
| 569 | - | ||
| 570 | - /** | ||
| 571 | - * 删除请假信息 | ||
| 572 | - * | ||
| 573 | - * @param id | ||
| 574 | - * 请假ID | ||
| 575 | - * @return 结果 | ||
| 576 | - */ | ||
| 577 | - @Override | ||
| 578 | - public int deleteWorkflowById(String id) { | ||
| 579 | - return workflowMapper.deleteWorkflowById(id); | ||
| 580 | - } | ||
| 581 | - | ||
| 582 | - @Override | ||
| 583 | - public void deleteWorkflowByName(String name) { | ||
| 584 | - workflowMapper.deleteWorkflowByName(name); | ||
| 585 | - } | ||
| 586 | - | ||
| 587 | - @Override | ||
| 588 | - public Workflow selectWorkflowByInstanceId(String instanceId) { | ||
| 589 | - | ||
| 590 | - return workflowMapper.selectWorkflowByInstanceId(instanceId); | ||
| 591 | - } | 478 | + if (identityLink.getUserId() != null) |
| 479 | + taskService.deleteUserIdentityLink(task.getId(), identityLink.getUserId(), identityLink.getType()); | ||
| 480 | + } | ||
| 481 | + | ||
| 482 | + taskService.addCandidateUser(task.getId(), placeCode); | ||
| 483 | + | ||
| 484 | + task.setDescription(placeCode); | ||
| 485 | + | ||
| 486 | + taskService.saveTask(task); | ||
| 487 | + } | ||
| 488 | + } | ||
| 489 | + | ||
| 490 | + /** | ||
| 491 | + * 查询请假 | ||
| 492 | + * | ||
| 493 | + * @param id 请假ID | ||
| 494 | + * @return 请假 | ||
| 495 | + */ | ||
| 496 | + @Override | ||
| 497 | + public Workflow selectWorkflowById(String id) { | ||
| 498 | + return workflowMapper.selectWorkflowById(id); | ||
| 499 | + } | ||
| 500 | + | ||
| 501 | + /** | ||
| 502 | + * 查询请假列表 | ||
| 503 | + * | ||
| 504 | + * @param Workflow 请假 | ||
| 505 | + * @return 请假 | ||
| 506 | + */ | ||
| 507 | + @Override | ||
| 508 | + public List<Workflow> selectWorkflowList(Workflow Workflow) { | ||
| 509 | + return workflowMapper.selectWorkflowListByWorkflowAndDeptId(Workflow, | ||
| 510 | + SecurityUtils.getLoginUser().getUser().getDeptId()); | ||
| 511 | + } | ||
| 512 | + | ||
| 513 | + /** | ||
| 514 | + * 查询请假列表带任务状态 | ||
| 515 | + * | ||
| 516 | + * @param Workflow 请假 | ||
| 517 | + * @return 请假 | ||
| 518 | + */ | ||
| 519 | + @Override | ||
| 520 | + public List<Workflow> selectWorkflowAndTaskNameList(Workflow Workflow) { | ||
| 521 | + List<Workflow> Workflows = workflowMapper.selectWorkflowList(Workflow); | ||
| 522 | + List<String> collect = Workflows.parallelStream().map(wl -> wl.getInstanceId()).collect(Collectors.toList()); | ||
| 523 | + if (collect != null && !collect.isEmpty()) { | ||
| 524 | + List<Task> tasks = taskService.createTaskQuery().processInstanceIdIn(collect).list(); | ||
| 525 | + Workflows.forEach(wl -> { | ||
| 526 | + Task task = tasks.parallelStream().filter(t -> t.getProcessInstanceId().equals(wl.getInstanceId())) | ||
| 527 | + .findAny().orElse(null); | ||
| 528 | + if (task != null) { | ||
| 529 | + wl.setTaskName(task.getName()); | ||
| 530 | + } | ||
| 531 | + }); | ||
| 532 | + } | ||
| 533 | + return Workflows; | ||
| 534 | + } | ||
| 535 | + | ||
| 536 | + | ||
| 537 | + /** | ||
| 538 | + * 修改请假 | ||
| 539 | + * | ||
| 540 | + * @param Workflow 请假 | ||
| 541 | + * @return 结果 | ||
| 542 | + */ | ||
| 543 | + @Override | ||
| 544 | + public int updateWorkflow(Workflow Workflow) { | ||
| 545 | + Workflow.setUpdateTime(DateUtils.getNowDate()); | ||
| 546 | + return workflowMapper.updateWorkflow(Workflow); | ||
| 547 | + } | ||
| 548 | + | ||
| 549 | + /** | ||
| 550 | + * 批量删除请假 | ||
| 551 | + * | ||
| 552 | + * @param ids 需要删除的请假ID | ||
| 553 | + * @return 结果 | ||
| 554 | + */ | ||
| 555 | + @Override | ||
| 556 | + public int deleteWorkflowByIds(String[] ids) { | ||
| 557 | + return workflowMapper.deleteWorkflowByIds(ids); | ||
| 558 | + } | ||
| 559 | + | ||
| 560 | + /** | ||
| 561 | + * 删除请假信息 | ||
| 562 | + * | ||
| 563 | + * @param id 请假ID | ||
| 564 | + * @return 结果 | ||
| 565 | + */ | ||
| 566 | + @Override | ||
| 567 | + public int deleteWorkflowById(String id) { | ||
| 568 | + return workflowMapper.deleteWorkflowById(id); | ||
| 569 | + } | ||
| 570 | + | ||
| 571 | + @Override | ||
| 572 | + public void deleteWorkflowByName(String name) { | ||
| 573 | + workflowMapper.deleteWorkflowByName(name); | ||
| 574 | + } | ||
| 575 | + | ||
| 576 | + @Override | ||
| 577 | + public Workflow selectWorkflowByInstanceId(String instanceId) { | ||
| 578 | + | ||
| 579 | + return workflowMapper.selectWorkflowByInstanceId(instanceId); | ||
| 580 | + } | ||
| 592 | 581 | ||
| 593 | } | 582 | } |
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
| @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 26 | <select id="selectTruckActivateList" parameterType="TruckActivate" resultMap="TruckActivateResult"> | 26 | <select id="selectTruckActivateList" parameterType="TruckActivate" resultMap="TruckActivateResult"> |
| 27 | <include refid="selectTruckActivateVo"/> | 27 | <include refid="selectTruckActivateVo"/> |
| 28 | <where> | 28 | <where> |
| 29 | - <if test="company != null and company != ''"> and company = #{company}</if> | 29 | + <if test="company != null and company != ''"> and company like concat('%', #{company},'%')</if> |
| 30 | <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{licensePlate}, '%')</if> | 30 | <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{licensePlate}, '%')</if> |
| 31 | <if test="time != null "> and time = #{time}</if> | 31 | <if test="time != null "> and time = #{time}</if> |
| 32 | <if test="construction != null and construction != ''"> and construction = #{construction}</if> | 32 | <if test="construction != null and construction != ''"> and construction = #{construction}</if> |
| @@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 35 | <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> | 35 | <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> |
| 36 | <if test="createType != null "> and create_type = #{createType}</if> | 36 | <if test="createType != null "> and create_type = #{createType}</if> |
| 37 | <if test="startTime != null "> and activate_time BETWEEN #{startTime} and #{endTime}</if> | 37 | <if test="startTime != null "> and activate_time BETWEEN #{startTime} and #{endTime}</if> |
| 38 | + <if test="activateDate != null "> and activate_time like concat('%',#{activateDate},'%')</if> | ||
| 38 | </where> | 39 | </where> |
| 39 | </select> | 40 | </select> |
| 40 | 41 |
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
| @@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 24 | <result property="receiveStatus" column="receive_status" /> | 24 | <result property="receiveStatus" column="receive_status" /> |
| 25 | <result property="readBy" column="read_by" /> | 25 | <result property="readBy" column="read_by" /> |
| 26 | <result property="readTime" column="read_time" /> | 26 | <result property="readTime" column="read_time" /> |
| 27 | + <result property="abbreviation" column="abbreviation" /> | ||
| 27 | </resultMap> | 28 | </resultMap> |
| 28 | 29 | ||
| 29 | <sql id="selectViolationCaseFileVo"> | 30 | <sql id="selectViolationCaseFileVo"> |
| 30 | - select id, `number`, violation_object_type, owning_region, violation_type, violation_grade, project_name, company_name, `describe`, send_object, create_time, create_by, update_time, update_by, status, receive, receive_status, read_by, read_time from casefile_violation | 31 | + select id, `number`, violation_object_type, owning_region, violation_type, violation_grade, project_name, company_name, `describe`, send_object, create_time, create_by, update_time, update_by, status, receive, receive_status, read_by, read_time,abbreviation from casefile_violation |
| 31 | </sql> | 32 | </sql> |
| 32 | 33 | ||
| 33 | <select id="selectViolationCaseFileList" parameterType="violationCaseFile" resultMap="violationCaseFileResult"> | 34 | <select id="selectViolationCaseFileList" parameterType="violationCaseFile" resultMap="violationCaseFileResult"> |
| @@ -50,7 +51,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -50,7 +51,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 50 | <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if> | 51 | <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if> |
| 51 | </where> | 52 | </where> |
| 52 | </select> | 53 | </select> |
| 53 | - | 54 | + |
| 55 | + <select id="selectViolationCaseFileListByTable" parameterType="violationCaseFile" resultMap="violationCaseFileResult"> | ||
| 56 | + <include refid="selectViolationCaseFileVo"/> | ||
| 57 | + <where> | ||
| 58 | + <if test="owningRegion != null and owningRegion != ''">and owning_region = #{owningRegion}</if> | ||
| 59 | + <if test="startDate!=null and endDate!=null and startDate!='' and endDate!=''">and create_time between #{startDate} and #{endDate}</if> | ||
| 60 | + </where> | ||
| 61 | + </select> | ||
| 62 | + | ||
| 54 | <select id="selectViolationCaseFileById" parameterType="Long" resultMap="violationCaseFileResult"> | 63 | <select id="selectViolationCaseFileById" parameterType="Long" resultMap="violationCaseFileResult"> |
| 55 | <include refid="selectViolationCaseFileVo"/> | 64 | <include refid="selectViolationCaseFileVo"/> |
| 56 | where id = #{id} | 65 | where id = #{id} |
| @@ -75,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -75,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 75 | <if test="receiveStatus != null">receive_status,</if> | 84 | <if test="receiveStatus != null">receive_status,</if> |
| 76 | <if test="readBy != null">read_by,</if> | 85 | <if test="readBy != null">read_by,</if> |
| 77 | <if test="readTime != null">read_time,</if> | 86 | <if test="readTime != null">read_time,</if> |
| 87 | + <if test="abbreviation != null">abbreviation,</if> | ||
| 78 | </trim> | 88 | </trim> |
| 79 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 89 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 80 | now(), | 90 | now(), |
| @@ -93,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -93,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 93 | <if test="receiveStatus != null">#{receiveStatus},</if> | 103 | <if test="receiveStatus != null">#{receiveStatus},</if> |
| 94 | <if test="readBy != null">#{readBy},</if> | 104 | <if test="readBy != null">#{readBy},</if> |
| 95 | <if test="readTime != null">#{readTime},</if> | 105 | <if test="readTime != null">#{readTime},</if> |
| 106 | + <if test="abbreviation != null">#{abbreviation},</if> | ||
| 96 | </trim> | 107 | </trim> |
| 97 | </insert> | 108 | </insert> |
| 98 | 109 | ||
| @@ -115,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -115,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 115 | <if test="receiveStatus != null">receive_status = #{receiveStatus},</if> | 126 | <if test="receiveStatus != null">receive_status = #{receiveStatus},</if> |
| 116 | <if test="readBy != null">read_by = #{readBy},</if> | 127 | <if test="readBy != null">read_by = #{readBy},</if> |
| 117 | <if test="readTime != null">read_time = #{readTime},</if> | 128 | <if test="readTime != null">read_time = #{readTime},</if> |
| 129 | + <if test="abbreviation != null">abbreviation = #{abbreviation},</if> | ||
| 118 | </trim> | 130 | </trim> |
| 119 | where id = #{id} | 131 | where id = #{id} |
| 120 | </update> | 132 | </update> |
trash-workFlow/src/main/resources/mapper/casefile/ViolationWarningInformationMapper.xml
| @@ -42,6 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -42,6 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 42 | <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> | 42 | <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> |
| 43 | </where> | 43 | </where> |
| 44 | </select> | 44 | </select> |
| 45 | + | ||
| 46 | + <select id="selectViolationWarningInformationListByTable" parameterType="ViolationWarningInformation" resultMap="ViolationWarningInformationResult"> | ||
| 47 | + <include refid="selectViolationWarningInformationVo"/> | ||
| 48 | + <where> | ||
| 49 | + <if test="owningRegion != null and owningRegion != ''">and owning_region = #{owningRegion}</if> | ||
| 50 | + <if test="startDate!=null and endDate!=null and startDate!='' and endDate!=''">and create_time between #{startDate} and #{endDate}</if> | ||
| 51 | + </where> | ||
| 52 | + </select> | ||
| 45 | 53 | ||
| 46 | <select id="selectViolationWarningInformationById" parameterType="Long" resultMap="ViolationWarningInformationResult"> | 54 | <select id="selectViolationWarningInformationById" parameterType="Long" resultMap="ViolationWarningInformationResult"> |
| 47 | <include refid="selectViolationWarningInformationVo"/> | 55 | <include refid="selectViolationWarningInformationVo"/> |