Compare commits
2 Commits
a941db7870
...
7ccf5e4469
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ccf5e4469 | |||
| 137ab4e802 |
@ -23,6 +23,7 @@ import org.dromara.bigscreen.domain.dto.TaskInfoDto;
|
|||||||
import org.dromara.bigscreen.domain.vo.BusBwlVo;
|
import org.dromara.bigscreen.domain.vo.BusBwlVo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusSygjVo;
|
import org.dromara.bigscreen.domain.vo.BusSygjVo;
|
||||||
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
import org.dromara.bigscreen.domain.vo.BusWjzxVo;
|
||||||
|
import org.dromara.bigscreen.domain.vo.MyProjectInfoVo;
|
||||||
import org.dromara.bigscreen.service.IBusBwlService;
|
import org.dromara.bigscreen.service.IBusBwlService;
|
||||||
import org.dromara.bigscreen.service.IBusSygjService;
|
import org.dromara.bigscreen.service.IBusSygjService;
|
||||||
import org.dromara.bigscreen.service.IBusWjzxService;
|
import org.dromara.bigscreen.service.IBusWjzxService;
|
||||||
@ -97,8 +98,6 @@ public class PersonalHomeController extends BaseController {
|
|||||||
private final SysRoleMapper roleMapper;
|
private final SysRoleMapper roleMapper;
|
||||||
private final SysMenuServiceImpl menuMapper;
|
private final SysMenuServiceImpl menuMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// region AI 模块
|
// region AI 模块
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,10 +169,18 @@ public class PersonalHomeController extends BaseController {
|
|||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取我的项目信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/getMyProjectInfo")
|
||||||
|
public R<List<MyProjectInfoVo>> getMyProjectInfoList() {
|
||||||
|
// todo
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页待办事项
|
* 首页待办事项
|
||||||
|
*
|
||||||
* @param projectId
|
* @param projectId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -454,9 +454,11 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
Long topId = progressCategory.getId();
|
Long topId = progressCategory.getId();
|
||||||
|
final List<String> gfcqName = List.of("场地平整", "桩基成孔", "桩基浇筑", "支架安装", "组件安装");
|
||||||
// 查出所有属于该顶级节点的子孙节点
|
// 查出所有属于该顶级节点的子孙节点
|
||||||
List<PgsProgressCategory> allChildren = progressCategoryService.list(
|
List<PgsProgressCategory> allChildren = progressCategoryService.list(
|
||||||
Wrappers.<PgsProgressCategory>lambdaQuery()
|
Wrappers.<PgsProgressCategory>lambdaQuery()
|
||||||
|
.in(progressName.equals("光伏场区"), PgsProgressCategory::getName, gfcqName)
|
||||||
.and(wrapper -> {
|
.and(wrapper -> {
|
||||||
wrapper.like(PgsProgressCategory::getAncestors, "," + topId + ",")
|
wrapper.like(PgsProgressCategory::getAncestors, "," + topId + ",")
|
||||||
.or()
|
.or()
|
||||||
@ -466,6 +468,25 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
if (allChildren.isEmpty()) {
|
if (allChildren.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
if (progressName.equals("集电线路")) {
|
||||||
|
Set<Long> parentIds = allChildren.stream()
|
||||||
|
.map(PgsProgressCategory::getParentId)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
List<PgsProgressCategory> dierList = allChildren.stream()
|
||||||
|
.filter(item -> !parentIds.contains(item.getId()))
|
||||||
|
.toList();
|
||||||
|
return dierList.stream().map(c -> {
|
||||||
|
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
||||||
|
vo.setId(c.getId());
|
||||||
|
vo.setUnit(c.getUnit());
|
||||||
|
vo.setProgressName(c.getName());
|
||||||
|
vo.setPlanProgress(c.getPlanTotal());
|
||||||
|
vo.setActualProgress(c.getCompleted());
|
||||||
|
vo.setTotalProgress(c.getTotal());
|
||||||
|
return vo;
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
// 判断层级
|
// 判断层级
|
||||||
Set<Long> parentIds = allChildren.stream()
|
Set<Long> parentIds = allChildren.stream()
|
||||||
.map(PgsProgressCategory::getParentId)
|
.map(PgsProgressCategory::getParentId)
|
||||||
@ -477,6 +498,8 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
|||||||
if (CollUtil.isEmpty(dierList)) {
|
if (CollUtil.isEmpty(dierList)) {
|
||||||
return allChildren.stream().map(c -> {
|
return allChildren.stream().map(c -> {
|
||||||
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
||||||
|
vo.setId(c.getId());
|
||||||
|
vo.setUnit(c.getUnit());
|
||||||
vo.setProgressName(c.getName());
|
vo.setProgressName(c.getName());
|
||||||
vo.setPlanProgress(c.getPlanTotal());
|
vo.setPlanProgress(c.getPlanTotal());
|
||||||
vo.setActualProgress(c.getCompleted());
|
vo.setActualProgress(c.getCompleted());
|
||||||
|
|||||||
Reference in New Issue
Block a user