From 6564da0af15f35ff273a86f10f864a5a094527f9 Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Mon, 6 Dec 2021 17:57:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=A2=84=E8=AD=A6=E3=80=81=E8=B6=85=E6=97=B6?= =?UTF-8?q?=20=E6=96=B0=E5=8A=A0=E5=AD=97=E6=AE=B5=20=E9=83=A8=E9=97=A8ID?= =?UTF-8?q?=202.=E4=BA=8B=E4=BB=B6=E5=8F=97=E7=90=86=20=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenlion/pojo/vos/report/ReportVO.java | 2 - .../report/impl/ReportServiceImpl.java | 3 +- .../timeout/impl/TimeoutServiceImpl.java | 21 +- .../warning/impl/WarningServiceImpl.java | 21 + .../rulewarning/rule-warning-mapper.xml | 12 +- .../mybatis/mapper/timeout/timeout-mapper.xml | 2 + .../mybatis/mapper/warning/warning-mapper.xml | 2 + .../resources/static/route/report/update.html | 717 ++++++++++++++++++ .../route/taskbase/accept/list-accept.html | 15 + .../taskbase/allocate/save-allocate.html | 56 +- 10 files changed, 833 insertions(+), 18 deletions(-) create mode 100644 src/main/resources/static/route/report/update.html diff --git a/src/main/java/cn/com/tenlion/pojo/vos/report/ReportVO.java b/src/main/java/cn/com/tenlion/pojo/vos/report/ReportVO.java index f8d7878..dd45bc1 100644 --- a/src/main/java/cn/com/tenlion/pojo/vos/report/ReportVO.java +++ b/src/main/java/cn/com/tenlion/pojo/vos/report/ReportVO.java @@ -32,10 +32,8 @@ public class ReportVO { @CheckEmptyAnnotation(name = "事发位置纬度") private String reportLat; @ApiModelProperty(name = "bGId", value = "网格编码(必填)",required=true) - @CheckEmptyAnnotation(name = "所在网格") private String bGId; @ApiModelProperty(name = "bGName", value = "网格名称(必填)",required=true) - @CheckEmptyAnnotation(name = "所在网格") private String bGName; @ApiModelProperty(name = "caseTypeCode", value = "事件大分类编码(必填)",required=true) diff --git a/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java b/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java index b466f63..9edf6b1 100644 --- a/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java @@ -264,7 +264,6 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ if(checkCount > 0){ throw new SaveException("编码异常,请重新上报"); } - return reportCode; } @@ -298,7 +297,7 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ private List> setAcceptedUser(String areaCode){ List> list = remoteBaseService.getAreaCaseAdmin(areaCode); if(list.size() == 0){ - throw new SearchException("为获取到事件受理人员"); + throw new SearchException("未获取到事件受理人员"); } //自动找上级管理员逻辑 暂时取消 /*if(list.size() == 0){ diff --git a/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java b/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java index 16d4403..93db604 100644 --- a/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java @@ -3,7 +3,11 @@ package cn.com.tenlion.service.timeout.impl; import cn.com.tenlion.pojo.vos.taskmsg.SocketVO; import cn.com.tenlion.service.remotebase.IRemoteBaseService; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.interfaces.department.IDepartmentUserBaseService; +import ink.wgink.interfaces.user.IUserBaseService; import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.department.DepartmentUserDTO; +import ink.wgink.pojo.dtos.user.UserDTO; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.date.DateUtil; @@ -40,7 +44,8 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe private ProcessEngine processEngine; @Autowired private IRemoteBaseService remoteBaseService; - + @Autowired + private IDepartmentUserBaseService departmentUserBaseService; @@ -56,6 +61,7 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe String timeoutId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(timeoutVO); params.put("timeoutId", timeoutId); + params.put("taskDeptId", this.setUserDeptId(timeoutVO.getTaskUserId())); params.put("status", "0"); params.put("creator", "0"); params.put("gmtCreate", DateUtil.getTime()); @@ -75,6 +81,19 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe } + public String setUserDeptId(String userId){ + List list = Arrays.asList(userId.split(",")); + if(list.size() <= 0){ + return ""; + } + List departmentUserDTOS = departmentUserBaseService.listByUserIds(list); + if(departmentUserDTOS.size() <= 0){ + return ""; + } + return departmentUserDTOS.get(0).getDepartmentId(); + + } + public void updateByTaskId(String taskId){ Map poParams = new HashMap<>(); diff --git a/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java b/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java index f4ed35d..1bc201d 100644 --- a/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java @@ -8,7 +8,11 @@ import cn.com.tenlion.service.remotebase.IRemoteBaseService; import cn.com.tenlion.util.UserUtil; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SearchException; +import ink.wgink.interfaces.department.IDepartmentUserBaseService; +import ink.wgink.interfaces.user.IUserBaseService; import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.department.DepartmentUserDTO; +import ink.wgink.pojo.dtos.user.UserDTO; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.date.DateUtil; @@ -47,6 +51,8 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe private ProcessEngine processEngine; @Autowired private UserUtil userUtil; + @Autowired + private IDepartmentUserBaseService departmentUserBaseService; public void saveSystem(WarningVO warningVO){ @@ -71,6 +77,7 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe if(WarningLevelEnum.YELLOW.getValue().equals(level)){ String warningId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(warningVO); + params.put("taskDeptId",this.getUserDeptId(warningVO.getTaskUserId())); params.put("warningId", warningId); params.put("warningStatus","0"); params.put("warningType","system"); @@ -111,6 +118,20 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe } + + public String getUserDeptId(String userId){ + List list = Arrays.asList(userId.split(",")); + if(list.size() <= 0){ + return ""; + } + List departmentUserDTOS = departmentUserBaseService.listByUserIds(list); + if(departmentUserDTOS.size() <= 0){ + return ""; + } + return departmentUserDTOS.get(0).getDepartmentId(); + } + + public void updateByTaskId(String taksId){ Map countParams = new HashMap<>(); countParams.put("taskId",taksId); diff --git a/src/main/resources/mybatis/mapper/rulewarning/rule-warning-mapper.xml b/src/main/resources/mybatis/mapper/rulewarning/rule-warning-mapper.xml index 40248e3..3910b28 100644 --- a/src/main/resources/mybatis/mapper/rulewarning/rule-warning-mapper.xml +++ b/src/main/resources/mybatis/mapper/rulewarning/rule-warning-mapper.xml @@ -327,12 +327,12 @@ + + + + +
+
+
+ +
+ + +
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+ + + + + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/taskbase/accept/list-accept.html b/src/main/resources/static/route/taskbase/accept/list-accept.html index b547ee8..ac73ddb 100644 --- a/src/main/resources/static/route/taskbase/accept/list-accept.html +++ b/src/main/resources/static/route/taskbase/accept/list-accept.html @@ -160,6 +160,7 @@ var level = row['taskLevel']; var rowData = '
'; rowData += ''; + rowData += ''; rowData += ''; rowData += ''; if(level > 1){ @@ -242,6 +243,20 @@ reloadTable(); } }); + }else if(layEvent === 'updateReportEvent'){ + layer.open({ + type: 2, + title: '修改事件', + closeBtn: 1, + area: ['90%', '90%'], + shadeClose: true, + anim: 2, + maxmin:true, + content: top.restAjax.path('route/report/update.html?reportId={reportId}', [data.reportId]), + end: function() { + reloadTable(); + } + }); }else if(layEvent === 'logEvent'){ layer.open({ type: 2, diff --git a/src/main/resources/static/route/taskbase/allocate/save-allocate.html b/src/main/resources/static/route/taskbase/allocate/save-allocate.html index 8c2e5f8..f10c8a9 100644 --- a/src/main/resources/static/route/taskbase/allocate/save-allocate.html +++ b/src/main/resources/static/route/taskbase/allocate/save-allocate.html @@ -162,11 +162,11 @@ var specialDeptId = $('#specialDeptId').val(); var specialDeptName = $('#specialDeptName').val(); - if(specialDeptId == ''){ - var selectedNodes = []; + if(specialDeptId != ''){ + var selectedNodes = {}; selectedNodes.id = specialDeptId; selectedNodes.name = specialDeptName; - top.dialog.dialogTreeData.selectedNodes = selectedNodes; + top.dialog.dialogTreeData.selectedNodes.push(selectedNodes); } top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), @@ -175,6 +175,7 @@ height: '500px', onClose: function() { var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes; + top.dialog.dialogTreeData.selectedNodes = []; if(selectedTypeRBArray.length > 0) { if(selectedTypeRBArray.length > 1){ top.dialog.msg('专办单位人员只能选择一名,请重新选择') @@ -182,12 +183,24 @@ } $('#specialDeptId').val(selectedTypeRBArray[0].id); $('#specialDeptName').val(selectedTypeRBArray[0].name); + }else{ + $('#specialDeptId').val(''); + $('#specialDeptName').val(''); } - top.dialog.dialogTreeData.selectedNodes = []; } }) } function selectMasterUser(){ + var masterDeptId = $('#masterDeptId').val(); + var masterDeptName = $('#masterDeptName').val(); + + if(masterDeptId != ''){ + var selectedNodes = {}; + selectedNodes.id = masterDeptId; + selectedNodes.name = masterDeptName; + top.dialog.dialogTreeData.selectedNodes.push(selectedNodes); + } + top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择主办单位', @@ -195,6 +208,7 @@ height: '500px', onClose: function() { var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes; + top.dialog.dialogTreeData.selectedNodes = []; if(selectedTypeRBArray.length > 0) { if(selectedTypeRBArray.length > 1){ top.dialog.msg('主办单位人员只能选择一名,请重新选择') @@ -202,12 +216,25 @@ } $('#masterDeptId').val(selectedTypeRBArray[0].id); $('#masterDeptName').val(selectedTypeRBArray[0].name); + }else{ + $('#masterDeptId').val(''); + $('#masterDeptName').val(''); } } }) } function selectAssistUser(){ + var assistDeptId = $('#assistDeptId').val(); + var assistDeptName = $('#assistDeptName').val(); + + if(assistDeptId != ''){ + var selectedNodes = {}; + selectedNodes.id = assistDeptId; + selectedNodes.name = assistDeptName; + top.dialog.dialogTreeData.selectedNodes.push(selectedNodes); + } + top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择协办单位', @@ -215,6 +242,7 @@ height: '500px', onClose: function() { var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes; + top.dialog.dialogTreeData.selectedNodes = []; if(selectedTypeRBArray.length > 0) { if(selectedTypeRBArray.length > 1){ top.dialog.msg('协办单位人员只能选择一名,请重新选择') @@ -222,12 +250,27 @@ } $('#assistDeptId').val(selectedTypeRBArray[0].id); $('#assistDeptName').val(selectedTypeRBArray[0].name); + }else{ + $('#assistDeptId').val(''); + $('#assistDeptName').val('') } } }) } function selectDeptsUser(){ - top.dialog.dialogData.selectedUserIds = $('#specialUserId').val(); + let deptsDeptId = $('#deptsDeptId').val(); + let deptsDeptName = $('#deptsDeptName').val(); + + if(deptsDeptId != ''){ + let deptsDeptIdArr = deptsDeptId.split(','); + let deptsDeptNameArr = deptsDeptName.split(','); + for(let i = 0; i < deptsDeptIdArr.length; i++){ + let selectedNodes = {}; + selectedNodes.id = deptsDeptIdArr[i]; + selectedNodes.name = deptsDeptNameArr[i]; + top.dialog.dialogTreeData.selectedNodes.push(selectedNodes); + } + } top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择责任单位', @@ -235,6 +278,7 @@ height: '500px', onClose: function() { var selectedTypeRBArray = top.dialog.dialogTreeData.selectedNodes; + top.dialog.dialogTreeData.selectedNodes = [] var deptIds = ''; var deptNames = ''; if(selectedTypeRBArray.length > 0) { @@ -245,9 +289,7 @@ }else{ deptIds += item.id + ','; deptNames += item.name + ','; - } - } } $('#deptsDeptId').val(deptIds);