Browse Source

新运维项目备案接口部署

master
PoffyZhang 1 year ago
parent
commit
54290ff196
2 changed files with 23 additions and 1 deletions
  1. +13
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java
  2. +10
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java

+ 13
- 0
pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java View File

@@ -321,6 +321,19 @@ public class GovProjectCollectionManage {
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


+ 10
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java View File

@@ -86,7 +86,7 @@ public class SynProjectCollectionTask {

//全量项目归集
ProjectListReq req = new ProjectListReq();
Long count = collectionManage.count(req);
Long count = collectionManage.count(req) + collectionManage.operationCount(req);
if(count == 0L){
log.info("本次同步无数据");
return;
@@ -101,6 +101,15 @@ public class SynProjectCollectionTask {
GovBizProjectDetailVO projectDetail = collectionManage.detail(vo.getBaseProjId());
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();
log.info("数据同步任务结束====={}s",stopWatch.getTotalTimeSeconds());
}


Loading…
Cancel
Save