Commit b8d862d43b68cd055221e72351ef22d38c079dce

Authored by youxiw2000
1 parent 50dc34ad

m

Showing 24 changed files with 456 additions and 126 deletions
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
@@ -875,6 +875,45 @@ public class RemoteServerUtils { @@ -875,6 +875,45 @@ public class RemoteServerUtils {
875 return null; 875 return null;
876 } 876 }
877 877
  878 +
  879 +
  880 + public static boolean replyUpCase(Map params) {
  881 + if(okHttpClient == null){
  882 + okHttpClient = new OkHttpClient.Builder()
  883 + .connectTimeout(20, TimeUnit.SECONDS)
  884 + .writeTimeout(20, TimeUnit.SECONDS)
  885 + .readTimeout(30, TimeUnit.SECONDS)
  886 + .build();
  887 + }
  888 +
  889 +
  890 + Map map = new HashMap<>();
  891 +
  892 +
  893 + String param = JSON.toJSON(params).toString();
  894 +
  895 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );
  896 +
  897 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/handleResult").addHeader("Authorization",getUpUser()).post(body).build();
  898 +
  899 +
  900 + try {
  901 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  902 + String result = response.body().string();
  903 +
  904 + if(result != null){
  905 + JSONObject json = JSON.parseObject(result);
  906 + return json.getBoolean("success");
  907 + }
  908 +
  909 + }catch (Exception e) {
  910 + e.printStackTrace();
  911 +
  912 + }
  913 + return false;
  914 + }
  915 +
  916 +
878 public static boolean insertUpCase(Map params) { 917 public static boolean insertUpCase(Map params) {
879 if(okHttpClient == null){ 918 if(okHttpClient == null){
880 okHttpClient = new OkHttpClient.Builder() 919 okHttpClient = new OkHttpClient.Builder()
trash-garbage/src/main/java/com/trash/garbage/pojo/dto/OrderUpdateDto.java
@@ -18,7 +18,23 @@ public class OrderUpdateDto { @@ -18,7 +18,23 @@ public class OrderUpdateDto {
18 private String garReason; 18 private String garReason;
19 19
20 20
21 - /** 21 + public Integer getGarCancelFlag() {
  22 + return garCancelFlag;
  23 + }
  24 +
  25 + public void setGarCancelFlag(Integer garCancelFlag) {
  26 + this.garCancelFlag = garCancelFlag;
  27 + }
  28 +
  29 + public String getGarReason() {
  30 + return garReason;
  31 + }
  32 +
  33 + public void setGarReason(String garReason) {
  34 + this.garReason = garReason;
  35 + }
  36 +
  37 + /**
22 * 订单id 38 * 订单id
23 */ 39 */
24 private String garOrderId; 40 private String garOrderId;
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
@@ -106,6 +106,19 @@ public class DriverTask { @@ -106,6 +106,19 @@ public class DriverTask {
106 106
107 107
108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile); 108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile);
  109 +
  110 + int i = 0;
  111 + //根据发送对象判断流程
  112 + if(caseFile.getSendObject().equals("区管理部门")){
  113 +
  114 + if(caseFile.getViolationGrade().equals("一般类")){
  115 + i = 1;
  116 + }else{
  117 + i = 2;
  118 + }
  119 + }
  120 +
  121 + SpringUtils.getBean(IWorkflowService.class).createCaseFileByTask(caseFile,i);
109 122
110 ids.add(caseFile.getId()); 123 ids.add(caseFile.getId());
111 124
trash-ui/dist.zip
No preview for this file type
trash-ui/src/api/taskmethod.js
@@ -474,6 +474,7 @@ export default { @@ -474,6 +474,7 @@ export default {
474 } 474 }
475 475
476 if (this.definitionKey == "workflow_casefile") { 476 if (this.definitionKey == "workflow_casefile") {
  477 + this.modalLoading = true;
477 let postData = {}; 478 let postData = {};
478 479
479 postData.tableName = this.businessKey; 480 postData.tableName = this.businessKey;
@@ -498,6 +499,7 @@ export default { @@ -498,6 +499,7 @@ export default {
498 formDataSave(this.id, this.form.formData).then(response => { 499 formDataSave(this.id, this.form.formData).then(response => {
499 this.msgSuccess("审批成功"); 500 this.msgSuccess("审批成功");
500 this.violationCaseFile = false; 501 this.violationCaseFile = false;
  502 + this.modalLoading = false;
501 this.getList(); 503 this.getList();
502 }); 504 });
503 }); 505 });
trash-ui/src/api/vio_casefile.js
@@ -23,6 +23,7 @@ export default { @@ -23,6 +23,7 @@ export default {
23 }, 23 },
24 data() { 24 data() {
25 return { 25 return {
  26 +
26 modalLoading:false, 27 modalLoading:false,
27 // 遮罩层 28 // 遮罩层
28 loading: true, 29 loading: true,
@@ -124,7 +125,7 @@ export default { @@ -124,7 +125,7 @@ export default {
124 idInfo: null, 125 idInfo: null,
125 openInfo: false, 126 openInfo: false,
126 slide1: [], 127 slide1: [],
127 - videoSrc: [] 128 + videoSrc: [],
128 }; 129 };
129 }, 130 },
130 watch: { 131 watch: {
@@ -221,11 +222,11 @@ export default { @@ -221,11 +222,11 @@ export default {
221 this.$forceUpdate(); 222 this.$forceUpdate();
222 }); 223 });
223 }, 224 },
224 - selectArea(item) { 225 + // selectArea(item) {
225 226
226 - this.form.owningRegion = item.name; 227 + // this.form.owningRegion = item.name;
227 228
228 - }, 229 + // },
229 /** 查询平台违规案卷列表 */ 230 /** 查询平台违规案卷列表 */
230 getList() { 231 getList() {
231 this.loading = true; 232 this.loading = true;
trash-ui/src/api/vio_casefile_info.js
1 -import {getViolationCaseFile} from "@/api/casefile/violationCaseFile"; 1 +import {getViolationCaseFile,
  2 + updateViolationCaseFile} from "@/api/casefile/violationCaseFile";
2 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess"; 3 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
3 4
4 import {historyFromData} from '@/api/activiti/historyFormdata' 5 import {historyFromData} from '@/api/activiti/historyFormdata'
@@ -34,6 +35,23 @@ export default { @@ -34,6 +35,23 @@ export default {
34 this.init(); 35 this.init();
35 }, 36 },
36 methods: { 37 methods: {
  38 + submit(){
  39 + let postData = {};
  40 +
  41 + postData.tableName = "workflow_casefile:" + this.form.id;
  42 + postData.replyImg = this.form.replyImg + "";
  43 + postData.reply = this.form.reply;
  44 +
  45 +
  46 + addReplyApprovalProcess(postData).then(res => {
  47 + this.videoSrc1 = [];
  48 + this.slides1 = [];
  49 +
  50 + updateViolationCaseFile({id: this.form.id,status:1}).then(res => {
  51 +
  52 + })
  53 + });
  54 + },
37 init() { 55 init() {
38 56
39 let id = this.idInfo.split(":"); 57 let id = this.idInfo.split(":");
@@ -48,10 +66,10 @@ export default { @@ -48,10 +66,10 @@ export default {
48 let files = JSON.stringify(response.data.uploadFiles); 66 let files = JSON.stringify(response.data.uploadFiles);
49 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); 67 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
50 this.fileEntityList.map(item => { 68 this.fileEntityList.map(item => {
51 - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1) { 69 + if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) {
52 this.slide1.push(process.env.VUE_APP_BASE_API + item.url); 70 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
53 } 71 }
54 - if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) { 72 + if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) {
55 this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url); 73 this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
56 } 74 }
57 }) 75 })
trash-ui/src/layout/index.vue
1 <template> 1 <template>
2 - <div :class="classObj" class="app-wrapper">  
3 - <sidebar class="sidebar-container" />  
4 - <div :class="{ hasTagsView: false }" class="main-container">  
5 - <tags-view v-if="needTagsView" />  
6 <app-main /> 2 <app-main />
7 -  
8 - </div>  
9 - </div>  
10 </template> 3 </template>
11 4
12 <script> 5 <script>
13 import RightPanel from '@/components/RightPanel' 6 import RightPanel from '@/components/RightPanel'
14 -import { mapState } from 'vuex'  
15 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' 7 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
16 import ResizeMixin from './mixin/ResizeHandler' 8 import ResizeMixin from './mixin/ResizeHandler'
  9 +import { mapState } from 'vuex'
17 10
18 export default { 11 export default {
19 name: 'Layout', 12 name: 'Layout',
@@ -52,56 +45,45 @@ export default { @@ -52,56 +45,45 @@ export default {
52 </script> 45 </script>
53 46
54 <style lang="scss" scoped> 47 <style lang="scss" scoped>
55 -@import "~@/assets/styles/mixin.scss";  
56 -@import "~@/assets/styles/variables.scss"; 48 + @import "~@/assets/styles/mixin.scss";
  49 + @import "~@/assets/styles/variables.scss";
57 50
58 -.app-wrapper {  
59 - @include clearfix;  
60 - position: relative;  
61 - height: 100%;  
62 - width: 100%; 51 + .app-wrapper {
  52 + @include clearfix;
  53 + position: relative;
  54 + height: 100%;
  55 + width: 100%;
63 56
64 - &.mobile.openSidebar {  
65 - position: fixed;  
66 - top: 0; 57 + &.mobile.openSidebar {
  58 + position: fixed;
  59 + top: 0;
  60 + }
67 } 61 }
68 -}  
69 -  
70 -.drawer-bg {  
71 - background: #000;  
72 - opacity: 0.3;  
73 - width: 100%;  
74 - top: 0;  
75 - height: 100%;  
76 - position: absolute;  
77 - z-index: 999;  
78 -}  
79 -  
80 -.fixed-header {  
81 - position: fixed;  
82 - top: 0;  
83 - right: 0;  
84 - z-index: 9;  
85 - width: calc(100% - #{$sideBarWidth});  
86 - transition: width 0.28s;  
87 -}  
88 62
89 -.hideSidebar .fixed-header {  
90 - width: calc(100% - 54px)  
91 -} 63 + .drawer-bg {
  64 + background: #000;
  65 + opacity: 0.3;
  66 + width: 100%;
  67 + top: 0;
  68 + height: 100%;
  69 + position: absolute;
  70 + z-index: 999;
  71 + }
92 72
93 -.mobile .fixed-header {  
94 - width: 100%;  
95 -} 73 + .fixed-header {
  74 + position: fixed;
  75 + top: 0;
  76 + right: 0;
  77 + z-index: 9;
  78 + width: calc(100% - #{$sideBarWidth});
  79 + transition: width 0.28s;
  80 + }
96 81
97 -.preview figure {  
98 - float: left;  
99 - width: 30%;  
100 - height: calc(30vw - 0px);  
101 - margin: 1.5%;  
102 -} 82 + .hideSidebar .fixed-header {
  83 + width: calc(100% - 54px)
  84 + }
103 85
104 -.preview figure img {  
105 - width: 400px;  
106 -} 86 + .mobile .fixed-header {
  87 + width: 100%;
  88 + }
107 </style> 89 </style>
trash-ui/src/layout/index4.vue renamed to trash-ui/src/layout/index33.vue
1 <template> 1 <template>
  2 + <div :class="classObj" class="app-wrapper">
  3 + <sidebar class="sidebar-container" />
  4 + <div :class="{ hasTagsView: false }" class="main-container">
  5 + <tags-view v-if="needTagsView" />
2 <app-main /> 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 </template> 10 </template>
4 11
5 <script> 12 <script>
6 import RightPanel from '@/components/RightPanel' 13 import RightPanel from '@/components/RightPanel'
  14 +import { mapState } from 'vuex'
7 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' 15 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
8 import ResizeMixin from './mixin/ResizeHandler' 16 import ResizeMixin from './mixin/ResizeHandler'
9 -import { mapState } from 'vuex'  
10 17
11 export default { 18 export default {
12 name: 'Layout', 19 name: 'Layout',
@@ -45,45 +52,56 @@ export default { @@ -45,45 +52,56 @@ export default {
45 </script> 52 </script>
46 53
47 <style lang="scss" scoped> 54 <style lang="scss" scoped>
48 - @import "~@/assets/styles/mixin.scss";  
49 - @import "~@/assets/styles/variables.scss"; 55 +@import "~@/assets/styles/mixin.scss";
  56 +@import "~@/assets/styles/variables.scss";
50 57
51 - .app-wrapper {  
52 - @include clearfix;  
53 - position: relative;  
54 - height: 100%;  
55 - width: 100%;  
56 -  
57 - &.mobile.openSidebar {  
58 - position: fixed;  
59 - top: 0;  
60 - }  
61 - } 58 +.app-wrapper {
  59 + @include clearfix;
  60 + position: relative;
  61 + height: 100%;
  62 + width: 100%;
62 63
63 - .drawer-bg {  
64 - background: #000;  
65 - opacity: 0.3;  
66 - width: 100%;  
67 - top: 0;  
68 - height: 100%;  
69 - position: absolute;  
70 - z-index: 999;  
71 - }  
72 -  
73 - .fixed-header { 64 + &.mobile.openSidebar {
74 position: fixed; 65 position: fixed;
75 top: 0; 66 top: 0;
76 - right: 0;  
77 - z-index: 9;  
78 - width: calc(100% - #{$sideBarWidth});  
79 - transition: width 0.28s;  
80 } 67 }
  68 +}
81 69
82 - .hideSidebar .fixed-header {  
83 - width: calc(100% - 54px)  
84 - } 70 +.drawer-bg {
  71 + background: #000;
  72 + opacity: 0.3;
  73 + width: 100%;
  74 + top: 0;
  75 + height: 100%;
  76 + position: absolute;
  77 + z-index: 999;
  78 +}
85 79
86 - .mobile .fixed-header {  
87 - width: 100%;  
88 - } 80 +.fixed-header {
  81 + position: fixed;
  82 + top: 0;
  83 + right: 0;
  84 + z-index: 9;
  85 + width: calc(100% - #{$sideBarWidth});
  86 + transition: width 0.28s;
  87 +}
  88 +
  89 +.hideSidebar .fixed-header {
  90 + width: calc(100% - 54px)
  91 +}
  92 +
  93 +.mobile .fixed-header {
  94 + width: 100%;
  95 +}
  96 +
  97 +.preview figure {
  98 + float: left;
  99 + width: 30%;
  100 + height: calc(30vw - 0px);
  101 + margin: 1.5%;
  102 +}
  103 +
  104 +.preview figure img {
  105 + width: 400px;
  106 +}
89 </style> 107 </style>
trash-ui/src/main.js
@@ -42,8 +42,8 @@ Vue.use(plugins) @@ -42,8 +42,8 @@ Vue.use(plugins)
42 Vue.prototype.$aMapKey = "902732b0ff4758e4b39f0f34f0cb1cb0";// 高德地图key 42 Vue.prototype.$aMapKey = "902732b0ff4758e4b39f0f34f0cb1cb0";// 高德地图key
43 43
44 44
45 -Vue.prototype.remoteFrame = "http://183.66.242.6:14601"  
46 -// Vue.prototype.remoteFrame = "http://175.6.47.84:8008" 45 +// Vue.prototype.remoteFrame = "http://183.66.242.6:14601"
  46 +Vue.prototype.remoteFrame = "http://175.6.47.84:8008"
47 47
48 Vue.prototype.msgSuccess = function (msg) { 48 Vue.prototype.msgSuccess = function (msg) {
49 this.$message({ showClose: true, message: msg, type: "success" }); 49 this.$message({ showClose: true, message: msg, type: "success" });
trash-ui/src/views/activiti/task/index.vue
@@ -499,7 +499,10 @@ @@ -499,7 +499,10 @@
499 <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" 499 <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)"
500 v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回 500 v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回
501 </el-button> 501 </el-button>
502 - <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button> 502 + <el-button type="primary"
  503 +
  504 + v-loading.fullscreen.lock="modalLoading"
  505 + @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
503 </div> 506 </div>
504 </el-dialog> 507 </el-dialog>
505 508
@@ -685,6 +688,7 @@ @@ -685,6 +688,7 @@
685 }, 688 },
686 data() { 689 data() {
687 return { 690 return {
  691 + modalLoading:false,
688 id: '', 692 id: '',
689 definitionKey: '', 693 definitionKey: '',
690 businessKey: '', 694 businessKey: '',
trash-ui/src/views/casefile/violationCaseFile/index.vue
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <el-option label="企业" value="2" /> 22 <el-option label="企业" value="2" />
23 </el-select> 23 </el-select>
24 </el-form-item> 24 </el-form-item>
25 -</el-row> 25 + </el-row>
26 <el-row> 26 <el-row>
27 <el-form-item label="违规对象" prop="projectName"> 27 <el-form-item label="违规对象" prop="projectName">
28 <el-input 28 <el-input
@@ -95,7 +95,17 @@ @@ -95,7 +95,17 @@
95 <el-table-column label="日期" align="center" prop="createTime"> 95 <el-table-column label="日期" align="center" prop="createTime">
96 </el-table-column> 96 </el-table-column>
97 <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 97 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
98 - <template slot-scope="scope"> 98 + <template slot-scope="scope">
  99 +
  100 + <el-button
  101 + size="mini"
  102 + type="text"
  103 + icon="el-icon-view"
  104 + @click="handleUpdate(scope.row)"
  105 + v-hasPermi="['casefile:violationCaseFile:edit']"
  106 + v-if="!scope.row.status && scope.row.status!=0 && scope.row.needUpload == 1"
  107 + >综管数据补填</el-button>
  108 +
99 <el-button 109 <el-button
100 size="mini" 110 size="mini"
101 type="text" 111 type="text"
@@ -151,8 +161,8 @@ @@ -151,8 +161,8 @@
151 <el-row :gutter="2"> 161 <el-row :gutter="2">
152 <el-col :span="11"> 162 <el-col :span="11">
153 <el-form-item label="所属区域" prop="owningRegion"> 163 <el-form-item label="所属区域" prop="owningRegion">
154 - <el-select v-model="form.place" placeholder="请输入所属区域" style="width: 100%;">  
155 - <el-option v-for="item in areas" :label="item.name" :value="item.code" @click.native="selectArea(item)"/> 164 + <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;">
  165 + <el-option v-for="item in areas" :label="item.name" :value="item.name"/>
156 </el-select> 166 </el-select>
157 </el-form-item> 167 </el-form-item>
158 </el-col> 168 </el-col>
trash-ui/src/views/h5/task/index.vue
@@ -506,7 +506,9 @@ @@ -506,7 +506,9 @@
506 506
507 <div slot="footer" class="dialog-footer"> 507 <div slot="footer" class="dialog-footer">
508 <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button> 508 <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
509 - <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button> 509 + <el-button type="primary"
  510 + v-loading.fullscreen.lock="modalLoading"
  511 + @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
510 </div> 512 </div>
511 </el-dialog> 513 </el-dialog>
512 514
@@ -695,7 +697,8 @@ export default { @@ -695,7 +697,8 @@ export default {
695 h5Page 697 h5Page
696 }, 698 },
697 data() { 699 data() {
698 - return { 700 + return {
  701 + modalLoading:false,
699 id: '', 702 id: '',
700 definitionKey: '', 703 definitionKey: '',
701 businessKey: '', 704 businessKey: '',
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
@@ -63,7 +63,12 @@ public class TruckActivateController extends BaseController @@ -63,7 +63,12 @@ public class TruckActivateController extends BaseController
63 */ 63 */
64 @GetMapping("/list") 64 @GetMapping("/list")
65 public TableDataInfo list(TruckActivate truckActivate) 65 public TableDataInfo list(TruckActivate truckActivate)
66 - { 66 + {
  67 +
  68 + List<String> tables = truckActivateMapper.getTables("truck_activate%");
  69 +
  70 + truckActivate.setMyTables(tables);
  71 +
67 startPage(); 72 startPage();
68 73
69 return getDataTable(truckActivateService.selectTruckActivateList(truckActivate)); 74 return getDataTable(truckActivateService.selectTruckActivateList(truckActivate));
trash-workFlow/src/main/java/com/trash/business/domain/TruckActivate.java
@@ -96,8 +96,19 @@ public class TruckActivate @@ -96,8 +96,19 @@ public class TruckActivate
96 96
97 private String coord; 97 private String coord;
98 98
  99 + private List<String> myTables;
99 100
100 - private Date createTime; 101 +
  102 +
  103 + public List<String> getMyTables() {
  104 + return myTables;
  105 + }
  106 +
  107 + public void setMyTables(List<String> myTables) {
  108 + this.myTables = myTables;
  109 + }
  110 +
  111 + private Date createTime;
101 112
102 113
103 private List<String> ids; 114 private List<String> ids;
trash-workFlow/src/main/java/com/trash/business/mapper/TruckActivateMapper.java
@@ -69,6 +69,9 @@ public interface TruckActivateMapper @@ -69,6 +69,9 @@ public interface TruckActivateMapper
69 69
70 public TruckActivate selectTodayTruckByObjId(String objId); 70 public TruckActivate selectTodayTruckByObjId(String objId);
71 71
  72 + public List<String> getTables(String name);
  73 +
  74 +
72 public TruckActivate getConractByObjectId(TruckActivate turck); 75 public TruckActivate getConractByObjectId(TruckActivate turck);
73 76
74 public List<TruckActivate> getActivedTruckList(TruckActivate truckActivate); 77 public List<TruckActivate> getActivedTruckList(TruckActivate truckActivate);
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
@@ -90,36 +90,43 @@ public class ViolationCaseFile extends BaseEntity @@ -90,36 +90,43 @@ public class ViolationCaseFile extends BaseEntity
90 90
91 private List<String> names; 91 private List<String> names;
92 92
93 - private short needUpload; 93 + private String needUpload;
94 94
95 public ViolationCaseFile() { 95 public ViolationCaseFile() {
96 } 96 }
97 97
98 public ViolationCaseFile(JSONObject json) { 98 public ViolationCaseFile(JSONObject json) {
99 - this.id = json.getString("taskId"); 99 + this.id = json.getString("taskId");
100 this.number = json.getString("evtId"); 100 this.number = json.getString("evtId");
101 - this.setCreateBy(json.getString("reporter")); 101 + this.setCreateBy("综管服推送"); //上报人
102 102
103 - Date d = new Date(json.getString("reportTime")); 103 + Date d = new Date(json.getString("reportTime")); //上报时间
104 104
105 this.createTime = d; 105 this.createTime = d;
  106 +
  107 + this.violationObjectType = "0";
  108 +
  109 + this.violationType = "工地预警-未按时间作业";
  110 + this.violationGrade = "一般类";
  111 + this.sendObject = "区管理部门";
  112 +
106 113
107 114
108 - this.projectName = json.getString("caseClassName"); 115 + this.projectName = json.getString("caseClassName"); //
109 116
110 - this.describe = json.getString("regCaseStandard"); 117 + this.describe = "在"+json.getString("areaName")+"区域发现【"+json.getString("carNumber") +"】未按时间作业告警"; //json.getString("regCaseStandard");
111 118
112 - this.owningRegion = json.getString("areaName"); 119 + this.owningRegion = "芙蓉区";
113 120
114 - this.needUpload = 1; 121 + this.needUpload = "1";
115 122
116 } 123 }
117 124
118 - public short getNeedUpload() { 125 + public String getNeedUpload() {
119 return needUpload; 126 return needUpload;
120 } 127 }
121 128
122 - public void setNeedUpload(short needUpload) { 129 + public void setNeedUpload(String needUpload) {
123 this.needUpload = needUpload; 130 this.needUpload = needUpload;
124 } 131 }
125 132
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ReplyApprovalProcessServiceImpl.java
1 package com.trash.casefile.service.impl; 1 package com.trash.casefile.service.impl;
2 2
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
  5 +import java.util.HashMap;
3 import java.util.List; 6 import java.util.List;
  7 +import java.util.Map;
  8 +
4 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
  11 +import org.springframework.web.multipart.MultipartFile;
  12 +
6 import com.trash.casefile.mapper.ReplyApprovalProcessMapper; 13 import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
  14 +import com.trash.casefile.mapper.ViolationCaseFileMapper;
  15 +import com.alibaba.fastjson.JSONArray;
  16 +import com.alibaba.fastjson.JSONObject;
7 import com.trash.casefile.domain.ReplyApprovalProcess; 17 import com.trash.casefile.domain.ReplyApprovalProcess;
  18 +import com.trash.casefile.domain.ViolationCaseFile;
8 import com.trash.casefile.service.IReplyApprovalProcessService; 19 import com.trash.casefile.service.IReplyApprovalProcessService;
  20 +import com.trash.common.utils.DateUtils;
  21 +import com.trash.common.utils.RemoteServerUtils;
  22 +import com.trash.common.utils.SecurityUtils;
  23 +import com.trash.common.utils.file.FileUploadUtils;
  24 +import com.trash.office.domain.UploadFile;
9 25
10 /** 26 /**
11 * 回复审批流程Service业务层处理 27 * 回复审批流程Service业务层处理
@@ -18,6 +34,9 @@ public class ReplyApprovalProcessServiceImpl implements IReplyApprovalProcessSer @@ -18,6 +34,9 @@ public class ReplyApprovalProcessServiceImpl implements IReplyApprovalProcessSer
18 { 34 {
19 @Autowired 35 @Autowired
20 private ReplyApprovalProcessMapper replyApprovalProcessMapper; 36 private ReplyApprovalProcessMapper replyApprovalProcessMapper;
  37 +
  38 + @Autowired
  39 + ViolationCaseFileMapper caseMapper;
21 40
22 /** 41 /**
23 * 查询回复审批流程 42 * 查询回复审批流程
@@ -52,6 +71,8 @@ public class ReplyApprovalProcessServiceImpl implements IReplyApprovalProcessSer @@ -52,6 +71,8 @@ public class ReplyApprovalProcessServiceImpl implements IReplyApprovalProcessSer
52 @Override 71 @Override
53 public int insertReplyApprovalProcess(ReplyApprovalProcess replyApprovalProcess) 72 public int insertReplyApprovalProcess(ReplyApprovalProcess replyApprovalProcess)
54 { 73 {
  74 +
  75 +
55 return replyApprovalProcessMapper.insertReplyApprovalProcess(replyApprovalProcess); 76 return replyApprovalProcessMapper.insertReplyApprovalProcess(replyApprovalProcess);
56 } 77 }
57 78
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
@@ -210,7 +210,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -210,7 +210,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
210 uploadFileMapper.insertUploadFile(uploadFile); 210 uploadFileMapper.insertUploadFile(uploadFile);
211 211
212 212
213 - if(violationCaseFile.getNeedUpload() == 1){ 213 + if(violationCaseFile.getNeedUpload() != null && violationCaseFile.getNeedUpload().equals("1")){
214 Map map = new HashMap(); 214 Map map = new HashMap();
215 215
216 if(file.getOriginalFilename().toUpperCase().endsWith("JPG") 216 if(file.getOriginalFilename().toUpperCase().endsWith("JPG")
@@ -224,7 +224,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -224,7 +224,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
224 } 224 }
225 225
226 map.put("attchFileName", file.getOriginalFilename()); 226 map.put("attchFileName", file.getOriginalFilename());
227 - map.put("attchFilePath", "http://101.95.0.106:10001/workflow" + path); 227 + map.put("attchFilePath", "http://172.26.157.12:10001/workflow" + path);
228 228
229 229
230 upfiles.add(map); 230 upfiles.add(map);
@@ -233,7 +233,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -233,7 +233,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
233 233
234 } 234 }
235 235
236 - if(violationCaseFile.getNeedUpload() == 1){ 236 + if(violationCaseFile.getNeedUpload() != null && violationCaseFile.getNeedUpload().equals("1")){
237 237
238 Map params = new HashMap<>(); 238 Map params = new HashMap<>();
239 239
@@ -343,6 +343,28 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -343,6 +343,28 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
343 newUploadFile.setFilePath(FileUploadUtils.uploadFile(file)); 343 newUploadFile.setFilePath(FileUploadUtils.uploadFile(file));
344 uploadFileMapper.insertUploadFile(newUploadFile); 344 uploadFileMapper.insertUploadFile(newUploadFile);
345 } 345 }
  346 +
  347 + int i = 0;
  348 + //根据发送对象判断流程
  349 + if(violationCaseFileVo.getViolationCaseFile().getSendObject().equals("区管理部门")){
  350 +
  351 + if(violationCaseFileVo.getViolationCaseFile().getViolationGrade().equals("一般类")){
  352 + i = 1;
  353 + }else{
  354 + i = 2;
  355 + }
  356 + }
  357 + if(violationCaseFileVo.getViolationCaseFile().getViolationType().equals("三无车辆进入工地")||
  358 + violationCaseFileVo.getViolationCaseFile().getViolationType().equals("三无车辆进入处理场所")||
  359 + violationCaseFileVo.getViolationCaseFile().getViolationType().equals("三无车辆运输")){
  360 + i = 2;
  361 + }
  362 +
  363 +
  364 + WorkflowService.createCaseFile(violationCaseFileVo.getViolationCaseFile(),i);
  365 +
  366 + violationCaseFileVo.getViolationCaseFile().setStatus(0);
  367 +
346 return violationCaseFileMapper.updateViolationCaseFile(violationCaseFileVo.getViolationCaseFile()); 368 return violationCaseFileMapper.updateViolationCaseFile(violationCaseFileVo.getViolationCaseFile());
347 } 369 }
348 370
trash-workFlow/src/main/java/com/trash/workflow/listener/casefileListener.java
1 package com.trash.workflow.listener; 1 package com.trash.workflow.listener;
2 2
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
  5 +import java.util.HashMap;
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
3 import org.activiti.engine.delegate.DelegateExecution; 9 import org.activiti.engine.delegate.DelegateExecution;
4 import org.activiti.engine.delegate.ExecutionListener; 10 import org.activiti.engine.delegate.ExecutionListener;
5 import org.activiti.engine.delegate.Expression; 11 import org.activiti.engine.delegate.Expression;
6 12
  13 +import com.alibaba.fastjson.JSONArray;
  14 +import com.alibaba.fastjson.JSONObject;
7 import com.trash.activiti.service.IActTaskService; 15 import com.trash.activiti.service.IActTaskService;
8 import com.trash.business.domain.SupervisionThreestep; 16 import com.trash.business.domain.SupervisionThreestep;
9 import com.trash.business.mapper.SupervisionThreestepMapper; 17 import com.trash.business.mapper.SupervisionThreestepMapper;
10 import com.trash.caseOffline.domain.CaseOffline; 18 import com.trash.caseOffline.domain.CaseOffline;
11 import com.trash.caseOffline.service.ICaseOfflineService; 19 import com.trash.caseOffline.service.ICaseOfflineService;
  20 +import com.trash.casefile.domain.ReplyApprovalProcess;
12 import com.trash.casefile.domain.ViolationCaseFile; 21 import com.trash.casefile.domain.ViolationCaseFile;
  22 +import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
  23 +import com.trash.casefile.mapper.ViolationCaseFileMapper;
13 import com.trash.casefile.service.IViolationCaseFileService; 24 import com.trash.casefile.service.IViolationCaseFileService;
  25 +import com.trash.common.utils.DateUtils;
  26 +import com.trash.common.utils.RemoteServerUtils;
14 import com.trash.common.utils.spring.SpringUtils; 27 import com.trash.common.utils.spring.SpringUtils;
15 import com.trash.workflow.domain.Workflow; 28 import com.trash.workflow.domain.Workflow;
16 import com.trash.workflow.mapper.WorkflowMapper; 29 import com.trash.workflow.mapper.WorkflowMapper;
@@ -29,7 +42,58 @@ public class casefileListener implements ExecutionListener { @@ -29,7 +42,58 @@ public class casefileListener implements ExecutionListener {
29 42
30 caseOffline.setStatus(Integer.parseInt(state.getValue(delegateExecution).toString())); 43 caseOffline.setStatus(Integer.parseInt(state.getValue(delegateExecution).toString()));
31 44
32 - SpringUtils.getBean(IViolationCaseFileService.class).updateViolationCaseFile(caseOffline); 45 + SpringUtils.getBean(ViolationCaseFileMapper.class).updateViolationCaseFile(caseOffline);
  46 +
  47 + ViolationCaseFile violationCaseFile = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileById(delegateExecution.getProcessInstanceBusinessKey().split(":")[1]);
  48 +
  49 +
  50 +
  51 +
  52 + if(violationCaseFile.getNeedUpload() != null && violationCaseFile.getNeedUpload().equals("1")){
  53 + List<Map<String, String>> upfiles = new ArrayList<Map<String, String>>();
  54 +
  55 + ReplyApprovalProcess replyApprovalProcess = new ReplyApprovalProcess();
  56 + replyApprovalProcess.setTableName(delegateExecution.getProcessInstanceBusinessKey());
  57 +
  58 + List<ReplyApprovalProcess> repList = SpringUtils.getBean(ReplyApprovalProcessMapper.class).selectReplyApprovalProcessList(replyApprovalProcess);
  59 +
  60 + replyApprovalProcess = repList.get(0);
  61 +
  62 + Map map = new HashMap();
  63 +
  64 + for(String file :replyApprovalProcess.getReplyImg().split(",")){
  65 +
  66 + if(file.toUpperCase().endsWith("JPG")
  67 + || file.toUpperCase().endsWith("PNG")
  68 + || file.toUpperCase().endsWith("JPEG")){
  69 + map.put("attchType", 0);
  70 + }else if(file.toUpperCase().endsWith("MP3")){
  71 + map.put("attchType", 1);
  72 + }else if(file.toUpperCase().endsWith("MP4") || file.toUpperCase().endsWith("AVI")){
  73 + map.put("attchType", 2);
  74 + }
  75 +
  76 + map.put("attchFileName", file.split("/")[file.split("/").length-1]);
  77 + map.put("attchFilePath", "http://172.26.157.12:10001/workflow" + file);
  78 +
  79 +
  80 + upfiles.add(map);
  81 + }
  82 +
  83 +
  84 + Map params = new HashMap<>();
  85 +
  86 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  87 +
  88 +
  89 + params.put("evtId",violationCaseFile.getNumber());
  90 + params.put("replyContent",replyApprovalProcess.getReply());
  91 + params.put("handleTime",DateUtils.getTime());
  92 + params.put("attchList",upfiles);
  93 + boolean result = RemoteServerUtils.replyUpCase(params);
  94 +
  95 + System.out.print("反馈到上级平台: " + result);
  96 + }
33 97
34 workflowUtils.sendDataToHisTory(delegateExecution, state); 98 workflowUtils.sendDataToHisTory(delegateExecution, state);
35 99
trash-workFlow/src/main/java/com/trash/workflow/service/IWorkflowService.java
@@ -88,10 +88,10 @@ public interface IWorkflowService @@ -88,10 +88,10 @@ public interface IWorkflowService
88 88
89 public void deleteWorkflowByName(String string); 89 public void deleteWorkflowByName(String string);
90 90
91 - 91 + int createCaseFileByTask(ViolationCaseFile violationCaseFile,int index);
  92 +
92 int createCaseOffline(CaseOffline caseOffline); 93 int createCaseOffline(CaseOffline caseOffline);
93 94
94 -  
95 int createCaseFile(ViolationCaseFile violationCaseFile,int index); 95 int createCaseFile(ViolationCaseFile violationCaseFile,int index);
96 96
97 int createCaseFile1(ViolationWarningInformation violationCaseFile, int index,int isAuto); 97 int createCaseFile1(ViolationWarningInformation violationCaseFile, int index,int isAuto);
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
@@ -332,6 +332,82 @@ public class WorkflowServiceImpl implements IWorkflowService { @@ -332,6 +332,82 @@ public class WorkflowServiceImpl implements IWorkflowService {
332 332
333 return 0; 333 return 0;
334 } 334 }
  335 +
  336 + @Override
  337 + @Transactional
  338 + public int createCaseFileByTask(ViolationCaseFile caseFile, int index) { // 违规预警案卷
  339 +
  340 + if(StringUtils.isEmpty(RemoteServerUtils.remote)) {
  341 + RemoteServerUtils.remote = trashConfig.getRemotePath();
  342 + }
  343 + loginService.loginByRemote(trashConfig.getToken());
  344 +
  345 +
  346 + SysUser user = null;
  347 +
  348 + try {
  349 + user = SecurityUtils.getLoginUser().getUser();
  350 + } catch (Exception e) {
  351 +// e.printStackTrace();
  352 + }
  353 +
  354 +
  355 +
  356 +
  357 + SecurityContextImpl securityContextImpl = new SecurityContextImpl();
  358 +
  359 + securityContextImpl.setAuthentication(SecurityContextHolder.getContext().getAuthentication());
  360 + org.activiti.engine.runtime.ProcessInstance instance = null;
  361 + String title = "案卷号:" + caseFile.getNumber();
  362 + String flowType = "workflow_casefile";
  363 +
  364 + if(index > 0 && caseFile.getOwningRegion().contains("湘江新区")){
  365 + index += 3;
  366 + }
  367 + ActWorkflowFormData awf = null;
  368 +
  369 + try {
  370 + Map map = new HashedMap<>();
  371 +
  372 + map.put("route", index);
  373 + instance = runtimeService.createProcessInstanceBuilder().businessKey(flowType + ":" + caseFile.getId())
  374 + .name(title).variable("route", index).processDefinitionKey(flowType).variables(map).start();
  375 +
  376 + // runtimeService.startProcessInstanceById(instance.getProcessDefinitionId(),map);
  377 +
  378 + if (index == 0) {
  379 + Task task = taskService.createTaskQuery().processInstanceId(instance.getId()).singleResult();
  380 +
  381 + task.setAssignee(caseFile.getAbbreviation());
  382 +
  383 + taskService.saveTask(task);
  384 + } else {
  385 + updateProcessKafka(instance, caseFile.getOwningRegion(), trashConfig.getToken());
  386 + }
  387 +
  388 + Workflow workflow = new Workflow();
  389 + workflow.setId(flowType + ":" + caseFile.getId());
  390 + workflow.setTitle(title);
  391 + workflow.setReason("平台案卷");
  392 + workflow.setStartTime(sdf.format(caseFile.getCreateTime()));
  393 + workflow.setEndTime(sdf.format(caseFile.getCreateTime()));
  394 + workflow.setType("违规案卷处置流程");
  395 + workflow.setInstanceId(instance.getId());
  396 + workflow.setState("0");
  397 + workflow.setCreateTime(new Date());
  398 +
  399 +
  400 + awf = insertAwf(user,workflow);
  401 +
  402 + return workflowMapper.insertWorkflow(workflow);
  403 + } catch (Exception e) {
  404 + if(awf.getId() != null)
  405 + awfServer.deleteActWorkflowFormDataById(awf.getId());
  406 + runtimeService.deleteProcessInstance(instance.getId(), "创建失败");
  407 + throw new RuntimeException(e);
  408 + }
  409 +
  410 + }
335 411
336 @Override 412 @Override
337 @Transactional 413 @Transactional
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
@@ -37,10 +37,25 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -37,10 +37,25 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
37 from truck_activate 37 from truck_activate
38 </sql> 38 </sql>
39 39
  40 + <select id="getTables" parameterType="String" resultType="String">
  41 + select table_name from information_schema.TABLES where table_name like #{name}
  42 + </select>
  43 +
40 44
41 <select id="selectTruckActivateList" parameterType="TruckActivate" resultMap="TruckActivateResult"> 45 <select id="selectTruckActivateList" parameterType="TruckActivate" resultMap="TruckActivateResult">
42 - <include refid="selectTruckActivateVo"/>  
43 - <where> 46 + select a.* from
  47 + <if test="myTables != null">
  48 + <foreach item="table" collection="myTables" open="(" separator=" UNION ALL " close=") a">
  49 + select id, company, license_plate, time, construction,construction_id, status, earthsite, object_id, create_by, create_type, activate_time, create_time,create_count
  50 + ,address,effective_from,effective_end,transport_start_time,transport_end_time,route_name,earth_name
  51 + from ${table}
  52 + </foreach>
  53 + </if>
  54 + <if test="myTables == null">
  55 + truck_activate a
  56 + </if>
  57 + <where>
  58 +
44 <if test="company != null and company != ''"> and company like concat('%', #{company},'%')</if> 59 <if test="company != null and company != ''"> and company like concat('%', #{company},'%')</if>
45 <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{licensePlate}, '%')</if> 60 <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{licensePlate}, '%')</if>
46 <if test="time != null "> and time = #{time}</if> 61 <if test="time != null "> and time = #{time}</if>
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
@@ -38,7 +38,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -38,7 +38,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
38 <where> 38 <where>
39 <if test="number != null and number != ''"> and number = #{number}</if> 39 <if test="number != null and number != ''"> and number = #{number}</if>
40 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if> 40 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if>
41 - <if test="owningRegion != null and owningRegion != ''"> and owning_region = #{owningRegion}</if> 41 + <if test="owningRegion != null and owningRegion != ''"> and owning_region like concat('%', #{owningRegion}, '%')</if>
42 <if test="violationType != null and violationType != ''"> and violation_type = #{violationType}</if> 42 <if test="violationType != null and violationType != ''"> and violation_type = #{violationType}</if>
43 <if test="violationGrade != null and violationGrade != ''"> and violation_grade = #{violationGrade}</if> 43 <if test="violationGrade != null and violationGrade != ''"> and violation_grade = #{violationGrade}</if>
44 <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if> 44 <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>