| | |
| | | * @date 2024-03-06 |
| | | */ |
| | | @Service |
| | | @SuppressWarnings("ALL") |
| | | public class ReportService implements ReportMapper { |
| | | @Value("${sys.turfServer}") |
| | | private String turfServer; |
| | |
| | | List<String[]> addList = new ArrayList<>(); |
| | | for (CountEntity ce : list) { |
| | | switch (re.getCode()) { |
| | | case "countOperates": |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1()}); |
| | | break; |
| | | case "countServices": |
| | | |
| | | case "countSizesByType": |
| | | case "countSizesByPrj": |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), "" + ce.getCount(), ce.getM2()}); |
| | | break; |
| | | case "countSizes": |
| | | |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), ce.getM2()}); |
| | | break; |
| | | case "countOperates": |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), ce.getM2(), "" + ce.getCount()}); |
| | | break; |
| | | case "countExplorationPoints": |
| | | |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), "" + ce.getCount(), ce.getM2(), ce.getM3()}); |
| | | break; |
| | | case "countDemAreaByPrj": |
| | | case "countMptAreaByPrj": |
| | | case "countOsgbAreaByPrj": |
| | | case "countLasAreaByPrj": |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), ce.getM3()}); |
| | | break; |
| | | default: |
| | | |
| | | addList.add(new String[]{"" + ce.getNo(), ce.getM1(), "" + ce.getCount()}); |
| | | break; |
| | | } |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | int rows = 1, allCount = 0; |
| | | int rows = 1; |
| | | long allCount = 0; |
| | | Double allSize = 0d, allArea = 0d; |
| | | for (CountEntity ce : list) { |
| | | ce.setNo(rows++); |
| | |
| | | CountEntity ce = new CountEntity(); |
| | | ce.setNo(rows); |
| | | ce.setM1("总计"); |
| | | ce.setCount((long) allCount); |
| | | ce.setCount(allCount); |
| | | ce.setM2(FileHelper.getSizes(allSize)); |
| | | ce.setM3(FileHelper.getSquareMeter(allArea)); |
| | | list.add(ce); |