@@ -0,0 +1,51 @@ | |||||
package com.hz.pm.api.open.controller; | |||||
import com.hz.pm.api.open.manage.OpenApiFileManage; | |||||
import com.hz.pm.api.open.model.po.StrFileIdListReq; | |||||
import com.hz.pm.api.open.model.po.StrFileIdReq; | |||||
import com.hz.pm.api.user.util.LoginUserUtil; | |||||
import com.ningdatech.file.entity.vo.result.AttachFileVo; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.util.Assert; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import javax.validation.Valid; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* OpenApiFileController | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 10:44 2024/12/9 | |||||
*/ | |||||
@RestController | |||||
@RequestMapping("/open/api/file") | |||||
@RequiredArgsConstructor | |||||
public class OpenApiFileController { | |||||
private final OpenApiFileManage openApiFileManage; | |||||
@GetMapping("/initStrId") | |||||
@ApiOperation(hidden = true, value = "初始化文件strId") | |||||
public void initStrId() { | |||||
Assert.isTrue(LoginUserUtil.isLogin(), "用户未登录"); | |||||
openApiFileManage.initStrId(); | |||||
} | |||||
@PostMapping("/listFileInfo") | |||||
@ApiOperation("获取文件基本信息") | |||||
public List<AttachFileVo> listFileBasicInfo(@Valid @RequestBody StrFileIdListReq req) { | |||||
return openApiFileManage.listFileInfo(req); | |||||
} | |||||
@PostMapping("/download") | |||||
@ApiOperation("文件下载") | |||||
public void download(@Valid @RequestBody StrFileIdReq req, HttpServletResponse response) throws Exception { | |||||
openApiFileManage.download(req, response); | |||||
} | |||||
} |
@@ -2,11 +2,16 @@ 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.vo.DeclaredProjectInfoToMhVO; | import com.hz.pm.api.open.model.vo.DeclaredProjectInfoToMhVO; | ||||
import com.hz.pm.api.open.model.vo.TenderToMhDetailVO; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.web.bind.annotation.*; | |||||
import org.springframework.web.bind.annotation.PostMapping; | |||||
import org.springframework.web.bind.annotation.RequestBody; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import javax.validation.Valid; | import javax.validation.Valid; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -33,4 +38,10 @@ public class OpenApiProjectLibController { | |||||
return openApiProjectLibManage.listDeclaredProjects(po); | return openApiProjectLibManage.listDeclaredProjects(po); | ||||
} | } | ||||
@PostMapping("/listTenders") | |||||
@ApiOperation("获取所有标项系统信息") | |||||
public List<TenderToMhDetailVO> listTenders(@RequestBody @Valid TenderSystemListReq req) { | |||||
return openApiProjectLibManage.listTenders(req); | |||||
} | |||||
} | } |
@@ -0,0 +1,49 @@ | |||||
package com.hz.pm.api.open.manage; | |||||
import cn.hutool.core.lang.UUID; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.hz.pm.api.open.model.po.StrFileIdListReq; | |||||
import com.hz.pm.api.open.model.po.StrFileIdReq; | |||||
import com.hz.pm.api.open.util.OpenApiCheckSignUtil; | |||||
import com.ningdatech.file.entity.File; | |||||
import com.ningdatech.file.entity.vo.result.AttachFileVo; | |||||
import com.ningdatech.file.service.FileService; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* OpenApiFileManage | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 10:46 2024/12/9 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class OpenApiFileManage { | |||||
private final FileService fileService; | |||||
private final OpenApiCheckSignUtil openApiCheckSignUtil; | |||||
public void initStrId() { | |||||
List<File> files = fileService.list(Wrappers.lambdaQuery(File.class) | |||||
.select(File::getId, File::getStrId)); | |||||
files.forEach(w -> w.setStrId(UUID.randomUUID().toString(true))); | |||||
fileService.updateBatchById(files); | |||||
} | |||||
public List<AttachFileVo> listFileInfo(StrFileIdListReq req) { | |||||
openApiCheckSignUtil.checkSign(req.getKey()); | |||||
return fileService.getByStrIds(req.getStrFileIds()); | |||||
} | |||||
public void download(StrFileIdReq req, HttpServletResponse response) throws Exception { | |||||
openApiCheckSignUtil.checkSign(req.getKey()); | |||||
fileService.download(req.getStrFileId(), response); | |||||
} | |||||
} |
@@ -1,16 +1,28 @@ | |||||
package com.hz.pm.api.open.manage; | package com.hz.pm.api.open.manage; | ||||
import cn.hutool.core.collection.CollUtil; | |||||
import cn.hutool.core.util.NumberUtil; | import cn.hutool.core.util.NumberUtil; | ||||
import cn.hutool.core.util.StrUtil; | import cn.hutool.core.util.StrUtil; | ||||
import cn.hutool.json.JSONUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; | import com.baomidou.mybatisplus.core.conditions.Wrapper; | ||||
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.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.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.util.OpenApiCheckSignUtil; | import com.hz.pm.api.open.util.OpenApiCheckSignUtil; | ||||
import com.hz.pm.api.projectdeclared.model.entity.Contract; | |||||
import com.hz.pm.api.projectdeclared.model.entity.Operation; | |||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | |||||
import com.hz.pm.api.projectdeclared.service.IContractService; | |||||
import com.hz.pm.api.projectdeclared.service.IOperationService; | |||||
import com.hz.pm.api.projectdeclared.service.IPurchaseService; | |||||
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil; | |||||
import com.hz.pm.api.projectlib.entity.MhSystemReplaceInfo; | import com.hz.pm.api.projectlib.entity.MhSystemReplaceInfo; | ||||
import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos; | import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos; | ||||
import com.hz.pm.api.projectlib.model.entity.Project; | import com.hz.pm.api.projectlib.model.entity.Project; | ||||
@@ -19,13 +31,14 @@ import com.hz.pm.api.projectlib.service.IMhSystemReplaceInfoService; | |||||
import com.hz.pm.api.projectlib.service.IProjectGovSystemReplaceInfosService; | import com.hz.pm.api.projectlib.service.IProjectGovSystemReplaceInfosService; | ||||
import com.hz.pm.api.projectlib.service.IProjectService; | import com.hz.pm.api.projectlib.service.IProjectService; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.file.entity.vo.result.AttachFileVo; | |||||
import com.ningdatech.file.entity.vo.result.FileResultVO; | |||||
import com.ningdatech.file.service.FileService; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.util.Collections; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.Optional; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
/** | /** | ||||
@@ -36,14 +49,19 @@ import java.util.stream.Collectors; | |||||
* @author WendyYang | * @author WendyYang | ||||
* @since 10:22 2024/11/7 | * @since 10:22 2024/11/7 | ||||
*/ | */ | ||||
@Slf4j | |||||
@Component | @Component | ||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
public class OpenApiProjectLibManage { | public class OpenApiProjectLibManage { | ||||
private final FileService fileService; | |||||
private final OpenApiCheckSignUtil openApiCheckSignUtil; | private final OpenApiCheckSignUtil openApiCheckSignUtil; | ||||
private final IProjectService projectService; | private final IProjectService projectService; | ||||
private final IProjectGovSystemReplaceInfosService systemReplaceInfosService; | private final IProjectGovSystemReplaceInfosService systemReplaceInfosService; | ||||
private final IMhSystemReplaceInfoService mhSystemReplaceInfoService; | private final IMhSystemReplaceInfoService mhSystemReplaceInfoService; | ||||
private final IPurchaseService purchaseService; | |||||
private final IContractService contractService; | |||||
private final IOperationService operationService; | |||||
/** | /** | ||||
* 获取已复核通过的项目列表 | * 获取已复核通过的项目列表 | ||||
@@ -145,4 +163,110 @@ public class OpenApiProjectLibManage { | |||||
return replaceType; | return replaceType; | ||||
} | } | ||||
private String collectFileStrIds(String fileCtx, List<Long> fileIds, Map<Long, String> fileIdMap) { | |||||
if (StrUtil.isNotBlank(fileCtx)) { | |||||
List<FileResultVO> fileRetList; | |||||
try { | |||||
fileRetList = JSONUtil.toList(fileCtx, FileResultVO.class); | |||||
} catch (Exception e) { | |||||
log.warn("文件ID解析异常:{}", fileCtx); | |||||
return StrUtil.EMPTY; | |||||
} | |||||
for (FileResultVO fileRet : fileRetList) { | |||||
if (StrUtil.isNotBlank(fileRet.getStrId())) { | |||||
fileIdMap.put(fileRet.getId(), fileRet.getStrId()); | |||||
} else { | |||||
fileIds.add(fileRet.getId()); | |||||
} | |||||
} | |||||
return CollUtils.joinByComma(fileRetList, FileResultVO::getId); | |||||
} | |||||
return StrUtil.EMPTY; | |||||
} | |||||
private String convertToFileStrId(String content, Map<Long, String> fileIdMap) { | |||||
List<Long> fileIds = BizUtils.splitToLong(content); | |||||
if (CollUtil.isNotEmpty(fileIds)) { | |||||
return CollUtils.joinByComma(fileIds, fileIdMap::get); | |||||
} | |||||
return StrUtil.EMPTY; | |||||
} | |||||
public List<TenderToMhDetailVO> listTenders(TenderSystemListReq req) { | |||||
openApiCheckSignUtil.checkSign(req.getKey()); | |||||
List<Purchase> purchases = purchaseService.list(); | |||||
if (purchases.isEmpty()) { | |||||
return Collections.emptyList(); | |||||
} | |||||
List<Long> bidIds = CollUtils.fieldList(purchases, Purchase::getId); | |||||
List<ProjectGovSystemReplaceInfos> systemReplaceInfos = systemReplaceInfosService.listByBidIds(bidIds); | |||||
Map<Long, List<String>> bidIdSystemIdMap = systemReplaceInfos.stream() | |||||
.filter(w -> StrUtil.isNotBlank(w.getSourceSystemId())) | |||||
.collect(Collectors.groupingBy(ProjectGovSystemReplaceInfos::getBidId, | |||||
Collectors.mapping(ProjectGovSystemReplaceInfos::getSourceSystemId, Collectors.toList()))); | |||||
// 合同信息 | |||||
List<Contract> contracts = contractService.listByIds(bidIds); | |||||
Map<Long, Contract> contractMap = CollUtils.listToMap(contracts, Contract::getId); | |||||
// 实施信息 | |||||
List<Operation> operations = operationService.listByBidIds(bidIds); | |||||
Map<Long, Operation> operationMap = CollUtils.listToMap(operations, Operation::getId); | |||||
List<Long> fileIds = new ArrayList<>(); | |||||
Map<Long, String> fileIdMap = new HashMap<>(); | |||||
List<TenderToMhDetailVO> collect = purchases.stream().map(w -> { | |||||
TenderToMhDetailVO tender = new TenderToMhDetailVO(); | |||||
tender.setBidId(w.getId()); | |||||
tender.setProjectCode(ProjectIdCodeCacheUtil.get(w.getProjectId())); | |||||
tender.setName(w.getBidName()); | |||||
tender.setBuyMain(String.valueOf(w.getPurchaseUnitId())); | |||||
tender.setBuildContent(w.getBidBuildContent()); | |||||
tender.setBudgetPrice(w.getBidBudget()); | |||||
tender.setBuyType(w.getPurchaseMethod()); | |||||
tender.setImplCompany(w.getSupplier()); | |||||
tender.setIsFinishLp(w.getHasSecurityEval()); | |||||
tender.setIsFinishXc(w.getMatchXcfhx()); | |||||
tender.setXcReportFiles(collectFileStrIds(w.getXcfhxReportFiles(), fileIds, fileIdMap)); | |||||
tender.setLpReportFiles(collectFileStrIds(w.getSecurityEvalMaterials(), fileIds, fileIdMap)); | |||||
tender.setSystemIdList(bidIdSystemIdMap.get(w.getId())); | |||||
Operation operation = operationMap.get(w.getId()); | |||||
if (operation != null) { | |||||
tender.setRefactorTime(operation.getAdaptationTime()); | |||||
} | |||||
BizUtils.notNull(w.getXcfhxEvalFinishDate(), ft -> tender.setXcCompleteTime(ft.atStartOfDay())); | |||||
BizUtils.notNull(w.getSecurityEvalDate(), ft -> tender.setLpCompleteTime(ft.atStartOfDay())); | |||||
BizUtils.notNull(w.getFinalInspectionDate(), ft -> tender.setFinalTime(ft.atStartOfDay())); | |||||
BizUtils.notNull(w.getPreliminaryInspectionDate(), ft -> tender.setInitialTime(ft.atStartOfDay())); | |||||
tender.setFinalReportFiles(collectFileStrIds(w.getFinalInspectionMaterials(), fileIds, fileIdMap)); | |||||
tender.setBidNotifyFiles(collectFileStrIds(w.getAcceptanceLetter(), fileIds, fileIdMap)); | |||||
tender.setBuyPlanFiles(collectFileStrIds(w.getBidDoc(), fileIds, fileIdMap)); | |||||
Contract contract = contractMap.get(w.getId()); | |||||
if (contract != null) { | |||||
tender.setBuyConFiles(collectFileStrIds(contract.getAttachment(), fileIds, fileIdMap)); | |||||
tender.setConSignTime(contract.getContractTime()); | |||||
tender.setImplCompanyPhone(contract.getSupplierContactInfo()); | |||||
tender.setImplCompanyPeople(contract.getSupplierContact()); | |||||
} | |||||
return tender; | |||||
}).collect(Collectors.toList()); | |||||
if (!fileIds.isEmpty()) { | |||||
List<AttachFileVo> byIds = fileService.getByIds(fileIds); | |||||
for (AttachFileVo byId : byIds) { | |||||
fileIdMap.put(byId.getFileId(), byId.getStrFileId()); | |||||
} | |||||
} | |||||
for (TenderToMhDetailVO w : collect) { | |||||
w.setXcReportFiles(convertToFileStrId(w.getXcReportFiles(), fileIdMap)); | |||||
w.setLpReportFiles(convertToFileStrId(w.getLpReportFiles(), fileIdMap)); | |||||
w.setFinalReportFiles(convertToFileStrId(w.getFinalReportFiles(), fileIdMap)); | |||||
w.setBidNotifyFiles(convertToFileStrId(w.getBidNotifyFiles(), fileIdMap)); | |||||
w.setBuyPlanFiles(convertToFileStrId(w.getBuyPlanFiles(), fileIdMap)); | |||||
w.setBuyConFiles(convertToFileStrId(w.getBuyConFiles(), fileIdMap)); | |||||
} | |||||
return collect; | |||||
} | |||||
} | } |
@@ -0,0 +1,29 @@ | |||||
package com.hz.pm.api.open.model.po; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | |||||
import javax.validation.constraints.NotEmpty; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* StrFileIdReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 11:36 2024/12/9 | |||||
*/ | |||||
@Data | |||||
public class StrFileIdListReq { | |||||
@ApiModelProperty("校验公钥") | |||||
@NotBlank(message = "秘钥不能为空") | |||||
private String key; | |||||
@ApiModelProperty("文件strId列表") | |||||
@NotEmpty(message = "文件strId列表不能为空") | |||||
private List<String> strFileIds; | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package com.hz.pm.api.open.model.po; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* StrFileIdRepairReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 14:40 2024/12/9 | |||||
*/ | |||||
@Data | |||||
public class StrFileIdRepairReq { | |||||
private String table; | |||||
private List<String> columns; | |||||
} |
@@ -0,0 +1,28 @@ | |||||
package com.hz.pm.api.open.model.po; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | |||||
import javax.validation.constraints.NotEmpty; | |||||
/** | |||||
* <p> | |||||
* StrFileIdReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 11:36 2024/12/9 | |||||
*/ | |||||
@Data | |||||
public class StrFileIdReq { | |||||
@ApiModelProperty("校验公钥") | |||||
@NotBlank(message = "秘钥不能为空") | |||||
private String key; | |||||
@ApiModelProperty("文件strId列表") | |||||
@NotEmpty(message = "文件strId不能为空") | |||||
private String strFileId; | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.hz.pm.api.open.model.po; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | |||||
/** | |||||
* <p> | |||||
* TenderSystemListReq | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 11:36 2024/12/9 | |||||
*/ | |||||
@Data | |||||
public class TenderSystemListReq { | |||||
@ApiModelProperty("校验公钥") | |||||
@NotBlank(message = "秘钥不能为空") | |||||
private String key; | |||||
@ApiModelProperty("项目年度") | |||||
private Integer projectYear; | |||||
} |
@@ -0,0 +1,105 @@ | |||||
package com.hz.pm.api.open.model.vo; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.math.BigDecimal; | |||||
import java.time.LocalDateTime; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* TenderToMhDetailVO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 09:12 2024/12/9 | |||||
*/ | |||||
@Data | |||||
public class TenderToMhDetailVO { | |||||
@ApiModelProperty(value = "项目编码") | |||||
private String projectCode; | |||||
@ApiModelProperty(value = "标项ID") | |||||
private Long bidId; | |||||
@ApiModelProperty(value = "标项名称") | |||||
private String name; | |||||
@ApiModelProperty(value = "标项预算(万元)") | |||||
private BigDecimal budgetPrice; | |||||
@ApiModelProperty(value = "采购方式") | |||||
private String buyType; | |||||
@ApiModelProperty(value = "采购主体") | |||||
private String buyMain; | |||||
@ApiModelProperty(value = "标项建设内容") | |||||
private String buildContent; | |||||
@ApiModelProperty(value = "系统ID列表") | |||||
private List<String> systemIdList; | |||||
@ApiModelProperty(value = "招标文件(附件)") | |||||
private String tenderFiles; | |||||
@ApiModelProperty(value = "实施公司") | |||||
private String implCompany; | |||||
@ApiModelProperty(value = "中标通知书(附件)") | |||||
private String bidNotifyFiles; | |||||
@ApiModelProperty("合同签订时间") | |||||
private LocalDateTime conSignTime; | |||||
@ApiModelProperty("合同金额(万元)") | |||||
private BigDecimal conPrice; | |||||
@ApiModelProperty("采购合同文件(附件)") | |||||
private String buyConFiles; | |||||
@ApiModelProperty("实施公司联系人") | |||||
private String implCompanyPeople; | |||||
@ApiModelProperty("联系方式") | |||||
private String implCompanyPhone; | |||||
@ApiModelProperty("采购方案(附件)") | |||||
private String buyPlanFiles; | |||||
@ApiModelProperty("改造开始时间") | |||||
private LocalDateTime refactorTime; | |||||
@ApiModelProperty("初验时间") | |||||
private LocalDateTime initialTime; | |||||
@ApiModelProperty("初验报告(附件") | |||||
private String initialReportFiles; | |||||
@ApiModelProperty("是否完成信创测评") | |||||
private Boolean isFinishXc; | |||||
@ApiModelProperty("信创测评完成时间") | |||||
private LocalDateTime xcCompleteTime; | |||||
@ApiModelProperty("信创测评报告(附件)") | |||||
private String xcReportFiles; | |||||
@ApiModelProperty("终验时间") | |||||
private LocalDateTime finalTime; | |||||
@ApiModelProperty("终验报告(附件)") | |||||
private String finalReportFiles; | |||||
@ApiModelProperty("是否完成等保测评") | |||||
private Boolean isFinishLp; | |||||
@ApiModelProperty("等保测评完成时间") | |||||
private LocalDateTime lpCompleteTime; | |||||
@ApiModelProperty("等保测评报告(附件)") | |||||
private String lpReportFiles; | |||||
} |
@@ -36,7 +36,7 @@ public class MhXchxFileHelper { | |||||
private final FileController fileController; | private final FileController fileController; | ||||
public String getXchxFile(String reportFile,String fileName) { | |||||
public String getXcfhxFile(String reportFile, String fileName) { | |||||
if (StrUtils.isBlank(reportFile)) { | if (StrUtils.isBlank(reportFile)) { | ||||
throw BizException.wrap("信创报告文件不能为空"); | throw BizException.wrap("信创报告文件不能为空"); | ||||
} | } | ||||
@@ -615,7 +615,7 @@ public class ConstructionManage { | |||||
throw BizException.wrap("该标段不支持提交信创符合性申请"); | throw BizException.wrap("该标段不支持提交信创符合性申请"); | ||||
} | } | ||||
UserInfoDetails user = LoginUserUtil.userDetail(); | |||||
UserInfoDetails user = LoginUserUtil.userDetailNotNull(); | |||||
WflowModels model = processModelManage.getWflowModelsNoNull(ProjectProcessType.XC_APPROVAL_PROCESS, | WflowModels model = processModelManage.getWflowModelsNoNull(ProjectProcessType.XC_APPROVAL_PROCESS, | ||||
user.getMhUnitId()); | user.getMhUnitId()); | ||||
@@ -642,7 +642,7 @@ public class ConstructionManage { | |||||
if (StrUtils.isBlank(purchase.getMhXcfhxReportFile()) || | if (StrUtils.isBlank(purchase.getMhXcfhxReportFile()) || | ||||
req.getMhXcfhxReportFile().equals(purchase.getMhXcfhxReportFile())) { | req.getMhXcfhxReportFile().equals(purchase.getMhXcfhxReportFile())) { | ||||
String fileName = purchase.getBidName() + "-信创符合性测评报告."; | String fileName = purchase.getBidName() + "-信创符合性测评报告."; | ||||
purchase.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(req.getMhXcfhxReportFile(), fileName)); | |||||
purchase.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(req.getMhXcfhxReportFile(), fileName)); | |||||
} | } | ||||
purchase.setMhXcfhxReportRecordId(req.getMhXcfhxReportRecordId()); | purchase.setMhXcfhxReportRecordId(req.getMhXcfhxReportRecordId()); | ||||
purchase.setMhXcfhxReportFile(req.getMhXcfhxReportFile()); | purchase.setMhXcfhxReportFile(req.getMhXcfhxReportFile()); | ||||
@@ -1080,7 +1080,7 @@ public class PurchaseManage { | |||||
if (Boolean.TRUE.equals(dto.getMatchXcfhx()) | if (Boolean.TRUE.equals(dto.getMatchXcfhx()) | ||||
&& StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { | && StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { | ||||
String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; | String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; | ||||
xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); | |||||
xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(dto.getMhXcfhxReportFile(), fileName)); | |||||
} | } | ||||
if (xinchuangService.save(xinchuang)) { | if (xinchuangService.save(xinchuang)) { | ||||
@@ -1097,7 +1097,7 @@ public class PurchaseManage { | |||||
&& StrUtils.isNotBlank(dto.getMhXcfhxReportFile()) && | && StrUtils.isNotBlank(dto.getMhXcfhxReportFile()) && | ||||
!dto.getMhXcfhxReportFile().equals(old.getMhXcfhxReportFile())) { | !dto.getMhXcfhxReportFile().equals(old.getMhXcfhxReportFile())) { | ||||
String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; | String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; | ||||
xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); | |||||
xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(dto.getMhXcfhxReportFile(), fileName)); | |||||
} | } | ||||
if (xinchuangService.updateById(xinchuang)) { | if (xinchuangService.updateById(xinchuang)) { | ||||
return xinchuang.getId(); | return xinchuang.getId(); | ||||
@@ -1106,7 +1106,7 @@ public class PurchaseManage { | |||||
} | } | ||||
public String xcfhxReportFiles(String code) { | public String xcfhxReportFiles(String code) { | ||||
return mhXchxFileHelper.getXchxFile(code, null); | |||||
return mhXchxFileHelper.getXcfhxFile(code, null); | |||||
} | } | ||||
public void exportXcfhFile(String code, HttpServletResponse response) throws UnsupportedEncodingException { | public void exportXcfhFile(String code, HttpServletResponse response) throws UnsupportedEncodingException { | ||||
@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.NoArgsConstructor; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||