Browse Source

事件统计增加施工类型

develop
lau572 3 months ago
parent
commit
3af3e85536
  1. 2
      zc-business/src/main/java/com/zc/business/controller/WordController.java
  2. 12
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml
  3. BIN
      zc-business/src/main/resources/wordTemplate/chartTemplate.docx

2
zc-business/src/main/java/com/zc/business/controller/WordController.java

@ -1028,7 +1028,7 @@ public class WordController {
if (closeList != null && closeList.size() > UniversalEnum.ZERO.getNumber() && restrictionList != null && restrictionList.size() > UniversalEnum.ZERO.getNumber() ) {
XWPFTable table = doc.createTable(UniversalEnum.THIRTEEN.getNumber(), UniversalEnum.THREE.getNumber());
XWPFTable table = doc.createTable(15, UniversalEnum.THREE.getNumber());
//列宽自动分割
CTTblWidth infoTableWidth = table.getCTTbl().addNewTblPr().addNewTblW();
infoTableWidth.setType(STTblWidth.DXA);

12
zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

@ -226,7 +226,13 @@
UNION ALL select 5 control_cause,'' cause_type,'警备任务' controlCauseName,'' causeTypeName
UNION ALL select 6 control_cause,'' cause_type,'其他' controlCauseName,'' causeTypeName) t3
LEFT JOIN
(select t2.control_type,t2.control_cause,ifnull(t2.cause_type,'') cause_type,count(*) num,sum(
(select t2.control_type,t2.control_cause,
case when t2.cause_type = '4-1' then ''
when t2.cause_type = '4-2' then ''
when t2.cause_type = '4-3' then ''
when ISNULL(t2.cause_type) then ''
else cause_type end causeType,
count(*) num,sum(
case when date_format(#{startTime},'%Y-%m-%d %H:%i:%s') >= date_format(t1.start_time,'%Y-%m-%d %H:%i:%s')
and (DATE_FORMAT(t1.end_time,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time))
then TIMESTAMPDIFF(MINUTE,t1.start_time,now())
@ -252,8 +258,8 @@
and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time))
</where>
GROUP BY t2.control_cause,t2.cause_type) t4
on t3.control_cause = t4.control_cause and t3.cause_type = t4.cause_type
GROUP BY t2.control_cause,causeType) t4
on t3.control_cause = t4.control_cause and t3.cause_type = t4.causeType
ORDER BY t3.control_cause, t3.cause_type
</select>

BIN
zc-business/src/main/resources/wordTemplate/chartTemplate.docx

Binary file not shown.
Loading…
Cancel
Save