| | |
| | | user = userService.login(name, str); |
| | | exist = user.getExist(); |
| | | Boolean exit2 = true; |
| | | Boolean exit3 = true; |
| | | if (StringUtils.isNotBlank(user.getTeamgroup())) { |
| | | if (StringUtils.isNotBlank(finalTeamGroup1) && !finalTeamGroup1.equals("null")) { |
| | | if (!finalTeamGroup1.contains(user.getTeamgroup())) { |
| | |
| | | } |
| | | } |
| | | } |
| | | if (user.getNickName().equals("工作组")){ |
| | | if(!"工作组".equals(finalSite)){ |
| | | exit3 = false; |
| | | } |
| | | } |
| | | |
| | | if (exist) { |
| | | if (!exit2) { |
| | | JOptionPane.showMessageDialog(null, "当前机器不支持该专业用户登录", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | if (!exit3) { |
| | | JOptionPane.showMessageDialog(null, "当前机器不支持工作组用户登录", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | try { |
| | | String path = Login.class.getClassLoader().getResource("config.properties").getPath(); |
| | | OutputStream outputStream = null; |
| | |
| | | columnDto.add(new ColumnDto("拆卸时间", "dismantTime", 130, "selectDate", true, null, null)); |
| | | columnDto.add(new ColumnDto("拆卸单位", "dismantUnit", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("拆卸人员", "dismantStaff", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("拆卸助修艇员", "dismantAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("拆卸助修T员", "dismantAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("出舱时间", "exitTime", 130, "selectDate", true, null, null)); |
| | | columnDto.add(new ColumnDto("出舱单位", "exitUnit", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("出舱人员", "exitStaff", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("出舱助修艇员", "exitAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("出舱助修T员", "exitAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("退重时间", "returnWeightTime", 130, "selectDate", true, null, null)); |
| | | columnDto.add(new ColumnDto("称重员", "weigher", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("退重重量", "returnWeight", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("退重助修艇员", "returnWeightAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("退重助修T员", "returnWeightAssistant", 180, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("入库时间", "warehouseTime", 130, "selectDate", true, null, null)); |
| | | columnDto.add(new ColumnDto("入库人员", "warehouseStaff", 120, null, true, null, null)); |
| | | columnDto.add(new ColumnDto("当前存放位置", "currentLocation", 160, null, true, null, null)); |
| | |
| | | "出舱阶段",ComplexTable.mergeCellX,ComplexTable.mergeCellX,ComplexTable.mergeCellX,"退重阶段",ComplexTable.mergeCellX,ComplexTable.mergeCellX,ComplexTable.mergeCellX, |
| | | "入库阶段",ComplexTable.mergeCellX,"当前存放位置"}; |
| | | //此处2-5是不会显示出来的,因为1-4向下合并了一行 + 向右合并了一列 , 而2-5被这个矩形范围包括了 |
| | | headerRows[1] = new Object[]{ComplexTable.mergeCellY, ComplexTable.mergeCellY ,ComplexTable.mergeCellY ,"时间","单位","人员","助修艇员", |
| | | "时间","单位","人员","助修艇员","时间","称重员","重量","助修艇员","时间","人员",ComplexTable.mergeCellY}; |
| | | headerRows[1] = new Object[]{ComplexTable.mergeCellY, ComplexTable.mergeCellY ,ComplexTable.mergeCellY ,"时间","单位","人员","助修T员", |
| | | "时间","单位","人员","助修T员","时间","称重员","重量","助修T员","时间","人员",ComplexTable.mergeCellY}; |
| | | |
| | | String[][] body = CommonTable.getRowData(list,columnDto); |
| | | |
| | |
| | | btnTjz.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | frame.setEnabled(false); |
| | | statisDismantService.createTable(frame,nowLevel3.getLevel1NetworkId()); |
| | | } |
| | | }); |
| | | btnTj.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | frame.setEnabled(false); |
| | | statisDismant2Service.createTable(frame,nowLevel3.getLevel1NetworkId()); |
| | | } |
| | | }); |
| | |
| | | btnExport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | frame.setEnabled(false); |
| | | exportDismantTrackService.openDialog(frame); |
| | | } |
| | | }); |
| | |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | trackTable.getCellEditor().stopCellEditing(); |
| | | if (trackTable.isEditing()) { |
| | | trackTable.getCellEditor().stopCellEditing(); |
| | | } |
| | | SysUser user = (SysUser) CacheUtils.get("user", "user"); |
| | | if (user.getTeamgroup()==null||user.getTeamgroup().equals(nowLevel3.getTeamgroupId().toString())){ |
| | | CommonTable.saveTableList(list, trackTable, columnDto); |
| | |
| | | btnImport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | frame.setEnabled(false); |
| | | importDismantTrackService.FileUpload(nowLevel3.getId(),frame); |
| | | } |
| | | }); |
| | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理", "" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | Map<String, Long> shipMap = new HashMap<>(); |
| | |
| | | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], null); |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "还未录入三级网络图数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return null; |
| | | } |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", 60, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("设备名称", "name", 200, null, false, null, null)); |
| | |
| | | comboBox1.setPreferredSize(new Dimension(300, 28)); |
| | | comboBox1.setSelectedIndex(-1); |
| | | |
| | | JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(deptList[0].getId()); |
| | | |
| | | JLabel JLabel1 = new JLabel("请选择专业"); |
| | | JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(); |
| | | JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(teamList1); |
| | | comboBox2.setPreferredSize(new Dimension(300, 28)); |
| | | comboBox2.setSelectedIndex(-1); |
| | | |
| | |
| | | Long deptId = selectedItem1 == null ? null : selectedItem1.getId(); |
| | | Long teamId = selectedItem2 == null ? null : selectedItem2.getId(); |
| | | |
| | | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(deptId); |
| | | comboBox2.setModel(new DefaultComboBoxModel<>(teamList)); |
| | | comboBox2.setSelectedIndex(0); |
| | | JComboBoxItem[] level3List = djJdgzNetworkLevel3Service.getListByExport(projectId, deptId, teamId); |
| | | comboBox3.setModel(new DefaultComboBoxModel<>(level3List)); |
| | | comboBox3.setSelectedIndex(-1); |
| | |
| | | comboBox.setSelectedItem(new JComboBoxItem(data.getLevel1NetworkId(),data.getProjectName())); |
| | | } |
| | | |
| | | JLabel JLabel1 = new JLabel("交方艇队"); |
| | | JLabel JLabel1 = new JLabel("交方T队"); |
| | | JTextField currentTeamDesc = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getCurrentTeam())) { |
| | | currentTeamDesc.setText(data.getCurrentTeam()); |
| | | } |
| | | |
| | | JLabel JLabel2 = new JLabel("接方艇队"); |
| | | JLabel JLabel2 = new JLabel("接方T队"); |
| | | JTextField handoverTeamDesc = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getHandoverTeam())) { |
| | | handoverTeamDesc.setText(data.getHandoverTeam()); |
| | |
| | | // 将 JTextArea 添加到 JTabbedPane |
| | | tabbedPane.addTab("专业交接说明", professionalScrollPane); |
| | | tabbedPane.addTab("部门交接说明", departmentScrollPane); |
| | | tabbedPane.addTab("艇队交接说明", tdScrollPane); |
| | | tabbedPane.addTab("T队交接说明", tdScrollPane); |
| | | |
| | | if (StringUtils.isNotBlank(data.getProfessExplan())) { |
| | | professExplan.setText(data.getProfessExplan()); |
| | |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("序号", "", (width - 10) / 7, "autoCreate", false, null,null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交方艇队", "currentTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("接方艇队", "handoverTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交方T队", "currentTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("接方T队", "handoverTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交接时间", "handoverTime", (width - 10) / 7, "selectDate", false, null,null)); |
| | | /* columnDto.add(new ColumnDto("交接情况说明", "handoverSituation", (width - 10) / 8, null, false, null,null)); |
| | | */ columnDto.add(new ColumnDto("附件", "fileName", (width - 10) / 7, "", false, null,null)); |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzHandover data = new DjJdgzHandover(); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | } |
| | | }); |
| | | |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | jFrame.setEnabled(false); |
| | | DjJdgzHandover data = list.get(row); |
| | | addOrUpdate.openDialog(data,jFrame,columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | |
| | | import java.awt.*; |
| | | import java.awt.datatransfer.DataFlavor; |
| | | import java.awt.datatransfer.Transferable; |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.awt.event.ItemEvent; |
| | | import java.awt.event.ItemListener; |
| | | import java.awt.event.*; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame.setLocationRelativeTo(null); |
| | | frame.setVisible(true); |
| | | frame.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | GridBagLayout layout = new GridBagLayout(); |
| | | frame.setLayout(layout); |
| | | |
| | |
| | | if (uploadSucceeded.equals("true")) { |
| | | waitUtil.dispose(); |
| | | frame.dispose(); |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | addOrUpdate.refreshTable(level3Id, jFrame); |
| | | System.out.println("导入成功时间" + new Date()); |
| | | } else { |
| | |
| | | frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame.setLocationRelativeTo(null); |
| | | frame.setVisible(true); |
| | | |
| | | GridBagLayout layout = new GridBagLayout(); |
| | | frame.setLayout(layout); |
| | | |
| | |
| | | import java.awt.*; |
| | | import java.awt.datatransfer.DataFlavor; |
| | | import java.awt.datatransfer.Transferable; |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.awt.event.ItemEvent; |
| | | import java.awt.event.ItemListener; |
| | | import java.awt.event.*; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame.setLocationRelativeTo(null); |
| | | frame.setVisible(true); |
| | | frame.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | GridBagLayout layout = new GridBagLayout(); |
| | | frame.setLayout(layout); |
| | | |
| | |
| | | if (uploadSucceeded.equals("true")) { |
| | | waitUtil.dispose(); |
| | | frame.dispose(); |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | |
| | | import java.awt.*; |
| | | import java.awt.datatransfer.DataFlavor; |
| | | import java.awt.datatransfer.Transferable; |
| | | import java.awt.event.ActionEvent; |
| | | import java.awt.event.ActionListener; |
| | | import java.awt.event.ItemEvent; |
| | | import java.awt.event.ItemListener; |
| | | import java.awt.event.*; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | frame.setVisible(true); |
| | | GridBagLayout layout = new GridBagLayout(); |
| | | frame.setLayout(layout); |
| | | frame.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | |
| | | table = new JTable(); |
| | | table.setRowHeight(40); |
| | |
| | | if (uploadSucceeded.equals("true")) { |
| | | waitUtil.dispose(); |
| | | frame.dispose(); |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | 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, null); |
| | | CommonTable.refreshTable(list, columnDto, subTable); |
| | | trackRecordManageService.tableModelListener(subTable, jFrame, list); |
| | |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | if (subTable.isEditing()) { |
| | | subTable.getCellEditor().stopCellEditing(); |
| | | } |
| | | CommonTable.saveTableList(list,subTable,columnDto); |
| | | level1ListService.save(list,data.getId(),diagram, finalGraph1); |
| | | } |
| | |
| | | @Autowired |
| | | private DjJdgzShipService djJdgzShipService; |
| | | @Autowired |
| | | private ShipManageService shipManageService; |
| | | @Autowired |
| | | private Level1AddOrUpdate addOrUpdate; // 注入 AddOrupdate 实例 |
| | | |
| | | private JTable table; |
| | |
| | | topJpanel.setBackground(Color.WHITE); |
| | | JPanel centerJpanel = new JPanel(); |
| | | |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(40,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(40, jFrame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | JComboBox comboBox = new JComboBox(); |
| | | JButton btnInsert = new JButton("新增"); |
| | | JButton btnShip = new JButton("X号管理"); |
| | | |
| | | topJpanel.add(comboBox); |
| | | topJpanel.add(btnInsert); |
| | | topJpanel.add(btnShip); |
| | | |
| | | comboBox.setPreferredSize(new Dimension(300, 28)); |
| | | |
| | |
| | | |
| | | columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("序号", "", (width - 10) / 4, "autoCreate", false, null,null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 4, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("起始时间", "StartDate", (width - 10) / 4, "selectDate", false, null,null)); |
| | | columnDto.add(new ColumnDto("操作", "", (width - 10) / 4, "", true, buttonList,null)); |
| | | columnDto.add(new ColumnDto("序号", "", (width - 10) / 4, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 4, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("起始时间", "StartDate", (width - 10) / 4, "selectDate", false, null, null)); |
| | | columnDto.add(new ColumnDto("操作", "", (width - 10) / 4, "", true, buttonList, null)); |
| | | |
| | | table = CommonTable.createCommonTable(list, columnDto); |
| | | table.setRowHeight(25); |
| | |
| | | Long shipId = shipMap.get(content); |
| | | list = level1Service.getList(shipId); |
| | | if (!isFirstLoadData[0]) { |
| | | CommonTable.refreshTable(list, columnDto,table); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | tableModelListener(table,jFrame); |
| | | }else{ |
| | | tableModelListener(table, jFrame); |
| | | } else { |
| | | isFirstLoadData[0] = false; |
| | | } |
| | | } |
| | |
| | | for (int i = 0; i < shipList.size(); i++) { |
| | | shipMap.put(shipList.get(i).getShipNo(), shipList.get(i).getId()); |
| | | comboBox.addItem(shipList.get(i).getShipNo()); |
| | | } |
| | | } |
| | | comboBox.setSelectedItem(shipList.get(0).getShipNo()); |
| | | |
| | | tableModelListener(table,jFrame); |
| | | tableModelListener(table, jFrame); |
| | | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | |
| | | insert(jFrame); |
| | | } |
| | | }); |
| | | btnShip.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | shipManageService.createTable(jFrame); |
| | | } |
| | | }); |
| | | |
| | | 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.ComputeHeight(40,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(40, jFrame))); |
| | | centerJpanel.add(scrollPane); |
| | | jFrame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(40,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(40,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(40, jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(40, jFrame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | new JComboBoxItem(1L, "三级"), |
| | | }; |
| | | |
| | | JLabel JLabel1 = new JLabel("玄号"); |
| | | JLabel JLabel1 = new JLabel("X号"); |
| | | JComboBox<JComboBoxItem> comboBox0 = new JComboBox<>(shipList); |
| | | comboBox0.setPreferredSize(new Dimension(185, 28)); |
| | | |
| | |
| | | |
| | | JButton btnSave = new JButton("保存"); |
| | | |
| | | frame1.add(JLabel1, new GBC(0, 0,1,1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(JLabel1, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(comboBox0, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(JLabel2, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(comboBox1, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(JLabel3, new GBC(0, 2,1,1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(JLabel3, new GBC(0, 2, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(yearPicker, new GBC(1, 2, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(JLabel4, new GBC(0, 3,1,1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(JLabel4, new GBC(0, 3, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | frame1.add(beginDate, new GBC(1, 3, 1, 1).setAnchor(GBC.NORTHWEST).setInsets(5)); |
| | | |
| | | frame1.add(btnSave, new GBC(0, 4, 2, 1).setWeight(1, 0)); |
| | |
| | | data.setStartDate(sdFormat.format(beginDate.getDate())); |
| | | data.setYear((Integer) yearPicker.getValue()); |
| | | data.setAdventDay(7); |
| | | data.setProjectName(level.getName()+"修理"+ship.getName()+"项目"); |
| | | data.setProjectName(level.getName() + "修理" + ship.getName() + "项目"); |
| | | level1Service.insert(data); |
| | | list = level1Service.getList(ship.getId()); |
| | | CommonTable.refreshTable(list,columnDto,table); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | tableModelListener(table,jFrame); |
| | | tableModelListener(table, jFrame); |
| | | frame1.dispose(); |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | }); |
| | | } |
| | | |
| | | public void tableModelListener(JTable table,JFrame jFrame){ |
| | | public void tableModelListener(JTable table, JFrame jFrame) { |
| | | table.getModel().addTableModelListener(e -> { |
| | | // 检查事件类型 |
| | | if (e.getType() == TableModelEvent.UPDATE) { |
| | |
| | | // 获取新的值 |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | if (newValue.equals("edit")) { |
| | | DjJdgzNetworkLevel1 data = list.get(row); |
| | | addOrUpdate.openDialog(data,jFrame); |
| | | addOrUpdate.openDialog(data, jFrame); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | } else if (newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | | DefaultTableModel model = (DefaultTableModel) table.getModel(); |
| | |
| | | private NetWorkDiagramService netWorkDiagramService; |
| | | |
| | | public JPanel createTable(Integer width, Integer height, JFrame frame) { |
| | | height = height - 100; |
| | | JPanel panel = new JPanel(); |
| | | JPanel panel = new JPanel(new BorderLayout()); |
| | | panel.setPreferredSize(new Dimension(width, height)); |
| | | |
| | | JPanel jLeft = new JPanel(new BorderLayout()); |
| | | |
| | | JPanel jLeft = new JPanel(); |
| | | jLeft.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeight(0, frame))); |
| | | |
| | | JPanel diagram = new JPanel(new BorderLayout()); |
| | |
| | | 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); |
| | | return null; |
| | | } |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", width / 8 - 10, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", width / 8, null, false, null, null)); |
| | |
| | | |
| | | JScrollPane scrollTable = new JScrollPane(subTable); |
| | | scrollTable.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeightWithScroll(0, frame))); |
| | | jLeft.add(scrollTable, BorderLayout.CENTER); |
| | | jLeft.add(scrollTable); |
| | | frame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | jLeft.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeight(40, frame))); |
| | | scrollTable.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeightWithScroll(40, frame))); |
| | | jLeft.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeight(0, frame))); |
| | | scrollTable.setPreferredSize(new Dimension(width / 4 - 20, Compute.ComputeHeightWithScroll(0, frame))); |
| | | jLeft.revalidate(); |
| | | jLeft.repaint(); |
| | | scrollTable.revalidate(); |
| | |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | if (subTable.isEditing()) { |
| | | subTable.getCellEditor().stopCellEditing(); |
| | | } |
| | | CommonTable.saveTableList(list,subTable,columnDto); |
| | | level2ListService.save(list,data.getId(),diagram, finalGraph); |
| | | } |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | insert(jFrame); |
| | | } |
| | | }); |
| | | btnDown.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | DownLoadTmpFile.down(tmpPath + "二级网络图导入模板.xlsx", jFrame); |
| | | } |
| | | }); |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzNetworkLevel2 data = list.get(row); |
| | | addOrUpdate.openDialog(data, jFrame); |
| | | jFrame.setEnabled(false); |
| | | } else if (newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | List<DjJdgzNetworkLevel2> list = level2Service.getList(null); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "还未录入二级网络图数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return null; |
| | | } |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", 120, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", 145, null, false, null, null)); |
| | |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | if (subTable.isEditing()) { |
| | | subTable.getCellEditor().stopCellEditing(); |
| | | } |
| | | CommonTable.saveTableList(finalList, subTable, columnDto); |
| | | level3ListService.save(finalList, data.getId(), diagram, finalGraph1); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | public JPanel createTable(Integer width, Integer height, JFrame jFrame) { |
| | | JPanel panel = new JPanel(); |
| | | panel.setPreferredSize(new Dimension(width,height)); |
| | | panel.setPreferredSize(new Dimension(width, height)); |
| | | |
| | | JPanel topJpanel = new JPanel(); |
| | | GridBagLayout layout = new GridBagLayout(); |
| | |
| | | topJpanel.setBackground(Color.WHITE); |
| | | |
| | | JPanel centerJpanel = new JPanel(); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理","" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("工程"); |
| | |
| | | topJpanel.add(btnInsert, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | | topJpanel.add(btnImport, new GBC(4, 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],null); |
| | | list = level3Service.getList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], null); |
| | | List<TableButton> buttonList = new ArrayList<>(); |
| | | buttonList.add(new TableButton("edit", "编辑")); |
| | | buttonList.add(new TableButton("del", "删除")); |
| | |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | for (int i = 0; i < shipList.size(); i++) { |
| | | shipMap.put(shipList.get(i).getShipNo(), shipList.get(i).getId()); |
| | | comboBox.addItem(shipList.get(i).getShipNo()); |
| | | } |
| | | comboBox.setSelectedItem(shipList.get(0).getShipNo()); |
| | | comboBox.addItemListener(new ItemListener() { |
| | | public void itemStateChanged(final ItemEvent event) { |
| | | String content = comboBox.getSelectedItem().toString(); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | String type = comboBox4.getSelectedItem().toString(); |
| | | |
| | | Long shipId = shipMap.get(content); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); |
| | | list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type, 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,sb.getText()); |
| | | list = level3Service.getList(null, null, null, null, null, sb.getText()); |
| | | |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | |
| | | } |
| | | }); |
| | | |
| | | for (int i = 0; i < shipList.size(); i++) { |
| | | shipMap.put(shipList.get(i).getShipNo(), shipList.get(i).getId()); |
| | | comboBox.addItem(shipList.get(i).getShipNo()); |
| | | } |
| | | comboBox.setSelectedItem(shipList.get(0).getShipNo()); |
| | | |
| | | tableModelListener(list, table, jFrame); |
| | | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | insert(jFrame); |
| | | } |
| | | }); |
| | |
| | | btnImport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | importService.FileUpload(columnDto, table, jFrame); |
| | | } |
| | | }); |
| | |
| | | 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(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.add(scrollPane); |
| | | jFrame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理","" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | |
| | | JLabel JLabel1 = new JLabel("工程"); |
| | |
| | | data.setCabinId(String.valueOf(selectedIds)); |
| | | data.setType(comboBox6.getSelectedItem().toString()); |
| | | level3Service.insert(data); |
| | | list = level3Service.getList(level1Data.getShipId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null); |
| | | list = level3Service.getList(level1Data.getShipId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], null); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | table.setRowHeight(25); |
| | | |
| | |
| | | private SysTeamGroupClassService sysTeamGroupClassService; |
| | | @Autowired |
| | | private CabinService cabinService; |
| | | @Autowired |
| | | private StatisProductService statisProductService; |
| | | |
| | | private JTable table; |
| | | private List<TableNodeDto> list; |
| | |
| | | topJpanel.setBackground(Color.WHITE); |
| | | |
| | | JPanel centerJpanel = new JPanel(); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,frame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | |
| | | JComboBoxItem[] cabinList = cabinService.getList(); |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理", "" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("工程"); |
| | |
| | | |
| | | // 创建下拉框 |
| | | 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(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)); |
| | | |
| | | list = level3Service.getNodeList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], null); |
| | | |
| | |
| | | } |
| | | comboBox.setSelectedItem(shipList.get(0).getShipNo()); |
| | | |
| | | btnTjz.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | String content = comboBox.getSelectedItem().toString(); |
| | | Long shipId = shipMap.get(content); |
| | | statisProductService.createTable(frame,shipId); |
| | | } |
| | | }); |
| | | |
| | | 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(100,frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(95,frame))); |
| | | centerJpanel.add(scrollPane); |
| | | frame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(100,frame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(95,frame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | main.showTab("一级网络图管理", level1Manage, tree); |
| | | } else if (nodeName.equals("一级网络图查看")) { |
| | | JPanel level1View = level1ViewService.createTable(width, height,frame); |
| | | main.showTab("一级网络图查看", level1View, tree); |
| | | if(level1View!=null){ |
| | | main.showTab("一级网络图查看", level1View, tree); |
| | | } |
| | | } else if (nodeName.equals("二级网络图管理")) { |
| | | JPanel level2Manage = level2ManageService.createTable(width, height, frame); |
| | | main.showTab("二级网络图管理", level2Manage, tree); |
| | | } else if (nodeName.equals("二级网络图查看")) { |
| | | JPanel level2View = level2ViewService.createTable(width, height,frame); |
| | | main.showTab("二级网络图查看", level2View, tree); |
| | | if(level2View!=null){ |
| | | main.showTab("二级网络图查看", level2View, tree); |
| | | } |
| | | } else if (nodeName.equals("三级网络图管理")) { |
| | | JPanel level3Manage = level3ManageService.createTable(width, height, frame); |
| | | main.showTab("三级网络图管理", level3Manage, tree); |
| | |
| | | main.showTab("用户管理", user, tree); |
| | | } else if (nodeName.equals("拆卸进度表")) { |
| | | JPanel dismantTrack = dismantTrackService.createTable(width, height, frame); |
| | | main.showTab("拆卸进度表", dismantTrack, tree); |
| | | if(dismantTrack!=null){ |
| | | main.showTab("拆卸进度表", dismantTrack, tree); |
| | | } |
| | | }else if (nodeName.equals("子部件配置")) { |
| | | JPanel subunit = subunitService.createTable(width, height, frame); |
| | | main.showTab("子部件配置", subunit, tree); |
| | | if(subunit!=null){ |
| | | main.showTab("子部件配置", subunit, tree); |
| | | } |
| | | }else if (nodeName.equals("专业管理")) { |
| | | JPanel teamGroup = teamGroupManageService.createTable(width, height, frame); |
| | | main.showTab("专业管理", teamGroup, tree); |
New file |
| | |
| | | package com.example.client.service; |
| | | |
| | | import com.example.client.dto.ColumnDto; |
| | | import com.example.client.dto.JComboBoxItem; |
| | | import com.example.client.model.TableButton; |
| | | import com.example.client.utils.CommonTable; |
| | | import com.example.client.utils.Compute; |
| | | import com.example.client.utils.GBC; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel1; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel1List; |
| | | import com.example.server.progressTrack.model.DjJdgzShip; |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel1Service; |
| | | import com.example.server.progressTrack.service.DjJdgzShipService; |
| | | import org.jdesktop.swingx.JXDatePicker; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.swing.*; |
| | | import javax.swing.event.TableModelEvent; |
| | | import javax.swing.table.DefaultTableModel; |
| | | import javax.swing.table.TableCellEditor; |
| | | import javax.swing.table.TableModel; |
| | | import java.awt.*; |
| | | import java.awt.event.*; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | | public class ShipManageService { |
| | | @Autowired |
| | | private DjJdgzShipService djJdgzShipService; |
| | | |
| | | private JTable table; |
| | | private List<ColumnDto> columnDto; |
| | | |
| | | public void createTable(JFrame jFrame) { |
| | | JFrame frame1 = new JFrame("新增一级网络图"); |
| | | frame1.setSize(400, 400); |
| | | frame1.setResizable(true); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame1.setLocationRelativeTo(null); |
| | | frame1.setVisible(true); |
| | | frame1.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | |
| | | JPanel topJpanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
| | | topJpanel.setPreferredSize(new Dimension(350, 40)); |
| | | topJpanel.setBackground(Color.WHITE); |
| | | JPanel centerJpanel = new JPanel(); |
| | | |
| | | centerJpanel.setPreferredSize(new Dimension(350, 350)); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | frame1.add(topJpanel, BorderLayout.NORTH); |
| | | frame1.add(centerJpanel, BorderLayout.CENTER); |
| | | |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | JButton btnInsert = new JButton("新增"); |
| | | JButton btnSave = new JButton("保存"); |
| | | |
| | | topJpanel.add(btnInsert); |
| | | topJpanel.add(btnSave); |
| | | |
| | | List<TableButton> buttonList = new ArrayList<>(); |
| | | buttonList.add(new TableButton("del", "删除")); |
| | | |
| | | columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("序号", "", 115 , "autoCreate", false, null,null)); |
| | | columnDto.add(new ColumnDto("X号", "shipNo", 115, null, true, null,null)); |
| | | columnDto.add(new ColumnDto("操作", "", 115, "", true, buttonList,null)); |
| | | |
| | | table = CommonTable.createCommonTable(shipList, columnDto); |
| | | table.setRowHeight(25); |
| | | |
| | | table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
| | | |
| | | tableModelListener(table,jFrame,shipList); |
| | | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | TableModel model = table.getModel(); |
| | | DefaultTableModel defaultModel = (DefaultTableModel) model; |
| | | int columnCount = table.getColumnCount(); |
| | | Object[] emptyRow = new Object[columnCount]; |
| | | defaultModel.addRow(emptyRow); |
| | | shipList.add(new DjJdgzShip()); |
| | | } |
| | | }); |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | if (table.isEditing()) { |
| | | table.getCellEditor().stopCellEditing(); |
| | | } |
| | | CommonTable.saveTableList(shipList,table,columnDto); |
| | | djJdgzShipService.save(shipList); |
| | | } |
| | | }); |
| | | |
| | | 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(350, 300)); |
| | | centerJpanel.add(scrollPane); |
| | | |
| | | } |
| | | |
| | | public void tableModelListener(JTable table, JFrame jFrame, List<DjJdgzShip> shipList){ |
| | | table.getModel().addTableModelListener(e -> { |
| | | // 检查事件类型 |
| | | if (e.getType() == TableModelEvent.UPDATE) { |
| | | // 获取变化的行和列 |
| | | int row = e.getFirstRow(); |
| | | int column = e.getColumn(); |
| | | |
| | | // 获取新的值 |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | | DefaultTableModel model = (DefaultTableModel) table.getModel(); |
| | | DjJdgzShip data = shipList.get(row); |
| | | djJdgzShipService.deleteLogic(data.getId()); |
| | | shipList.remove(row); |
| | | model.removeRow(row); |
| | | } |
| | | } |
| | | System.out.println("单元格变化: 行=" + row + ", 列=" + column + ", 新值=" + newValue); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.example.client.service; |
| | | |
| | | import com.example.client.dto.ColumnDto; |
| | | import com.example.client.utils.ComplexTable; |
| | | import com.example.server.progressTrack.Dto.StatistDismantDto; |
| | | import com.example.server.progressTrack.Dto.StatistProductDto; |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.swing.*; |
| | | import java.awt.event.WindowAdapter; |
| | | import java.awt.event.WindowEvent; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class StatisProductService { |
| | | @Autowired |
| | | DjJdgzNetworkLevel3Service djJdgzNetworkLevel3Service; |
| | | public void createTable(JFrame jFrame, Long level1Id) { |
| | | JFrame frame1 = new JFrame("设备进度统计总表"); |
| | | frame1.setSize(1500, 800); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame1.setLocationRelativeTo(null); |
| | | frame1.setVisible(true); |
| | | frame1.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | |
| | | List<StatistProductDto> list = djJdgzNetworkLevel3Service.getStatist(level1Id); |
| | | |
| | | Object[][] headerRows = new Object[2][9]; |
| | | 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]; |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StatistProductDto data =list.get(i); |
| | | body[i][0] = data.getName(); |
| | | body[i][1] = String.valueOf(data.getCxsl()); |
| | | body[i][2] = String.valueOf(data.getFcsl()); |
| | | body[i][3] = String.valueOf(data.getJdsl()); |
| | | body[i][4] = String.valueOf(data.getFcsl()); |
| | | body[i][5] = String.valueOf(data.getHzsl()); |
| | | body[i][6] = String.valueOf(data.getWcsl()); |
| | | } |
| | | |
| | | JScrollPane scrollTable = new JScrollPane(new ComplexTable(headerRows , body,210)); |
| | | frame1.add(scrollTable); |
| | | frame1.setVisible(true); |
| | | } |
| | | |
| | | } |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | frame.setEnabled(false); |
| | | SysUser user = (SysUser) CacheUtils.get("user", "user"); |
| | | if (user.getTeamgroup()==null||user.getTeamgroup().equals(nowLevel3.getTeamgroupId().toString())) { |
| | | DjJdgzDismantTrack djJdgzDismantTrack = new DjJdgzDismantTrack(); |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | jFrame.setEnabled(false); |
| | | DjJdgzDismantTrack data = list.get(row); |
| | | insert(jFrame,data); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null); |
| | | |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "还未录入三级网络图数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return null; |
| | | } |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", 60, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("设备名称", "name", 152, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("部门", "deptId", 152, "dict", false, null, deptList)); |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | SysTeamGroupClass data = new SysTeamGroupClass(); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | } |
| | | }); |
| | | |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | jFrame.setEnabled(false); |
| | | SysTeamGroupClass data = list.get(row); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | |
| | | trackLocatDesc.setText(data.getTrackLocation()); |
| | | } |
| | | |
| | | JLabel JLabel3 = new JLabel("跟踪人(艇方)"); |
| | | JLabel JLabel3 = new JLabel("跟踪人(T方)"); |
| | | JTextField trackPersonDesc = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getTrackPerson())) { |
| | | trackPersonDesc.setText(data.getTrackPerson()); |
| | |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service; |
| | | import com.example.server.progressTrack.service.DjJdgzTrackRecordService; |
| | | import com.example.server.teamGroup.service.SysTeamGroupClassService; |
| | | import com.example.server.user.model.SysUser; |
| | | import com.example.server.utils.CacheUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | topJpanel.setBackground(Color.WHITE); |
| | | |
| | | JPanel centerJpanel = new JPanel(); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | |
| | | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理", "" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("工程"); |
| | |
| | | btnImport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | importTrackRecordService.FileUpload(columnDto, table, jFrame); |
| | | } |
| | |
| | | |
| | | String[] items = itemList.toArray(new String[0]); |
| | | columnModel = table.getColumnModel(); |
| | | MultiSelectComboBox2 mulcomboBox = new MultiSelectComboBox2(items,columnDto,columnModel); |
| | | MultiSelectComboBox2 mulcomboBox = new MultiSelectComboBox2(items, columnDto, columnModel); |
| | | |
| | | /* final Integer[] lastIndex = {-1}; |
| | | mulcomboBox.addItemListener(new ItemListener() { |
| | |
| | | Object cellValue = table.getValueAt(row, column); |
| | | Integer value = Integer.parseInt(cellValue.toString()); |
| | | if (value > 0) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzTrackRecord djJdgzTrackRecord = list.get(row); |
| | | history(jFrame, djJdgzTrackRecord.getLevel3NodeId()); |
| | | } |
| | |
| | | btnTj.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | statistReportsService.createTable(jFrame, selectedItemNow.getId()); |
| | | } |
| | |
| | | btnJc.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | progressPromptService.createTable(jFrame, selectedItemNow.getId()); |
| | | } |
| | |
| | | btnExport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | exportTrackRecordService.openDialog(jFrame); |
| | | } |
| | | }); |
| | |
| | | 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(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.add(scrollPane); |
| | | jFrame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzTrackRecord data = recordList.get(row); |
| | | Long level1Id = data.getLevel1NetworkId(); |
| | | data.setProcessName(data.getLevel3NodeName()); |
| | |
| | | data.setRepairUnitContact(level3.getRepairUnitContact()); |
| | | } |
| | | addOrUpdate.openDialog(data, jFrame, level1Id, columnDto, table); |
| | | jFrame.setEnabled(false); |
| | | } else { |
| | | |
| | | } |
| | |
| | | int row = table.rowAtPoint(e.getPoint()); |
| | | int col = table.columnAtPoint(e.getPoint()); |
| | | DjJdgzTrackRecord djJdgzTrackRecord = list.get(row); |
| | | if (djJdgzTrackRecord.getCurrentStatus() == 1) { |
| | | String site = (String) CacheUtils.get("site", "site"); |
| | | |
| | | if (djJdgzTrackRecord.getCurrentStatus() == 1 && site.equals("工作组")) { |
| | | table.setRowSelectionInterval(row, row); |
| | | popupMenu.show(e.getComponent(), e.getX(), e.getY()); |
| | | menuItem1.addActionListener(ex -> { |
| | |
| | | |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | |
| | | JComboBoxItem[] boatList = boatFleetService.getBoatList(); |
| | | |
| | | JLabel JLabel0 = new JLabel("用户名"); |
| | | JTextField userName = new JTextField(16); |
| | | if (StringUtils.isNotBlank(data.getUsername())) { |
| | |
| | | |
| | | JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); |
| | | |
| | | JComboBoxItem[] boatList = boatFleetService.getBoatList(); |
| | | |
| | | columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | SysUser data = new SysUser(); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | } |
| | | }); |
| | | |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | jFrame.setEnabled(false); |
| | | SysUser data = list.get(row); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |
| | |
| | | }*/ |
| | | public static Integer ComputeHeight(Integer topHeight, JFrame frame){ |
| | | int height = frame.getSize().height; |
| | | Integer panelHeight = height - 70 - topHeight; |
| | | Integer panelHeight = height - 65 - topHeight; |
| | | |
| | | return panelHeight; |
| | | } |
| | | public static Integer ComputeHeightWithScroll(Integer topHeight, JFrame frame){ |
| | | int height = frame.getSize().height; |
| | | Integer panelHeight = height - 100 - topHeight; |
| | | Integer panelHeight = height - 95 - topHeight; |
| | | |
| | | return panelHeight; |
| | | } |
| | |
| | | syncTable("dj_jdgz_dismant_track"); |
| | | syncTable("dj_sys_teamgroup_class"); |
| | | syncTable("sys_user"); |
| | | syncTable("dj_jdgz_ship"); |
| | | } |
| | | } else if ("厂家".equals(mySite)) { |
| | | syncTable("dj_jdgz_handover"); |
New file |
| | |
| | | package com.example.server.progressTrack.Dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author 14539 |
| | | */ |
| | | @Data |
| | | public class StatistProductDto { |
| | | private String name; |
| | | private Integer cxsl; |
| | | private Integer fjsl; |
| | | private Integer jdsl; |
| | | private Integer fcsl; |
| | | private Integer hzsl; |
| | | private Integer wcsl; |
| | | } |
| | |
| | | import com.example.client.dto.JComboBoxItem; |
| | | import com.example.server.dao.BaseDao; |
| | | import com.example.server.progressTrack.Dto.NetworkNodeStatusDto; |
| | | import com.example.server.progressTrack.Dto.StatistProductDto; |
| | | import com.example.server.progressTrack.Dto.TableNodeDto; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel3; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | JComboBoxItem[] getListByExport(Long projectId, Long deptId, Long teamId); |
| | | |
| | | List<TableNodeDto> getNodeList(Long shipId, Long deptId, Long teamId, Long cabinId, String type, String name); |
| | | |
| | | List<StatistProductDto> getStatist(Long level1Id); |
| | | } |
| | |
| | | columnDto.add(new ExcelColumnDto("拆卸时间", "dismantTime", 15, HorizontalAlignment.CENTER)); |
| | | columnDto.add(new ExcelColumnDto("拆卸单位", "dismantUnit", 25, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("拆卸人员", "dismantStaff", 15, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("拆卸助修艇员", "dismantAssistant", 10, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("拆卸助修T员", "dismantAssistant", 10, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("出舱时间", "exitTime", 10, HorizontalAlignment.CENTER)); |
| | | columnDto.add(new ExcelColumnDto("出舱单位", "exitUnit", 10, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("出舱人员", "exitStaff", 15, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("出舱助修艇员", "exitAssistant", 20, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("出舱助修T员", "exitAssistant", 20, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("退重时间", "returnWeightTime", 20, HorizontalAlignment.CENTER)); |
| | | columnDto.add(new ExcelColumnDto("称重员", "weigher", 15, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("退重重量", "returnWeight", 15, HorizontalAlignment.RIGHT)); |
| | | columnDto.add(new ExcelColumnDto("退重助修艇员", "returnWeightAssistant", 20, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("退重助修T员", "returnWeightAssistant", 20, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("入库时间", "warehouseTime", 15, HorizontalAlignment.CENTER)); |
| | | columnDto.add(new ExcelColumnDto("入库人员", "warehouseStaff", 15, HorizontalAlignment.LEFT)); |
| | | columnDto.add(new ExcelColumnDto("当前存放位置", "currentLocation", 15, HorizontalAlignment.LEFT)); |
| | |
| | | import com.example.client.service.BaseService; |
| | | import com.example.server.cabin.service.CabinService; |
| | | import com.example.server.progressTrack.Dto.NetworkNodeStatusDto; |
| | | import com.example.server.progressTrack.Dto.StatistProductDto; |
| | | import com.example.server.progressTrack.Dto.TableNodeDto; |
| | | import com.example.server.progressTrack.dao.DjJdgzNetworkLevel3Dao; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel3; |
| | |
| | | @Value("${zt.oss.local-path}") |
| | | private String path; |
| | | |
| | | public List<StatistProductDto> getStatist(Long level1Id) { |
| | | return baseDao.getStatist(level1Id); |
| | | } |
| | | |
| | | enum StatusEnum {zy, jxz, lq, yq, zcwc, cqwc} |
| | | |
| | | String[] fillColorArr = {"#e5e5e5", "#3498DB", "#F1C40F", "#E74C3C", "#2ECC71", "#006400"}; |
| | |
| | | public JComboBoxItem[] getListByItem() { |
| | | return baseDao.getListByItem(); |
| | | } |
| | | |
| | | public void save(List<DjJdgzShip> shipList) { |
| | | for (DjJdgzShip ship:shipList){ |
| | | if (ship.getId()!=null){ |
| | | this.update(ship); |
| | | }else{ |
| | | this.insert(ship); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | ) { |
| | | JSONObject jsonObject = dialgramJsonArray.getJSONObject(i); |
| | | String shape = jsonObject.get("shape").toString(); |
| | | StatusEnum status = StatusEnum.jxz;//StatusEnum.wqd; |
| | | StatusEnum status = StatusEnum.jxz; |
| | | if (shape.equals("custom-text")) { |
| | | JsonUtils2.setJsonValueByPath(jsonObject, "attrs/body/fill".split("/"), fillColorArr[StatusEnum.zy.ordinal()]); |
| | | JsonUtils2.setJsonValueByPath(jsonObject, "attrs/text/fill".split("/"), fontColorArr[StatusEnum.zy.ordinal()]); |
| | |
| | | JSONObject jsonObject = modelJsonArray.getJSONObject(i); |
| | | if (jsonObject.get("shape").equals("custom-circle")) { |
| | | Object nodeMarker = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/text/text".split("/")); |
| | | if ("专业".equals(nodeMarker)) { |
| | | /* if ("专业".equals(nodeMarker)) { |
| | | fillColorArr[StatusEnum.zy.ordinal()] = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/body/fill".split("/")).toString(); |
| | | fontColorArr[StatusEnum.zy.ordinal()] = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/text/fill".split("/")).toString(); |
| | | } |
| | |
| | | if ("超期完成".equals(nodeMarker)) { |
| | | fillColorArr[StatusEnum.cqwc.ordinal()] = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/body/fill".split("/")).toString(); |
| | | fontColorArr[StatusEnum.cqwc.ordinal()] = JsonUtils2.getJsonValueByPath(jsonObject, "attrs/text/fill".split("/")).toString(); |
| | | } |
| | | }*/ |
| | | if ("阶段名称".equals(nodeMarker)) { |
| | | networkDiagramPetsDto.getCirclePet().setJson(jsonObject.toString()); |
| | | int width = Convert.toInt(JsonUtils2.getJsonValueByPath(jsonObject, "size/width".split("/")).toString()); |
| | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | String shapeValue = jsonArray.getJSONObject(i).get("shape").toString(); |
| | | String idValue = jsonArray.getJSONObject(i).get("id").toString(); |
| | | StatusEnum status = StatusEnum.jxz;//StatusEnum.wqd; |
| | | StatusEnum status = StatusEnum.jxz; |
| | | if (!shapeValue.equals("edge")) { |
| | | status = statusMap.get(Long.parseLong(idValue)); |
| | | if ("1888761224410202114".equals(idValue)) { |
| | |
| | | // 如果用户取消操作,不显示额外提示 |
| | | tempFile.delete(); // 删除临时文件 |
| | | } |
| | | frame1.setEnabled(true); |
| | | } |
| | | |
| | | public static void buildTrack(List<DjJdgzTrackRecord> list, String path, JFrame frame1) { |
| | |
| | | and b.name LIKE '%${name}%' |
| | | </if> |
| | | </select> |
| | | <select id="getStatist" resultType="com.example.server.progressTrack.Dto.StatistProductDto"> |
| | | SELECT |
| | | a.id, |
| | | CASE WHEN a.pid = 0 THEN a.NAME ELSE ' ' || a.NAME END AS name, |
| | | CASE WHEN a.pid = 0 THEN '' || a.id ELSE '' || a.pid || a.SORT END AS sort, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '设备拆卸出舱' THEN b.id END) AS cxsl, |
| | | COUNT(DISTINCT CASE WHEN fvp.process_name = '设备分交' THEN b.id END) AS fjsl, |
| | | 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 all_complete.network_id IS NOT NULL THEN b.id END) AS wcsl |
| | | FROM |
| | | dj_sys_teamgroup_class a |
| | | left JOIN |
| | | dj_jdgz_network_level3 b ON a.id = b.TEAMGROUP_ID OR a.id = b.DEPT_ID |
| | | LEFT JOIN dj_jdgz_network_level1 d on d.ID = b.LEVEL1_NETWORK_ID |
| | | LEFT JOIN ( |
| | | SELECT |
| | | network_id, |
| | | process_name |
| | | FROM ( |
| | | SELECT |
| | | c.network_id, |
| | | c.process_name, |
| | | c.CURRENT_STATUS, |
| | | ROW_NUMBER() OVER ( |
| | | PARTITION BY c.network_id |
| | | ORDER BY c.sort |
| | | ) AS rn |
| | | FROM |
| | | dj_jdgz_network_level3_list c |
| | | WHERE |
| | | (c.CURRENT_STATUS = 0 OR c.CURRENT_STATUS IS NULL) and c.is_delete = 0 |
| | | ) AS ranked_processes |
| | | WHERE |
| | | ranked_processes.rn = 1 |
| | | ) AS fvp ON b.id = fvp.network_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | network_id |
| | | FROM |
| | | dj_jdgz_network_level3_list |
| | | GROUP BY |
| | | network_id |
| | | HAVING |
| | | COUNT(CASE WHEN CURRENT_STATUS = 1 THEN 1 END) = COUNT(*) |
| | | ) AS all_complete ON b.id = all_complete.network_id |
| | | WHERE |
| | | a.AREA = 'hld' AND a.IS_DELETE = 0 and d.ship_id = ${level1Id} and d.is_delete =0 and b.is_delete =0 |
| | | GROUP BY |
| | | a.id, a.name |
| | | ORDER BY |
| | | sort; |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | c.id AS deptId, |
| | | b.id AS teamgroupId, |
| | | b.Name AS teamgroup, |
| | | d.name AS boatFleet, |
| | | d.id AS boatFleetId |
| | | a.boat_fleet || 'T' as boatFleet |
| | | FROM |
| | | sys_user a |
| | | LEFT JOIN |
| | | dj_sys_teamgroup_class b ON b.id = a.teamgroup |
| | | LEFT JOIN |
| | | dj_sys_teamgroup_class c ON c.id = b.PID |
| | | LEFT JOIN |
| | | boat_fleet d ON d.id = a.boat_fleet |
| | | WHERE |
| | | a.is_delete = 0 |
| | | AND (b.is_delete = 0 OR b.id IS NULL) |
| | | AND (c.is_delete = 0 OR c.id IS NULL) |
| | | AND (d.is_delete = 0 OR d.id IS NULL); |
| | | </select> |
| | | <select id="login" resultType="com.example.server.user.model.SysUser"> |
| | | SELECT *,COUNT(*) > 0 as exist |