From 92705ac08a97ddc4904795f024723aab69e1abd8 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期六, 05 四月 2025 21:47:59 +0800
Subject: [PATCH] 修改

---
 src/main/java/com/example/client/service/TrackRecordManageService.java |  115 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 77 insertions(+), 38 deletions(-)

diff --git a/src/main/java/com/example/client/service/TrackRecordManageService.java b/src/main/java/com/example/client/service/TrackRecordManageService.java
index d4bcada..f38194d 100644
--- a/src/main/java/com/example/client/service/TrackRecordManageService.java
+++ b/src/main/java/com/example/client/service/TrackRecordManageService.java
@@ -11,7 +11,7 @@
 import com.example.server.progressTrack.service.DjJdgzTrackRecordService;
 import com.example.server.teamGroup.service.SysTeamGroupClassService;
 import com.example.server.user.model.SysUser;
-import com.example.server.utils.CacheUtils;
+import com.example.server.utils.UserAndSiteUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -81,35 +81,43 @@
         String[] typeList = new String[]{
                 "","鏀硅", "鍔犺", "鎹㈣", "淇悊","鏀硅繘鎬т慨鐞�"
         };
+        JComboBoxItem[] isealCabin = {
+                new JComboBoxItem(0L, "鍚�"),
+                new JComboBoxItem(1L, "鏄�"),
+        };
 
         JLabel JLabel0 = new JLabel("宸ョ▼");
         JComboBox<JComboBoxItem> comboBox = new JComboBox<>(projectList);
-        comboBox.setPreferredSize(new Dimension(150, 28));
+        comboBox.setPreferredSize(new Dimension(200, 28));
 
         JLabel JLabel1 = new JLabel("閮ㄩ棬");
         JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(deptList);
-        comboBox1.setPreferredSize(new Dimension(150, 28));
+        comboBox1.setPreferredSize(new Dimension(140, 28));
 
         JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(deptList[0].getId());
 
         JLabel JLabel2 = new JLabel("涓撲笟");
         JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(teamList1);
-        comboBox2.setPreferredSize(new Dimension(150, 28));
+        comboBox2.setPreferredSize(new Dimension(140, 28));
 
         JLabel JLabel3 = new JLabel("鑸卞");
         JComboBox<JComboBoxItem> comboBox3 = new JComboBox<>(cabinList);
-        comboBox3.setPreferredSize(new Dimension(150, 28));
+        comboBox3.setPreferredSize(new Dimension(140, 28));
 
         JLabel JLabel4 = new JLabel("绫诲埆");
         JComboBox<String> comboBox4 = new JComboBox<>(typeList);
-        comboBox4.setPreferredSize(new Dimension(150, 28));
+        comboBox4.setPreferredSize(new Dimension(140, 28));
 
         JLabel JLabel5 = new JLabel("鐘舵��");
         JComboBox<JComboBoxItem> comboBox5 = new JComboBox<>(statusList);
-        comboBox5.setPreferredSize(new Dimension(150, 28));
+        comboBox5.setPreferredSize(new Dimension(140, 28));
+
+        JLabel JLabel78 = new JLabel("鏄惁褰卞搷灏佽埍");
+        JComboBox<JComboBoxItem> comboBox7 = new JComboBox<>(isealCabin);
+        comboBox7.setPreferredSize(new Dimension(140, 28));
 
         JTextField sb = new JTextField(16);
-        sb.setPreferredSize(new Dimension(150, 28));
+        sb.setPreferredSize(new Dimension(140, 28));
         JButton query = new JButton("鏌ヨ");
 
         JButton btnTj = new JButton("缁熻鎶ヨ〃");
@@ -126,7 +134,9 @@
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -149,7 +159,9 @@
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -168,7 +180,9 @@
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -187,7 +201,9 @@
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -205,7 +221,9 @@
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -223,8 +241,28 @@
                 JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                 String type = comboBox4.getSelectedItem().toString();
                 JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
 
-                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()), null);
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
+
+                CommonTable.refreshTable(list, columnDto, table);
+                table.setRowHeight(25);
+
+                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+                tableModelListener(table, jFrame, list);
+            }
+        });
+        comboBox7.addItemListener(new ItemListener() {
+            public void itemStateChanged(final ItemEvent event) {
+                JComboBoxItem project = (JComboBoxItem) comboBox.getSelectedItem();
+                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
+                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
+                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
+                String type = comboBox4.getSelectedItem().toString();
+                JComboBoxItem status = (JComboBoxItem) comboBox5.getSelectedItem();
+                JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem();
+
+                list = djJdgzTrackRecordService.getList(project.getId(), dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(status.getId()),Math.toIntExact(isealCabinItem.getId()), null);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -237,7 +275,7 @@
             @Override
             public void actionPerformed(ActionEvent e) {
                 JComboBoxItem project = (JComboBoxItem) comboBox.getSelectedItem();
-                list = djJdgzTrackRecordService.getList(project.getId(), null, null, null, null, 0, sb.getText());
+                list = djJdgzTrackRecordService.getList(project.getId(), null, null, null, null, 0, 0,sb.getText());
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -256,7 +294,7 @@
             }
         });
 
-        list = djJdgzTrackRecordService.getList(projectList[0].getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(statusList[0].getId()), null);
+        list = djJdgzTrackRecordService.getList(projectList[0].getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(statusList[0].getId()),  Math.toIntExact(isealCabin[0].getId()),null);
         if (list == null || list.size() == 0) {
             JOptionPane.showMessageDialog(null, "杩樻湭褰曞叆涓夌骇缃戠粶鍥炬暟鎹�", "鎻愮ず", JOptionPane.WARNING_MESSAGE);
             return null;
@@ -275,6 +313,7 @@
         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("鏄惁褰卞搷灏佽埍", "isealCabin", 180, "dict", false, null, isealCabin));
         columnDto.add(new ColumnDto("褰撳墠鑺傜偣", "level3NodeName", 150, null, false, null, null));
         columnDto.add(new ColumnDto("璁″垝瀹屾垚鏃堕棿", "requiredCompletionTime", 180, null, false, null, null));
         columnDto.add(new ColumnDto("璺熻釜璁板綍", "", 100, "", true, buttonList, null));
@@ -297,7 +336,6 @@
         String[] items = itemList.toArray(new String[0]);
         columnModel = table.getColumnModel();
         MultiSelectComboBox2 mulcomboBox = new MultiSelectComboBox2(items, columnDto, columnModel);
-
 /*        final Integer[] lastIndex = {-1};
         mulcomboBox.addItemListener(new ItemListener() {
             @Override
@@ -322,27 +360,28 @@
         });*/
 
         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(JLabel5, new GBC(10, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox5, new GBC(11, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-
-        topJpanel.add(btnTj, new GBC(1, 1, 1, 1).setInsets(5));
-        topJpanel.add(btnJc, new GBC(2, 1, 2, 1).setInsets(5));
-        topJpanel.add(btnImport, new GBC(4, 1, 2, 1).setInsets(5));
-        topJpanel.add(btnExport, new GBC(6, 1, 2, 1).setInsets(5));
-        topJpanel.add(mulcomboBox, new GBC(8, 1, 2, 1).setInsets(5));
-        topJpanel.add(sb, new GBC(10, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(query, new GBC(12, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(comboBox, new GBC(1, 0, 3, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel1, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox1, new GBC(5, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel2, new GBC(7, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox2, new GBC(8, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel3, new GBC(10, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox3, new GBC(11, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel4, new GBC(13, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox4, new GBC(14, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel5, new GBC(16, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox5, new GBC(17, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel.add(JLabel78, new GBC(19, 0, 3, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(comboBox7, new GBC(22, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
 
 
+        topJpanel.add(btnTj, new GBC(1, 1, 3, 1).setInsets(5));
+        topJpanel.add(btnJc, new GBC(4, 1, 3, 1).setInsets(5));
+        topJpanel.add(btnImport, new GBC(7, 1, 3, 1).setInsets(5));
+        topJpanel.add(btnExport, new GBC(10, 1, 3, 1).setInsets(5));
+        topJpanel.add(mulcomboBox, new GBC(13, 1, 3, 1).setInsets(5));
+        topJpanel.add(sb, new GBC(16, 1, 3, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel.add(query, new GBC(19, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
         table.addMouseListener(new MouseAdapter() {
             @Override
             public void mouseClicked(MouseEvent e) {
@@ -530,14 +569,14 @@
                 int row = table.rowAtPoint(e.getPoint());
                 int col = table.columnAtPoint(e.getPoint());
                 DjJdgzTrackRecord djJdgzTrackRecord = list.get(row);
-                String site = (String) CacheUtils.get("site", "site");
+                String site = (String) UserAndSiteUtils.get("site", "site");
 
                 if (djJdgzTrackRecord.getCurrentStatus() == 1 && site.equals("宸ヤ綔缁�")) {
                     table.setRowSelectionInterval(row, row);
                     popupMenu.show(e.getComponent(), e.getX(), e.getY());
                     menuItem1.addActionListener(ex -> {
                         djJdgzTrackRecordService.retract(djJdgzTrackRecord.getId());
-                        List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(djJdgzTrackRecord.getLevel1NetworkId(), null, null, null, null, 0, null);
+                        List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(djJdgzTrackRecord.getLevel1NetworkId(), null, null, null, null, 0,0, null);
                         CommonTable.refreshTable(list, columnDto, table);
                         tableModelListener(table, jFrame, list);
                     });

--
Gitblit v1.9.1