+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.RoleEventsTagDTO;
+import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
+import com.elink.esua.epdc.service.RoleEventsTagService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 角色和事件标签关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-20
+ */
+@RestController
+@RequestMapping("roleeventstag")
+public class RoleEventsTagController {
+
+ @Autowired
+ private RoleEventsTagService roleEventsTagService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = roleEventsTagService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ RoleEventsTagDTO data = roleEventsTagService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody RoleEventsTagDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ roleEventsTagService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody RoleEventsTagDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ roleEventsTagService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ roleEventsTagService.delete(ids);
+ return new Result();
+ }
+
+ /**
+ * 获取事件标签关联的工作端用户
+ *
+ * @param formDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2021/7/21 13:47
+ */
+ @GetMapping("eventtagworkuser")
+ public Result> eventTagWorkUser(@RequestBody WorkUserEventTagRelationFormDTO formDto) {
+ List data = roleEventsTagService.eventTagWorkUser(formDto);
+ return new Result>().ok(data);
+ }
+
+}
diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java
index 6aceee10..9bf2e6f8 100644
--- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java
@@ -17,10 +17,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.SysRoleDTO;
import com.elink.esua.epdc.enums.AppMenuCategoryEnum;
-import com.elink.esua.epdc.service.AppRoleMenuService;
-import com.elink.esua.epdc.service.SysRoleDataScopeService;
-import com.elink.esua.epdc.service.SysRoleMenuService;
-import com.elink.esua.epdc.service.SysRoleService;
+import com.elink.esua.epdc.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -44,6 +41,8 @@ public class SysRoleV2Controller {
private SysRoleDataScopeService sysRoleDataScopeService;
@Autowired
private AppRoleMenuService appRoleMenuService;
+ @Autowired
+ private RoleEventsTagService roleEventsTagService;
@GetMapping("{id}")
public Result get(@PathVariable("id") Long id) {
@@ -61,6 +60,8 @@ public class SysRoleV2Controller {
data.setCategoryIdList(sysRoleService.getCategoryIdList(id));
//查询角色对应的吹哨部门
data.setWhistleDeptIdList(sysRoleService.getWhistleDeptIdList(id));
+ // 查询角色对应的事件标签
+ data.setEventsTagsIdList(roleEventsTagService.getEventTagIdList(id));
return new Result().ok(data);
}
diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/RoleEventsTagDao.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/RoleEventsTagDao.java
new file mode 100644
index 00000000..f2b6a00e
--- /dev/null
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/RoleEventsTagDao.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.epdc.form.WorkUserEventTagRelationFormDTO;
+import com.elink.esua.epdc.dto.epdc.result.WorkUserEventTagRelationResultDTO;
+import com.elink.esua.epdc.entity.RoleEventsTagEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 角色和事件标签关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-20
+ */
+@Mapper
+public interface RoleEventsTagDao extends BaseDao {
+
+ /**
+ * 删除角色对应的事件标签关系
+ *
+ * @param roleId
+ * @return void
+ * @author liuchuang
+ * @since 2021/7/20 14:58
+ */
+ void updateDelFlag(Long roleId);
+
+ /**
+ * 根据角色获取事件标签
+ *
+ * @param roleId
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2021/7/20 15:02
+ */
+ List selectListEventTagIdByRoleId(Long roleId);
+
+ /**
+ * 获取事件标签关联的工作端用户
+ *
+ * @param formDto
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2021/7/21 13:49
+ */
+ List eventTagWorkUser(WorkUserEventTagRelationFormDTO formDto);
+}
diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/RoleEventsTagEntity.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/RoleEventsTagEntity.java
new file mode 100644
index 00000000..a1dc312f
--- /dev/null
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/RoleEventsTagEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 角色和事件标签关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-20
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_role_events_tag")
+public class RoleEventsTagEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 角色ID
+ */
+ private Long roleId;
+
+ /**
+ * 事件标签ID
+ */
+ private String eventTagId;
+
+}
diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java
index 335098d2..14e21049 100644
--- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysUserEntity.java
@@ -109,4 +109,9 @@ public class SysUserEntity extends BaseEntity {
*/
private String scrip;
+ /**
+ * 职务
+ */
+ private String position;
+
}
diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/RoleEventsTagService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/RoleEventsTagService.java
new file mode 100644
index 00000000..3b2502e9
--- /dev/null
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/RoleEventsTagService.java
@@ -0,0 +1,129 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 事件工作人员关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-21
+ */
+@Data
+public class WorkUserEventsDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 工作人员ID
+ */
+ private Long workUserId;
+
+ /**
+ * 事件ID
+ */
+ private String eventId;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ /**
+ * 删除标识 0:未删除,1:已删除
+ */
+ private String delFlag;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
index f4379e4f..8cc5a106 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/events/form/EpdcEventSubmitFormDTO.java
@@ -173,4 +173,9 @@ public class EpdcEventSubmitFormDTO implements Serializable {
* 事件标签
*/
private List tagIds;
+
+ /**
+ * 工作人员ID
+ */
+ private List workUserIds;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java
index f3854867..45b44954 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/IssuePendingResponseFormDTO.java
@@ -41,4 +41,9 @@ public class IssuePendingResponseFormDTO implements Serializable {
*/
private String timestamp;
+ /**
+ * 工作人员ID
+ */
+ private Long workUserId;
+
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java
index 58d69343..9cb3eb49 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/form/WorkIssueListFormDTO.java
@@ -47,6 +47,9 @@ public class WorkIssueListFormDTO implements Serializable {
*/
private Integer issueState;
-
+ /**
+ * 工作人员ID
+ */
+ private Long workUserId;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
index 9991727e..9d92dfd3 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
@@ -57,7 +57,6 @@ public class EpdcEventsController {
private EpdcEventsService epdcEventsService;
@GetMapping("page")
- @DataFilter(tableAlias = "temp", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result> page(@RequestParam Map params){
PageData page = epdcEventsService.listOfPendingReviewEvents(params);
@@ -155,7 +154,6 @@ public class EpdcEventsController {
* @Date: 2019/9/6 15:11
*/
@GetMapping("rejectEvents")
- @DataFilter(tableAlias = "temp", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result> rejectEvents(@RequestParam Map params){
PageData page = epdcEventsService.listOfRejectEvents(params);
return new Result>().ok(page);
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java
index ebd1ca27..af0ab873 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EventTagController.java
@@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.events.EventTagDTO;
+import com.elink.esua.epdc.dto.events.result.EventTagsResultDTO;
import com.elink.esua.epdc.modules.events.excel.EventTagExcel;
import com.elink.esua.epdc.modules.events.service.EventTagService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,7 +46,7 @@ import java.util.Map;
@RestController
@RequestMapping("eventtag")
public class EventTagController {
-
+
@Autowired
private EventTagService eventTagService;
@@ -91,4 +92,17 @@ public class EventTagController {
ExcelUtils.exportExcelToTarget(response, null, list, EventTagExcel.class);
}
-}
\ No newline at end of file
+ /**
+ * 事件标签列表
+ *
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author liuchuang
+ * @since 2021/7/20 14:23
+ */
+ @GetMapping("eventstags")
+ public Result> eventsTags() {
+ List data = eventTagService.listOfEventTags();
+ return new Result>().ok(data);
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/WorkUserEventsController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/WorkUserEventsController.java
new file mode 100644
index 00000000..2975aed2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/WorkUserEventsController.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.events.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.WorkUserEventsDTO;
+import com.elink.esua.epdc.modules.events.service.WorkUserEventsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 事件工作人员关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-21
+ */
+@RestController
+@RequestMapping("workusereventstag")
+public class WorkUserEventsController {
+
+ @Autowired
+ private WorkUserEventsService workUserEventsService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = workUserEventsService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ WorkUserEventsDTO data = workUserEventsService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody WorkUserEventsDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ workUserEventsService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody WorkUserEventsDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ workUserEventsService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ workUserEventsService.delete(ids);
+ return new Result();
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/WorkUserEventsDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/WorkUserEventsDao.java
new file mode 100644
index 00000000..2d27a671
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/dao/WorkUserEventsDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.events.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.events.entity.WorkUserEventsEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 事件工作人员关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-21
+ */
+@Mapper
+public interface WorkUserEventsDao extends BaseDao {
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/WorkUserEventsEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/WorkUserEventsEntity.java
new file mode 100644
index 00000000..98857c5a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/entity/WorkUserEventsEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.events.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 事件工作人员关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-21
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_work_user_events")
+public class WorkUserEventsEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 工作人员ID
+ */
+ private Long workUserId;
+
+ /**
+ * 事件ID
+ */
+ private String eventId;
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/WorkUserEventsService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/WorkUserEventsService.java
new file mode 100644
index 00000000..6ed89fdf
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/WorkUserEventsService.java
@@ -0,0 +1,107 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.modules.events.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.WorkUserEventsDTO;
+import com.elink.esua.epdc.modules.events.dao.WorkUserEventsDao;
+import com.elink.esua.epdc.modules.events.entity.WorkUserEventsEntity;
+import com.elink.esua.epdc.modules.events.service.WorkUserEventsService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 事件工作人员关系表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-07-21
+ */
+@Service
+public class WorkUserEventsServiceImpl extends BaseServiceImpl implements WorkUserEventsService {
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, WorkUserEventsDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, WorkUserEventsDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public WorkUserEventsDTO get(String id) {
+ WorkUserEventsEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, WorkUserEventsDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(WorkUserEventsDTO dto) {
+ WorkUserEventsEntity entity = ConvertUtils.sourceToTarget(dto, WorkUserEventsEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(WorkUserEventsDTO dto) {
+ WorkUserEventsEntity entity = ConvertUtils.sourceToTarget(dto, WorkUserEventsEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Result saveWorkUserRelationEventInfo(String eventId, List workUserIds) {
+ if (StringUtils.isNotEmpty(eventId) && CollectionUtil.isNotEmpty(workUserIds)) {
+ for (Long workUserId:
+ workUserIds) {
+ WorkUserEventsEntity entity = new WorkUserEventsEntity();
+ entity.setWorkUserId(workUserId);
+ entity.setEventId(eventId);
+ insert(entity);
+ }
+ }
+
+ return new Result();
+ }
+
+}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java
index 550c173c..81499574 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/IssueController.java
@@ -66,7 +66,6 @@ public class IssueController {
* @Date: 2019/9/5 16:49
*/
@GetMapping("page")
- @DataFilter(tableAlias = "issue", deptId = "grid_id", prefix = "AND", isPendingCreator = false)
public Result> waitHandlePage(@RequestParam Map params){
PageData page = issueService.listOfIssues(params);
return new Result>().ok(page);
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
index 767f3c7c..eedd2537 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
@@ -121,6 +121,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp
@Override
public PageData listOfIssues(Map params) {
+ UserDetail user = SecurityUser.getUser();
+ if (null == user) {
+ throw new RenException("当前登录状态已失效,请重新登录");
+ }
+ List deptIdList = user.getDeptIdList();
+ deptIdList.add(user.getDeptId());
+ params.put("deptIdList", deptIdList);
+ params.put("workUserId", user.getId());
+
IPage page = getPage(params);
if (null != params.get("issueCode")) {
params.put("issueCode", params.get("issueCode").toString().trim());
@@ -484,6 +493,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
public Result> listIssuePendingResponse(IssuePendingResponseFormDTO formDto) {
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize();
formDto.setPageIndex(pageIndex);
+ formDto.setWorkUserId(SecurityUser.getUserId());
return epdcEventsService.listIssuePendingResponse(formDto);
}
@@ -504,6 +514,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp
list = SecurityUser.getUser().getDeptIdList();
}
formDto.setDeptIdList(list);
+ formDto.setWorkUserId(SecurityUser.getUserId());
List data = baseDao.selectWorkIssueListOfNewOrHot(formDto);
// 查询最热评论
for (WorkIssueListResultDTO dto : data) {
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
index ac1e336a..1d845155 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
@@ -68,8 +68,15 @@
temp.CREATED_TIME AS createdTime
FROM
epdc_events temp
+ LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = temp.ID AND u.DEL_FLAG = '0'
WHERE
temp.DEL_FLAG = '0'
+ AND (temp.GRID_ID IN
+
+ #{id}
+
+ OR u.WORK_USER_ID = #{workUserId}
+ )
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@@ -97,8 +104,15 @@
temp.EVENT_CONTENT AS eventContent
FROM
epdc_events temp
+ LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = temp.ID AND u.DEL_FLAG = '0'
WHERE
temp.DEL_FLAG = '0'
+ AND (temp.GRID_ID IN
+
+ #{id}
+
+ OR u.WORK_USER_ID = #{workUserId}
+ )
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@@ -315,18 +329,21 @@
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/WorkUserEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/WorkUserEventsDao.xml
new file mode 100644
index 00000000..d31b0530
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/WorkUserEventsDao.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
index 711febdb..125bff9f 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
@@ -17,10 +17,17 @@
issue.ISSUE_CODE
FROM
epdc_issue issue
+ LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = issue.EVENT_ID AND u.DEL_FLAG = '0'
LEFT JOIN epdc_events e ON issue.EVENT_ID = e.ID
AND e.DEL_FLAG = '0'
WHERE
issue.DEL_FLAG = '0'
+ AND (issue.GRID_ID IN
+
+ #{id}
+
+ OR u.WORK_USER_ID = #{workUserId}
+ )
and issue.ISSUE_STATE = #{state}
AND DATE_FORMAT( issue.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@@ -539,15 +546,18 @@
t1.id
FROM
epdc_issue t1
+ LEFT JOIN epdc_work_user_events u ON u.EVENT_ID = t1.EVENT_ID AND u.DEL_FLAG = '0'
LEFT JOIN epdc_events t2
ON t1.EVENT_ID = t2.ID
AND t2.DEL_FLAG = '0'
WHERE t1.DEL_FLAG = '0'
AND t1.ISSUE_STATE = #{issueState}
- AND t1.GRID_ID IN
-
- #{id}
-
+ AND (t1.GRID_ID IN
+
+ #{id}
+
+ OR u.WORK_USER_ID = #{workUserId}
+ )
#{timestamp}
ORDER BY
( t2.APPROVE_NUM + t2.OPPOSE_NUM + t2.COMMENT_NUM + t2.BROWSE_NUM ) DESC,
diff --git a/renren-cloud-generator/src/main/resources/application.yml b/renren-cloud-generator/src/main/resources/application.yml
index bc9edc65..fac37ad4 100644
--- a/renren-cloud-generator/src/main/resources/application.yml
+++ b/renren-cloud-generator/src/main/resources/application.yml
@@ -9,7 +9,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置
driverClassName: com.mysql.jdbc.Driver
- url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_custom?useUnicode=true&characterEncoding=UTF-8&useSSL=false
+ url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_events?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: jinshui_epdc_test
password: jinshui@833066
#oracle配置
@@ -46,4 +46,4 @@ pagehelper:
#指定数据库,可选值有【mysql、oracle、sqlserver、postgresql】
renren:
- database: mysql
\ No newline at end of file
+ database: mysql