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