feat:添加2.0数据源工程(排除本地工程)数据列表
This commit is contained in:
parent
9b7e0bdd27
commit
34fe478bf5
@ -73,8 +73,9 @@ public class ZhTechnicalEconomyController extends BaseController {
|
||||
String deptBuildUnitCode = getDeptBuildUnitCode();
|
||||
return AjaxResult.success(zhTechnicalEconomyService.prjInfoList(deptBuildUnitCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取2.0项目列表
|
||||
* 获取施工图和预算上传列表(2.0)
|
||||
*/
|
||||
@PostMapping("prjInfo2List")
|
||||
public AjaxResult prjInfo2List() {
|
||||
|
||||
@ -37,6 +37,8 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
ZhDrawingAndBudgetEaService zhDrawingAndBudgetEaService;
|
||||
@Resource
|
||||
ZhMapProjectService zhMapProjectService;
|
||||
@Resource
|
||||
TjDwGridConstructionProjectService tjPrjService;
|
||||
|
||||
/**
|
||||
* 获取项目列表
|
||||
@ -58,10 +60,24 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> prjInfo2List(String deptBuildUnitCode) {
|
||||
// 本地项目
|
||||
List<Map<String, Object>> localPrj = projectService.getPrjInfo(deptBuildUnitCode, Collections.emptyList());
|
||||
// 查询所有本地项目
|
||||
List<ZhMapProject> zhPrjList = zhMapProjectService.list();
|
||||
// 查询所有2.0项目
|
||||
List<TjDwGridConstructionProject> tjPrjList = tjPrjService.list();
|
||||
|
||||
return projectService.getPrjInfo(deptBuildUnitCode);
|
||||
// 提取本地项目数据的2.0id
|
||||
Set<String> zhPrj2Id = zhPrjList.stream().map(ZhMapProject::getConstructionProjectId).collect(Collectors.toSet());
|
||||
|
||||
List<TjDwGridConstructionProject> collect = tjPrjList.stream().filter(tjPtj -> !zhPrj2Id.contains(tjPtj.getId())).collect(Collectors.toList());
|
||||
|
||||
return collect.stream()
|
||||
.map(project -> {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("code", project.getId());
|
||||
map.put("value", project.getPrjName());
|
||||
return map;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -316,7 +332,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
// 施工图计划上传开始时间
|
||||
if (filterCriteria.getDrawingPlanUploadTimeStart() != null && !filterCriteria.getDrawingPlanUploadTimeStart().isEmpty()) {
|
||||
originalList = originalList.stream().filter(vo -> {
|
||||
if(vo.getDrawingPlanUpdateTime() == null){
|
||||
if (vo.getDrawingPlanUpdateTime() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -329,7 +345,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
}
|
||||
|
||||
if (startDate != null) {
|
||||
return startDate.before(vo.getDrawingPlanUpdateTime());
|
||||
return !startDate.after(vo.getDrawingPlanUpdateTime());
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
@ -337,7 +353,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
// 施工图计划上传结束时间
|
||||
if (filterCriteria.getDrawingPlanUploadTimeEnd() != null && !filterCriteria.getDrawingPlanUploadTimeEnd().isEmpty()) {
|
||||
originalList = originalList.stream().filter(vo -> {
|
||||
if(vo.getDrawingPlanUpdateTime() == null){
|
||||
if (vo.getDrawingPlanUpdateTime() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -358,7 +374,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
// 预算计划上传开始时间
|
||||
if (filterCriteria.getBudgetDrawingPlanUploadTimeStart() != null && !filterCriteria.getBudgetDrawingPlanUploadTimeStart().isEmpty()) {
|
||||
originalList = originalList.stream().filter(vo -> {
|
||||
if(vo.getBudgetDrawingPlanUpdateTime() == null){
|
||||
if (vo.getBudgetDrawingPlanUpdateTime() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -371,7 +387,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
}
|
||||
|
||||
if (startDate != null) {
|
||||
return startDate.before(vo.getBudgetDrawingPlanUpdateTime());
|
||||
return !startDate.after(vo.getBudgetDrawingPlanUpdateTime());
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
@ -379,7 +395,7 @@ public class ZhTechnicalEconomyServiceImpl implements ZhTechnicalEconomyService
|
||||
// 预算计划上传结束时间
|
||||
if (filterCriteria.getBudgetDrawingPlanUploadTimeEnd() != null && !filterCriteria.getBudgetDrawingPlanUploadTimeEnd().isEmpty()) {
|
||||
originalList = originalList.stream().filter(vo -> {
|
||||
if(vo.getBudgetDrawingPlanUpdateTime() == null){
|
||||
if (vo.getBudgetDrawingPlanUpdateTime() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user