Commit 54b8ebc1 authored by KeYong's avatar KeYong

Merge branch 'develop_dl_plan6' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6

parents dbedd5cf 66fdf612
...@@ -79,7 +79,7 @@ public class ControllerAop { ...@@ -79,7 +79,7 @@ public class ControllerAop {
// 不需要添加请求头的接口 // 不需要添加请求头的接口
String[] url = new String[]{"/api/user/save/curCompany", "/jcs/command/lookHtmlText", String[] url = new String[]{"/api/user/save/curCompany", "/jcs/command/lookHtmlText",
"/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo", "/jcs/common/duty-person/findByDutyAreaId", "/tzs/wechatBack", "/tzs/elevator/getElevatorInfo",
"/openapi/bizToken/applyToken"}; "/openapi/bizToken/applyToken","/fire-patrol-report/download","/fire-patrol-report/allPage"};
// 获取请求路径 // 获取请求路径
for (String uri : url) { for (String uri : url) {
if (request.getRequestURI().indexOf(uri) != -1) { if (request.getRequestURI().indexOf(uri) != -1) {
......
...@@ -8,10 +8,12 @@ import lombok.Data; ...@@ -8,10 +8,12 @@ import lombok.Data;
public class AnalysisReportLogDto extends AnalysisReportLog{ public class AnalysisReportLogDto extends AnalysisReportLog{
private static final long serialVersionUID = 214456306850625504L; private static final long serialVersionUID = 214456306850625504L;
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "换流站编码")
String reportName; private String stationCode;
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "报告名称")
String stationName; private String reportName;
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "换流站名称")
String reportTypeName; private String stationName;
@ApiModelProperty(value = "报告类型名称")
private String reportTypeName;
} }
...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.common.entity; ...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.common.entity;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField; import com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField;
import com.yeejoin.equipmanage.common.entity.publics.BaseEntity; import com.yeejoin.equipmanage.common.entity.publics.BaseEntity;
...@@ -46,5 +47,4 @@ public class AnalysisReportLog extends BaseEntity { ...@@ -46,5 +47,4 @@ public class AnalysisReportLog extends BaseEntity {
@ApiModelProperty(value = "结束时间") @ApiModelProperty(value = "结束时间")
private Date endDate; private Date endDate;
} }
package com.yeejoin.equipmanage.common.utils; package com.yeejoin.equipmanage.common.utils;
import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.Writer; import java.io.Writer;
import java.net.URL; import java.net.URL;
...@@ -13,17 +15,18 @@ import java.net.URLEncoder; ...@@ -13,17 +15,18 @@ import java.net.URLEncoder;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import javax.annotation.PostConstruct;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value; import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.http.MediaType;
import freemarker.template.Configuration; import freemarker.template.Configuration;
import freemarker.template.Template; import freemarker.template.Template;
import net.bytebuddy.asm.Advice.This;
import sun.misc.BASE64Encoder; import sun.misc.BASE64Encoder;
public class WordTemplateUtils { public class WordTemplateUtils {
...@@ -93,6 +96,37 @@ public class WordTemplateUtils { ...@@ -93,6 +96,37 @@ public class WordTemplateUtils {
file.delete(); }// 删除临时文件 file.delete(); }// 删除临时文件
} }
} }
public FileItem getWordFileItem(Map map,String title,String ftlFile) throws IOException {
URL resourcePath = this.getClass().getClassLoader().getResource("ftl");
configuration.setDirectoryForTemplateLoading(new File(resourcePath.getPath()));
Template freemarkerTemplate = configuration.getTemplate(ftlFile);
FileItemFactory factory = new DiskFileItemFactory(16, null);
String textFieldName = "file";
FileItem item = factory.createItem(textFieldName, MediaType.MULTIPART_FORM_DATA_VALUE, true, title);
File file = null;
int bytesRead = 0;
byte[] buffer = new byte[10 * 1024 * 1024];
InputStream fin = null;
OutputStream os = null;
try {
// 调用工具类的createDoc方法生成Word文档
file = createDoc(map, freemarkerTemplate);
fin = new FileInputStream(file);
os = item.getOutputStream();
while ((bytesRead = fin.read(buffer,0,8192)) != -1) {
os.write(buffer,0,bytesRead);
}
return item;
} finally {
if (fin != null){
fin.close();}
if (os != null){
os.close();}
if (file != null){
file.delete(); }// 删除临时文件
}
}
private static File createDoc(Map<?, ?> dataMap, Template template) { private static File createDoc(Map<?, ?> dataMap, Template template) {
String name = "sellPlan.doc"; String name = "sellPlan.doc";
...@@ -109,7 +143,53 @@ public class WordTemplateUtils { ...@@ -109,7 +143,53 @@ public class WordTemplateUtils {
} }
return f; return f;
} }
public boolean wordTopdfByAspose(InputStream inputStream, OutputStream outputStream) {
// 验证License 若不验证则转化出的pdf文档会有水印产生
if (!getLicense()) {
return false;
}
try {
// 将源文件保存在com.aspose.words.Document中,具体的转换格式依靠里面的save方法
com.aspose.words.Document doc = new com.aspose.words.Document(inputStream);
// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,EPUB, XPS, SWF 相互转换
doc.save(outputStream, SaveFormat.PDF);
} catch (Exception e) {
e.printStackTrace();
return false;
}finally {
if (outputStream != null) {
try {
outputStream.flush();
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return true;
}
// 官方文档的要求 无需理会
public static boolean getLicense() {
boolean result = false;
try {
String s = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
ByteArrayInputStream is = new ByteArrayInputStream(s.getBytes());
License aposeLic = new License();
aposeLic.setLicense(is);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
// 获得图片的base64码 // 获得图片的base64码
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public String getImageBase(String src) { public String getImageBase(String src) {
......
package com.yeejoin.equipmanage.controller; package com.yeejoin.equipmanage.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -17,6 +19,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -17,6 +19,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto; import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import com.yeejoin.equipmanage.common.entity.AnalysisReportLog;
import com.yeejoin.equipmanage.service.IFirePatrolReportService; import com.yeejoin.equipmanage.service.IFirePatrolReportService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -41,18 +44,43 @@ public class FirePatrolReportController { ...@@ -41,18 +44,43 @@ public class FirePatrolReportController {
@GetMapping(value = "/download") @GetMapping(value = "/download")
@TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false) @TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
public void download(HttpServletRequest request, HttpServletResponse response, public void download(HttpServletRequest request, HttpServletResponse response,
@ApiParam(value = "换流站编码", required = true) @RequestParam String code, @ApiParam(value = "换流站编码", required = true) @RequestParam String stationCode,
@ApiParam(value = "开始日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate, @ApiParam(value = "开始日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate,
@ApiParam(value = "结束日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate) { @ApiParam(value = "结束日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate) {
iFirePatrolReportService.download(request, response, code, startDate, endDate); iFirePatrolReportService.download(request, response, stationCode, startDate, endDate);
} }
@ApiOperation(value = "预览报表", notes = "预览报表")
@GetMapping(value = "/preview")
@TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
public String preview(
@ApiParam(value = "换流站编码", required = true) @RequestParam String stationCode,
@ApiParam(value = "开始日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate,
@ApiParam(value = "结束日期", required = true) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate) {
return iFirePatrolReportService.preview(stationCode, startDate, endDate);
}
@SuppressWarnings("unchecked")
@ApiOperation(value = "所有站查询列表", notes = "所有站查询列表") @ApiOperation(value = "所有站查询列表", notes = "所有站查询列表")
@GetMapping(value = "/all-page") @GetMapping(value = "/allPage")
@TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false) @TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
public IPage<AnalysisReportLogDto> allPage(Page page, @RequestParam Integer reportType, public IPage<AnalysisReportLogDto> allPage(Page page, @RequestParam Integer reportType,
@ApiParam(value = "开始日期", required = false) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate, @ApiParam(value = "开始日期", required = false) @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate,
@ApiParam(value = "结束日期", required = false) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate) { @ApiParam(value = "结束日期", required = false) @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate,
return iFirePatrolReportService.allPage(page,reportType, startDate, endDate); @ApiParam(value = "换流站编码", required = false) @RequestParam(required = false) String stationCode) {
return iFirePatrolReportService.allPage(page,reportType, startDate, endDate,stationCode);
} }
// /**
// * 分页接口
// */
// @ApiOperation(httpMethod = "GET", value = "单站查询列表", notes = "单站查询列表")
// @GetMapping(value = "/listPage")
// @TycloudOperation(ApiLevel = UserType.PUBLIC, needAuth = false)
// public IPage<AnalysisReportLog> listPage(Page page, @RequestParam Integer reportType,
// @ApiParam(value = "开始日期", required = false) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date startDate,
// @ApiParam(value = "结束日期", required = false) @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date endDate,
// @RequestParam String stationCode) throws ParseException {
// return iFirePatrolReportService.listPage(page,reportType, startDate, endDate,stationCode);
// }
} }
package com.yeejoin.equipmanage.mapper; package com.yeejoin.equipmanage.mapper;
import java.util.Date; import java.util.Date;
import java.util.Map;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -19,5 +20,7 @@ import com.yeejoin.equipmanage.common.entity.AnalysisReportLog; ...@@ -19,5 +20,7 @@ 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")AnalysisReportLog analysisReportLog); IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, @Param("analysisReportLog")AnalysisReportLog analysisReportLog);
Map<String,Object> getStation(String stationCode);
} }
...@@ -14,7 +14,9 @@ public interface IFirePatrolReportService { ...@@ -14,7 +14,9 @@ public interface IFirePatrolReportService {
void download(HttpServletRequest request, HttpServletResponse response,String code,Date startDate,Date endDate); void download(HttpServletRequest request, HttpServletResponse response,String code,Date startDate,Date endDate);
IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, Integer reportType,Date startDate,Date endDate); String preview(String code,Date startDate,Date endDate);
IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, Integer reportType,Date startDate,Date endDate,String stationCode);
//IPage<AnalysisReportLogDto> listPage(Page<AnalysisReportLogDto> page, Integer reportType,Date startDate,Date endDate,String stationCode);
} }
...@@ -18,24 +18,30 @@ import java.util.Map; ...@@ -18,24 +18,30 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
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;
import org.jfree.chart.StandardChartTheme; import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.labels.StandardPieSectionLabelGenerator; import org.jfree.chart.labels.StandardPieSectionLabelGenerator;
import org.jfree.chart.plot.PiePlot; import org.jfree.chart.plot.PiePlot;
import org.jfree.chart.title.LegendTitle;
import org.jfree.data.general.DefaultPieDataset; 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.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.core.util.StrUtil; import com.github.xiaoymin.knife4j.core.util.StrUtil;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto; import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import com.yeejoin.equipmanage.common.entity.AnalysisReportLog;
import com.yeejoin.equipmanage.common.enums.WordTemplateTypeEum; import com.yeejoin.equipmanage.common.enums.WordTemplateTypeEum;
import com.yeejoin.equipmanage.common.exception.BaseException;
import com.yeejoin.equipmanage.common.exception.CommonException; import com.yeejoin.equipmanage.common.exception.CommonException;
import com.yeejoin.equipmanage.common.utils.WordTemplateUtils; import com.yeejoin.equipmanage.common.utils.WordTemplateUtils;
import com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper; import com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper;
...@@ -46,18 +52,37 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -46,18 +52,37 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
@Autowired @Autowired
AnalysisReportLogMapper analysisReportLogMapper; AnalysisReportLogMapper analysisReportLogMapper;
@Override @Override
public void download(HttpServletRequest request, HttpServletResponse response, String code, Date startDate, public void download(HttpServletRequest request, HttpServletResponse response, String code, Date startDate,
Date endDate) { Date endDate) {
WordTemplateUtils instance = WordTemplateUtils.getInstance(); WordTemplateUtils instance = WordTemplateUtils.getInstance();
Map<String, Object> map = getWordMap(code, startDate, endDate);
try {
instance.exportMillCertificateWord(request, response, map, (String) map.get("document_number"),
WordTemplateTypeEum.firePatrolReport.getTemplateFile());
} catch (IOException e) {
throw new CommonException(0, "下载装备巡查报表失败");
}
}
private Map<String, Object> getWordMap(String code, Date startDate,
Date endDate)
{
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
// 查询换流站
Map<String, Object> station = analysisReportLogMapper.getStation(code);
if(station==null||station.isEmpty())
{
throw new BaseException("换流站编码不存在");
}
// 文档编号 // 文档编号
String timeStr1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); String timeStr1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
String documentNumber = "ZD-XFSBXC" + timeStr1; String documentNumber = "ZD-XFSBXC" + timeStr1;
map.put("document_number", documentNumber); map.put("document_number", documentNumber);
// 换流站名称 // 换流站名称
map.put("station_name", "测试"); String stationName=(String) station.get("biz_org_name");
map.put("station_name", stationName);
// 统计时间 // 统计时间
SimpleDateFormat dateStat = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat dateStat = new SimpleDateFormat("yyyy年MM月dd日");
String statisticalTime = dateStat.format(startDate) + "-" + dateStat.format(endDate); String statisticalTime = dateStat.format(startDate) + "-" + dateStat.format(endDate);
...@@ -73,35 +98,50 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -73,35 +98,50 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
SimpleDateFormat dateFm = new SimpleDateFormat("EEEE"); SimpleDateFormat dateFm = new SimpleDateFormat("EEEE");
String currSun = dateFm.format(new Date()); String currSun = dateFm.format(new Date());
map.put("create_date", timeStr2 + currSun); map.put("create_date", timeStr2 + currSun);
map.put("create_date2", timeStr2);
// 统计时间2 // 统计时间2
map.put("statistical_time2", statisticalTime.replaceAll("-", "至")); map.put("statistical_time2", statisticalTime.replaceAll("-", "至"));
// 巡查任务数 // 巡查任务数
map.put("task_count", "10"); map.put("task_count", "10");
// 完成任务数 // 完成任务数
map.put("complete_task_count", "5"); map.put("complete_task_count", "5");
int uncomplete_task_count = 2;
// 未完成任务数 // 未完成任务数
map.put("uncomplete_task_count", "2"); map.put("uncomplete_task_count", uncomplete_task_count);
double complete_task_percent = 0.4;
// 任务完成率 // 任务完成率
map.put("complete_task_percent", "40%"); map.put("complete_task_percent", "40%");
// 任务合格
map.put("task_qualified", uncomplete_task_count!=0?"不合格":"合格");
// 任务完成率合格
map.put("task_percent_qualified", complete_task_percent!=1?"不合格":"合格");
// 巡查人员数 // 巡查人员数
map.put("person_count", "5"); map.put("person_count", "5");
// 持证人员数 // 持证人员数
map.put("certified_person_count", "3"); map.put("certified_person_count", "3");
double certified_percent = 0.6;
// 持证率 // 持证率
map.put("certified_percent", "60%"); map.put("certified_percent", "60%");
// 人员合格
map.put("person_qualified", certified_percent!=1?"不合格":"合格");
// 应巡查设备总数 // 应巡查设备总数
map.put("equipment_count", "12"); int equipment_count = 12;
map.put("equipment_count", equipment_count);
int checked_equipment_count = 7; int checked_equipment_count = 7;
// 实际巡查设备总数 // 实际巡查设备总数
map.put("checked_equipment_count", checked_equipment_count); map.put("checked_equipment_count", checked_equipment_count);
int unchecked_equipment_count = 5; // 实际巡查设备总数-合格
map.put("checked_equipment_qualified", checked_equipment_count!=equipment_count?"不合格":"合格");
// 漏查设备总数 // 漏查设备总数
int unchecked_equipment_count = 5;
map.put("unchecked_equipment_count", unchecked_equipment_count); map.put("unchecked_equipment_count", unchecked_equipment_count);
// 漏查设备总数-合格
map.put("unchecked_equipment_qualified", unchecked_equipment_count>0?"不合格":"合格");
// 发现问题总数 // 发现问题总数
map.put("problem_count", "5"); map.put("problem_count", "5");
// 发现问题总数 // 修复问题总数
map.put("fixed_problem_count", "3"); map.put("fixed_problem_count", "3");
// 发现问题总数 // 未修复问题总数
map.put("unfixed_problem_count", "2"); map.put("unfixed_problem_count", "2");
// 巡查点位数 // 巡查点位数
map.put("checked_location_count", "2"); map.put("checked_location_count", "2");
...@@ -115,99 +155,122 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -115,99 +155,122 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
DefaultPieDataset pds = new DefaultPieDataset(); DefaultPieDataset pds = new DefaultPieDataset();
pds.setValue("合格", qualified); pds.setValue("合格", qualified);
pds.setValue("不合格", no_qualified); pds.setValue("不合格", no_qualified);
String qualified_pie_chart = getChartString(pds,"合格情况占比"); String qualified_pie_chart = getChartString(pds, "合格情况占比");
map.put("qualified_pie_chart", qualified_pie_chart); map.put("qualified_pie_chart", qualified_pie_chart);
// 设备巡查饼图 // 设备巡查饼图
DefaultPieDataset pds2 = new DefaultPieDataset(); DefaultPieDataset pds2 = new DefaultPieDataset();
pds2.setValue("已查询设备", checked_equipment_count); pds2.setValue("已查询设备", checked_equipment_count);
pds2.setValue("漏查设备", unchecked_equipment_count); pds2.setValue("漏查设备", unchecked_equipment_count);
String equip_pie_chart = getChartString(pds2,"设备巡查占比"); String equip_pie_chart = getChartString(pds2, "设备巡查占比");
map.put("equip_pie_chart", equip_pie_chart); map.put("equip_pie_chart", equip_pie_chart);
// 业务主题 // 业务主题
map.put("business_title", "消防巡查"); map.put("business_title", "消防巡查");
// 缺陷清单 // 缺陷清单
List<Map<String,Object>> defect_list = new ArrayList<>(); List<Map<String, Object>> defect_list = new ArrayList<>();
Map<String,Object> defectMap = new HashMap<>(); Map<String, Object> defectMap = new HashMap<>();
defectMap.put("defect_location", "主控楼一层"); defectMap.put("defect_location", "主控楼一层");
defectMap.put("defect_description", "仅有一条疏散通道,存在重大火灾隐患,不满足规范要求。"); defectMap.put("defect_description", "仅有一条疏散通道,存在重大火灾隐患,不满足规范要求。");
defectMap.put("rectified_progress", "待评审"); defectMap.put("rectified_progress", "待评审");
defectMap.put("remark", "无法整改"); defectMap.put("remark", "无法整改");
defect_list.add(defectMap); defect_list.add(defectMap);
Map<String,Object> defectMap2 = new HashMap<>(); Map<String, Object> defectMap2 = new HashMap<>();
defectMap2.put("defect_location", "主控楼一层"); defectMap2.put("defect_location", "主控楼一层");
defectMap2.put("defect_description", "防火卷帘门故障;11个水泵接合器存在问题;"); defectMap2.put("defect_description", "防火卷帘门故障;11个水泵接合器存在问题;");
defectMap2.put("rectified_progress", "待治理"); defectMap2.put("rectified_progress", "待治理");
defectMap2.put("remark", "防火卷帘已完成维修,水泵接合器未整改"); defectMap2.put("remark", "防火卷帘已完成维修,水泵接合器未整改");
defect_list.add(defectMap2); defect_list.add(defectMap2);
Map<String,Object> defectMap3 = new HashMap<>(); Map<String, Object> defectMap3 = new HashMap<>();
defectMap3.put("defect_location", "主控楼一层库房区域"); defectMap3.put("defect_location", "主控楼一层库房区域");
defectMap3.put("defect_description", "将办公用房作为库房使用,使用性质与原设计不符,耐火等级和相应消防设施不满足规范要求。"); defectMap3.put("defect_description", "将办公用房作为库房使用,使用性质与原设计不符,耐火等级和相应消防设施不满足规范要求。");
defectMap3.put("rectified_progress", "治理完毕"); defectMap3.put("rectified_progress", "治理完毕");
defectMap3.put("remark", ""); defectMap3.put("remark", "");
defect_list.add(defectMap3); defect_list.add(defectMap3);
map.put("defect_list", defect_list); map.put("defect_list", defect_list);
try { return map;
instance.exportMillCertificateWord(request, response, map, documentNumber,
WordTemplateTypeEum.firePatrolReport.getTemplateFile());
} catch (IOException e) {
throw new CommonException(0, "下载装备巡查报表失败");
}
} }
/** /**
* 生成主题 * 生成主题
* *
* @param fontName 字体名称(默认为宋体) * @param fontName 字体名称(默认为宋体)
* @return * @return
*/ */
public static StandardChartTheme createChartTheme(String fontName) { public static StandardChartTheme createChartTheme(String fontName) {
StandardChartTheme theme = new StandardChartTheme("unicode") { StandardChartTheme theme = new StandardChartTheme("unicode") {
public void apply(JFreeChart chart) { public void apply(JFreeChart chart) {
chart.getRenderingHints().put(RenderingHints.KEY_TEXT_ANTIALIASING, chart.getRenderingHints().put(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
super.apply(chart); super.apply(chart);
} }
}; };
fontName = StrUtil.isBlank(fontName) ? "宋体" : fontName; fontName = StrUtil.isBlank(fontName) ? "宋体" : fontName;
theme.setExtraLargeFont(new Font(fontName, Font.PLAIN, 20)); theme.setExtraLargeFont(new Font(fontName, Font.PLAIN, 20));
theme.setLargeFont(new Font(fontName, Font.PLAIN, 14)); theme.setLargeFont(new Font(fontName, Font.PLAIN, 14));
theme.setRegularFont(new Font(fontName, Font.PLAIN, 12)); theme.setRegularFont(new Font(fontName, Font.PLAIN, 12));
theme.setSmallFont(new Font(fontName, Font.PLAIN, 10)); theme.setSmallFont(new Font(fontName, Font.PLAIN, 10));
return theme; return theme;
} }
/** /**
* 获取饼图base64字符串 * 获取饼图base64字符串
*
* @param pds * @param pds
* @return * @return
*/ */
private String getChartString(DefaultPieDataset pds,String title) { private String getChartString(DefaultPieDataset pds, String title) {
//设置主题 要不会乱码 // 设置主题 要不会乱码
ChartFactory.setChartTheme(createChartTheme("微软雅黑")); ChartFactory.setChartTheme(createChartTheme("微软雅黑"));
JFreeChart chart = ChartFactory.createPieChart(title, pds, true, false, true); JFreeChart chart = ChartFactory.createPieChart(title, pds, true, false, true);
chart.getLegend().setPosition(RectangleEdge.BOTTOM); // 设置图例
RectangleInsets padding = new RectangleInsets(20,20,20,20); LegendTitle legend = chart.getLegend();
legend.setPosition(RectangleEdge.BOTTOM);
// 设置图例边框
legend.setBorder(0, 0, 0, 0);
legend.setItemFont(new Font("微软雅黑", Font.PLAIN, 16));
// 设置最外层边框
chart.setBorderVisible(false);
RectangleInsets padding = new RectangleInsets(40, 40, 40, 40);
chart.setPadding(padding); chart.setPadding(padding);
// 如果不使用Font,中文将显示不出来 // 如果不使用Font,中文将显示不出来
Font font = new Font("微软雅黑", Font.BOLD, 16);
// 设置图片标题的字体 // 设置图片标题的字体
chart.getTitle().setFont(font); chart.getTitle().setFont(new Font("微软雅黑", Font.BOLD, 24));
// 得到图块,准备设置标签的字体 // 得到图块,准备设置标签的字体
PiePlot plot = (PiePlot) chart.getPlot(); PiePlot plot = (PiePlot) chart.getPlot();
// 设置标签字体 // 设置饼图阴影
plot.setLabelFont(font); plot.setShadowPaint(Color.WHITE);
plot.setStartAngle(180); plot.setAutoPopulateSectionOutlinePaint(true);
plot.setSectionPaint(pds.getKey(0),Color.RED); // 设置饼图边框
plot.setSectionPaint(pds.getKey(1),Color.BLUE); plot.setOutlineVisible(false);
// 设置饼图一定是正圆
plot.setCircular(true);
// 设置起始角度
plot.setStartAngle(90);
// 设置饼图颜色
plot.setSectionPaint(pds.getKey(0), Color.RED);
plot.setSectionPaint(pds.getKey(1), Color.BLUE);
// 设置饼图边框颜色
// 设置plot的前景色透明度 // 设置plot的前景色透明度
plot.setForegroundAlpha(0.7f); plot.setForegroundAlpha(0.7f);
// 设置plot的背景色透明度 // 设置plot的背景色透明度
plot.setBackgroundAlpha(0.0f); plot.setBackgroundAlpha(0.0f);
// 设置标签字体
plot.setLabelFont(new Font("微软雅黑", Font.PLAIN, 16));
// 设置分类标签字体颜色
// plot.setLabelPaint(Color.RED);
//plot.setLabelLinkPaint(Color.RED);
// 设置分类标签背景颜色
plot.setLabelBackgroundPaint(Color.WHITE);
// 设置分类标签边框颜色
plot.setLabelOutlinePaint(Color.WHITE);
plot.setLabelShadowPaint(Color.WHITE);
// 设置标签生成器(默认{0}) // 设置标签生成器(默认{0})
// {0}:key {1}:value {2}:百分比 {3}:sum // {0}:key {1}:value {2}:百分比 {3}:sum
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}\n{2}")); StandardPieSectionLabelGenerator labelGenerator = new StandardPieSectionLabelGenerator("{0}\n{2}");
BufferedImage image = chart.createBufferedImage(800, 600); plot.setLabelGenerator(labelGenerator);
BufferedImage image = chart.createBufferedImage(600,350);
byte[] bytes = null; byte[] bytes = null;
try { try {
bytes = ChartUtilities.encodeAsPNG(image); bytes = ChartUtilities.encodeAsPNG(image);
...@@ -218,12 +281,40 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService { ...@@ -218,12 +281,40 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
return base64; return base64;
} }
@Override @Override
public IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, Integer reportType, Date startDate, Date endDate) { public IPage<AnalysisReportLogDto> allPage(Page<AnalysisReportLogDto> page, Integer reportType, Date startDate,
AnalysisReportLog analysisReportLog = new AnalysisReportLog(); Date endDate, String stationCode) {
AnalysisReportLogDto analysisReportLog = new AnalysisReportLogDto();
analysisReportLog.setStartDate(startDate); analysisReportLog.setStartDate(startDate);
analysisReportLog.setEndDate(endDate); analysisReportLog.setEndDate(endDate);
analysisReportLog.setReportType(reportType); analysisReportLog.setReportType(reportType);
analysisReportLog.setStationCode(stationCode);
return analysisReportLogMapper.allPage(page, analysisReportLog); return analysisReportLogMapper.allPage(page, analysisReportLog);
} }
@Override
public String preview(String code, Date startDate, Date endDate) {
WordTemplateUtils instance = WordTemplateUtils.getInstance();
Map<String, Object> map = getWordMap(code, startDate, endDate);
try {
FileItem item = instance.getWordFileItem(map,(String) map.get("document_number"), WordTemplateTypeEum.firePatrolReport.getTemplateFile());
MultipartFile file = new CommonsMultipartFile(item);
//FeignClientResult<java.util.Map<String, String>> result = Systemctl.fileStorageClient.updateCommonFile(file);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
// @Override
// public IPage<AnalysisReportLogDto> listPage(Page<AnalysisReportLogDto> page, Integer reportType, Date startDate,
// Date endDate,String stationCode) {
// AnalysisReportLogDto analysisReportLog = new AnalysisReportLogDto();
// analysisReportLog.setReportType(reportType);
// analysisReportLog.setStationCode(stationCode);
// analysisReportLog.setEndDate(startDate);
// analysisReportLog.setStartDate(endDate);
// return analysisReportLogMapper.allPage(page, analysisReportLog);
// }
} }
...@@ -941,6 +941,16 @@ ...@@ -941,6 +941,16 @@
<w:t></w:t> <w:t></w:t>
</w:r> </w:r>
</w:p> </w:p>
<w:p>
<w:pPr>
<w:ind w:first-line="600" w:first-line-chars="200"/>
<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:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:pStyle w:val="a7"/> <w:pStyle w:val="a7"/>
...@@ -994,9 +1004,19 @@ ...@@ -994,9 +1004,19 @@
<w:sz-cs w:val="30"/> <w:sz-cs w:val="30"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>${(statistical_time2)!'XXXX年XX月XX日-XXXX年XX月XX日'}消防设施巡查,巡查任务数2个,完成 1个;巡查人员 2人,持证人数;应巡查设备设施120台,完成巡查60台,巡查点位60</w:t> <w:t>${(statistical_time2)!'XXXX年XX月XX日-XXXX年XX月XX日'}消防设施巡查,巡查任务数${(task_count)!'X'}个,完成 ${(complete_task_count)!'X'}个;巡查人员 ${(person_count)!'X'}人,持证人数${(certified_person_count)!'X'}人;应巡查设备设施${(equipment_count)!'X'}台,完成巡查${(checked_equipment_count)!'X'}台,巡查点位${(checked_location_count)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
<w:p>
<w:pPr>
<w:ind w:first-line="600" w:first-line-chars="200"/>
<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:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:pStyle w:val="a7"/> <w:pStyle w:val="a7"/>
...@@ -1042,9 +1062,19 @@ ...@@ -1042,9 +1062,19 @@
<w:sz-cs w:val="30"/> <w:sz-cs w:val="30"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>巡查共发现缺陷总数2项,未完成任务总数1,持证率60%,任务完成率50%,漏查设备总数10</w:t> <w:t>巡查共发现缺陷总数 ${(defect_count)!'X'}项,未完成任务总数 ${(uncomplete_task_count)!'X'},持证率 ${(certified_percent)!'X'},任务完成率 ${(complete_task_percent)!'X'},漏查设备总数 ${(unchecked_equipment_count)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
<w:p>
<w:pPr>
<w:ind w:first-line="600" w:first-line-chars="200"/>
<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:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:pStyle w:val="a7"/> <w:pStyle w:val="a7"/>
...@@ -1416,7 +1446,7 @@ ...@@ -1416,7 +1446,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>2</w:t> <w:t>${(task_count)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -1610,7 +1640,7 @@ ...@@ -1610,7 +1640,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>1</w:t> <w:t>${(complete_task_count)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -1804,7 +1834,7 @@ ...@@ -1804,7 +1834,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>1</w:t> <w:t>${(uncomplete_task_count)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -1890,7 +1920,7 @@ ...@@ -1890,7 +1920,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>不合格</w:t> <w:t>${(task_qualified)!'X'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -1998,7 +2028,7 @@ ...@@ -1998,7 +2028,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>3</w:t> <w:t>${(person_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2060,7 +2090,14 @@ ...@@ -2060,7 +2090,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -2068,6 +2105,17 @@ ...@@ -2068,6 +2105,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -2217,7 +2265,7 @@ ...@@ -2217,7 +2265,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>持证</w:t> <w:t>\</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2236,7 +2284,14 @@ ...@@ -2236,7 +2284,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -2244,6 +2299,17 @@ ...@@ -2244,6 +2299,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -2350,7 +2416,7 @@ ...@@ -2350,7 +2416,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>60%</w:t> <w:t>${(certified_percent)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2436,7 +2502,7 @@ ...@@ -2436,7 +2502,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>不合格</w:t> <w:t>${(person_qualified)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2544,7 +2610,7 @@ ...@@ -2544,7 +2610,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>50%</w:t> <w:t>${(complete_task_percent)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2606,14 +2672,32 @@ ...@@ -2606,14 +2672,32 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="FF0000"/>
<w:sz w:val="20"/> <w:sz w:val="20"/>
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="FF0000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>${(task_percent_qualified)!'XX'}</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -2720,7 +2804,7 @@ ...@@ -2720,7 +2804,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>100</w:t> <w:t>${(equipment_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2782,7 +2866,14 @@ ...@@ -2782,7 +2866,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -2790,6 +2881,17 @@ ...@@ -2790,6 +2881,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -2896,7 +2998,7 @@ ...@@ -2896,7 +2998,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>90</w:t> <w:t>${(checked_equipment_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2958,14 +3060,32 @@ ...@@ -2958,14 +3060,32 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="FF0000"/>
<w:sz w:val="20"/> <w:sz w:val="20"/>
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="FF0000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>${(checked_equipment_qualified)!'XX'}</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -3072,7 +3192,7 @@ ...@@ -3072,7 +3192,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>10</w:t> <w:t>${(unchecked_equipment_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3134,14 +3254,32 @@ ...@@ -3134,14 +3254,32 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="FF0000"/>
<w:sz w:val="20"/> <w:sz w:val="20"/>
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="FF0000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>${(unchecked_equipment_qualified)!'XX'}</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -3246,7 +3384,7 @@ ...@@ -3246,7 +3384,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>2</w:t> <w:t>${(problem_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3306,7 +3444,14 @@ ...@@ -3306,7 +3444,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -3314,6 +3459,17 @@ ...@@ -3314,6 +3459,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -3418,7 +3574,7 @@ ...@@ -3418,7 +3574,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>2</w:t> <w:t>${(fixed_problem_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3478,7 +3634,14 @@ ...@@ -3478,7 +3634,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -3486,6 +3649,17 @@ ...@@ -3486,6 +3649,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -3590,7 +3764,7 @@ ...@@ -3590,7 +3764,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/> <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr> </w:rPr>
<w:t>0</w:t> <w:t>${(unfixed_problem_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3650,7 +3824,14 @@ ...@@ -3650,7 +3824,14 @@
</w:tcPr> </w:tcPr>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:widowControl/>
<w:supressLineNumbers w:val="off"/>
<w:wordWrap/>
<w:spacing w:line="240" w:line-rule="auto"/>
<w:jc w:val="left"/> <w:jc w:val="left"/>
<w:textAlignment w:val="center"/>
<w:rPr> <w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/> <w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/> <w:color w:val="000000"/>
...@@ -3658,6 +3839,17 @@ ...@@ -3658,6 +3839,17 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="仿宋" w:h-ansi="仿宋" w:fareast="仿宋" w:cs="仿宋" w:hint="fareast"/>
<w:color w:val="000000"/>
<w:kern w:val="0"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/>
</w:rPr>
<w:t>\</w:t>
</w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</w:tr> </w:tr>
...@@ -3705,7 +3897,7 @@ ...@@ -3705,7 +3897,7 @@
<w:pict> <w:pict>
<w:binData w:name="wordml://1.png">${(qualified_pie_chart)!''} <w:binData w:name="wordml://1.png">${(qualified_pie_chart)!''}
</w:binData> </w:binData>
<v:shape id="_x0000_s1027" o:spt="75" alt="" type="#_x0000_t75" style="height:255.7pt;width:416.45pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"> <v:shape id="_x0000_s1027" o:spt="75" alt="" type="#_x0000_t75" style="height:240pt;width:414.95pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="f" focussize="0,0"/> <v:fill on="f" focussize="0,0"/>
<v:stroke on="f"/> <v:stroke on="f"/>
...@@ -3728,7 +3920,7 @@ ...@@ -3728,7 +3920,7 @@
<w:pict> <w:pict>
<w:binData w:name="wordml://2.png">${(equip_pie_chart)!''} <w:binData w:name="wordml://2.png">${(equip_pie_chart)!''}
</w:binData> </w:binData>
<v:shape id="_x0000_s1028" o:spt="75" alt="" type="#_x0000_t75" style="height:236.7pt;width:414.95pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"> <v:shape id="_x0000_s1028" o:spt="75" alt="" type="#_x0000_t75" style="height:240pt;width:414.95pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="f" focussize="0,0"/> <v:fill on="f" focussize="0,0"/>
<v:stroke on="f"/> <v:stroke on="f"/>
...@@ -4190,7 +4382,7 @@ ...@@ -4190,7 +4382,7 @@
<w:sz-cs w:val="20"/> <w:sz-cs w:val="20"/>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/> <w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/>
</w:rPr> </w:rPr>
<w:t>【业务主题】+ 【开始时间】至【结束时间】, 巡查任务总数:【巡查任务总数】 完成任务总数:【已完成任务总数】 任务完成率:【任务完成率】;巡查共发现问题:【发现问题总数】个 , 已完成整改:【已整改问题总数】</w:t> <w:t>${(business_title)!'XX'}${(statistical_time2)!'XXXX年XX月XX日至XXXX年XX月XX日'}, 巡查任务总数:${(task_count)!'XX'} 完成任务总数:${(complete_task_count)!'XX'} 任务完成率:${(complete_task_percent)!'XX'};巡查共发现问题:${(problem_count)!'XX'}个 , 已完成整改:${(fixed_problem_count)!'XX'}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -4804,7 +4996,7 @@ ...@@ -4804,7 +4996,7 @@
<w:sz-cs w:val="30"/> <w:sz-cs w:val="30"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/> <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr> </w:rPr>
<w:t>XXX换流站</w:t> <w:t>${(station_name)!'XX'}换流站</w:t>
</w:r> </w:r>
</w:p> </w:p>
<w:p> <w:p>
...@@ -4822,59 +5014,8 @@ ...@@ -4822,59 +5014,8 @@
<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:t> 202</w:t> <w:t> ${(create_date2)!'XXXX年XX月XX日'}</w:t>
</w:r> </w:r>
<w:r>
<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:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>2</w:t>
</w:r>
<w:r>
<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:t></w:t>
</w:r>
<w:r>
<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:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>4</w:t>
</w:r>
<w:r>
<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:t></w:t>
</w:r>
<w:r>
<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:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>19</w:t>
</w:r>
<w:r>
<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:t></w:t>
</w:r>
</w:p> </w:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<select id="allPage" resultType="com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto"> <select id="allPage" resultType="com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto">
SELECT SELECT
*, *,
cb_org_usr.biz_org_code AS stationCode,
'消防巡查报表' AS reportName, '消防巡查报表' AS reportName,
cb_org_usr.biz_org_name AS stationName, cb_org_usr.biz_org_name AS stationName,
(CASE wl_analysis_report_log.report_type (CASE wl_analysis_report_log.report_type
...@@ -26,6 +27,13 @@ ...@@ -26,6 +27,13 @@
<if test="analysisReportLog.endDate != null"> <if test="analysisReportLog.endDate != null">
AND DATE_FORMAT(wl_analysis_report_log.end_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{analysisReportLog.endDate}, '%Y-%m-%d') AND DATE_FORMAT(wl_analysis_report_log.end_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{analysisReportLog.endDate}, '%Y-%m-%d')
</if> </if>
<if test="analysisReportLog.stationCode != null">
AND cb_org_usr.biz_org_code = #{analysisReportLog.stationCode}
</if>
</where> </where>
</select> </select>
<select id="getStation" resultType="Map">
SELECT * FROM cb_org_usr WHERE biz_org_code = #{stationCode}
</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