From 0b2abc58445405263d4ce2cbabe76d153ea3023f Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 25 Jan 2024 11:30:09 +0800 Subject: [PATCH] =?UTF-8?q?#=E8=BF=90=E8=A1=8C=E6=9C=88=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/report/vo/AttributeVo.java | 22 ------- .../operational/report/vo/CurveAttributeVo.java | 25 -------- .../hzims/operational/report/vo/CurveDataVo.java | 30 ---------- .../hzims/operational/report/vo/CurveEchartVo.java | 30 ++++++++++ .../hnac/hzims/operational/report/vo/CurveVo.java | 20 ------- .../hzims/operational/report/vo/EchartValueVo.java | 23 +++++++ .../hnac/hzims/operational/report/vo/EchartVo.java | 21 +++++++ .../hzims/operational/report/vo/RunDataShowVo.java | 5 ++ .../service/operation/plate/DataService.java | 3 + .../operation/plate/impl/DataServiceImpl.java | 38 ++++++++++++ .../operation/report/impl/ReportServiceImpl.java | 70 ++++++++++++++-------- .../report/service/impl/RunMonthServiceImpl.java | 65 ++++++++++---------- .../repair/controller/WorkTaskController.java | 25 ++++---- 13 files changed, 210 insertions(+), 167 deletions(-) delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttributeVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveDataVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveEchartVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartValueVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java deleted file mode 100644 index e1f653d..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/AttributeVo.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.operational.report.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel("曲线对象") -public class AttributeVo { - - @ApiModelProperty("设备编码") - private String deviceCode; - - @ApiModelProperty("属性") - private String signage; - - @ApiModelProperty("属性名称") - private String signageName; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttributeVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttributeVo.java deleted file mode 100644 index 1d060e3..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveAttributeVo.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hnac.hzims.operational.report.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel("曲线对象") -public class CurveAttributeVo { - - - @ApiModelProperty("属性标识") - private String attribute; - - @ApiModelProperty("属性名称") - private String attributeName; - - @ApiModelProperty("曲线") - private List Curves; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveDataVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveDataVo.java deleted file mode 100644 index 17d80d6..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveDataVo.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.hnac.hzims.operational.report.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel("运行数据对象") -public class CurveDataVo { - - @ApiModelProperty("设备编码") - private String deviceCode; - - @ApiModelProperty("设备名称") - private String deviceName; - - @ApiModelProperty("负荷曲线") - private List loadCurve; - - @ApiModelProperty("轴承温度曲线") - private List bearingTempCurve; - - @ApiModelProperty("定子温度曲线") - private List statorTempCurve; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveEchartVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveEchartVo.java new file mode 100644 index 0000000..3e60f8c --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveEchartVo.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel("运行数据对象") +public class CurveEchartVo { + + @ApiModelProperty("设备编码") + private String deviceCode; + + @ApiModelProperty("设备名称") + private String deviceName; + + @ApiModelProperty("负荷曲线") + private List loadCurve; + + @ApiModelProperty("轴承温度曲线") + private List bearingTempCurve; + + @ApiModelProperty("定子温度曲线") + private List statorTempCurve; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveVo.java deleted file mode 100644 index 18299e7..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/CurveVo.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hnac.hzims.operational.report.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel("曲线对象") -public class CurveVo { - - - @ApiModelProperty("时间:day") - private String time; - - @ApiModelProperty("值") - private Double value; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartValueVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartValueVo.java new file mode 100644 index 0000000..3723afe --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartValueVo.java @@ -0,0 +1,23 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel("运行数据对象") +public class EchartValueVo { + + @ApiModelProperty("属性标识") + private String attribute; + + @ApiModelProperty("属性名称") + private String attributeName; + + @ApiModelProperty("值") + private Double value; + +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java new file mode 100644 index 0000000..4dfdfda --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/EchartVo.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.operational.report.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel("运行数据对象") +public class EchartVo { + + @ApiModelProperty("时间:day") + private String time; + + @ApiModelProperty("数据值对象") + List values; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java index 557ed07..49daf8c 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/vo/RunDataShowVo.java @@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * @author ysj */ @@ -29,4 +31,7 @@ public class RunDataShowVo extends RunMonthEntity { @ApiModelProperty("年计划完成率") private Double yearRate; + + @ApiModelProperty("曲线转换对象") + private List curveEcharts; } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java index b92f9b8..8f42cc0 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java @@ -3,6 +3,7 @@ package com.hnac.hzims.scheduled.service.operation.plate; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; +import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import org.springblade.core.tool.api.R; @@ -23,5 +24,7 @@ public interface DataService { List periodTargetData(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, String signages); + List periodTargetSignages(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, List signages); + Float periodTargetFloat(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, Integer ride ,String signages); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java index 8deff01..02cb9a6 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java @@ -113,6 +113,44 @@ public class DataServiceImpl implements DataService { * @param accessRules 取数规则 : 0=最早值 1=最大值 2=最小值 3=平均值 4=和值 5=差值 6=最新值 * @param cycleType 间隔周期 : 0-> 秒 1-> 分 2-> 小时 3->天 4-> 周 5-> 月 6-> 年 * @param deviceCode 设备编号 + * @param signages 指标集合 + * @return + */ + @Override + public List periodTargetSignages(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, List signages) { + AnalyseCodeByAnalyseDataPO po = new AnalyseCodeByAnalyseDataPO(); + List signboardConditions = new ArrayList<>(); + signages.forEach(signage->{ + AnalyzeDataConditionPO analyzeDataConditionPO = new AnalyzeDataConditionPO(); + analyzeDataConditionPO.setFull(1); + po.setDeviceCode(deviceCode); + analyzeDataConditionPO.setKeepFigures(2); + analyzeDataConditionPO.setAccessRules(accessRules); + analyzeDataConditionPO.setSaveTimeType(cycleType); + analyzeDataConditionPO.setSignages(signage); + // 间隔 + analyzeDataConditionPO.setTimeInterval(1); + analyzeDataConditionPO.setBeginTime(LocalDateTime.parse(DateUtil.format(new Date(), startTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME))); + analyzeDataConditionPO.setEndTime(LocalDateTime.parse(DateUtil.format(new Date(), endTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME))); + signboardConditions.add(analyzeDataConditionPO); + }); + po.setSignboardConditions(signboardConditions); + log.error("period_targets_data_request {}",po); + R> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); + if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { + return new ArrayList<>(); + } + log.error("period_targets_data_resp {}",result); + return result.getData(); + } + + /*** + * 指标数据列表查询 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @param accessRules 取数规则 : 0=最早值 1=最大值 2=最小值 3=平均值 4=和值 5=差值 6=最新值 + * @param cycleType 间隔周期 : 0-> 秒 1-> 分 2-> 小时 3->天 4-> 周 5-> 月 6-> 年 + * @param deviceCode 设备编号 * @param ride 配电比 * @param signages 指标 * @return 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 f0cb559..fc589d6 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 @@ -36,6 +36,7 @@ import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO; import com.hnac.hzinfo.datasearch.PointData; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; +import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO; import com.hnac.hzinfo.datasearch.history.IHistoryDataSearchClient; import com.hnac.hzinfo.datasearch.history.OriginalDataQuery; import com.hnac.hzinfo.datasearch.soe.ISoeClient; @@ -640,6 +641,7 @@ public class ReportServiceImpl implements ReportService { stations.forEach(station->{ RunMonthEntity run = new RunMonthEntity(); run.setStationCode(station.getCode()); + run.setStationName(station.getName()); Calendar calendar = Calendar.getInstance(); //calendar.setTime(new Date()); calendar.setTime(DateUtil.parse("2024-01-01 00:00:00",DateUtil.PATTERN_DATETIME)); @@ -885,6 +887,7 @@ public class ReportServiceImpl implements ReportService { alarm.setDeviceName(entry.getValue().get(0).getDeviceName()); alarm.setContent(entry.getKey()); alarm.setType(String.valueOf(AlarmConstants.FAULT)); + alarm.setTypeName("故障"); alarm.setCount(Math.max(entry.getValue().stream().filter(o->StringUtil.isNotBlank(o.getTraceCount())).mapToInt(soe->Integer.parseInt(soe.getTraceCount())).sum(), 1)); return alarm; }).collect(Collectors.toList()); @@ -908,12 +911,15 @@ public class ReportServiceImpl implements ReportService { if(!result.isSuccess() || ObjectUtil.isEmpty(result.getData()) || CollectionUtil.isEmpty(result.getData().getRecords())){ return new ArrayList<>(); } - return result.getData().getRecords().stream().collect(Collectors.groupingBy(StbAnalysisVO::getContent)).entrySet().stream().map(entry->{ + return result.getData().getRecords().stream().collect(Collectors.groupingBy(StbAnalysisVO::getName)).entrySet().stream().map(entry->{ RunAlarmVo alarm = new RunAlarmVo(); alarm.setAlarmTime(entry.getValue().stream().sorted(Comparator.comparing(StbAnalysisVO::getTs)).collect(Collectors.toList()).get(0).getTs()); alarm.setDeviceName(entry.getValue().get(0).getDevicename()); alarm.setContent(entry.getKey()); alarm.setType(String.valueOf(AlarmConstants.EARLY)); + alarm.setTypeName("智能预警"); + alarm.setReason(entry.getValue().get(0).getFinfo()); + alarm.setMemo(entry.getValue().get(0).getInfo()); alarm.setCount(entry.getValue().size()); return alarm; }).collect(Collectors.toList()); @@ -925,8 +931,8 @@ public class ReportServiceImpl implements ReportService { * @return */ private String curveData(List devices) { - List curveDatas = devices.stream().map(device->{ - CurveDataVo curveData = new CurveDataVo(); + List curveDatas = devices.stream().map(device->{ + CurveEchartVo curveData = new CurveEchartVo(); curveData.setDeviceCode(device.getNumber()); curveData.setDeviceName(device.getName()); // 负荷曲线 @@ -945,8 +951,10 @@ public class ReportServiceImpl implements ReportService { * @param attributes * @param deviceCode * @return + * + * */ - private List curve(List attributes, String deviceCode) { + private List curve(List attributes, String deviceCode) { Calendar calendar = Calendar.getInstance(); //calendar.setTime(new Date()); calendar.setTime(DateUtil.parse("2024-01-01 00:00:00",DateUtil.PATTERN_DATETIME)); @@ -958,33 +966,47 @@ public class ReportServiceImpl implements ReportService { calendar.add(Calendar.MINUTE, -calendar.get(Calendar.MINUTE)); calendar.add(Calendar.SECOND, -calendar.get(Calendar.SECOND)); String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); - List curveAttributes = new ArrayList<>(); - attributes.forEach(attribute -> { - CurveAttributeVo signage = new CurveAttributeVo(); - signage.setAttribute(attribute.getSignage()); - signage.setAttributeName(attribute.getSignageName()); - List records = dataService.periodTargetData(start,end,3,3,deviceCode,attribute.getSignage()); - if(CollectionUtil.isEmpty(records)){ + List datas = dataService.periodTargetSignages(start,end,3,3,deviceCode,attributes.stream().map(AttributeVo::getSignage).collect(Collectors.toList())); + if(CollectionUtil.isEmpty(datas)){ + return new ArrayList<>(); + } + List analyseDatas = new ArrayList<>(); + Calendar day = Calendar.getInstance(); + datas.forEach(data->{ + if(CollectionUtil.isEmpty(data.getList())){ return; } - signage.setCurves(records.stream().map(record -> { - CurveVo curve = new CurveVo(); - Date date = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); - if(date.getDate() > 9){ - curve.setTime("0" + date.getDay()); + analyseDatas.addAll(data.getList().stream().peek(item->{ + item.setSignage(data.getSignage()); + Date date = DateUtil.parse(item.getTs(), "yyyy-MM-dd HH:mm:ss.s"); + day.setTime(date); + if(day.get(Calendar.DAY_OF_MONTH) <= 9){ + item.setTs("0" + day.get(Calendar.DAY_OF_MONTH)); }else{ - curve.setTime(date.getDay() + ""); + item.setTs(day.get(Calendar.DAY_OF_MONTH) + ""); } - if(StringUtil.isEmpty(record.getVal())){ - curve.setValue(0.0); + }).collect(Collectors.toList())); + }); + if(CollectionUtil.isEmpty(analyseDatas)){ + return new ArrayList<>(); + } + Map> map = analyseDatas.stream().collect(Collectors.groupingBy(AnalyseDataTaosVO::getTs)); + return map.entrySet().stream().map(entry->{ + EchartVo echart = new EchartVo(); + echart.setTime(entry.getKey()); + echart.setValues(entry.getValue().stream().map(value->{ + EchartValueVo echartValue = new EchartValueVo(); + echartValue.setAttribute(value.getSignage()); + echartValue.setAttributeName(attributes.stream().filter(o->o.getSignage().equals(value.getSignage())).collect(Collectors.toList()).get(0).getSignageName()); + if(StringUtil.isEmpty(value.getVal())){ + echartValue.setValue(0.0); }else{ - curve.setValue(Double.valueOf(record.getVal())); + echartValue.setValue(Double.parseDouble(value.getVal())); } - return curve; + return echartValue; }).collect(Collectors.toList())); - curveAttributes.add(signage); - }); - return curveAttributes; + return echart; + }).sorted(Comparator.comparing(EchartVo::getTime)).collect(Collectors.toList()); } /** 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 f8909b0..e44e5bf 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 @@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hnac.hzims.operational.report.entity.RunMonthEntity; import com.hnac.hzims.operational.report.mapper.RunMonthMapper; import com.hnac.hzims.operational.report.service.RunMonthService; -import com.hnac.hzims.operational.report.vo.RunAlarmVo; -import com.hnac.hzims.operational.report.vo.RunDataShowVo; -import com.hnac.hzims.operational.report.vo.RunDataVo; +import com.hnac.hzims.operational.report.vo.*; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.*; @@ -33,7 +31,10 @@ import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; /** * @author ysj @@ -81,6 +82,7 @@ public class RunMonthServiceImpl extends BaseServiceImpl runData = JSONObject.parseObject(entity.getRunData(),new TypeReference>(){}); row = this.runDataFill(hssWB,sheet,row,runData); // 二、表头格式设置 this.titleHeader(hssWB, sheet,"2、告警报表",row); - row =+ 1; + row += 1; // 告警数据表头 this.alarmHeader(hssWB,sheet,row); - row =+ 1; + row += 1; // 告警数据填充 List runAlarm = JSONObject.parseObject(entity.getAlarmData(),new TypeReference>(){}); row = this.alarmDataFill(hssWB,sheet,row,runAlarm); // 三、表头格式设置 this.titleHeader(hssWB, sheet,"3、机组负荷、温度曲线",row); - row =+ 1; + row += 1; // 四、表头格式设置 this.titleHeader(hssWB, sheet,"4、运行数据分析",row); - row =+ 1; + row += 1; // 五、表头格式设置 this.titleHeader(hssWB, sheet,"5、运行建议及其他",row); - row =+ 1; + row += 1; return hssWB; } @@ -180,12 +182,12 @@ public class RunMonthServiceImpl extends BaseServiceImpl detail(@RequestParam Long id) { + return R.data(workTaskService.getById(id)); + } + + @GetMapping("/preview") + @ApiOperationSupport(order = 3) @ApiOperation(value = "工作任务单预览", notes = "工作任务单预览") public void preview(@RequestParam @ApiParam("工作任务单预览主键ID") @NotNull @Valid Long id) { workTaskService.preview(id); } @GetMapping("/workTicketList") - @ApiOperationSupport(order = 3) + @ApiOperationSupport(order = 4) @ApiOperation(value = "查询工作票") public R> workTicketList(@RequestParam(value = "ticketCode",required = false) String ticketCode) { return R.data(workTaskService.workTicketList(ticketCode)); } @PostMapping("/startProcess") - @ApiOperationSupport(order = 4) + @ApiOperationSupport(order = 5) @ApiOperation(value = "工作任务单") public R startV4(@RequestBody WorkTaskVO workTask) { return R.status(workTaskService.start(workTask));