|
|
@ -20,7 +20,6 @@ import com.hnac.hzims.operational.defect.feign.IOperPhenomenonClient; |
|
|
|
import com.hnac.hzims.operational.defect.vo.OperPhenomenonVO; |
|
|
|
import com.hnac.hzims.operational.defect.vo.OperPhenomenonVO; |
|
|
|
import com.hnac.hzims.util.HttpClientUtils; |
|
|
|
import com.hnac.hzims.util.HttpClientUtils; |
|
|
|
import com.hnac.hzims.util.pojo.HttpResponse; |
|
|
|
import com.hnac.hzims.util.pojo.HttpResponse; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
@ -32,6 +31,8 @@ import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
|
|
|
|
import org.springblade.system.user.feign.IUserClient; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
@ -39,6 +40,7 @@ import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.Optional; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -51,6 +53,8 @@ import java.util.stream.Collectors; |
|
|
|
public class FdpTaskServiceImpl extends BaseServiceImpl<FdpTaskMapper, FdpTaskEntity> implements IFdpTaskService { |
|
|
|
public class FdpTaskServiceImpl extends BaseServiceImpl<FdpTaskMapper, FdpTaskEntity> implements IFdpTaskService { |
|
|
|
private final IOperPhenomenonClient operPhenomenonClient; |
|
|
|
private final IOperPhenomenonClient operPhenomenonClient; |
|
|
|
private final ISysClient sysClient; |
|
|
|
private final ISysClient sysClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final IUserClient userClient; |
|
|
|
private IDiagnoseProxy diagnoseProxy; |
|
|
|
private IDiagnoseProxy diagnoseProxy; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${url.submitResult}") |
|
|
|
@Value("${url.submitResult}") |
|
|
@ -75,7 +79,20 @@ public class FdpTaskServiceImpl extends BaseServiceImpl<FdpTaskMapper, FdpTaskEn |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R<FdpTaskVO> detail(Long id) { |
|
|
|
public R<FdpTaskVO> detail(Long id) { |
|
|
|
FdpTaskEntity detail = super.getById(id); |
|
|
|
FdpTaskEntity detail = super.getById(id); |
|
|
|
return R.data(FdpTaskWrapper.build().entityVO(detail)); |
|
|
|
FdpTaskVO data = FdpTaskWrapper.build().entityVO(detail); |
|
|
|
|
|
|
|
if (StringUtil.isEmpty(data.getCreateUserName())){ |
|
|
|
|
|
|
|
R<User> userR = userClient.userInfoById(detail.getCreateUser().longValue()); |
|
|
|
|
|
|
|
if (userR.isSuccess()&&Func.isNotEmpty(userR.getData())){ |
|
|
|
|
|
|
|
data.setCreateUserName(Optional.ofNullable(userR.getData()).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtil.isEmpty(data.getUpdateUser())){ |
|
|
|
|
|
|
|
R<User> userR = userClient.userInfoById(detail.getUpdateUser().longValue()); |
|
|
|
|
|
|
|
if (userR.isSuccess()&&Func.isNotEmpty(userR.getData())){ |
|
|
|
|
|
|
|
data.setUpdateUserName(Optional.ofNullable(userR.getData()).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.data(data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|