田源
2025-01-15 78fa1f005a9ec2581611e53d7eba8efeacb4df6e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
package com.vci.client.workflow.task;
 
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.MessageFormat;
import java.util.LinkedHashMap;
 
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableColumnModel;
 
import com.vci.client.LogonApplication;
import com.vci.client.framework.rightConfig.object.FunctionObject;
import com.vci.client.logon.client.VciFrameTimerTask;
import com.vci.client.ui.exception.VCIException;
import com.vci.client.ui.image.BundleImage;
import com.vci.client.ui.locale.LocaleDisplay;
import com.vci.client.ui.swing.VCIOptionPane;
import com.vci.client.ui.swing.VCISwingUtil;
import com.vci.client.ui.swing.components.VCIJButton;
import com.vci.client.ui.swing.components.VCIJCalendarPanel;
import com.vci.client.workflow.commom.ClientHelper;
import com.vci.client.workflow.delegate.ProcessCustomClientDelegate;
import com.vci.client.workflow.editor.user.FowardUserDialog;
import com.vci.corba.common.VCIError;
import com.vci.corba.workflow.data.FlowTaskInfo;
import com.vci.corba.workflow.data.ProcessTaskInfo;
 
public class TodoTaskPanel extends JPanel {
 
    /**
     * 待办任务
     */
    //查询日期:由
    private String DATE_START = LocaleDisplay.getI18nString("rmip.framework.log.startDate", "RMIPFramework", getLocale());
    //到
    private String TO = LocaleDisplay.getI18nString("rmip.framework.log.to", "RMIPFramework", getLocale());
    //查询
    private String QUERY = LocaleDisplay.getI18nString("rmip.framework.log.query", "RMIPFramework", getLocale());
    
    private JLabel dateLabelStart = new JLabel(DATE_START);
    private JLabel dateLabelTo = new JLabel(TO);
    private JComboBox startDateBox = new JComboBox();
    private JComboBox endDateBox = new JComboBox();
    private JButton queryBtn = new JButton("查询");
    private JButton clearBtn = new JButton("清空");
    private JLabel missionJLabel = new JLabel("任务名称:");
    private JTextField missionField = new JTextField();
    private JLabel applicaJLabel = new JLabel("创建人:");
    private JTextField applicaField = new JTextField();
    private JLabel applicaDepartJLabel = new JLabel("创建部门:");
    private JTextField applicaDeparField = new JTextField();
    private static final long serialVersionUID = 1L;
    private VCIJButton btnRefresh = VCISwingUtil.createVCIJButton("", "刷新", "刷新", "arrow_refresh.png");
    private JButton btnNewButton = VCISwingUtil.createVCIJButton("", getI18nString("btnView"), getI18nString("btnView"), "edit.png");
    private JPanel todoTasksPanel;
    private JTable toDoTasksTable;
    private TodoTaskTableModel todoTaskTableModel;
    private VCIJCalendarPanel txtStartTime = new VCIJCalendarPanel();
    private VCIJCalendarPanel txtEndTime = new VCIJCalendarPanel();
    
    //added by ligang 分页功能的实现
    private JButton firstPageButton = null;
    private JButton prePageButton = null;
    private JButton nextPageButton = null;
    private JButton lastPageButton = null;
    private JTextField textField = null;
    private JButton zhidingPageButton = null;
    int pagesize = getPageSize();//每页记录数
    int pageCount = 0;//总页数
    int rowCount = 0;//总记录数
    int curPage = 1;
    int TABLE_PAGE = 1;//当前页数
    private String[] showDataIds = {};//重点显示的数据表示
    private JLabel laber_pageinfo = new JLabel(getI18nString("pageInfo"));//当前页/总页数
 
    private static TodoTaskPanel todoTaskPanel;
    LinkedHashMap<String, Integer> dataMap = new LinkedHashMap<String, Integer>();//key-value:taskId-rowIndex 
    //转发
    private JButton btnForward;
    
    /**
     * 任务箱参数
     */
    private String taskType ="";
    private String querySQL = "";
    FunctionObject funcObject = new FunctionObject();
    public static TodoTaskPanel getInstance(FunctionObject funcObject,String taskType) {
        if (todoTaskPanel == null) {
            todoTaskPanel = new TodoTaskPanel(taskType);
        }
        return todoTaskPanel;
    }
 
    private TodoTaskPanel(String taskType) {
        this.taskType = taskType;
        initUI();
        initializeData();
        //2012.04.26 ligang 去除任务箱权限校验,所有人都有操作权限
//        checkPermission() ;
    }
    /** 权限检查的模块标识 **/ 
    private String checkPermissionModuleId = "com.vci.rmip.workflow.client.task.TodoTaskPanel";
 
    @SuppressWarnings("unchecked")
    private void checkPermission() {
    }
    private void initUI() {
        setLayout(new BorderLayout());
        JPanel topPanel = new JPanel(new BorderLayout());
        JPanel palNorthBtn = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));
        btnNewButton = new JButton(getI18nString("btnView"));
        btnNewButton.setIcon(VCISwingUtil.createImageIcon("edit.png"));
        btnForward = new JButton("转发");
        palNorthBtn.add(btnNewButton);
        palNorthBtn.add(btnRefresh);
        btnRefresh.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        initializeData();
                    }
                });
            }
        });
        JPanel searchPanel = new JPanel(new FlowLayout(FlowLayout.LEFT,5,5));
        searchPanel.add(missionJLabel);
        missionField.setPreferredSize(new Dimension(100,25));
        searchPanel.add(missionField);
        searchPanel.add(applicaJLabel);
        applicaField.setPreferredSize(new Dimension(100,25));
        searchPanel.add(applicaField);
        searchPanel.add(applicaDepartJLabel);
        applicaDeparField.setPreferredSize(new Dimension(100,25));
        searchPanel.add(applicaDeparField);
        JPanel dataPanel = new JPanel(new FlowLayout(FlowLayout.LEFT,5,5));
        dataPanel.add(dateLabelStart);
        dataPanel.add(txtStartTime);
        dataPanel.add(dateLabelTo);
        dataPanel.add(txtEndTime);
        queryBtn.setIcon(VCISwingUtil.createImageIcon("search.png"));
        clearBtn.setIcon(VCISwingUtil.createImageIcon("clear.gif"));
        dataPanel.add(queryBtn);
        queryBtn.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        queryBtn_ActionPerformed();
                    }
                });
            }
        });
        dataPanel.add(clearBtn);
        clearBtn.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        clearBtn_ActionPerformed();
                    }
                });
            }
        });
        topPanel.add(searchPanel,BorderLayout.NORTH);
        topPanel.add(dataPanel,BorderLayout.CENTER);
        add(topPanel, BorderLayout.NORTH);
        todoTaskTableModel = new TodoTaskTableModel();
        toDoTasksTable = new JTable();
        toDoTasksTable.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
        toDoTasksTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        toDoTasksTable.setModel(todoTaskTableModel);
        toDoTasksTable.setRowHeight(25);
        toDoTasksTable.setShowGrid(true);
        toDoTasksTable.getTableHeader().setFont(VCISwingUtil.FONT_DEFAULT);
        toDoTasksTable.addMouseListener(new MouseAdapter(){
            public void mouseClicked(MouseEvent e) {
                if(e.getClickCount()==2){
                    viewFlowInfo();
                }
            }
        });
        TableColumnModel todoModel = toDoTasksTable.getColumnModel();
        DefaultTableCellRenderer firstColumnRender = new DefaultTableCellRenderer();
        firstColumnRender.setHorizontalAlignment(JLabel.CENTER);
        todoModel.getColumn(0).setCellRenderer(firstColumnRender);
        todoModel.getColumn(0).setPreferredWidth(48);
        todoModel.getColumn(0).setMaxWidth(48);
        todoModel.getColumn(2).setPreferredWidth(150);
        todoModel.getColumn(4).setWidth(150);
        JScrollPane jspTable = new JScrollPane();
        jspTable.getViewport().add(toDoTasksTable);
        add(jspTable, BorderLayout.CENTER);
        
        JPanel palPageBtns = new JPanel();
        JPanel southPanel = new JPanel(new BorderLayout());
        southPanel.add(palNorthBtn,BorderLayout.NORTH);
        southPanel.add(palPageBtns,BorderLayout.CENTER);
        add(southPanel, BorderLayout.SOUTH);
        initPageerButtons(palPageBtns);
 
        addListener();
    }
 
    private void addListener() {
        btnNewButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                viewFlowInfo();
 
            }
        });
        btnForward.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                foward();
                
            }
        });
    }
 
    public void initData() {
 
        FlowTaskInfo[] dataObjs;
        try {
            dataObjs = new ProcessCustomClientDelegate(LogonApplication.getUserEntityObject()).getTodoTaskByUserId(LogonApplication.getUserObject().getUserName(),curPage,pagesize,taskType,querySQL);
            todoTaskTableModel.setData(dataObjs);
            int index = 0;
            for(FlowTaskInfo info : dataObjs){
                String id = info.executionId;
                if(info.executionId.lastIndexOf(".") > 0){
                    id = info.executionId.substring(info.executionId.lastIndexOf(".") + 1);
                }
                dataMap.put(id,index++);
            }
            setDataMap(dataMap);
        } catch (VCIError e) {
            e.printStackTrace();
        }
        updateUI();
    }
 
    /**
     * 
     * <p>设置table特殊数据行的显示样式: </p>
     * 
     * @time 2013-4-10
     */
    public void setTableToSelect(){
            if(dataMap.size()>0){
                final Integer[] rowIndexArray = getAllRow(dataMap);
                int cols = toDoTasksTable.getColumnModel().getColumnCount();
                for(int i = 0; i < cols; i++){
                    toDoTasksTable.getColumnModel().getColumn(i).setCellRenderer(new DefaultTableCellRenderer(){
                        public Component getTableCellRendererComponent(JTable table, Object value,
                                    boolean isSelected, boolean hasFocus, 
                                    int row, int column){
                             Component compt = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                             for(Integer i : rowIndexArray){
                                 if(i == row){
                                     if(!isSelected){
                                         compt.setForeground(Color.RED);
                                     } else{
                                         compt.setForeground(Color.WHITE);
                                     }
                                     compt.setFont(new Font("宋体", Font.BOLD, 12));
                                 } else {
                                     if(!isSelected){
                                         compt.setForeground(Color.BLACK);
                                     } else{
                                         compt.setForeground(Color.WHITE);
                                     }
                                 }
                             }
                             return compt;
                         }
                    });
                }
                updateUI();
            }
    }
    
    /**
     * 
     * <p>得到需要被特殊显示的数据行rowIndex, 并把这些rowIndex按照从小到大的顺序存放在数组中返回: </p>
     * 
     * @time 2013-4-10
     * @param map
     * @return
     */
    private Integer[]  getAllRow(LinkedHashMap<String, Integer>  map){
        String[] dataId = getShowDataIds();
        Integer[] rowIndex = new Integer[dataId.length];
        int index = 0;
        for(String id: dataId){
            rowIndex[index++] = map.get(id);
        }
        int temp,j,flag=1;
        for(int i = 0 ;i<rowIndex.length-1&&flag==1;i++){
            flag = 0;
            for(j=0;j<rowIndex.length-i-1;j++){
                temp = rowIndex[j];
                if(rowIndex[j+1]<rowIndex[j]){
                    rowIndex[j] = rowIndex[j+1];
                    rowIndex[j+1] = temp;
                    flag = 1;
                }
            }
        }
        return rowIndex;
    } 
    private void viewFlowInfo() {
        int selectedRow = toDoTasksTable.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(todoTasksPanel, getI18nString("message"), getI18nString("title"), JOptionPane.INFORMATION_MESSAGE);
            return;
        }
 
        FlowTaskInfo flowTask = todoTaskTableModel.getValue(selectedRow);
        if (flowTask == null) {
            return;
        }
        // 查出阶段名称
        ProcessCustomClientDelegate processCustomClientDelegate = new ProcessCustomClientDelegate();
 
        String jbpmDeploymentId;
        try {
            jbpmDeploymentId = processCustomClientDelegate.getDeploymentIdByExecutionId(flowTask.executionId);
            if ("".equals(jbpmDeploymentId)) {
                JOptionPane.showMessageDialog(todoTasksPanel, "该流程不存在或已经执行完成!", getI18nString("title"), JOptionPane.INFORMATION_MESSAGE);
                initData();
                return;
            }
            ProcessTaskInfo frocessTaskInfo = processCustomClientDelegate.findById(jbpmDeploymentId, flowTask.name);
            TodoTaskDialog todoTaskDialog = new TodoTaskDialog(flowTask, frocessTaskInfo, this);
            todoTaskDialog.setVisible(true);
            //处理代办任务之后,显示剩余任务数量。
            String currentUser = LocaleDisplay.getI18nString("rmip.framework.current.user", "RMIPFramework",this.getLocale());
            new VciFrameTimerTask(currentUser).displayTaskCount();
            initializeData();
        } catch (VCIError e) {
            e.printStackTrace();
        }
    }
    
    /**
     * 任务转发 
     */
    private void foward(){
        int selectedRow = toDoTasksTable.getSelectedRow();
        if (selectedRow == -1) {
            JOptionPane.showMessageDialog(todoTasksPanel, "请选择要转发的任务!", getI18nString("title"), JOptionPane.INFORMATION_MESSAGE);
            return;
        }
 
        FlowTaskInfo flowTask = todoTaskTableModel.getValue(selectedRow);
        if (flowTask == null) {
            return;
        }
        
        ProcessCustomClientDelegate processCustomClientDelegate = new ProcessCustomClientDelegate();
        String jbpmDeploymentId;
        try {
            jbpmDeploymentId = processCustomClientDelegate.getDeploymentIdByExecutionId(flowTask.executionId);
            if ("".equals(jbpmDeploymentId)) {
                JOptionPane.showMessageDialog(todoTasksPanel, "该流程不存在或已经执行完成!", getI18nString("title"), JOptionPane.INFORMATION_MESSAGE);
                initData();
                return;
            }
//            ProcessTaskInfo frocessTaskInfo = processCustomClientDelegate.findById(jbpmDeploymentId, flowTask.name);
            FowardUserDialog dialog = new FowardUserDialog(flowTask.executionId);
//            TodoTaskDialog todoTaskDialog = new TodoTaskDialog(flowTask, frocessTaskInfo);
//            todoTaskDialog.setVisible(true);
//            //处理代办任务之后,显示剩余任务数量。
//            String currentUser = LocaleDisplay.getI18nString("rmip.framework.current.user", "RMIPFramework",this.getLocale());
//            new VciFrameTimerTask(currentUser).displayTaskCount();
            initializeData();
        } catch (VCIError e) {
            e.printStackTrace();
        }
        
    }
    public void initializeData() {
        curPage = 1;
        rowCount = getRowCount();
        pageCount = getPageCount();
        initData();
        updateBtnStatus();
        laber_pageinfo.setText(MessageFormat.format(getI18nString("pageInfo"), rowCount, pageCount, curPage));
    }
    
    
    private void initPageerButtons(JPanel pal){
        
        firstPageButton = new JButton(""); 
        pal.add(firstPageButton);
        firstPageButton.setIcon(new BundleImage().createImageIcon("resultset_first.png"));
        
        prePageButton = new JButton(""); 
        pal.add(prePageButton);
        prePageButton.setIcon(new BundleImage().createImageIcon("resultset_previous.png"));
        
        textField = new JTextField(3);
        pal.add(textField);
        zhidingPageButton = new JButton();
        pal.add(zhidingPageButton);
        zhidingPageButton.setIcon(new BundleImage().createImageIcon("arrow_rotate_clockwise.png"));
        
        nextPageButton = new JButton("");
        pal.add(nextPageButton);  
        nextPageButton.setIcon(new BundleImage().createImageIcon("resultset_next.png"));
        
        lastPageButton = new JButton("");
        pal.add(lastPageButton);
        lastPageButton.setIcon(new BundleImage().createImageIcon("resultset_last.png"));
        
        firstPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                curPage = 1;
                initData();
                updateBtnStatus();
            }
        });
        prePageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(curPage > 1){
                    curPage--;
                }
                initData();
                updateBtnStatus();
            }
        });
        nextPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(curPage < getPageCount()){
                    curPage++;
                }
                initData();
                updateBtnStatus();
            }
        });
        lastPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                curPage = getPageCount();
                initData();
                updateBtnStatus();
            }
        });
        zhidingPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int i = getTextField();
                if(i != 0 ){
                    curPage = i;
                    initData();
                    updateBtnStatus();
                }
            }
        });
        pal.add(Box.createHorizontalStrut(30));
        pal.add(laber_pageinfo);
    }
    
    private int getPageSize() {
        if(this.pagesize == 0){
            String pageSize = "150";
//            try {
//                pageSize = new UserRightClientDelegate().getConfigValue("log.query.pagesize");
//            } catch (VCIError e) {
//                e.printStackTrace();
//            }
            int pageSizeGet = Integer.parseInt(pageSize);
            this.pagesize = pageSizeGet;
        }
        return pagesize;
    }
    
    private int getRowCount(){
        try {
            return new ProcessCustomClientDelegate(LogonApplication.getUserEntityObject()).queryTodoTaskCount(LogonApplication.getUserObject().getUserName(),taskType);
        } catch (VCIException e) {
            e.printStackTrace();
            return 1;
        }
    }
    private int getPageCount(){
        int dataRowCount = getRowCount();
        int pageSize = getPageSize();
        int pageCount = dataRowCount / pageSize;
        if (dataRowCount % pageSize > 0) {
            pageCount++;
        }
        return pageCount;
    }
    private void updateBtnStatus() {
        int rowCount = this.getRowCount();
        int pageSize = getPageSize();
        int pageCount = rowCount / pageSize;
        if (rowCount % pageSize > 0) {
            pageCount++;
        }
        if (pageCount <= 1) {
            firstPageButton.setEnabled(false);
            prePageButton.setEnabled(false);
            lastPageButton.setEnabled(false);
            nextPageButton.setEnabled(false);
        } else {
            if (curPage == 1) {
                firstPageButton.setEnabled(false);
                prePageButton.setEnabled(false);
                lastPageButton.setEnabled(true);
                nextPageButton.setEnabled(true);
            } else if (curPage >= pageCount) {
                firstPageButton.setEnabled(true);
                prePageButton.setEnabled(true);
                lastPageButton.setEnabled(false);
                nextPageButton.setEnabled(false);
            } else {
                firstPageButton.setEnabled(true);
                prePageButton.setEnabled(true);
                lastPageButton.setEnabled(true);
                nextPageButton.setEnabled(true);
            }
        }
        laber_pageinfo.setText(MessageFormat.format(getI18nString("pageInfo"), rowCount, pageCount, curPage));
    }
 
    private void queryBtn_ActionPerformed(){
        getDateTimeFilterString();
        initData();
        updateBtnStatus();
    }
    private void clearBtn_ActionPerformed(){
        txtStartTime.setDateString();
        txtEndTime.setDateString();
        missionField.setText("");
        applicaField.setText("");
        applicaDeparField.setText("");
        querySQL = "";
    }
    /**
     * 返回日期范围的过滤条件字符串
     * <p>Description: </p>
     * 
     * @author xchao
     * @time 2012-11-9
     * @return
     */
    public String getDateTimeFilterString(){
        String filterString = "";
        String startTime = txtStartTime.getDateString();//开始时间
        String endTime = txtEndTime.getDateString();//结束时间
        String mission = missionField.getText();//任务名称
        String application = applicaField.getText();//创建人
        String applicaDepar = applicaDeparField.getText();//创建人部门
        if(startTime == null || "".equals(startTime.trim())){
            startTime = "1900-01-01 00:00:00";
        } else {
            startTime = startTime.substring(0, 10) + " 00:00:00";
        }
        if(endTime == null || "".equals(endTime.trim())){
            endTime = "9900-12-30 23:59:59";
        } else {
            endTime = endTime.substring(0, 10) + " 23:59:59";
        }
        filterString = " AND " +
                "(" +
                "createTime >= TO_DATE('" + startTime + "','yyyy-MM-dd HH24:mi:ss')" + 
                " AND " +
                "createTime <= TO_DATE('" + endTime + "','yyyy-MM-dd HH24:mi:ss')";
        filterString +=    ")" +
        "";
        if(!"".equals(mission)){
            filterString += " AND PLDESC = '" + mission +"'";
        }
        if (!"".equals(application)){
            filterString += " AND plcreator like '%" + application +"%'";
        }
        if (!"".equals(applicaDepar)){
            filterString += "#"+applicaDepar;
        }
        
        querySQL = filterString;
        return querySQL;
    }
    
    public String[] getShowDataIds() {
        return showDataIds;
    }
    public void setShowDataIds(String[] showDataIds) {
        this.showDataIds = showDataIds;
    }
    public LinkedHashMap<String, Integer> getDataMap() {
        return dataMap;
    }
    public void setDataMap(LinkedHashMap<String, Integer> dataMap) {
        this.dataMap = dataMap;
    }
    private String getI18nString(String spCode) {
        return ClientHelper.getI18nStringForWorkflow(this.getClass().getName() + "." + spCode, this.getLocale());
    }
    private int getTextField(){
        int i = 0;//输入的页数
        int count = getPageCount();//总页数
        if(textField.getText() == ""){
            VCIOptionPane.showMessage(this, "请输入要跳转的页数");
            return i;
        }else {
            String field = textField.getText();
            if(!field.matches("^[0-9_]+$")) {
                VCIOptionPane.showMessage(this, "请输入数字");
                return i;        
            }else if(Integer.parseInt(field)>count){
                VCIOptionPane.showMessage(this, "输入的页数大于总页数");
                return i;    
            }else {
                i = Integer.parseInt(field);
                return i;
            }
        }
    }
    public String getTaskType() {
        return taskType;
    }
    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }
    public String getQuerySQL() {
        return querySQL;
    }
    public void setQuerySQL(String querySQL) {
        this.querySQL = querySQL;
    }
}