田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
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
package com.vci.client.workflow.task;
 
import com.vci.corba.workflow.data.FlowTaskInfo;
 
public class DoneProcessTableModel extends TodoTaskTableModel {
 
    private static final long serialVersionUID = 7508852076471337286L;
 
    public DoneProcessTableModel(){
        super();
        
        String[] oldColumns = new String[] { "", "任务名称","创建人","创建人部门","创建时间"};
        
        // 在最后添加
        String[] newColumns = new String[oldColumns.length + 1];
        System.arraycopy(oldColumns, 0, newColumns, 0, oldColumns.length);
        newColumns[newColumns.length - 1] = "结束时间";
 
        columnIdentifiers = newColumns;
    }
    
    @Override
    public Object getValueAt(int rowIndex, int column) {
        Object res = getValueAts(rowIndex, column);
        if(column == columnIdentifiers.length - 1){
            if (data != null && rowIndex < data.length && data.length > 0) {
                FlowTaskInfo flowHistoryTaskInfo = data[rowIndex];
                res = flowHistoryTaskInfo.endTime;
            }
        }
        return res;
    }
    public Object getValueAts(int rowIndex, int column) {
        Object res = null;
        if (data != null && rowIndex < data.length && data.length > 0) {
            FlowTaskInfo flowTask = data[rowIndex];
            switch (column) {
            case 0:
                res =  (rowIndex + 1);
                break;
            case 1:
                res =  flowTask.desc;
                break;
            case 2:
                res =  flowTask.applyPerson;
                break;
            case 3:
                res =  flowTask.applyDeparment;
                break;
//            case 4:
//                res =  flowTask.name;
//                break;
            case 4:
                res = flowTask.createTime;
            default:
                break;
            }
        }
        return res;
    }
}