jar
jinlin
2025-03-10 f0aae4b39afbcbb18fb5a0b32e3ca689662c5ca7
jar
49个文件已修改
12个文件已添加
1个文件已删除
2892 ■■■■ 已修改文件
src/main/java/com/example/Application.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/Login.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/dto/JComboBoxItem.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ConfigManageService.java 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/DataExportManageService.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/DataImportManageService.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/DataSyncManageService.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/DismantTrackAddOrUpdate.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/DismantTrackService.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ExportDismantTrackService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ExportTrackRecordService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/HandoverService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ImportDataService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ImportLevel3Service.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ImportTrackRecordService.java 404 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/Level1ManageService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/Level2AddOrUpdate.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/Level2ManageService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/Level3ManageService.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/Level3View2Service.java 263 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/MenuService.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/ProgressPromptService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/StatisDismant2Service.java 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/StatisDismantService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/StatisReportsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/SubunitAddOrUpdate.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/SubunitService.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/TeamGroupAddOrUpdate.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/TeamGroupManageService.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/TrackRecordAddOrUpdate.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/TrackRecordManageService.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/service/UserManageService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/utils/CircleRenderer.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/utils/CommonTable.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/utils/ComplexTable.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/client/utils/MultiSelectComboBox.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/DataSync/dto/DataExportDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/DataSync/dto/DataImportDto.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/DataSync/service/DataSyncService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/Dto/TableNodeDto.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/dao/DjJdgzDismantTrackDao.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/dao/DjJdgzNetworkLevel3Dao.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/dao/DjJdgzTrackRecordDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/model/DjJdgzTrackRecord.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/service/DjJdgzDismantTrackService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/service/DjJdgzNetworkLevel3Service.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/service/DjJdgzTrackRecordService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/progressTrack/service/NetWorkDiagramService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/teamGroup/dao/SysTeamGroupClassDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/teamGroup/model/SysTeamGroupClass.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/teamGroup/service/SysTeamGroupClassService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/server/utils/DownLoadTmpFile.java 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/db/csiczb1.db 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/cabin/CabinDao.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/progressTrack/DjJdgzDismantTrackDao.xml 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/progressTrack/DjJdgzNetworkLevel1Dao.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/progressTrack/DjJdgzNetworkLevel3Dao.xml 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/teamgroup/SysTeamGroupClassDao.xml 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templateFile/三级网络图导入模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templateFile/子部件导入模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templateFile/跟踪记录导入模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/Application.java
@@ -28,7 +28,6 @@
    public static void main(String[] args) {
        System.setProperty("java.awt.headless", "false");
        SpringApplication.run(Application.class, args);
    }
}
src/main/java/com/example/client/Login.java
@@ -5,6 +5,7 @@
import com.example.server.user.model.SysUser;
import com.example.server.user.service.UserService;
import com.example.server.utils.CacheUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -139,6 +140,7 @@
        String finalSite = site;
        String finalTeamGroup = teamGroup;
        String finalTeam = team;
        String finalTeamGroup1 = teamGroup;
        loginButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
@@ -149,10 +151,20 @@
                user = userService.login(name, str);
                exist = user.getExist();
                Boolean exit2 = true;
                if (StringUtils.isNotBlank(user.getTeamgroup())) {
                    if (StringUtils.isNotBlank(finalTeamGroup1) && !finalTeamGroup1.equals("null")) {
                        if (!finalTeamGroup1.contains(user.getTeamgroup())) {
                            exit2 = false;
                        }
                    }
                }
                if (exist) {
                    System.out.println("登录成功");
                    if (!exit2) {
                        JOptionPane.showMessageDialog(null, "当前机器不支持该专业用户登录", "提示", JOptionPane.WARNING_MESSAGE);
                        return;
                    }
                    try {
                        String path = Login.class.getClassLoader().getResource("config.properties").getPath();
                        OutputStream outputStream = null;
@@ -161,11 +173,12 @@
                            outputStream = new FileOutputStream(path);
                        } else {
                            try {
                                outputStream = new FileOutputStream("config.properties");
                                outputStream = new FileOutputStream(configPath);
                            } catch (FileNotFoundException ex) {
                                ex.printStackTrace();
                            }
                        }
                        properties.setProperty("userName", name);
                        properties.setProperty("password", str);
                        properties.store(outputStream, "rxkj");
src/main/java/com/example/client/dto/JComboBoxItem.java
@@ -3,15 +3,15 @@
import java.util.Objects;
public class JComboBoxItem {
    private final long id;
    private final Long id;
    private final String name;
    public JComboBoxItem(long id, String name) {
    public JComboBoxItem(Long id, String name) {
        this.id = id;
        this.name = name;
    }
    public long getId() {
    public Long getId() {
        return id;
    }
src/main/java/com/example/client/service/ConfigManageService.java
New file
@@ -0,0 +1,182 @@
package com.example.client.service;
import com.example.client.Login;
import com.example.client.dto.JComboBoxItem;
import com.example.client.utils.GBC;
import com.example.client.utils.MultiSelectComboBox;
import com.example.client.utils.WaitUtil;
import com.example.server.DataSync.service.DataSyncService;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import com.example.server.user.model.SysUser;
import com.example.server.utils.CacheUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
@Service
public class ConfigManageService {
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    @Value("${data.config-path}")
    private String configPath;
    public JPanel createTable(Integer width, Integer height, JFrame jFrame) {
        Properties properties = new Properties();
        String site = "";
        String teamGroup = "";
        String team = "";
        String path = Login.class.getClassLoader().getResource("config.properties").getPath();
        InputStream inStream = null;
        File dir = new File(path);
        if (dir.exists()) {
            inStream = Login.class.getClassLoader().getResourceAsStream("config.properties");
        } else {
            try {
                inStream = new FileInputStream(configPath);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
        Reader reader = null;
        try {
            reader = new InputStreamReader(inStream, StandardCharsets.UTF_8);
            // ä½¿ç”¨Properties.load(Reader)加载属性文件
            properties.load(reader);
            site = properties.get("site").toString();
            teamGroup = properties.get("teamGroup").toString();
            team = properties.get("team").toString();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (inStream != null) {
                try {
                    inStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        JPanel panel = new JPanel();
        GridBagLayout layout = new GridBagLayout();
        panel.setLayout(layout);
        panel.setPreferredSize(new Dimension(width - 20, height));
        String[] siteList = new String[]{
                "工作组", "厂家", "TD"
        };
        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
        JLabel JLabel1 = new JLabel("所属机器");
        JComboBox<String> comboBox = new JComboBox<>(siteList);
        comboBox.setPreferredSize(new Dimension(185,28));
        if (StringUtils.isNotBlank(site)) {
            comboBox.setSelectedItem(site);
        }
        JLabel JLabel2 = new JLabel("所属TD");
        JTextField teamName = new JTextField(16);
        if (StringUtils.isNotBlank(team)) {
            teamName.setText(team.replace("TD", ""));
        }
        JLabel JLabel3 = new JLabel("可操作的专业");
        MultiSelectComboBox comboBox2 = new MultiSelectComboBox(teamList);
        comboBox2.setPreferredSize(new Dimension(500, 25));
        if (StringUtils.isNotBlank(teamGroup) && !teamGroup.equals("null")) {
            Set<Long> selectedIds = new HashSet<>();
            String[] idParts = teamGroup.split(",");
            for (String idPart : idParts) {
                selectedIds.add(Long.parseLong(idPart.trim())); // å°†å­—符串转换为 Long ç±»åž‹å¹¶æ·»åŠ åˆ°é›†åˆä¸­
            }
            // å°† ID è½¬æ¢ä¸ºå¯¹åº”çš„ JComboBoxItem å¯¹è±¡
            Set<JComboBoxItem> selectedItems = new HashSet<>();
            for (JComboBoxItem item : teamList) {
                if (selectedIds.contains(item.getId())) { // æ£€æŸ¥ Long ç±»åž‹çš„ ID æ˜¯å¦åŒ¹é…
                    selectedItems.add(item); // æ·»åŠ åˆ°é€‰ä¸­é¡¹é›†åˆ
                }
            }
            comboBox2.setSelectedItems(selectedItems);
        }
        JButton save = new JButton("保存");
        save.addActionListener((e) -> {
            try {
                String path2 = Login.class.getClassLoader().getResource("config.properties").getPath();
                OutputStream outputStream = null;
                File dir2 = new File(path2);
                if (dir2.exists()) {
                    outputStream = new FileOutputStream(path2);
                } else {
                    try {
                        outputStream = new FileOutputStream(configPath);
                    } catch (FileNotFoundException ex) {
                        ex.printStackTrace();
                    }
                }
                Set<JComboBoxItem> selectedItems = comboBox2.getSelectedItems();
                StringBuilder selectedIds = new StringBuilder();
                for (JComboBoxItem item : selectedItems) {
                    selectedIds.append(item.getId()).append(",");
                }
                properties.setProperty("site", comboBox.getSelectedItem().toString());
                properties.setProperty("team", teamName.getText() + "TD");
                properties.setProperty("teamGroup", String.valueOf(selectedIds));
                CacheUtils.remove("site", "site");
                CacheUtils.put("site", "site", comboBox.getSelectedItem().toString());
                properties.store(outputStream, "rxkj");
                outputStream.close();
            } catch (FileNotFoundException ex) {
                ex.printStackTrace();
            } catch (IOException ep) {
                ep.printStackTrace();
            }
        });
        panel.add(JLabel1, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        panel.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        panel.add(JLabel2, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        panel.add(teamName, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        panel.add(JLabel3, new GBC(0, 2, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        panel.add(comboBox2, new GBC(1, 2, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        panel.add(save, new GBC(0, 3, 2, 1).setWeight(0, 0));
        return panel;
    }
}
src/main/java/com/example/client/service/DataExportManageService.java
New file
@@ -0,0 +1,81 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.utils.CommonTable;
import com.example.client.utils.GBC;
import com.example.client.utils.WaitUtil;
import com.example.server.DataSync.dto.DataExportDto;
import com.example.server.DataSync.service.DataSyncService;
import com.example.server.utils.CacheUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
@Service
public class DataExportManageService {
    @Autowired
    DataSyncService dataSyncService;
    @Autowired
    ImportDataService importDataService;
    public JPanel createTable(Integer width, Integer height, JFrame jFrame) {
        JPanel panel = new JPanel(new BorderLayout()); // ä½¿ç”¨ BorderLayout
        panel.setPreferredSize(new Dimension(width - 10, height));
        JPanel left = new JPanel(new BorderLayout()); // ä¸º left è®¾ç½®å¸ƒå±€
        left.setPreferredSize(new Dimension((width - 10) / 2, height));
        JPanel right = new JPanel(new BorderLayout()); // ä¸º right è®¾ç½®å¸ƒå±€
        right.setPreferredSize(new Dimension((width - 10) / 2, height));
        JButton btnExport = new JButton("导出");
        JPanel top = new JPanel(new FlowLayout(FlowLayout.LEFT)); // ä¸º left è®¾ç½®å¸ƒå±€
        top.add(btnExport);
        JLabel label1 = new JLabel("提示信息");
        JTextArea tips = new JTextArea(7, 30);
        tips.setEnabled(false);
        tips.setLineWrap(true);
        JPanel center = new JPanel(new BorderLayout()); // ä¸º left è®¾ç½®å¸ƒå±€
        center.setPreferredSize(new Dimension((width - 10) / 2, height-50));
        center.add(label1,BorderLayout.NORTH);
        center.add(tips,BorderLayout.CENTER);
        left.add(top, BorderLayout.NORTH);
        left.add(center, BorderLayout.CENTER);
        JLabel label2 = new JLabel("导出记录");
        List<DataExportDto> list = new ArrayList<>();
        List<ColumnDto> columnDto = new ArrayList<>();
        columnDto.add(new ColumnDto("序号", "", 265, "autoCreate", false, null, null));
        columnDto.add(new ColumnDto("导出时间", "exportDate", 265, null, false, null, null));
        columnDto.add(new ColumnDto("导出人", "importStaff", 265, null, false, null, null));
        JTable table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        right.add(label2, BorderLayout.NORTH);
        right.add(new JScrollPane(table), BorderLayout.CENTER); // å°† table åŒ…装在 JScrollPane ä¸­
        panel.add(left, BorderLayout.WEST);
        panel.add(right, BorderLayout.CENTER); // å°† right æ·»åŠ åˆ° CENTER åŒºåŸŸ
        btnExport.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                dataSyncService.export();
            }
        });
        return panel;
    }
}
src/main/java/com/example/client/service/DataImportManageService.java
New file
@@ -0,0 +1,145 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.utils.CommonTable;
import com.example.client.utils.GBC;
import com.example.client.utils.WaitUtil;
import com.example.server.DataSync.dto.DataExportDto;
import com.example.server.DataSync.dto.DataImportDto;
import com.example.server.DataSync.service.DataSyncService;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel2List;
import com.example.server.utils.CacheUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
public class DataImportManageService {
    @Value("${data.imgDir}")
    private String imgPath;
    @Autowired
    DataSyncService dataSyncService;
    @Autowired
    ImportDataService importDataService;
    public JPanel createTable(Integer width, Integer height, JFrame jFrame) {
        JPanel panel = new JPanel(new BorderLayout());
        panel.setPreferredSize(new Dimension(width-10,height));
        JPanel left = new JPanel(new BorderLayout());
        left.setPreferredSize(new Dimension((width-10)/2,height));
        JPanel right = new JPanel(new BorderLayout());
        right.setPreferredSize(new Dimension((width-10)/2,height));
        JPanel top = new JPanel(new FlowLayout(FlowLayout.LEFT)); // ä¸º left è®¾ç½®å¸ƒå±€
        top.setPreferredSize(new Dimension((width - 10) / 2, 50));
        JPanel center = new JPanel(); // ä¸º left è®¾ç½®å¸ƒå±€
        GridBagLayout layout = new GridBagLayout();
        center.setLayout(layout);
        center.setPreferredSize(new Dimension((width - 10) / 2, (height-50)/2));
        JPanel south = new JPanel(new BorderLayout()); // ä¸º left è®¾ç½®å¸ƒå±€
        south.setPreferredSize(new Dimension((width - 10) / 2, (height-50)/2));
        String site = (String) CacheUtils.get("site", "site");
        JLabel label = new JLabel(site + "机器");
        top.add(label);
        JPanel jPanel = importDataService.FileUpload(jFrame,700,100);
        JButton btnImport = new JButton("导入");
        center.add(jPanel, new GBC(0, 0, 1, 1).setInsets(5));
        center.add(btnImport, new GBC(0, 1, 1, 1).setInsets(5));
        JLabel label1 = new JLabel("提示信息");
        JTextArea tips = new JTextArea(7, 30);
        tips.setEnabled(false);
        tips.setLineWrap(true);
        south.add(label1,BorderLayout.NORTH);
        south.add(tips,BorderLayout.CENTER);
        btnImport.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                // åˆ›å»ºæ—‹è½¬ç­‰å¾…框的实例(假设WaitUtil是一个自定义的Swing组件)
                final WaitUtil waitUtil = new WaitUtil(imgPath, "数据正在导入,请稍候");
                // å¼€å§‹ä¸Šä¼ æ–‡ä»¶çš„异步任务
                SwingWorker<String, Void> sw = new SwingWorker<String, Void>() {
                    @Override
                    protected String doInBackground() throws Exception {
                        String flag =  importDataService.UnzipFile();
                        return flag;
                    }
                    @Override
                    protected void done() {
                        try {
                            // èŽ·å–ä¸Šä¼ ç»“æžœï¼ˆåœ¨è¿™ä¸ªä¾‹å­ä¸­ï¼Œæˆ‘ä»¬å‡è®¾ä¸Šä¼ æ–¹æ³•è¿”å›žBoolean类型)
                            String uploadSucceeded = get();
                            // åˆ·æ–°è¡¨æ ¼æ•°æ®ï¼ˆå¦‚果上传成功)
                            if (uploadSucceeded.equals("true")) {
                                waitUtil.dispose();
                                System.out.println("导入成功时间" + new Date());
                            } else {
                                waitUtil.dispose();
                                JOptionPane.showMessageDialog(null, uploadSucceeded, "提示", JOptionPane.ERROR_MESSAGE);
                            }
                        } catch (Exception ex) {
                            ex.printStackTrace();
                            waitUtil.dispose();
                        }
                    }
                };
                // æ‰§è¡Œå¼‚步任务
                sw.execute();
                waitUtil.setVisible(true);
            }
        });
        left.add(top,BorderLayout.NORTH);
        left.add(center,BorderLayout.CENTER);
        left.add(south,BorderLayout.SOUTH);
        JLabel label2 = new JLabel("导入记录");
        List<DataImportDto> list  = new ArrayList<>();
        List<ColumnDto> columnDto = new ArrayList<>();
        //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
        columnDto.add(new ColumnDto("序号", "", 200, "autoCreate", false, null,null));
        columnDto.add(new ColumnDto("数据源", "importLocal", 200, null, false, null,null));
        columnDto.add(new ColumnDto("导入时间", "importDate", 200, null, false, null,null));
        columnDto.add(new ColumnDto("操作人", "importStaff", 200, null, false, null,null));
        JTable table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        right.add(label2, BorderLayout.NORTH);
        right.add(new JScrollPane(table), BorderLayout.CENTER);
        panel.add(left,BorderLayout.WEST);
        panel.add(right, BorderLayout.CENTER);
        return panel;
    }
}
src/main/java/com/example/client/service/DataSyncManageService.java
File was deleted
src/main/java/com/example/client/service/DismantTrackAddOrUpdate.java
@@ -33,13 +33,20 @@
    @Autowired
    private DjJdgzDismantTrackService djJdgzDismantTrackService;
    @Autowired
    private DjJdgzNetworkLevel3Service djJdgzNetworkLevel3Service;
    @Autowired
    private StatisDismantService statisDismantService;
    @Autowired
    private StatisDismant2Service statisDismant2Service;
    @Autowired
    private CabinService cabinService;
    private  JTable trackTable;
    private   List<ColumnDto> columnDto;
    private   DjJdgzNetworkLevel3 nowLevel3;
    private    List<DjJdgzDismantTrack> list;
    public JPanel createTrack(Integer width, Integer height, DjJdgzNetworkLevel3 djJdgzNetworkLevel3,JFrame frame) {
        nowLevel3 = djJdgzNetworkLevel3;
        JPanel panel = new JPanel(new BorderLayout());
        panel.setPreferredSize(new Dimension(width, height));
@@ -52,23 +59,25 @@
        panel.add(centerJpanel, BorderLayout.CENTER);
        panel.add(topJpanel, BorderLayout.NORTH);
        JButton btnTj = new JButton("统计报表");
        JButton btnTjz = new JButton("拆卸进度统计总表");
        JButton btnTj = new JButton("拆卸进度详情表");
        JButton btnExport = new JButton("导出拆卸报表");
        JButton btnSave = new JButton("保存");
        JButton btnImport = new JButton("批量导入");
        topJpanel.add(btnTjz);
        topJpanel.add(btnTj);
        topJpanel.add(btnExport);
        topJpanel.add(btnSave);
        topJpanel.add(btnImport);
        List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(djJdgzNetworkLevel3.getId(), null);
        list = djJdgzDismantTrackService.getList(nowLevel3.getId(), null);
        List<TableButton> buttonList = new ArrayList<>();
        buttonList.add(new TableButton("edit", "编辑"));
        JComboBoxItem[] cabinList = cabinService.getList();
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成"),
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成"),
        };
        // åˆ›å»ºå·¦ä¾§è¡¨æ ¼
@@ -92,11 +101,11 @@
        columnDto.add(new ColumnDto("入库时间", "warehouseTime", 130, "selectDate", true, null, null));
        columnDto.add(new ColumnDto("入库人员", "warehouseStaff", 120, null, true, null, null));
        columnDto.add(new ColumnDto("当前存放位置", "currentLocation", 160, null, true, null, null));
        columnDto.add(new ColumnDto("状态", "status", 120, "dict", true, null, statusList));
        columnDto.add(new ColumnDto("状态", "status", 120, "dicts", true, null, statusList));
        trackTable = CommonTable.createCommonTable(list, columnDto);
        trackTable.setRowHeight(25);
        trackTable.setAutoCreateRowSorter(true);
        trackTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
@@ -113,10 +122,16 @@
        trackTable = new ComplexTable(headerRows,body);
        CommonTable.setColumnType(columnDto, trackTable);*/
        btnTjz.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                statisDismantService.createTable(frame,nowLevel3.getLevel1NetworkId());
            }
        });
        btnTj.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                statisDismantService.createTable(frame,djJdgzNetworkLevel3.getLevel1NetworkId());
                statisDismant2Service.createTable(frame,nowLevel3.getLevel1NetworkId());
            }
        });
@@ -131,11 +146,11 @@
            @Override
            public void actionPerformed(ActionEvent e) {
                SysUser user = (SysUser) CacheUtils.get("user", "user");
                if (user.getTeamgroup()==null||user.getTeamgroup().equals(djJdgzNetworkLevel3.getTeamgroupId())){
                if (user.getTeamgroup()==null||user.getTeamgroup().equals(nowLevel3.getTeamgroupId().toString())){
                    CommonTable.saveTableList(list, trackTable, columnDto);
                    djJdgzDismantTrackService.save(list);
                }else{
                    JOptionPane.showMessageDialog(null, "不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                    JOptionPane.showMessageDialog(null, "当前用户不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                }
            }
        });
@@ -143,7 +158,7 @@
        btnImport.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                importDismantTrackService.FileUpload(djJdgzNetworkLevel3.getId(),frame);
                importDismantTrackService.FileUpload(nowLevel3.getId(),frame);
            }
        });
@@ -156,10 +171,11 @@
        return panel;
    }
    public void refreshTable(Long level3Id){
        List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(level3Id, null);
        nowLevel3 = djJdgzNetworkLevel3Service.get(level3Id);
        list = djJdgzDismantTrackService.getList(level3Id, null);
        CommonTable.refreshTable(list, columnDto, trackTable);
        trackTable.setRowHeight(25);
        trackTable.setAutoCreateRowSorter(true);
        trackTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
src/main/java/com/example/client/service/DismantTrackService.java
@@ -57,7 +57,7 @@
        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
        JComboBoxItem[] cabinList = cabinService.getList();
        String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理"
                "改装", "加装", "换装", "改进性修理",""
        };
        List<DjJdgzShip> shipList = djJdgzShipService.getList();
        Map<String, Long> shipMap = new HashMap<>();
@@ -113,9 +113,9 @@
        list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
        columnDto.add(new ColumnDto("序号", "", 60, "autoCreate", false, null, null));
        columnDto.add(new ColumnDto("设备名称", "name", 112, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 100, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", 100, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("设备名称", "name", 110, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 120, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", 120, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("舱室", "cabinId", 100, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", 100, null, false, null, null));
@@ -136,7 +136,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -175,7 +175,7 @@
                        CommonTable.refreshTable(list, columnDto, subTable);
                        subTable.setRowHeight(25);
                        subTable.setAutoCreateRowSorter(true);
                        subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                        subTable.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent e) {
@@ -205,7 +205,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -233,7 +233,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -261,7 +261,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -284,7 +284,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
src/main/java/com/example/client/service/ExportDismantTrackService.java
@@ -48,8 +48,8 @@
        frame1.setLayout(layout);
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成"),
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成"),
        };
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        JComboBoxItem[] teamGroupList = sysTeamGroupClassService.getList();
src/main/java/com/example/client/service/ExportTrackRecordService.java
@@ -60,12 +60,12 @@
        frame1.setLayout(layout);
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成"),
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成"),
        };
        JComboBoxItem[] hasDelayRiskList = {
                new JComboBoxItem(0, "否"),
                new JComboBoxItem(1, "是"),
                new JComboBoxItem(0L, "否"),
                new JComboBoxItem(1L, "是"),
        };
        JComboBoxItem[] projectList = level1Service.getProjectList();
src/main/java/com/example/client/service/HandoverService.java
@@ -82,7 +82,7 @@
        table = CommonTable.createCommonTable(list[0], columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        comboBox.addItemListener(new ItemListener() {
@@ -92,7 +92,7 @@
                list[0] = handoverService.getList(projectId);
                CommonTable.refreshTable(list[0], columnDto,table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(table,jFrame,list[0]);
src/main/java/com/example/client/service/ImportDataService.java
@@ -39,6 +39,8 @@
    public JPanel FileUpload(JFrame frame, Integer width, Integer heigth) {
        JPanel jPanel = new JPanel();
        /*GridBagLayout layout = new GridBagLayout();
        jPanel.setLayout(layout);*/
        jPanel.setPreferredSize(new Dimension(width, heigth));
        JTable table = new JTable();
@@ -48,13 +50,15 @@
        JScrollPane scrolltable = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrolltable.setPreferredSize(new Dimension(width-150,heigth));
        scrolltable.setViewportView(table);
        scrolltable.getViewport().setBackground(Color.WHITE);
        JButton browseButton = new JButton("选择文件");
        jPanel.add(browseButton);
        jPanel.add(scrolltable);
        jPanel.add(browseButton);
        browseButton.addActionListener(new ActionListener() {
            @Override
src/main/java/com/example/client/service/ImportLevel3Service.java
@@ -51,7 +51,7 @@
    private String tmpPath;
    public void FileUpload(List<ColumnDto> columnDto, JTable subTable, JFrame jFrame) {
        frame = new JFrame("导入");
        frame = new JFrame("导入三级网络图");
        frame.setSize(900, 600);
        frame.setResizable(true);
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
@@ -89,7 +89,11 @@
            @Override
            public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                setText(truncateText(value.toString(), 15)); // æˆªæ–­æ–‡æœ¬
                if(value!=null){
                    setText(truncateText(value.toString(), 15)); // æˆªæ–­æ–‡æœ¬
                }else{
                    setText("");
                }
                return this;
            }
@@ -286,8 +290,8 @@
                                JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
                                JComboBoxItem[] cabinList = cabinService.getList();
                                String[] typeList = new String[]{
                                        "改装", "加装", "换装", "改进性修理"
                                };
                "改装", "加装", "换装", "改进性修理",""
        };
                                List<DjJdgzNetworkLevel3> list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
                                CommonTable.refreshTable(list, columnDto, subTable);
                                level3ManageService.tableModelListener(list, subTable, jFrame);
src/main/java/com/example/client/service/ImportTrackRecordService.java
New file
@@ -0,0 +1,404 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.dto.JComboBoxItem;
import com.example.client.utils.*;
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import com.example.server.progressTrack.model.DjJdgzTrackRecord;
import com.example.server.progressTrack.service.*;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import com.example.server.utils.DownLoadTmpFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Set;
@Service
public class ImportTrackRecordService {
    private JTable table;
    private JFrame frame;
    @Value("${data.imgDir}")
    private String imgPath;
    private File selectedFiles;
    @Autowired
    private Level3ManageService level3ManageService;
    @Autowired
    private DjJdgzNetworkLevel3Service level3Service;
    @Autowired
    private DjJdgzNetworkLevel2ListService level2ListService;
    @Autowired
    private DjJdgzNetworkLevel2Service level2Service;
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    @Autowired
    private CabinService cabinService;
    @Autowired
    private DjJdgzNetworkLevel1Service level1Service;
    @Autowired
    private DjJdgzTrackRecordService djJdgzTrackRecordService;
    @Value("${data.tmp-path}")
    private String tmpPath;
    public void FileUpload(List<ColumnDto> columnDto, JTable subTable, JFrame jFrame) {
        frame = new JFrame("导入跟踪记录");
        frame.setSize(900, 600);
        frame.setResizable(true);
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
        GridBagLayout layout = new GridBagLayout();
        frame.setLayout(layout);
        table = new JTable();
        table.setRowHeight(40);
        DefaultTableModel model = new DefaultTableModel();
        String[] columnIdentifiers = {"文件地址", "操作"};//表头
        final Long[] level1Id = {null};
        final Long[] level2Id = {null};
        final Long[] level2NodeId = {null};
        JComboBoxItem[] projectList = level1Service.getProjectList();
        JComboBoxItem[] level2List = level2Service.getLevel2List(projectList[0].getId());
        JComboBoxItem[] level2NodeList = level2ListService.getNode(level2List[0].getId());
        level1Id[0] = projectList[0].getId();
        level2Id[0] = level2List[0].getId();
        level2NodeId[0] = level2NodeList[0].getId();
        JLabel label0 = new JLabel("工程");
        JComboBox<JComboBoxItem> comboBox0 = new JComboBox<>(projectList);
        JLabel label1 = new JLabel("二级网络图");
        JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>();
        comboBox1.setModel(new DefaultComboBoxModel<>(level2List));
        JLabel label2 = new JLabel("二级网络图节点");
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(level2NodeList);
        comboBox2.setRenderer(new DefaultListCellRenderer() {
            @Override
            public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                if(value!=null){
                    setText(truncateText(value.toString(), 15)); // æˆªæ–­æ–‡æœ¬
                }else{
                    setText("");
                }
                return this;
            }
            private String truncateText(String text, int maxLength) {
                if (text.length() > maxLength) {
                    return text.substring(0, maxLength - 3) + "...";
                }
                return text;
            }
        });
        JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(null);
        JLabel JLabel5 = new JLabel("专业");
        MultiSelectComboBox comboBox4 = new MultiSelectComboBox(teamList1);
        comboBox4.setPreferredSize(new Dimension(185, 28));
        JButton downloadbtn = new JButton("跟踪记录导入模板生成");
        comboBox0.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem selectedItem = (JComboBoxItem) comboBox0.getSelectedItem();
                    if (selectedItem != null) {
                        long selectedId = selectedItem.getId();
                        level1Id[0] = selectedId;
                        JComboBoxItem[] level2List = level2Service.getLevel2List(selectedId);
                        comboBox1.setModel(new DefaultComboBoxModel<>(level2List));
                        comboBox2.setModel(new DefaultComboBoxModel<>());
                    }
                }
            }
        });
        comboBox1.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem selectedItem = (JComboBoxItem) comboBox1.getSelectedItem();
                    if (selectedItem != null) {
                        long selectedId = selectedItem.getId();
                        level2Id[0] = selectedId;
                        JComboBoxItem[] level2NodeList = level2ListService.getNode(selectedId);
                        comboBox2.setModel(new DefaultComboBoxModel<>(level2NodeList));
                    }
                }
            }
        });
        comboBox2.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem selectedItem = (JComboBoxItem) comboBox2.getSelectedItem();
                    if (selectedItem != null) {
                        long selectedId = selectedItem.getId();
                        level2NodeId[0] = selectedId;
                    }
                }
            }
        });
        downloadbtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JComboBoxItem selectedItem0 = (JComboBoxItem) comboBox0.getSelectedItem();
                JComboBoxItem selectedItem1 = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem selectedItem2 = (JComboBoxItem) comboBox2.getSelectedItem();
                Long level1Id = selectedItem0 == null? null:selectedItem0.getId();
                Long level2Id = selectedItem1 == null? null:selectedItem1.getId();
                Long level2NodeId = selectedItem2 == null? null:selectedItem2.getId();
                Set<JComboBoxItem> selectedItems = comboBox4.getSelectedItems();
                StringBuilder selectedIds = new StringBuilder();
                for (JComboBoxItem item : selectedItems) {
                    selectedIds.append(item.getId()).append(",");
                }
                List<DjJdgzTrackRecord> list  = djJdgzTrackRecordService.getListByImport(level1Id,level2Id,level2NodeId,selectedIds.toString());
                DownLoadTmpFile.buildTrack(list,tmpPath + "跟踪记录导入模板.xlsx", frame);
            }
        });
        JScrollPane scrolltable = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrolltable.setViewportView(table);
        scrolltable.getViewport().setBackground(Color.WHITE);
        JButton browseButton = new JButton("选择文件");
        JButton uploadButton = new JButton("上传文件");
        frame.add(label0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame.add(comboBox0, new GBC(1, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setFill(GBC.BOTH).setInsets(5));
        frame.add(label1, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame.add(comboBox1, new GBC(1, 1, 2, 1).setAnchor(GBC.SOUTHWEST).setFill(GBC.BOTH).setInsets(5));
        frame.add(label2, new GBC(0, 2, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame.add(comboBox2, new GBC(1, 2, 2, 1).setAnchor(GBC.SOUTHWEST).setFill(GBC.BOTH).setInsets(5));
        frame.add(JLabel5, new GBC(0, 3, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame.add(comboBox4, new GBC(1, 3, 3, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        frame.add(downloadbtn, new GBC(0, 4, 2, 1).setFill(GBC.BOTH).setInsets(5));
        frame.add(browseButton, new GBC(0, 5, 1, 1).setWeight(0, 1).setInsets(5));
        frame.add(scrolltable, new GBC(1, 5, 3, 1).setFill(GBC.BOTH).setWeight(0, 1).setInsets(5));
        frame.add(uploadButton, new GBC(0, 6, 4, 1).setWeight(1, 0));
        browseButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Boolean flag = true;
                // ä¿å­˜å½“前的外观设置
                LookAndFeel savedLookAndFeel = UIManager.getLookAndFeel();
                // è®¾ç½®æ–‡ä»¶é€‰æ‹©å™¨å¤–è§‚
                try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                JFileChooser fileChooser = new JFileChooser();
                fileChooser.setDialogTitle("选择文件");
                fileChooser.setPreferredSize(new Dimension(800, 500));
                fileChooser.setMultiSelectionEnabled(true);
                //恢复外观,避免改变所有组件外观
                try {
                    UIManager.setLookAndFeel(savedLookAndFeel);
                } catch (UnsupportedLookAndFeelException ed) {
                    ed.printStackTrace();
                }
                int result = fileChooser.showOpenDialog(frame);
                if (result == JFileChooser.FILES_ONLY) {
                    selectedFiles = fileChooser.getSelectedFile();
                    Integer oldNum = model.getRowCount();
                    String[][] data = new String[oldNum + 1][2];
                    for (int i = 0; i < oldNum; i++) {
                        data[i][0] = model.getValueAt(i, 0).toString();
                    }
                    String suffix = selectedFiles.getName().substring(selectedFiles.getName().lastIndexOf("."));
                    if (suffix.equals(".xlsx") || suffix.equals(".xls")) {
                        data[oldNum][0] = selectedFiles.getPath();
                    } else {
                        flag = false;
                    }
                    if (!flag) {
                        JOptionPane.showMessageDialog(null, "只能上传.xlsx或.xls的文件,且不超过2G", "提示", JOptionPane.WARNING_MESSAGE);
                        return;
                    }
                    model.setDataVector(data, columnIdentifiers);
                    table.setModel(model);
                    table.getColumnModel().getColumn(0).setPreferredWidth(600);
                    table.getColumnModel().getColumn(1).setPreferredWidth(100);
                    table.getColumnModel().getColumn(0).setCellRenderer(new TableViewRenderer());
                    table.getColumnModel().getColumn(1).setCellRenderer(new TableCellRendererButton());
                    table.getColumnModel().getColumn(1).setCellEditor(new TableCellEditorButton(null, null));
                } else {
                    Object[] options = {"OK ", "CANCEL "};
                    JOptionPane.showOptionDialog(null, "选择的文件不正确 ", "提示", JOptionPane.DEFAULT_OPTION,
                            JOptionPane.WARNING_MESSAGE, null, options, options[0]);
                }
            }
        });
        uploadButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                // åˆ›å»ºæ—‹è½¬ç­‰å¾…框的实例(假设WaitUtil是一个自定义的Swing组件)
                final WaitUtil waitUtil = new WaitUtil(imgPath, "文件正在导入,请稍候");
                // å¼€å§‹ä¸Šä¼ æ–‡ä»¶çš„异步任务
                SwingWorker<String, Void> sw = new SwingWorker<String, Void>() {
                    @Override
                    protected String doInBackground() throws Exception {
                        // ä¸Šä¼ æ–‡ä»¶çš„逻辑
                        StringBuilder result = new StringBuilder();
                        // ä»Žç¬¬ä¸€åˆ—(索引为0)获取数据
                        String data = model.getValueAt(0, 0).toString();
                        // å°†æ•°æ®å’Œæ¢è¡Œç¬¦æ‹¼æŽ¥åˆ°StringBuilder中
                        result.append(data);
                        String filePath = result.toString();
                        String flag = level3Service.importDiagramFromExcel(filePath, level1Id[0], level2Id[0], level2NodeId[0]);
                        return flag;
                    }
                    @Override
                    protected void done() {
                        try {
                            // èŽ·å–ä¸Šä¼ ç»“æžœï¼ˆåœ¨è¿™ä¸ªä¾‹å­ä¸­ï¼Œæˆ‘ä»¬å‡è®¾ä¸Šä¼ æ–¹æ³•è¿”å›žBoolean类型)
                            String uploadSucceeded = get();
                            // åˆ·æ–°è¡¨æ ¼æ•°æ®ï¼ˆå¦‚果上传成功)
                            if (uploadSucceeded.equals("true")) {
                                waitUtil.dispose();
                                frame.dispose();
                                JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
                                JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
                                JComboBoxItem[] cabinList = cabinService.getList();
                                String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理",""
        };
                                List<DjJdgzNetworkLevel3> list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
                                CommonTable.refreshTable(list, columnDto, subTable);
                                level3ManageService.tableModelListener(list, subTable, jFrame);
                                System.out.println("导入成功时间" + new Date());
                            } else {
                                waitUtil.dispose();
                                JOptionPane.showMessageDialog(null, uploadSucceeded, "提示", JOptionPane.ERROR_MESSAGE);
                            }
                        } catch (Exception ex) {
                            ex.printStackTrace();
                            waitUtil.dispose();
                        }
                    }
                };
                // æ‰§è¡Œå¼‚步任务
                sw.execute();
                waitUtil.setVisible(true);
            }
        });
        scrolltable.setTransferHandler(new TransferHandler() {
            private static final long serialVersionUID = 1L;
            @Override
            public boolean importData(JComponent comp, Transferable t) {
                try {
                    Boolean flag = true;
                    Object o = t.getTransferData(DataFlavor.javaFileListFlavor);
                    String filepath = o.toString();
                    if (filepath.startsWith("[")) {
                        filepath = filepath.substring(1);
                    }
                    if (filepath.endsWith("]")) {
                        filepath = filepath.substring(0, filepath.length() - 1);
                    }
                    String[] filepathArr = filepath.split(", ");
                    Integer oldNum = model.getRowCount();
                    String[][] data = new String[oldNum + filepathArr.length][2];
                    for (int i = 0; i < oldNum; i++) {
                        data[i][0] = model.getValueAt(i, 0).toString();
                    }
                    for (int i = 0; i < filepathArr.length; i++) {
                        if (filepathArr[i].contains(".xlsx") || filepathArr[i].contains(".xls")) {
                            data[i + oldNum][0] = filepathArr[i];
                        } else {
                            flag = false;
                            break;
                        }
                    }
                    if (!flag) {
                        JOptionPane.showMessageDialog(null, "只能上传.xlsx或.xls的文件,且不超过2G\"", "提示", JOptionPane.WARNING_MESSAGE);
                        return flag;
                    }
                    model.setDataVector(data, columnIdentifiers);
                    table.setModel(model);
                    table.getColumnModel().getColumn(0).setPreferredWidth(650);
                    table.getColumnModel().getColumn(1).setPreferredWidth(80);
                    table.getColumnModel().getColumn(0).setCellRenderer(new TableViewRenderer());
                    table.getColumnModel().getColumn(1).setCellRenderer(new TableCellRendererButton());
                    table.getColumnModel().getColumn(1).setCellEditor(new TableCellEditorButton(null, null));
                    return true;
                } catch (Exception e) {
                    e.printStackTrace();
                }
                return false;
            }
            @Override
            public boolean canImport(JComponent comp, DataFlavor[] flavors) {
                for (int i = 0; i < flavors.length; i++) {
                    if (DataFlavor.javaFileListFlavor.equals(flavors[i])) {
                        return true;
                    }
                }
                return false;
            }
        });
    }
}
src/main/java/com/example/client/service/Level1ManageService.java
@@ -75,7 +75,7 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        final Boolean[] isFirstLoadData = {true};
@@ -87,7 +87,7 @@
                if (!isFirstLoadData[0]) {
                    CommonTable.refreshTable(list, columnDto,table);
                    table.setRowHeight(25);
                    table.setAutoCreateRowSorter(true);
                    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                    tableModelListener(table,jFrame);
@@ -140,9 +140,9 @@
        frame1.setLayout(layout);
        JComboBoxItem[] shipList = djJdgzShipService.getListByItem();
        JComboBoxItem[] levelList = {
                new JComboBoxItem(1, "一级"),
                new JComboBoxItem(2, "二级"),
                new JComboBoxItem(3, "三级"),
                new JComboBoxItem(1L, "一级"),
                new JComboBoxItem(1L, "二级"),
                new JComboBoxItem(1L, "三级"),
        };
        JLabel JLabel1 = new JLabel("玄号");
@@ -205,12 +205,12 @@
            data.setStartDate(sdFormat.format(beginDate.getDate()));
            data.setYear((Integer) yearPicker.getValue());
            data.setAdventDay(7);
            data.setProjectName(ship.getName()+"-"+yearPicker.getValue() + "-" + level.getName());
            data.setProjectName(level.getName()+"修理"+ship.getName()+"项目");
            level1Service.insert(data);
            list = level1Service.getList(ship.getId());
            CommonTable.refreshTable(list,columnDto,table);
            table.setRowHeight(25);
            table.setAutoCreateRowSorter(true);
            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            tableModelListener(table,jFrame);
            frame1.dispose();
src/main/java/com/example/client/service/Level2AddOrUpdate.java
@@ -115,10 +115,10 @@
        List<TableButton> buttonList = new ArrayList<>();
        buttonList.add(new TableButton("del", "删除"));
        columnDto.add(new ColumnDto("序号", "", 50, "autoCreate", false, null,null));
        columnDto.add(new ColumnDto("序号", "", 50, "autoCreate", true, null,null));
        //columnDto.add(new ColumnDto("工程专业", "majorName", 180, null, false, null,null));
        columnDto.add(new ColumnDto("节点名称", "ProcessName", 160, null, false, null,null));
        columnDto.add(new ColumnDto("要求完成时间", "requiredCompletionTime", 120, null, false, null,null));
        columnDto.add(new ColumnDto("节点名称", "ProcessName", 160, null, true, null,null));
        columnDto.add(new ColumnDto("要求完成时间", "requiredCompletionTime", 120, "selectDate", true, null,null));
        columnDto.add(new ColumnDto("操作", "", 85, "", true, buttonList,null));
        JTable subTable = CommonTable.createCommonTable(list, columnDto);
src/main/java/com/example/client/service/Level2ManageService.java
@@ -89,7 +89,7 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        final Boolean[] isFirstLoadData = {true};
@@ -101,7 +101,7 @@
                if (!isFirstLoadData[0]) {
                    CommonTable.refreshTable(list, columnDto, table);
                    table.setRowHeight(25);
                    table.setAutoCreateRowSorter(true);
                    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                    tableModelListener(table, jFrame);
@@ -207,7 +207,7 @@
            list = level2Service.getList(level1Data.getShipId());
            CommonTable.refreshTable(list, columnDto, table);
            table.setRowHeight(25);
            table.setAutoCreateRowSorter(true);
            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            tableModelListener(table, jFrame);
            frame1.dispose();
src/main/java/com/example/client/service/Level3ManageService.java
@@ -75,7 +75,7 @@
        JComboBoxItem[] cabinList = cabinService.getList();
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理"
                "改装", "加装", "换装", "改进性修理",""
        };
        JLabel JLabel0 = new JLabel("工程");
@@ -130,20 +130,20 @@
        columnDto = new ArrayList<>();
        //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
        columnDto.add(new ColumnDto("序号", "", (width - 10) / 10, "autoCreate", false, null, null));
        columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 10, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", (width - 10) / 10, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", (width - 10) / 10, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("舱室", "cabinId", (width - 10) / 10, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", (width - 10) / 10, null, false, null, null));
        columnDto.add(new ColumnDto("一级网络图节点名称", "level1NodeName", (width - 10) / 10, null, false, null, null));
        columnDto.add(new ColumnDto("二级网络图节点名称", "level2NodeName", (width - 10) / 10, null, false, null, null));
        columnDto.add(new ColumnDto("三级网络图名称", "name", (width - 10) / 10, null, false, null, null));
        columnDto.add(new ColumnDto("操作", "", (width - 10) / 10, "", true, buttonList, null));
        columnDto.add(new ColumnDto("序号", "", 176, "autoCreate", false, null, null));
        //columnDto.add(new ColumnDto("工程", "ProjectName", 150, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 176, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", 176, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("舱室", "cabinId", 176, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", 176, null, false, null, null));
        columnDto.add(new ColumnDto("一级网络图节点名称", "level1NodeName", 176, null, false, null, null));
        columnDto.add(new ColumnDto("二级网络图节点名称", "level2NodeName", 185, null, false, null, null));
        columnDto.add(new ColumnDto("三级网络图名称", "name", 176, null, false, null, null));
        columnDto.add(new ColumnDto("操作", "", 190, "", true, buttonList, null));
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        comboBox.addItemListener(new ItemListener() {
@@ -159,7 +159,7 @@
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(list, table, jFrame);
            }
@@ -186,7 +186,7 @@
                        list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                        CommonTable.refreshTable(list, columnDto, table);
                        table.setRowHeight(25);
                        table.setAutoCreateRowSorter(true);
                        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                        tableModelListener(list, table, jFrame);
@@ -208,7 +208,7 @@
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(list, table, jFrame);
            }
@@ -226,7 +226,7 @@
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(list, table, jFrame);
            }
@@ -244,7 +244,7 @@
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(list, table, jFrame);
            }
@@ -257,7 +257,7 @@
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(list, table, jFrame);
            }
@@ -316,7 +316,7 @@
        JComboBoxItem[] cabinList = cabinService.getList();
        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
        String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理"
                "改装", "加装", "换装", "改进性修理",""
        };
        JLabel JLabel1 = new JLabel("工程");
@@ -454,7 +454,7 @@
            list = level3Service.getList(level1Data.getShipId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
            CommonTable.refreshTable(list, columnDto, table);
            table.setRowHeight(25);
            table.setAutoCreateRowSorter(true);
            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            tableModelListener(list, table, jFrame);
            frame1.dispose();
src/main/java/com/example/client/service/Level3View2Service.java
New file
@@ -0,0 +1,263 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.dto.JComboBoxItem;
import com.example.client.model.TableButton;
import com.example.client.utils.CommonTable;
import com.example.client.utils.GBC;
import com.example.client.utils.MultiSelectComboBox;
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.Dto.TableNodeDto;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel1;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import com.example.server.progressTrack.model.DjJdgzShip;
import com.example.server.progressTrack.service.*;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.awt.event.*;
import java.util.List;
import java.util.*;
@Service
public class Level3View2Service {
    @Autowired
    private DjJdgzNetworkLevel3Service level3Service;
    @Autowired
    private DjJdgzShipService djJdgzShipService;
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    @Autowired
    private CabinService cabinService;
    private JTable table;
    private List<TableNodeDto> list;
    private Map<String, Long> shipMap = new HashMap<>();
    private List<ColumnDto> columnDto;
    public JPanel createTable(Integer width, Integer height) {
        JPanel panel = new JPanel();
        JPanel topJpanel = new JPanel();
        GridBagLayout layout = new GridBagLayout();
        topJpanel.setLayout(layout);
        topJpanel.setPreferredSize(new Dimension(width, 100));
        topJpanel.setBackground(Color.WHITE);
        JPanel centerJpanel = new JPanel();
        centerJpanel.setPreferredSize(new Dimension(width - 20, height - 100));
        centerJpanel.setBackground(Color.WHITE);
        panel.add(topJpanel, BorderLayout.NORTH);
        panel.add(centerJpanel, BorderLayout.CENTER);
        List<DjJdgzShip> shipList = djJdgzShipService.getList();
        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
        JComboBoxItem[] cabinList = cabinService.getList();
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理",""
        };
        JLabel JLabel0 = new JLabel("工程");
        JComboBox comboBox = new JComboBox();
        comboBox.setPreferredSize(new Dimension(185, 28));
        JLabel JLabel1 = new JLabel("部门");
        JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(deptList);
        comboBox1.setPreferredSize(new Dimension(185, 28));
        JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(deptList[0].getId());
        JLabel JLabel2 = new JLabel("专业");
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(teamList1);
        comboBox2.setPreferredSize(new Dimension(185, 28));
        JLabel JLabel3 = new JLabel("舱室");
        JComboBox<JComboBoxItem> comboBox3 = new JComboBox<>(cabinList);
        comboBox3.setPreferredSize(new Dimension(185, 28));
        JLabel JLabel4 = new JLabel("类别");
        JComboBox<String> comboBox4 = new JComboBox<>(typeList);
        comboBox4.setPreferredSize(new Dimension(185, 28));
        JTextField sb = new JTextField(16);
        JButton query = new JButton("查询");
        topJpanel.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        topJpanel.add(JLabel1, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(comboBox1, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        topJpanel.add(JLabel2, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(comboBox2, new GBC(5, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        topJpanel.add(JLabel3, new GBC(6, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(comboBox3, new GBC(7, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        topJpanel.add(JLabel4, new GBC(8, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(comboBox4, new GBC(9, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        topJpanel.add(sb, new GBC(0, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        topJpanel.add(query, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        list = level3Service.getNodeList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
        columnDto = new ArrayList<>();
        //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
        columnDto.add(new ColumnDto("序号", "", 227, "autoCreate", false, null, null));
        //columnDto.add(new ColumnDto("工程", "ProjectName", 150, null, false, null, null));
        columnDto.add(new ColumnDto("设备名称", "name", 227, null, true, null, null));
        columnDto.add(new ColumnDto("设备拆卸出舱", "time1Color", 227, "Circle", true, null, null));
        columnDto.add(new ColumnDto("设备分交", "time2Color", 227, "Circle", true, null, null));
        columnDto.add(new ColumnDto("拆检鉴定", "time3Color", 227, "Circle", true, null, null));
        columnDto.add(new ColumnDto("设备返厂", "time4Color", 227, "Circle", true, null, null));
        columnDto.add(new ColumnDto("回装", "time5Color", 227, "Circle", true, null, null));
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        comboBox.addItemListener(new ItemListener() {
            public void itemStateChanged(final ItemEvent event) {
                String content = comboBox.getSelectedItem().toString();
                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                String type = comboBox4.getSelectedItem().toString();
                Long shipId = shipMap.get(content);
                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            }
        });
        comboBox1.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem selectedItem = (JComboBoxItem) comboBox1.getSelectedItem();
                    if (selectedItem.getId() != null) {
                        long selectedId = selectedItem.getId();
                        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(selectedId);
                        comboBox2.setModel(new DefaultComboBoxModel<>(teamList));
                        comboBox2.setSelectedIndex(0);
                        String content = comboBox.getSelectedItem().toString();
                        JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                        JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                        JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                        String type = comboBox4.getSelectedItem().toString();
                        Long shipId = shipMap.get(content);
                        list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                        CommonTable.refreshTable(list, columnDto, table);
                        table.setRowHeight(25);
                        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                    }
                }
            }
        });
        comboBox2.addItemListener(new ItemListener() {
            public void itemStateChanged(final ItemEvent event) {
                String content = comboBox.getSelectedItem().toString();
                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                String type = comboBox4.getSelectedItem().toString();
                Long shipId = shipMap.get(content);
                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            }
        });
        comboBox3.addItemListener(new ItemListener() {
            public void itemStateChanged(final ItemEvent event) {
                String content = comboBox.getSelectedItem().toString();
                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                String type = comboBox4.getSelectedItem().toString();
                Long shipId = shipMap.get(content);
                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            }
        });
        comboBox4.addItemListener(new ItemListener() {
            public void itemStateChanged(final ItemEvent event) {
                String content = comboBox.getSelectedItem().toString();
                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                String type = comboBox4.getSelectedItem().toString();
                Long shipId = shipMap.get(content);
                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null);
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            }
        });
        query.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                list = level3Service.getNodeList(null, null, null, null, null,sb.getText());
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            }
        });
        for (int i = 0; i < shipList.size(); i++) {
            shipMap.put(shipList.get(i).getShipNo(), shipList.get(i).getId());
            comboBox.addItem(shipList.get(i).getShipNo());
        }
        comboBox.setSelectedItem(shipList.get(0).getShipNo());
        JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setViewportView(table);
        scrollPane.getViewport().setBackground(Color.WHITE);
        scrollPane.setPreferredSize(new Dimension(width - 20, height - 120));
        centerJpanel.add(scrollPane);
        return panel;
    }
}
src/main/java/com/example/client/service/MenuService.java
@@ -30,11 +30,15 @@
    @Autowired
    private Level3ViewService level3ViewService;
    @Autowired
    private Level3View2Service level3View2Service;
    @Autowired
    private TrackRecordManageService trackRecordManageService;
    @Autowired
    private HandoverService handoverService;
    @Autowired
    private DataSyncManageService dataSyncManageService;
    private DataImportManageService dataImportManageService;
    @Autowired
    private DataExportManageService dataExportManageService;
    @Autowired
    private UserManageService userManageService;
    @Autowired
@@ -43,6 +47,8 @@
    private  SubunitService subunitService;
    @Autowired
    private  TeamGroupManageService teamGroupManageService;
    @Autowired
    private  ConfigManageService configManageService;
    @Autowired
    private Main main;
@@ -99,7 +105,7 @@
                        JPanel level3Manage = level3ManageService.createTable(width, height, frame);
                        main.showTab("三级网络图管理", level3Manage, tree);
                    } else if (nodeName.equals("三级网络图查看")) {
                        JPanel level3View = level3ViewService.createTable(width, height);
                        JPanel level3View = level3View2Service.createTable(width, height);
                        main.showTab("三级网络图查看", level3View, tree);
                    } else if (nodeName.equals("项目进度表")) {
                        JPanel trackRecord = trackRecordManageService.createTable(width, height, frame);
@@ -107,10 +113,13 @@
                    } else if (nodeName.equals("交接情况")) {
                        JPanel handover = handoverService.createTable(width, height, frame);
                        main.showTab("交接情况", handover, tree);
                    } else if (nodeName.equals("数据同步")) {
                        JPanel dataSync = dataSyncManageService.createTable(width, height, frame);
                        main.showTab("数据同步", dataSync, tree);
                    } else if (nodeName.equals("用户管理")) {
                    } else if (nodeName.equals("数据导入")) {
                        JPanel dataImport = dataImportManageService.createTable(width, height, frame);
                        main.showTab("数据导入", dataImport, tree);
                    } else if (nodeName.equals("数据导出")) {
                        JPanel dataExport = dataExportManageService.createTable(width, height, frame);
                        main.showTab("数据导出", dataExport, tree);
                    }else if (nodeName.equals("用户管理")) {
                        JPanel user = userManageService.createTable(width, height, frame);
                        main.showTab("用户管理", user, tree);
                    } else if (nodeName.equals("拆卸进度表")) {
@@ -121,7 +130,10 @@
                        main.showTab("子部件配置", subunit, tree);
                    }else if (nodeName.equals("专业管理")) {
                        JPanel teamGroup = teamGroupManageService.createTable(width, height, frame);
                        main.showTab("子部件配置", teamGroup, tree);
                        main.showTab("专业管理", teamGroup, tree);
                    }else if (nodeName.equals("平台配置")) {
                        JPanel config = configManageService.createTable(width, height, frame);
                        main.showTab("平台配置", config, tree);
                    }
                }
            }
src/main/java/com/example/client/service/ProgressPromptService.java
@@ -42,7 +42,7 @@
        //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
        columnDto.add(new ColumnDto("工程名称", "ProjectName", 280, null, false, null,null));
        columnDto.add(new ColumnDto("班组专业", "teamGroupName", 150, null, false, null,null));
        columnDto.add(new ColumnDto("班组专业", "teamgroupName", 150, null, false, null,null));
        columnDto.add(new ColumnDto("一级节点", "level1NodeName", 150, null, false, null,null));
        columnDto.add(new ColumnDto("二级节点", "level2NodeName", 150, null, false, null,null));
        columnDto.add(new ColumnDto("项目名称", "level3NetworkName", 150, null, false, null,null));
@@ -52,7 +52,7 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JScrollPane scrollTable = new JScrollPane(table);
        frame1.add(scrollTable);
src/main/java/com/example/client/service/StatisDismant2Service.java
New file
@@ -0,0 +1,249 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.dto.JComboBoxItem;
import com.example.client.utils.CommonTable;
import com.example.client.utils.ComplexHeaderUI;
import com.example.client.utils.ComplexTable;
import com.example.client.utils.ComplexTableUI;
import com.example.server.progressTrack.Dto.StatistDismantDto;
import com.example.server.progressTrack.model.DjJdgzShip;
import com.example.server.progressTrack.service.DjJdgzDismantTrackService;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Vector;
@Service
public class StatisDismant2Service {
    @Autowired
    private DjJdgzDismantTrackService djJdgzDismantTrackService;
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    public void createTable(JFrame jFrame, Long level1Id) {
        JFrame frame1 = new JFrame("拆卸进度统计详情表");
        frame1.setSize(1500, 800);
        frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame1.setLocationRelativeTo(null);
        frame1.setVisible(true);
        frame1.addWindowListener(new WindowAdapter() {
            //添加第二个界面的关闭事件:
            public void windowClosing(WindowEvent e) {
                //添加事件:
                jFrame.setEnabled(true);//将主界面再设置为可操作的
            }
        });
        JPanel topJpanel = new JPanel();
        topJpanel.setPreferredSize(new Dimension(1500, 40));
        topJpanel.setBackground(Color.WHITE);
        JPanel centerJpanel = new JPanel();
        centerJpanel.setPreferredSize(new Dimension(1500 - 20, 800 - 40));
        centerJpanel.setBackground(Color.WHITE);
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        JLabel JLabel1 = new JLabel("部门");
        JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(deptList);
        comboBox1.setPreferredSize(new Dimension(185, 28));
        comboBox1.setSelectedIndex(1);
        JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(deptList[1].getId());
        JLabel JLabel2 = new JLabel("专业");
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(teamList1);
        comboBox2.setPreferredSize(new Dimension(185, 28));
        topJpanel.add(JLabel1);
        topJpanel.add(comboBox1);
        topJpanel.add(JLabel2);
        topJpanel.add(comboBox2);
        final List<StatistDismantDto>[] list = new List[]{djJdgzDismantTrackService.getStatist2(level1Id, deptList[1].getId())};
        Object[][] headerRows = new Object[2][9];
        headerRows[0] = new Object[]{"舱室", "总数", ComplexTable.mergeCellX, "拆卸进度完成", ComplexTable.mergeCellX, "子部件", ComplexTable.mergeCellX, ComplexTable.mergeCellX, ComplexTable.mergeCellX,};
        //此处2-5是不会显示出来的,因为1-4向下合并了一行 + å‘右合并了一列  ï¼Œ è€Œ2-5被这个矩形范围包括了
        headerRows[1] = new Object[]{ComplexTable.mergeCellY, "设备", "子部件", "设备", "子部件", "已拆卸", "已出舱", "已退重", "已入库"};
        String[][] body = new String[list[0].size()][9];
        for (int i = 0; i < list[0].size(); i++) {
            StatistDismantDto data = list[0].get(i);
            body[i][0] = data.getName();
            body[i][1] = String.valueOf(data.getSbsl());
            body[i][2] = String.valueOf(data.getZbjsl());
            body[i][3] = String.valueOf(data.getSbcxsl());
            body[i][4] = String.valueOf(data.getZbjcxsl());
            body[i][5] = String.valueOf(data.getDismantsl());
            body[i][6] = String.valueOf(data.getExitsl());
            body[i][7] = String.valueOf(data.getReturnsl());
            body[i][8] = String.valueOf(data.getWarehousesl());
        }
        JTable jTable = new ComplexTable(headerRows, body, 160);
        JScrollPane scrollTable = new JScrollPane(jTable);
        scrollTable.setPreferredSize(new Dimension(1500 - 20, 800 - 40));
        centerJpanel.add(scrollTable);
        frame1.add(topJpanel, BorderLayout.NORTH);
        frame1.add(centerJpanel, BorderLayout.CENTER);
        comboBox1.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem selectedItem = (JComboBoxItem) comboBox1.getSelectedItem();
                    if (selectedItem != null && selectedItem.getId() != null) {
                        long selectedId = selectedItem.getId();
                        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(selectedId);
                        comboBox2.setModel(new DefaultComboBoxModel<>(teamList));
                        comboBox2.setSelectedIndex(0);
                        JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                        JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                        Long id = null;
                        if (team.getId() != null) {
                            id = team.getId();
                        } else {
                            id = dept.getId();
                        }
                        list[0] = djJdgzDismantTrackService.getStatist2(level1Id, id);
                        Object[][] headerRows = new Object[2][9];
                        headerRows[0] = new Object[]{"部门/专业", "总数", ComplexTable.mergeCellX, "拆卸进度完成", ComplexTable.mergeCellX, "子部件", ComplexTable.mergeCellX, ComplexTable.mergeCellX, ComplexTable.mergeCellX,};
                        //此处2-5是不会显示出来的,因为1-4向下合并了一行 + å‘右合并了一列  ï¼Œ è€Œ2-5被这个矩形范围包括了
                        headerRows[1] = new Object[]{ComplexTable.mergeCellY, "设备", "子部件", "设备", "子部件", "已拆卸", "已出舱", "已退重", "已入库"};
                        String[][] body = new String[list[0].size()][9];
                        for (int i = 0; i < list[0].size(); i++) {
                            StatistDismantDto data = list[0].get(i);
                            body[i][0] = data.getName();
                            body[i][1] = String.valueOf(data.getSbsl());
                            body[i][2] = String.valueOf(data.getZbjsl());
                            body[i][3] = String.valueOf(data.getSbcxsl());
                            body[i][4] = String.valueOf(data.getZbjcxsl());
                            body[i][5] = String.valueOf(data.getDismantsl());
                            body[i][6] = String.valueOf(data.getExitsl());
                            body[i][7] = String.valueOf(data.getReturnsl());
                            body[i][8] = String.valueOf(data.getWarehousesl());
                        }
                        Vector<Vector<Object>> dataVector = new Vector<>();
                        for (Object[] row : body) {
                            dataVector.add(new Vector<>(Arrays.asList(row)));
                        }
                        Vector<Object> columnIdentifiers = new Vector<>(Arrays.asList(headerRows[1]));
                        DefaultTableModel model = (DefaultTableModel) jTable.getModel();
                        model.setDataVector(dataVector, columnIdentifiers);
                        // è®¾ç½®åˆ—宽
                        for (int i = 0; i < headerRows[1].length; i++) {
                            jTable.getColumnModel().getColumn(i).setPreferredWidth(160);
                        }
                        // è®¾ç½®è¡¨å¤´UI
                        jTable.getTableHeader().setUI(new ComplexHeaderUI(headerRows, jTable));
                        // è®¾ç½®è¡¨æ ¼UI
                        jTable.setUI(new ComplexTableUI(body, jTable));
                        // é‡æ–°æ¸²æŸ“表格
                        jTable.repaint();
                    }
                }
            }
        });
        comboBox2.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
                    JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                    Long id = null;
                    if (team.getId() != null) {
                        id = team.getId();
                    } else {
                        id = dept.getId();
                    }
                    list[0] = djJdgzDismantTrackService.getStatist2(level1Id, id);
                    Object[][] headerRows = new Object[2][9];
                    headerRows[0] = new Object[]{"部门/专业", "总数", ComplexTable.mergeCellX, "拆卸进度完成", ComplexTable.mergeCellX, "子部件", ComplexTable.mergeCellX, ComplexTable.mergeCellX, ComplexTable.mergeCellX,};
                    //此处2-5是不会显示出来的,因为1-4向下合并了一行 + å‘右合并了一列  ï¼Œ è€Œ2-5被这个矩形范围包括了
                    headerRows[1] = new Object[]{ComplexTable.mergeCellY, "设备", "子部件", "设备", "子部件", "已拆卸", "已出舱", "已退重", "已入库"};
                    String[][] body = new String[list[0].size()][9];
                    for (int i = 0; i < list[0].size(); i++) {
                        StatistDismantDto data = list[0].get(i);
                        body[i][0] = data.getName();
                        body[i][1] = String.valueOf(data.getSbsl());
                        body[i][2] = String.valueOf(data.getZbjsl());
                        body[i][3] = String.valueOf(data.getSbcxsl());
                        body[i][4] = String.valueOf(data.getZbjcxsl());
                        body[i][5] = String.valueOf(data.getDismantsl());
                        body[i][6] = String.valueOf(data.getExitsl());
                        body[i][7] = String.valueOf(data.getReturnsl());
                        body[i][8] = String.valueOf(data.getWarehousesl());
                    }
                    Vector<Vector<Object>> dataVector = new Vector<>();
                    for (Object[] row : body) {
                        dataVector.add(new Vector<>(Arrays.asList(row)));
                    }
                    Vector<Object> columnIdentifiers = new Vector<>(Arrays.asList(headerRows[1]));
                    DefaultTableModel model = (DefaultTableModel) jTable.getModel();
                    model.setDataVector(dataVector, columnIdentifiers);
                    // è®¾ç½®åˆ—宽
                    for (int i = 0; i < headerRows[1].length; i++) {
                        jTable.getColumnModel().getColumn(i).setPreferredWidth(160);
                    }
                    // è®¾ç½®åˆ—宽
                    for (int i = 0; i < headerRows[1].length; i++) {
                        jTable.getColumnModel().getColumn(i).setPreferredWidth(160);
                    }
                    // è®¾ç½®è¡¨å¤´UI
                    jTable.getTableHeader().setUI(new ComplexHeaderUI(headerRows, jTable));
                    // è®¾ç½®è¡¨æ ¼UI
                    jTable.setUI(new ComplexTableUI(body, jTable));
                    // é‡æ–°æ¸²æŸ“表格
                    jTable.repaint();
                }
            }
        });
        frame1.setVisible(true);
    }
}
src/main/java/com/example/client/service/StatisDismantService.java
@@ -22,9 +22,8 @@
    private DjJdgzDismantTrackService djJdgzDismantTrackService;
    public void createTable(JFrame jFrame,Long level1Id) {
        JFrame frame1 = new JFrame("统计报表");
        frame1.setSize(1200, 700);
        frame1.setResizable(false);
        JFrame frame1 = new JFrame("拆卸进度统计总表");
        frame1.setSize(1500, 800);
        frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame1.setLocationRelativeTo(null);
        frame1.setVisible(true);
@@ -53,7 +52,7 @@
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JScrollPane scrollTable = new JScrollPane(table);*/
        //frame1.add(scrollTable);
@@ -80,7 +79,7 @@
            body[i][8] = String.valueOf(data.getWarehousesl());
        }
        JScrollPane scrollTable = new JScrollPane(new ComplexTable(headerRows , body,130));
        JScrollPane scrollTable = new JScrollPane(new ComplexTable(headerRows , body,160));
        frame1.add(scrollTable);
        frame1.setVisible(true);
    }
src/main/java/com/example/client/service/StatisReportsService.java
@@ -63,7 +63,7 @@
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        JScrollPane scrollTable = new JScrollPane(table);*/
        //frame1.add(scrollTable);
src/main/java/com/example/client/service/SubunitAddOrUpdate.java
@@ -9,6 +9,7 @@
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.model.DjJdgzDismantTrack;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import com.example.server.progressTrack.model.DjJdgzTrackRecord;
import com.example.server.progressTrack.service.DjJdgzDismantTrackService;
import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
@@ -41,8 +42,10 @@
    private CabinService cabinService;
    private List<ColumnDto> columnDto;
    private JTable trackTable;
    private DjJdgzNetworkLevel3 nowLevel3;
    public JPanel createTrack(Integer width, Integer height, DjJdgzNetworkLevel3 djJdgzNetworkLevel3,JFrame frame) {
        nowLevel3 = djJdgzNetworkLevel3;
        JPanel panel = new JPanel();
        panel.setPreferredSize(new Dimension(width, height));
        JPanel topJpanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
@@ -59,7 +62,7 @@
        topJpanel.add(btnInsert);
        JComboBoxItem[] cabinList = cabinService.getList();
        List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(djJdgzNetworkLevel3.getId(), null);
        List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(nowLevel3.getId(), null);
        List<TableButton> buttonList = new ArrayList<>();
        buttonList.add(new TableButton("edit", "编辑"));
        buttonList.add(new TableButton("del", "删除"));
@@ -76,7 +79,7 @@
        trackTable = CommonTable.createCommonTable(list, columnDto);
        trackTable.setPreferredSize(new Dimension(width , height));
        trackTable.setRowHeight(25);
        trackTable.setAutoCreateRowSorter(true);
        trackTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        tableModelListener(trackTable, frame,list,columnDto);
@@ -85,15 +88,13 @@
            @Override
            public void actionPerformed(ActionEvent e) {
                SysUser user = (SysUser) CacheUtils.get("user", "user");
                if (user.getTeamgroup()==null||user.getTeamgroup().equals(djJdgzNetworkLevel3.getTeamgroupId())) {
                if (user.getTeamgroup()==null||user.getTeamgroup().equals(nowLevel3.getTeamgroupId().toString())) {
                    DjJdgzDismantTrack djJdgzDismantTrack = new DjJdgzDismantTrack();
                    djJdgzDismantTrack.setLevel3NetworkId(djJdgzNetworkLevel3.getId());
                    djJdgzDismantTrack.setLevel3NetworkId(nowLevel3.getId());
                    insert(frame,djJdgzDismantTrack);
                }else{
                    JOptionPane.showMessageDialog(null, "不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                    JOptionPane.showMessageDialog(null, "当前用户不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                }
            }
        });
@@ -164,15 +165,17 @@
            list.add(data);
            djJdgzDismantTrackService.save(list);
            this.refreshTable(data.getLevel3NetworkId(),null);
            frame1.dispose();
            jFrame.setEnabled(true);//将主界面再设置为可操作的
        });
    }
    public void refreshTable(Long level3Id,JFrame jFrame){
        nowLevel3 = level3Service.get(level3Id);
        List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(level3Id, null);
        CommonTable.refreshTable(list, columnDto, trackTable);
        trackTable.setRowHeight(25);
        trackTable.setAutoCreateRowSorter(true);
        trackTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        tableModelListener(trackTable, jFrame,list,columnDto);
    }
@@ -197,7 +200,7 @@
                    if (n == 0) {
                        DefaultTableModel model = (DefaultTableModel) table.getModel();
                        DjJdgzDismantTrack data = list.get(row);
                        djJdgzDismantTrackService.deleteLogic(data.getId());
                        djJdgzDismantTrackService.delete(data.getId());
                        list.remove(row);
                        model.removeRow(row);
                    }
src/main/java/com/example/client/service/SubunitService.java
@@ -60,7 +60,7 @@
        JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null);
        JComboBoxItem[] cabinList = cabinService.getList();
        String[] typeList = new String[]{
                "改装", "加装", "换装", "改进性修理"
                "改装", "加装", "换装", "改进性修理",""
        };
        List<DjJdgzShip> shipList = djJdgzShipService.getList();
        Map<String, Long> shipMap = new HashMap<>();
@@ -117,11 +117,11 @@
        list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null);
        columnDto.add(new ColumnDto("序号", "", 60, "autoCreate", false, null, null));
        columnDto.add(new ColumnDto("设备名称", "name", 180, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 180, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", 180, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("舱室", "cabinId", 180, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", 180, null, false, null, null));
        columnDto.add(new ColumnDto("设备名称", "name", 152, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 152, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupId", 152, "dict", false, null, teamList));
        columnDto.add(new ColumnDto("舱室", "cabinId", 150, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", 150, null, false, null, null));
        JTable subTable = CommonTable.createCommonTable(list, columnDto);
        subTable.setRowHeight(25);
@@ -140,7 +140,6 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -179,7 +178,7 @@
                        CommonTable.refreshTable(list, columnDto, subTable);
                        subTable.setRowHeight(25);
                        subTable.setAutoCreateRowSorter(true);
                        subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                        subTable.addMouseListener(new MouseAdapter() {
                            public void mouseClicked(MouseEvent e) {
@@ -209,7 +208,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -237,7 +236,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -265,7 +264,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
@@ -288,7 +287,7 @@
                CommonTable.refreshTable(list, columnDto, subTable);
                subTable.setRowHeight(25);
                subTable.setAutoCreateRowSorter(true);
                subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                subTable.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
src/main/java/com/example/client/service/TeamGroupAddOrUpdate.java
New file
@@ -0,0 +1,137 @@
package com.example.client.service;
import com.example.client.dto.ColumnDto;
import com.example.client.dto.JComboBoxItem;
import com.example.client.utils.BoxIteUtils;
import com.example.client.utils.CommonTable;
import com.example.client.utils.GBC;
import com.example.server.boatFleet.service.BoatFleetService;
import com.example.server.teamGroup.model.SysTeamGroupClass;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import com.example.server.user.model.SysUser;
import com.example.server.user.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.List;
@Service
public class TeamGroupAddOrUpdate {
    @Autowired
    private TeamGroupManageService teamGroupManageService;
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    public void openDialog(SysTeamGroupClass data, JFrame jFrame, List<ColumnDto> columnDto, JTable table) {
        JFrame frame1 = new JFrame("专业操作");
        frame1.setSize(800, 600);
        frame1.setResizable(false);
        frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame1.setLocationRelativeTo(null);
        frame1.setVisible(true);
        frame1.addWindowListener(new WindowAdapter() {
            //添加第二个界面的关闭事件:
            public void windowClosing(WindowEvent e) {
                //添加事件:
                jFrame.setEnabled(true);//将主界面再设置为可操作的
            }
        });
        GridBagLayout layout = new GridBagLayout();
        frame1.setLayout(layout);
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        String[] typeList = new String[]{
                "部门", "专业"
        };
        JLabel JLabel0 = new JLabel("类型");
        JComboBox<String> comboBox1 = new JComboBox<>(typeList);
        comboBox1.setPreferredSize(new Dimension(185,28));
        if (StringUtils.isNotBlank(data.getType())) {
            comboBox1.setSelectedItem(data.getType());
        }
        JLabel JLabel1 = new JLabel("部门/专业名称");
        JTextField name = new JTextField(16);
        if (StringUtils.isNotBlank(data.getName())) {
            name.setText(data.getName());
        }
        JLabel JLabel4 = new JLabel("所属部门");
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(deptList);
        comboBox2.setPreferredSize(new Dimension(185,28));
        if (data.getPid() != null) {
            if (data.getPid()!=0){
                comboBox2.setSelectedItem(BoxIteUtils.GetSelectItemById(deptList, data.getPid()));
            }else {
                comboBox2.setEditable(false);
            }
        }
        comboBox1.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
                if (e.getStateChange() == ItemEvent.SELECTED) {
                    String type = comboBox1.getSelectedItem().toString();
                    if (type.equals("部门")) {
                        comboBox2.setEditable(false);
                        comboBox2.setSelectedIndex(-1);
                        data.setPid(0L);
                    }
                }
            }
        });
        JButton saveButton = new JButton("确定");
        frame1.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame1.add(comboBox1, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        frame1.add(JLabel1, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame1.add(name, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        frame1.add(JLabel4, new GBC(0, 2, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
        frame1.add(comboBox2, new GBC(1, 2, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
        frame1.add(saveButton, new GBC(0, 3, 2, 1).setWeight(0, 0));
        saveButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String type = comboBox1.getSelectedItem().toString();
                JComboBoxItem dept = (JComboBoxItem) comboBox2.getSelectedItem();
                Integer sortMax = 0;
                if (type.equals("部门")) {
                    data.setPid(0L);
                    sortMax = sysTeamGroupClassService.getSortMax(0L);
                    data.setSort(sortMax + 100);
                } else {
                    data.setPid(dept.getId());
                    sortMax = sysTeamGroupClassService.getSortMax(dept.getId());
                    data.setSort(sortMax + 1);
                }
                data.setArea("hld");
                data.setName(name.getText());
                //data.setBoatfleet(String.valueOf(boat.getId()));
                sysTeamGroupClassService.save(data);
                List<SysTeamGroupClass> list = sysTeamGroupClassService.getListByTree();;
                CommonTable.refreshTable(list, columnDto, table);
                teamGroupManageService.tableModelListener(table, jFrame, list);
                frame1.dispose();
                jFrame.setEnabled(true);//将主界面再设置为可操作的
            }
        });
    }
}
src/main/java/com/example/client/service/TeamGroupManageService.java
@@ -26,6 +26,8 @@
public class TeamGroupManageService {
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    @Autowired
    private TeamGroupAddOrUpdate addOrUpdate;
    private JTable table;
    private List<ColumnDto> columnDto;
@@ -60,19 +62,18 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        //tableModelListener(table,jFrame,list);
        tableModelListener(table,jFrame,list);
       /* btnInsert.addActionListener(new ActionListener() {
        btnInsert.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                SysUser data = new SysUser();
                SysTeamGroupClass data = new SysTeamGroupClass();
                addOrUpdate.openDialog(data,jFrame, columnDto,table);
                jFrame.setEnabled(false);
            }
        });*/
        });
        JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setViewportView(table);
@@ -83,7 +84,7 @@
        return panel;
    }
 /*   public void tableModelListener(JTable table,JFrame jFrame,List<SysUser> list){
    public void tableModelListener(JTable table,JFrame jFrame,List<SysTeamGroupClass> list){
        table.getModel().addTableModelListener(e -> {
            // æ£€æŸ¥äº‹ä»¶ç±»åž‹
            if (e.getType() == TableModelEvent.UPDATE) {
@@ -95,15 +96,15 @@
                Object newValue = table.getModel().getValueAt(row, column);
                // è¾“出变化信息
                if (newValue.equals("edit")){
                    SysUser data = list.get(row);
                    SysTeamGroupClass data = list.get(row);
                    addOrUpdate.openDialog(data,jFrame, columnDto,table);
                    jFrame.setEnabled(false);
                }else if(newValue.equals("del")) {
                    int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION);
                    if (n == 0) {
                        DefaultTableModel model = (DefaultTableModel) table.getModel();
                        SysUser data = list.get(row);
                        userService.deleteLogic(data.getId());
                        SysTeamGroupClass data = list.get(row);
                        sysTeamGroupClassService.deleteLogic(data.getId());
                        list.remove(row);
                        model.removeRow(row);
                    }
@@ -112,7 +113,6 @@
            }
        });
    }
*/
}
src/main/java/com/example/client/service/TrackRecordAddOrUpdate.java
@@ -6,13 +6,11 @@
import com.example.client.utils.CommonTable;
import com.example.client.utils.GBC;
import com.example.client.utils.UploadFile;
import com.example.server.progressTrack.model.DjJdgzDismantTrack;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3List;
import com.example.server.progressTrack.model.DjJdgzTrackRecord;
import com.example.server.progressTrack.service.DjJdgzNetworkLevel3ListService;
import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service;
import com.example.server.progressTrack.service.DjJdgzTrackRecordService;
import com.example.server.progressTrack.service.NetWorkDiagramService;
import com.example.server.progressTrack.service.*;
import com.example.server.sysOss.model.SysOss;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import com.example.server.user.model.SysUser;
@@ -45,9 +43,11 @@
    private TrackRecordManageService trackRecordManageService;
    @Autowired
    private UploadFile uploadFile;
    @Autowired
    private DjJdgzDismantTrackService djJdgzDismantTrackService;
    public void openDialog(DjJdgzTrackRecord data, JFrame jFrame, Long level1Id, List<ColumnDto> columnDto, JTable table) {
        JFrame frame1 = new JFrame("跟踪记录");
        JFrame frame1 = new JFrame(data.getLevel3NetworkName() + "跟踪记录");
        frame1.setSize(1200, 800);
        frame1.setResizable(false);
        frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
@@ -76,17 +76,17 @@
        hasDelayRiskMap.put(0, "无");
        JComboBoxItem[] trackList = {
                new JComboBoxItem(0, "线下"),
                new JComboBoxItem(1, "电话"),
                new JComboBoxItem(0L, "线下"),
                new JComboBoxItem(1L, "电话"),
        };
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成"),
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成"),
        };
        JComboBoxItem[] hasDelayRiskList = {
                new JComboBoxItem(0, "无"),
                new JComboBoxItem(1, "有"),
                new JComboBoxItem(0L, "无"),
                new JComboBoxItem(1L, "有"),
        };
        JLabel JLabel0 = new JLabel("当前节点");
@@ -172,7 +172,7 @@
        JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(statusList);
        comboBox1.setPreferredSize(new Dimension(185, 28));
        if (data.getCurrentStatus() != null) {
            comboBox0.setSelectedItem(new JComboBoxItem(data.getCurrentStatus(), statusMap.get(data.getCurrentStatus())));
            comboBox0.setSelectedItem(new JComboBoxItem(data.getCurrentStatus().longValue(), statusMap.get(data.getCurrentStatus())));
        }
@@ -180,7 +180,7 @@
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(hasDelayRiskList);
        comboBox2.setPreferredSize(new Dimension(185, 28));
        if (data.getHasDelayRisk() != null) {
            comboBox0.setSelectedItem(new JComboBoxItem(data.getHasDelayRisk(), hasDelayRiskMap.get(data.getHasDelayRisk())));
            comboBox0.setSelectedItem(new JComboBoxItem(data.getHasDelayRisk().longValue(), hasDelayRiskMap.get(data.getHasDelayRisk())));
        }
@@ -224,7 +224,7 @@
        JLabel JLabel19 = new JLabel("附件");
        SysOss oss = new SysOss();
        if (data.getId()!=null){
        if (data.getId() != null) {
            oss.setBusiId(data.getId());
        }
        oss.setBusiType("ProjectProgressFileUpload");
@@ -233,7 +233,7 @@
        oss.setBusiFieldName("项目进度文件");
        oss.setStatus(1);
        oss.setChannel("local");
        JPanel jPanel = uploadFile.uploadFile(jFrame,500,220,oss);
        JPanel jPanel = uploadFile.uploadFile(jFrame, 500, 220, oss);
        JButton saveButton = new JButton("保存");
        frame1.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
@@ -292,14 +292,22 @@
            public void actionPerformed(ActionEvent e) {
                SysUser user = (SysUser) CacheUtils.get("user", "user");
                DjJdgzNetworkLevel3 level3 = djJdgzNetworkLevel3Service.get(data.getLevel3NetworkId());
                if (user.getTeamgroup()!=null && !user.getTeamgroup().equals(level3.getTeamgroupId())){
                    JOptionPane.showMessageDialog(null, "不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                if (user.getTeamgroup() != null && !user.getTeamgroup().equals(level3.getTeamgroupId().toString())) {
                    JOptionPane.showMessageDialog(null, "当前用户不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE);
                    return;
                }
                JComboBoxItem trackMethod = (JComboBoxItem) comboBox0.getSelectedItem();
                JComboBoxItem currentStatus = (JComboBoxItem) comboBox1.getSelectedItem();
                JComboBoxItem hasDelayRisk = (JComboBoxItem) comboBox2.getSelectedItem();
                List<DjJdgzDismantTrack> list1 = djJdgzDismantTrackService.getList(data.getLevel3NetworkId(), null);
                if (data.getProcessName().equals("设备拆卸出舱") && currentStatus.getId() == 1 && list1 != null && list1.size() > 0) {
                    Boolean status = djJdgzDismantTrackService.getStatus(data.getLevel3NetworkId());
                    if (!status) {
                        JOptionPane.showMessageDialog(null, "有未完成的子部件", "提示", JOptionPane.WARNING_MESSAGE);
                        return;
                    }
                }
                data.setTrackMethod(Math.toIntExact(trackMethod.getId()));
                data.setProcessName(data.getLevel3NodeName());
                data.setTrackLocation(trackLocatDesc.getText());
@@ -321,9 +329,9 @@
                data.setRemark(remark.getText());
                Long id = djJdgzTrackRecordService.save(data);
                uploadFile.save(id);
                List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(level1Id,0);
                CommonTable.refreshTable(list,columnDto,table);
                trackRecordManageService.tableModelListener(table,jFrame);
                List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(level1Id, 0);
                CommonTable.refreshTable(list, columnDto, table);
                trackRecordManageService.tableModelListener(table, jFrame, list);
                frame1.dispose();
                jFrame.setEnabled(true);//将主界面再设置为可操作的
            }
src/main/java/com/example/client/service/TrackRecordManageService.java
@@ -4,11 +4,13 @@
import com.example.client.dto.JComboBoxItem;
import com.example.client.model.TableButton;
import com.example.client.utils.CommonTable;
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.model.*;
import com.example.server.progressTrack.service.DjJdgzNetworkLevel1Service;
import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service;
import com.example.server.progressTrack.service.DjJdgzShipService;
import com.example.server.progressTrack.service.DjJdgzTrackRecordService;
import com.example.server.teamGroup.service.SysTeamGroupClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -37,7 +39,13 @@
    @Autowired
    private ExportTrackRecordService exportTrackRecordService;
    @Autowired
    private ImportTrackRecordService importTrackRecordService;
    @Autowired
    private TrackRecordAddOrUpdate addOrUpdate; // æ³¨å…¥ AddOrupdate å®žä¾‹
    @Autowired
    private SysTeamGroupClassService sysTeamGroupClassService;
    @Autowired
    private CabinService cabinService;
    private JTable table;
    private List<DjJdgzTrackRecord> list;
@@ -57,14 +65,18 @@
        panel.add(centerJpanel, BorderLayout.CENTER);
        JComboBoxItem[] projectList = level1Service.getProjectList();
        JComboBoxItem[] cabinList = cabinService.getList();
        JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成")
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成")
        };
        JButton btnTj = new JButton("统计报表");
        JButton btnJc = new JButton("周进度检查表");
        JButton btnExport = new JButton("导出跟踪报表");
        JButton btnImport = new JButton("导入跟踪报表");
        JComboBox<JComboBoxItem> comboBox = new JComboBox<>(projectList);
        JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(statusList);
        JComboBoxItem selectedItem = (JComboBoxItem) comboBox.getSelectedItem();
@@ -80,10 +92,9 @@
                list = djJdgzTrackRecordService.getList(level1Id, Math.toIntExact(Status));
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(table, jFrame);
                tableModelListener(table, jFrame,list);
            }
        });
@@ -97,16 +108,24 @@
                list = djJdgzTrackRecordService.getList(level1Id, Math.toIntExact(Status));
                CommonTable.refreshTable(list, columnDto, table);
                table.setRowHeight(25);
                table.setAutoCreateRowSorter(true);
                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                tableModelListener(table, jFrame);
                tableModelListener(table, jFrame,list);
            }
        });
        btnImport.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem();
                importTrackRecordService.FileUpload(columnDto,table,jFrame);
            }
        });
        topJpanel.add(btnTj);
        topJpanel.add(btnJc);
        topJpanel.add(btnExport);
        topJpanel.add(btnImport);
        topJpanel.add(comboBox);
        topJpanel.add(comboBox2);
@@ -120,10 +139,13 @@
        columnDto = new ArrayList<>();
        //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
        columnDto.add(new ColumnDto("序号", "", 50, "autoCreate", false, null, null));
        columnDto.add(new ColumnDto("工程名称", "ProjectName", 180, null, false, null, null));
        columnDto.add(new ColumnDto("部门", "deptId", 120, "dict", false, null, deptList));
        columnDto.add(new ColumnDto("专业", "teamgroupName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("舱室", "cabinId", 100, "dict", false, null, cabinList));
        columnDto.add(new ColumnDto("类别", "type", 100, null, false, null, null));
        columnDto.add(new ColumnDto("一级节点", "level1NodeName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("二级节点", "level2NodeName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("项目名称", "level3NetworkName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("设备名称", "level3NetworkName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("当前节点", "level3NodeName", 120, null, false, null, null));
        columnDto.add(new ColumnDto("计划完成时间", "requiredCompletionTime", 200, null, false, null, null));
        columnDto.add(new ColumnDto("总承修单位", "generalRepair", 180, null, false, null, null));
@@ -136,7 +158,6 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.addMouseListener(new MouseAdapter() {
@@ -149,7 +170,7 @@
                // æ£€æŸ¥æ˜¯å¦ç‚¹å‡»äº†æœ‰æ•ˆå•元格
                if (row >= 0 && column >= 0) {
                    if (column == 10) { // åˆ—索引从0开始
                    if (column == 13) { // åˆ—索引从0开始
                        // èŽ·å–è¯¥å•å…ƒæ ¼çš„å€¼
                        Object cellValue = table.getValueAt(row, column);
                        Integer value = Integer.parseInt(cellValue.toString());
@@ -182,7 +203,7 @@
                exportTrackRecordService.openDialog(jFrame);
            }
        });
        tableModelListener(table, jFrame);
        tableModelListener(table, jFrame,list);
        JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setViewportView(table);
@@ -211,17 +232,17 @@
        List<ColumnDto> columnDto = new ArrayList<>();
        List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getHistory(level3NodeId);
        JComboBoxItem[] trackList = {
                new JComboBoxItem(0, "线下"),
                new JComboBoxItem(1, "电话"),
                new JComboBoxItem(0L, "线下"),
                new JComboBoxItem(1L, "电话"),
        };
        JComboBoxItem[] statusList = {
                new JComboBoxItem(0, "进行中"),
                new JComboBoxItem(1, "已完成"),
                new JComboBoxItem(0L, "进行中"),
                new JComboBoxItem(1L, "已完成"),
        };
        JComboBoxItem[] hasDelayRiskList = {
                new JComboBoxItem(0, "无"),
                new JComboBoxItem(1, "有"),
                new JComboBoxItem(0L, "无"),
                new JComboBoxItem(1L, "有"),
        };
        columnDto.add(new ColumnDto("序号", "", 50, "autoCreate", false, null, null));
@@ -251,7 +272,7 @@
    }
    public void tableModelListener(JTable table, JFrame jFrame) {
    public void tableModelListener(JTable table, JFrame jFrame,List<DjJdgzTrackRecord> recordList) {
        table.getModel().addTableModelListener(e -> {
            // æ£€æŸ¥äº‹ä»¶ç±»åž‹
            if (e.getType() == TableModelEvent.UPDATE) {
@@ -263,7 +284,7 @@
                Object newValue = table.getModel().getValueAt(row, column);
                // è¾“出变化信息
                if (newValue.equals("edit")) {
                    DjJdgzTrackRecord data = list.get(row);
                    DjJdgzTrackRecord data = recordList.get(row);
                    Long level1Id = data.getLevel1NetworkId();
                    data.setProcessName(data.getLevel3NodeName());
                    Boolean isUpdate = data.getIsUpdate();
src/main/java/com/example/client/service/UserManageService.java
@@ -86,7 +86,6 @@
        table = CommonTable.createCommonTable(list, columnDto);
        table.setRowHeight(25);
        table.setAutoCreateRowSorter(true);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        tableModelListener(table,jFrame,list);
src/main/java/com/example/client/utils/CircleRenderer.java
New file
@@ -0,0 +1,57 @@
package com.example.client.utils;
import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.*;
public class CircleRenderer extends DefaultTableCellRenderer {
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        // å°†åå…­è¿›åˆ¶å­—符串转换为 Color å¯¹è±¡
        if (value instanceof String) {
            String hexColor = (String) value;
            Color color = hexToColor(hexColor);
            setForeground(color); // è®¾ç½®å‰æ™¯è‰²ä¸ºåœ†å½¢çš„颜色
        }
        // è®¾ç½®èƒŒæ™¯è‰²ï¼ˆå¯é€‰ï¼‰
        setBackground(isSelected ? table.getSelectionBackground() : table.getBackground());
        // è®¾ç½®æ–‡æœ¬ä¸ºç©ºï¼Œå› ä¸ºæˆ‘们只显示圆形图案
        setText("");
        return this;
    }
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        // ç»˜åˆ¶åœ†å½¢å›¾æ¡ˆ
        int width = getWidth();
        int height = getHeight();
        int diameter = Math.min(width, height); // åœ†çš„直径
        int x = (width - diameter) / 2;
        int y = (height - diameter) / 2;
        g.setColor(getForeground());
        g.fillOval(x, y, diameter, diameter); // ç»˜åˆ¶å¡«å……的圆形
    }
    // å°†åå…­è¿›åˆ¶å­—符串转换为 Color å¯¹è±¡
    private Color hexToColor(String hex) {
        if (hex == null || hex.isEmpty()) {
            return Color.WHITE; // é»˜è®¤é¢œè‰²
        }
        try {
            // åŽ»æŽ‰å¯èƒ½å­˜åœ¨çš„ "#" å‰ç¼€
            hex = hex.trim().replace("#", "");
            int rgb = Integer.parseInt(hex, 16);
            return new Color((rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF);
        } catch (NumberFormatException e) {
            return Color.WHITE; // å¦‚果转换失败,返回默认颜色
        }
    }
}
src/main/java/com/example/client/utils/CommonTable.java
@@ -62,7 +62,7 @@
                });
                table.getColumnModel().getColumn(j).setCellEditor(new DatePickerEditor(datePicker));
            }
            if ("dict".equals(dtoList.get(j).getColumnType())) {
            if ("dict".equals(dtoList.get(j).getColumnType()) || "dicts".equals(dtoList.get(j).getColumnType())) {
                Map<Long, JComboBoxItem> itemMap = new HashMap<>();
                JComboBoxItem[] dictList = dtoList.get(j).getDictList();
                for (JComboBoxItem item : dictList) {
@@ -86,6 +86,9 @@
                });
                table.getColumnModel().getColumn(j).setCellRenderer(new CellComboBoxRenderer(itemMap));
                table.getColumnModel().getColumn(j).setCellEditor(new CellComboBoxEditor(comboBox, itemMap));
            }
            if ("Circle".equals(dtoList.get(j).getColumnType())) {
                table.getColumnModel().getColumn(j).setCellRenderer(new CircleRenderer());
            }
        }
    }
@@ -117,6 +120,10 @@
                    if (StringUtils.isBlank(dtoList.get(j).getColumnType()) || dtoList.get(j).getColumnType().equals("selectDate")) {
                        rowData[i][j] = valueStr;
                    } else if (dtoList.get(j).getColumnType().equals("dict")) {
                        rowData[i][j] = valueStr;
                    } else if (dtoList.get(j).getColumnType().equals("dicts")) {
                        rowData[i][j] = valueStr;
                    } else if (dtoList.get(j).getColumnType().equals("Circle")) {
                        rowData[i][j] = valueStr;
                    } else if (dtoList.get(j).getColumnType().equals("autoCreate")) {
                        rowData[i][j] = "" + (i + 1);
@@ -151,16 +158,18 @@
                    if (StringUtils.isNotBlank(fieldName)) {
                        if ("dict".equals(dtoList.get(j).getColumnType())) {
                            method = c1azz.getMethod("set" + StringUtils.capitalize(fieldName), Long.class);
                        } else if ("dicts".equals(dtoList.get(j).getColumnType())) {
                            method = c1azz.getMethod("set" + StringUtils.capitalize(fieldName), Integer.class);
                        } else {
                            method = c1azz.getMethod("set" + StringUtils.capitalize(fieldName), String.class);
                        }
                        Object value = table.getModel().getValueAt(i, j);
                        if (value != null) {
                        if (value != null && !value.equals("") ) {
                            if ("selectDate".equals(dtoList.get(j).getColumnType())) {
                                method.invoke(object, value.toString());
                                System.out.println(value.toString().length());
                                String valueStr = value.toString();
                                Method method2 = c1azz.getMethod("set" + StringUtils.capitalize(fieldName) + "Digit", Long.class);
                                //Method method2 = c1azz.getMethod("set" + StringUtils.capitalize(fieldName) + "Digit", Long.class);
                                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
                                Date date = null;
                                try {
@@ -169,9 +178,11 @@
                                    e.printStackTrace();
                                }
                                Long timestamp = date.getTime();
                                method2.invoke(object, timestamp);
                                // method2.invoke(object, timestamp);
                            } else if ("dict".equals(dtoList.get(j).getColumnType())) {
                                method.invoke(object, Long.parseLong(value.toString()));
                            } else if ("dicts".equals(dtoList.get(j).getColumnType())) {
                                method.invoke(object, Integer.valueOf(value.toString()));
                            } else {
                                method.invoke(object, value.toString());
                            }
src/main/java/com/example/client/utils/ComplexTable.java
@@ -4,6 +4,8 @@
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.util.Arrays;
import java.util.Vector;
public class ComplexTable extends JTable {
@@ -28,6 +30,5 @@
        this.getTableHeader().setUI(new ComplexHeaderUI(headerRows, this));
        this.setUI(new ComplexTableUI(body, this));
    }
}
src/main/java/com/example/client/utils/MultiSelectComboBox.java
@@ -81,4 +81,15 @@
        }
        return selectedItems;
    }
    public void setSelectedItems(Set<JComboBoxItem> items) {
        selectedIndices.clear(); // æ¸…空当前选中项
        for (int i = 0; i < getItemCount(); i++) {
            JComboBoxItem item = getItemAt(i);
            if (items.contains(item)) {
                selectedIndices.add(i); // å°†å¯¹åº”的索引添加到选中集合
            }
        }
        updateTextField(); // æ›´æ–°æ–‡æœ¬æ¡†å†…容
    }
}
src/main/java/com/example/server/DataSync/dto/DataExportDto.java
New file
@@ -0,0 +1,9 @@
package com.example.server.DataSync.dto;
import lombok.Data;
@Data
public class DataExportDto {
    private String exportDate;
    private String exportStaff;
}
src/main/java/com/example/server/DataSync/dto/DataImportDto.java
New file
@@ -0,0 +1,10 @@
package com.example.server.DataSync.dto;
import lombok.Data;
@Data
public class DataImportDto {
    private String importDate;
    private String importLocal;
    private String importStaff;
}
src/main/java/com/example/server/DataSync/service/DataSyncService.java
@@ -156,13 +156,14 @@
            syncTable("dj_jdgz_track_record");
            syncTable("dj_sys_oss");
            syncTable("dj_jdgz_dismant_track");
        } else if ("TD".equals(mySite)) {
            if ("TD".equals(otherSite)) {
        } else if (mySite.equals("TD")) {
            if (otherSite.equals("TD")) {
                syncTable("dj_jdgz_network_level3");
                syncTable("dj_jdgz_network_level3_list");
                syncTable("dj_jdgz_track_record");
                syncTable("dj_sys_oss");
                syncTable("dj_jdgz_dismant_track");
                syncTable("dj_jdgz_handover");
            } else if ("工作组".equals(otherSite)) {
                syncTable("dj_jdgz_handover");
                syncTable("dj_jdgz_network_level1");
@@ -267,7 +268,7 @@
                    }
                }
                if (isUpdate) {
                    updateSql = "update " + tableName + " set " + updateSql + "where id = " + id;
                    updateSql = "update " + tableName + " set " + updateSql + " where id = " + id;
                    // æ‰§è¡Œupdate
                    sysMysqlDao.execute(updateSql);
                } else {
src/main/java/com/example/server/progressTrack/Dto/TableNodeDto.java
New file
@@ -0,0 +1,30 @@
package com.example.server.progressTrack.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class TableNodeDto {
    private Long id;
    private Long networkId;
    @ApiModelProperty(value = "要求完成时间")
    private String requiredCompletionTime;
    @ApiModelProperty(value = "实际完成时间")
    private String actualCompletion;
    @ApiModelProperty(value = "当前状态")
    private Integer currentStatus;
    private String processName;
    private String name;
    private String time1Color;
    private String time2Color;
    private String time3Color;
    private String time4Color;
    private String time5Color;
}
src/main/java/com/example/server/progressTrack/dao/DjJdgzDismantTrackDao.java
@@ -26,4 +26,8 @@
    List<DjJdgzDismantTrack> getdata(Long deptId, Long teamGroupId, Long level1NetworkId, Long level3NetworkId, Integer status);
    List<StatistDismantDto> getStatist(Long level1Id);
    Boolean getStatus(Long level3NetworkId);
    List<StatistDismantDto> getStatist2(Long level1Id, Long id);
}
src/main/java/com/example/server/progressTrack/dao/DjJdgzNetworkLevel3Dao.java
@@ -3,6 +3,7 @@
import com.example.client.dto.JComboBoxItem;
import com.example.server.dao.BaseDao;
import com.example.server.progressTrack.Dto.NetworkNodeStatusDto;
import com.example.server.progressTrack.Dto.TableNodeDto;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import org.apache.ibatis.annotations.Mapper;
@@ -32,4 +33,6 @@
    void deleteByTeamGroup(Long teamGroupId, String name);
    JComboBoxItem[] getListByExport(Long projectId, Long deptId, Long teamId);
    List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, String name);
}
src/main/java/com/example/server/progressTrack/dao/DjJdgzTrackRecordDao.java
@@ -32,4 +32,6 @@
    List<DjJdgzTrackRecord> getSummaryData(String teamgroupId, Long level1NetworkId, Long level3NetworkId, Long level3NodeId, Integer status, Date beginDate, Date endDate, Integer istq);
    Integer getTrackNum(Long level3NodeId);
    List<DjJdgzTrackRecord> getListByImport(Long level1Id, Long level2Id, Long level2NodeId, String selectedIds);
}
src/main/java/com/example/server/progressTrack/model/DjJdgzTrackRecord.java
@@ -59,7 +59,8 @@
    @ApiModelProperty(value = "跟踪人")
    private String trackPerson;
    @ApiModelProperty(value = "跟踪人单位")
    private String trackPersonUnit;
    @ApiModelProperty(value = "跟踪人联系方式")
    private String trackPersonContact;
@@ -68,7 +69,8 @@
    @ApiModelProperty(value = "被跟踪人")
    private String trackedPerson;
    @ApiModelProperty(value = "跟踪人单位")
    private String trackedPersonUnit;
    @ApiModelProperty(value = "被跟踪人联系方式")
    private String trackedPersonContact;
@@ -143,7 +145,7 @@
    private String status;
    @TableField(exist = false)
    private String teamGroupName;
    private String teamgroupName;
    @TableField(exist = false)
    private String istq;
@@ -174,5 +176,10 @@
    @TableField(exist = false)
    private String fileName;
    @TableField(exist = false)
    private Long cabinId;
    @TableField(exist = false)
    private String type;
}
src/main/java/com/example/server/progressTrack/service/DjJdgzDismantTrackService.java
@@ -113,7 +113,7 @@
            String curSbName = "";
            Long curSbId = null;
            for (int j = 1; j <= num; j++) {
            for (int j = 2; j <= num; j++) {
                DjJdgzDismantTrack data = new DjJdgzDismantTrack();
                boolean isErr = false;
@@ -390,4 +390,16 @@
    public List<StatistDismantDto> getStatist(Long level1Id) {
        return baseDao.getStatist(level1Id);
    }
    public Boolean getStatus(Long level3NetworkId) {
        return baseDao.getStatus(level3NetworkId);
    }
    public void delete(Long id) {
        baseDao.deleteById(id);
    }
    public List<StatistDismantDto> getStatist2(Long level1Id, Long id) {
        return baseDao.getStatist2(level1Id,id);
    }
}
src/main/java/com/example/server/progressTrack/service/DjJdgzNetworkLevel3Service.java
@@ -4,6 +4,7 @@
import com.example.client.service.BaseService;
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.Dto.NetworkNodeStatusDto;
import com.example.server.progressTrack.Dto.TableNodeDto;
import com.example.server.progressTrack.dao.DjJdgzNetworkLevel3Dao;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3List;
@@ -23,6 +24,8 @@
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -46,6 +49,11 @@
    @Value("${zt.oss.local-path}")
    private String path;
    enum StatusEnum {zy, jxz, lq, yq, zcwc, cqwc}
    String[] fillColorArr = {"#e5e5e5", "#3498DB", "#F1C40F", "#E74C3C", "#2ECC71", "#006400"};
    String[] fontColorArr = {"#e5e5e5", "#3498DB", "#F1C40F", "#E74C3C", "#2ECC71", "#006400"};
    public List<DjJdgzNetworkLevel3> getList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, String name) {
        List<DjJdgzNetworkLevel3> list = baseDao.getList(shipId, deptId, teamId, cabinId, type, name);
@@ -148,7 +156,7 @@
                teamMap.put(item.getName(), item.getId());
            }
            for (int j = 1; j <= num; j++) {
            for (int j = 2; j <= num; j++) {
                int sort = 0;
                DjJdgzNetworkLevel3 data = new DjJdgzNetworkLevel3();
                DjJdgzNetworkLevel3List node = new DjJdgzNetworkLevel3List();
@@ -428,6 +436,76 @@
        JComboBoxItem[] list = baseDao.getListByExport(projectId, deptId, teamId);
        return list;
    }
    public List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, String name) {
        List<TableNodeDto> list = baseDao.getNodeList(shipId, deptId, teamId, cabinId, type, name);
        Map<Long, StatusEnum> statusMap = new HashMap<>();
        Date today = new Date();
        for (TableNodeDto node : list) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            Date requiredCompletionDate = null;
            Date actualCompletionDate = null;
            try {
                if (StringUtils.isNotBlank(node.getRequiredCompletionTime())) {
                    requiredCompletionDate = sdf.parse(node.getRequiredCompletionTime());
                }
                if (StringUtils.isNotBlank(node.getActualCompletion())) {
                    actualCompletionDate = sdf.parse(node.getActualCompletion());
                }
            } catch (ParseException e) {
                e.printStackTrace();
            }
            if (node.getCurrentStatus() == null || node.getCurrentStatus() == 0) {
                if (today.after(requiredCompletionDate)) {
                    statusMap.put(node.getId(), StatusEnum.yq);
                } else if ((requiredCompletionDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24) < 7) {
                    statusMap.put(node.getId(), StatusEnum.lq);
                } else {
                    statusMap.put(node.getId(), StatusEnum.jxz);
                }
            } else if (node.getCurrentStatus() == 1) {
                // å·²å®Œæˆ
                if (node.getActualCompletion() != null && actualCompletionDate.after(requiredCompletionDate)) {
                    statusMap.put(node.getId(), StatusEnum.cqwc);
                } else {
                    statusMap.put(node.getId(), StatusEnum.zcwc);
                }
            }
        }
        StatusEnum status = StatusEnum.jxz;
        List<TableNodeDto> dataList = new ArrayList<>();
        Long oldId = 0L;
        TableNodeDto data = null;
        for (TableNodeDto node : list) {
            if (oldId.equals(node.getNetworkId())){
            }else{
                data = new TableNodeDto();
                data.setName(node.getName());
                data.setNetworkId(node.getNetworkId());
                dataList.add(data);
                oldId = node.getNetworkId();
            }
            status = statusMap.get(node.getId());
            if (node.getProcessName().equals("设备拆卸出舱")) {
                data.setTime1Color(fillColorArr[status.ordinal()]);
            } else if (node.getProcessName().equals("设备分交")) {
                data.setTime2Color(fillColorArr[status.ordinal()]);
            } else if (node.getProcessName().equals("拆检鉴定")) {
                data.setTime3Color(fillColorArr[status.ordinal()]);
            } else if (node.getProcessName().equals("设备返厂")) {
                data.setTime4Color(fillColorArr[status.ordinal()]);
            } else if (node.getProcessName().equals("回装")) {
                data.setTime5Color(fillColorArr[status.ordinal()]);
            }
        }
        return dataList;
    }
  /*  public void exportExcelTemplate(HttpServletResponse response, HttpServletRequest request) throws IOException {
        String excelName="三级网络图批量模版";
        String excelPath = path + "template/jx-model/" + excelName + ".xlsx"; //模板路径
src/main/java/com/example/server/progressTrack/service/DjJdgzTrackRecordService.java
@@ -303,5 +303,7 @@
        }
    }
    public List<DjJdgzTrackRecord> getListByImport(Long level1Id, Long level2Id, Long level2NodeId, String selectedIds) {
        return baseDao.getListByImport(level1Id,level2Id,level2NodeId,selectedIds);
    }
}
src/main/java/com/example/server/progressTrack/service/NetWorkDiagramService.java
@@ -79,8 +79,8 @@
    //状态分为:专业、已启动/进行中(浅灰)、临期(黄色)、已逾期(红色)、已完成(浅绿色)、超期完成(深绿色)
    enum StatusEnum {zy, jxz, lq, yq, zcwc, cqwc}
    String[] fillColorArr = {"#e5e5e5", "#A9A9A9", "yellow", "#FF0000", "#90EE90", "#006400"};
    String[] fontColorArr = {"#e5e5e5", "#A9A9A9", "yellow", "#FF0000", "#90EE90", "#006400"};
    String[] fillColorArr = {"#e5e5e5", "#3498DB", "#F1C40F", "#E74C3C", "#2ECC71", "#006400"};
    String[] fontColorArr = {"#e5e5e5", "#3498DB", "#F1C40F", "#E74C3C", "#2ECC71", "#006400"};
    InitParamDto initParamDto = new InitParamDto();
    ResultDataDto resultDataDto = new ResultDataDto();
src/main/java/com/example/server/teamGroup/dao/SysTeamGroupClassDao.java
@@ -40,4 +40,6 @@
    JComboBoxItem[] getDeptList();
    List<SysTeamGroupClass> getListByTree();
    Integer getSortMax(Long pid);
}
src/main/java/com/example/server/teamGroup/model/SysTeamGroupClass.java
@@ -38,6 +38,9 @@
    @ApiModelProperty(value = "分类(A/B)")
    private String classType;
    @ApiModelProperty(value = "类型)")
    private String type;
    @ApiModelProperty(value = "备注")
    private String comment;
src/main/java/com/example/server/teamGroup/service/SysTeamGroupClassService.java
@@ -205,4 +205,16 @@
    public List<SysTeamGroupClass> getListByTree() {
        return baseDao.getListByTree();
    }
    public Integer getSortMax(Long pid) {
        return baseDao.getSortMax(pid);
    }
    public void save(SysTeamGroupClass data) {
        if (data.getId()!=null){
            this.update(data);
        }else{
            this.insert(data);
        }
    }
}
src/main/java/com/example/server/utils/DownLoadTmpFile.java
@@ -1,15 +1,28 @@
package com.example.server.utils;
import com.example.Application;
import com.example.server.progressTrack.model.DjJdgzTrackRecord;
import com.example.server.progressTrack.service.DjJdgzDismantTrackService;
import com.example.server.progressTrack.service.DjJdgzTrackRecordService;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.swing.*;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
public class DownLoadTmpFile {
    public static void down(String name,JFrame frame1){
    public static void down(String name, JFrame frame1) {
        InputStream inputStream = Application.class.getClassLoader().getResourceAsStream(name);
        if (inputStream == null) {
@@ -50,4 +63,135 @@
            tempFile.delete(); // åˆ é™¤ä¸´æ—¶æ–‡ä»¶
        }
    }
    public static void buildTrack(List<DjJdgzTrackRecord> list, String path, JFrame frame1) {
        LocalDate currentDate = LocalDate.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        // å°†å½“前日期格式化为字符串
        String date = currentDate.format(formatter);
        InputStream inputStream = Application.class.getClassLoader().getResourceAsStream(path);
        if (inputStream == null) {
            try {
                inputStream = new FileInputStream(path);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
        try {
            Workbook workbook = new XSSFWorkbook(inputStream);
            // èŽ·å–ç¬¬ä¸€ä¸ªå·¥ä½œè¡¨
            Sheet sheet = workbook.getSheetAt(0);
            int num = 1;
            for (int i = 0; i < list.size(); i++) {
                num = num + 1;
                Row row = sheet.createRow(num);
                Cell cell = row.createCell(0);
                cell.setCellValue(list.get(i).getId());
                cell = row.createCell(1);
                cell.setCellValue(date);
                cell = row.createCell(2);
                cell.setCellValue(list.get(i).getLevel3NetworkName());
                cell = row.createCell(12);
                if (StringUtils.isNotBlank(list.get(i).getTrackPerson())) {
                    cell.setCellValue(list.get(i).getTrackPerson());
                }
                cell = row.createCell(13);
                if (StringUtils.isNotBlank(list.get(i).getTrackPersonContact())) {
                    cell.setCellValue(list.get(i).getTrackPersonContact());
                }
                cell = row.createCell(14);
                if (StringUtils.isNotBlank(list.get(i).getTrackPersonUnit())) {
                    cell.setCellValue(list.get(i).getTrackPersonUnit());
                }
                cell = row.createCell(15);
                if (StringUtils.isNotBlank(list.get(i).getTrackedPerson())) {
                    cell.setCellValue(list.get(i).getTrackPerson());
                }
                cell = row.createCell(16);
                if (StringUtils.isNotBlank(list.get(i).getTrackedPersonContact())) {
                    cell.setCellValue(list.get(i).getTrackPersonContact());
                }
                cell = row.createCell(17);
                if (StringUtils.isNotBlank(list.get(i).getTrackedPersonUnit())) {
                    cell.setCellValue(list.get(i).getTrackPersonUnit());
                }
                cell = row.createCell(18);
                if (StringUtils.isNotBlank(list.get(i).getGeneralRepairUnit())) {
                    cell.setCellValue(list.get(i).getGeneralRepairUnit());
                }
                cell = row.createCell(19);
                if (StringUtils.isNotBlank(list.get(i).getGeneralRepairUnitDirector())) {
                    cell.setCellValue(list.get(i).getGeneralRepairUnitDirector());
                }
                cell = row.createCell(20);
                if (StringUtils.isNotBlank(list.get(i).getGeneralRepairUnitContact())) {
                    cell.setCellValue(list.get(i).getGeneralRepairUnitDirector());
                }
                cell = row.createCell(21);
                if (StringUtils.isNotBlank(list.get(i).getRepairUnit())) {
                    cell.setCellValue(list.get(i).getRepairUnit());
                }
                cell = row.createCell(22);
                if (StringUtils.isNotBlank(list.get(i).getRepairUnitDirector())) {
                    cell.setCellValue(list.get(i).getRepairUnitDirector());
                }
                cell = row.createCell(23);
                if (StringUtils.isNotBlank(list.get(i).getRepairUnitContact())) {
                    cell.setCellValue(list.get(i).getRepairUnitContact());
                }
                if (i >= list.size() - 1) {
                    row = sheet.createRow(sheet.getLastRowNum() + 3);
                    cell = row.createCell(1);
                    cell.setCellValue("注:");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("1. è®¾å¤‡åç§°ï¼šå¯¼å‡ºæ¨¡æ¿æ—¶ï¼Œç³»ç»Ÿè‡ªåŠ¨ç”Ÿæˆè¯¥ä¸“ä¸šçš„æ‰€æœ‰è®¾å¤‡ï¼Œç”¨æˆ·ä¸è¦ä¿®æ”¹");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("2. é»„色栏目为主要填写信息,其中,预计完成时间不填时,导入时系统将当前节点的要求完成时间作为预计完成时间");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("3. ç»¿è‰²æ ç›®ä¸ºå¯¼å‡ºæ¨¡æ¿æ—¶å¸¦æœ‰æ•°æ®ï¼Œå¯æ ¹æ®éœ€è¦ä¿®æ”¹");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("4. æ•°æ®å½•入时间为跟踪的时间,导入后系统自动换算成周");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("5. æ•°æ®å½•入时间或者当前节点栏目未录数据时,导入时系统判断该行为空");
                    row = sheet.createRow(sheet.getLastRowNum() + 1);
                    cell = row.createCell(2);
                    cell.setCellValue("6. ä»¥ä¸‹æ ç›®ä¸ºä¸‹æ‹‰é€‰ï¼šå½“前节点、跟踪方式、节点进展、有无脱期风险");
                }
            }
            // å¼¹å‡ºæ–‡ä»¶é€‰æ‹©å¯¹è¯æ¡†
            JFileChooser fileChooser = new JFileChooser();
            fileChooser.setSelectedFile(new File(path)); // é»˜è®¤æ–‡ä»¶å
            int result = fileChooser.showSaveDialog(frame1);
            if (result == JFileChooser.APPROVE_OPTION) {
                File selectedFile = fileChooser.getSelectedFile();
                try (FileOutputStream outputStream = new FileOutputStream(selectedFile)) {
                    workbook.write(outputStream);
                    JOptionPane.showMessageDialog(frame1, "文件保存成功", "成功", JOptionPane.INFORMATION_MESSAGE);
                } catch (IOException e) {
                    JOptionPane.showMessageDialog(frame1, "文件保存失败: " + e.getMessage(), "错误", JOptionPane.ERROR_MESSAGE);
                }
            }
        } catch (
                IOException e) {
            e.printStackTrace();
        }
    }
}
src/main/resources/db/csiczb1.db
Binary files differ
src/main/resources/mapper/cabin/CabinDao.xml
@@ -7,5 +7,9 @@
        select id, name
        from cabin
        where is_delete = 0
        UNION ALL
        SELECT
            null AS id,
            '' AS name
    </select>
</mapper>
src/main/resources/mapper/progressTrack/DjJdgzDismantTrackDao.xml
@@ -65,50 +65,78 @@
        b.UPDATE_DATE
    </select>
    <select id="getStatist" resultType="com.example.server.progressTrack.Dto.StatistDismantDto">
        select a.*,
               sum(case when c.status=1 then 1 else 0 end) as sbcxsl
        from (
                 select a.id,
                        case when a.pid=0 then a.NAME else '    '|| a.NAME end as name,
                        case when a.pid=0 then '' || a.id else ''|| a.pid || a.SORT end as sort,
                        count(DISTINCT b.LEVEL3_NETWORK_ID) as sbsl,
                        count(DISTINCT b.dismant_id) as zbjsl,
                        sum(case when b.status=1 then 1 else 0 end) as zbjcxsl,
                        sum( CASE WHEN dismant_time IS NULL THEN 0 ELSE 1 END ) AS dismantsl,
                        sum( CASE WHEN exit_time IS NULL THEN 0 ELSE 1 END ) AS exitsl,
                        sum( CASE WHEN return_weight_time IS NULL THEN 0 ELSE 1 END ) AS returnsl,
                        sum( CASE WHEN warehouse_time IS NULL THEN 0 ELSE 1 END ) AS warehousesl
                 from dj_sys_teamgroup_class  a
                          left join (
                     select a.id as id2 ,a.pid as pid2 ,c.LEVEL3_NETWORK_ID,
                            c.id as dismant_id,c.status,
                            c.dismant_time,
                            c.exit_time,
                            c.return_weight_time,
                            c.warehouse_time
                     from     dj_sys_teamgroup_class  a,dj_jdgz_network_level3 b,dj_jdgz_dismant_track c
                     where a.IS_DELETE= 0 and b.IS_DELETE = 0 and c.is_delete = 0
                       and a.AREA = 'hld'
                       and b.TEAMGROUP_ID = a.id
                       and c.LEVEL3_NETWORK_ID = b.id
                       and b.LEVEL1_NETWORK_ID = ${level1Id}
                 ) b on a.id=b.id2 or a.id = b.pid2
                 where a.AREA = 'hld' and a.IS_DELETE = 0
                 group by a.id,a.NAME
             ) a
        select a.id,
               case when a.pid=0 then a.NAME else '    '|| a.NAME end as name,
               case when a.pid=0 then '' || a.id else ''|| a.pid || a.SORT end as sort,
               sum(case when b.LEVEL3_NETWORK_ID is not null then 1 else 0 end) as sbsl,
               sum(case when sbStatus = 1 then 1 else 0 end) as sbcxsl,
               sum(case when zbjsl is null then 0 else zbjsl end) as zbjsl,
               sum(case when zbjwcsl is null then 0 else zbjwcsl end) as zbjcxsl,
               sum(case when dismantsl is null then 0 else dismantsl end) as dismantsl,
               sum(case when exitsl is null then 0 else exitsl end) as exitsl,
               sum(case when returnsl is null then 0 else returnsl end) as returnsl,
               sum(case when warehousesl is null then 0 else warehousesl end) as warehousesl
        from dj_sys_teamgroup_class  a
                 left join (
            select a.id as id2 ,a.pid as pid2,
                   case when EXISTS(select 1 from dj_jdgz_dismant_track c where c.LEVEL3_NETWORK_ID=b.id
                                    and (status=0 or status is null) and is_delete = 0) or not
                             EXISTS(select 1 from dj_jdgz_dismant_track c where c.LEVEL3_NETWORK_ID=b.id
                                    and status=1 and is_delete = 0)then 0 else 1 end as status
            from dj_sys_teamgroup_class  a  ,dj_jdgz_network_level3 b
            where a.IS_DELETE= 0 and b.IS_DELETE = 0
            select a.id as id2, a.pid as pid2,c.LEVEL3_NETWORK_ID,
                   case when EXISTS(select 1 from dj_jdgz_dismant_track s where s.LEVEL3_NETWORK_ID=b.id and (s.status=0 or s.status is null) and s.is_delete = 0) or not EXISTS(select 1 from dj_jdgz_dismant_track s where s.LEVEL3_NETWORK_ID=b.id and s.status=1 and s.is_delete = 0) then 0 else 1 end as sbStatus,
                   sum(case when c.id is not null then 1 else 0 end) as zbjsl,
                   sum(case when c.status=1 then 1 else 0 end) as zbjwcsl,
                   sum(case when c.dismant_time is null then 0 else 1 end) as dismantsl,
                   sum(case when c.exit_time is null then 0 else 1 end) as exitsl,
                   sum(case when c.return_weight_time is null then 0 else 1 end) as returnsl,
                   sum(case when c.warehouse_time is null then 0 else 1 end) as warehousesl
            from     dj_sys_teamgroup_class  a
                        left join dj_jdgz_network_level3 b on b.IS_DELETE = 0 and b.TEAMGROUP_ID = a.id
                        left join dj_jdgz_dismant_track c on c.is_delete = 0 and c.LEVEL3_NETWORK_ID = b.id
            where a.IS_DELETE= 0
              and a.AREA = 'hld'
              and b.TEAMGROUP_ID = a.id
              and b.LEVEL1_NETWORK_ID = ${level1Id}
        ) c on a.id=c.id2 or a.id = c.pid2
            group by a.id,a.NAME,b.id
        ) b on a.id=b.id2 or a.id = b.pid2
        where a.AREA = 'hld' and a.IS_DELETE = 0
        group by a.id,a.NAME
        order by sort
    </select>
    <select id="getStatus" resultType="java.lang.Boolean">
        SELECT CASE
        WHEN NOT EXISTS (
        SELECT 1
        FROM dj_jdgz_dismant_track
        WHERE LEVEL3_NETWORK_ID = ${level3NetworkId} AND  (status=0 or status is null)
        ) THEN TRUE
        ELSE FALSE
        END
    </select>
    <select id="getStatist2" resultType="com.example.server.progressTrack.Dto.StatistDismantDto">
        select a.id,a.name,
               sum(case when b.id is not null then 1 else 0 end) as sbsl,
               sum(case when sbStatus = 1 then 1 else 0 end) as sbcxsl,
               sum(case when zbjsl is null then 0 else zbjsl end) as zbjsl,
               sum(case when zbjwcsl is null then 0 else zbjwcsl end) as zbjcxsl,
               sum(case when dismantsl is null then 0 else dismantsl end) as dismantsl,
               sum(case when exitsl is null then 0 else exitsl end) as exitsl,
               sum(case when returnsl is null then 0 else returnsl end) as returnsl,
               sum(case when warehousesl is null then 0 else warehousesl end) as warehousesl
        from cabin a
                 left join (
            select b.id,c.cabin_id,
                   case when EXISTS(select 1 from dj_jdgz_dismant_track s where s.LEVEL3_NETWORK_ID=b.id and (s.status=0 or s.status is null) and s.is_delete = 0) or not EXISTS(select 1 from dj_jdgz_dismant_track s where s.LEVEL3_NETWORK_ID=b.id and s.status=1 and s.is_delete = 0) then 0 else 1 end as sbStatus,
                   sum(case when c.id is not null then 1 else 0 end) as zbjsl,
                   sum(case when c.status=1 then 1 else 0 end) as zbjwcsl,
                   sum(case when c.dismant_time is null then 0 else 1 end) as dismantsl,
                   sum(case when c.exit_time is null then 0 else 1 end) as exitsl,
                   sum(case when c.return_weight_time is null then 0 else 1 end) as returnsl,
                   sum(case when c.warehouse_time is null then 0 else 1 end) as warehousesl
            from dj_jdgz_network_level3 b
                     join dj_jdgz_dismant_track c on c.is_delete = 0 and c.LEVEL3_NETWORK_ID = b.id
            where b.IS_DELETE = 0
                  and b.LEVEL1_NETWORK_ID = ${level1Id}
                  and b.TEAMGROUP_ID in (select id from dj_sys_teamgroup_class where AREA = 'hld' and IS_DELETE = 0 and (id = ${id} or pid = ${id}))
            group by b.id,c.cabin_id
        ) b on a.id=b.cabin_id
        where a.IS_DELETE = 0
        group by b.cabin_id
        order by a.id
    </select>
</mapper>
src/main/resources/mapper/progressTrack/DjJdgzNetworkLevel1Dao.xml
@@ -141,9 +141,14 @@
        GROUP BY a.id
    </select>
    <select id="getProjectList" resultType="com.example.client.dto.JComboBoxItem">
        select id, project_name as `name`
        select id, project_name as `name`,year
        from dj_jdgz_network_level1
        where is_delete = 0
        UNION ALL
        SELECT
            null AS id,
            '' AS name ,
            0 AS year
        ORDER BY year desc
    </select>
src/main/resources/mapper/progressTrack/DjJdgzNetworkLevel3Dao.xml
@@ -33,28 +33,28 @@
        LEFT JOIN dj_jdgz_network_level1_list b on b.NETWORK_ID = c.ID
        LEFT JOIN dj_jdgz_network_level2_list d on d.ID = a.LEVEL2_NODE_ID
        where
            a.is_delete = 0
            and b.is_delete = 0
            and c.is_delete = 0
            and d.is_delete = 0
            <if test="shipId!=null">
                and c.ship_id = ${shipId}
            </if>
            <if test="deptId!=null">
                and a.dept_id = ${deptId}
            </if>
            <if test="teamId!=null">
                and a.TEAMGROUP_ID = ${teamId}
            </if>
            <if test="cabinId!=null">
                and a.cabin_id  LIKE '%${cabinId}%'
            </if>
            <if test="type!=null and type!=''">
                and a.type  = #{type}
            </if>
            <if test="name!=null and name!=''">
                and a.name  LIKE '%${name}%'
            </if>
        a.is_delete = 0
        and b.is_delete = 0
        and c.is_delete = 0
        and d.is_delete = 0
        <if test="shipId!=null">
            and c.ship_id = ${shipId}
        </if>
        <if test="deptId!=null">
            and a.dept_id = ${deptId}
        </if>
        <if test="teamId!=null">
            and a.TEAMGROUP_ID = ${teamId}
        </if>
        <if test="cabinId!=null">
            and a.cabin_id LIKE '%${cabinId}%'
        </if>
        <if test="type!=null and type!=''">
            and a.type = #{type}
        </if>
        <if test="name!=null and name!=''">
            and a.name LIKE '%${name}%'
        </if>
        group by a.id
    </select>
@@ -93,6 +93,38 @@
            and a.TEAMGROUP_ID = ${teamId}
        </if>
    </select>
    <select id="getNodeList" resultType="com.example.server.progressTrack.Dto.TableNodeDto">
        SELECT
        b.name,
        a.NETWORK_ID,
        a.process_name,
        a.ID, a.REQUIRED_COMPLETION_TIME, a.ACTUAL_COMPLETION, a.CURRENT_STATUS
        FROM `dj_jdgz_network_level3_list` a
        LEFT JOIN dj_jdgz_network_level3 b on b.ID = a.NETWORK_ID
        LEFT JOIN dj_jdgz_network_level1 c on c.ID = b.LEVEL1_NETWORK_ID
        where
        a.is_delete = 0
        and b.is_delete = 0
        and c.is_delete = 0
        <if test="shipId!=null">
            and c.ship_id = ${shipId}
        </if>
        <if test="deptId!=null">
            and b.dept_id = ${deptId}
        </if>
        <if test="teamId!=null">
            and b.TEAMGROUP_ID = ${teamId}
        </if>
        <if test="cabinId!=null">
            and b.cabin_id LIKE '%${cabinId}%'
        </if>
        <if test="type!=null and type!=''">
            and b.type = #{type}
        </if>
        <if test="name!=null and name!=''">
            and b.name LIKE '%${name}%'
        </if>
    </select>
</mapper>
src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml
@@ -18,6 +18,10 @@
        b.LEVEL3_NODE_ID ELSE a.id
        END AS level3NodeId,
        c.id as level3NetworkId,
        c.teamgroup_name,
        c.dept_id,
        c.cabin_id,
        c.type,
        c.`NAME` as level3NetworkName,
        a.PROCESS_NAME AS level3NodeName,
        a.REQUIRED_COMPLETION_TIME,
@@ -103,37 +107,38 @@
    <select id="getReport" resultType="com.example.server.progressTrack.Dto.StatistReportsDto">
        select d.*, e.name as teamGroupName
        from (
        select TEAMGROUP_ID,
        count(1) as allNum,
        sum(case when status = 'zcjxz' or status = 'lq' then 1 else 0 end) as jxzNum,
        sum(case when status = 'lq' then 1 else 0 end) as lqNum,
        sum(case when status = 'yq' then 1 else 0 end) as yqNum,
        sum(case when status = 'zcwc' then 1 else 0 end) as zcwcNum,
        sum(case when status = 'cqwc' then 1 else 0 end) as cqwcNum
        from (
        select b.TEAMGROUP_ID,
        CASE
        WHEN b.CURRENT_STATUS = 1
        AND b.REQUIRED_COMPLETION_TIME > b.ACTUAL_COMPLETION THEN
        'cqwc'
        WHEN b.CURRENT_STATUS = 1 THEN
        'zcwc'
        WHEN b.REQUIRED_COMPLETION_TIME &lt; (SELECT datetime('now')) THEN 'yq'
        WHEN b.REQUIRED_COMPLETION_TIME &lt; (SELECT date('now', '-' || c.advent_day || ' days')) THEN 'lq'
        ELSE 'zcjxz'
        END AS status
        from dj_jdgz_network_level3 a,
        dj_jdgz_network_level3_list b,
        dj_jdgz_network_level1 c
        where a.IS_DELETE = 0
        and a.LEVEL1_NETWORK_ID = ${level1NetworkId}
        and a.LEVEL1_NETWORK_ID = c.id
        and b.IS_DELETE = 0
        and b.NETWORK_ID = a.id
        ) c
        group by TEAMGROUP_ID
        ) d,
        dj_sys_teamgroup_class e
                 select TEAMGROUP_ID,
                        count(1)                                                           as allNum,
                        sum(case when status = 'zcjxz' or status = 'lq' then 1 else 0 end) as jxzNum,
                        sum(case when status = 'lq' then 1 else 0 end)                     as lqNum,
                        sum(case when status = 'yq' then 1 else 0 end)                     as yqNum,
                        sum(case when status = 'zcwc' then 1 else 0 end)                   as zcwcNum,
                        sum(case when status = 'cqwc' then 1 else 0 end)                   as cqwcNum
                 from (
                          select a.TEAMGROUP_ID,
                                 CASE
                                     WHEN b.CURRENT_STATUS = 1
                                         AND b.REQUIRED_COMPLETION_TIME > b.ACTUAL_COMPLETION THEN
                                         'cqwc'
                                     WHEN b.CURRENT_STATUS = 1 THEN
                                         'zcwc'
                                     WHEN b.REQUIRED_COMPLETION_TIME &lt; (SELECT datetime('now')) THEN 'yq'
                                     WHEN b.REQUIRED_COMPLETION_TIME &lt;
                                          (SELECT date('now', '-' || c.advent_day || ' days')) THEN 'lq'
                                     ELSE 'zcjxz'
                                     END AS status
                          from dj_jdgz_network_level3 a,
                               dj_jdgz_network_level3_list b,
                               dj_jdgz_network_level1 c
                          where a.IS_DELETE = 0
                            and a.LEVEL1_NETWORK_ID = ${level1NetworkId}
                            and a.LEVEL1_NETWORK_ID = c.id
                            and b.IS_DELETE = 0
                            and b.NETWORK_ID = a.id
                      ) c
                 group by TEAMGROUP_ID
             ) d,
             dj_sys_teamgroup_class e
        where d.TEAMGROUP_ID = e.id
    </select>
    <select id="prompt" resultType="com.example.server.progressTrack.model.DjJdgzTrackRecord">
@@ -144,7 +149,7 @@
        e.PROCESS_NAME AS level1NodeName,
        f.project_name,
        g.week_no,
        h.name as teamGroupName
        b.TEAMGROUP_NAME
        FROM
        `dj_jdgz_network_level3_list` a
        LEFT JOIN dj_jdgz_network_level3 b ON b.id = a.NETWORK_ID
@@ -342,5 +347,87 @@
        from dj_jdgz_track_record
        where LEVEL3_NODE_ID = ${level3NodeId}
    </select>
    <select id="getListByImport" resultType="com.example.server.progressTrack.model.DjJdgzTrackRecord">
        SELECT
        c.id,
        c.`NAME` as level3NetworkName,
        CASE
        WHEN
        b.GENERAL_REPAIR_UNIT IS NOT NULL THEN b.GENERAL_REPAIR_UNIT else
        c.GENERAL_REPAIR_UNIT
        END as GENERAL_REPAIR_UNIT,
        CASE
        WHEN
        b.GENERAL_REPAIR_UNIT_DIRECTOR IS NOT NULL THEN b.GENERAL_REPAIR_UNIT_DIRECTOR else
        c.GENERAL_REPAIR_UNIT_DIRECTOR
        END as GENERAL_REPAIR_UNIT_DIRECTOR,
        CASE
        WHEN
        b.GENERAL_REPAIR_UNIT_CONTACT IS NOT NULL THEN
        b.GENERAL_REPAIR_UNIT_CONTACT else
        c.GENERAL_REPAIR_UNIT_CONTACT
        END as GENERAL_REPAIR_UNIT_CONTACT,
        CASE
        WHEN
        b.REPAIR_UNIT IS NOT NULL THEN b.REPAIR_UNIT else
        c.REPAIR_UNIT
        END as REPAIR_UNIT,
        CASE
        WHEN
        b.REPAIR_UNIT_DIRECTOR IS NOT NULL THEN b.REPAIR_UNIT_DIRECTOR else
        c.REPAIR_UNIT_DIRECTOR
        END as REPAIR_UNIT_DIRECTOR,
        CASE
        WHEN
        b.REPAIR_UNIT_CONTACT IS NOT NULL THEN
        b.REPAIR_UNIT_CONTACT else
        c.REPAIR_UNIT_CONTACT
        END as REPAIR_UNIT_CONTACT,
        b.track_person,
        b.track_person_unit,
        b.track_person_contact,
        b.tracked_person,
        b.tracked_person_unit,
        b.tracked_person_contact
        FROM
        dj_jdgz_network_level3_list a
        LEFT JOIN (
        SELECT *
        FROM dj_jdgz_track_record
        WHERE (LEVEL3_NODE_ID, update_date) IN (
        SELECT LEVEL3_NODE_ID, MAX(update_date)
        FROM dj_jdgz_track_record
        GROUP BY LEVEL3_NODE_ID
        )
        ) b ON b.LEVEL3_NODE_ID = a.id
        LEFT JOIN dj_jdgz_network_level3 c ON c.id = a.NETWORK_ID
        LEFT JOIN dj_jdgz_network_level2_list d ON d.id = c.LEVEL2_NODE_ID
        LEFT JOIN dj_jdgz_network_level2 e ON e.id = d.NETWORK_ID
        LEFT JOIN dj_jdgz_network_level1_list f ON f.id = e.LEVEL1_NODE_ID
        LEFT JOIN dj_jdgz_network_level1 g ON g.id = c.LEVEL1_NETWORK_ID
        WHERE
        a.IS_DELETE = 0
        and a.network_id != 10000
        <if test="selectedIds!=null and selectedIds!=''">
            AND c.TEAMGROUP_ID in (${selectedIds})
        </if>
        and (b.CURRENT_STATUS IS null OR b.CURRENT_STATUS = 0)
        AND c.IS_DELETE = 0
        AND d.IS_DELETE = 0
        AND e.IS_DELETE = 0
        AND f.IS_DELETE = 0
        AND g.IS_DELETE = 0
        AND g.id = ${level1Id}
        <if test="level2Id!=null">
            AND e.id = ${level2Id}
        </if>
        <if test="level2NodeId!=null">
            AND d.id = ${level2NodeId}
        </if>
        GROUP BY
        c.id
        ORDER BY
        a.REQUIRED_COMPLETION_TIME
    </select>
</mapper>
src/main/resources/mapper/teamgroup/SysTeamGroupClassDao.xml
@@ -5,25 +5,25 @@
    <select id="getAll" resultType="com.example.server.teamGroup.model.SysTeamGroupClass">
        SELECT
            a.*
        a.*
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
        DJ_SYS_TEAMGROUP_CLASS a
        WHERE
            a.is_delete = 0
            <if test="localArea!=null and (localArea=='sy' or localArea=='qd' or localArea=='hld')">
                and a.area=#{localArea}
            </if>
        a.is_delete = 0
        <if test="localArea!=null and (localArea=='sy' or localArea=='qd' or localArea=='hld')">
            and a.area=#{localArea}
        </if>
        ORDER BY
            a.area desc, a.sort
        a.area desc, a.sort
    </select>
    <select id="getMapAll" resultType="com.example.client.entity.MapData">
        SELECT
            a.id,a.name
        a.id,a.name
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
        DJ_SYS_TEAMGROUP_CLASS a
        WHERE
            a.is_delete = 0
        a.is_delete = 0
        <if test="localArea!=null and (localArea=='sy' or localArea=='qd')">
            and a.area=#{localArea}
        </if>
@@ -52,7 +52,7 @@
    </select>
    <select id="getTeamGroupIdByNames" resultType="java.lang.Long">
        SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE  a.is_delete=0 AND a.name IN
        SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE a.is_delete=0 AND a.name IN
        <foreach item="item" index="index" collection="list"
                 open="(" separator="," close=")">
            #{item}
@@ -63,90 +63,103 @@
    </select>
    <select id="getTeamGroupIdByName" resultType="java.lang.Long">
        SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE  a.is_delete=0 AND a.name = #{name}
        SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE a.is_delete=0 AND a.name = #{name}
        <if test="localArea!=null and (localArea=='sy' or localArea=='qd')">
            and a.area=#{localArea}
        </if>
    </select>
    <select id="getBzTeamGroupIdByName" resultType="java.lang.Long">
         SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE  a.is_delete=0 AND a.name = #{name}
        SELECT a.id FROM DJ_SYS_TEAMGROUP_CLASS a WHERE a.is_delete=0 AND a.name = #{name}
        <if test="localArea!=null and (localArea=='sy' or localArea=='qd')">
            and a.area=#{localArea}
        </if>
    </select>
    <select id="getTeamGroupClassList" resultType="com.example.server.teamGroup.model.SysTeamGroupClass">
         SELECT
            a.id,a.name
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
        WHERE
            a.is_delete = 0
            and area = 'sy'
            and pid != 0
            order by sort
        SELECT a.id,
               a.name
        FROM DJ_SYS_TEAMGROUP_CLASS a
        WHERE a.is_delete = 0
          and area = 'sy'
          and pid != 0
        order by sort
    </select>
    <select id="getList" resultType="com.example.client.dto.JComboBoxItem">
        SELECT
            a.id,
            CASE
                WHEN a.pid != 0  THEN  b.name || '/' || a.name
                ELSE a.name
                END AS name
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
                LEFT JOIN
            DJ_SYS_TEAMGROUP_CLASS b ON a.pid = b.id
        WHERE
            a.is_delete = 0
        SELECT a.id,
               CASE
                   WHEN a.pid != 0 THEN b.name || '/' || a.name
                   ELSE a.name
                   END AS name
        FROM DJ_SYS_TEAMGROUP_CLASS a
                 LEFT JOIN
             DJ_SYS_TEAMGROUP_CLASS b ON a.pid = b.id
        WHERE a.is_delete = 0
          AND a.pid != 0
        ORDER BY
            a.sort;
        ORDER BY a.sort;
    </select>
    <select id="getTeamList" resultType="com.example.client.dto.JComboBoxItem">
        SELECT
            a.id,
            a.name
        a.id,
        a.name,
        a.sort
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
        DJ_SYS_TEAMGROUP_CLASS a
        WHERE
            a.is_delete = 0
          AND a.pid != 0
        a.is_delete = 0
        AND a.pid != 0
        <if test="pid!=null">
            AND a.pid = ${pid}
        </if>
        UNION ALL
        SELECT
        null AS id,
        '' AS name ,
        0 AS sort
        ORDER BY
            a.sort;
        sort;
    </select>
    <select id="getDeptList" resultType="com.example.client.dto.JComboBoxItem">
        SELECT
            a.id,
            a.name
        FROM
            DJ_SYS_TEAMGROUP_CLASS a
        WHERE
            a.is_delete = 0
        SELECT a.id,
               a.name,
               a.sort
        FROM DJ_SYS_TEAMGROUP_CLASS a
        WHERE a.is_delete = 0
          AND a.pid = 0
        ORDER BY
            a.sort;
        UNION ALL
        SELECT null AS id,
               ''   AS name,
               0    AS sort
        ORDER BY sort
    </select>
    <select id="getListByTree" resultType="com.example.server.teamGroup.model.SysTeamGroupClass">
        SELECT
            a.id,
            CASE
                WHEN a.pid = 0 THEN
                    a.NAME ELSE '    ' || a.NAME
                END AS name,
            CASE
        SELECT a.id,
               a.pid,
               CASE
                   WHEN a.pid = 0 THEN
                       a.NAME
                   ELSE '    ' || a.NAME
                   END AS name,
               CASE
                   WHEN a.pid = 0 THEN
                       '部门'
                   ELSE '专业'
                   END AS type,
               CASE
                WHEN a.pid = 0 THEN
                    '' || a.id ELSE '' || a.pid || a.SORT
                END AS sort2
        FROM
            dj_sys_teamgroup_class a
        WHERE
            a.AREA = 'hld'
                   WHEN a.pid = 0 THEN
                       '' || a.id
                   ELSE '' || a.pid || a.SORT
                   END AS sort2
        FROM dj_sys_teamgroup_class a
        WHERE a.AREA = 'hld'
          AND a.IS_DELETE = 0
        ORDER BY sort2
    </select>
    <select id="getSortMax" resultType="java.lang.Integer">
        select max(sort)
        FROM dj_sys_teamgroup_class
        WHERE AREA = 'hld'
          AND IS_DELETE = 0
          and pid = ${pid}
    </select>
</mapper>
src/main/resources/templateFile/Èý¼¶ÍøÂçͼµ¼ÈëÄ£°å.xlsx
Binary files differ
src/main/resources/templateFile/×Ó²¿¼þµ¼ÈëÄ£°å.xlsx
Binary files differ
src/main/resources/templateFile/¸ú×ټǼµ¼ÈëÄ£°å.xlsx
Binary files differ