|
|
|
@ -15,6 +15,7 @@ import com.inspect.insreport.domain.InspectionReport; |
|
|
|
import com.inspect.insreport.mapper.InspectionReportMapper; |
|
|
|
import com.inspect.insreportdata.domain.InspectionReportData; |
|
|
|
import com.inspect.insreportdata.mapper.InspectionReportDataMapper; |
|
|
|
import com.inspect.message.MessageUtils; |
|
|
|
import com.inspect.partrolresult.domain.*; |
|
|
|
import com.inspect.partrolresult.mapper.PatrolResultMapper; |
|
|
|
import com.inspect.partrolresult.service.IPatrolResultService; |
|
|
|
@ -38,6 +39,7 @@ import java.util.Map; |
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -60,6 +62,9 @@ public class PatrolResultServiceImpl implements IPatrolResultService { |
|
|
|
private final InspectionReportDataMapper inspectionReportDataMapper; |
|
|
|
private final ResultAnalysisMapper resultAnalysisMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private MessageUtils messageUtils; |
|
|
|
|
|
|
|
public PatrolResultServiceImpl(PatrolResultMapper patrolResultMapper, PatrolResultDefaultValueMapper patrolResultDefaultvalueMapper, PatrolTaskResultMainMapper patrolTaskResultMainMapper, PatrolTaskStatusMapper patrolTaskStatusMapper, PatrolTaskMapper patrolTaskMapper, InspectionReportMapper inspectionReportMapper, InspectionReportImgMapper inspectionReportImgMapper, InspectionReportDataMapper inspectionReportDataMapper, ResultAnalysisMapper resultAnalysisMapper) { |
|
|
|
this.patrolResultMapper = patrolResultMapper; |
|
|
|
this.patrolResultDefaultvalueMapper = patrolResultDefaultvalueMapper; |
|
|
|
@ -422,7 +427,7 @@ public class PatrolResultServiceImpl implements IPatrolResultService { |
|
|
|
reportData.setEqName(basePointAreaInfo.getMainName()); |
|
|
|
reportData.setParts(basePointAreaInfo.getDeviceName()); |
|
|
|
reportData.setPointName(basePointAreaInfo.getPatrolPointName()); |
|
|
|
reportData.setDataSources("0".equals(devType) ? "无人机" : "1".equals(devType) ? "机器人" : "高清视频"); |
|
|
|
reportData.setDataSources("0".equals(devType) ? messageUtils.get("无人机") : "1".equals(devType) ? messageUtils.get("机器人") : messageUtils.get("高清视频")); |
|
|
|
reportData.setAcquisitionTime(DateUtils.parse(DateUtils.yyyyMMddHHmmss2, patrolResultRef.getTime())); |
|
|
|
reportData.setInspectionResults(patrolResultRef.getDescription()); |
|
|
|
String threshold = patrolResultRef.getThreshold(); |
|
|
|
@ -446,15 +451,15 @@ public class PatrolResultServiceImpl implements IPatrolResultService { |
|
|
|
if(pointStatus == null) { |
|
|
|
continue; |
|
|
|
} else if (pointStatus.equals("0")) { |
|
|
|
reportData.setPointStatus("异常"); |
|
|
|
reportData.setPointStatus(messageUtils.get("异常")); |
|
|
|
reportData.setCode(failNum); |
|
|
|
++failNum; |
|
|
|
} else if (pointStatus.equals("1")) { |
|
|
|
reportData.setPointStatus("待人工确认"); |
|
|
|
reportData.setPointStatus(messageUtils.get("待人工确认")); |
|
|
|
reportData.setCode(confirmNum); |
|
|
|
++confirmNum; |
|
|
|
} else { |
|
|
|
reportData.setPointStatus("正常"); |
|
|
|
reportData.setPointStatus(messageUtils.get("正常")); |
|
|
|
reportData.setCode(okNum); |
|
|
|
++okNum; |
|
|
|
} |
|
|
|
@ -526,7 +531,8 @@ public class PatrolResultServiceImpl implements IPatrolResultService { |
|
|
|
okNum = lastNum; |
|
|
|
} |
|
|
|
|
|
|
|
return String.format("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。", totalNum, totalNum, okNum, failNum, confirmNum); |
|
|
|
// return String.format("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。", totalNum, totalNum, okNum, failNum, confirmNum); |
|
|
|
return String.format(messageUtils.get("总点位:%d个,已检点位:%d个,未检点位:0个,正常点位:%d个,异常点位:%d个,待人工确认点位:%d个。"), totalNum, totalNum, okNum, failNum, confirmNum); |
|
|
|
} |
|
|
|
|
|
|
|
public List<PatrolResultRef> selectResultRefByLineId(String mainId) { |
|
|
|
|