Преглед на файлове

Merge remote-tracking branch 'origin/dev' into dev

tags/24080901
PoffyZhang преди 6 месеца
родител
ревизия
859c1b4c9f
променени са 5 файла, в които са добавени 26 реда и са изтрити 53 реда
  1. +2
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ProjectReviewController.java
  2. +0
    -39
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/ConstrctionPlanListReq.java
  3. +9
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java
  4. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java
  5. +13
    -12
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 2
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ProjectReviewController.java Целия файл

@@ -6,6 +6,7 @@ import com.hz.pm.api.projectdeclared.model.req.ProjectReviewApplyReq;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@@ -29,6 +30,7 @@ public class ProjectReviewController {

@ApiOperation("提交项目评审申请")
@PostMapping(value = {"/submit", "resubmit"})
@WebLog("提交项目评审申请")
public void projectReviewApply(@RequestBody ProjectReviewApplyReq req) {
projectReviewManage.projectReviewApply(req);
}


+ 0
- 39
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/ConstrctionPlanListReq.java Целия файл

@@ -1,39 +0,0 @@
package com.hz.pm.api.projectdeclared.model.req;

import com.ningdatech.basic.model.PagePo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
* @Classname PrequalificationDeclaredReq
* @Description
* @Date 2023/2/14 11:42
* @Author PoffyZhang
*/
@Data
public class ConstrctionPlanListReq extends PagePo {

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("申报单位")
private String buildOrg;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("预算年度")
private Integer projectYear;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime createOnMin;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime createOnMax;

}

+ 9
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java Целия файл

@@ -6,9 +6,11 @@ import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq;
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO;
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@@ -32,40 +34,47 @@ public class MhProjectController {

@ApiOperation("立项备案列表")
@GetMapping("/pageDeclaredProject")
@WebLog("立项备案列表")
public PageVo<DeclaredProjectListVO> pageDeclaredProject(DeclaredProjectListReq req) {
return declaredRecordManage.pageDeclaredProject(req);
}

@ApiOperation("信产项目基本信息")
@GetMapping("/baseInfo/{mhProjectId}")
@WebLog("信产项目基本信息")
public MhProjectBaseInfoVO projectBaseInfo(@PathVariable Long mhProjectId) {
return declaredRecordManage.getProjectBaseInfo(mhProjectId);
}

@ApiOperation("立项备案提交")
@PostMapping("/submit")
@WebLog("立项备案提交")
public void submit(@Valid @RequestBody DefaultDeclaredDTO req) {
declaredRecordManage.startDeclaredRecord(req);
}

@ApiOperation("立项备案重新提交")
@PostMapping("/resubmit")
@WebLog("立项备案重新提交")
public void resubmit(@Valid @RequestBody DefaultDeclaredDTO req) {
declaredRecordManage.restartDeclaredRecord(req);
}

@ApiOperation("初始化信产项目至项目库")
@GetMapping("/initProjectLib")
@PreAuthorize("hasAuthority('SUPER_ADMIN')")
public void initMhProjectToProjectLib() {
declaredRecordManage.initMhProjectToProject();
}

@GetMapping("/importReplaceSystemInfos")
@PreAuthorize("hasAuthority('SUPER_ADMIN')")
public void importReplaceSystemInfos(MultipartFile file) {
declaredRecordManage.importReplaceSystemInfos(file);
}

@GetMapping("/importProjectFinanceInfos")
@PreAuthorize("hasAuthority('SUPER_ADMIN')")
public void importProjectFinanceInfos(MultipartFile file) {
declaredRecordManage.importProjectFinanceInfos(file);
}


+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java Целия файл

@@ -396,7 +396,7 @@ public class DeclaredRecordManage {
}

@Transactional(rollbackFor = Exception.class)
public void importProjectFinanceInfos(MultipartFile file) {
public synchronized void importProjectFinanceInfos(MultipartFile file) {
try (InputStream is = file.getInputStream()) {
List<Map<String, Object>> rows = ExcelUtil.getReader(is).readAll();
if (rows.isEmpty()) {
@@ -459,7 +459,7 @@ public class DeclaredRecordManage {
}

@Transactional(rollbackFor = Exception.class)
public void importReplaceSystemInfos(MultipartFile file) {
public synchronized void importReplaceSystemInfos(MultipartFile file) {
try (InputStream is = file.getInputStream()) {
List<Map<String, Object>> rows = ExcelUtil.getReader(is)
.readAll();


+ 13
- 12
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java Целия файл

@@ -60,6 +60,7 @@ import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.function.ToLongBiFunction;
import java.util.function.ToLongFunction;
import java.util.stream.Collectors;

@@ -227,12 +228,12 @@ public class WorkbenchManage {
Map<Long, Long> projBizMap = purchaseEventMap.getOrDefault(event.name(), Collections.emptyMap());
return projBizMap.values().stream().mapToLong(l -> l).sum();
};
ToLongFunction<AbstractStateChangeEvent> countProject = event -> {
ToLongBiFunction<AbstractStateChangeEvent, ProcessNode> countProject = (event, node) -> {
Map<Long, Long> projBizMap = purchaseEventMap.getOrDefault(event.name(), Collections.emptyMap());
if (event.name().equals(ProcessNode.PROJECT_ADAPTION.name())
|| event.name().equals(ProcessNode.SYSTEM_SELF_TEST.name())
|| event.name().equals(ProcessNode.SYSTEM_TEST_VALID.name())
|| event.name().equals(ProcessNode.XCFHX_REVIEW.name())) {
if (node.equals(ProcessNode.PROJECT_ADAPTION)
|| node.equals(ProcessNode.SYSTEM_SELF_TEST)
|| node.equals(ProcessNode.SYSTEM_TEST_VALID)
|| node.equals(ProcessNode.XCFHX_REVIEW)) {
return projBizMap.size();
} else {
return projectPurchaseCountMap.entrySet().stream().filter(w -> {
@@ -284,7 +285,7 @@ public class WorkbenchManage {
projectCount = projectPurchaseCountMap.size();
if (bidCount > 0) {
Wrapper<PurchaseStatusChange> pQuery = Wrappers.lambdaQuery(PurchaseStatusChange.class)
.select(PurchaseStatusChange::getEvent)
.select(PurchaseStatusChange::getEvent,PurchaseStatusChange::getProjectId)
.in(PurchaseStatusChange::getProjectId, allVersionProjectIds)
.in(PurchaseStatusChange::getEvent, AdaptStateChangeEvent.ADAPT_INFO_PASSED,
SelfTestStateChangeEvent.SELF_TEST_PASSED,
@@ -302,29 +303,29 @@ public class WorkbenchManage {
break;
case PROJECT_ADAPTION:
bidCount = countPurchase.applyAsLong(AdaptStateChangeEvent.ADAPT_INFO_PASSED);
projectCount = countProject.applyAsLong(AdaptStateChangeEvent.ADAPT_INFO_PASSED);
projectCount = countProject.applyAsLong(AdaptStateChangeEvent.ADAPT_INFO_PASSED, node);
break;
case SYSTEM_SELF_TEST:
bidCount = countPurchase.applyAsLong(SelfTestStateChangeEvent.SELF_TEST_PASSED);
projectCount = countProject.applyAsLong(SelfTestStateChangeEvent.SELF_TEST_PASSED);
projectCount = countProject.applyAsLong(SelfTestStateChangeEvent.SELF_TEST_PASSED, node);
break;
case SYSTEM_TEST_VALID:
bidCount = countPurchase.applyAsLong(TestValidStateChangeEvent.TEST_VALID_INFO_PASSED);
projectCount = countProject.applyAsLong(TestValidStateChangeEvent.TEST_VALID_INFO_PASSED);
projectCount = countProject.applyAsLong(TestValidStateChangeEvent.TEST_VALID_INFO_PASSED, node);
break;
case FIRST_INSPECTED:
case PILOT_RUNNING:
// 初验试运行数量同步
bidCount = countPurchase.applyAsLong(TenderStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES);
projectCount = countProject.applyAsLong(TenderStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES);
projectCount = countProject.applyAsLong(TenderStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES, node);
break;
case XCFHX_REVIEW:
bidCount = countPurchase.applyAsLong(XcfhxStateChangeEvent.XCFHX_APPLY_PASSED);
projectCount = countProject.applyAsLong(XcfhxStateChangeEvent.XCFHX_APPLY_PASSED);
projectCount = countProject.applyAsLong(XcfhxStateChangeEvent.XCFHX_APPLY_PASSED, node);
break;
case FINAL_INSPECTED:
bidCount = countPurchase.applyAsLong(TenderStateChangeEvent.FINALLY_INSPECTED_PASSED);
projectCount = countProject.applyAsLong(TenderStateChangeEvent.FINALLY_INSPECTED_PASSED);
projectCount = countProject.applyAsLong(TenderStateChangeEvent.FINALLY_INSPECTED_PASSED, node);
break;
default:
break;


Loading…
Отказ
Запис