2 Commits

6 changed files with 37 additions and 3 deletions
Split View
  1. +9
    -0
      inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java
  2. +4
    -0
      inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java
  3. +2
    -0
      inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/service/IResultAnalysisService.java
  4. +6
    -1
      inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/service/impl/ResultAnalysisServiceImpl.java
  5. +14
    -1
      inspect-main/inspect-main-task/src/main/resources/mapper/task/ResultAnalysisMapper.xml
  6. +2
    -1
      inspect-metadata/src/main/resources/mapper/prodevmnt/BasedataDeviceMapper.xml

+ 9
- 0
inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/controller/ResultAnalysisController.java View File

@ -885,4 +885,13 @@ public class ResultAnalysisController extends BaseController {
return this.getDataTable(analysisList);
}
@GetMapping({"summary/alarm/total"})
public AjaxResult summaryAlarmTotal(AnalyseSummaryAlarmModel model) {
String filter = StringUtils.isEmpty(model.getFilter()) ? "0" : model.getFilter();
String isToday = StringUtils.isEmpty(model.getIsToday()) ? "0" : model.getIsToday();
String type = StringUtils.isEmpty(model.getType()) ? "0" : model.getType();
Long total = resultAnalysisService.getDefectCountGroupByPoint(filter, isToday, type);
return AjaxResult.success(total);
}
}

+ 4
- 0
inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/mapper/ResultAnalysisMapper.java View File

@ -70,6 +70,10 @@ public interface ResultAnalysisMapper {
List<PatrolData> selectResultAnalysisListForAlarm(AnalyseSummaryAlarmModel alarmModel);
Long selectResultAnalysisListDefectInfo(@Param("filter") String filter,
@Param("isToday") String isToday,
@Param("type") String type);
int selectResultAnalysisByMainIds(@Param("lineIds") List<Long> lineIds);
List<ResultAnalysis> selectResultAnalysisListByMainIds(@Param("lineIds") List<Long> lineIds);


+ 2
- 0
inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/service/IResultAnalysisService.java View File

@ -55,4 +55,6 @@ public interface IResultAnalysisService {
List<PatrolData> selectResultAnalysisListForAlarm(AnalyseSummaryAlarmModel alarmModel);
List<ResultAnalysis> selectResultAnalysisListBatch(List<String> taskPatrolIds, String resultType);
Long getDefectCountGroupByPoint(String defectFilter, String defectIsToday, String type);
}

+ 6
- 1
inspect-main/inspect-main-task/src/main/java/com/inspect/analysis/service/impl/ResultAnalysisServiceImpl.java View File

@ -145,7 +145,7 @@ public class ResultAnalysisServiceImpl implements IResultAnalysisService {
if (patrolDataList == null || patrolDataList.isEmpty()) {
return patrolDataList;
}
Map<String, List<PatrolData>> collect = patrolDataList.stream().collect(Collectors.groupingBy(item -> item.getAlgType() + "_" + item.getObjectId()));
Map<String, List<PatrolData>> collect = patrolDataList.stream().filter(item -> StringUtils.isNotEmpty(item.getDesc()) && !item.getDesc().contains("失败")).collect(Collectors.groupingBy(item -> item.getAlgType() + "_" + item.getObjectId()));
List<PatrolData> resultList = new ArrayList<>();
collect.forEach((key, value) -> {
PatrolData patrolData = new PatrolData();
@ -183,4 +183,9 @@ public class ResultAnalysisServiceImpl implements IResultAnalysisService {
return resultList;
}
public Long getDefectCountGroupByPoint(String defectFilter, String defectIsToday, String type) {
return this.resultAnalysisMapper.selectResultAnalysisListDefectInfo(defectFilter, defectIsToday, type);
}
}

+ 14
- 1
inspect-main/inspect-main-task/src/main/resources/mapper/task/ResultAnalysisMapper.xml View File

@ -677,7 +677,7 @@
a.create_time as patrol_time,
b.point_status ,
b.result_type as warn_status,
b.description as 'desc',
case when (b.description is null or b.description = '') then b.alg_type else b.description end as 'desc',
b.res_img_url as img,
a.file_type as img_type,
a.data_type,
@ -707,5 +707,18 @@
</foreach>
AND result_type = #{resultType}
</select>
<select id="selectResultAnalysisListDefectInfo" resultType="java.lang.Long">
select
count(*) as count
from
result_analysis b
<where>
b.result_type != '2'
<if test="isToday != null and isToday != '' and isToday == 1">AND b.create_time &gt;= CURDATE()
AND b.create_time &lt; CURDATE() + INTERVAL 1 DAY</if>
<if test="filter != null and filter != ''">and b.filter = #{filter}</if>
<if test="type != null and type != '' and type == 0">and b.result_type = '0' </if>
</where>
</select>
</mapper>

+ 2
- 1
inspect-metadata/src/main/resources/mapper/prodevmnt/BasedataDeviceMapper.xml View File

@ -224,6 +224,7 @@
</if>
</if>
</where>
order by order_num
</select>
<select id="selectBasedataDeviceByConditionList" parameterType="BasedataDevice" resultMap="BasedataDeviceResult">
@ -256,7 +257,7 @@
create_time,
update_by,
update_time,
order_num
order_num,
old_device_id,
old_parent_id,
old_area_id,


Loading…
Cancel
Save