Commit 688c46d1d6719da6f4dff48baa0461ecafc69c64

Authored by youxiw2000
2 parents e16a9f29 b2d0a6d1

m

trash-ui/src/api/casefile/violationWarningInformation.js
@@ -9,6 +9,15 @@ export function listViolationWarningInformation(query) { @@ -9,6 +9,15 @@ export function listViolationWarningInformation(query) {
9 }) 9 })
10 } 10 }
11 11
  12 +// 查询回复审批流程列表
  13 +export function caseTable(query) {
  14 + return request({
  15 + url: '/casefile/violationWarningInformation/caseTable',
  16 + method: 'get',
  17 + params: query
  18 + })
  19 +}
  20 +
12 // 查询违规预警信息详细 21 // 查询违规预警信息详细
13 export function getViolationWarningInformation(id) { 22 export function getViolationWarningInformation(id) {
14 return request({ 23 return request({
@@ -51,3 +60,12 @@ export function exportViolationWarningInformation(query) { @@ -51,3 +60,12 @@ export function exportViolationWarningInformation(query) {
51 params: query 60 params: query
52 }) 61 })
53 } 62 }
  63 +
  64 +// 修改平台违规案卷
  65 +export function updateViolationCaseFileReader1(data) {
  66 + return request({
  67 + url: '/casefile/violationWarningInformation/updateViolationCaseFileReader',
  68 + method: 'put',
  69 + data: data
  70 + })
  71 +}
trash-ui/src/views/activiti/task/index.vue
@@ -269,6 +269,66 @@ @@ -269,6 +269,66 @@
269 <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button> 269 <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
270 </div> 270 </div>
271 </el-dialog> 271 </el-dialog>
  272 +
  273 + <!-- 平台违规信息 -->
  274 + <el-dialog :title="title" :visible.sync="violationCaseFile" width="850px" append-to-body :close-on-click-modal="false">
  275 + <violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/>
  276 + <el-form v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员' && violationCaseFile" :rules="rules" label-width="120px" >
  277 + <el-input v-model="form.reply" type="textarea" :rows="3" placeholder="回复意见">
  278 + </el-input>
  279 + <el-upload
  280 + list-type="picture"
  281 + action=''
  282 + accept=".jpg, .png , .bmp"
  283 + :limit="1"
  284 + :auto-upload="false"
  285 + :file-list="form.replyImg"
  286 + :on-change="getFile"
  287 + :on-preview="handlePictureCardPreview"
  288 + :on-remove="handleUploadRemove"
  289 + >
  290 + <el-button size="small" type="primary" @click="uploadimg" v-if="form.replyImg == null">选择图片上传</el-button>
  291 + <div slot="tip" class="el-upload__tip" v-if="form.replyImg== null">只能上传一张图片文件</div>
  292 + </el-upload>
  293 +
  294 + </el-form>
  295 +
  296 +
  297 + <div slot="footer" class="dialog-footer">
  298 + <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
  299 + <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
  300 + </div>
  301 + </el-dialog>
  302 +
  303 + <!-- 违规预警信息 -->
  304 + <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false">
  305 + <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
  306 + <el-form v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员' && violationCaseFile1" :rules="rules" label-width="120px" >
  307 + <el-input v-model="form.reply" type="textarea" :rows="3" placeholder="回复意见">
  308 + </el-input>
  309 + <el-upload
  310 + list-type="picture"
  311 + action=''
  312 + accept=".jpg, .png , .bmp"
  313 + :limit="1"
  314 + :auto-upload="false"
  315 + :file-list="form.replyImg"
  316 + :on-change="getFile"
  317 + :on-preview="handlePictureCardPreview"
  318 + :on-remove="handleUploadRemove"
  319 + >
  320 + <el-button size="small" type="primary" @click="uploadimg" v-if="form.replyImg == null">选择图片上传</el-button>
  321 + <div slot="tip" class="el-upload__tip" v-if="form.replyImg== null">只能上传一张图片文件</div>
  322 + </el-upload>
  323 +
  324 + </el-form>
  325 +
  326 +
  327 + <div slot="footer" class="dialog-footer">
  328 + <el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
  329 + <el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
  330 + </div>
  331 + </el-dialog>
272 </div> 332 </div>
273 </template> 333 </template>
274 334
@@ -277,113 +337,115 @@ @@ -277,113 +337,115 @@
277 </style> 337 </style>
278 338
279 <script> 339 <script>
280 - import {  
281 - listTask,  
282 - formDataShow,  
283 - formDataSave  
284 - } from "@/api/activiti/task";  
285 -  
286 -  
287 -import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign";  
288 -  
289 -import { updateCaseOffline } from "@/api/caseOffline/caseOffline";  
290 -  
291 -import { updateViolationCaseFileReader } from "@/api/casefile/violationCaseFile";  
292 -  
293 -import { addReplyApprovalProcess } from "@/api/casefile/replyApprovalProcess";  
294 -  
295 -  
296 -  
297 - import {  
298 - getArea,  
299 - getDict,  
300 - } from "@/api/dict";  
301 -  
302 - import {  
303 - updateThreestep,  
304 - activeThreestep  
305 - } from "@/api/business/threestep";  
306 -  
307 - import leaveHistoryForm from "@/views/workflow/leaveHistoryForm";  
308 - import threestepInfo from "@/views/business/threestep/threestepInfo";  
309 - import taskCard from "@/views/activiti/task/taskCard";  
310 - import {  
311 - getToken  
312 - } from "@/utils/auth";  
313 - import conferenceInfo from "@/views/office/conference/conferenceInfo";  
314 - import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo";  
315 - import constructsiteInfo from "@/views/activiti/task/constructsiteInfo";  
316 - import earthsitesInfo from "@/views/activiti/task/earthsitesInfo";  
317 - import contractInfo from "@/views/activiti/task/contractInfo";  
318 - import logisticsInfo from "@/views/office/logistics/logisticsInfo";  
319 - import handleInfo from "@/views/office/handle/handleInfo";  
320 -  
321 - import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";  
322 - import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"  
323 -  
324 -  
325 - export default {  
326 - name: "task",  
327 - components: {  
328 - taskCard,  
329 - leaveHistoryForm,  
330 - threestepInfo,  
331 - conferenceInfo,  
332 - leaveApplicationInfo,  
333 - logisticsInfo,  
334 - handleInfo,  
335 - leaveApplicationInfo,  
336 - constructsiteInfo,  
337 - earthsitesInfo,  
338 - contractInfo,  
339 - caseOfflineInfo,  
340 - violationCaseFileInfo  
341 - },  
342 - data() {  
343 - return {  
344 - id: '',  
345 - definitionKey: '',  
346 - businessKey: '',  
347 - // 遮罩层  
348 - loading: true,  
349 - // 选中数组  
350 - ids: [],  
351 - // 非单个禁用  
352 - single: true,  
353 - // 非多个禁用  
354 - multiple: true,  
355 - // 显示搜索条件  
356 - showSearch: true,  
357 - // 总条数  
358 - total: 0,  
359 - // 请假表格数据  
360 - taskList: [],  
361 - // 弹出层标题  
362 - title: "",  
363 - // 是否显示弹出层  
364 - open: false,  
365 - open2: false,  
366 - picSample: false,  
367 - taskName: null,  
368 - // 查询参数  
369 - queryParams: {  
370 - pageNum: 1,  
371 - pageSize: 10,  
372 - role:null,  
373 - dept:null,  
374 - },  
375 - // 表单参数  
376 - form: {  
377 - formData: []  
378 - },  
379 - needShow: false,  
380 - // 表单校验  
381 - rules: {  
382 - subReason: [{  
383 - required: true,  
384 - message: '请填写补充说明',  
385 - trigger: 'change'  
386 - }, ], 340 +import {
  341 + listTask,
  342 + formDataShow,
  343 + formDataSave
  344 +} from "@/api/activiti/task";
  345 +
  346 +
  347 +import {getSignByObjId, addSign, updateSign} from "@/api/sign/sign";
  348 +
  349 +import {updateCaseOffline} from "@/api/caseOffline/caseOffline";
  350 +
  351 +import {updateViolationCaseFileReader} from "@/api/casefile/violationCaseFile";
  352 +import {updateViolationCaseFileReader1} from "@/api/casefile/violationWarningInformation";
  353 +
  354 +import {
  355 + getArea,
  356 + getDict,
  357 + getUsers
  358 +} from "@/api/dict";
  359 +
  360 +import {
  361 + updateThreestep,
  362 + activeThreestep
  363 +} from "@/api/business/threestep";
  364 +import {
  365 + getToken
  366 +} from "@/utils/auth";
  367 +import {addReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
  368 +import {updateHandleAffairs} from "@/api/office/handle";
  369 +import Treeselect from "@riophae/vue-treeselect";
  370 +import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  371 +import leaveHistoryForm from "@/views/workflow/leaveHistoryForm";
  372 +import threestepInfo from "@/views/business/threestep/threestepInfo";
  373 +import taskCard from "@/views/activiti/task/taskCard";
  374 +import conferenceInfo from "@/views/office/conference/conferenceInfo";
  375 +import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo";
  376 +import constructsiteInfo from "@/views/activiti/task/constructsiteInfo";
  377 +import earthsitesInfo from "@/views/activiti/task/earthsitesInfo";
  378 +import contractInfo from "@/views/activiti/task/contractInfo";
  379 +import logisticsInfo from "@/views/office/logistics/logisticsInfo";
  380 +import handleInfo from "@/views/office/handle/handleInfo";
  381 +import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
  382 +import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  383 +import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo";
  384 +
  385 +export default {
  386 + name: "task",
  387 + components: {
  388 + taskCard,
  389 + leaveHistoryForm,
  390 + threestepInfo,
  391 + conferenceInfo,
  392 + leaveApplicationInfo,
  393 + logisticsInfo,
  394 + handleInfo,
  395 + constructsiteInfo,
  396 + Treeselect,
  397 + earthsitesInfo,
  398 + contractInfo,
  399 + caseOfflineInfo,
  400 + violationCaseFileInfo,
  401 + violationWarningInformationInfo
  402 + },
  403 + data() {
  404 + return {
  405 + id: '',
  406 + definitionKey: '',
  407 + businessKey: '',
  408 + // 遮罩层
  409 + loading: true,
  410 + // 选中数组
  411 + ids: [],
  412 + // 非单个禁用
  413 + single: true,
  414 + // 非多个禁用
  415 + multiple: true,
  416 + // 显示搜索条件
  417 + showSearch: true,
  418 + // 总条数
  419 + total: 0,
  420 + // 请假表格数据
  421 + taskList: [],
  422 + // 弹出层标题
  423 + title: "",
  424 + // 是否显示弹出层
  425 + open: false,
  426 + open2: false,
  427 + picSample: false,
  428 + taskName: null,
  429 + // 查询参数
  430 + queryParams: {
  431 + pageNum: 1,
  432 + pageSize: 10,
  433 + role: null,
  434 + dept: null,
  435 + },
  436 + // 表单参数
  437 + form: {
  438 + formData: []
  439 + },
  440 + needShow: false,
  441 + // 表单校验
  442 + rules: {
  443 + subReason: [{
  444 + required: true,
  445 + message: '请填写补充说明',
  446 + trigger: 'blur'
  447 + },],
  448 +
387 }, 449 },
388 picIndex: 0, 450 picIndex: 0,
389 fileList: [], 451 fileList: [],
@@ -417,6 +479,7 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -417,6 +479,7 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
417 handleAffairsInfoOpen: false, 479 handleAffairsInfoOpen: false,
418 caseOffline: false, 480 caseOffline: false,
419 violationCaseFile: false, 481 violationCaseFile: false,
  482 + violationCaseFile1: false,
420 controlId: null, 483 controlId: null,
421 users: [], 484 users: [],
422 options: [], 485 options: [],
@@ -561,7 +624,8 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -561,7 +624,8 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
561 this.signData = res.data; 624 this.signData = res.data;
562 this.construct = true; 625 this.construct = true;
563 } 626 }
564 - }) 627 + });
  628 + return;
565 } 629 }
566 if (this.definitionKey == "workflow_earthsites") { 630 if (this.definitionKey == "workflow_earthsites") {
567 this.earthsites = true; 631 this.earthsites = true;
@@ -583,6 +647,20 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -583,6 +647,20 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
583 this.handleAffairsInfoOpen = true; 647 this.handleAffairsInfoOpen = true;
584 return; 648 return;
585 } 649 }
  650 + if(this.definitionKey == "workflow_caseoffline"){
  651 + this.caseOffline = true;
  652 + return;
  653 + }
  654 +
  655 + if(this.definitionKey == "workflow_casefile"){
  656 + this.violationCaseFile = true;
  657 + return;
  658 + }
  659 +
  660 + if(this.definitionKey == "violation_warning"){
  661 + this.violationCaseFile1 = true;
  662 + return;
  663 + }
586 this.open = true; 664 this.open = true;
587 this.title = "审批"; 665 this.title = "审批";
588 }); 666 });
@@ -672,11 +750,6 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -672,11 +750,6 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
672 }); 750 });
673 } 751 }
674 return; 752 return;
675 - formDataSave(this.id, this.form.formData).then(response => {  
676 - this.msgSuccess("审批成功");  
677 - this.construct = false;  
678 - this.getList();  
679 - });  
680 } 753 }
681 754
682 if (this.definitionKey == "workflow_conract") { 755 if (this.definitionKey == "workflow_conract") {
@@ -731,6 +804,38 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -731,6 +804,38 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
731 return; 804 return;
732 } 805 }
733 806
  807 +
  808 + if (this.definitionKey == "workflow_caseoffline") {
  809 + let id = this.businessKey.split(":")[1];
  810 + let query = {
  811 + id: id,
  812 + };
  813 + let adv = this.form.advice;
  814 + if (!adv) {
  815 + if (value == 0) {
  816 + adv = "审批通过";
  817 + } else {
  818 + adv = "审批驳回";
  819 + }
  820 + }
  821 + if (this.taskName == "渣土办科员") {
  822 + query.advice1 = adv;
  823 + } else if (this.taskName == "渣土办分管领导") {
  824 + query.advice2 = adv;
  825 + } else if (this.taskName == "治理部部长") {
  826 + query.advice3 = adv;
  827 + } else if (this.taskName == "治理部分管领导") {
  828 + query.advice4 = adv;
  829 + }
  830 + updateCaseOffline(query).then(res => {
  831 + formDataSave(this.id, this.form.formData).then(response => {
  832 + this.msgSuccess("审批成功");
  833 + this.caseOffline = false;
  834 + this.getList();
  835 + });
  836 + })
  837 + return;
  838 + }
734 if (this.definitionKey == "workflow_casefile") { 839 if (this.definitionKey == "workflow_casefile") {
735 debugger; 840 debugger;
736 841
@@ -746,33 +851,64 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;; @@ -746,33 +851,64 @@ import { addReplyApprovalProcess } from &quot;@/api/casefile/replyApprovalProcess&quot;;
746 }) 851 })
747 return; 852 return;
748 } else { 853 } else {
  854 + if (value == 0) {
  855 + let postData = {};
  856 +
  857 + postData.tableName = this.businessKey;
  858 + postData.replyImg = this.form.replyImg;
  859 + postData.reply = this.form.reply;
  860 + addReplyApprovalProcess(postData).then(res => {
  861 + formDataSave(this.id, this.form.formData).then(response => {
  862 + this.msgSuccess("审批成功");
  863 + this.violationCaseFile = false;
  864 + this.getList();
  865 + });
  866 + });
749 867
750 - }  
751 -  
752 -  
753 - if (value == 0) {  
754 - let postData = {};  
755 -  
756 - postData.tableName = this.businessKey;  
757 - postData.replyImg = this.form.replyImg;  
758 - postData.reply = this.form.reply;  
759 - addReplyApprovalProcess(postData).then(res => { 868 + } else {
760 formDataSave(this.id, this.form.formData).then(response => { 869 formDataSave(this.id, this.form.formData).then(response => {
761 this.msgSuccess("审批成功"); 870 this.msgSuccess("审批成功");
762 this.violationCaseFile = false; 871 this.violationCaseFile = false;
763 this.getList(); 872 this.getList();
764 }); 873 });
765 - });  
766 -  
767 - } else {  
768 - formDataSave(this.id, this.form.formData).then(response => {  
769 - this.msgSuccess("审批成功");  
770 - this.violationCaseFile = false;  
771 - this.getList();  
772 - }); 874 + }
773 } 875 }
  876 + }
  877 + if (this.definitionKey == "violation_warning") {
  878 + if (this.taskName == "车辆所属企业" || this.taskName == "渣土办科员") {
  879 + console.log(this.businessKey);
  880 + let objId = this.businessKey.split(":")[1];
  881 + updateViolationCaseFileReader1({id: objId}).then(res => {
  882 + formDataSave(this.id, this.form.formData).then(response => {
  883 + this.msgSuccess("审批成功");
  884 + this.violationCaseFile1 = false;
  885 + this.getList();
  886 + });
  887 + })
  888 + return;
  889 + } else {
  890 + if (value == 0) {
  891 + let postData = {};
  892 +
  893 + postData.tableName = this.businessKey;
  894 + postData.replyImg = this.form.replyImg;
  895 + postData.reply = this.form.reply;
  896 + addReplyApprovalProcess(postData).then(res => {
  897 + formDataSave(this.id, this.form.formData).then(response => {
  898 + this.msgSuccess("审批成功");
  899 + this.violationCaseFile1 = false;
  900 + this.getList();
  901 + });
  902 + });
774 903
775 - 904 + } else {
  905 + formDataSave(this.id, this.form.formData).then(response => {
  906 + this.msgSuccess("审批成功");
  907 + this.violationCaseFile1 = false;
  908 + this.getList();
  909 + });
  910 + }
  911 + }
776 } 912 }
777 }, 913 },
778 conferenceSubmitForm(value) { 914 conferenceSubmitForm(value) {
trash-ui/src/views/casefile/violationCaseFile/index.vue
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 placeholder="请输入项目名称" 31 placeholder="请输入项目名称"
32 32
33 size="small" 33 size="small"
34 - 34 +
35 /> 35 />
36 </el-form-item> 36 </el-form-item>
37 37
@@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@
111 type="text" 111 type="text"
112 icon="el-icon-edit" 112 icon="el-icon-edit"
113 @click="handleInfo(scope.row)" 113 @click="handleInfo(scope.row)"
114 - v-hasPermi="['casefile:violationCaseFile:edit']" 114 + v-hasPermi="['casefile:violationCaseFile:view']"
115 >详情</el-button> 115 >详情</el-button>
116 <!-- <el-button--> 116 <!-- <el-button-->
117 <!-- size="mini"--> 117 <!-- size="mini"-->
trash-ui/src/views/casefile/violationCaseFile/violationCaseFileInfo.vue
@@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@
111 type="text" 111 type="text"
112 icon="el-icon-view" 112 icon="el-icon-view"
113 @click="openImage(scope.row.replyImg)" 113 @click="openImage(scope.row.replyImg)"
114 - v-hasPermi="['casefile:violationWarningInformation:edit']" 114 + v-hasPermi="['casefile:violationWarningInformation:view']"
115 >查看</el-button> 115 >查看</el-button>
116 </template> 116 </template>
117 </el-table-column> 117 </el-table-column>
trash-ui/src/views/casefile/violationWarningInformation/index.vue
@@ -2,32 +2,35 @@ @@ -2,32 +2,35 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px"> 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px">
4 <el-form-item label="违规对象类型" prop="violationObjectType"> 4 <el-form-item label="违规对象类型" prop="violationObjectType">
5 - <el-select v-model="queryParams.violationObjectType" placeholder="请选择违规对象类型" size="small">  
6 - <el-option label="对象1" value="对象1" />  
7 - <el-option label="对象2" value="对象2" /> 5 + <el-select v-model="queryParams.violationObjectType" placeholder="请选择违规对象类型" clearable size="small">
  6 + <el-option label="工地" value="0" />
  7 + <el-option label="消纳场" value="1" />
  8 + <el-option label="企业" value="2" />
8 </el-select> 9 </el-select>
9 </el-form-item> 10 </el-form-item>
10 <el-form-item label="所属区域" prop="owningRegion"> 11 <el-form-item label="所属区域" prop="owningRegion">
11 - <el-select v-model="queryParams.owningRegion" placeholder="请选择违规类型" size="small">  
12 - <el-option label="区域1" value="区域1" />  
13 - <el-option label="区域2" value="区域2" />  
14 - </el-select> 12 + <el-select v-model="queryParams.owningRegion" placeholder="请选择违规类型" clearable size="small">
  13 + <el-option v-for="item in areas" :label="item.name" :value="item.name" />
  14 + </el-select>
15 </el-form-item> 15 </el-form-item>
16 <el-form-item label="违规类型" prop="violationType"> 16 <el-form-item label="违规类型" prop="violationType">
17 - <el-select v-model="queryParams.violationType" placeholder="请选择违规类型" size="small">  
18 - <el-option label="违规1" value="违规1" />  
19 - <el-option label="违规2" value="违规2" /> 17 + <el-select v-model="queryParams.violationType" placeholder="请选择违规类型" clearable size="small">
  18 + <el-option v-for="item in caseType" :label="item.name" :value="item.name" />
20 </el-select> 19 </el-select>
21 </el-form-item> 20 </el-form-item>
22 <el-form-item label="项目名称" prop="projectName"> 21 <el-form-item label="项目名称" prop="projectName">
23 - <el-select v-model="queryParams.projectName" :filterable="true" :remote-method="projectNameLoadOptions" :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;">  
24 - <el-option v-for="item in projectNameList" :key="item.name" :label="item.name" :value="item.name"></el-option>  
25 - </el-select> 22 + <el-input
  23 + v-model="queryParams.projectName"
  24 + placeholder="请输入项目名称"
  25 + clearable
  26 + size="small"
  27 + @keyup.enter.native="handleQuery"
  28 + />
26 </el-form-item> 29 </el-form-item>
27 - <el-form-item label="企业名称" prop="companyName">  
28 - <el-select v-model="queryParams.companyName" :filterable="true" :remote-method="companyLoadOptions" :loading="isLoadingCompany" placeholder="请输入项目名称" style="width: 100%;">  
29 - <el-option v-for="item in companyList" :key="item.name" :label="item.name" :value="item.name"></el-option>  
30 - </el-select> 30 + <el-form-item label="日期" prop="createTime">
  31 + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.createTime" type="date"
  32 + value-format="yyyy-MM-dd" placeholder="开始时间">
  33 + </el-date-picker>
31 </el-form-item> 34 </el-form-item>
32 <el-form-item> 35 <el-form-item>
33 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 36 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -80,7 +83,11 @@ @@ -80,7 +83,11 @@
80 <el-table v-loading="loading" :data="violationWarningInformationList" @selection-change="handleSelectionChange"> 83 <el-table v-loading="loading" :data="violationWarningInformationList" @selection-change="handleSelectionChange">
81 <el-table-column type="selection" width="55" align="center" /> 84 <el-table-column type="selection" width="55" align="center" />
82 <el-table-column label="所属区域" align="center" prop="owningRegion" /> 85 <el-table-column label="所属区域" align="center" prop="owningRegion" />
83 - <el-table-column label="违规对象类型" align="center" prop="violationObjectType" /> 86 + <el-table-column label="违规对象类型" align="center" prop="violationObjectType" >
  87 + <template slot-scope="scope">
  88 + <span>{{scope.row.violationObjectType == 0 ? "工地" :scope.row.violationObjectType == 1 ?"消纳场":"企业"}}</span>
  89 + </template>
  90 + </el-table-column>
84 <el-table-column label="违规类型" align="center" prop="violationType" /> 91 <el-table-column label="违规类型" align="center" prop="violationType" />
85 <el-table-column label="项目名称" align="center" prop="projectName" /> 92 <el-table-column label="项目名称" align="center" prop="projectName" />
86 <el-table-column label="企业名称" align="center" prop="companyName" /> 93 <el-table-column label="企业名称" align="center" prop="companyName" />
@@ -96,7 +103,7 @@ @@ -96,7 +103,7 @@
96 type="text" 103 type="text"
97 icon="el-icon-edit" 104 icon="el-icon-edit"
98 @click="handleInfo(scope.row)" 105 @click="handleInfo(scope.row)"
99 - v-hasPermi="['casefile:violationWarningInformation:edit']" 106 + v-hasPermi="['casefile:violationWarningInformation:view']"
100 >详情</el-button> 107 >详情</el-button>
101 <!-- <el-button--> 108 <!-- <el-button-->
102 <!-- size="mini"--> 109 <!-- size="mini"-->
@@ -136,8 +143,9 @@ @@ -136,8 +143,9 @@
136 <el-col :span="11"> 143 <el-col :span="11">
137 <el-form-item label="违规对象类型" prop="violationObjectType"> 144 <el-form-item label="违规对象类型" prop="violationObjectType">
138 <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;"> 145 <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;">
139 - <el-option label="对象1" value="对象1" />  
140 - <el-option label="对象2" value="对象2" /> 146 + <el-option label="工地" value="0" />
  147 + <el-option label="消纳场" value="1" />
  148 + <el-option label="企业" value="2" />
141 </el-select> 149 </el-select>
142 </el-form-item> 150 </el-form-item>
143 </el-col> 151 </el-col>
@@ -145,17 +153,15 @@ @@ -145,17 +153,15 @@
145 <el-row :gutter="2"> 153 <el-row :gutter="2">
146 <el-col :span="11"> 154 <el-col :span="11">
147 <el-form-item label="所属区域" prop="owningRegion"> 155 <el-form-item label="所属区域" prop="owningRegion">
148 - <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;">  
149 - <el-option label="区域1" value="区域1" />  
150 - <el-option label="区域2" value="区域2" /> 156 + <el-select v-model="form.place" placeholder="请输入所属区域" style="width: 100%;">
  157 + <el-option v-for="item in areas" :label="item.name" :value="item.code" @click.native="selectArea(item)"/>
151 </el-select> 158 </el-select>
152 </el-form-item> 159 </el-form-item>
153 </el-col> 160 </el-col>
154 <el-col :span="11"> 161 <el-col :span="11">
155 <el-form-item label="违规类型" prop="violationType"> 162 <el-form-item label="违规类型" prop="violationType">
156 <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;"> 163 <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;">
157 - <el-option label="违规1" value="违规1" />  
158 - <el-option label="违规2" value="违规2" /> 164 + <el-option v-for="item in caseType" :label="item.name" :value="item.name" />
159 </el-select> 165 </el-select>
160 </el-form-item> 166 </el-form-item>
161 </el-col> 167 </el-col>
@@ -257,7 +263,14 @@ @@ -257,7 +263,14 @@
257 <script> 263 <script>
258 import { listViolationWarningInformation, getViolationWarningInformation, delViolationWarningInformation, addViolationWarningInformation, updateViolationWarningInformation, exportViolationWarningInformation } from "@/api/casefile/violationWarningInformation"; 264 import { listViolationWarningInformation, getViolationWarningInformation, delViolationWarningInformation, addViolationWarningInformation, updateViolationWarningInformation, exportViolationWarningInformation } from "@/api/casefile/violationWarningInformation";
259 import violationWarningInformationInfo from "./violationWarningInformationInfo"; 265 import violationWarningInformationInfo from "./violationWarningInformationInfo";
260 - 266 +import {
  267 + earthsitesList,
  268 + constructionsitesList,
  269 + getDict,
  270 + getArea,
  271 + companyList,
  272 + truckList,
  273 +} from "@/api/dict";
261 export default { 274 export default {
262 name: "ViolationWarningInformation", 275 name: "ViolationWarningInformation",
263 components: { violationWarningInformationInfo }, 276 components: { violationWarningInformationInfo },
@@ -319,6 +332,36 @@ export default { @@ -319,6 +332,36 @@ export default {
319 { required: true, message: "必填", trigger: "blur" } 332 { required: true, message: "必填", trigger: "blur" }
320 ], 333 ],
321 }, 334 },
  335 + caseType:[{code:0,name:"进入非专用车辆"},
  336 + {code:1,name:"无许可手续(工)"},
  337 + {code:2,name:"无许可手续(消)"},
  338 + {code:3,name:"黄土覆盖情况"},
  339 + {code:4,name:"出入口路面污染"},
  340 + {code:5,name:"出入口道路硬化"},
  341 + {code:6,name:"车辆冲洗是否到位"},
  342 + {code:7,name:"雾炮机是否正常开启"},
  343 + {code:8,name:"使用费专用车运输"},
  344 + {code:9,name:"监控点位未对准"},
  345 + {code:10,name:"未报开工作业"},
  346 + {code:11,name:"视频设备离线超时报警"},
  347 + {code:12,name:"三无车辆进入工地"},
  348 + {code:13,name:"未按时间作业"},
  349 + {code:14,name:"未报开工作业"},
  350 + {code:15,name:"视频设备离线超时报警"},
  351 + {code:16,name:"三无车辆进入消纳场"},
  352 + {code:17,name:"未到指定的消纳场作业"},
  353 + {code:18,name:"离线运输报警(工)"},
  354 + {code:19,name:"离线运输报警(消)"},
  355 + {code:20,name:"未激活车辆作业"},
  356 + {code:21,name:"未核准作业车辆作业"},
  357 + {code:22,name:"未按线路行驶"},
  358 + {code:23,name:"闯禁行驶"},
  359 + {code:24,name:"失信车辆作业"},
  360 + {code:25,name:"其他1"},
  361 + {code:26,name:"其他2"},
  362 + {code:27,name:"其他3"},
  363 + {code:28,name:"其他4"},
  364 + {code:29,name:"其他5"}],
322 projectNameList:[ 365 projectNameList:[
323 {name:"项目1"}, 366 {name:"项目1"},
324 {name:"项目2"}, 367 {name:"项目2"},
@@ -331,15 +374,46 @@ export default { @@ -331,15 +374,46 @@ export default {
331 {name:"公司2"}, 374 {name:"公司2"},
332 {name:"公司3"}, 375 {name:"公司3"},
333 ], 376 ],
  377 + remoteQueryData: {
  378 + "page": 1,
  379 + "size": 9999
  380 + },
334 isLoadingCompany: false, 381 isLoadingCompany: false,
335 idInfo:null, 382 idInfo:null,
336 openInfo:false, 383 openInfo:false,
  384 + areas:[],
  385 + data:{},
337 }; 386 };
338 }, 387 },
339 created() { 388 created() {
  389 + getArea().then(res=>{
  390 +
  391 + this.areas = res.result;
  392 + });
  393 +
  394 +
  395 + constructionsitesList(this.remoteQueryData).then(res => {
  396 + this.data = res.result.list;
  397 + earthsitesList(this.remoteQueryData).then(res => {
  398 + for(var i in res.result.list){
  399 + this.data.push(res.result.list[i]);
  400 + }
  401 + });
  402 + });
  403 +
  404 +
  405 + companyList(this.remoteQueryData).then(res => {
  406 + this.companyList = res.result.list;
  407 + });
340 this.getList(); 408 this.getList();
341 }, 409 },
342 methods: { 410 methods: {
  411 + selectArea(item){
  412 +
  413 + this.form.owningRegion = item.name;
  414 + this.form.projectName = null;
  415 +
  416 + },
343 /** 查询违规预警信息列表 */ 417 /** 查询违规预警信息列表 */
344 getList() { 418 getList() {
345 this.loading = true; 419 this.loading = true;
@@ -400,7 +474,7 @@ export default { @@ -400,7 +474,7 @@ export default {
400 this.multiple = !selection.length 474 this.multiple = !selection.length
401 }, 475 },
402 handleInfo(row){ 476 handleInfo(row){
403 - this.idInfo = row.id; 477 + this.idInfo = row.id+"";
404 this.openInfo = true; 478 this.openInfo = true;
405 this.title = "平台违规案卷详情"; 479 this.title = "平台违规案卷详情";
406 }, 480 },
@@ -430,6 +504,12 @@ export default { @@ -430,6 +504,12 @@ export default {
430 submitForm() { 504 submitForm() {
431 this.$refs["form"].validate(valid => { 505 this.$refs["form"].validate(valid => {
432 if (valid) { 506 if (valid) {
  507 + if(this.form.sendObject == "运输企业" && this.form.companyName == null){
  508 +
  509 + this.$message("请选择相关企业");
  510 +
  511 + return;
  512 + }
433 let formData = new FormData(); 513 let formData = new FormData();
434 let form = this.form; 514 let form = this.form;
435 //去掉params属性 515 //去掉params属性
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationInfo.vue
@@ -9,8 +9,9 @@ @@ -9,8 +9,9 @@
9 <el-col :span="11"> 9 <el-col :span="11">
10 <el-form-item label="违规对象类型" prop="violationObjectType"> 10 <el-form-item label="违规对象类型" prop="violationObjectType">
11 <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;" :disabled="true"> 11 <el-select v-model="form.violationObjectType" placeholder="请选择违规对象类型" style="width: 100%;" :disabled="true">
12 - <el-option label="对象1" value="对象1"/>  
13 - <el-option label="对象2" value="对象2"/> 12 + <el-option label="工地" value="0" />
  13 + <el-option label="消纳场" value="1" />
  14 + <el-option label="企业" value="2" />
14 </el-select> 15 </el-select>
15 </el-form-item> 16 </el-form-item>
16 </el-col> 17 </el-col>
@@ -19,16 +20,12 @@ @@ -19,16 +20,12 @@
19 <el-col :span="11"> 20 <el-col :span="11">
20 <el-form-item label="所属区域" prop="owningRegion"> 21 <el-form-item label="所属区域" prop="owningRegion">
21 <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;" :disabled="true"> 22 <el-select v-model="form.owningRegion" placeholder="请输入所属区域" style="width: 100%;" :disabled="true">
22 - <el-option label="区域1" value="区域1"/>  
23 - <el-option label="区域2" value="区域2"/>  
24 </el-select> 23 </el-select>
25 </el-form-item> 24 </el-form-item>
26 </el-col> 25 </el-col>
27 <el-col :span="11"> 26 <el-col :span="11">
28 <el-form-item label="违规类型" prop="violationType"> 27 <el-form-item label="违规类型" prop="violationType">
29 <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;" :disabled="true"> 28 <el-select v-model="form.violationType" placeholder="请选择违规类型" style="width: 100%;" :disabled="true">
30 - <el-option label="违规1" value="违规1"/>  
31 - <el-option label="违规2" value="违规2"/>  
32 </el-select> 29 </el-select>
33 </el-form-item> 30 </el-form-item>
34 </el-col> 31 </el-col>
@@ -70,7 +67,7 @@ @@ -70,7 +67,7 @@
70 </el-form-item> 67 </el-form-item>
71 </el-col> 68 </el-col>
72 <el-col :span="11"> 69 <el-col :span="11">
73 - <el-form-item label="接收人及状态" prop="receive"> 70 + <el-form-item label="接收人" prop="receive">
74 <el-input :value="form.receive!=null?form.receive:'' + form.receiveStatus!=null?form.receiveStatus:''" 71 <el-input :value="form.receive!=null?form.receive:'' + form.receiveStatus!=null?form.receiveStatus:''"
75 :disabled="true"/> 72 :disabled="true"/>
76 </el-form-item> 73 </el-form-item>
@@ -78,7 +75,12 @@ @@ -78,7 +75,12 @@
78 </el-row> 75 </el-row>
79 <el-row :gutter="2"> 76 <el-row :gutter="2">
80 <el-col :span="11"> 77 <el-col :span="11">
81 - <el-form-item label="发送人" prop="createBy"> 78 + <el-form-item label="阅读人" prop="createBy">
  79 + <el-input :value="form.readBy" :disabled="true"/>
  80 + </el-form-item>
  81 + </el-col>
  82 + <el-col :span="11">
  83 + <el-form-item label="阅读时间" prop="createBy">
82 <el-input :value="form.readTime" :disabled="true"/> 84 <el-input :value="form.readTime" :disabled="true"/>
83 </el-form-item> 85 </el-form-item>
84 </el-col> 86 </el-col>
@@ -112,7 +114,7 @@ @@ -112,7 +114,7 @@
112 size="mini" 114 size="mini"
113 type="text" 115 type="text"
114 icon="el-icon-view" 116 icon="el-icon-view"
115 - @click="openImage(scope.row)" 117 + @click="openImage(scope.row.replyImg)"
116 v-hasPermi="['casefile:violationWarningInformation:edit']" 118 v-hasPermi="['casefile:violationWarningInformation:edit']"
117 >查看</el-button> 119 >查看</el-button>
118 </template> 120 </template>
@@ -167,9 +169,17 @@ export default { @@ -167,9 +169,17 @@ export default {
167 open:false, 169 open:false,
168 replyApprovalProcessList:[], 170 replyApprovalProcessList:[],
169 openImg:false, 171 openImg:false,
  172 + img:null,
170 } 173 }
171 }, 174 },
172 created() { 175 created() {
  176 + let id = this.idInfo.split(":");
  177 +
  178 + if(id.length == 2){
  179 + this.idInfo = id[1];
  180 + }else{
  181 + this.idInfo = id;
  182 + }
173 this.init(); 183 this.init();
174 }, 184 },
175 methods: { 185 methods: {
@@ -179,7 +189,7 @@ export default { @@ -179,7 +189,7 @@ export default {
179 let files = JSON.stringify(response.data.uploadFiles); 189 let files = JSON.stringify(response.data.uploadFiles);
180 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); 190 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
181 }); 191 });
182 - listReplyApprovalProcess({tableName:"casefile_violation_warning_information",tableId:this.idInfo}).then(response => { 192 + listReplyApprovalProcess({tableName:"workflow_casefile" + ":" + this.idInfo}).then(response => {
183 this.replyApprovalProcessList = response.rows; 193 this.replyApprovalProcessList = response.rows;
184 }); 194 });
185 }, 195 },
@@ -193,9 +203,9 @@ export default { @@ -193,9 +203,9 @@ export default {
193 a.setAttribute('href', process.env.VUE_APP_BASE_API + url); 203 a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
194 a.click() 204 a.click()
195 }, 205 },
196 - openImage(row){ 206 + openImage(base64){
197 this.openImg = true; 207 this.openImg = true;
198 - this.img = process.env.VUE_APP_BASE_API + row.replyImg; 208 + this.img = base64;
199 } 209 }
200 } 210 }
201 } 211 }
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationTable.vue 0 → 100644
  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" >
  4 + <template slot-scope="scope">
  5 + 长沙市
  6 + </template>
  7 + </el-table-column>
  8 + <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>
  10 + <el-table-column property="repCount" label="违规案卷回复数" header-align="center" align="center"></el-table-column>
  11 + <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column>
  12 + </el-table>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 +import {caseTable} from "@/api/casefile/violationWarningInformation";
  18 +export default {
  19 + name: "caseTable",
  20 + props: {
  21 + },
  22 + data() {
  23 + return {
  24 + tableData:[],
  25 + }
  26 + },
  27 + created() {
  28 + caseTable().then(res=>{
  29 +
  30 + this.tableData = res.data;
  31 +
  32 + });
  33 + },
  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}
  41 + }
  42 + }
  43 + },
  44 + getSummaries(param){
  45 + const { columns, data } = param;
  46 + const sums = [];
  47 +
  48 + let allCount = 0;
  49 + let allRepCount = 0;
  50 + for(let i in data){
  51 +
  52 + allCount += Number(data[i].count );
  53 + allRepCount += Number(data[i].repCount );
  54 +
  55 + }
  56 +
  57 + columns.forEach((column, index) => {
  58 + if (index == 0 || index == 1) {
  59 + return;
  60 + }
  61 +
  62 + if(index == 2){
  63 + sums[2] = allCount;
  64 + }
  65 +
  66 + if(index == 3){
  67 + sums[3] = allRepCount;
  68 + }
  69 +
  70 + if(index == 4){
  71 + sums[4] = ((allRepCount/allCount)*100 ).toFixed(2)+ "%";
  72 + }
  73 + })
  74 +
  75 + return sums;
  76 + },
  77 +
  78 + }
  79 +}
  80 +</script>
  81 +
  82 +<style scoped>
  83 +
  84 +</style>
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
@@ -29,7 +29,6 @@ import com.trash.common.enums.BusinessType; @@ -29,7 +29,6 @@ import com.trash.common.enums.BusinessType;
29 import com.alibaba.fastjson.JSON; 29 import com.alibaba.fastjson.JSON;
30 import com.alibaba.fastjson.JSONArray; 30 import com.alibaba.fastjson.JSONArray;
31 import com.alibaba.fastjson.JSONObject; 31 import com.alibaba.fastjson.JSONObject;
32 -import com.google.gson.Gson;  
33 import com.trash.business.domain.SupervisionThreestep; 32 import com.trash.business.domain.SupervisionThreestep;
34 import com.trash.business.domain.dayWork; 33 import com.trash.business.domain.dayWork;
35 import com.trash.business.service.ISupervisionThreestepService; 34 import com.trash.business.service.ISupervisionThreestepService;
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationWarningInformationController.java
@@ -2,10 +2,14 @@ package com.trash.casefile.controller; @@ -2,10 +2,14 @@ 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.HashMap;
5 import java.util.List; 6 import java.util.List;
6 7
7 import com.alibaba.fastjson.JSON; 8 import com.alibaba.fastjson.JSON;
  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.utils.DateUtils;
  12 +import com.trash.common.utils.SecurityUtils;
9 import com.trash.office.domain.LeaveApplication; 13 import com.trash.office.domain.LeaveApplication;
10 import com.trash.office.domain.UploadFile; 14 import com.trash.office.domain.UploadFile;
11 import com.trash.office.domain.vo.LeaveApplicationVo; 15 import com.trash.office.domain.vo.LeaveApplicationVo;
@@ -102,6 +106,79 @@ public class ViolationWarningInformationController extends BaseController @@ -102,6 +106,79 @@ public class ViolationWarningInformationController extends BaseController
102 return toAjax(violationWarningInformationService.updateViolationWarningInformation(files,violationWarningInformationVo)); 106 return toAjax(violationWarningInformationService.updateViolationWarningInformation(files,violationWarningInformationVo));
103 } 107 }
104 108
  109 +
  110 + @PutMapping(value="updateViolationCaseFileReader")
  111 + public int updateViolationCaseFileReader(@RequestBody ViolationWarningInformation violationWarningInformation) throws IOException
  112 + {
  113 + try {
  114 +
  115 + violationWarningInformation.setReadBy(SecurityUtils.getUsername());
  116 + violationWarningInformation.setReadTime(DateUtils.getNowDate());
  117 + violationWarningInformationService.updateViolationCaseFile(violationWarningInformation);
  118 + return 1;
  119 + } catch (Exception e) {
  120 + e.printStackTrace();
  121 + return 0;
  122 + }
  123 + }
  124 +
  125 +
  126 + String[] caseType = {"进入非专用车辆","无许可手续(工)","无许可手续(消)","黄土覆盖情况","出入口路面污染","出入口道路硬化","车辆冲洗是否到位",
  127 + "雾炮机是否正常开启","使用费专用车运输","监控点位未对准","未报开工作业","视频设备离线超时报警","三无车辆进入工地","未按时间作业",
  128 + "未报开工作业","视频设备离线超时报警","三无车辆进入消纳场","未到指定的消纳场作业","离线运输报警(工)","离线运输报警(消)","未激活车辆作业",
  129 + "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"};
  130 +
  131 + @GetMapping(value = "/caseTable")
  132 + public AjaxResult getTable(){
  133 + List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>();
  134 +
  135 +
  136 +
  137 + List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationList(new ViolationWarningInformation());
  138 +
  139 + for(String type:caseType){
  140 +
  141 + HashMap<String, String> map = new HashMap<>();
  142 +
  143 + map.put("type", type);
  144 +
  145 + int count = 0;
  146 + int repCount = 0;
  147 +
  148 + for(ViolationWarningInformation file:list){
  149 + if(type.equals(file.getViolationType())){
  150 + count +=1;
  151 + if(file.getReadBy() != null && !file.getReadBy().isEmpty()){
  152 + repCount += 1;
  153 + }
  154 +
  155 + }
  156 +
  157 +
  158 + }
  159 +
  160 + map.put("count", count + "");
  161 + map.put("repCount", repCount + "");
  162 +
  163 + if(count == 0){
  164 + double pct = ((double)repCount)/((double)count);
  165 + map.put("repPct","0%");
  166 + maps.add(map);
  167 + }else{
  168 + double pct = ((double)repCount)/((double)count);
  169 + map.put("repPct",(pct*100) + "%");
  170 + maps.add(map);
  171 + }
  172 +
  173 +
  174 +
  175 + }
  176 +
  177 +
  178 +
  179 + return AjaxResult.success(maps);
  180 + }
  181 +
105 /** 182 /**
106 * 删除违规预警信息 183 * 删除违规预警信息
107 */ 184 */
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationWarningInformation.java
@@ -106,69 +106,6 @@ public class ViolationWarningInformation extends BaseEntity { @@ -106,69 +106,6 @@ public class ViolationWarningInformation extends BaseEntity {
106 @Excel(name = "阅览时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") 106 @Excel(name = "阅览时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
107 private Date readTime; 107 private Date readTime;
108 108
109 - /**  
110 - * 回复1  
111 - */  
112 - private String replyOne;  
113 -  
114 - /**  
115 - * 回复2  
116 - */  
117 - private String replyTwo;  
118 -  
119 - /**  
120 - * 回复3  
121 - */  
122 - private String replyThree;  
123 -  
124 - /**  
125 - * 回复4  
126 - */  
127 - private String replyFour;  
128 -  
129 - /**  
130 - * 回复时间1  
131 - */  
132 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
133 - private Date replyTimeOne;  
134 -  
135 - /**  
136 - * 回复时间2  
137 - */  
138 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
139 - private Date replyTimeTwo;  
140 -  
141 - /**  
142 - * 回复时间3  
143 - */  
144 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
145 - private Date replyTimeThree;  
146 -  
147 - /**  
148 - * 回复时间4  
149 - */  
150 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
151 - private Date replyTimeFour;  
152 -  
153 - /**  
154 - * 回复图片1  
155 - */  
156 - private String replyImgOne;  
157 -  
158 - /**  
159 - * 回复图片1  
160 - */  
161 - private String replyImgTwo;  
162 -  
163 - /**  
164 - * 回复图片1  
165 - */  
166 - private String replyImgThree;  
167 -  
168 - /**  
169 - * 回复图片1  
170 - */  
171 - private String replyImgFour;  
172 109
173 public void setId(Long id) { 110 public void setId(Long id) {
174 this.id = id; 111 this.id = id;
@@ -290,102 +227,6 @@ public class ViolationWarningInformation extends BaseEntity { @@ -290,102 +227,6 @@ public class ViolationWarningInformation extends BaseEntity {
290 return readTime; 227 return readTime;
291 } 228 }
292 229
293 - public void setReplyOne(String replyOne) {  
294 - this.replyOne = replyOne;  
295 - }  
296 -  
297 - public String getReplyOne() {  
298 - return replyOne;  
299 - }  
300 -  
301 - public void setReplyTwo(String replyTwo) {  
302 - this.replyTwo = replyTwo;  
303 - }  
304 -  
305 - public String getReplyTwo() {  
306 - return replyTwo;  
307 - }  
308 -  
309 - public void setReplyThree(String replyThree) {  
310 - this.replyThree = replyThree;  
311 - }  
312 -  
313 - public String getReplyThree() {  
314 - return replyThree;  
315 - }  
316 -  
317 - public String getReplyFour() {  
318 - return replyFour;  
319 - }  
320 -  
321 - public void setReplyFour(String replyFour) {  
322 - this.replyFour = replyFour;  
323 - }  
324 -  
325 - public Date getReplyTimeOne() {  
326 - return replyTimeOne;  
327 - }  
328 -  
329 - public void setReplyTimeOne(Date replyTimeOne) {  
330 - this.replyTimeOne = replyTimeOne;  
331 - }  
332 -  
333 - public Date getReplyTimeTwo() {  
334 - return replyTimeTwo;  
335 - }  
336 -  
337 - public void setReplyTimeTwo(Date replyTimeTwo) {  
338 - this.replyTimeTwo = replyTimeTwo;  
339 - }  
340 -  
341 - public Date getReplyTimeThree() {  
342 - return replyTimeThree;  
343 - }  
344 -  
345 - public void setReplyTimeThree(Date replyTimeThree) {  
346 - this.replyTimeThree = replyTimeThree;  
347 - }  
348 -  
349 - public Date getReplyTimeFour() {  
350 - return replyTimeFour;  
351 - }  
352 -  
353 - public void setReplyTimeFour(Date replyTimeFour) {  
354 - this.replyTimeFour = replyTimeFour;  
355 - }  
356 -  
357 - public String getReplyImgOne() {  
358 - return replyImgOne;  
359 - }  
360 -  
361 - public void setReplyImgOne(String replyImgOne) {  
362 - this.replyImgOne = replyImgOne;  
363 - }  
364 -  
365 - public String getReplyImgTwo() {  
366 - return replyImgTwo;  
367 - }  
368 -  
369 - public void setReplyImgTwo(String replyImgTwo) {  
370 - this.replyImgTwo = replyImgTwo;  
371 - }  
372 -  
373 - public String getReplyImgThree() {  
374 - return replyImgThree;  
375 - }  
376 -  
377 - public void setReplyImgThree(String replyImgThree) {  
378 - this.replyImgThree = replyImgThree;  
379 - }  
380 -  
381 - public String getReplyImgFour() {  
382 - return replyImgFour;  
383 - }  
384 -  
385 - public void setReplyImgFour(String replyImgFour) {  
386 - this.replyImgFour = replyImgFour;  
387 - }  
388 -  
389 @Override 230 @Override
390 public String toString() { 231 public String toString() {
391 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) 232 return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -408,18 +249,6 @@ public class ViolationWarningInformation extends BaseEntity { @@ -408,18 +249,6 @@ public class ViolationWarningInformation extends BaseEntity {
408 .append("receiveStatus", getReceiveStatus()) 249 .append("receiveStatus", getReceiveStatus())
409 .append("readBy", getReadBy()) 250 .append("readBy", getReadBy())
410 .append("readTime", getReadTime()) 251 .append("readTime", getReadTime())
411 - .append("replyOne", getReplyOne())  
412 - .append("replyTwo", getReplyTwo())  
413 - .append("replyThree", getReplyThree())  
414 - .append("replyFour", getReplyFour())  
415 - .append("replyTimeOne", getReplyTimeOne())  
416 - .append("replyTimeTwo", getReplyTimeTwo())  
417 - .append("replyTimeThree", getReplyTimeThree())  
418 - .append("replyTimeFour", getReplyTimeFour())  
419 - .append("replyImgOne", getReplyImgOne())  
420 - .append("replyImgTwo", getReplyImgTwo())  
421 - .append("replyImgThree", getReplyImgThree())  
422 - .append("replyImgFour", getReplyImgFour())  
423 .toString(); 252 .toString();
424 } 253 }
425 } 254 }
trash-workFlow/src/main/java/com/trash/casefile/mapper/ViolationWarningInformationMapper.java
@@ -58,4 +58,5 @@ public interface ViolationWarningInformationMapper @@ -58,4 +58,5 @@ public interface ViolationWarningInformationMapper
58 * @return 结果 58 * @return 结果
59 */ 59 */
60 int deleteViolationWarningInformationByIds(Long[] ids); 60 int deleteViolationWarningInformationByIds(Long[] ids);
  61 +
61 } 62 }
trash-workFlow/src/main/java/com/trash/casefile/service/IViolationWarningInformationService.java
@@ -3,6 +3,7 @@ package com.trash.casefile.service; @@ -3,6 +3,7 @@ package com.trash.casefile.service;
3 import java.io.IOException; 3 import java.io.IOException;
4 import java.util.List; 4 import java.util.List;
5 5
  6 +import com.trash.casefile.domain.ViolationCaseFile;
6 import com.trash.casefile.domain.ViolationWarningInformation; 7 import com.trash.casefile.domain.ViolationWarningInformation;
7 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 8 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
8 import org.springframework.web.multipart.MultipartFile; 9 import org.springframework.web.multipart.MultipartFile;
@@ -61,4 +62,6 @@ public interface IViolationWarningInformationService { @@ -61,4 +62,6 @@ public interface IViolationWarningInformationService {
61 * @return 结果 62 * @return 结果
62 */ 63 */
63 int deleteViolationWarningInformationById(Long id); 64 int deleteViolationWarningInformationById(Long id);
  65 +
  66 + void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation);
64 } 67 }
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
@@ -4,6 +4,7 @@ import java.io.IOException; @@ -4,6 +4,7 @@ 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.trash.casefile.domain.ViolationCaseFile;
7 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 8 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
8 import com.trash.common.utils.DateUtils; 9 import com.trash.common.utils.DateUtils;
9 import com.trash.common.utils.SecurityUtils; 10 import com.trash.common.utils.SecurityUtils;
@@ -13,6 +14,7 @@ import com.trash.office.domain.UploadFile; @@ -13,6 +14,7 @@ import com.trash.office.domain.UploadFile;
13 import com.trash.office.domain.vo.LeaveApplicationVo; 14 import com.trash.office.domain.vo.LeaveApplicationVo;
14 import com.trash.office.mapper.UploadFileMapper; 15 import com.trash.office.mapper.UploadFileMapper;
15 import com.trash.workflow.domain.Workflow; 16 import com.trash.workflow.domain.Workflow;
  17 +import com.trash.workflow.service.IWorkflowService;
16 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
17 import org.springframework.stereotype.Service; 19 import org.springframework.stereotype.Service;
18 import com.trash.casefile.mapper.ViolationWarningInformationMapper; 20 import com.trash.casefile.mapper.ViolationWarningInformationMapper;
@@ -34,6 +36,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -34,6 +36,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
34 private ViolationWarningInformationMapper violationWarningInformationMapper; 36 private ViolationWarningInformationMapper violationWarningInformationMapper;
35 @Autowired 37 @Autowired
36 private UploadFileMapper uploadFileMapper; 38 private UploadFileMapper uploadFileMapper;
  39 + @Autowired
  40 + IWorkflowService WorkflowService;
37 41
38 /** 42 /**
39 * 查询违规预警信息 43 * 查询违规预警信息
@@ -75,6 +79,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -75,6 +79,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
75 @Transactional 79 @Transactional
76 public int insertViolationWarningInformation(MultipartFile[] files,ViolationWarningInformation violationWarningInformation) throws IOException { 80 public int insertViolationWarningInformation(MultipartFile[] files,ViolationWarningInformation violationWarningInformation) throws IOException {
77 violationWarningInformation.setCreateBy(SecurityUtils.getUsername()); 81 violationWarningInformation.setCreateBy(SecurityUtils.getUsername());
  82 + violationWarningInformation.setCreateTime(DateUtils.getNowDate());
78 violationWarningInformation.setStatus(0); 83 violationWarningInformation.setStatus(0);
79 Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation); 84 Integer result = violationWarningInformationMapper.insertViolationWarningInformation(violationWarningInformation);
80 //文件上传 85 //文件上传
@@ -86,6 +91,21 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -86,6 +91,21 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
86 uploadFile.setFilePath(FileUploadUtils.uploadFile(file)); 91 uploadFile.setFilePath(FileUploadUtils.uploadFile(file));
87 uploadFileMapper.insertUploadFile(uploadFile); 92 uploadFileMapper.insertUploadFile(uploadFile);
88 } 93 }
  94 + int i = 0;
  95 +
  96 + if(violationWarningInformation.getSendObject().equals("区管理部门(消)")){
  97 + i = 3;
  98 + }else if(violationWarningInformation.getSendObject().equals("区管理部门(治)")){
  99 +
  100 + if(violationWarningInformation.getViolationGrade().equals("一般类")){
  101 + i = 1;
  102 + }else{
  103 + i = 2;
  104 + }
  105 + }
  106 +
  107 +
  108 + WorkflowService.createCaseFile1(violationWarningInformation,i);
89 return result; 109 return result;
90 } 110 }
91 111
@@ -173,4 +193,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -173,4 +193,8 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
173 { 193 {
174 return violationWarningInformationMapper.deleteViolationWarningInformationById(id); 194 return violationWarningInformationMapper.deleteViolationWarningInformationById(id);
175 } 195 }
  196 +
  197 + public void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation){
  198 + violationWarningInformationMapper.updateViolationWarningInformation(violationWarningInformation);
  199 + }
176 } 200 }
trash-workFlow/src/main/java/com/trash/workflow/listener/casefile1Listener.java 0 → 100644
  1 +package com.trash.workflow.listener;
  2 +
  3 +import com.trash.activiti.service.IActTaskService;
  4 +import com.trash.casefile.domain.ViolationCaseFile;
  5 +import com.trash.casefile.domain.ViolationWarningInformation;
  6 +import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
  7 +import com.trash.casefile.service.IViolationCaseFileService;
  8 +import com.trash.casefile.service.IViolationWarningInformationService;
  9 +import com.trash.common.utils.spring.SpringUtils;
  10 +import org.activiti.engine.delegate.DelegateExecution;
  11 +import org.activiti.engine.delegate.ExecutionListener;
  12 +import org.activiti.engine.delegate.Expression;
  13 +
  14 +
  15 +public class casefile1Listener implements ExecutionListener {
  16 +
  17 + private Expression state;
  18 +
  19 + @Override
  20 + public void notify(DelegateExecution delegateExecution) {
  21 +
  22 + ViolationWarningInformation caseOffline = new ViolationWarningInformation();
  23 +
  24 + caseOffline.setId(Long.parseLong(delegateExecution.getProcessInstanceBusinessKey().split(":")[1]));
  25 +
  26 + caseOffline.setStatus(Integer.parseInt(state.getValue(delegateExecution).toString()));
  27 +
  28 + SpringUtils.getBean(IViolationWarningInformationService.class).updateViolationCaseFile(caseOffline);
  29 +
  30 + workflowUtils.sendDataToHisTory(delegateExecution, state);
  31 +
  32 + if("2".equals(state.getValue(delegateExecution))){
  33 + SpringUtils.getBean(IActTaskService.class).deleteProcessById(delegateExecution.getProcessInstanceId());
  34 + }
  35 +
  36 + }
  37 +}
trash-workFlow/src/main/java/com/trash/workflow/service/IWorkflowService.java
@@ -3,6 +3,7 @@ package com.trash.workflow.service; @@ -3,6 +3,7 @@ package com.trash.workflow.service;
3 import java.util.List; 3 import java.util.List;
4 import java.util.Map; 4 import java.util.Map;
5 5
  6 +import com.trash.casefile.domain.ViolationWarningInformation;
6 import org.activiti.api.process.model.ProcessInstance; 7 import org.activiti.api.process.model.ProcessInstance;
7 8
8 import com.trash.activiti.domain.dto.HistoryDataDTO; 9 import com.trash.activiti.domain.dto.HistoryDataDTO;
@@ -92,4 +93,6 @@ public interface IWorkflowService @@ -92,4 +93,6 @@ public interface IWorkflowService
92 93
93 94
94 int createCaseFile(ViolationCaseFile violationCaseFile,int index); 95 int createCaseFile(ViolationCaseFile violationCaseFile,int index);
  96 +
  97 + int createCaseFile1(ViolationWarningInformation violationCaseFile, int index);
95 } 98 }
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
@@ -5,6 +5,7 @@ import java.util.List; @@ -5,6 +5,7 @@ import java.util.List;
5 import java.util.Map; 5 import java.util.Map;
6 import java.util.stream.Collectors; 6 import java.util.stream.Collectors;
7 7
  8 +import com.trash.casefile.domain.ViolationWarningInformation;
8 import org.activiti.api.process.model.ProcessInstance; 9 import org.activiti.api.process.model.ProcessInstance;
9 import org.activiti.api.process.model.builders.ProcessPayloadBuilder; 10 import org.activiti.api.process.model.builders.ProcessPayloadBuilder;
10 import org.activiti.api.process.runtime.ProcessRuntime; 11 import org.activiti.api.process.runtime.ProcessRuntime;
@@ -249,6 +250,53 @@ public class WorkflowServiceImpl implements IWorkflowService { @@ -249,6 +250,53 @@ public class WorkflowServiceImpl implements IWorkflowService {
249 return 0; 250 return 0;
250 251
251 } 252 }
  253 +
  254 + @Override
  255 + @Transactional
  256 + public int createCaseFile1(ViolationWarningInformation caseFile, int index){ //违规预警案卷
  257 + ProcessInstance processInstance = null;
  258 + String title = "案卷号:" + caseFile.getNumber();
  259 + String flowType = "violation_warning";
  260 + try {
  261 +
  262 + processInstance = processRuntime.start(ProcessPayloadBuilder
  263 + .start()
  264 + .withProcessDefinitionKey(flowType)
  265 + .withName(title)
  266 + .withBusinessKey(flowType + ":" + caseFile.getId())
  267 + .withVariable("route", index)
  268 + .build());
  269 +
  270 +
  271 + if(index == 0){
  272 + Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
  273 +
  274 + task.setAssignee(caseFile.getCompanyName());
  275 +
  276 + taskService.saveTask(task);
  277 + }else{
  278 + updateProcess(processInstance,caseFile.getOwningRegion());
  279 + }
  280 +
  281 +
  282 +
  283 + Workflow workflow = new Workflow();
  284 + workflow.setId(flowType + ":" + caseFile.getId());
  285 + workflow.setTitle(title);
  286 + workflow.setReason("违规预警信息");
  287 + workflow.setStartTime(sdf.format(caseFile.getCreateTime()));
  288 + workflow.setEndTime(sdf.format(caseFile.getCreateTime()));
  289 + workflow.setType("违规预警信息案卷");
  290 + workflow.setInstanceId(processInstance.getId());
  291 + workflow.setState("0");
  292 +
  293 + return workflowMapper.insertWorkflow(workflow);
  294 + } catch (Exception e) {
  295 + processRuntime.delete(ProcessPayloadBuilder.delete(processInstance));
  296 + throw new RuntimeException(e);
  297 + }
  298 +
  299 + }
252 300
253 301
254 @Override 302 @Override