@@ -321,6 +321,19 @@ public class GovProjectCollectionManage { | |||||
return baseinfoService.count(wrapper); | return baseinfoService.count(wrapper); | ||||
} | } | ||||
public Long operationCount(ProjectListReq req) { | |||||
LambdaQueryWrapper<GovOperationProjectBaseinfo> wrapper = Wrappers.lambdaQuery(GovOperationProjectBaseinfo.class) | |||||
.like(StringUtils.isNotBlank(req.getProjectName()),GovOperationProjectBaseinfo::getBaseProjName,req.getProjectName()) | |||||
.like(StringUtils.isNotBlank(req.getBuildOrg()),GovOperationProjectBaseinfo::getBaseBuildDeprt,req.getBuildOrg()) | |||||
.eq(StringUtils.isNotBlank(req.getAreaCode()),GovOperationProjectBaseinfo::getAreaCode,req.getAreaCode()) | |||||
.eq(StringUtils.isNotBlank(req.getRegionCode()),GovOperationProjectBaseinfo::getAreaCode,req.getRegionCode()) | |||||
.gt(Objects.nonNull(req.getCreateOnMin()),GovOperationProjectBaseinfo::getTongTime,req.getCreateOnMin()) | |||||
.le(Objects.nonNull(req.getCreateOnMax()),GovOperationProjectBaseinfo::getTongTime,req.getCreateOnMax()) | |||||
.eq(GovOperationProjectBaseinfo::getDeleted,Boolean.FALSE) | |||||
.orderByDesc(GovOperationProjectBaseinfo::getBizTime); | |||||
return operationProjectBaseinfoService.count(wrapper); | |||||
} | |||||
/** | /** | ||||
* 项目归集详情 | * 项目归集详情 | ||||
* @param projId | * @param projId | ||||
@@ -86,7 +86,7 @@ public class SynProjectCollectionTask { | |||||
//全量项目归集 | //全量项目归集 | ||||
ProjectListReq req = new ProjectListReq(); | ProjectListReq req = new ProjectListReq(); | ||||
Long count = collectionManage.count(req); | |||||
Long count = collectionManage.count(req) + collectionManage.operationCount(req); | |||||
if(count == 0L){ | if(count == 0L){ | ||||
log.info("本次同步无数据"); | log.info("本次同步无数据"); | ||||
return; | return; | ||||
@@ -101,6 +101,15 @@ public class SynProjectCollectionTask { | |||||
GovBizProjectDetailVO projectDetail = collectionManage.detail(vo.getBaseProjId()); | GovBizProjectDetailVO projectDetail = collectionManage.detail(vo.getBaseProjId()); | ||||
collectionManage.pushProjectVo(projectDetail); | collectionManage.pushProjectVo(projectDetail); | ||||
} | } | ||||
//运维备案项目 | |||||
PageVo<GovBizProjectListVO> operationList = collectionManage.operationList(req); | |||||
log.info("operation list size :{}",operationList.getTotal()); | |||||
for(GovBizProjectListVO vo : operationList.getRecords()){ | |||||
GovBizProjectDetailVO operationDetail = collectionManage.operationDetail(vo.getBaseProjId()); | |||||
collectionManage.pushProjectVo(operationDetail); | |||||
} | |||||
stopWatch.stop(); | stopWatch.stop(); | ||||
log.info("数据同步任务结束====={}s",stopWatch.getTotalTimeSeconds()); | log.info("数据同步任务结束====={}s",stopWatch.getTotalTimeSeconds()); | ||||
} | } | ||||