|
@@ -33,10 +33,13 @@ import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
+import org.springblade.manager.entity.WbsTreePrivate;
|
|
|
+import org.springblade.manager.feign.WbsTreePrivateClient;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -53,6 +56,7 @@ import java.util.List;
|
|
|
public class EntrustInfoController extends BladeController {
|
|
|
|
|
|
private final IEntrustInfoService entrustInfoService;
|
|
|
+ private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
|
|
|
|
/**
|
|
|
* 详情
|
|
@@ -168,7 +172,27 @@ public class EntrustInfoController extends BladeController {
|
|
|
if(id==null && Func.isNull(id)){
|
|
|
return R.fail("id不能为空");
|
|
|
}
|
|
|
- EntrustDataInfoVO reportDetail = entrustInfoService.getReportDetail(id);
|
|
|
+ EntrustInfo entrustInfo = entrustInfoService.getById(id);
|
|
|
+ if (entrustInfo == null) {
|
|
|
+ return R.fail("id不存在");
|
|
|
+ }
|
|
|
+ WbsTreePrivate wbsTreePrivate = null;
|
|
|
+ if (entrustInfo.getNodeId() != null) {
|
|
|
+ List<WbsTreePrivate> wbsTreePrivates = wbsTreePrivateClient.queryByPKeyIds(Collections.singletonList(entrustInfo.getNodeId()));
|
|
|
+ if (wbsTreePrivates != null && !wbsTreePrivates.isEmpty()) {
|
|
|
+ wbsTreePrivate = wbsTreePrivates.get(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ EntrustDataInfoVO reportDetail;
|
|
|
+ if (wbsTreePrivate != null && wbsTreePrivate.getNodeType() == 51) {
|
|
|
+ reportDetail = new EntrustDataInfoVO();
|
|
|
+ reportDetail.setId(entrustInfo.getId() + "");
|
|
|
+ reportDetail.setEntrustInfo(entrustInfo.getEntrustInfo());
|
|
|
+ reportDetail.setEntrustName(wbsTreePrivate.getNodeName());
|
|
|
+ reportDetail.setExpCount(entrustInfo.getExpCount());
|
|
|
+ } else {
|
|
|
+ reportDetail = entrustInfoService.getReportDetail(id);
|
|
|
+ }
|
|
|
return R.data(reportDetail);
|
|
|
}
|
|
|
|