Browse Source

#曲线分析

zhongwei
yang_shj 5 months ago
parent
commit
3bfb765ed8
  1. 6
      hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java
  2. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardWorkServiceImpl.java

6
hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java

@ -122,7 +122,11 @@ public class HistoryDeviceServiceImpl implements IHistoryDeviceService {
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
return new ArrayList<>();
}
return result.getData();
return result.getData().stream().peek(fac->{
fac.setName(Arrays.stream(fac.getName().split("\\."))
.reduce((first, second) -> second)
.orElse(fac.getName()));
}).collect(Collectors.toList());
}
/**

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardWorkServiceImpl.java

@ -1,6 +1,7 @@
package com.hnac.hzims.safeproduct.risk.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -104,14 +105,14 @@ public class HazardWorkServiceImpl extends ServiceImpl<HazardWorkMapper, HazardW
Long headId = record.getHead();
if (headId != null) {
R<User> header = userClient.userInfoById(headId);
if (header.isSuccess()) {
if (header.isSuccess() && ObjectUtils.isNotEmpty(header.getData())) {
hazardWorkVO.setHeadName(header.getData().getRealName());
}
}
Long manageId = record.getManage();
if (manageId != null) {
R<User> manager = userClient.userInfoById(manageId);
if (manager.isSuccess()) {
if (manager.isSuccess() && ObjectUtils.isNotEmpty(manager.getData())) {
hazardWorkVO.setManagerName(manager.getData().getRealName());
}
}

Loading…
Cancel
Save