From 0f985de2dd1f55d2670f170f9791759bb5ec2ee4 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 20 Sep 2024 11:05:32 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E5=8C=BA=E5=8E=BF=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=A4=87=E6=A1=88=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hz/pm/api/projectlib/manage/QxProjectImportManage.java | 9 +++++---- .../com/hz/pm/api/projectlib/model/req/QxProjectRecordReq.java | 4 ++++ .../main/java/com/hz/pm/api/projectlib/model/vo/QxProjectVO.java | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectImportManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectImportManage.java index 427d942..64f6390 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectImportManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectImportManage.java @@ -4,6 +4,7 @@ import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.NumberUtil; +import cn.hutool.json.JSONUtil; import cn.hutool.poi.excel.ExcelReader; import cn.hutool.poi.excel.ExcelUtil; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -91,20 +92,20 @@ public class QxProjectImportManage { String constructionFileIds = MapUtil.getStr(map, "建设方案附件(多附件逗号隔开)"); String[] split = constructionFileIds.split(","); if (split.length > 0) { - String fileIds = Arrays.stream(split).map(w -> { + List fileResults = Arrays.stream(split).map(w -> { File tmpFile = mhFileClient.downloadToTmpFile(w); try (FileInputStream inputStream = new FileInputStream(tmpFile)) { String mimeType = FileUtil.getMimeType(tmpFile.getPath()); MockMultipartFile multipartFile = new MockMultipartFile(tmpFile.getName(), tmpFile.getName(), mimeType, inputStream); ApiResponse fileRet = fileController.upload(multipartFile, "default"); - return fileRet.getData().getId().toString(); + return fileRet.getData(); } catch (Exception e) { throw BizException.wrap("建设方案上传失败"); } finally { tmpFile.deleteOnExit(); } - }).collect(Collectors.joining(",")); - project.setConstructionPlanFile(fileIds); + }).collect(Collectors.toList()); + project.setConstructionPlanFile(JSONUtil.toJsonStr(fileResults)); } projects.add(project); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/QxProjectRecordReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/QxProjectRecordReq.java index 5c75f86..27a7201 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/QxProjectRecordReq.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/QxProjectRecordReq.java @@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import java.math.BigDecimal; import java.util.List; /** @@ -52,4 +53,7 @@ public class QxProjectRecordReq { @ApiModelProperty("源系统ID") private List sourceSystemIds; + @ApiModelProperty("投资总额") + private BigDecimal totalInvest; + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/QxProjectVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/QxProjectVO.java index a39a33f..2af7eb4 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/QxProjectVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/QxProjectVO.java @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.time.LocalDateTime; /** @@ -56,4 +57,7 @@ public class QxProjectVO { @ApiModelProperty("创建时间") private LocalDateTime createOn; + @ApiModelProperty("投资总额") + private BigDecimal totalInvest; + }