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 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 917 public static boolean insertUpCase(Map params) {
879 918 if(okHttpClient == null){
880 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 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 38 * 订单id
23 39 */
24 40 private String garOrderId;
... ...
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
... ... @@ -106,6 +106,19 @@ public class DriverTask {
106 106  
107 107  
108 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 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 474 }
475 475  
476 476 if (this.definitionKey == "workflow_casefile") {
  477 + this.modalLoading = true;
477 478 let postData = {};
478 479  
479 480 postData.tableName = this.businessKey;
... ... @@ -498,6 +499,7 @@ export default {
498 499 formDataSave(this.id, this.form.formData).then(response => {
499 500 this.msgSuccess("审批成功");
500 501 this.violationCaseFile = false;
  502 + this.modalLoading = false;
501 503 this.getList();
502 504 });
503 505 });
... ...
trash-ui/src/api/vio_casefile.js
... ... @@ -23,6 +23,7 @@ export default {
23 23 },
24 24 data() {
25 25 return {
  26 +
26 27 modalLoading:false,
27 28 // 遮罩层
28 29 loading: true,
... ... @@ -124,7 +125,7 @@ export default {
124 125 idInfo: null,
125 126 openInfo: false,
126 127 slide1: [],
127   - videoSrc: []
  128 + videoSrc: [],
128 129 };
129 130 },
130 131 watch: {
... ... @@ -221,11 +222,11 @@ export default {
221 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 231 getList() {
231 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 3 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
3 4  
4 5 import {historyFromData} from '@/api/activiti/historyFormdata'
... ... @@ -34,6 +35,23 @@ export default {
34 35 this.init();
35 36 },
36 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 55 init() {
38 56  
39 57 let id = this.idInfo.split(":");
... ... @@ -48,10 +66,10 @@ export default {
48 66 let files = JSON.stringify(response.data.uploadFiles);
49 67 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
50 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 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 73 this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
56 74 }
57 75 })
... ...
trash-ui/src/layout/index.vue
1 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 2 <app-main />
7   -
8   - </div>
9   - </div>
10 3 </template>
11 4  
12 5 <script>
13 6 import RightPanel from '@/components/RightPanel'
14   -import { mapState } from 'vuex'
15 7 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
16 8 import ResizeMixin from './mixin/ResizeHandler'
  9 +import { mapState } from 'vuex'
17 10  
18 11 export default {
19 12 name: 'Layout',
... ... @@ -52,56 +45,45 @@ export default {
52 45 </script>
53 46  
54 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 89 </style>
... ...
trash-ui/src/layout/index4.vue renamed to trash-ui/src/layout/index33.vue
1 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 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 10 </template>
4 11  
5 12 <script>
6 13 import RightPanel from '@/components/RightPanel'
  14 +import { mapState } from 'vuex'
7 15 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
8 16 import ResizeMixin from './mixin/ResizeHandler'
9   -import { mapState } from 'vuex'
10 17  
11 18 export default {
12 19 name: 'Layout',
... ... @@ -45,45 +52,56 @@ export default {
45 52 </script>
46 53  
47 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 65 position: fixed;
75 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 107 </style>
... ...
trash-ui/src/main.js
... ... @@ -42,8 +42,8 @@ Vue.use(plugins)
42 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 48 Vue.prototype.msgSuccess = function (msg) {
49 49 this.$message({ showClose: true, message: msg, type: "success" });
... ...
trash-ui/src/views/activiti/task/index.vue
... ... @@ -499,7 +499,10 @@
499 499 <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)"
500 500 v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回
501 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 506 </div>
504 507 </el-dialog>
505 508  
... ... @@ -685,6 +688,7 @@
685 688 },
686 689 data() {
687 690 return {
  691 + modalLoading:false,
688 692 id: '',
689 693 definitionKey: '',
690 694 businessKey: '',
... ...
trash-ui/src/views/casefile/violationCaseFile/index.vue
... ... @@ -22,7 +22,7 @@
22 22 <el-option label="企业" value="2" />
23 23 </el-select>
24 24 </el-form-item>
25   -</el-row>
  25 + </el-row>
26 26 <el-row>
27 27 <el-form-item label="违规对象" prop="projectName">
28 28 <el-input
... ... @@ -95,7 +95,17 @@
95 95 <el-table-column label="日期" align="center" prop="createTime">
96 96 </el-table-column>
97 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 109 <el-button
100 110 size="mini"
101 111 type="text"
... ... @@ -151,8 +161,8 @@
151 161 <el-row :gutter="2">
152 162 <el-col :span="11">
153 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 166 </el-select>
157 167 </el-form-item>
158 168 </el-col>
... ...
trash-ui/src/views/h5/task/index.vue
... ... @@ -506,7 +506,9 @@
506 506  
507 507 <div slot="footer" class="dialog-footer">
508 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 512 </div>
511 513 </el-dialog>
512 514  
... ... @@ -695,7 +697,8 @@ export default {
695 697 h5Page
696 698 },
697 699 data() {
698   - return {
  700 + return {
  701 + modalLoading:false,
699 702 id: '',
700 703 definitionKey: '',
701 704 businessKey: '',
... ...
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
... ... @@ -63,7 +63,12 @@ public class TruckActivateController extends BaseController
63 63 */
64 64 @GetMapping("/list")
65 65 public TableDataInfo list(TruckActivate truckActivate)
66   - {
  66 + {
  67 +
  68 + List<String> tables = truckActivateMapper.getTables("truck_activate%");
  69 +
  70 + truckActivate.setMyTables(tables);
  71 +
67 72 startPage();
68 73  
69 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 96  
97 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 114 private List<String> ids;
... ...
trash-workFlow/src/main/java/com/trash/business/mapper/TruckActivateMapper.java
... ... @@ -69,6 +69,9 @@ public interface TruckActivateMapper
69 69  
70 70 public TruckActivate selectTodayTruckByObjId(String objId);
71 71  
  72 + public List<String> getTables(String name);
  73 +
  74 +
72 75 public TruckActivate getConractByObjectId(TruckActivate turck);
73 76  
74 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 90  
91 91 private List<String> names;
92 92  
93   - private short needUpload;
  93 + private String needUpload;
94 94  
95 95 public ViolationCaseFile() {
96 96 }
97 97  
98 98 public ViolationCaseFile(JSONObject json) {
99   - this.id = json.getString("taskId");
  99 + this.id = json.getString("taskId");
100 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 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 126 return needUpload;
120 127 }
121 128  
122   - public void setNeedUpload(short needUpload) {
  129 + public void setNeedUpload(String needUpload) {
123 130 this.needUpload = needUpload;
124 131 }
125 132  
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ReplyApprovalProcessServiceImpl.java
1 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 6 import java.util.List;
  7 +import java.util.Map;
  8 +
4 9 import org.springframework.beans.factory.annotation.Autowired;
5 10 import org.springframework.stereotype.Service;
  11 +import org.springframework.web.multipart.MultipartFile;
  12 +
6 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 17 import com.trash.casefile.domain.ReplyApprovalProcess;
  18 +import com.trash.casefile.domain.ViolationCaseFile;
8 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 27 * 回复审批流程Service业务层处理
... ... @@ -18,6 +34,9 @@ public class ReplyApprovalProcessServiceImpl implements IReplyApprovalProcessSer
18 34 {
19 35 @Autowired
20 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 71 @Override
53 72 public int insertReplyApprovalProcess(ReplyApprovalProcess replyApprovalProcess)
54 73 {
  74 +
  75 +
55 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 210 uploadFileMapper.insertUploadFile(uploadFile);
211 211  
212 212  
213   - if(violationCaseFile.getNeedUpload() == 1){
  213 + if(violationCaseFile.getNeedUpload() != null && violationCaseFile.getNeedUpload().equals("1")){
214 214 Map map = new HashMap();
215 215  
216 216 if(file.getOriginalFilename().toUpperCase().endsWith("JPG")
... ... @@ -224,7 +224,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
224 224 }
225 225  
226 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 230 upfiles.add(map);
... ... @@ -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 238 Map params = new HashMap<>();
239 239  
... ... @@ -343,6 +343,28 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
343 343 newUploadFile.setFilePath(FileUploadUtils.uploadFile(file));
344 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 368 return violationCaseFileMapper.updateViolationCaseFile(violationCaseFileVo.getViolationCaseFile());
347 369 }
348 370  
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/casefileListener.java
1 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 9 import org.activiti.engine.delegate.DelegateExecution;
4 10 import org.activiti.engine.delegate.ExecutionListener;
5 11 import org.activiti.engine.delegate.Expression;
6 12  
  13 +import com.alibaba.fastjson.JSONArray;
  14 +import com.alibaba.fastjson.JSONObject;
7 15 import com.trash.activiti.service.IActTaskService;
8 16 import com.trash.business.domain.SupervisionThreestep;
9 17 import com.trash.business.mapper.SupervisionThreestepMapper;
10 18 import com.trash.caseOffline.domain.CaseOffline;
11 19 import com.trash.caseOffline.service.ICaseOfflineService;
  20 +import com.trash.casefile.domain.ReplyApprovalProcess;
12 21 import com.trash.casefile.domain.ViolationCaseFile;
  22 +import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
  23 +import com.trash.casefile.mapper.ViolationCaseFileMapper;
13 24 import com.trash.casefile.service.IViolationCaseFileService;
  25 +import com.trash.common.utils.DateUtils;
  26 +import com.trash.common.utils.RemoteServerUtils;
14 27 import com.trash.common.utils.spring.SpringUtils;
15 28 import com.trash.workflow.domain.Workflow;
16 29 import com.trash.workflow.mapper.WorkflowMapper;
... ... @@ -29,7 +42,58 @@ public class casefileListener implements ExecutionListener {
29 42  
30 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 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 88  
89 89 public void deleteWorkflowByName(String string);
90 90  
91   -
  91 + int createCaseFileByTask(ViolationCaseFile violationCaseFile,int index);
  92 +
92 93 int createCaseOffline(CaseOffline caseOffline);
93 94  
94   -
95 95 int createCaseFile(ViolationCaseFile violationCaseFile,int index);
96 96  
97 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 332  
333 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 412 @Override
337 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 37 from truck_activate
38 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 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 59 <if test="company != null and company != ''"> and company like concat('%', #{company},'%')</if>
45 60 <if test="licensePlate != null and licensePlate != ''"> and license_plate like concat('%', #{licensePlate}, '%')</if>
46 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 38 <where>
39 39 <if test="number != null and number != ''"> and number = #{number}</if>
40 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 42 <if test="violationType != null and violationType != ''"> and violation_type = #{violationType}</if>
43 43 <if test="violationGrade != null and violationGrade != ''"> and violation_grade = #{violationGrade}</if>
44 44 <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
... ...