| | |
| | | import com.example.client.utils.CommonTable; |
| | | import com.example.client.utils.GBC; |
| | | import com.example.client.utils.UploadFile; |
| | | import com.example.server.progressTrack.model.DjJdgzDismantTrack; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel3; |
| | | import com.example.server.progressTrack.model.DjJdgzNetworkLevel3List; |
| | | import com.example.server.progressTrack.model.DjJdgzTrackRecord; |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3ListService; |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service; |
| | | import com.example.server.progressTrack.service.DjJdgzTrackRecordService; |
| | | import com.example.server.progressTrack.service.NetWorkDiagramService; |
| | | import com.example.server.progressTrack.service.*; |
| | | import com.example.server.sysOss.model.SysOss; |
| | | import com.example.server.teamGroup.service.SysTeamGroupClassService; |
| | | import com.example.server.user.model.SysUser; |
| | |
| | | private TrackRecordManageService trackRecordManageService; |
| | | @Autowired |
| | | private UploadFile uploadFile; |
| | | @Autowired |
| | | private DjJdgzDismantTrackService djJdgzDismantTrackService; |
| | | |
| | | public void openDialog(DjJdgzTrackRecord data, JFrame jFrame, Long level1Id, List<ColumnDto> columnDto, JTable table) { |
| | | JFrame frame1 = new JFrame("跟踪记录"); |
| | | JFrame frame1 = new JFrame(data.getLevel3NetworkName() + "跟踪记录"); |
| | | frame1.setSize(1200, 800); |
| | | frame1.setResizable(false); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | |
| | | hasDelayRiskMap.put(0, "无"); |
| | | |
| | | JComboBoxItem[] trackList = { |
| | | new JComboBoxItem(0, "线下"), |
| | | new JComboBoxItem(1, "电话"), |
| | | new JComboBoxItem(0L, "线下"), |
| | | new JComboBoxItem(1L, "电话"), |
| | | }; |
| | | |
| | | JComboBoxItem[] statusList = { |
| | | new JComboBoxItem(0, "进行中"), |
| | | new JComboBoxItem(1, "已完成"), |
| | | new JComboBoxItem(0L, "进行中"), |
| | | new JComboBoxItem(1L, "已完成"), |
| | | }; |
| | | JComboBoxItem[] hasDelayRiskList = { |
| | | new JComboBoxItem(0, "无"), |
| | | new JComboBoxItem(1, "有"), |
| | | new JComboBoxItem(0L, "无"), |
| | | new JComboBoxItem(1L, "有"), |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("当前节点"); |
| | |
| | | JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(statusList); |
| | | comboBox1.setPreferredSize(new Dimension(185, 28)); |
| | | if (data.getCurrentStatus() != null) { |
| | | comboBox0.setSelectedItem(new JComboBoxItem(data.getCurrentStatus(), statusMap.get(data.getCurrentStatus()))); |
| | | comboBox0.setSelectedItem(new JComboBoxItem(data.getCurrentStatus().longValue(), statusMap.get(data.getCurrentStatus()))); |
| | | } |
| | | |
| | | |
| | |
| | | JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(hasDelayRiskList); |
| | | comboBox2.setPreferredSize(new Dimension(185, 28)); |
| | | if (data.getHasDelayRisk() != null) { |
| | | comboBox0.setSelectedItem(new JComboBoxItem(data.getHasDelayRisk(), hasDelayRiskMap.get(data.getHasDelayRisk()))); |
| | | comboBox0.setSelectedItem(new JComboBoxItem(data.getHasDelayRisk().longValue(), hasDelayRiskMap.get(data.getHasDelayRisk()))); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | JLabel JLabel19 = new JLabel("附件"); |
| | | SysOss oss = new SysOss(); |
| | | if (data.getId()!=null){ |
| | | if (data.getId() != null) { |
| | | oss.setBusiId(data.getId()); |
| | | } |
| | | oss.setBusiType("ProjectProgressFileUpload"); |
| | |
| | | oss.setBusiFieldName("项目进度文件"); |
| | | oss.setStatus(1); |
| | | oss.setChannel("local"); |
| | | JPanel jPanel = uploadFile.uploadFile(jFrame,500,220,oss); |
| | | JPanel jPanel = uploadFile.uploadFile(jFrame, 500, 220, oss); |
| | | JButton saveButton = new JButton("保存"); |
| | | |
| | | frame1.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); |
| | |
| | | public void actionPerformed(ActionEvent e) { |
| | | SysUser user = (SysUser) CacheUtils.get("user", "user"); |
| | | DjJdgzNetworkLevel3 level3 = djJdgzNetworkLevel3Service.get(data.getLevel3NetworkId()); |
| | | if (user.getTeamgroup()!=null && !user.getTeamgroup().equals(level3.getTeamgroupId())){ |
| | | JOptionPane.showMessageDialog(null, "不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | if (user.getTeamgroup() != null && !user.getTeamgroup().equals(level3.getTeamgroupId().toString())) { |
| | | JOptionPane.showMessageDialog(null, "当前用户不可操作其他专业数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | |
| | | JComboBoxItem trackMethod = (JComboBoxItem) comboBox0.getSelectedItem(); |
| | | JComboBoxItem currentStatus = (JComboBoxItem) comboBox1.getSelectedItem(); |
| | | JComboBoxItem hasDelayRisk = (JComboBoxItem) comboBox2.getSelectedItem(); |
| | | List<DjJdgzDismantTrack> list1 = djJdgzDismantTrackService.getList(data.getLevel3NetworkId(), null); |
| | | if (data.getProcessName().equals("设备拆卸出舱") && currentStatus.getId() == 1 && list1 != null && list1.size() > 0) { |
| | | Boolean status = djJdgzDismantTrackService.getStatus(data.getLevel3NetworkId()); |
| | | if (!status) { |
| | | JOptionPane.showMessageDialog(null, "有未完成的子部件", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | data.setTrackMethod(Math.toIntExact(trackMethod.getId())); |
| | | data.setProcessName(data.getLevel3NodeName()); |
| | | data.setTrackLocation(trackLocatDesc.getText()); |
| | |
| | | data.setRemark(remark.getText()); |
| | | Long id = djJdgzTrackRecordService.save(data); |
| | | uploadFile.save(id); |
| | | List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(level1Id,0); |
| | | CommonTable.refreshTable(list,columnDto,table); |
| | | trackRecordManageService.tableModelListener(table,jFrame); |
| | | List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getList(level1Id, 0); |
| | | CommonTable.refreshTable(list, columnDto, table); |
| | | trackRecordManageService.tableModelListener(table, jFrame, list); |
| | | frame1.dispose(); |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |