Browse Source

#运行月报导出

zhongwei
yang_shj 7 months ago
parent
commit
8a5a301afd
  1. 3
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java
  2. 9
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java

3
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;

9
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<PlanGenerationEntity> plans = planService.planGeneration(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), null ,DateUtil.format(new Date(),"yyyy"));
// 查询站点设备
List<RideDeviceVo> devices = deviceService.rideDevices(stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList()));
List<RunMonthEntity> 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);
}
/**

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java

@ -342,7 +342,7 @@ public class RunMonthServiceImpl extends BaseServiceImpl<RunMonthMapper, RunMont
CellRangeAddress region2 = new CellRangeAddress(rowNumber, rowNumber, (short) 0, (short) 7);
sheet.addMergedRegion(region2);
}
rowNumber += 1;
for(int i = 0; i < 4;i++){
// 运行数据分析赋值
Row row = sheet.createRow(rowNumber + i);

Loading…
Cancel
Save