@@ -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.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.TenderToMhDetailVO; | |||
import io.swagger.annotations.Api; | |||
@@ -40,7 +40,7 @@ public class OpenApiProjectLibController { | |||
@PostMapping("/listTenders") | |||
@ApiOperation("获取所有标项系统信息") | |||
public List<TenderToMhDetailVO> listTenders(@RequestBody @Valid TenderSystemListReq req) { | |||
public List<TenderToMhDetailVO> listTenders(@RequestBody @Valid TenderListReq req) { | |||
return openApiProjectLibManage.listTenders(req); | |||
} | |||
@@ -5,13 +5,14 @@ import cn.hutool.core.util.NumberUtil; | |||
import cn.hutool.core.util.StrUtil; | |||
import cn.hutool.json.JSONUtil; | |||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.hz.pm.api.common.model.constant.ExistsSqlConst; | |||
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent; | |||
import com.hz.pm.api.common.util.BizDateUtil; | |||
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.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.ReferSystemReplaceInfoToMhVO; | |||
import com.hz.pm.api.open.model.vo.TenderToMhDetailVO; | |||
@@ -192,9 +193,29 @@ public class OpenApiProjectLibManage { | |||
return StrUtil.EMPTY; | |||
} | |||
public List<TenderToMhDetailVO> listTenders(TenderSystemListReq req) { | |||
public List<TenderToMhDetailVO> listTenders(TenderListReq req) { | |||
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()) { | |||
return Collections.emptyList(); | |||
} | |||
@@ -216,6 +237,7 @@ public class OpenApiProjectLibManage { | |||
List<TenderToMhDetailVO> collect = purchases.stream().map(w -> { | |||
TenderToMhDetailVO tender = new TenderToMhDetailVO(); | |||
tender.setBidId(w.getId()); | |||
tender.setCreateOn(w.getCreateOn()); | |||
tender.setProjectCode(ProjectIdCodeCacheUtil.get(w.getProjectId())); | |||
tender.setName(w.getBidName()); | |||
tender.setBuyMain(String.valueOf(w.getPurchaseUnitId())); | |||
@@ -231,7 +253,7 @@ public class OpenApiProjectLibManage { | |||
Operation operation = operationMap.get(w.getId()); | |||
if (operation != null) { | |||
tender.setRefactorTime(operation.getAdaptationTime()); | |||
tender.setRefactorTime(operation.getActualAdaptionTime()); | |||
} | |||
BizUtils.notNull(w.getXcfhxEvalFinishDate(), ft -> tender.setXcCompleteTime(ft.atStartOfDay())); | |||
@@ -7,14 +7,14 @@ import javax.validation.constraints.NotBlank; | |||
/** | |||
* <p> | |||
* TenderSystemListReq | |||
* TenderListReq | |||
* </p> | |||
* | |||
* @author WendyYang | |||
* @since 11:36 2024/12/9 | |||
*/ | |||
@Data | |||
public class TenderSystemListReq { | |||
public class TenderListReq { | |||
@ApiModelProperty("校验公钥") | |||
@NotBlank(message = "秘钥不能为空") | |||
@@ -23,4 +23,14 @@ public class TenderSystemListReq { | |||
@ApiModelProperty("项目年度") | |||
private Integer projectYear; | |||
@ApiModelProperty("项目编码") | |||
private String projectCode; | |||
@ApiModelProperty("建设单位编码") | |||
private Long buildOrgCode; | |||
public boolean hasProjectQuery() { | |||
return projectYear != null || projectCode != null || buildOrgCode != null; | |||
} | |||
} |
@@ -24,6 +24,9 @@ public class TenderToMhDetailVO { | |||
@ApiModelProperty(value = "标项ID") | |||
private Long bidId; | |||
@ApiModelProperty(value = "标项创建时间") | |||
private LocalDateTime createOn; | |||
@ApiModelProperty(value = "标项名称") | |||
private String name; | |||
@@ -150,7 +150,7 @@ public class PurchaseController { | |||
@ApiOperation("新增系统(信创审符合性查信息)") | |||
@WebLog("新增系统(信创审符合性查信息)") | |||
@PostMapping("/add-system") | |||
public Long addSystem(@Validated @RequestBody XcfhxApplySaveDTO dto) { | |||
public Long addSystem(@Valid @RequestBody XcfhxApplySaveDTO dto) { | |||
return purchaseManage.addSystem(dto); | |||
} | |||
@@ -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,10 +2,9 @@ package com.hz.pm.api.projectdeclared.model.dto; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
@@ -16,7 +15,7 @@ import javax.validation.constraints.NotNull; | |||
*/ | |||
@Data | |||
@ApiModel(value = "信创审查对象", description = "采购对象") | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
public class XcfhxApplyEditDTO { | |||
@ApiModelProperty("系统名称") | |||
@NotNull(message = "编辑时id必传") | |||
@@ -2,8 +2,8 @@ package com.hz.pm.api.projectdeclared.model.dto; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
@@ -15,8 +15,8 @@ import javax.validation.constraints.NotNull; | |||
* @Author PoffyZhang | |||
*/ | |||
@Data | |||
@NoArgsConstructor | |||
@ApiModel(value = "信创审查对象", description = "采购对象") | |||
@AllArgsConstructor | |||
public class XcfhxApplySaveDTO { | |||
@ApiModelProperty("系统名称") | |||