From f26141d067e81417883ef40017dbf0afc65a8d1e Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 9 Dec 2024 15:58:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.=20=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E4=BF=A1=E5=88=9B=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E3=80=81=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/open/controller/OpenApiFileController.java | 51 ++++++++ .../controller/OpenApiProjectLibController.java | 13 +- .../hz/pm/api/open/manage/OpenApiFileManage.java | 49 ++++++++ .../api/open/manage/OpenApiProjectLibManage.java | 132 ++++++++++++++++++++- .../hz/pm/api/open/model/po/StrFileIdListReq.java | 29 +++++ .../pm/api/open/model/po/StrFileIdRepairReq.java | 22 ++++ .../com/hz/pm/api/open/model/po/StrFileIdReq.java | 28 +++++ .../pm/api/open/model/po/TenderSystemListReq.java | 26 ++++ .../pm/api/open/model/vo/TenderToMhDetailVO.java | 105 ++++++++++++++++ .../projectdeclared/helper/MhXchxFileHelper.java | 2 +- .../projectdeclared/manage/ConstructionManage.java | 4 +- .../api/projectdeclared/manage/PurchaseManage.java | 6 +- .../projectdeclared/model/entity/Operation.java | 3 - 13 files changed, 456 insertions(+), 14 deletions(-) create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiFileManage.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdListReq.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdRepairReq.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdReq.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderSystemListReq.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java new file mode 100644 index 0000000..866b125 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java @@ -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; + +/** + *

+ * OpenApiFileController + *

+ * + * @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 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); + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java index 7adb8e5..17144f2 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java @@ -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.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.TenderToMhDetailVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; 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 java.util.List; @@ -33,4 +38,10 @@ public class OpenApiProjectLibController { return openApiProjectLibManage.listDeclaredProjects(po); } + @PostMapping("/listTenders") + @ApiOperation("获取所有标项系统信息") + public List listTenders(@RequestBody @Valid TenderSystemListReq req) { + return openApiProjectLibManage.listTenders(req); + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiFileManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiFileManage.java new file mode 100644 index 0000000..cc47070 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiFileManage.java @@ -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; + +/** + *

+ * OpenApiFileManage + *

+ * + * @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 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 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); + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java index 19a8557..3e35c20 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/manage/OpenApiProjectLibManage.java @@ -1,16 +1,28 @@ package com.hz.pm.api.open.manage; +import cn.hutool.core.collection.CollUtil; 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.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.vo.DeclaredProjectInfoToMhVO; 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.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.ProjectGovSystemReplaceInfos; 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.IProjectService; 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.extern.slf4j.Slf4j; 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; /** @@ -36,14 +49,19 @@ import java.util.stream.Collectors; * @author WendyYang * @since 10:22 2024/11/7 */ +@Slf4j @Component @RequiredArgsConstructor public class OpenApiProjectLibManage { + private final FileService fileService; private final OpenApiCheckSignUtil openApiCheckSignUtil; private final IProjectService projectService; private final IProjectGovSystemReplaceInfosService systemReplaceInfosService; 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; } + private String collectFileStrIds(String fileCtx, List fileIds, Map fileIdMap) { + if (StrUtil.isNotBlank(fileCtx)) { + List 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 fileIdMap) { + List fileIds = BizUtils.splitToLong(content); + if (CollUtil.isNotEmpty(fileIds)) { + return CollUtils.joinByComma(fileIds, fileIdMap::get); + } + return StrUtil.EMPTY; + } + + public List listTenders(TenderSystemListReq req) { + openApiCheckSignUtil.checkSign(req.getKey()); + List purchases = purchaseService.list(); + if (purchases.isEmpty()) { + return Collections.emptyList(); + } + List bidIds = CollUtils.fieldList(purchases, Purchase::getId); + List systemReplaceInfos = systemReplaceInfosService.listByBidIds(bidIds); + Map> bidIdSystemIdMap = systemReplaceInfos.stream() + .filter(w -> StrUtil.isNotBlank(w.getSourceSystemId())) + .collect(Collectors.groupingBy(ProjectGovSystemReplaceInfos::getBidId, + Collectors.mapping(ProjectGovSystemReplaceInfos::getSourceSystemId, Collectors.toList()))); + // 合同信息 + List contracts = contractService.listByIds(bidIds); + Map contractMap = CollUtils.listToMap(contracts, Contract::getId); + // 实施信息 + List operations = operationService.listByBidIds(bidIds); + Map operationMap = CollUtils.listToMap(operations, Operation::getId); + + List fileIds = new ArrayList<>(); + Map fileIdMap = new HashMap<>(); + List 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 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; + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdListReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdListReq.java new file mode 100644 index 0000000..0c15727 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdListReq.java @@ -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; + +/** + *

+ * StrFileIdReq + *

+ * + * @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 strFileIds; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdRepairReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdRepairReq.java new file mode 100644 index 0000000..1f4a727 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdRepairReq.java @@ -0,0 +1,22 @@ +package com.hz.pm.api.open.model.po; + +import lombok.Data; + +import java.util.List; + +/** + *

+ * StrFileIdRepairReq + *

+ * + * @author WendyYang + * @since 14:40 2024/12/9 + */ +@Data +public class StrFileIdRepairReq { + + private String table; + + private List columns; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdReq.java new file mode 100644 index 0000000..ec8380d --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/StrFileIdReq.java @@ -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; + +/** + *

+ * StrFileIdReq + *

+ * + * @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; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderSystemListReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderSystemListReq.java new file mode 100644 index 0000000..ee2d581 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/po/TenderSystemListReq.java @@ -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; + +/** + *

+ * TenderSystemListReq + *

+ * + * @author WendyYang + * @since 11:36 2024/12/9 + */ +@Data +public class TenderSystemListReq { + + @ApiModelProperty("校验公钥") + @NotBlank(message = "秘钥不能为空") + private String key; + + @ApiModelProperty("项目年度") + private Integer projectYear; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java new file mode 100644 index 0000000..23d2651 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/open/model/vo/TenderToMhDetailVO.java @@ -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; + +/** + *

+ * TenderToMhDetailVO + *

+ * + * @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 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; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/helper/MhXchxFileHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/helper/MhXchxFileHelper.java index e00f9a1..40c3d50 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/helper/MhXchxFileHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/helper/MhXchxFileHelper.java @@ -36,7 +36,7 @@ public class MhXchxFileHelper { private final FileController fileController; - public String getXchxFile(String reportFile,String fileName) { + public String getXcfhxFile(String reportFile, String fileName) { if (StrUtils.isBlank(reportFile)) { throw BizException.wrap("信创报告文件不能为空"); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java index 307fdfb..4d70d2b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java @@ -615,7 +615,7 @@ public class ConstructionManage { throw BizException.wrap("该标段不支持提交信创符合性申请"); } - UserInfoDetails user = LoginUserUtil.userDetail(); + UserInfoDetails user = LoginUserUtil.userDetailNotNull(); WflowModels model = processModelManage.getWflowModelsNoNull(ProjectProcessType.XC_APPROVAL_PROCESS, user.getMhUnitId()); @@ -642,7 +642,7 @@ public class ConstructionManage { if (StrUtils.isBlank(purchase.getMhXcfhxReportFile()) || req.getMhXcfhxReportFile().equals(purchase.getMhXcfhxReportFile())) { String fileName = purchase.getBidName() + "-信创符合性测评报告."; - purchase.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(req.getMhXcfhxReportFile(), fileName)); + purchase.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(req.getMhXcfhxReportFile(), fileName)); } purchase.setMhXcfhxReportRecordId(req.getMhXcfhxReportRecordId()); purchase.setMhXcfhxReportFile(req.getMhXcfhxReportFile()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java index 5555dfb..0a9f5e3 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java @@ -1080,7 +1080,7 @@ public class PurchaseManage { if (Boolean.TRUE.equals(dto.getMatchXcfhx()) && StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; - xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); + xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(dto.getMhXcfhxReportFile(), fileName)); } if (xinchuangService.save(xinchuang)) { @@ -1097,7 +1097,7 @@ public class PurchaseManage { && StrUtils.isNotBlank(dto.getMhXcfhxReportFile()) && !dto.getMhXcfhxReportFile().equals(old.getMhXcfhxReportFile())) { String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; - xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); + xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXcfhxFile(dto.getMhXcfhxReportFile(), fileName)); } if (xinchuangService.updateById(xinchuang)) { return xinchuang.getId(); @@ -1106,7 +1106,7 @@ public class PurchaseManage { } public String xcfhxReportFiles(String code) { - return mhXchxFileHelper.getXchxFile(code, null); + return mhXchxFileHelper.getXcfhxFile(code, null); } public void exportXcfhFile(String code, HttpServletResponse response) throws UnsupportedEncodingException { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Operation.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Operation.java index 9af4140..a8d9702 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Operation.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Operation.java @@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import io.swagger.annotations.ApiOperation; -import lombok.AllArgsConstructor; import lombok.Data; -import lombok.NoArgsConstructor; import java.time.LocalDateTime;