EKP qhky 流程启接口addReview 支持明细表地址本传递多值

 

问题描述:  流程启动接口(addReview),给第一行多人员地址本字段  传多个部门,后台代码解析不成功

 

 

 

 

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
    /**
     *
     *  20230703定制处理附件列表问题sjx
     *
     * **/
 
 
    for (int i = 0; i < attForms.size(); i++) {
        String fdKey = attForms.get(i).getFdKey();
        if (StringUtil.isNotNull(fdKey)) {
            if (fdKey.indexOf("liebiao") != -1) {
                fdKey = fdKey.replace("liebiao", "");
                String uuid = UUID.randomUUID().toString().replace("-", "");
                attForms.get(i).setFdKey(uuid);
                ArrayList<HashMap> o = (ArrayList<HashMap>) kmReviewMain.getExtendDataFormInfo().getFormData().get("fd_3be5996b465510");
                HashMap hashMap = o.get(i);
                hashMap.put(fdKey, uuid);
            }
        }
    }
 
    /**
     *
     *  -------------------------------------------------------
     *
     * **/
 
 
    if (formData.get("fd_3c61c27c02d270") != null) {
        ArrayList<HashMap> hashMapArrayList = (ArrayList<HashMap>) kmReviewMain.getExtendDataFormInfo().getFormData().get("fd_3c61c27c02d270");
        setHgjhDetailValue(hashMapArrayList);
}

  

 

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
public ArrayList<HashMap> setHgjhDetailValue(ArrayList<HashMap> hashMapArrayList) {
 
    try {
        String ids = "";
        String names = "";
        boolean flag = false;
        String filedId = "";
        String type = "";
        String fd_reform_dept = "fd_reform_dept";
        String fd_reform_person = "fd_reform_person";
        String fd_reform_comper_dept = "fd_reform_comper_dept";
        String fd_reform_comper_person = "fd_reform_comper_person";
        String fd_reform_charge_person = "fd_reform_charge_person";
 
        Iterator<HashMap> iterator = hashMapArrayList.iterator();
        while (iterator.hasNext()) {
            HashMap map = iterator.next();
            HashMap copyMap = new HashMap();
            for (Object key : map.keySet()) {
 
                if (fd_reform_dept.equals(key)) {
                    filedId = "fd_3c61c32da39346";
                    type = "dept";
                    flag = true;
                } else if (fd_reform_person.equals(key)) {
                    filedId = "fd_3c61c3302ef18c";
                    type = "person";
                    flag = true;
                } else if (fd_reform_comper_dept.equals(key)) {
                    filedId = "fd_3c61c335032fd6";
                    type = "dept";
                    flag = true;
                } else if (fd_reform_comper_person.equals(key)) {
                    filedId = "fd_3c61c3380d46e6";
                    type = "person";
                    flag = true;
                } else if (fd_reform_charge_person.equals(key)) {
                    filedId = "fd_3c61c341e0b57a";
                    type = "person";
                    flag = true;
                }
 
                if (flag) {
                    ids = (String) map.get(key);
                    names = getOrgOrPostName(ids, type);
                    HashMap reform = new HashMap();
                    if (StringUtil.isNotNull(ids)) {
                        reform.put("id", ids);
                        reform.put("name", names);
                        copyMap.put(filedId, reform);
                    }
                }
            }
 
            for (Object key : copyMap.keySet()) {
                map.put(key, copyMap.get(key));
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}
 
public String getOrgOrPostName(String ids, String type) {
    StringBuilder strBuild = null;
    try {
        String[] arr = ids.split(";");
        strBuild = new StringBuilder();
        for (String s : arr) {
            String value = "";
            if ("dept".equals(type)) {
                System.out.println(s);
                SysOrgDept sysOrgDept = (SysOrgDept) getSysOrgDeptService().findByPrimaryKey(s, null, true);
                if (sysOrgDept != null) {
                    value = sysOrgDept.getFdName();
                }
            } else {
                SysOrgElement sysOrgElement = (SysOrgElement) getSysOrgElementService().findByPrimaryKey(s, null, true);
                if (sysOrgElement != null) {
                    value = sysOrgElement.getFdName();
                }
            }
            if (StringUtil.isNotNull(value)) {
                if (strBuild.length() == 0) {
                    strBuild.append(value);
                } else {
                    strBuild.append(";" + value);
                }
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return strBuild.toString();
}

  

 

posted @   CrushGirl  阅读(84)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效
历史上的今天:
2021-12-25 Android RK 内置应用 不可卸载
2020-12-25 RK: RK3288 红外遥控器增加已有按键
2020-12-25 Android init.rc
点击右上角即可分享
微信分享提示