Commit 005debe8 authored by KeYong's avatar KeYong

修改报表相关bug

parent 293f2be7
...@@ -20,11 +20,14 @@ import com.yeejoin.equipmanage.common.entity.AnalysisReportLog; ...@@ -20,11 +20,14 @@ import com.yeejoin.equipmanage.common.entity.AnalysisReportLog;
*/ */
public interface AnalysisReportLogMapper extends BaseMapper<AnalysisReportLog> { public interface AnalysisReportLogMapper extends BaseMapper<AnalysisReportLog> {
IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, @Param("analysisReportLog")AnalysisReportLogDto analysisReportLog); IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, @Param("analysisReportLog")AnalysisReportLogDto analysisReportLog,
@Param("rootParentId") Long rootParentId);
Map<String,Object> getStation(String stationCode); Map<String,Object> getStation(String stationCode);
Map<String, Object> getReport(@Param("analysisReportLog")AnalysisReportLogDto analysisReportLog); Map<String, Object> getReport(@Param("analysisReportLog")AnalysisReportLogDto analysisReportLog);
List<Map<String, Object>> getDefect(@Param("analysisReportLog")AnalysisReportLogDto analysisReportLog); List<Map<String, Object>> getDefect(@Param("analysisReportLog")AnalysisReportLogDto analysisReportLog);
Map<String, Object> getRootOrgUsr();
} }
package com.yeejoin.equipmanage.service.impl; package com.yeejoin.equipmanage.service.impl;
import java.awt.Color; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.awt.Font; import com.baomidou.mybatisplus.core.metadata.IPage;
import java.awt.RenderingHints; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.awt.image.BufferedImage; import com.github.xiaoymin.knife4j.core.util.StrUtil;
import java.io.File; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import java.io.FileInputStream; import com.yeejoin.amos.feign.systemctl.Systemctl;
import java.io.IOException; import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import java.math.BigDecimal; import com.yeejoin.equipmanage.common.dto.OrgUsrDto;
import java.text.NumberFormat; import com.yeejoin.equipmanage.common.entity.MyByteArrayMultipartFile;
import java.text.SimpleDateFormat; import com.yeejoin.equipmanage.common.enums.WordTemplateTypeEum;
import java.time.LocalDateTime; import com.yeejoin.equipmanage.common.exception.BaseException;
import java.time.format.DateTimeFormatter; import com.yeejoin.equipmanage.common.exception.CommonException;
import java.util.*; import com.yeejoin.equipmanage.common.utils.WordTemplateUtils;
import com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper;
import javax.servlet.http.HttpServletRequest; import com.yeejoin.equipmanage.service.IFirePatrolReportService;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.io.IOUtils;
import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities; import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart; import org.jfree.chart.JFreeChart;
...@@ -30,25 +26,23 @@ import org.jfree.data.general.DefaultPieDataset; ...@@ -30,25 +26,23 @@ import org.jfree.data.general.DefaultPieDataset;
import org.jfree.ui.RectangleEdge; import org.jfree.ui.RectangleEdge;
import org.jfree.ui.RectangleInsets; import org.jfree.ui.RectangleInsets;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.baomidou.mybatisplus.core.metadata.IPage; import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import javax.servlet.http.HttpServletResponse;
import com.github.xiaoymin.knife4j.core.util.StrUtil; import java.awt.*;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import java.awt.image.BufferedImage;
import com.yeejoin.amos.feign.systemctl.Systemctl; import java.io.File;
import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto; import java.io.FileInputStream;
import com.yeejoin.equipmanage.common.entity.AnalysisReportLog; import java.io.IOException;
import com.yeejoin.equipmanage.common.entity.MyByteArrayMultipartFile; import java.math.BigDecimal;
import com.yeejoin.equipmanage.common.enums.WordTemplateTypeEum; import java.text.NumberFormat;
import com.yeejoin.equipmanage.common.exception.BaseException; import java.text.SimpleDateFormat;
import com.yeejoin.equipmanage.common.exception.CommonException; import java.time.LocalDateTime;
import com.yeejoin.equipmanage.common.utils.WordTemplateUtils; import java.time.format.DateTimeFormatter;
import com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper; import java.util.List;
import com.yeejoin.equipmanage.service.IFirePatrolReportService; import java.util.*;
@Service @Service
public class FilePatrolReportServiceImpl implements IFirePatrolReportService { public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
...@@ -351,7 +345,8 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -351,7 +345,8 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
analysisReportLog.setEndDate(endDate); analysisReportLog.setEndDate(endDate);
analysisReportLog.setReportType(reportType); analysisReportLog.setReportType(reportType);
analysisReportLog.setStationCode(stationCode); analysisReportLog.setStationCode(stationCode);
return analysisReportLogMapper.allPage(page, analysisReportLog); Long rootParentId = Long.valueOf(String.valueOf(analysisReportLogMapper.getRootOrgUsr().get("sequence_nbr")));
return analysisReportLogMapper.allPage(page, analysisReportLog, rootParentId);
} }
@Override @Override
......
...@@ -739,9 +739,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -739,9 +739,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if (ValidationUtil.isEmpty(action.getAlamContent())) { if (ValidationUtil.isEmpty(action.getAlamContent())) {
action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName()); action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName());
} }
// 刷新跑马灯消息
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString()); mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
} else { } else {
equipmentAlarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), equipmentSpecificAlarmLogService)); equipmentAlarmLogs.addAll(upAlarmLogStatus(action.getIotCode(), action.getEquipmentSpecificIndexKey(), equipmentSpecificAlarmLogService));
// 刷新跑马灯消息
mqttSendGateway.sendToMqtt(TopicEnum.EQYQR.getTopic(), JSONArray.toJSON(action).toString()); mqttSendGateway.sendToMqtt(TopicEnum.EQYQR.getTopic(), JSONArray.toJSON(action).toString());
bool = Boolean.TRUE; bool = Boolean.TRUE;
} }
......
...@@ -555,25 +555,6 @@ ...@@ -555,25 +555,6 @@
<w:sz w:val="30"/> <w:sz w:val="30"/>
<w:sz-cs w:val="30"/> <w:sz-cs w:val="30"/>
</w:rPr> </w:rPr>
<w:sectPr>
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="1440" w:right="1803" w:bottom="1440" w:left="1803" w:header="851" w:footer="992" w:gutter="0"/>
<w:cols w:space="0"/>
<w:docGrid w:type="lines" w:line-pitch="319"/>
</w:sectPr>
</w:pPr>
</w:p>
</wx:sect>
<wx:sect>
<w:p>
<w:pPr>
<w:pStyle w:val="a7"/>
<w:ind w:first-line="0" w:first-line-chars="0"/>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:sz w:val="30"/>
<w:sz-cs w:val="30"/>
</w:rPr>
</w:pPr> </w:pPr>
<w:r> <w:r>
<w:rPr> <w:rPr>
......
...@@ -13,11 +13,10 @@ ...@@ -13,11 +13,10 @@
WHEN 1 THEN '周报表' WHEN 1 THEN '周报表'
ELSE '月报表' ELSE '月报表'
END) reportTypeName END) reportTypeName
FROM FROM
wl_analysis_report_log,cb_org_usr wl_analysis_report_log,cb_org_usr
<where> <where>
cb_org_usr.biz_org_type = 'COMPANY' AND parent_id IS NOT NULL cb_org_usr.biz_org_type = 'COMPANY' AND cb_org_usr.is_delete = 0 AND cb_org_usr.parent_id = #{rootParentId}
<if test="analysisReportLog.reportType != null"> <if test="analysisReportLog.reportType != null">
AND wl_analysis_report_log.report_type = #{analysisReportLog.reportType} AND wl_analysis_report_log.report_type = #{analysisReportLog.reportType}
</if> </if>
...@@ -88,4 +87,15 @@ ...@@ -88,4 +87,15 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getRootOrgUsr" resultType="Map">
SELECT
*
FROM
cb_org_usr
<where>
parent_id IS NULL
</where>
LIMIT 1
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment