Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 10 months ago
parent
commit
16ed7e3ae3
  1. 9
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
  2. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

9
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java

@ -6,14 +6,18 @@ import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.alarm.monitor.service.AlarmSaveService; import com.hnac.hzims.alarm.monitor.service.AlarmSaveService;
import com.hnac.hzims.alarm.show.service.AlarmService; import com.hnac.hzims.alarm.show.service.AlarmService;
import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationClient;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author ysj * @author ysj
@ -38,13 +42,12 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
*/ */
@Override @Override
public Boolean save(List<AlarmEntity> alarms) { public Boolean save(List<AlarmEntity> alarms) {
// 步骤1.查询告警数据对应站点
/*// 步骤1.查询告警数据对应站点
R<List<StationEntity>> result = stationClient.querySatationByCodes(alarms.stream().map(AlarmEntity::getStationId).collect(Collectors.toList())); R<List<StationEntity>> result = stationClient.querySatationByCodes(alarms.stream().map(AlarmEntity::getStationId).collect(Collectors.toList()));
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
log.error("alarm query station is null : {}",alarms.stream().map(AlarmEntity::getAlarmId).collect(Collectors.toList())); log.error("alarm query station is null : {}",alarms.stream().map(AlarmEntity::getAlarmId).collect(Collectors.toList()));
return false; return false;
}*/ }
// 步骤2.遍历保存告警数据 // 步骤2.遍历保存告警数据
alarms.forEach(alarm->{ alarms.forEach(alarm->{

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -1420,10 +1420,10 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
// 交接班接班信息填充 // 交接班接班信息填充
recDTO.setStatus(DutyRecStatus.ACCEPT.getVal()); recDTO.setStatus(DutyRecStatus.ACCEPT.getVal());
recDTO.setAcceptTime(new Date()); recDTO.setAcceptTime(new Date());
ImsDutyLogEntity imsDutyLogEntity = recDTO.getImsDutyLogEntity();
ImsDutyLogEntity update = imsDutyLogService.getOne(Wrappers.<ImsDutyLogEntity>lambdaQuery() ImsDutyLogEntity update = imsDutyLogService.getOne(Wrappers.<ImsDutyLogEntity>lambdaQuery()
.eq(ImsDutyLogEntity::getDutyId, imsDutyLogEntity.getDutyId()) .eq(ImsDutyLogEntity::getDutyId, headDutyMain.getId())
.last("limit 1")); .last("limit 1"));
if(ObjectUtil.isNotEmpty(update)) {
update.setCarryTime(DateUtil.format(new Date(), PATTERN_DATETIME)); update.setCarryTime(DateUtil.format(new Date(), PATTERN_DATETIME));
imsDutyLogService.updateById(update); imsDutyLogService.updateById(update);
// imsDutyLogService.update(Wrappers.<ImsDutyLogEntity>lambdaUpdate() // imsDutyLogService.update(Wrappers.<ImsDutyLogEntity>lambdaUpdate()
@ -1432,6 +1432,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
// ); // );
log.info("更新值班日志"); log.info("更新值班日志");
} }
}
ImsDutyRecEntity dutyRec = BeanUtil.copy(recDTO, ImsDutyRecEntity.class); ImsDutyRecEntity dutyRec = BeanUtil.copy(recDTO, ImsDutyRecEntity.class);
// 更新交班值班 // 更新交班值班
if (ObjectUtil.isNotEmpty(headDutyMain)&&ObjectUtil.isNotEmpty(headDutyMain.getId())) { if (ObjectUtil.isNotEmpty(headDutyMain)&&ObjectUtil.isNotEmpty(headDutyMain.getId())) {

Loading…
Cancel
Save