fff
xiejun
2024-01-05 81c8a849ed4e57141e29c62d9b3a1ffc605ece44
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
package com.vci.rmip.code.client.codeapply.Apply410;
 
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
 
public class TestIntegrateFrame {
    public static JButton apply = new JButton();
    public static JTextField text = new JTextField();
    public static void main(String[] args) {
 
        List<Integer> list=new ArrayList<>();
        list.add(1);
        list.add(5);
        list.add(6);
        list.add(3);
        list.add(2);
        list.add(4);
        List<Integer> classifyVOS =list.stream().sorted(((o1, o2) -> o2.compareTo(o1))).collect(Collectors.toList());
        int level=1;
        int tt=1;
        if (classifyVOS.size() >= level && level > 0) {
            tt = classifyVOS.get(level - 1);
        }
 
        final JFrame j = new JFrame();
        j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel p = new JPanel();
        j.setSize(200, 200);
        apply.setText("test");
        apply.setSize(80, 25);
        text.setPreferredSize(new Dimension(100,25));
        p.add(text);
        p.add(apply);
        j.add(p);
        j.setLocation(new Point(500,300));
        j.setVisible(true);
        apply.addActionListener(new ActionListener() {
 
            public void actionPerformed(ActionEvent e) {
 
 
 
 
                Map<String, String> map = new HashMap<String, String>();
//                map.put("原材料替换件", "YUANCAILIAOTIHUANJIAN");
//                map.put("原材料部件", "1");
//                map.put("简易示波器", "");
                map.put("", "YCL");
                String clsfName = "交付产品";
                String deptName = "";
                String [] fields=new String[]{"groupcode"};//属性内部字段
                String [] values=new String[]{"000002"};//属性值
                //CodeApplyFor410Dialog dialog = new CodeApplyFor410Dialog(j, clsfName,deptName);
                CodeApplyFor410Dialog dialog = new CodeApplyFor410Dialog(j, clsfName,deptName,fields,values);
                String code = dialog.getCodeValue();// 获取集团码/企业码
                dialog.getAttributeValue("mi");//获取相关返回属性
                text.setText(code + "_" + dialog.getAttributeValue("name"));
                System.out.println("code:---"+code+"---");
            }
        });
    }
}