| | |
| | | import com.example.server.cabin.service.CabinService; |
| | | import com.example.server.progressTrack.Dto.TableNodeDto; |
| | | import com.example.server.progressTrack.model.DjJdgzShip; |
| | | import com.example.server.progressTrack.model.DjJdgzTrackRecord; |
| | | import com.example.server.progressTrack.service.*; |
| | | import com.example.server.teamGroup.service.SysTeamGroupClassService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | private DjJdgzNetworkLevel3Service level3Service; |
| | | @Autowired |
| | | private DjJdgzShipService djJdgzShipService; |
| | | @Autowired |
| | | private DjJdgzTrackRecordService djJdgzTrackRecordService; |
| | | @Autowired |
| | | private SysTeamGroupClassService sysTeamGroupClassService; |
| | | @Autowired |
| | |
| | | MouseMotionListener mouseMotionListener = new MouseMotionListener() { |
| | | @Override |
| | | public void mouseDragged(MouseEvent e) { |
| | | // 不需要处理鼠标拖动事件 |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void mouseMoved(MouseEvent e) { |
| | |
| | | } |
| | | } |
| | | }; |
| | | MouseAdapter mouseAdapter = new MouseAdapter(){ |
| | | @Override |
| | | public void mouseClicked(MouseEvent e) { |
| | | // if (historyCalled[0]) return; |
| | | // 获取点击的行和列 |
| | | int row = table.rowAtPoint(e.getPoint()); |
| | | |
| | | // 检查是否点击了有效单元格 |
| | | if (row >= 0) { |
| | | Long id = list.get(row).getNetworkId(); |
| | | if (id != null) { |
| | | getRecordById(frame,id); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | | |
| | | table.addMouseMotionListener(mouseMotionListener); |
| | | table.addMouseListener(mouseAdapter); |
| | | |
| | | comboBox.addItemListener(new ItemListener() { |
| | | public void itemStateChanged(final ItemEvent event) { |
| | |
| | | return panel; |
| | | } |
| | | |
| | | private void getRecordById(JFrame jFrame, Long id) { |
| | | jFrame.setEnabled(false); |
| | | JFrame frame1 = new JFrame("跟踪记录"); |
| | | frame1.setSize(2000, 800); |
| | | frame1.setResizable(true); |
| | | frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); |
| | | frame1.setLocationRelativeTo(null); |
| | | frame1.addWindowListener(new WindowAdapter() { |
| | | //添加第二个界面的关闭事件: |
| | | public void windowClosing(WindowEvent e) { |
| | | //添加事件: |
| | | jFrame.setEnabled(true);//将主界面再设置为可操作的 |
| | | } |
| | | }); |
| | | |
| | | List<ColumnDto> columnDto = new ArrayList<>(); |
| | | List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getRecordById(id); |
| | | JComboBoxItem[] trackList = { |
| | | new JComboBoxItem(0L, "线下"), |
| | | new JComboBoxItem(1L, "电话"), |
| | | }; |
| | | |
| | | JComboBoxItem[] statusList = { |
| | | new JComboBoxItem(0L, "进行中"), |
| | | new JComboBoxItem(1L, "已完成"), |
| | | }; |
| | | JComboBoxItem[] hasDelayRiskList = { |
| | | new JComboBoxItem(0L, "无"), |
| | | new JComboBoxItem(1L, "有"), |
| | | }; |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", 80, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("节点名称", "processName", 120, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("跟踪方式", "trackMethod", 120, "dict", false, null, trackList)); |
| | | columnDto.add(new ColumnDto("跟踪地点", "trackLocation", 120, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("助修人", "trackPerson", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("厂方", "trackedPerson", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("总承修单位", "generalRepair", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("分承修单位", "repair", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("节点进展", "currentStatus", 120, "dict", false, null, statusList)); |
| | | columnDto.add(new ColumnDto("脱期风险", "hasDelayRisk", 120, "dict", false, null, hasDelayRiskList)); |
| | | columnDto.add(new ColumnDto("预计完成时间", "estimatedCompletionTime", 200, "selectDate", false, null, null)); |
| | | columnDto.add(new ColumnDto("存在问题", "problem", 160, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("后续计划", "followupPlan", 160, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("备注", "remark", 160, null, false, null, null)); |
| | | |
| | | JTable subTable = CommonTable.createCommonTable(list, columnDto); |
| | | subTable.setRowHeight(25); |
| | | subTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); |
| | | JScrollPane scrollPane = new JScrollPane(subTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); |
| | | scrollPane.setViewportView(subTable); |
| | | scrollPane.getViewport().setBackground(Color.WHITE); |
| | | //scrollPane.setPreferredSize(new Dimension(width - 20, height - 100)); |
| | | |
| | | frame1.add(scrollPane); |
| | | frame1.setVisible(true); |
| | | |
| | | } |
| | | |
| | | private void export(JFrame jFrame) { |
| | | JFrame frame1 = new JFrame("导出三级网络图状态"); |
| | | frame1.setSize(300, 400); |
| | |
| | | new JComboBoxItem(1L, "有"), |
| | | }; |
| | | |
| | | columnDto.add(new ColumnDto("序号", "", 50, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("跟踪方式", "trackMethod", 80, "dict", false, null, trackList)); |
| | | columnDto.add(new ColumnDto("序号", "", 80, "autoCreate", false, null, null)); |
| | | columnDto.add(new ColumnDto("跟踪方式", "trackMethod", 120, "dict", false, null, trackList)); |
| | | columnDto.add(new ColumnDto("跟踪地点", "trackLocation", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("助修人及其联系方式", "trackPerson", 200, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("厂方及其联系方式", "trackedPerson", 200, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("总承修单位", "generalRepair", 160, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("分承修单位", "repair", 160, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("助修人", "trackPerson", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("厂方", "trackedPerson", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("总承修单位", "generalRepair", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("分承修单位", "repair", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("节点进展", "currentStatus", 120, "dict", false, null, statusList)); |
| | | columnDto.add(new ColumnDto("有无脱期风险", "hasDelayRisk", 70, "dict", false, null, hasDelayRiskList)); |
| | | columnDto.add(new ColumnDto("预计完成时间", "estimatedCompletionTime", 220, "selectDate", false, null, null)); |
| | | columnDto.add(new ColumnDto("存在问题", "problem", 200, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("后续计划", "followupPlan", 200, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("备注", "remark", 200, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("脱期风险", "hasDelayRisk", 120, "dict", false, null, hasDelayRiskList)); |
| | | columnDto.add(new ColumnDto("预计完成时间", "estimatedCompletionTime", 200, "selectDate", false, null, null)); |
| | | columnDto.add(new ColumnDto("存在问题", "problem", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("后续计划", "followupPlan", 180, null, false, null, null)); |
| | | columnDto.add(new ColumnDto("备注", "remark", 180, null, false, null, null)); |
| | | |
| | | JTable subTable = CommonTable.createCommonTable(list, columnDto); |
| | | subTable.setRowHeight(25); |
| | |
| | | List<DjJdgzTrackRecord> getName(Long level3NetworkId); |
| | | |
| | | DjJdgzNetworkLevel3List isExistTrackRecord(Integer sort, Long level3NetworkId); |
| | | |
| | | List<DjJdgzTrackRecord> getRecordById(Long id); |
| | | } |
| | |
| | | public List<DjJdgzTrackRecord> getName(Long level3NetworkId) { |
| | | return baseDao.getName(level3NetworkId); |
| | | } |
| | | |
| | | public List<DjJdgzTrackRecord> getRecordById(Long id) { |
| | | return baseDao.getRecordById(id); |
| | | } |
| | | } |
| | |
| | | order by a.sort |
| | | limit 1 |
| | | </select> |
| | | <select id="getRecordById" resultType="com.example.server.progressTrack.model.DjJdgzTrackRecord"> |
| | | select GENERAL_REPAIR_UNIT || ',' || GENERAL_REPAIR_UNIT_DIRECTOR || ',' || |
| | | GENERAL_REPAIR_UNIT_CONTACT AS generalRepair, |
| | | REPAIR_UNIT || ',' || REPAIR_UNIT_DIRECTOR || ',' || REPAIR_UNIT_CONTACT AS `repair`, |
| | | track_person || ',' || track_person_unit || ',' || track_person_contact AS trackPerson, |
| | | tracked_person || ',' || tracked_person_unit || ',' || tracked_person_contact AS trackedPerson, |
| | | track_method, |
| | | track_location, |
| | | CURRENT_STATUS, |
| | | has_delay_risk, |
| | | estimated_completion_time, |
| | | problem, |
| | | followup_plan, |
| | | remark, |
| | | process_name |
| | | from dj_jdgz_track_record |
| | | where level3_network_id = ${id} |
| | | and is_delete = 0 |
| | | </select> |
| | | |
| | | </mapper> |