管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-07 efb08fd828651bce8ca8b118230a7e815c3ff354
更新Word统计
已修改1个文件
29 ■■■■■ 文件已修改
src/main/java/com/lf/server/service/sys/ReportService.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/sys/ReportService.java
@@ -30,6 +30,7 @@
 * @date 2024-03-06
 */
@Service
@SuppressWarnings("ALL")
public class ReportService implements ReportMapper {
    @Value("${sys.turfServer}")
    private String turfServer;
@@ -316,20 +317,27 @@
        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;
            }
        }
@@ -358,7 +366,8 @@
            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++);
@@ -372,7 +381,7 @@
            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);