|  | @@ -32,6 +32,7 @@ import java.util.concurrent.CompletableFuture;
 | 
											
												
													
														|  |  import java.util.concurrent.ExecutionException;
 |  |  import java.util.concurrent.ExecutionException;
 | 
											
												
													
														|  |  import java.util.concurrent.TimeUnit;
 |  |  import java.util.concurrent.TimeUnit;
 | 
											
												
													
														|  |  import java.util.concurrent.TimeoutException;
 |  |  import java.util.concurrent.TimeoutException;
 | 
											
												
													
														|  | 
 |  | +import java.util.stream.Collectors;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  /**
 |  |  /**
 | 
											
												
													
														|  |   * @author :LuoWei
 |  |   * @author :LuoWei
 | 
											
										
											
												
													
														|  | @@ -136,11 +137,30 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
 | 
											
												
													
														|  |          completableFutureList.forEach(x -> {
 |  |          completableFutureList.forEach(x -> {
 | 
											
												
													
														|  |              safetyInspectVOList.add(x.join());
 |  |              safetyInspectVOList.add(x.join());
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  | 
 |  | +        if (ObjectUtil.isNotEmpty(safetyInspectVOList)) {
 | 
											
												
													
														|  | 
 |  | +            return safetyInspectVOList.stream()
 | 
											
												
													
														|  | 
 |  | +                    .filter(r->ObjectUtil.isNotEmpty(r.getInspectRate()))
 | 
											
												
													
														|  | 
 |  | +                    .sorted(Comparator.comparing(SafetyInspectVO::getInspectRate, (rate1, rate2) -> {
 | 
											
												
													
														|  | 
 |  | +                        double r1 = Double.parseDouble(rate1.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        double r2 = Double.parseDouble(rate2.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        return Double.compare(r2, r1); // 降序排序 inspectRate
 | 
											
												
													
														|  | 
 |  | +                    })/*.thenComparing(SafetyInspectVO::getInspectCoverRate, (cover1, cover2) -> {
 | 
											
												
													
														|  | 
 |  | +                        double c1 = Double.parseDouble(cover1.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        double c2 = Double.parseDouble(cover2.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        return Double.compare(c2, c1); // 降序排序 inspectCoverRate
 | 
											
												
													
														|  | 
 |  | +                    }).thenComparing(SafetyInspectVO::getRectificationRate, (rect1, rect2) -> {
 | 
											
												
													
														|  | 
 |  | +                        double r1 = Double.parseDouble(rect1.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        double r2 = Double.parseDouble(rect2.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        return Double.compare(r2, r1); // 降序排序 rectificationRate
 | 
											
												
													
														|  | 
 |  | +                    })*/)
 | 
											
												
													
														|  | 
 |  | +                    .collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          return safetyInspectVOList;
 |  |          return safetyInspectVOList;
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    private SafetyInspectVO getOneOrgSafetyInspectData(SysOrg org,SafetyInspectDTO safetyInspectDTO)
 |  | 
 | 
											
												
													
														|  | -    {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    private SafetyInspectVO getOneOrgSafetyInspectData(SysOrg org, SafetyInspectDTO safetyInspectDTO) {
 | 
											
												
													
														|  |          SafetyInspectVO safetyInspectVO = new SafetyInspectVO();
 |  |          SafetyInspectVO safetyInspectVO = new SafetyInspectVO();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          safetyInspectVO.setCity(org.getAffiliatedArea());
 |  |          safetyInspectVO.setCity(org.getAffiliatedArea());
 | 
											
										
											
												
													
														|  | @@ -259,11 +279,19 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
 | 
											
												
													
														|  |          completableFutureList.forEach(x -> {
 |  |          completableFutureList.forEach(x -> {
 | 
											
												
													
														|  |              safetyInspectVOList.add(x.join());
 |  |              safetyInspectVOList.add(x.join());
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  | 
 |  | +        if (ObjectUtil.isNotEmpty(safetyInspectVOList)){
 | 
											
												
													
														|  | 
 |  | +            return safetyInspectVOList.stream()
 | 
											
												
													
														|  | 
 |  | +                    .filter(r->ObjectUtil.isNotEmpty(r.getInspectRate()))
 | 
											
												
													
														|  | 
 |  | +                    .sorted(Comparator.comparing(SelfInspectVO::getInspectRate, (rate1, rate2) -> {
 | 
											
												
													
														|  | 
 |  | +                        double r1 = Double.parseDouble(rate1.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        double r2 = Double.parseDouble(rate2.replace("%", ""));
 | 
											
												
													
														|  | 
 |  | +                        return Double.compare(r2, r1); // 降序排序
 | 
											
												
													
														|  | 
 |  | +                    })).collect(Collectors.toList());
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |          return safetyInspectVOList;
 |  |          return safetyInspectVOList;
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    private SelfInspectVO getOneOrgSelfInspectData(SysOrg org,SafetyInspectDTO safetyInspectDTO)
 |  | 
 | 
											
												
													
														|  | -    {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    private SelfInspectVO getOneOrgSelfInspectData(SysOrg org, SafetyInspectDTO safetyInspectDTO) {
 | 
											
												
													
														|  |          SelfInspectVO safetyInspectVoResult = new SelfInspectVO();
 |  |          SelfInspectVO safetyInspectVoResult = new SelfInspectVO();
 | 
											
												
													
														|  |          SafetyInspectVO safetyInspectVOS;
 |  |          SafetyInspectVO safetyInspectVOS;
 | 
											
												
													
														|  |          Map map1;
 |  |          Map map1;
 | 
											
										
											
												
													
														|  | @@ -297,7 +325,7 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | -    public void export(SafetyInspectDTO safetyInspectDTO, HttpServletResponse response) throws IOException,ExecutionException, InterruptedException, TimeoutException {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public void export(SafetyInspectDTO safetyInspectDTO, HttpServletResponse response) throws IOException, ExecutionException, InterruptedException, TimeoutException {
 | 
											
												
													
														|  |          String orgName = null;
 |  |          String orgName = null;
 | 
											
												
													
														|  |          SysOrg sysOrg;
 |  |          SysOrg sysOrg;
 | 
											
												
													
														|  |          if (null == safetyInspectDTO.getOrgId()) {
 |  |          if (null == safetyInspectDTO.getOrgId()) {
 | 
											
										
											
												
													
														|  | @@ -333,7 +361,7 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | -    public void selfInspectExport(SafetyInspectDTO safetyInspectDTO, HttpServletResponse response) throws IOException,ExecutionException, InterruptedException, TimeoutException {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public void selfInspectExport(SafetyInspectDTO safetyInspectDTO, HttpServletResponse response) throws IOException, ExecutionException, InterruptedException, TimeoutException {
 | 
											
												
													
														|  |          String orgName = null;
 |  |          String orgName = null;
 | 
											
												
													
														|  |          SysOrg sysOrg;
 |  |          SysOrg sysOrg;
 | 
											
												
													
														|  |          if (null == safetyInspectDTO.getOrgId()) {
 |  |          if (null == safetyInspectDTO.getOrgId()) {
 |