| | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | Map<String, Long> shipMap = new HashMap<>(); |
| | |
| | | top.add(query, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null, null); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null, null,null); |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "è¿æªå½å
¥ä¸çº§ç½ç»å¾æ°æ®", "æç¤º", JOptionPane.WARNING_MESSAGE); |
| | | return null; |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null, null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | query.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | list = level3Service.getList(null, null, null, null, null,null, sb.getText()); |
| | | list = level3Service.getList(null, null, null, null, null,null,null, sb.getText()); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | 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],0,null); |
| | | List<DjJdgzNetworkLevel3> list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],0,0,null); |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | level3ManageService.tableModelListener(list, subTable, jFrame); |
| | | System.out.println("导å
¥æåæ¶é´" + new Date()); |
| | |
| | | JLabel label1 = new JLabel("ä¸çº§ç½ç»å¾èç¹"); |
| | | JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(); |
| | | comboBox1.setModel(new DefaultComboBoxModel<>(level2List)); |
| | | comboBox1.setSelectedIndex(-1); |
| | | |
| | | JLabel label2 = new JLabel("äºçº§ç½ç»å¾èç¹"); |
| | | JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(level2NodeList); |
| | | comboBox2.setSelectedIndex(-1); |
| | | comboBox2.setRenderer(new DefaultListCellRenderer() { |
| | | @Override |
| | | public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
| | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(level1Id[0], deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], 0,0, null); |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | |
| | | frame1.setVisible(true); |
| | | |
| | | mxGraph graph = new mxGraph(); |
| | | graph = netWorkDiagramService.getCsDiagram(graph,data.getContent(),null,diagram.getWidth(),diagram.getHeight()); |
| | | graph = netWorkDiagramService.getCsDiagram(graph,data.getContent(),null,diagram.getWidth(),diagram.getHeight(),null); |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | | graphComponent.setDragEnabled(false); |
| | |
| | | String json = list.get(0).getContent(); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level1Service.getNodeStatusData(list.get(0).getId()); |
| | | |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,null); |
| | | |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | |
| | | int r = subTable.getSelectedRow(); |
| | | DjJdgzNetworkLevel1 data = list.get(r); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level1Service.getNodeStatusData(data.getId()); |
| | | mxGraph csDiagram = netWorkDiagramService.getCsDiagram(graph2[0], data.getContent(), nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | mxGraph csDiagram = netWorkDiagramService.getCsDiagram(graph2[0], data.getContent(), nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,null); |
| | | if (nodeStatusList != null && nodeStatusList.size() > 0) { |
| | | graph2[0] = csDiagram; |
| | | } else { |
| | |
| | | |
| | | mxGraph graph = new mxGraph(); |
| | | DjJdgzNetworkLevel2 djJdgzNetworkLevel2 = level2Service.get(data.getId()); |
| | | graph = netWorkDiagramService.getCsDiagram(graph,djJdgzNetworkLevel2.getContent(),null,diagram.getWidth(),diagram.getHeight()); |
| | | graph = netWorkDiagramService.getCsDiagram(graph,djJdgzNetworkLevel2.getContent(),null,diagram.getWidth(),diagram.getHeight(),null); |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | | graphComponent.setDragEnabled(false); |
| | |
| | | import com.example.client.dto.ColumnDto; |
| | | import com.example.client.utils.CommonTable; |
| | | import com.example.client.utils.Compute; |
| | | import com.example.server.progressTrack.Dto.DiagramNodeDto; |
| | | import com.example.server.progressTrack.Dto.NetworkNodeStatusDto; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel1; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel2; |
| | |
| | | import com.example.server.progressTrack.service.NetWorkDiagramService; |
| | | import com.mxgraph.swing.mxGraphComponent; |
| | | import com.mxgraph.view.mxGraph; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public class Level2ViewService { |
| | | @Autowired |
| | | private DjJdgzNetworkLevel2Service level2Service; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel1Service level1Service; |
| | | @Autowired |
| | | private NetWorkDiagramService netWorkDiagramService; |
| | | |
| | |
| | | |
| | | // å建åè¡¨æ ¼ |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | List<DjJdgzNetworkLevel2> list = level2Service.getList(null); |
| | | List<DjJdgzNetworkLevel1> list = level1Service.getList(null); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "è¿æªå½å
¥äºçº§ç½ç»å¾æ°æ®", "æç¤º", JOptionPane.WARNING_MESSAGE); |
| | |
| | | } |
| | | |
| | | columnDto.add(new ColumnDto("åºå·", "", 120, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("å·¥ç¨", "ProjectName", 145, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("ä¸çº§èç¹", "processName", 125, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("å·¥ç¨", "ProjectName", 270, null, false, null, null)); |
| | | //columnDto.add(new ColumnDto("ä¸çº§èç¹", "processName", 125, null, false, null, null)); |
| | | |
| | | JTable subTable = CommonTable.createCommonTable(list, columnDto); |
| | | subTable.setRowHeight(25); |
| | |
| | | panel.add(hSplitPane, BorderLayout.CENTER); |
| | | |
| | | mxGraph graph = new mxGraph(); |
| | | String json = list.get(0).getContent(); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level2Service.getNodeStatusData(list.get(0).getId()); |
| | | |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | List<DiagramNodeDto> list2 = level1Service.getNodeList(list.get(0).getId()); |
| | | List<DiagramNodeDto> list22 = level1Service.getNodeList2(list.get(0).getId()); |
| | | |
| | | String json = netWorkDiagramService.createSimpleDiagram(list2); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level1Service.getNodeStatus(list.get(0).getId()); |
| | | |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,list22); |
| | | |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | |
| | | if (e.getButton() == MouseEvent.BUTTON1) { |
| | | // å¾å°éä¸çè¡åçç´¢å¼å¼ |
| | | int r = subTable.getSelectedRow(); |
| | | DjJdgzNetworkLevel2 data = list.get(r); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level2Service.getNodeStatusData(data.getId()); |
| | | mxGraph csDiagram = netWorkDiagramService.getCsDiagram(graph2[0], data.getContent(), nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | if (nodeStatusList != null && nodeStatusList.size() > 0) { |
| | | |
| | | List<DiagramNodeDto> list2 = level1Service.getNodeList(list.get(r).getId()); |
| | | |
| | | String json = netWorkDiagramService.createSimpleDiagram(list2); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level1Service.getNodeStatus(list.get(r).getId()); |
| | | List<DiagramNodeDto> list22 = level1Service.getNodeList2(list.get(r).getId()); |
| | | mxGraph csDiagram = netWorkDiagramService.getCsDiagram(graph2[0], json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,list22); |
| | | if (StringUtils.isNotBlank(json)) { |
| | | graph2[0] = csDiagram; |
| | | } else { |
| | | graph2[0].removeCells(graph2[0].getChildVertices(graph2[0].getDefaultParent())); |
| | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | List<DjJdgzNetworkLevel3List> list = level3ListService.getList(data.getId()); |
| | | if (list.size() == 0) { |
| | | list = level3ListService.getDefult(); |
| | | list = level3ListService.getDefult(data.getType()); |
| | | } |
| | | for (DjJdgzNetworkLevel3List item : list) { |
| | | if (item.getTeamgroupId() == null) { |
| | |
| | | frame1.setVisible(true); |
| | | |
| | | mxGraph graph = new mxGraph(); |
| | | graph = netWorkDiagramService.getCsDiagram(graph, data.getContent(), null, diagram.getWidth(), diagram.getHeight()); |
| | | graph = netWorkDiagramService.getCsDiagram(graph, data.getContent(), null, diagram.getWidth(), diagram.getHeight(),null); |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | | graphComponent.setDragEnabled(false); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | JComboBoxItem[] isealCabin = { |
| | | new JComboBoxItem(10000L, ""), |
| | |
| | | JComboBox<JComboBoxItem> comboBox5 = new JComboBox<>(isealCabin); |
| | | comboBox5.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | | JLabel JLabel6 = new JLabel("æ¯å¦èè°"); |
| | | JComboBox<JComboBoxItem> comboBox6 = new JComboBox<>(isealCabin); |
| | | comboBox6.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | | JTextField sb = new JTextField(16); |
| | | JButton query = new JButton("æ¥è¯¢"); |
| | | |
| | |
| | | |
| | | topJpanel.add(JLabel5, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(comboBox5, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(sb, new GBC(2, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(query, new GBC(4, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(btnInsert, new GBC(5, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(btnImport, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(JLabel6, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(comboBox6, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(sb, new GBC(4, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(query, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(btnInsert, new GBC(7, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(btnImport, new GBC(8, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()), null); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()),Math.toIntExact(isealCabin[0].getId()), null); |
| | | List<TableButton> buttonList = new ArrayList<>(); |
| | | buttonList.add(new TableButton("edit", "ç¼è¾")); |
| | | buttonList.add(new TableButton("del", "å é¤")); |
| | |
| | | |
| | | columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("åºå·", "", 100, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("åºå·", "", 80, "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", 100, "dict", false, null, cabinList)); |
| | | columnDto.add(new ColumnDto("é¨é¨", "deptId", 150, "dict", false, null, deptList)); |
| | | columnDto.add(new ColumnDto("ä¸ä¸", "teamgroupId", 150, "dict", false, null, teamList)); |
| | | columnDto.add(new ColumnDto("è±å®¤", "cabinId", 80, "dict", false, null, cabinList)); |
| | | columnDto.add(new ColumnDto("ç±»å«", "type", 120, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("ä¸çº§ç½ç»å¾èç¹åç§°", "level1NodeName", 185, 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("æ¯å¦å½±åå°è±", "isealCabin", 176, "dict", false, null, isealCabin)); |
| | | columnDto.add(new ColumnDto("æ¯å¦å½±åå°è±", "isealCabin", 160, "dict", false, null, isealCabin)); |
| | | columnDto.add(new ColumnDto("æ¯å¦èè°", "islt", 100, "dict", false, null, isealCabin)); |
| | | columnDto.add(new ColumnDto("æä½", "", 190, "", true, buttonList, null)); |
| | | |
| | | table = CommonTable.createCommonTable(list, columnDto); |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | tableModelListener(list, table, jFrame); |
| | | } |
| | | }); |
| | | comboBox6.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(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox5.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()),Math.toIntExact(isLt.getId()),null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | query.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | list = level3Service.getList(null, null, null, null, null,null, sb.getText()); |
| | | list = level3Service.getList(null, null, null, null, null,null,null, sb.getText()); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | |
| | | public void insert(JFrame jFrame,DjJdgzNetworkLevel3 data) { |
| | | JFrame frame1 = new JFrame("æ°å¢ä¸çº§ç½ç»å¾"); |
| | | frame1.setSize(500, 460); |
| | | frame1.setSize(500, 500); |
| | | frame1.setResizable(true); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame1.setLocationRelativeTo(null); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | JComboBoxItem[] isealCabin = { |
| | | new JComboBoxItem(0L, "å¦"), |
| | |
| | | comboBox7.setSelectedItem(BoxIteUtils.GetSelectItemById(isealCabin, Long.valueOf(data.getIsealCabin()))); |
| | | } |
| | | |
| | | JLabel JLabel789 = new JLabel("æ¯å¦èè°"); |
| | | JComboBox<JComboBoxItem> comboBox78 = new JComboBox<>(isealCabin); |
| | | comboBox78.setPreferredSize(new Dimension(185, 28)); |
| | | if (data.getIslt()!=null){ |
| | | comboBox78.setSelectedItem(BoxIteUtils.GetSelectItemById(isealCabin, Long.valueOf(data.getIslt()))); |
| | | } |
| | | |
| | | JLabel JLabel8 = new JLabel("ä¸çº§ç½ç»å¾åç§°"); |
| | | JTextField level3Name = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getName())){ |
| | |
| | | frame1.add(comboBox6, new GBC(1, 6, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | frame1.add(JLabel78, new GBC(0, 7, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(comboBox7, new GBC(1, 7, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | frame1.add(JLabel789, new GBC(0, 8, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(comboBox78, new GBC(1, 8, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(JLabel8, new GBC(0, 8, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(level3Name, new GBC(1, 8, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(btnSave, new GBC(0, 9, 2, 1).setWeight(1, 0)); |
| | | frame1.add(JLabel8, new GBC(0, 9, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(level3Name, new GBC(1, 9, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(btnSave, new GBC(0, 10, 2, 1).setWeight(1, 0)); |
| | | |
| | | btnSave.addActionListener((e) -> { |
| | | JComboBoxItem level1 = (JComboBoxItem) comboBox0.getSelectedItem(); |
| | |
| | | JComboBoxItem dept = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | JComboBoxItem team = (JComboBoxItem) comboBox4.getSelectedItem(); |
| | | JComboBoxItem isealCabinItem = (JComboBoxItem) comboBox7.getSelectedItem(); |
| | | JComboBoxItem iltItem = (JComboBoxItem) comboBox78.getSelectedItem(); |
| | | Set<JComboBoxItem> selectedItems = comboBox5.getSelectedItems(); |
| | | StringBuilder selectedIds = new StringBuilder(); |
| | | for (JComboBoxItem item : selectedItems) { |
| | |
| | | data.setLevel2NodeId(level2Node.getId()); |
| | | data.setName(name); |
| | | data.setIsealCabin(Math.toIntExact(isealCabinItem.getId())); |
| | | data.setIslt(Math.toIntExact(iltItem.getId())); |
| | | data.setDeptId(dept.getId()); |
| | | data.setTeamgroupId(team.getId()); |
| | | data.setTeamgroupName(team.getName()); |
| | |
| | | level3Service.insert(data); |
| | | } |
| | | |
| | | list = level3Service.getList(level1Data.getShipId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()), null); |
| | | list = level3Service.getList(level1Data.getShipId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()),Math.toIntExact(isealCabin[0].getId()), null); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | |
| | | import com.example.client.dto.ColumnDto; |
| | | import com.example.client.dto.JComboBoxItem; |
| | | import com.example.client.model.TableButton; |
| | | import com.example.client.utils.*; |
| | | 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.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.swing.*; |
| | | import javax.swing.event.TableModelEvent; |
| | | import javax.swing.table.DefaultTableCellRenderer; |
| | | import javax.swing.table.DefaultTableModel; |
| | | import java.awt.*; |
| | | import java.awt.event.*; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Service |
| | |
| | | public JPanel createTable(Integer width, Integer height,JFrame frame) { |
| | | JPanel panel = new JPanel(new BorderLayout()); |
| | | |
| | | JPanel topJpanel = new JPanel(); |
| | | JPanel topJpanel1 = new JPanel(new BorderLayout()); |
| | | topJpanel1.setPreferredSize(new Dimension(width, 150)); |
| | | topJpanel1.setBackground(Color.WHITE); |
| | | |
| | | JPanel topJpanel2 = new JPanel(); |
| | | |
| | | CustomPanel customPanel = new CustomPanel(); |
| | | customPanel.setPreferredSize(new Dimension(width, 50)); |
| | | customPanel.setBackground(Color.WHITE); |
| | | |
| | | topJpanel1.add(topJpanel2, BorderLayout.CENTER); |
| | | topJpanel1.add(customPanel, BorderLayout.SOUTH); |
| | | |
| | | GridBagLayout layout = new GridBagLayout(); |
| | | topJpanel.setLayout(layout); |
| | | topJpanel.setPreferredSize(new Dimension(width, 100)); |
| | | topJpanel.setBackground(Color.WHITE); |
| | | topJpanel2.setLayout(layout); |
| | | topJpanel2.setPreferredSize(new Dimension(width, 100)); |
| | | topJpanel2.setBackground(Color.WHITE); |
| | | |
| | | JPanel centerJpanel = new JPanel(); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(145, frame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(topJpanel1, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | | |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "ä¿®ç", "æ¹æ¢è£
", "æ¹è¿æ§ä¿®ç", "ä¸å¤è£
设å¤" |
| | | }; |
| | | |
| | | JComboBoxItem[] isealCabin = { |
| | | new JComboBoxItem(10000L, ""), |
| | | new JComboBoxItem(0L, "å¦"), |
| | | new JComboBoxItem(1L, "æ¯"), |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("å·¥ç¨"); |
| | |
| | | JComboBox<String> comboBox4 = new JComboBox<>(typeList); |
| | | comboBox4.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | | JLabel JLabel5 = new JLabel("æ¯å¦å½±åå°è±"); |
| | | JComboBox<JComboBoxItem> comboBox56 = new JComboBox<>(isealCabin); |
| | | comboBox56.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | | JLabel JLabel6 = new JLabel("æ¯å¦èè°"); |
| | | JComboBox<JComboBoxItem> comboBox6 = new JComboBox<>(isealCabin); |
| | | comboBox6.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | | JTextField sb = new JTextField(16); |
| | | JButton query = new JButton("æ¥è¯¢"); |
| | | |
| | | List<ColorDescription> colorDescriptions = new ArrayList<>(); |
| | | colorDescriptions.add(new ColorDescription("", "å
¨é¨")); |
| | | colorDescriptions.add(new ColorDescription("#3498DB", "è¿è¡ä¸")); |
| | | colorDescriptions.add(new ColorDescription("#F1C40F", "临æ")); |
| | | colorDescriptions.add(new ColorDescription("#F1C40F", "临æ(7天)")); |
| | | colorDescriptions.add(new ColorDescription("#E74C3C", "龿")); |
| | | colorDescriptions.add(new ColorDescription("#2ECC71", "æ£å¸¸å®æ")); |
| | | colorDescriptions.add(new ColorDescription("#006400", "è¶
æå®æ")); |
| | |
| | | ColorDescriptionComboBox comboBox5 = new ColorDescriptionComboBox(colorDescriptions); |
| | | JButton btnTjz = 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)); |
| | | topJpanel2.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel1, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(comboBox1, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel2, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(comboBox2, new GBC(5, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel3, new GBC(6, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(comboBox3, new GBC(7, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel4, new GBC(8, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.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)); |
| | | topJpanel.add(comboBox5, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel.add(btnTjz, new GBC(5, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel5, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(comboBox56, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(JLabel6, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(comboBox6, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(sb, new GBC(4, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel2.add(query, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(comboBox5, new GBC(7, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | topJpanel2.add(btnTjz, new GBC(9, 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); |
| | | list = level3Service.getNodeList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()), Math.toIntExact(isealCabin[0].getId()), 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)); |
| | | |
| | | columnDto = getColumnDtoByType(typeList[0]); |
| | | table = CommonTable.createCommonTable(list, columnDto); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | int row = table.rowAtPoint(point); |
| | | int column = table.columnAtPoint(point); |
| | | |
| | | if (row <= list.size() && column > 1) { |
| | | if (row <= list.size() && column > 3) { |
| | | List<TableNodeDto> filteredData = list; |
| | | if (comboBox5.getSelectedItem() instanceof String) { |
| | | |
| | | } else { |
| | | ColorDescription selectedColorDescription = (ColorDescription) comboBox5.getSelectedItem(); |
| | | if (selectedColorDescription != null) { |
| | | String selectedHexColor = selectedColorDescription.getHexColor(); |
| | | if (StringUtils.isNotBlank(selectedHexColor)) { |
| | | filteredData = list.stream() |
| | | .filter(dto -> dto.getTime1Color() != null && dto.getTime1Color().equals(selectedHexColor) || |
| | | dto.getTime2Color() != null && dto.getTime2Color().equals(selectedHexColor) || |
| | | dto.getTime3Color() != null && dto.getTime3Color().equals(selectedHexColor) || |
| | | dto.getTime4Color() != null && dto.getTime4Color().equals(selectedHexColor) || |
| | | dto.getTime5Color() != null && dto.getTime5Color().equals(selectedHexColor)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | | } |
| | | String hexColor = (String) table.getValueAt(row, column); |
| | | String tooltip = getTooltipText(hexColor); |
| | | String tooltip = getTooltipText(hexColor, filteredData.get(row)); |
| | | table.setToolTipText(tooltip); |
| | | } else { |
| | | table.setToolTipText(null); |
| | |
| | | JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | } |
| | | }); |
| | | comboBox1.addItemListener(new ItemListener() { |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | columnDto = getColumnDtoByType(type); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | 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); |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | } |
| | | }); |
| | | |
| | | comboBox56.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(); |
| | | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | } |
| | | }); |
| | | comboBox6.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(); |
| | | |
| | | JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem(); |
| | | JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null); |
| | | |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | query.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | list = level3Service.getNodeList(null, null, null, null, null, sb.getText()); |
| | | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | list = level3Service.getNodeList(null, null, null, null, type, null, null, sb.getText()); |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | public void actionPerformed(ActionEvent e) { |
| | | String content = comboBox.getSelectedItem().toString(); |
| | | Long shipId = shipMap.get(content); |
| | | statisProductService.createTable(frame,shipId); |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | statisProductService.createTable(frame, shipId, type); |
| | | } |
| | | }); |
| | | |
| | | comboBox5.addItemListener(new ItemListener() { |
| | | @Override |
| | | public void itemStateChanged(ItemEvent e) { |
| | | if (e.getStateChange() == ItemEvent.SELECTED) { |
| | | if (comboBox5.getSelectedItem() instanceof String) { |
| | | return; |
| | | } |
| | | ColorDescription selectedColorDescription = (ColorDescription) comboBox5.getSelectedItem(); |
| | | if (selectedColorDescription != null) { |
| | | String selectedHexColor = selectedColorDescription.getHexColor(); |
| | | if (StringUtils.isNotBlank(selectedHexColor)) { |
| | | List<TableNodeDto> filteredData = list.stream() |
| | | .filter(dto -> dto.getTime1Color() != null && dto.getTime1Color().equals(selectedHexColor) || |
| | | dto.getTime2Color() != null && dto.getTime2Color().equals(selectedHexColor) || |
| | | dto.getTime3Color() != null && dto.getTime3Color().equals(selectedHexColor) || |
| | | dto.getTime4Color() != null && dto.getTime4Color().equals(selectedHexColor) || |
| | | dto.getTime5Color() != null && dto.getTime5Color().equals(selectedHexColor)) |
| | | .collect(Collectors.toList()); |
| | | CommonTable.refreshTable(filteredData, columnDto, table); |
| | | }else{ |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | list = level3Service.getNodeList(null, null, null, null, type, null, null, sb.getText()); |
| | | columnDto = getColumnDtoByType(type); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | 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, Compute.ComputeHeightWithScroll(95,frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(145, frame))); |
| | | centerJpanel.add(scrollPane); |
| | | frame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(95,frame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(145, frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(145, frame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | |
| | | return panel; |
| | | } |
| | | private JComboBoxItem[] createIsealCabinItems() { |
| | | return new JComboBoxItem[]{ |
| | | new JComboBoxItem(10000L, ""), |
| | | new JComboBoxItem(0L, "å¦"), |
| | | new JComboBoxItem(1L, "æ¯") |
| | | }; |
| | | } |
| | | |
| | | private static String getTooltipText(String hexColor) { |
| | | private List<ColumnDto> getColumnDtoByType(String type) { |
| | | List<ColumnDto> columns = new ArrayList<>(); |
| | | if ("ä¿®ç".equals(type)) { |
| | | columns.add(new ColumnDto("åºå·", "", 100, "autoCreate", false, null, null)); |
| | | columns.add(new ColumnDto("设å¤åç§°", "name", 327, null, true, null, null)); |
| | | columns.add(new ColumnDto("æ¯å¦å½±åå°è±", "isealCabin", 160, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("æ¯å¦èè°", "islt", 100, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("è®¾å¤æå¸åºè±", "time1Color", 187, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("设å¤å交", "time2Color", 187, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("ææ£é´å®", "time3Color", 187, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("设å¤è¿å", "time4Color", 187, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("åè£
", "time5Color", 187, "Circle", true, null, null)); |
| | | } else if ("æ¹æ¢è£
".equals(type) || "æ¹è¿æ§ä¿®ç".equals(type)) { |
| | | columns.add(new ColumnDto("åºå·", "", 144, "autoCreate", false, null, null)); |
| | | columns.add(new ColumnDto("设å¤åç§°", "name", 320, null, true, null, null)); |
| | | columns.add(new ColumnDto("æ¯å¦å½±åå°è±", "isealCabin", 320, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("æ¯å¦èè°", "islt", 144, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("设å¤å°å", "time1Color", 320, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("设å¤å®è£
", "time2Color", 320, "Circle", true, null, null)); |
| | | } else if ("ä¸å¤è£
设å¤".equals(type)) { |
| | | columns.add(new ColumnDto("åºå·", "", 100, "autoCreate", false, null, null)); |
| | | columns.add(new ColumnDto("设å¤åç§°", "name", 320, null, true, null, null)); |
| | | columns.add(new ColumnDto("æ¯å¦å½±åå°è±", "isealCabin", 160, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("æ¯å¦èè°", "islt", 100, "dict", false, null, createIsealCabinItems())); |
| | | columns.add(new ColumnDto("æå¸åºè±", "time1Color", 155, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("å
¥åº", "time2Color", 155, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("åæ¾ä½ç½®", "time3Color", 155, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("移交Té", "time4Color", 155, "Circle", true, null, null)); |
| | | columns.add(new ColumnDto("夿³¨", "remark", 300, null, false, null, null)); |
| | | } |
| | | return columns; |
| | | } |
| | | |
| | | private static String getTooltipText(String hexColor, TableNodeDto tableNodeDto) { |
| | | switch (hexColor) { |
| | | case "#3498DB": |
| | | return "è¿è¡ä¸"; |
| | | case "#F1C40F": |
| | | return "临æ"; |
| | | return tableNodeDto.getLqText(); |
| | | case "#E74C3C": |
| | | return "龿"; |
| | | return tableNodeDto.getYqText(); |
| | | case "#2ECC71": |
| | | return "æ£å¸¸å®æ"; |
| | | case "#006400": |
| | | return "è¶
æå®æ"; |
| | | return tableNodeDto.getCqText(); |
| | | default: |
| | | return "æªå¼å§"; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | // å建åè¡¨æ ¼ |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | List<DjJdgzNetworkLevel3> list = level3Service.getList(null, null, null, null, null,null,null); |
| | | List<DjJdgzNetworkLevel3> list = level3Service.getList(null, null, null, null, null,null,null,null); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | |
| | | |
| | |
| | | |
| | | List<NetworkNodeStatusDto> nodeStatusList = level3Service.getNodeStatusData(id); |
| | | |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | graph = netWorkDiagramService.getCsDiagram(graph, json, nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,null); |
| | | |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | |
| | | int r = subTable.getSelectedRow(); |
| | | DjJdgzNetworkLevel3 data = list.get(r); |
| | | List<NetworkNodeStatusDto> nodeStatusList = level3Service.getNodeStatusData(data.getId()); |
| | | graph2[0] = netWorkDiagramService.getCsDiagram(graph2[0], data.getContent(), nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height); |
| | | graph2[0] = netWorkDiagramService.getCsDiagram(graph2[0], data.getContent(), nodeStatusList, diagram.getPreferredSize().width, diagram.getPreferredSize().height,null); |
| | | } |
| | | } |
| | | }); |
| | |
| | | public class StatisProductService { |
| | | @Autowired |
| | | DjJdgzNetworkLevel3Service djJdgzNetworkLevel3Service; |
| | | public void createTable(JFrame jFrame, Long level1Id) { |
| | | |
| | | public void createTable(JFrame jFrame, Long level1Id, String type) { |
| | | JFrame frame1 = new JFrame("设å¤è¿åº¦ç»è®¡æ»è¡¨"); |
| | | frame1.setSize(1500, 800); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | |
| | | } |
| | | }); |
| | | |
| | | List<StatistProductDto> list = djJdgzNetworkLevel3Service.getStatist(level1Id); |
| | | List<StatistProductDto> list = djJdgzNetworkLevel3Service.getStatist(level1Id, type); |
| | | if (type.equals("æ¹è¿æ§ä¿®ç") || type.equals("æ¹æ¢è£
")) { |
| | | Object[][] headerRows = new Object[2][4]; |
| | | headerRows[0] = new Object[]{"é¨é¨/ä¸ä¸", "åèç¹ç设å¤ä¸ªæ°", ComplexTable.mergeCellX, "èç¹å
¨é¨å®æä¸ªæ°"}; |
| | | //æ¤å¤2-5æ¯ä¸ä¼æ¾ç¤ºåºæ¥çï¼å 为1-4åä¸åå¹¶äºä¸è¡ + åå³åå¹¶äºä¸å ï¼ è2-5被è¿ä¸ªç©å½¢èå´å
æ¬äº |
| | | headerRows[1] = new Object[]{ComplexTable.mergeCellY, "设å¤å°å", "设å¤å®è£
", ComplexTable.mergeCellY}; |
| | | |
| | | Object[][] headerRows = new Object[2][9]; |
| | | String[][] body = new String[list.size()][4]; |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatistProductDto data = list.get(i); |
| | | body[i][0] = data.getName(); |
| | | body[i][1] = String.valueOf(data.getDcsl()); |
| | | body[i][2] = String.valueOf(data.getAzsl()); |
| | | body[i][3] = String.valueOf(data.getWcsl()); |
| | | } |
| | | |
| | | JScrollPane scrollTable = new JScrollPane(new ComplexTable(headerRows, body, 367)); |
| | | frame1.add(scrollTable); |
| | | frame1.setVisible(true); |
| | | |
| | | } else if (type.equals("ä¸å¤è£
设å¤")) { |
| | | Object[][] headerRows = new Object[2][6]; |
| | | headerRows[0] = new Object[]{"é¨é¨/ä¸ä¸", "åèç¹ç设å¤ä¸ªæ°", ComplexTable.mergeCellX, ComplexTable.mergeCellX, ComplexTable.mergeCellX, "èç¹å
¨é¨å®æä¸ªæ°"}; |
| | | //æ¤å¤2-5æ¯ä¸ä¼æ¾ç¤ºåºæ¥çï¼å 为1-4åä¸åå¹¶äºä¸è¡ + åå³åå¹¶äºä¸å ï¼ è2-5被è¿ä¸ªç©å½¢èå´å
æ¬äº |
| | | headerRows[1] = new Object[]{ComplexTable.mergeCellY, "æå¸åºè±", "å
¥åº", "åæ¾ä½ç½®","移交Té", ComplexTable.mergeCellY}; |
| | | |
| | | String[][] body = new String[list.size()][6]; |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatistProductDto data = list.get(i); |
| | | body[i][0] = data.getName(); |
| | | body[i][1] = String.valueOf(data.getCcsl()); |
| | | body[i][2] = String.valueOf(data.getRksl()); |
| | | body[i][3] = String.valueOf(data.getCfsl()); |
| | | body[i][4] = String.valueOf(data.getYjsl()); |
| | | body[i][5] = String.valueOf(data.getWcsl()); |
| | | } |
| | | |
| | | JScrollPane scrollTable = new JScrollPane(new ComplexTable(headerRows, body, 245)); |
| | | frame1.add(scrollTable); |
| | | frame1.setVisible(true); |
| | | |
| | | } else if (type.equals("ä¿®ç")) { |
| | | Object[][] headerRows = new Object[2][7]; |
| | | headerRows[0] = new Object[]{"é¨é¨/ä¸ä¸","åèç¹ç设å¤ä¸ªæ°", ComplexTable.mergeCellX,ComplexTable.mergeCellX,ComplexTable.mergeCellX,ComplexTable.mergeCellX,"èç¹å
¨é¨å®æä¸ªæ°"}; |
| | | //æ¤å¤2-5æ¯ä¸ä¼æ¾ç¤ºåºæ¥çï¼å 为1-4åä¸åå¹¶äºä¸è¡ + åå³åå¹¶äºä¸å ï¼ è2-5被è¿ä¸ªç©å½¢èå´å
æ¬äº |
| | | headerRows[1] = new Object[]{ComplexTable.mergeCellY, "è®¾å¤æå¸åºè±","设å¤å交","ææ£é´å®","设å¤è¿å","åè£
",ComplexTable.mergeCellY}; |
| | | |
| | | String[][] body = new String[list.size()][9]; |
| | | String[][] body = new String[list.size()][7]; |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatistProductDto data =list.get(i); |
| | |
| | | frame1.add(scrollTable); |
| | | frame1.setVisible(true); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private void reportRecord(int column, Long level1NetworkId,Long teamgroupId) { |
| | | JFrame frame1 = new JFrame("è®°å½"); |
| | | frame1.setSize(500, 400); |
| | | frame1.setResizable(false); |
| | | frame1.setSize(1000, 500); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame1.setLocationRelativeTo(null); |
| | | frame1.setVisible(true); |
| | |
| | | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("åºå·", "", (500 - 10) / 3, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("设å¤åç§°", "name", (500 - 10) / 3, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("èç¹åç§°", "processName", (500 - 10) / 3, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("åºå·", "", 50, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("设å¤åç§°", "name", 770, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("èç¹åç§°", "processName", 160, null, false, null, null)); |
| | | |
| | | JTable table = CommonTable.createCommonTable(list, columnDto); |
| | | table.setRowHeight(25); |
| | |
| | | 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(500 - 20, 400)); |
| | | scrollPane.setPreferredSize(new Dimension(1000 - 20, 400)); |
| | | |
| | | frame1.add(scrollPane); |
| | | } |
| | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | Map<String, Long> shipMap = new HashMap<>(); |
| | |
| | | jLeft.add(top, BorderLayout.NORTH); |
| | | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null,null); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null,null,null); |
| | | |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "è¿æªå½å
¥ä¸çº§ç½ç»å¾æ°æ®", "æç¤º", JOptionPane.WARNING_MESSAGE); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null,null,null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | query.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | list = level3Service.getList(null, null, null, null, null,null,sb.getText()); |
| | | list = level3Service.getList(null, null, null, null, null,null,null,sb.getText()); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | subTable.setRowHeight(25); |
| | |
| | | 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.*; |
| | | import com.example.server.sysOss.model.SysOss; |
| | |
| | | private UploadFile uploadFile; |
| | | @Autowired |
| | | private DjJdgzDismantTrackService djJdgzDismantTrackService; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel3ListService djJdgzNetworkLevel3ListService; |
| | | |
| | | public void openDialog(DjJdgzTrackRecord data, JFrame jFrame, Long level1Id, List<ColumnDto> columnDto, JTable table) { |
| | | if (StringUtils.isBlank(data.getLevel3NodeName())) { |
| | | DjJdgzNetworkLevel3List djJdgzNetworkLevel3List = djJdgzNetworkLevel3ListService.get(data.getLevel3NodeId()); |
| | | data.setLevel3NodeName(djJdgzNetworkLevel3List.getProcessName()); |
| | | data.setProcessName(djJdgzNetworkLevel3List.getProcessName()); |
| | | } |
| | | JFrame frame1 = new JFrame(data.getLevel3NetworkName() + "è·è¸ªè®°å½"); |
| | | frame1.setSize(1200, 800); |
| | | frame1.setResizable(false); |
| | |
| | | |
| | | JLabel JLabel10 = new JLabel("åæ¿ä¿®åä½"); |
| | | JTextField repairUnitDesc = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getRepairUnitContact())) { |
| | | repairUnitDesc.setText(data.getRepairUnitContact()); |
| | | if (StringUtils.isNotBlank(data.getRepairUnit())) { |
| | | repairUnitDesc.setText(data.getRepairUnit()); |
| | | } |
| | | |
| | | JLabel JLabel11 = new JLabel("è´è´£äºº"); |
| | |
| | | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | String[] typeList = new String[]{ |
| | | "","æ¹è£
", "å è£
", "æ¢è£
", "ä¿®ç","æ¹è¿æ§ä¿®ç" |
| | | "","æ¹æ¢è£
","ä¿®ç","æ¹è¿æ§ä¿®ç","ä¸å¤è£
设å¤" |
| | | }; |
| | | JComboBoxItem[] isealCabin = { |
| | | new JComboBoxItem(10000L, ""), |
| | |
| | | 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("æ¯å¦èè°", "islt", 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)); |
| | |
| | | |
| | | @Override |
| | | public void setItem(Object anObject) { |
| | | // ç¦ç¨èªå¨æ´æ°ç¼è¾å¨ææ¬çè¡ä¸º |
| | | if (textField != null) { |
| | | textField.setText(defaultText); // å§ç»æ¾ç¤ºé»è®¤ææ¬ |
| | | if (anObject instanceof ColorDescription) { |
| | | ColorDescription cd = (ColorDescription) anObject; |
| | | textField.setText(cd.getDescription()); // 设置ç¼è¾å¨ææ¬ä¸ºæè¿° |
| | | } else { |
| | | textField.setText(defaultText); // 设置é»è®¤ææ¬ |
| | | } |
| | | } |
| | | }); |
New file |
| | |
| | | package com.example.client.utils; |
| | | |
| | | import javax.swing.*; |
| | | import java.awt.*; |
| | | |
| | | public class CustomPanel extends JPanel { |
| | | private static final int DIAMETER = 20; // åçç´å¾ |
| | | private static final int SPACING = 10; // ååæåä¹é´çé´è· |
| | | |
| | | private static class CircleInfo { |
| | | String colorCode; |
| | | String text; |
| | | |
| | | CircleInfo(String colorCode, String text) { |
| | | this.colorCode = colorCode; |
| | | this.text = text; |
| | | } |
| | | } |
| | | |
| | | public CustomPanel() { |
| | | // æ·»å å¤ä¸ªåå½¢åæåä¿¡æ¯ |
| | | CircleInfo[] circleInfos = new CircleInfo[]{ |
| | | new CircleInfo("#3498DB", "è¿è¡ä¸"), |
| | | new CircleInfo("#F1C40F", "临æ(7天)"), |
| | | new CircleInfo("#E74C3C", "龿"), |
| | | new CircleInfo("#2ECC71", "æ£å¸¸å®æ"), |
| | | new CircleInfo("#006400", "è¶
æå®æ") |
| | | }; |
| | | setCircleInfos(circleInfos); |
| | | } |
| | | |
| | | private CircleInfo[] circleInfos; |
| | | |
| | | public void setCircleInfos(CircleInfo[] circleInfos) { |
| | | this.circleInfos = circleInfos; |
| | | revalidate(); |
| | | repaint(); |
| | | } |
| | | |
| | | @Override |
| | | protected void paintComponent(Graphics g) { |
| | | super.paintComponent(g); |
| | | |
| | | int x = 140; // èµ·å§ç»å¶ä½ç½® |
| | | int y = (getHeight() - DIAMETER) / 2; // åç´å±
ä¸ |
| | | |
| | | for (CircleInfo circleInfo : circleInfos) { |
| | | // è§£æé¢è²ä»£ç å¹¶ç»å¶åå½¢ |
| | | Color color = Color.decode(circleInfo.colorCode); |
| | | g.setColor(color); |
| | | g.fillOval(x, y, DIAMETER, DIAMETER); |
| | | |
| | | // 设置æåé¢è²ååä½ï¼å¹¶ç»å¶æå |
| | | g.setColor(Color.BLACK); |
| | | g.setFont(new Font("å®ä½", Font.BOLD, 20)); |
| | | x += DIAMETER + SPACING; // æ´æ°ç»å¶ä½ç½® |
| | | g.drawString(circleInfo.text, x, y + DIAMETER / 2 + 5); |
| | | |
| | | x += g.getFontMetrics().stringWidth(circleInfo.text) + 20; // æ´æ°ç»å¶ä½ç½® |
| | | } |
| | | } |
| | | } |
| | |
| | | String mySite = (String) UserAndSiteUtils.get("site", "site"); |
| | | |
| | | // å¼¹åºæä»¶éæ©æ¡ï¼è®©ç¨æ·éæ©ä¿åZIPæä»¶çè·¯å¾ |
| | | String outputZipPath = showSaveFileDialog(mySite + "åæ¥æ°æ®å
.zip"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | String outputZipPath = showSaveFileDialog(dateFormat.format(new Date()) + mySite + "åæ¥æ°æ®å
.zip"); |
| | | |
| | | if (outputZipPath == null) { |
| | | massage[0] = "ç¨æ·åæ¶ä¿åï¼ç¨åºéåºã"+ new Date(); |
| | |
| | | Path sourceDir = Paths.get(UnzipPath + "life-protection"); |
| | | Path targetDir = Paths.get(localPath + "life-protection"); |
| | | |
| | | if (!Files.exists(sourceDir)) { |
| | | Files.createDirectories(sourceDir); |
| | | } |
| | | // å¦æç®æ æä»¶å¤¹ä¸åå¨ï¼åå»ºå® |
| | | if (!Files.exists(targetDir)) { |
| | | Files.createDirectories(targetDir); |
| | |
| | | private Integer fcsl; |
| | | private Integer hzsl; |
| | | private Integer wcsl; |
| | | private Integer ccsl; |
| | | private Integer rksl; |
| | | private Integer cfsl; |
| | | private Integer yjsl; |
| | | private Integer dcsl; |
| | | private Integer azsl; |
| | | } |
| | |
| | | @ApiModelProperty(value = "å½åç¶æ") |
| | | private Integer currentStatus; |
| | | |
| | | private Integer islt; |
| | | private Integer isealCabin; |
| | | |
| | | private String processName; |
| | | private String name; |
| | | |
| | |
| | | private String time4Color; |
| | | private String time5Color; |
| | | |
| | | private String yqText; |
| | | private String lqText; |
| | | private String cqText; |
| | | private String remark; |
| | | |
| | | } |
| | |
| | | @Mapper |
| | | public interface DjJdgzNetworkLevel3Dao extends BaseDao<DjJdgzNetworkLevel3> { |
| | | |
| | | List<DjJdgzNetworkLevel3> getList(Long shipId, Long deptId, Long teamId, Long cabinId, String type,Integer isealCabin,String name); |
| | | List<DjJdgzNetworkLevel3> getList(Long shipId, Long deptId, Long teamId, Long cabinId, String type,Integer isealCabin,Integer isLt,String name); |
| | | List<NetworkNodeStatusDto> getNodeStatusData(Long id); |
| | | |
| | | void deleteLevel3(Long id); |
| | |
| | | |
| | | JComboBoxItem[] getListByExport(Long projectId, Long deptId, Long teamId); |
| | | |
| | | List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, String name); |
| | | List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type,Integer isCabin,Integer islt, String name); |
| | | |
| | | List<StatistProductDto> getStatist(Long level1Id); |
| | | List<StatistProductDto> getStatist(Long level1Id,String type); |
| | | |
| | | String getRemark(Long networkId, String type); |
| | | } |
| | |
| | | |
| | | List<DjJdgzNetworkLevel3List> getNextNode(Integer sort, Long networkId); |
| | | |
| | | List<DjJdgzNetworkLevel3List> getDefult(); |
| | | List<DjJdgzNetworkLevel3List> getDefult(Long defultId); |
| | | |
| | | List<DiagramNode2Dto> getAllNodeLevel3ByProject(Long level1NetworkId, Long userId); |
| | | |
| | |
| | | List<ReportRecordDto> getReportRecord(Long level1NetworkId, int column, Long teamgroupId); |
| | | |
| | | Long getIsExit(Long level3NetworkId, String processName); |
| | | |
| | | List<DjJdgzTrackRecord> getName(Long level3NetworkId); |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å½±åå°è±") |
| | | private Integer isealCabin; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦èè°") |
| | | private Integer islt; |
| | | |
| | | @ApiModelProperty(value = "çç»ä¸ä¸ID") |
| | | private Long teamgroupId; |
| | | |
| | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "") |
| | | private Integer islt; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "") |
| | | private Integer trackNum; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | sheetName = sheet.getSheetName(); //è·åå½åsheetåç§° |
| | | sum = sum + num; |
| | | |
| | | List<DjJdgzNetworkLevel3> list = djJdgzNetworkLevel3Service.getList(null, null, null, null, null,null,null); |
| | | List<DjJdgzNetworkLevel3> list = djJdgzNetworkLevel3Service.getList(null, null, null, null, null,null,null,null); |
| | | JComboBoxItem[] list1 = cabinService.getList(); |
| | | |
| | | |
| | |
| | | data.setContent(simpleDiagram); |
| | | djJdgzNetworkLevel1Service.update(data); |
| | | |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight()); |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight(),null); |
| | | } |
| | | |
| | | public String getDiagram(Long networkId) { |
| | |
| | | |
| | | import com.example.client.dto.JComboBoxItem; |
| | | import com.example.client.service.BaseService; |
| | | import com.example.server.progressTrack.Dto.DiagramNodeDto; |
| | | import com.example.server.progressTrack.Dto.NetworkNodeStatusDto; |
| | | import com.example.server.progressTrack.Dto.ProjectDto; |
| | | import com.example.server.progressTrack.dao.DjJdgzNetworkLevel1Dao; |
| | | import com.example.server.progressTrack.dao.DjJdgzNetworkLevel1ListDao; |
| | | import com.example.server.progressTrack.dao.DjJdgzNetworkLevel2ListDao; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel1; |
| | | import org.apache.ibatis.session.ExecutorType; |
| | | import org.apache.ibatis.session.SqlSession; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | public class DjJdgzNetworkLevel1Service extends BaseService<DjJdgzNetworkLevel1Dao, DjJdgzNetworkLevel1> { |
| | | @Autowired |
| | | NetWorkDiagramService netWorkDiagramService; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel1ListService djJdgzNetworkLevel1ListService; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel1ListDao djJdgzNetworkLevel1ListDao; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel2ListDao djJdgzNetworkLevel2ListDao; |
| | | @Autowired |
| | | private DjJdgzNetworkLevel2Service djJdgzNetworkLevel2Service; |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | |
| | | |
| | | /** |
| | | * è·åèç¹ç¶ææ°æ® |
| | | * |
| | | */ |
| | | public List<NetworkNodeStatusDto> getNodeStatusData(Long id) { |
| | | baseDao.setLevel1StatusNull(id); |
| | |
| | | String statusDiagram = netWorkDiagramService.getStatusDiagram(json, null, nodeStatusData); |
| | | return statusDiagram; |
| | | } |
| | | |
| | | public List<DiagramNodeDto> getNodeList(Long id) { |
| | | List<DiagramNodeDto> nodeList = djJdgzNetworkLevel1ListDao.getNodeList(id); |
| | | |
| | | JComboBoxItem[] level2List = djJdgzNetworkLevel2Service.getLevel2List(id); |
| | | for (JComboBoxItem item : level2List) { |
| | | List<DiagramNodeDto> nodeList2 = djJdgzNetworkLevel2ListDao.getNodeList(item.getId()); |
| | | nodeList.addAll(nodeList2); |
| | | } |
| | | Collections.sort(nodeList, new Comparator<DiagramNodeDto>() { |
| | | @Override |
| | | public int compare(DiagramNodeDto n1, DiagramNodeDto n2) { |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date1 = sdf.parse(n1.getRequiredCompletion()); |
| | | Date date2 = sdf.parse(n2.getRequiredCompletion()); |
| | | return date1.compareTo(date2); |
| | | } catch (ParseException e) { |
| | | throw new IllegalArgumentException("Invalid date format. Please use the format 'yyMMdd'.", e); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | return nodeList; |
| | | |
| | | } |
| | | |
| | | public List<NetworkNodeStatusDto> getNodeStatus(Long id) { |
| | | List<NetworkNodeStatusDto> nodeStatusList = this.getNodeStatusData(id); |
| | | JComboBoxItem[] level2List = djJdgzNetworkLevel2Service.getLevel2List(id); |
| | | for (JComboBoxItem item : level2List) { |
| | | List<NetworkNodeStatusDto> nodeStatusList2 = djJdgzNetworkLevel2Service.getNodeStatusData(item.getId()); |
| | | nodeStatusList.addAll(nodeStatusList2); |
| | | } |
| | | return nodeStatusList; |
| | | } |
| | | |
| | | public List<DiagramNodeDto> getNodeList2(Long id) { |
| | | List<DiagramNodeDto> nodeList2 =new ArrayList<>(); |
| | | JComboBoxItem[] level2List = djJdgzNetworkLevel2Service.getLevel2List(id); |
| | | for (JComboBoxItem item : level2List) { |
| | | nodeList2 = djJdgzNetworkLevel2ListDao.getNodeList(item.getId()); |
| | | } |
| | | return nodeList2; |
| | | } |
| | | } |
| | |
| | | DjJdgzNetworkLevel2 level2 = djJdgzNetworkLevel2Service.get(networkId); |
| | | level2.setContent(simpleDiagram); |
| | | djJdgzNetworkLevel2Service.update(level2); |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight()); |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight(),null); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.example.server.progressTrack.service; |
| | | |
| | | import com.example.client.dto.ColumnDto; |
| | | import com.example.client.dto.JComboBoxItem; |
| | | import com.example.client.service.BaseService; |
| | | import com.example.server.progressTrack.Dto.DiagramMajorDto; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.swing.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return djJdgzNetworkLevel3List; |
| | | } |
| | | |
| | | public List<DjJdgzNetworkLevel3List> getDefult() { |
| | | return baseDao.getDefult(); |
| | | public List<DjJdgzNetworkLevel3List> getDefult(String type) { |
| | | Long defultId = null; |
| | | if (type.equals("æ¹è¿æ§ä¿®ç")||type.equals("æ¹æ¢è£
")){ |
| | | defultId = 10002L; |
| | | } else if (type.equals("ä¸å¤è£
设å¤")) { |
| | | defultId = 10001L; |
| | | }else if (type.equals("ä¿®ç")) { |
| | | defultId = 10000L; |
| | | } |
| | | return baseDao.getDefult(defultId); |
| | | } |
| | | public void save(List<DjJdgzNetworkLevel3List> list, Long networkId, JPanel jPanel, mxGraph graph) { |
| | | //baseDao.deleteAll(networkId); |
| | |
| | | data.setContent(simpleDiagram); |
| | | djJdgzNetworkLevel3Service.update(data); |
| | | |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight()); |
| | | netWorkDiagramService.getCsDiagram(graph,simpleDiagram,null,jPanel.getWidth(),jPanel.getHeight(),null); |
| | | } |
| | | |
| | | public JComboBoxItem[] getListBothItem(Long networkId) { |
| | |
| | | @Value("${zt.oss.local-path}") |
| | | private String path; |
| | | |
| | | public List<StatistProductDto> getStatist(Long level1Id) { |
| | | return baseDao.getStatist(level1Id); |
| | | public List<StatistProductDto> getStatist(Long level1Id,String type) { |
| | | return baseDao.getStatist(level1Id,type); |
| | | } |
| | | |
| | | 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,Integer isealCabin, String name) { |
| | | List<DjJdgzNetworkLevel3> list = baseDao.getList(shipId, deptId, teamId, cabinId, type,isealCabin, name); |
| | | public List<DjJdgzNetworkLevel3> getList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, Integer isealCabin,Integer isLt, String name) { |
| | | List<DjJdgzNetworkLevel3> list = baseDao.getList(shipId, deptId, teamId, cabinId, type, isealCabin,isLt, name); |
| | | return list; |
| | | } |
| | | |
| | |
| | | sheetName = sheet.getSheetName(); //è·åå½åsheetåç§° |
| | | sum = sum + num; |
| | | |
| | | Map<Integer, String> mapProcessName = new HashMap<>(); |
| | | mapProcessName.put(1, "è®¾å¤æå¸åºè±"); |
| | | mapProcessName.put(2, "设å¤å交"); |
| | | mapProcessName.put(3, "ææ£é´å®"); |
| | | mapProcessName.put(4, "设å¤è¿å"); |
| | | mapProcessName.put(5, "åè£
"); |
| | | |
| | | Map<String, String> mapTeamGroup = sysTeamGroupClassService.getMapGroup(false, "hld"); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | |
| | | |
| | | String name = ImportUtil.getCellValue(row, 0, pattern); |
| | | String isealCabinStr = ImportUtil.getCellValue(row, 1, pattern); |
| | | String deptStr = ImportUtil.getCellValue(row, 2, pattern); |
| | | String teamGroupStr = ImportUtil.getCellValue(row, 3, pattern); |
| | | String cabinStr = ImportUtil.getCellValue(row, 4, pattern); |
| | | String typeStr = ImportUtil.getCellValue(row, 5, pattern); |
| | | String time1 = ImportUtil.getCellValue(row, 6, pattern); |
| | | String time2 = ImportUtil.getCellValue(row, 7, pattern); |
| | | String time3 = ImportUtil.getCellValue(row, 8, pattern); |
| | | String time4 = ImportUtil.getCellValue(row, 9, pattern); |
| | | String time5 = ImportUtil.getCellValue(row, 10, pattern); |
| | | String repairUnit = ImportUtil.getCellValue(row, 11, pattern); |
| | | String repairUnitDirector = ImportUtil.getCellValue(row, 12, pattern); |
| | | String repairUnitContact = ImportUtil.getCellValue(row, 13, pattern); |
| | | String generalRepairUnit = ImportUtil.getCellValue(row, 14, pattern); |
| | | String generalRepairUnitDirector = ImportUtil.getCellValue(row, 15, pattern); |
| | | String generalRepairUnitContact = ImportUtil.getCellValue(row, 16, pattern); |
| | | String isltStr = ImportUtil.getCellValue(row, 2, pattern); |
| | | String deptStr = ImportUtil.getCellValue(row, 3, pattern); |
| | | String teamGroupStr = ImportUtil.getCellValue(row, 4, pattern); |
| | | String cabinStr = ImportUtil.getCellValue(row, 5, pattern); |
| | | String typeStr = ImportUtil.getCellValue(row, 6, pattern); |
| | | String time1 = ImportUtil.getCellValue(row, 7, pattern); |
| | | String time2 = ImportUtil.getCellValue(row, 8, pattern); |
| | | String time3 = ImportUtil.getCellValue(row, 9, pattern); |
| | | String time4 = ImportUtil.getCellValue(row, 10, pattern); |
| | | String time5 = ImportUtil.getCellValue(row, 11, pattern); |
| | | String repairUnit = ImportUtil.getCellValue(row, 12, pattern); |
| | | String repairUnitDirector = ImportUtil.getCellValue(row, 13, pattern); |
| | | String repairUnitContact = ImportUtil.getCellValue(row, 14, pattern); |
| | | String generalRepairUnit = ImportUtil.getCellValue(row, 15, pattern); |
| | | String generalRepairUnitDirector = ImportUtil.getCellValue(row, 16, pattern); |
| | | String generalRepairUnitContact = ImportUtil.getCellValue(row, 17, pattern); |
| | | |
| | | Integer isealCabin = 0; |
| | | Integer islt = 0; |
| | | if (isealCabinStr.equals("æ¯")){ |
| | | isealCabin = 1; |
| | | } |
| | | if (isltStr.equals("æ¯")) { |
| | | islt = 1; |
| | | } |
| | | |
| | | Long id = UUIDUtil.generateId(); |
| | |
| | | data.setLevel2NetworkId(level2NetworkId); |
| | | data.setLevel2NodeId(level2NodeId); |
| | | data.setIsealCabin(isealCabin); |
| | | data.setIslt(islt); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(deptStr)) { |
| | |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(time1)) { |
| | | String Pname = ""; |
| | | if (typeStr.equals("æ¹æ¢è£
")||typeStr.equals("æ¹è¿æ§ä¿®ç")){ |
| | | Pname = "设å¤å°å"; |
| | | }else if(typeStr.equals("ä¿®ç")){ |
| | | Pname = "è®¾å¤æå¸åºè±"; |
| | | }else if(typeStr.equals("ä¸å¤è£
设å¤")){ |
| | | Pname = "æå¸åºè±"; |
| | | } |
| | | if (time1.matches("[0-9/]+")) { |
| | | time1 = time1.replace("/", "-"); |
| | | node.setRequiredCompletionTime(time1); |
| | | node.setProcessName(mapProcessName.get(1)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(1); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time1.matches("[0-9.]+")) { |
| | | time1 = time1.replace(".", "-"); |
| | | node.setRequiredCompletionTime(time1); |
| | | node.setProcessName(mapProcessName.get(1)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(1); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time1.matches("[0-9-]+")) { |
| | | node.setRequiredCompletionTime(time1); |
| | | node.setProcessName(mapProcessName.get(1)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(1); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else { |
| | |
| | | if (node.getId() != null) { |
| | | node.setId(null); |
| | | } |
| | | String Pname = ""; |
| | | if (typeStr.equals("æ¹æ¢è£
")||typeStr.equals("æ¹è¿æ§ä¿®ç")){ |
| | | Pname = "设å¤å®è£
"; |
| | | }else if(typeStr.equals("ä¿®ç")){ |
| | | Pname = "设å¤å交"; |
| | | }else if(typeStr.equals("ä¸å¤è£
设å¤")){ |
| | | Pname = "å
¥åº"; |
| | | } |
| | | if (time2.matches("[0-9/]+")) { |
| | | node.setRequiredCompletionTime(time2); |
| | | node.setProcessName(mapProcessName.get(2)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(2); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time2.matches("[0-9.]+")) { |
| | | time2 = time2.replace(".", "-"); |
| | | node.setRequiredCompletionTime(time2); |
| | | node.setProcessName(mapProcessName.get(2)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(2); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time2.matches("[0-9-]+")) { |
| | | node.setRequiredCompletionTime(time2); |
| | | node.setProcessName(mapProcessName.get(2)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(2); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else { |
| | |
| | | if (node.getId() != null) { |
| | | node.setId(null); |
| | | } |
| | | String Pname = ""; |
| | | if(typeStr.equals("ä¿®ç")){ |
| | | Pname = "ææ£é´å®"; |
| | | }else if(typeStr.equals("ä¸å¤è£
设å¤")){ |
| | | Pname = "åæ¾ä½ç½®"; |
| | | } |
| | | if (time3.matches("[0-9/]+")) { |
| | | time3 = time3.replace("/", "-"); |
| | | node.setRequiredCompletionTime(time3); |
| | | node.setProcessName(mapProcessName.get(3)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(3); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time3.matches("[0-9.]+")) { |
| | | time3 = time3.replace(".", "-"); |
| | | node.setRequiredCompletionTime(time3); |
| | | node.setProcessName(mapProcessName.get(3)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(3); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time3.matches("[0-9-]+")) { |
| | | node.setRequiredCompletionTime(time3); |
| | | node.setProcessName(mapProcessName.get(3)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(3); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else { |
| | |
| | | if (node.getId() != null) { |
| | | node.setId(null); |
| | | } |
| | | String Pname = ""; |
| | | if(typeStr.equals("ä¿®ç")){ |
| | | Pname = "设å¤è¿å"; |
| | | }else if(typeStr.equals("ä¸å¤è£
设å¤")){ |
| | | Pname = "移交Té"; |
| | | } |
| | | if (time4.matches("[0-9/]+")) { |
| | | time4 = time4.replace("/", "-"); |
| | | node.setRequiredCompletionTime(time4); |
| | | node.setProcessName(mapProcessName.get(4)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(4); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time4.matches("[0-9.]+")) { |
| | | time4 = time4.replace(".", "-"); |
| | | node.setRequiredCompletionTime(time4); |
| | | node.setProcessName(mapProcessName.get(4)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(4); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time4.matches("[0-9-]+")) { |
| | | node.setRequiredCompletionTime(time4); |
| | | node.setProcessName(mapProcessName.get(4)); |
| | | node.setProcessName(Pname); |
| | | node.setSort(4); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else { |
| | |
| | | if (time5.matches("[0-9/]+")) { |
| | | time5 = time5.replace("/", "-"); |
| | | node.setRequiredCompletionTime(time5); |
| | | node.setProcessName(mapProcessName.get(5)); |
| | | node.setProcessName("åè£
"); |
| | | node.setSort(5); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time5.matches("[0-9.]+")) { |
| | | time5 = time5.replace(".", "-"); |
| | | node.setRequiredCompletionTime(time5); |
| | | node.setProcessName(mapProcessName.get(5)); |
| | | node.setProcessName("åè£
"); |
| | | node.setSort(5); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else if (time5.matches("[0-9-]+")) { |
| | | node.setRequiredCompletionTime(time5); |
| | | node.setProcessName(mapProcessName.get(5)); |
| | | node.setProcessName("åè£
"); |
| | | node.setSort(5); |
| | | DjJdgzNetworkLevel3ListService.insert(node); |
| | | } else { |
| | |
| | | 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); |
| | | public List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type,Integer isCabin,Integer islt, String name) { |
| | | List<TableNodeDto> list = baseDao.getNodeList(shipId, deptId, teamId, cabinId, type,isCabin,islt, name); |
| | | |
| | | Map<Long, StatusEnum> statusMap = new HashMap<>(); |
| | | Date today = new Date(); |
| | |
| | | if (node.getCurrentStatus() == null || node.getCurrentStatus() == 0) { |
| | | if (today.after(requiredCompletionDate)) { |
| | | statusMap.put(node.getId(), StatusEnum.yq); |
| | | int days = (int) ((today.getTime() - requiredCompletionDate.getTime()) / (1000 * 60 * 60 * 24)); |
| | | node.setYqText("è¦æ±æ¶é´ä¸º" + sdf.format(requiredCompletionDate) + "已龿" + days + "天"); |
| | | } else if ((requiredCompletionDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24) < 7) { |
| | | statusMap.put(node.getId(), StatusEnum.lq); |
| | | int days = (int) ((requiredCompletionDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24)); |
| | | node.setLqText("è¦æ±æ¶é´ä¸º" + sdf.format(requiredCompletionDate) + "è¿æ" + days + "天临æ"); |
| | | } else { |
| | | statusMap.put(node.getId(), StatusEnum.jxz); |
| | | } |
| | |
| | | // 已宿 |
| | | if (node.getActualCompletion() != null && actualCompletionDate.after(requiredCompletionDate)) { |
| | | statusMap.put(node.getId(), StatusEnum.cqwc); |
| | | int days = (int) ((today.getTime() - requiredCompletionDate.getTime()) / (1000 * 60 * 60 * 24)); |
| | | node.setCqText("è¦æ±æ¶é´ä¸º" + sdf.format(requiredCompletionDate) + "è¶
æ" + days + "天宿"); |
| | | } else { |
| | | statusMap.put(node.getId(), StatusEnum.zcwc); |
| | | } |
| | |
| | | |
| | | } else { |
| | | data = new TableNodeDto(); |
| | | String remark = baseDao.getRemark(node.getNetworkId(),type); |
| | | if (StringUtils.isNotBlank(remark)){ |
| | | data.setRemark(remark); |
| | | } |
| | | data.setName(node.getName()); |
| | | data.setNetworkId(node.getNetworkId()); |
| | | data.setIsealCabin(node.getIsealCabin()); |
| | | data.setIslt(node.getIslt()); |
| | | dataList.add(data); |
| | | oldId = node.getNetworkId(); |
| | | } |
| | | |
| | | |
| | | status = statusMap.get(node.getId()); |
| | | if (node.getProcessName().equals("è®¾å¤æå¸åºè±")) { |
| | | if (StringUtils.isNotBlank(node.getLqText())) { |
| | | data.setLqText(node.getLqText()); |
| | | } |
| | | if (StringUtils.isNotBlank(node.getYqText())) { |
| | | data.setYqText(node.getYqText()); |
| | | } |
| | | if (StringUtils.isNotBlank(node.getCqText())) { |
| | | data.setCqText(node.getCqText()); |
| | | } |
| | | |
| | | if (node.getProcessName().equals("è®¾å¤æå¸åºè±")||node.getProcessName().equals("设å¤å°å")||node.getProcessName().equals("æå¸åºè±")) { |
| | | data.setTime1Color(fillColorArr[status.ordinal()]); |
| | | } else if (node.getProcessName().equals("设å¤å交")) { |
| | | } else if (node.getProcessName().equals("设å¤å交")||node.getProcessName().equals("设å¤å®è£
")||node.getProcessName().equals("å
¥åº")) { |
| | | data.setTime2Color(fillColorArr[status.ordinal()]); |
| | | } else if (node.getProcessName().equals("ææ£é´å®")) { |
| | | } else if (node.getProcessName().equals("ææ£é´å®")||node.getProcessName().equals("åæ¾ä½ç½®")) { |
| | | data.setTime3Color(fillColorArr[status.ordinal()]); |
| | | } else if (node.getProcessName().equals("设å¤è¿å")) { |
| | | } else if (node.getProcessName().equals("设å¤è¿å")||node.getProcessName().equals("移交Té")) { |
| | | data.setTime4Color(fillColorArr[status.ordinal()]); |
| | | } else if (node.getProcessName().equals("åè£
")) { |
| | | data.setTime5Color(fillColorArr[status.ordinal()]); |
| | |
| | | |
| | | if (djJdgzTrackRecord.getCurrentStatus() == 1) { |
| | | DjJdgzNetworkLevel3List nextNode = djJdgzNetworkLevel3ListService.getNextNode(djJdgzTrackRecord.getLevel3NodeId(), djJdgzTrackRecord.getLevel3NetworkId()); |
| | | if (nextNode != null) { |
| | | Long oldId = baseDao.getIsExit(nextNode.getNetworkId(),nextNode.getProcessName()); |
| | | if (nextNode != null && oldId == null) { |
| | | DjJdgzTrackRecord data = new DjJdgzTrackRecord(); |
| | | data.setLevel3NodeId(nextNode.getId()); |
| | | data.setProcessName(nextNode.getProcessName()); |
| | |
| | | public List<ReportRecordDto> getReportRecord(Long level1NetworkId, int column, Long teamgroupId) { |
| | | return baseDao.getReportRecord(level1NetworkId, column, teamgroupId); |
| | | } |
| | | |
| | | public List<DjJdgzTrackRecord> getName(Long level3NetworkId) { |
| | | return baseDao.getName(level3NetworkId); |
| | | } |
| | | } |
| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject;; |
| | | import cn.hutool.json.XML; |
| | | import com.example.client.service.BaseService; |
| | | import com.example.client.utils.UUIDUtil; |
| | | import com.example.server.progressTrack.Dto.*; |
| | |
| | | import com.example.server.utils.TimeUtils; |
| | | import com.mxgraph.util.mxConstants; |
| | | import com.mxgraph.view.mxGraph; |
| | | import com.mxgraph.view.mxStylesheet; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | return result; |
| | | } |
| | | |
| | | public mxGraph getCsDiagram(mxGraph graph, String json, List<NetworkNodeStatusDto> nodeStatusList, Integer panelWidth, Integer panelHeight) { |
| | | public mxGraph getCsDiagram(mxGraph graph, String json, List<NetworkNodeStatusDto> nodeStatusList, Integer panelWidth, Integer panelHeight, List<DiagramNodeDto> list) { |
| | | if (StringUtils.isBlank(json)) { |
| | | return graph; |
| | | } |
| | | |
| | | Map<Long, StatusEnum> statusMap = new HashMap<>(); |
| | | if (nodeStatusList != null) { |
| | | Date today = new Date(); |
| | |
| | | if ("1888761224410202114".equals(idValue)) { |
| | | System.out.println(2222); |
| | | } |
| | | Object insertVertex = createInsertVertex(graph, jsonArray.getJSONObject(i), defX, defY, status); |
| | | Object insertVertex = createInsertVertex(graph, jsonArray.getJSONObject(i), defX, defY, status, list); |
| | | map.put(idValue, insertVertex); |
| | | } |
| | | } |
| | |
| | | return graph; |
| | | } |
| | | |
| | | public Object createInsertVertex(mxGraph graph, JSONObject jsonObject, Integer defX, Integer defY, StatusEnum status) { |
| | | public Object createInsertVertex(mxGraph graph, JSONObject jsonObject, Integer defX, Integer defY, StatusEnum status, List<DiagramNodeDto> list) { |
| | | Object parent = graph.getDefaultParent(); |
| | | String shapeValue = jsonObject.get("shape").toString(); |
| | | Object graphObject = null; |
| | |
| | | case "custom-circle": |
| | | case "custom-circle1": |
| | | String text = (String) JsonUtils2.getJsonValueByPath(jsonObject, "attrs/text/text".split("/")); |
| | | //String title = (String) JsonUtils2.getJsonValueByPath(jsonObject, "attrs/title/text".split("/")); |
| | | String title = (String) JsonUtils2.getJsonValueByPath(jsonObject, "attrs/title/text".split("/")); |
| | | String idValue = jsonObject.get("id").toString(); |
| | | |
| | | Integer x = (Integer) JsonUtils2.getJsonValueByPath(jsonObject, "position/x".split("/")) + defX; |
| | |
| | | Integer height = (Integer) JsonUtils2.getJsonValueByPath(jsonObject, "size/height".split("/")); |
| | | if (status != null) { |
| | | String fontColor = "fontColor=" + fillColorArr[status.ordinal()] + ";"; |
| | | if (list != null && list.size() > 0) { |
| | | for (DiagramNodeDto node : list) { |
| | | if (text.equals(node.getProcessName())){ |
| | | graphObject = graph.insertVertex(parent, idValue, text, x, y, width, height, |
| | | "whiteSpace=wrap;labelWidth=60;" + fontColor ); |
| | | break; |
| | | }else{ |
| | | graphObject = graph.insertVertex(parent, idValue, text, x, y, width, height, |
| | | "whiteSpace=wrap;labelWidth=60;" + fontColor + mxConstants.STYLE_SHAPE + "=" + mxConstants.SHAPE_ELLIPSE); |
| | | } |
| | | } |
| | | }else{ |
| | | graphObject = graph.insertVertex(parent, idValue, text, x, y, width, height, |
| | | "whiteSpace=wrap;labelWidth=60;" + fontColor + mxConstants.STYLE_SHAPE + "=" + mxConstants.SHAPE_ELLIPSE); |
| | | } |
| | | } else { |
| | | if ("å¼å§".equals(text) || "ç»æ".equals(text)) { |
| | | graphObject = graph.insertVertex(parent, idValue, "", x + width / 4, y + height / 4, width / 2, height / 2, |
| | |
| | | "whiteSpace=wrap;labelWidth=60;" + mxConstants.STYLE_SHAPE + "=" + mxConstants.SHAPE_ELLIPSE); |
| | | } |
| | | } |
| | | /*if (StringUtils.isNotBlank(title)) { |
| | | if (StringUtils.isNotBlank(title)) { |
| | | createText(graph, title, x, y, width, height); |
| | | }*/ |
| | | } |
| | | break; |
| | | case "custom-rect": |
| | | String label = (String) JsonUtils2.getJsonValueByPath(jsonObject, "attrs/label/textWrap/text".split("/")); |
| | |
| | | and a.level1_node_id = ${level1NodeId} |
| | | </select> |
| | | <select id="getNodeList" resultType="com.example.server.progressTrack.Dto.DiagramNodeDto"> |
| | | select a.* |
| | | select a.*,a.REQUIRED_COMPLETION_TIME as REQUIRED_COMPLETION |
| | | from dj_jdgz_network_level2_list a |
| | | where |
| | | a.is_delete = 0 |
| | |
| | | <if test="isealCabin!=10000 and isealCabin!=null"> |
| | | and a.iseal_cabin = ${isealCabin} |
| | | </if> |
| | | <if test="isLt!=10000 and isLt!=null"> |
| | | and a.islt = ${isLt} |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and a.type = #{type} |
| | | and a.type = '${type}' |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and a.name LIKE '%${name}%' |
| | |
| | | </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 |
| | | c.name, |
| | | b.NETWORK_ID, |
| | | b.process_name, |
| | | c.islt, |
| | | c.iseal_cabin, |
| | | b.ID, b.REQUIRED_COMPLETION_TIME, b.ACTUAL_COMPLETION, b.CURRENT_STATUS |
| | | FROM dj_jdgz_track_record a |
| | | LEFT JOIN dj_jdgz_network_level3_list b on b.ID = a.LEVEL3_NODE_ID |
| | | LEFT JOIN dj_jdgz_network_level3 c on c.ID = b.NETWORK_ID |
| | | LEFT JOIN dj_jdgz_network_level1 d on d.ID = c.LEVEL1_NETWORK_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} |
| | | and d.ship_id = ${shipId} |
| | | </if> |
| | | <if test="deptId!=null"> |
| | | and b.dept_id = ${deptId} |
| | | and c.dept_id = ${deptId} |
| | | </if> |
| | | <if test="teamId!=null"> |
| | | and b.TEAMGROUP_ID = ${teamId} |
| | | and c.TEAMGROUP_ID = ${teamId} |
| | | </if> |
| | | <if test="cabinId!=null"> |
| | | and b.cabin_id = ${cabinId} |
| | | and c.cabin_id = ${cabinId} |
| | | </if> |
| | | <if test="isCabin!=10000 and isCabin!=null"> |
| | | and c.iseal_cabin = ${isCabin} |
| | | </if> |
| | | <if test="islt!=10000 and islt!=null"> |
| | | and c.islt = ${islt} |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and b.type = #{type} |
| | | and c.type = '${type}' |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and b.name LIKE '%${name}%' |
| | | and c.name LIKE '%${name}%' |
| | | </if> |
| | | ORDER BY NETWORK_ID |
| | | </select> |
| | | <select id="getStatist" resultType="com.example.server.progressTrack.Dto.StatistProductDto"> |
| | | SELECT |
| | |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = 'ææ£é´å®' THEN b.id END) AS jdsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '设å¤è¿å' THEN b.id END) AS fcsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = 'åè£
' THEN b.id END) AS hzsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = 'æå¸åºè±' THEN b.id END) AS ccsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = 'å
¥åº' THEN b.id END) AS rksl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = 'åæ¾ä½ç½®' THEN b.id END) AS cfsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '移交Té' THEN b.id END) AS yjsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '设å¤å°å' THEN b.id END) AS dcsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '设å¤å®è£
' THEN b.id END) AS azsl, |
| | | COUNT(DISTINCT CASE WHEN all_complete.network_id IS NOT NULL THEN b.id END) AS wcsl |
| | | FROM |
| | | dj_sys_teamgroup_class a |
| | |
| | | network_id |
| | | FROM |
| | | dj_jdgz_network_level3_list |
| | | LEFT JOIN dj_jdgz_network_level3 ON dj_jdgz_network_level3_list.network_id = dj_jdgz_network_level3.id |
| | | where dj_jdgz_network_level3_list.is_delete = 0 |
| | | and dj_jdgz_network_level3.is_delete = 0 |
| | | and dj_jdgz_network_level3.type = '${type}' |
| | | GROUP BY |
| | | network_id |
| | | HAVING |
| | |
| | | ORDER BY |
| | | sort; |
| | | </select> |
| | | <select id="getRemark" resultType="java.lang.String"> |
| | | SELECT |
| | | b.remark |
| | | FROM |
| | | dj_jdgz_track_record b |
| | | LEFT JOIN dj_jdgz_network_level3 a ON b.LEVEL3_NETWORK_ID = a.ID |
| | | WHERE |
| | | a.is_delete = 0 |
| | | AND b.is_delete = 0 |
| | | AND a.id = ${networkId} |
| | | AND a.type = '${type}' |
| | | AND b.remark IS NOT NULL |
| | | ORDER BY |
| | | ABS((julianday('now') - julianday(b.CREATE_DATE)) * 86400) desc, |
| | | ABS((julianday('now') - julianday(b.UPDATE_DATE)) * 86400) desc |
| | | |
| | | LIMIT 1; |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | select a.sort, a.process_name |
| | | from dj_jdgz_network_level3_list a |
| | | where a.is_delete = 0 |
| | | and a.network_id = 10000 |
| | | and a.network_id = ${defultId} |
| | | ORDER BY sort |
| | | </select> |
| | | <select id="getAllNodeLevel3ByProject" |
| | |
| | | c.dept_id, |
| | | c.cabin_id, |
| | | c.iseal_cabin, |
| | | c.islt, |
| | | c.type, |
| | | c.`NAME` as level3NetworkName, |
| | | a.PROCESS_NAME AS level3NodeName, |
| | |
| | | AND is_delete = 0 |
| | | ) |
| | | </select> |
| | | <select id="getName" resultType="com.example.server.progressTrack.model.DjJdgzTrackRecord"> |
| | | SELECT |
| | | PROCESS_NAME |
| | | FROM |
| | | dj_jdgz_track_record |
| | | WHERE |
| | | is_delete = 0 |
| | | AND LEVEL3_NETWORK_ID = ${level3NetworkId} |
| | | GROUP BY |
| | | PROCESS_NAME |
| | | ORDER BY |
| | | CREATE_DATE ,UPDATE_DATE |
| | | </select> |
| | | |
| | | </mapper> |