Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
wangsixiang 7 months ago
parent
commit
f55b083b9e
  1. 26
      zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java
  2. BIN
      zc-business/src/main/resources/wordTemplate/accidentModelAnalysis.docx

26
zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

@ -745,7 +745,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
int maxVehicleTypes = 5;
// 创建一个具有最大车辆类型数量的列的表格
XWPFTable table = doc.createTable(result.size() + 1, maxVehicleTypes);
CTTblWidth infoTableWidth = table.getCTTbl().addNewTblPr().addNewTblW();
infoTableWidth.setType(STTblWidth.DXA);
infoTableWidth.setW(BigInteger.valueOf(UniversalEnum.NINE_THOUSAND_AND_SEVENTY_TWO.getNumber()));
// 提取所有不同的车辆类型作为列标题
Set<String> vehicleTypes = new HashSet<>();
vehicleTypes.add("货车");
@ -842,7 +844,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
// 换行
createLineBreak(doc);
}
}else {
addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue());
}
}
/**
@ -1061,9 +1065,13 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
Calendar calendar = Calendar.getInstance();
calendar.setTime(startTime); // 设置当前时间为 startTime
calendar.add(Calendar.YEAR, -1); // 减去一年
Date oneYearAgoStart = calendar.getTime(); // 一年前的开始时间
dcSdhsEventQuery.setStartTime(oneYearAgoStart);
Map<String, Long> lastYearData = accidentTimeAnalysis(dcSdhsEventQuery);
Date oneYearAgoStart = calendar.getTime(); // 一年前的开始时间‘
DcSdhsEventQuery dcSdhsEventQuery1 = new DcSdhsEventQuery();
dcSdhsEventQuery1.setStartTime(oneYearAgoStart);
dcSdhsEventQuery1.setType(dcSdhsEventQuery.getType());
dcSdhsEventQuery1.setEndTime(dcSdhsEventQuery.getEndTime());
Map<String, Long> lastYearData = accidentTimeAnalysis(dcSdhsEventQuery1);
String type = dcSdhsEventQuery.getType();
int rows = 0;
String stingType = "";
@ -1197,6 +1205,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
//换行
createLineBreak(doc);
}else {
addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue());
}
}
@ -1976,6 +1986,8 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
}
//换行
createLineBreak(doc);
}else {
addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue());
}
}
@ -2086,7 +2098,9 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
}
//换行
createLineBreak(doc);
}
}else {
addDescription(doc, UniversalEnum.NO_DATA_AVAILABLE.getValue());
}
}

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

Binary file not shown.
Loading…
Cancel
Save