Commit 1dfc0b515f2d63755a197306661d1ff35aad5ea3

Authored by 戈灵虎
1 parent 5e6fbbab

feat(eventinfo): 添加事件完成人字段和自动记录功能

urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/eventinfo/vo/EventInfoRespVO.java
... ... @@ -81,6 +81,8 @@ public class EventInfoRespVO {
81 81 @ExcelProperty("创建人")
82 82 private String creator;
83 83  
  84 + private String ender;
  85 +
84 86  
85 87  
86 88 }
87 89 \ No newline at end of file
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/eventinfo/EventInfoDO.java
... ... @@ -92,5 +92,7 @@ public class EventInfoDO extends BaseDO {
92 92 */
93 93 private String remark;
94 94  
  95 + private String ender;
  96 +
95 97  
96 98 }
97 99 \ No newline at end of file
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/eventinfo/EventInfoMapper.java
... ... @@ -3,11 +3,14 @@ package com.zteits.urbanops.module.workorder.dal.mysql.eventinfo;
3 3 import com.zteits.urbanops.framework.common.pojo.PageResult;
4 4 import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX;
5 5 import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX;
  6 +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils;
6 7 import com.zteits.urbanops.module.workorder.controller.admin.eventinfo.vo.EventInfoPageReqVO;
7 8 import com.zteits.urbanops.module.workorder.dal.dataobject.eventinfo.EventInfoDO;
8 9 import com.zteits.urbanops.module.workorder.enums.EventStatusEnum;
9 10 import org.apache.ibatis.annotations.Mapper;
10 11  
  12 +import java.time.LocalDateTime;
  13 +
11 14 /**
12 15 * 工单事件 Mapper
13 16 *
... ... @@ -37,6 +40,9 @@ public interface EventInfoMapper extends BaseMapperX<EventInfoDO> {
37 40 }
38 41  
39 42 default void updateByIds(Long[] ids) {
40   - update(new EventInfoDO().setEventStatus(EventStatusEnum.FINISHED.getCode()), new LambdaQueryWrapperX<EventInfoDO>().in(EventInfoDO::getId, ids));
  43 + update(new EventInfoDO()
  44 + .setEnder(SecurityFrameworkUtils.getLoginUserNickname())
  45 + .setFinishDate(LocalDateTime.now())
  46 + .setEventStatus(EventStatusEnum.FINISHED.getCode()), new LambdaQueryWrapperX<EventInfoDO>().in(EventInfoDO::getId, ids));
41 47 }
42 48 }
43 49 \ No newline at end of file
... ...