Browse Source

feat:

1. 修复信创报告数据存储结构;
tags/24121201
WendyYang 4 weeks ago
parent
commit
ccb1c54e82
8 changed files with 48 additions and 71 deletions
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java
  2. +26
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java
  3. +12
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderListReq.java
  4. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java
  5. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java
  6. +0
    -57
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/ReviewChecklistApproveDTO.java
  7. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplyEditDTO.java
  8. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java View File

@@ -2,7 +2,7 @@ package com.hz.pm.api.open.controller;


import com.hz.pm.api.open.manage.OpenApiProjectLibManage; import com.hz.pm.api.open.manage.OpenApiProjectLibManage;
import com.hz.pm.api.open.model.po.MhSyncProjectListPO; import com.hz.pm.api.open.model.po.MhSyncProjectListPO;
import com.hz.pm.api.open.model.po.TenderSystemListReq;
import com.hz.pm.api.open.model.po.TenderListReq;
import com.hz.pm.api.open.model.vo.DeclaredProjectInfoToMhVO; import com.hz.pm.api.open.model.vo.DeclaredProjectInfoToMhVO;
import com.hz.pm.api.open.model.vo.TenderToMhDetailVO; import com.hz.pm.api.open.model.vo.TenderToMhDetailVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@@ -40,7 +40,7 @@ public class OpenApiProjectLibController {


@PostMapping("/listTenders") @PostMapping("/listTenders")
@ApiOperation("获取所有标项系统信息") @ApiOperation("获取所有标项系统信息")
public List<TenderToMhDetailVO> listTenders(@RequestBody @Valid TenderSystemListReq req) {
public List<TenderToMhDetailVO> listTenders(@RequestBody @Valid TenderListReq req) {
return openApiProjectLibManage.listTenders(req); return openApiProjectLibManage.listTenders(req);
} }




+ 26
- 4
hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java View File

@@ -5,13 +5,14 @@ import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.common.model.constant.ExistsSqlConst; import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent; import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
import com.hz.pm.api.common.util.BizDateUtil; import com.hz.pm.api.common.util.BizDateUtil;
import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.open.model.po.MhSyncProjectListPO; import com.hz.pm.api.open.model.po.MhSyncProjectListPO;
import com.hz.pm.api.open.model.po.TenderSystemListReq;
import com.hz.pm.api.open.model.po.TenderListReq;
import com.hz.pm.api.open.model.vo.DeclaredProjectInfoToMhVO; import com.hz.pm.api.open.model.vo.DeclaredProjectInfoToMhVO;
import com.hz.pm.api.open.model.vo.ReferSystemReplaceInfoToMhVO; import com.hz.pm.api.open.model.vo.ReferSystemReplaceInfoToMhVO;
import com.hz.pm.api.open.model.vo.TenderToMhDetailVO; import com.hz.pm.api.open.model.vo.TenderToMhDetailVO;
@@ -192,9 +193,29 @@ public class OpenApiProjectLibManage {
return StrUtil.EMPTY; return StrUtil.EMPTY;
} }


public List<TenderToMhDetailVO> listTenders(TenderSystemListReq req) {
public List<TenderToMhDetailVO> listTenders(TenderListReq req) {
openApiCheckSignUtil.checkSign(req.getKey()); openApiCheckSignUtil.checkSign(req.getKey());
List<Purchase> purchases = purchaseService.list();
LambdaQueryWrapper<Purchase> purQuery = Wrappers.lambdaQuery(Purchase.class)
.orderByDesc(Purchase::getCreateOn)
.orderByDesc(Purchase::getId);
if (req.hasProjectQuery()) {
Wrapper<Project> projQuery = Wrappers.lambdaQuery(Project.class)
.select(Project::getId, Project::getProjectCode)
.eq(req.getProjectYear() != null, Project::getProjectYear, req.getProjectYear())
.eq(req.getBuildOrgCode() != null, Project::getBuildOrgCode, req.getBuildOrgCode())
.eq(req.getProjectCode() != null, Project::getProjectCode, req.getProjectCode())
.eq(Project::getNewest, Boolean.TRUE);
List<Project> projects = projectService.list(projQuery);
if (projects.isEmpty()) {
return Collections.emptyList();
}
List<Long> projectIds = projects.stream()
.map(w -> ProjectIdCodeCacheUtil.get(w.getProjectCode()))
.flatMap(Collection::stream)
.collect(Collectors.toList());
purQuery.in(Purchase::getProjectId, projectIds);
}
List<Purchase> purchases = purchaseService.list(purQuery);
if (purchases.isEmpty()) { if (purchases.isEmpty()) {
return Collections.emptyList(); return Collections.emptyList();
} }
@@ -216,6 +237,7 @@ public class OpenApiProjectLibManage {
List<TenderToMhDetailVO> collect = purchases.stream().map(w -> { List<TenderToMhDetailVO> collect = purchases.stream().map(w -> {
TenderToMhDetailVO tender = new TenderToMhDetailVO(); TenderToMhDetailVO tender = new TenderToMhDetailVO();
tender.setBidId(w.getId()); tender.setBidId(w.getId());
tender.setCreateOn(w.getCreateOn());
tender.setProjectCode(ProjectIdCodeCacheUtil.get(w.getProjectId())); tender.setProjectCode(ProjectIdCodeCacheUtil.get(w.getProjectId()));
tender.setName(w.getBidName()); tender.setName(w.getBidName());
tender.setBuyMain(String.valueOf(w.getPurchaseUnitId())); tender.setBuyMain(String.valueOf(w.getPurchaseUnitId()));
@@ -231,7 +253,7 @@ public class OpenApiProjectLibManage {


Operation operation = operationMap.get(w.getId()); Operation operation = operationMap.get(w.getId());
if (operation != null) { if (operation != null) {
tender.setRefactorTime(operation.getAdaptationTime());
tender.setRefactorTime(operation.getActualAdaptionTime());
} }


BizUtils.notNull(w.getXcfhxEvalFinishDate(), ft -> tender.setXcCompleteTime(ft.atStartOfDay())); BizUtils.notNull(w.getXcfhxEvalFinishDate(), ft -> tender.setXcCompleteTime(ft.atStartOfDay()));


hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderSystemListReq.java → hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderListReq.java View File

@@ -7,14 +7,14 @@ import javax.validation.constraints.NotBlank;


/** /**
* <p> * <p>
* TenderSystemListReq
* TenderListReq
* </p> * </p>
* *
* @author WendyYang * @author WendyYang
* @since 11:36 2024/12/9 * @since 11:36 2024/12/9
*/ */
@Data @Data
public class TenderSystemListReq {
public class TenderListReq {


@ApiModelProperty("校验公钥") @ApiModelProperty("校验公钥")
@NotBlank(message = "秘钥不能为空") @NotBlank(message = "秘钥不能为空")
@@ -23,4 +23,14 @@ public class TenderSystemListReq {
@ApiModelProperty("项目年度") @ApiModelProperty("项目年度")
private Integer projectYear; private Integer projectYear;


@ApiModelProperty("项目编码")
private String projectCode;

@ApiModelProperty("建设单位编码")
private Long buildOrgCode;

public boolean hasProjectQuery() {
return projectYear != null || projectCode != null || buildOrgCode != null;
}

} }

+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java View File

@@ -24,6 +24,9 @@ public class TenderToMhDetailVO {
@ApiModelProperty(value = "标项ID") @ApiModelProperty(value = "标项ID")
private Long bidId; private Long bidId;


@ApiModelProperty(value = "标项创建时间")
private LocalDateTime createOn;

@ApiModelProperty(value = "标项名称") @ApiModelProperty(value = "标项名称")
private String name; private String name;




+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java View File

@@ -150,7 +150,7 @@ public class PurchaseController {
@ApiOperation("新增系统(信创审符合性查信息)") @ApiOperation("新增系统(信创审符合性查信息)")
@WebLog("新增系统(信创审符合性查信息)") @WebLog("新增系统(信创审符合性查信息)")
@PostMapping("/add-system") @PostMapping("/add-system")
public Long addSystem(@Validated @RequestBody XcfhxApplySaveDTO dto) {
public Long addSystem(@Valid @RequestBody XcfhxApplySaveDTO dto) {
return purchaseManage.addSystem(dto); return purchaseManage.addSystem(dto);
} }




+ 0
- 57
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/ReviewChecklistApproveDTO.java View File

@@ -1,57 +0,0 @@
package com.hz.pm.api.projectdeclared.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* @Classname ReviewChecklistApproveDTO
* @Description
* @Date 2023/11/07 15:35
* @Author PoffyZhang
*/
@Data
@ApiModel(value = "ReviewChecklistApproveDTO", description = "")
public class ReviewChecklistApproveDTO {

private static final long serialVersionUID = 1L;

@ApiModelProperty("项目编号")
@NotBlank(message = "请传项目编号")
private String projectCode;

@ApiModelProperty("标题")
@NotBlank(message = "请传入标题")
private String title;

@ApiModelProperty("子标题")
@NotBlank(message = "请传入子标题")
private String subTitle;

@ApiModelProperty("内容")
@NotBlank(message = "请传入内容")
private String content;

@ApiModelProperty("对应页码")
@NotBlank(message = "请传入对应页码")
private String corrPageNum;

@ApiModelProperty("否决情形")
@NotBlank(message = "请传入否决情形")
private String rejectionSituation;

@ApiModelProperty("响应情况")
@NotBlank(message = "请传入响应情况")
private String responseSituation;

@ApiModelProperty("评审意见")
@NotBlank(message = "请传入评审意见")
private String reviewComments;

@ApiModelProperty("审核结果 1.通过 2不通过 3一票否决")
@NotNull(message = "请传入审核结果")
private Integer reviewResult;

}

+ 2
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplyEditDTO.java View File

@@ -2,10 +2,9 @@ package com.hz.pm.api.projectdeclared.model.dto;


import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;


/** /**
@@ -16,7 +15,7 @@ import javax.validation.constraints.NotNull;
*/ */
@Data @Data
@ApiModel(value = "信创审查对象", description = "采购对象") @ApiModel(value = "信创审查对象", description = "采购对象")
@AllArgsConstructor
@NoArgsConstructor
public class XcfhxApplyEditDTO { public class XcfhxApplyEditDTO {
@ApiModelProperty("系统名称") @ApiModelProperty("系统名称")
@NotNull(message = "编辑时id必传") @NotNull(message = "编辑时id必传")


+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java View File

@@ -2,8 +2,8 @@ package com.hz.pm.api.projectdeclared.model.dto;


import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;


import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@@ -15,8 +15,8 @@ import javax.validation.constraints.NotNull;
* @Author PoffyZhang * @Author PoffyZhang
*/ */
@Data @Data
@NoArgsConstructor
@ApiModel(value = "信创审查对象", description = "采购对象") @ApiModel(value = "信创审查对象", description = "采购对象")
@AllArgsConstructor
public class XcfhxApplySaveDTO { public class XcfhxApplySaveDTO {


@ApiModelProperty("系统名称") @ApiModelProperty("系统名称")


Loading…
Cancel
Save