Browse Source

修正:告警处理记录中的处理人字段

zhongwei
ty 6 months ago
parent
commit
c8f667a827
  1. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
  2. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/wrapper/HandleWrapper.java

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml

@ -4,7 +4,7 @@
<select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo"> <select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo">
SELECT H.*,S.NAME AS STATION_NAME,F.PROCESS_INSTANCE_ID SELECT H.*,S.NAME AS STATION_NAME,F.PROCESS_INSTANCE_ID,F.HANDLE_USER_NAME as userName
FROM HZIMS_ALARM_HANDLE H FROM HZIMS_ALARM_HANDLE H
LEFT JOIN HZIMS_OPERATION.HZIMS_STATION S ON H.STATION_CODE = S.CODE LEFT JOIN HZIMS_OPERATION.HZIMS_STATION S ON H.STATION_CODE = S.CODE
LEFT JOIN HZIMS_ALARM_HANDLE_FLOW F ON H.ALARM_ID = F.ALARM_ID LEFT JOIN HZIMS_ALARM_HANDLE_FLOW F ON H.ALARM_ID = F.ALARM_ID

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/wrapper/HandleWrapper.java

@ -1,6 +1,7 @@
package com.hnac.hzims.alarm.show.wrapper; package com.hnac.hzims.alarm.show.wrapper;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.common.logs.utils.StringUtils;
import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.cache.UserCache;
@ -17,11 +18,13 @@ public class HandleWrapper extends BaseEntityWrapper<AlarmHandleVo,AlarmHandleVo
@Override @Override
public AlarmHandleVo entityVO(AlarmHandleVo entity) { public AlarmHandleVo entityVO(AlarmHandleVo entity) {
User createUser = UserCache.getUser(entity.getCreateUser()); if (1==entity.getHandleWay()|| StringUtils.isNotEmpty(entity.getUserName())) {
if(ObjectUtil.isEmpty(createUser)){ User createUser = UserCache.getUser(entity.getCreateUser());
return entity; if (ObjectUtil.isEmpty(createUser)) {
return entity;
}
entity.setUserName(createUser.getRealName());
} }
entity.setUserName(createUser.getRealName());
return entity; return entity;
} }
} }

Loading…
Cancel
Save