Browse Source

debug 运维项目

tags/24080901
PoffyZhang 1 year ago
parent
commit
d839ca1cb4
3 changed files with 36 additions and 7 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java
  2. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java
  3. +29
    -0
      pmapi/src/test/java/com/ningdatech/pmapi/cpu/CPUTest.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java View File

@@ -113,7 +113,7 @@ public class GovProjectCollectionController {


@GetMapping("/operation/draft-detail/{draftId}") @GetMapping("/operation/draft-detail/{draftId}")
@ApiOperation("运维项目归集草稿箱详情") @ApiOperation("运维项目归集草稿箱详情")
public GovBizProjectDetailVO operationDraftDetail(@PathVariable Long draftId) {
public GovOperationProjectDetailVO operationDraftDetail(@PathVariable Long draftId) {
return collectionManage.operationDraftDetail(draftId); return collectionManage.operationDraftDetail(draftId);
} }


@@ -127,7 +127,7 @@ public class GovProjectCollectionController {
@PostMapping("/operation/draft") @PostMapping("/operation/draft")
@ApiOperation("运维项目归集暂存草稿箱") @ApiOperation("运维项目归集暂存草稿箱")
@WebLog("运维项目归集暂存草稿箱") @WebLog("运维项目归集暂存草稿箱")
public String operationDraft(@Valid @RequestBody GovBizProjectSaveDTO saveDTO) {
public String operationDraft(@Valid @RequestBody GovOperationProjectSaveDTO saveDTO) {
return collectionManage.operationDraft(saveDTO,null); return collectionManage.operationDraft(saveDTO,null);
} }




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

@@ -569,8 +569,8 @@ public class GovProjectCollectionManage {
} }




public GovBizProjectDetailVO operationDraftDetail(Long draftId) {
GovBizProjectDetailVO res = new GovBizProjectDetailVO();
public GovOperationProjectDetailVO operationDraftDetail(Long draftId) {
GovOperationProjectDetailVO res = new GovOperationProjectDetailVO();
//查询草稿表 //查询草稿表
GovOperationProjectDraft draft = operationProjectDraftService.getById(draftId); GovOperationProjectDraft draft = operationProjectDraftService.getById(draftId);


@@ -582,7 +582,7 @@ public class GovProjectCollectionManage {
//1.基本信息 //1.基本信息
res.setBaseProjId(draft.getBaseProjId()); res.setBaseProjId(draft.getBaseProjId());
res.setBaseProjName(draft.getBaseProjName()); res.setBaseProjName(draft.getBaseProjName());
res.setBaseinfo(BeanUtil.copyProperties(draft, GovBizProjectBaseinfoVO.class));
res.setBaseinfo(BeanUtil.copyProperties(draft, GovOperationProjectBaseinfoVO.class));


//2.申报信息 //2.申报信息
res.setApply(BeanUtil.copyProperties(draft, GovBizProjectApplyVO.class)); res.setApply(BeanUtil.copyProperties(draft, GovBizProjectApplyVO.class));
@@ -1163,7 +1163,7 @@ public class GovProjectCollectionManage {
return BizConst.SAVE_SUCCESS; return BizConst.SAVE_SUCCESS;
} }


public String operationDraft(GovBizProjectSaveDTO saveDTO, UserInfoDetails user) {
public String operationDraft(GovOperationProjectSaveDTO saveDTO, UserInfoDetails user) {
if(Objects.isNull(user)){ if(Objects.isNull(user)){
user = LoginUserUtil.loginUserDetail(); user = LoginUserUtil.loginUserDetail();
} }
@@ -1184,7 +1184,7 @@ public class GovProjectCollectionManage {
} }


//1.保存基本信息 //1.保存基本信息
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo();
GovOperationProjectBaseinfoDTO base = saveDTO.getBaseinfo();
String baseProjId = base.getBaseProjId(); String baseProjId = base.getBaseProjId();
String baseProjName = base.getBaseProjName(); String baseProjName = base.getBaseProjName();
//要生成 草稿的项目编号 //要生成 草稿的项目编号


+ 29
- 0
pmapi/src/test/java/com/ningdatech/pmapi/cpu/CPUTest.java View File

@@ -0,0 +1,29 @@
package com.ningdatech.pmapi.cpu;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class CPUTest {
public static ExecutorService executorService = Executors.newFixedThreadPool(10);

public static void main(String[] args) {
for(int i = 0;i < 10;i++){
executorService.execute(() -> {
while (true) {
// 一个复杂的计算任务
long x = 123456789123456789L;
for (int j = 0; j < 10000; j++) {
x = (x * 123456789123456789L) % 123456789;
}
}
});
}

try{
Thread.sleep(10000);
executorService.shutdownNow();
}catch (Exception e){
e.printStackTrace();
}
}
}

Loading…
Cancel
Save