|  |  | 
 |  |  | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3ListService; | 
 |  |  | import com.example.server.progressTrack.service.NetWorkDiagramService; | 
 |  |  | import com.example.server.teamGroup.service.SysTeamGroupClassService; | 
 |  |  | import com.example.server.user.model.SysUser; | 
 |  |  | import com.example.server.utils.UserAndSiteUtils; | 
 |  |  | import com.mxgraph.swing.mxGraphComponent; | 
 |  |  | import com.mxgraph.view.mxGraph; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private DjJdgzNetworkLevel3ListService level3ListService; | 
 |  |  |     @Autowired | 
 |  |  |     private SysTeamGroupClassService sysTeamGroupClassService; | 
 |  |  |     private Level3ManageService level3ManageService; | 
 |  |  |  | 
 |  |  |     public void openDialog(DjJdgzNetworkLevel3 data, JFrame jFrame) { | 
 |  |  |         JFrame frame1 = new JFrame("三级网络图编辑"); | 
 |  |  | 
 |  |  |         JSpinner.DateEditor timeEditor = new JSpinner.DateEditor(timeSpinner, "yyyy-MM-dd"); | 
 |  |  |         timeSpinner.setEditor(timeEditor); | 
 |  |  |  | 
 |  |  |         //JButton btnInsert = new JButton("新增"); | 
 |  |  |         JButton btnUpdate = new JButton("修改设备信息"); | 
 |  |  |         JButton btnSave = new JButton("保存数据"); | 
 |  |  |         //topJpanel.add(btnInsert); | 
 |  |  |         topJpanel.add(btnUpdate); | 
 |  |  |         topJpanel.add(btnSave); | 
 |  |  |  | 
 |  |  |         // 创建子表格 | 
 |  |  | 
 |  |  |         btnSave.addActionListener(new ActionListener() { | 
 |  |  |             @Override | 
 |  |  |             public void actionPerformed(ActionEvent e) { | 
 |  |  |                 SysUser user = (SysUser) UserAndSiteUtils.get("user", "user"); | 
 |  |  |                 if (user == null) { | 
 |  |  |                     JOptionPane.showMessageDialog(null, "用户失效请退出并重新登录", "提示", JOptionPane.WARNING_MESSAGE); | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 if (subTable.isEditing()) { | 
 |  |  |                     subTable.getCellEditor().stopCellEditing(); | 
 |  |  |                 } | 
 |  |  |                 CommonTable.saveTableList(finalList, subTable, columnDto); | 
 |  |  |                 level3ListService.save(finalList, data.getId(), diagram, finalGraph1); | 
 |  |  |                 JOptionPane.showMessageDialog(null, "保存成功", "提示", JOptionPane.WARNING_MESSAGE); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |         btnUpdate.addActionListener(new ActionListener() { | 
 |  |  |             @Override | 
 |  |  |             public void actionPerformed(ActionEvent e) { | 
 |  |  |                 SysUser user = (SysUser) UserAndSiteUtils.get("user", "user"); | 
 |  |  |                 if (user == null) { | 
 |  |  |                     JOptionPane.showMessageDialog(null, "用户失效请退出并重新登录", "提示", JOptionPane.WARNING_MESSAGE); | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |                 level3ManageService.insert(jFrame,data); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |  |