|
@@ -61,11 +61,33 @@ public class FaultStatisticsServiceImpl extends BaseServiceImpl<FaultStatisticsM
|
|
|
(faultStatisticsBo.getStatisticsDate()));
|
|
|
queryWrapper.and(FAULT_STATISTICS.WAR_ZONE.eq
|
|
|
(faultStatisticsBo.getWarZone()));
|
|
|
+
|
|
|
+ queryWrapper.and(FAULT_STATISTICS.GROUPS.eq
|
|
|
+ (faultStatisticsBo.getGroups()));
|
|
|
queryWrapper.and(FAULT_STATISTICS.MAJOR.eq
|
|
|
(faultStatisticsBo.getMajor()));
|
|
|
-
|
|
|
- if(faultStatisticsBo.getStatisticsDate() != null && faultStatisticsBo.getEndStatisticsDate() != null){
|
|
|
-
|
|
|
+ queryWrapper.and(FAULT_STATISTICS.AIRCRAFT_MODEL.eq
|
|
|
+ (faultStatisticsBo.getAircraftModel()));
|
|
|
+ queryWrapper.and(FAULT_STATISTICS.AIRCRAFT_NUM.eq
|
|
|
+ (faultStatisticsBo.getAircraftNum()));
|
|
|
+ queryWrapper.and(FAULT_STATISTICS.FAULTY_PARTS_NAME.eq
|
|
|
+ (faultStatisticsBo.getFaultyPartsName()));
|
|
|
+
|
|
|
+ if(faultStatisticsBo.getStartStatisticsDate() != null && faultStatisticsBo.getEndStatisticsDate() != null){
|
|
|
+ queryWrapper.between("statistics_date", faultStatisticsBo.getStartStatisticsDate(), faultStatisticsBo.getEndStatisticsDate());
|
|
|
+ }
|
|
|
+ if(faultStatisticsBo.getDistinctField() != null){
|
|
|
+ if(faultStatisticsBo.getDistinctField().equals("groups")){
|
|
|
+ queryWrapper.select("DISTINCT groups"); // 指定去重字段
|
|
|
+ }else if(faultStatisticsBo.getDistinctField().equals("major")){
|
|
|
+ queryWrapper.select("DISTINCT major");
|
|
|
+ }else if(faultStatisticsBo.getDistinctField().equals("aircraft_model")){
|
|
|
+ queryWrapper.select("DISTINCT aircraft_model");
|
|
|
+ }else if(faultStatisticsBo.getDistinctField().equals("aircraft_num")){
|
|
|
+ queryWrapper.select("DISTINCT aircraft_num");
|
|
|
+ }else if(faultStatisticsBo.getDistinctField().equals("faulty_parts_name")){
|
|
|
+ queryWrapper.select("DISTINCT faulty_parts_name");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return queryWrapper;
|