From 8a5a301afd91a4add02a1eb2eceb0d4481bac494 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 24 Apr 2024 11:24:49 +0800 Subject: [PATCH] =?UTF-8?q?#=E8=BF=90=E8=A1=8C=E6=9C=88=E6=8A=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/operational/report/entity/RunMonthEntity.java | 3 ++- .../service/operation/report/impl/ReportServiceImpl.java | 9 ++++++--- .../operational/report/service/impl/RunMonthServiceImpl.java | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java index 4e29738..a88c68b 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import org.springblade.core.tenant.mp.TenantEntity; /** * @author ysj @@ -14,7 +15,7 @@ import org.springblade.core.mp.base.BaseEntity; @EqualsAndHashCode(callSuper = true) @TableName("hzims_run_month_report") @ApiModel(value = "运行月报告表", description = "运行月报告实体类") -public class RunMonthEntity extends BaseEntity { +public class RunMonthEntity extends TenantEntity { @ApiModelProperty("站点编码") private String stationCode; diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java index 771db81..a5575fb 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java @@ -624,9 +624,12 @@ public class ReportServiceImpl implements ReportService { List plans = planService.planGeneration(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), null ,DateUtil.format(new Date(),"yyyy")); // 查询站点设备 List devices = deviceService.rideDevices(stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList())); - List runs = new ArrayList<>(); stations.forEach(station->{ RunMonthEntity run = new RunMonthEntity(); + run.setTenantId(station.getTenantId()); + run.setCreateDept(station.getRefDept()); + run.setCreateUser(station.getCreateUser()); + run.setUpdateUser(station.getUpdateUser()); run.setStationCode(station.getCode()); run.setStationName(station.getName()); Calendar calendar = Calendar.getInstance(); @@ -645,9 +648,9 @@ public class ReportServiceImpl implements ReportService { run.setCurveData(this.curveData(stationDevices)); // TODO 运行数据分析 // TODO 运行建议及其他 - runs.add(run); + runMonService.save(run); }); - runMonService.saveBatch(runs); + } /** diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java index c6d39e2..6e4a668 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java @@ -342,7 +342,7 @@ public class RunMonthServiceImpl extends BaseServiceImpl