xinyb
2024-03-20 4885f794b55c8beb28d7f3d89dedee84f423145e
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
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
package com.yc.service.panel.v2;
 
import com.google.gson.JsonArray;
import com.yc.action.grid.GridUtils;
import com.yc.exception.ApplicationException;
import com.yc.service.BaseService;
import com.yc.service.grid.GridServiceIfc;
import com.yc.service.impl.DBHelper;
import com.yc.service.panel.GetDataTypeIfc;
import com.yc.service.panel.PanelParmHelper;
import com.yc.service.panel.SqlDBHelperIfc;
import com.yc.service.panel.SystemSettingsDao;
import com.yc.utils.EncodeUtil;
import com.yc.utils.JOSNUtils;
import com.yc.utils.Page;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.io.UnsupportedEncodingException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
 
/**
 * 生成控件显示在网页上的代码 原先在这段URL(http://的路径不再传进) 而URL真正得到信息是在生产JSP后运行才得到,保证这路径绝对正确
 *
 * @author pengbei
 *
 */
@Service("TypeControlV2")
public class TypeControl extends BaseService implements TypeControlDao {
    @Autowired
    SqlDBHelperIfc sqlDBHelperIfc;
    @Autowired
    SystemSettingsDao systemSettingsDao;
    @Autowired
    GetDataTypeIfc getDataTypeIfc;
    @Autowired
    private GridServiceIfc gridService;// 表格处理的业务类
 
    public  static  String  PANEL_INFO="panel_info";
    private String getFunctionParm(String st, String parms, Map<String, String> env) {
        parms = JOSNUtils.prossBase64(parms);
        if ("".equalsIgnoreCase(st))
            return "";
        if ("".equalsIgnoreCase(parms))
            return "";
        StringBuilder sb = new StringBuilder();
        String[] temp = st.split(";");// 函数后面列出的参数,有可能包括数字,字符及参数名称
        int i = 0;
        String[] temp1 = parms.split("\\band\\b");
        for (String str : temp) {
            if (str.matches("\\d")) {// 只是数字
                if (i != 0)
                    sb.append(",");
                sb.append(str);
                continue;
            }
            boolean fl = false;
            for (String ss : temp1) {
                int index = 0;
                String cv1 = "";
                String cv2 = "";
                try {
                    index = ss.indexOf("=");
                } catch (StringIndexOutOfBoundsException e) {
                    index = 0;
                }
                cv1 = ss.substring(0, index);
                cv2 = ss.substring(index + 1);
                if (str.trim().equalsIgnoreCase(cv1.replaceAll("\\s", ""))) {
                    if (i != 0)
                        sb.append(",");
                    sb.append("'null'".equalsIgnoreCase(cv2.replaceAll("\\s", "")) ? null : cv2);
                    i++;
                    fl = true;
                    break;
                } else if (str.indexOf("@") > -1) {// 需要从session取值
                    // @usercode|cltcode
                    String[] sts = str.split("=");
                    if (sts[1].trim().equalsIgnoreCase(cv1.replaceAll("\\s", ""))) {
                        if (i != 0)
                            sb.append(",");
                        sb.append("'" + env.get(sts[0]) + "'");
                        i++;
                        fl = true;
                        break;
                    }
                }
            }
            if (!fl) {
                if (i != 0)
                    sb.append(",");
                sb.append("'").append(str).append("'");
                i++;
            }
        }
        return sb.toString();
    }
 
    public Page loadAllByFunc(Page page, Map<String, String> env, boolean flg, String statisID, int formID) {
 
        String newTbCols="";
        if(StringUtils.isNotBlank(page.getTbCols())){
            String tbCols=page.getTbCols();
            try {
                tbCols = EncodeUtil.base64Decode(tbCols);
                tbCols = tbCols.replaceAll("%2F", "/").replaceAll("%2B", "+");
            } catch (UnsupportedEncodingException e) {
                throw  new ApplicationException(e.getMessage());
            }
            String[] strings = tbCols.split(",");
            int index1 = 0;
            for (String s : strings) {
                String[] str = s.split("#");// 分出每个统计的列
                newTbCols += str[0].toLowerCase() + "=#" + index1 + ";";
                index1++;
            }
            page.setNewTbCols(newTbCols);
        }
        gridService.loadAllByFunc(page, env, false);
        //取字段对齐,数字格式,长度
        String sql1 = "select fieldid,cellAlign,cellAlign as appCellAlign,displayformat,displayWidth as gridlength FROM _sysStatisDetail where formID=" + formID + " AND statisID="
                + "'" + statisID + "'" + "";
        List<Map<String, Object>> list1 = this.jdbcTemplate.queryForList(sql1);
        //处理成Map结构方便后面组装
        Map<String, Map<String, Object>> resultMap = new HashMap<>();
        if (list1 != null && list1.size() > 0) {
            for (Map<String, Object> objectMap : list1) {
 
                String id = GridUtils.prossRowSetDataType_String(objectMap, "fieldID").toLowerCase();
                final String[] byAsOfEnd = id.split("\\s*\\b(?i)as\\b\\s*");
                if (byAsOfEnd.length > 1) {
                    id = byAsOfEnd[1];
                }
                    resultMap.put(id,objectMap);
                }
            }
            page.setData(page.getData());
            page.setResultMap(resultMap);
            return page;
        //}
    }
 
 
 
 
    public void setFunLoadList(JsonArray fun, boolean isNew,PanelBean panelBean) {
        if (isNew) {
            panelBean.funLoadList = new JsonArray();
        } else {
            panelBean.funLoadList.add(fun);
        }
    }
 
 
    public void setFunList(String fun, boolean isNew,PanelBean panelBean) {
        if (isNew) {
            panelBean.funList = new ArrayList<String>();
        } else {
            panelBean.funList.add(fun);
        }
    }
 
    /**
     * 生成设置的类型控件 筛选面板获得
     */
    public String get(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        panelBean.tabindexIs++;
        String id=panelBean.pHelper.id;
        String returnStr = "";
        panelBean.getBackStr = getMassterCodeKeyDown(map, true);
        String fun="";
        switch (DBHelper.getValueInt(map, "ControlType")) {
            case 1: // 文本框(text控件)
                fun = "getText('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getText(map, true);
                break;
            case 2: // 下拉列表(select控件)
                // 给集合添加函数
                fun = "getSelect('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getOptions(map);// 有处理sql的函数,解决
                break;
            case 3:// 弹出选择框
                isTreeMus(map);
                fun = "getText('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getShowFrom(map, true);
                break;
            case 5:// 日期选择
                panelBean.pHelper.linkJsDate = "<script type=\"text/javascript\" src=\"/js/calendar/WdatePicker.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/js/calendar/WdatePicker.js\")%>\" defer=\"defer\"></script>";//
                fun = "getBetweenDate('" + id + "','beginday','endday')";
                setFunList(fun, false,panelBean);
                returnStr = getDate(map, true);
                break;
            case 6:// 复选框(check控件:单选项,只能选择1个打√)
                fun = "getCheck('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getCheckBox(map, true);
                break;
            case 30:// 复选框(check控件:多选项,能选择多个打√)
                // 给集合添加函数
                fun = "getCheckList('" + id + "','" + id + "Check','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getCheckBoxList(map);
                break;
            case 31:// 下拉列表+SQL(select控件+SQL动态列表)
                // 给集合添加函数
                fun = "getSelect('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getOptionsSql(map);// 有处理sql的函数,解决
                break;
            case 32:// 单选框(radio控件:多选项值,但只能选择一个)
                // 给集合添加函数Radio
                fun = "getRadio('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getRadio(map);// 有处理sql的函数,解决
                break;
            case 33:// 多功能搜索控件(文本框+下拉列表框[多字段列表])
                // 给集合添加函数
                fun = "multifunctional('valueis','colis','jqcz','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getTextAndSelect(map);// //有处理sql的函数,解决
                break;
            case 35:// 录入+下拉组合框
                fun = "getSelect('" + id + "','" + DBHelper.getValue(map, "CompSingle") + "')";
                setFunList(fun, false,panelBean);
                returnStr = getOptionEdit(map, true);
                break;
            default:
                break;
        }
        return returnStr;
    }
 
    /**
     * 生成页面需要的控件 获得面板显示(多数在这个方法获取控件)
     */
    public String getComponentForPanel(Map<String, Object> sys, boolean shuai, Map<String, Integer> listmax) throws Exception {
        PanelBean panelBean= (PanelBean) sys.get(PANEL_INFO);
        String type = null;
        try {
            // 查出当前窗体类型,以便处理496多表的情况,
            type = gridService.getSimpleJdbcTemplate().queryForObject("select formtype from _sysmenu where formid=?",
                    new Object[] { sys.get("formid") }, String.class);
        } catch (Exception e) {
        }
        String id=panelBean.pHelper.id;
        if (id.trim().equals("")) {
            return "";// 无字段ID不生成控件
        }
        if (!DBHelper.getValue(sys, "SqlScript").equals("")) {
            String sqlContype = "";
            sqlContype ="$(function(){";
            if(DBHelper.getValueInt(sys, "ControlType") != 43){
                sqlContype +="getControlValue('" + id + "'," + DBHelper.getValueInt(sys, "ControlType") + ",'" + id + "','"
                        + DBHelper.getValueInt(sys, "FT") + "','@index@');";
            }else{
                sqlContype +="getSelect2('" + id + "'," + DBHelper.getValueInt(sys, "ControlType") + ",'" + id
                        + "','" + DBHelper.getValueInt(sys, "FT") + "','@index@','"+getControls(sys)+"');";
            }
            sqlContype+="})";
            panelBean.sqlContype=sqlContype;
        }else{
            panelBean.sqlContype="";
        }
        if (!DBHelper.getValue(sys, "dyfieldview").equals("")) {
            panelBean.dyfieldStr = "dyfield_view('" + panelBean.initialValue.getValRep(DBHelper.getValue(sys, "dyfieldview"), false)
                    + "');";
        } else {
            panelBean.dyfieldStr = "";
        }
        if (listmax != null) { // 处理控件的输入长度
            try {
                if (listmax.get(id) != null) {// 一一对应
                    panelBean.maxl = "maxLength=\"" + listmax.get(id)
                            + "\" onkeyup=\"while(value.replace(/[^\\\\x00-\\\\xff]/g, '**').length>maxLength)value=value.slice(0,-1)\"";
                } else {
                    panelBean.maxl = "";
                } // 如果不存在就把maxl清空 防止出错。2014-8-30
            } catch (Exception e) {
                panelBean.maxl = "";
            }
        }
        panelBean.tabindexIs++;// 每次调用是把tabindex上升一个次序
        String returnStr = "";
        panelBean.getBackStr = getMassterCodeKeyDown(sys, shuai);
        String buttonStr = getButtonNext(sys);// 通过,驳回,下一步 等等的审核
        boolean isTabs=(DBHelper.getValue(sys, "tabs38").equals("null")?false:true);//判断是否是面板上的选项卡控件-xin 2018-11-5 15:19:22
        // double hei = 0;
        PanelParmHelper pHelper=panelBean.pHelper;
        switch (DBHelper.getValueInt(sys, "ControlType")) {
            case 1: // 文本框(text控件)
                returnStr = getText(sys, shuai);
                break;
            case 2: // 下拉列表(select控件)
                returnStr = getOptions(sys);
                break;
            case 3: // 弹出选择框
                isTreeMus(sys);
                returnStr = getShowFrom(sys, shuai);
                break;
            case 5:// 日期选择
                pHelper.linkJsDate = "<script type=\"text/javascript\" src=\"/js/calendar/WdatePicker.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/js/calendar/WdatePicker.js\")%>\" defer=\"defer\"></script>";//
                returnStr = getDate(sys, shuai);
                break;
            case 6:// 复选框(check控件:单选项,只能选择1个打√)
                returnStr = getCheckBox(sys, shuai);
                break;
            case 7:// 弹出式文本编辑框
                returnStr = getShowText(sys, shuai, listmax);
                break;
            case 10:// 金钱框---以输入框先代替
                returnStr = getText(sys, shuai);
                break;
            case 9:// 图片预览
            case 19:// 上传附件按钮
                returnStr=this.createFileUPload(sys);
                if(DBHelper.getValueInt(sys, "ControlType")==19){
                    pHelper.seqtypefilde="19;"+id;//19类型控件面板需要用到
                }
                break;
            case 30:// 复选框(check控件:多选项,能选择多个打√)
                panelBean.clickStr = "cheeckSToValue('" + id + "');";
                returnStr = getCheckBoxList(sys);
                panelBean.clickStr = "";
                break;
            case 31:// 下拉列表+SQL(select控件+SQL动态列表)
                returnStr = getOptionsSql(sys);// 有处理sql的函数,解决
                break;
            case 32:// 单选框(radio控件:多选项值,但只能选择一个)
                returnStr = getRadio(sys);// 有处理sql的函数,解决
                break;
            case 33:// 多功能搜索控件(文本框+下拉列表框[多字段列表])
                returnStr = getTextAndSelect(sys);// //有处理sql的函数,解决
                break;
            case 34:// 区域录入提示信息
                String panStyle = "style=\"font-family: '黑体';font-size: 18px;\"";
                String invString = DBHelper.getValue(sys, "styleCss");
                panStyle = invString.trim().equals("") ? panStyle : invString;
                returnStr += "<span " + panStyle + ">" + DBHelper.getValue(sys, "fieldname") + "</span>";// 只显示描述控件,设置占用一行
                break;
            case 35:// 录入+下拉组合框
                returnStr = getOptionEdit(sys, shuai);
                break;
            case 36:// 自定义HTML
                try {
                    returnStr = "<div style=\"width:auto; table-layout:fixed; word-break: break-all; overflow:auto; \"><span id=\""
                            + id + "SetHtml\"><input id=\"" + id + "\" value=\"\" type=\"hidden\" />";
                    pHelper.customHTMLList = systemSettingsDao.getCustomHTML(pHelper.formIdPan, id);
                    for (int i = 0; i < pHelper.customHTMLList.size(); i++) {
                        returnStr += pHelper.customHTMLList.get(i).get("htmlcontent").toString().replaceAll("\\\\",
                                ";pbZhuan#");
                    }
                    returnStr += "</span></div>";
                } catch (Exception e) {
                    e.printStackTrace();
                }
                break;
            case 37:// 富文本框控件
                int  height = (pHelper.rowHei) * DBHelper.getValueInt(sys, "HeightNum");
                if (pHelper.formTypePan != 496 || pHelper.formTypePan != 497) {
                    pHelper.linkJsFu = "\n<script type=\"text/javascript\" src=\"/ckeditor/ckeditor.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/ckeditor/ckeditor.js\")%>\"></script>";
                    pHelper.linkJsFu += "\n<script type=\"text/javascript\" src=\"/ckeditor/samples/js/ckimpl.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/ckeditor/samples/js/ckimpl.js\")%>\"></script>";
                }
                returnStr += "\n<form><textarea id=\"" + id + "\" name=\"" + id + "\">" + getJspValue(id) + "</textarea></form>";
                returnStr += "\n<script type=\"text/javascript\">$(function(){initSample('" + id + "',"+height+");})</script>";
                break;
            case 38:// 控件分组显示
                // hei = (pHelper.rowHei) * DBHelper.getValueInt(sys, "HeightNum");
                String z_index=(isTabs?"margin-top:15px;margin-left:6px;position:absolute;z-index:0;":"margin-top:12px;margin-left:3px;position:absolute;z-index:-1;");
                returnStr += "<div class=\"controls38Div controls38c"+DBHelper.getValueInt(sys, "LengthNum")
                        +" controls38r"+DBHelper.getValueInt(sys, "HeightNum")+"\" style=\"border:1px #75a3e1 solid;border-radius:6px;"+z_index+"\">"
                        + "<span style=\"margin-top:-10px;background:#FFFFFF;width:auto;left:10px;position:absolute\">"
                        + DBHelper.getValue(sys, "fieldname") + "</span></div>";// px;margin-top:2px;
                // 对面板控件边框的高度控制设置
                panelBean.xuan = "";
                if(isTabs && DBHelper.getValueInt(panelBean.control38height, DBHelper.getValue(sys, "tabsheetname"))==0) {
                    panelBean.control38height.put(DBHelper.getValue(sys, "tabsheetname"),(DBHelper.getValueInt(sys, "RowNo")+DBHelper.getValueInt(sys, "HeightNum")));
                }                
                break;
            case 39:// 控件分组显示
                int hei39 = pHelper.rowHei * DBHelper.getValueInt(sys, "HeightNum");
                returnStr = "<input type='text' value='" + getJspValue(id) + "' id=\"" + id
                        + "\" readonly=\"readonly\" style='width: " + (DBHelper.getValueInt(sys, "tdlen") - 25)
                        + "px ; height: " + hei39 + "px;" + DBHelper.getValue(sys, "styleCss")
                        + "'><input type=\"button\" id='" + id + "_dibang' onclick=\"stopOrStart(this,'" + id
                        + "')\" value=\"解锁\"><script>stopOrStartBegin(document.getElementById('" + id + "_dibang'),'" + id
                        + "')</script>";
                break;
            case 40:// 图片浏览控件 -xin 2020-6-15 17:24:07
                int w=116*DBHelper.getValueInt(sys, "LengthNum");
                int h=pHelper.rowHei * DBHelper.getValueInt(sys, "HeightNum");
                pHelper.linkJsFu = "\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/general/Viewer/css/viewer.min.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/general/Viewer/css/viewer.min.css\")%>\">";
                pHelper.linkJsFu += "\n<script type=\"text/javascript\" src=\"/general/Viewer/js/viewer-jquery.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/general/Viewer/js/viewer-jquery.min.js\")%>\"></script>";
                pHelper.linkJsFu += "\n<script type=\"text/javascript\" src=\"/general/Viewer/js/viewer.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,\"/general/Viewer/js/viewer.min.js\")%>\"></script>";
                returnStr += "<div style=\"border: 1px solid #99BBE8;border-radius: 5px;\">"
                        + "<ul id=\""+id+"\" class=\"isViewer40\" data-value=\""+getJspValue(id)+"\">" +
                        "</ul></div>" ;
//                        "<img id="+id+" src=\""+getJspValue(id)+"\" value=\""+getJspValue(id)+"\" alt=\""+DBHelper.getValue(sys, "fieldname")+"\""
//                        + " src-source style=\"width:100%;height:150px;\"/>";
//                returnStr+="<script>$(function(){OpenImage40('"+id+"')})</script>";
                break;
            case 41:// 标签(label)
                String secc = "style=\"font-size: 16px;\"";
                String sytlep = DBHelper.getValue(sys, "styleCss");
                secc = sytlep.trim().equals("") ? secc : sytlep;
                //标签控件那就是静态的显示字段描述内容就可以了,所以直接取fieldName的值 xin 2023-4-27 17:23:36
                returnStr = "<label  id=\""+id+"\" " + secc + ">" + DBHelper.getValue(sys, "fieldname") + "</label>";//getJspValue(id)
                break;
            case 42:// 文本框+录入时动态下拉提示选择框
                returnStr = getShowFrom42(sys, shuai);
                break;
            case 43:// 下拉列表复选框
                returnStr = getSelect43(sys, shuai);
                break;
            case 44://静态图标控件
                returnStr=getBigIcon44(sys,shuai);
                break;
            case 46:
                returnStr=getColorFinder(sys,shuai);
                break;
            case 47:
                returnStr=getProgressBar(sys,shuai);
                break;
            case 48://css样式控件
                returnStr=getTextCssEdit(sys,shuai);
                break;
            default:
                returnStr = getText(sys, shuai);// 有些控件类型暂无用此替代
                break;
        }
        returnStr = "<span id=\"" + id + "_show_type\">" + returnStr + "</span>";
        if (!DBHelper.getValue(sys, "HyperlinkFT").equals("")) {
            returnStr += "<span id=\"" + id
                    + "_show_link\" style='display:none'><a href=\"javascript:void(0)\" onclick=\"windowLink('" + id
                    + "');\"><span id=\"" + id + "_Link\" style=\"display: block;margin-top: 5px;\"></span></a></span>";
        }
        if (panelBean.hasButton) {//有审核按钮(旧)
            returnStr = "<table style=\"width:72%;\"><tr><td>" + returnStr + "</td><td>" + buttonStr + "</td></tr></table>";// valign=\"top\"
        }
        getPermission(sys);
        if (DBHelper.getValueInt(sys, "calcuField") != 0 ) {// 触发公式
            pHelper.gongsiCols.add(id);
//            pHelper.gongsiCols += id + ";";
        }
        if (!DBHelper.getValue(sys, "formula").equals("")) {
            pHelper.gongsiStr.add(id + "=" + DBHelper.getValue(sys, "formula").replaceAll("\'", "\\\\\'"));
//            pHelper.gongsiStr += id + "=" + DBHelper.getValue(sys, "formula") + ";";
        }
        panelBean.maxl = "";// 清空该控件的输入长度,防止对 下一个控件的输入长度造成影响
        return "<span id=\"" + id + "_dynamic\">" + returnStr + "</span></span></div>" + getKeyInput(sys);
    }
 
    /**
     * 1类型控件。文本框(text控件)
     *
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getText(Map<String, Object> map, boolean shuai) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String str = "";
        String id=panelBean.pHelper.id;
        String maxl=panelBean.maxl;
        if (shuai) {
            str = "<input id=\"" + id + "\" type=\"text\" autocomplete=\"off\" name=\"" + id + "\" " + maxl + " ";
            str = getAll(map, str, shuai);
            str += " />";
        } else {
            String str1 = "";
            if (DBHelper.getValueInt(map, "HeightNum") > 1) {
                int num=(panelBean.hasButton?DBHelper.getValueInt(map, "LengthNum")-1:DBHelper.getValueInt(map, "LengthNum"));
                str1 = "<textarea ";
                str += str1 + " id=\"" + id + "\"  name=\"" + id + "\" " + maxl + " autocomplete=\"off\" class=\"text "+getControls(map)+ "\"";
                str = getAll(map, str, shuai) + " ><%=DBHelper.replaceBlankOnWeb(DBHelper.getValue(docMap,\"" + id
                        + "\",mapAll))%>";
                str += "</textarea>";
            } else {
                str1 = "<input type=\"" + ((DBHelper.getValueInt(map, "passwordchar") == 1) ? "password" : "text")
                        + "\" ";
                str += str1 + " id=\"" + id + "\"  name=\"" + id + "\" " + maxl + " autocomplete=\"off\" class=\"text " + getControls(map)
                        + "\" value=\"" + getJspValue(id) + "\" ";
                str = getAll(map, str, shuai);// 这里可以提出来,还是提出来
                str += " />";
            }
        }
        return str;
    }
 
    /**
     * 2类型控。下拉列表(select控件)
     *
     * @param mapW
     * @return
     * @throws Exception
     */
    private String getOptions(Map<String, Object> mapW) throws Exception {
        PanelBean panelBean= (PanelBean) mapW.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String selectStr = "";
        if (DBHelper.getValue(mapW, "SqlScript") == null || DBHelper.getValue(mapW, "SqlScript").trim().equals("")) {
            selectStr = "<select class=\""+getControls(mapW)+"\" onfocus=\"" + panelBean.sqlContype + "\"  " + panelBean.onClickStr + " onkeydown=\"keyDown('" + id
                    + "',event);key_Delete_Selete(event,'" + id + "');\" ";
            selectStr += getChange(panelBean);
            selectStr += getReadOnly(mapW);// 后加
            selectStr += " onblur=\"" + panelBean.clickStr + "\" name=\"" + id + "\" size=\"1\" id=\"" + id + "\">";
            String sql = "select * from _sysdict where dictid = " + DBHelper.getValueInt(mapW, "FT");
            List<HashMap<String, String>> list = null;
            list = sqlDBHelperIfc.getHashMap(sql);
            if (DBHelper.getValueInt(mapW, "issuppressblanklinefordropdown") != 1) {
                selectStr += "\r\n      <option value></option>";
            }
//            selectStr += "\r\n<option value=\"\"></option>";
            for (HashMap<String, String> map : list) {
                selectStr += "\r\n<option value=\"" + DBHelper.replaceBlank(map.get("intervalue")) + "\" ";
                selectStr += ">" + map.get("dictvalue") + "</option>";
            }
            selectStr += "</select>";
            // 清除第一个默认值
            selectStr += getSelectfun(getJspValue(id), id);
        } else {
            selectStr += getOptionsSql(mapW);
        }
        return selectStr;
    }
 
    /**
     * 46控件颜色下拉 2类型
     * @param mapW
     * @return
     * @throws Exception
     */
    private String getColorOptions(Map<String, Object> mapW) throws Exception {
        PanelBean panelBean = (PanelBean) mapW.get(PANEL_INFO);
        String id = panelBean.pHelper.id;
        String selectStr = "";
        selectStr = "<select class=\"" + getControls(mapW) + "\" onchange=\"getColors46('" + id + "');\" onfocus=\"" + panelBean.sqlContype + "\"  " + panelBean.onClickStr + " onkeydown=\"keyDown('" + id
                + "',event);key_Delete_Selete(event,'" + id + "');\" ";
        selectStr += getChange(panelBean);
        selectStr += getReadOnly(mapW);// 后加
        selectStr += " onblur=\"" + panelBean.clickStr + "\" name=\"" + id + "\" size=\"1\" id=\"" + id + "\">";
        String sql = "select HexColor as intervalue from t9685 where formid=120201 order by DocItem asc";//"select * from _sysdict where dictid = " + DBHelper.getValueInt(mapW, "FT");
        List<HashMap<String, String>> list = null;
        list = sqlDBHelperIfc.getHashMap(sql);
        selectStr += "\r\n<option value=\"\" style=\"background-color:white;color:white\"></option>";
        for (HashMap<String, String> map : list) {
            if(StringUtils.isBlank(DBHelper.replaceBlank(map.get("intervalue")))){
                continue;
            }
            selectStr += "\r\n<option value=\"" + DBHelper.replaceBlank(map.get("intervalue")) + "\" ";
            selectStr += " style=\"background-color:" + DBHelper.replaceBlank(map.get("intervalue")) + "\"></option>";
        }
        selectStr += "</select>";
        // 清除第一个默认值
        selectStr += getSelectfun(getJspValue(id), id);
        return selectStr;
    }
 
    private String getJspValue(String id) {
        return "<%=DBHelper.getValue(docMap,\"" + id + "\",mapAll)%>";
    }
 
    /**
     * 3类型控件调用
     * @param map
     * @throws Exception
     */
    private void isTreeMus(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        switch (DBHelper.getValueInt(map, "FTFormType")) {
            case 302:
                panelBean.treeMus = true;
                break;
            default:
                panelBean.treeMus = false;
                break;
        }
    }
 
    /**
     * 3类型控件。弹出选择框
     *
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getShowFrom(Map<String, Object> map, boolean shuai) throws Exception {
        String s_ = "";
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String maxl=panelBean.maxl;
        s_ += getReadOnly(map); // 是否只读
        String getdiv = "";
        String isControl42Css="";//是否也是42控件查询功能需要的样式
        if (!DBHelper.getValue(map, "SuggestFileds").equals("")) {// 42类型控件js
            int rod = (int) (Math.random() * 100 + 1);// 生成100之内的随机数
            String divId="T_"+DBHelper.getValue(map, "ft")+"_"+rod+"div";
            String tableId="T_"+DBHelper.getValue(map, "ft")+"_"+rod+"CDiv";
            panelBean.pHelper.div42="<div id=\""+divId+"\" style=\"z-index:9999;display:none;position:absolute;height:auto;max-height:320px;overflow:auto;\">" +
                    "<table id=\""+tableId+"\" lay-filter=\""+tableId+"\" " +
                    getSuggestFilds(DBHelper.getValue(map, "ft"),DBHelper.getValue(map, "SuggestFileds"),DBHelper.getValueInt(map, "ftformtype"))+">" +
                    "</table></div>\t\n";
            //添加data-xxx属性 xin 2021-3-17 15:54:36
            getdiv="data-index=\"@index@\" data-rod=\""+rod+"\" data-relation=\""+DBHelper.getValue(map, "RelationField")+"\" data-sugges=\""+DBHelper.getValue(map, "SuggestFileds")+"\"";
            isControl42Css="isControl42";//赋固定值样式
        } else {// 3类型控件
            String getAll = panelBean.getBackStr + ((panelBean.keyBack) ? "keyDown('" + id + "',event);" : "");
            String getAllChan = panelBean.getBackStr + ((panelBean.toKeBack) ? "keyDown('123',event);" : "");// --getBackStr
            // +
            // 不需要触发这个事件
            // 2015-3-12
            // 10:07:37
            String getChan = ((panelBean.toKeBack) ? "keyDown('123',event);" : "");
            s_ += " onPropertyChange=\"upSub('" + id + "',@index@);" + getChan + panelBean.dyfieldStr + "\"  "; // 值发生改变处理
            s_ += " onchange=\"getBackElse=true;" + getAllChan + "upSub('" + id + "',@index@);\"";
            s_ += " onkeydown=\"" + getAll + "delemptyrefdata(document.getElementById('" + id + "'),@index@);\" "; // 键盘按下处理
        }
        String str = "<input id=\"" + id + "Tree\" value=\""
                + ((DBHelper.getValueInt(map, "ReadOnly") == 1) ? "0" : "1") + "\" type=\"hidden\" />";
       
        int flag=-1;
        boolean bol=false;
        //是否有会计科目设置    xin 2020-11-6 10:44:28
        if(!Objects.equals("", DBHelper.getValue(map, "glcodefield")) &&
                (id.toLowerCase().matches("cv\\d{1}") || id.toLowerCase().matches("cv\\d{1}name"))) {
            try {
                Pattern p = Pattern.compile("[^0-9]");
                Matcher m = p.matcher(id);
                flag = Integer.parseInt(m.replaceAll("").trim());
                bol=true;
            } catch (Exception e) {
                flag = -1;
            }            
        }
        if (DBHelper.getValueInt(map, "HeightNum") > 1) {
            str += "<textarea class=\""+isControl42Css+" Three_show " + getControls(map) + "\" id=\"" + id + "\" "
                    + (getdiv.equals("") ? maxl : "") + (bol?" data-flcode=\""+DBHelper.getValue(map, "glcodefield")+"\" data-flag="+flag+" ":" ")
                    + "name=\"" + id + "\" " + s_ + " "+getdiv+">" + getJspValue(id)
                    + "</textarea>";
        } else {
            str += "<input autocomplete=\"off\" class=\""+isControl42Css+" Three_show " + getControls(map) + "\" id=\"" + id + "\"  "
                    + (getdiv.equals("") ? maxl : "") + (bol?" data-flcode=\""+DBHelper.getValue(map, "glcodefield")+"\" data-flag="+flag+" ":" ")
                    + "name=\"" + id + "\" size=\"15\" " + s_ + " "+getdiv+" value=\""
                    + getJspValue(id) + "\"  />";
        }
        String style="";
        if(!DBHelper.getValue(map, "tabs38").equals("null")){
            //margin-left:"+((256*DBHelper.getValueInt(map, "LengthNum"))-12-8-116-16)+"px;
            style="position:absolute;z-index:1;margin-top:2px;";
        }else {
             int i=(DBHelper.getValueInt(map, "Hidelabel")==1?0:116);
             style="display:block;margin-left:"+(256*DBHelper.getValueInt(map, "LengthNum")-22-i)+"px;position:absolute;margin-top: -"+((DBHelper.getValueInt(map, "HeightNum")*29.2)-2-5.2)+"px;";
        }
        str += "<span  class=\"AllShowType\" style=\""+style+"border:0px solid #000000;\">"//position: absolute; 加上的话在2 3窗体显示会出现问题
                + "<img src=\"/images/ppp.gif\" id=\"" + id + "_click\" style=\"cursor: pointer;margin-left:-16px;\"  onclick=\""
                + (panelBean.treeMus ? "musChoies=true;" : "") + "windowOpen('" + id + "','@index@','"
                + DBHelper.getValueInt(map, "onlyOne") + "');" + (panelBean.treeMus ? "musChoies=false;" : "") + "\"/></span>";
        return str;
    }
 
    /**
     * 5类型控。日期选择
     *
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getDate(Map<String, Object> map, boolean shuai) throws Exception {
        String str = "";
        String dateForm = "";
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        if (shuai) {
            str = "从<input id=\"begindayDate\" value=\"1\" type=\"hidden\" /><INPUT name=\"beginday\" style=\"height:24px;\" id=\"beginday\" onclick=\"showDate('beginday',true,'');"
                    + panelBean.clickStr + "\"  value=\"\" autocomplete=\"off\" class=\"Wdate\" realValue My97Mark=\"true\">"
                    + "&nbsp;到&nbsp;<input id=\"enddayDate\" value=\"1\" type=\"hidden\" /><INPUT name=\"endday\"  autocomplete=\"off\" style=\"height:24px;\" id=\"endday\" onclick=\"showDate('endday',true,'');"
                    + panelBean.clickStr + "\"  value=\"\" class=\"Wdate\" realValue>";
        } else {
            if (!DBHelper.getValue(map, "Displayformat").equals("")) {
                dateForm = "showDate('" + id + "',true,'" + DBHelper.getValue(map, "Displayformat") + "')";
            } else {
                dateForm = "showDate('" + id + "',true,'')";
            }
            str = "<input id=\"" + id + "Date\" value=\"" + ((DBHelper.getValueInt(map, "ReadOnly") == 1) ? "0" : "1")
                    + "\" type=\"hidden\" /><input id=\"" + id + "\" name=\"" + id
                    + "\" type=\"text\" autocomplete=\"off\" class=\"Wdate "+getControls(map)+"\" onclick=\"" + dateForm + "\" ";// onfocus= controlsc1 controlsr1
            str += " value=\"" + getJspValue(id) + "\" ";
            str = getAll(map, str, shuai);
            str += " />";
        }
        return str;
    }
 
    /**
     * 6类型控件。复选框(check控件:单选项,只能选择1个打√)
     *
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getCheckBox(Map<String, Object> map, boolean shuai) throws Exception {
        String str = "";
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String checkId = id + "CheckBox";
        String css="";
//        if(panelBean.control38height>DBHelper.getValueInt(map, "RowNo")){
//            css="z_indexTabs";
//       }else{
//             panelBean.control38height=0;
//       }
        str = "<input id=\"" + checkId + "\" name=\"" + checkId
                + "\" type=\"checkbox\" class=\"controls6 "+css+"\" <%=DBHelper.getValue(docMap,\"" + id
                + "\",mapAll).equals(\"1\")?\"checked\":\"\"%> ";
        str = getAll(map, str, shuai);
        str += " onClick=\"document.getElementById('" + id + "').value=document.getElementById('" + checkId
                + "').checked ? '1' : '0' ;" + panelBean.clickStr + "\" />" + "<input type=\"hidden\" id='" + id + "' name=\""
                + id + "\" value=\"" + getJspValue(id) + "\" onPropertyChange=\"cheeckValueChan('" + id + "')\">";
        return str;
    }
 
 
    /**
     * 7类型控件。弹出式文本编辑框
     * @param map
     * @param shuai
     * @param listmax
     * @return
     * @throws Exception
     */
    private String getShowText(Map<String, Object> map, boolean shuai, Map<String, Integer> listmax) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String str = "<input id=\"" + id + "Text\" value=\"1\" type=\"hidden\" /><textarea class=\""+getControls(map)+"\" id=\"" + id + "\" name=\""
                + id + "\" " + panelBean.maxl + " rows=\"" + DBHelper.getValueInt(map, "HeightNum") + "\" ";
        str = getAll(map, str, shuai);
        str += " ><%=DBHelper.replaceBlankOnWeb(DBHelper.getValue(docMap,\"" + id
                + "\",mapAll))%></textarea><img onClick=\"show('" + id + "'," + listmax.get(id)
                + ");\" style=\"position:absolute;margin-left:-19px;margin-top:1px;height:" + (panelBean.pHelper.rowHei-4)
                + "px;width:18px;cursor:hand;\" src=\"/images/dian.jpg\">";
        return str;
    }
 
    /**
     * 19、9类型上传附件按钮
     * @param map
     * @return
     */
    public String createFileUPload (Map<String, Object> map) {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        int ReadOnly=DBHelper.getValueInt(map, "ReadOnly");//只读设置 xin 2021-3-3 10:39:28
        String upload="\n <div class=\"form-group "+getControls(map)+"\" id=\"uploadDiv_"+id+"\" style=\""+(ReadOnly==1?"background: #CCC;":"")+"\">\n"
                + "<input id=\""+id+"_up\" type=\"file\" "+(ReadOnly==1?"disabled = \"disabled\"":"")+" class=\"file\" multiple data-preview-file-type=\"any\" data-overwrite-initial=\"false\" data-min-file-count=\"1\"> \n"   //multiple 控制上传时可以点击多附件同时上传
                + "<input id=\""+id+"\" name=\""+id+"\" value=\"<%=DBHelper.getValue(docMap,\""+id+"\")%>\" type=\"hidden\" /> \n"
                + "</div>\n";
        upload+="<script>"//<%=DBHelper.getValueInt(docMap,\"rowid\")%>
                +"\n onfileiput('"+panelBean.pHelper.formIdPan+"','"+id+"','"+DBHelper.getValueInt(map, "ControlType")+"','<%=DBHelper.getValueInt(docMap,\"docstatus\")%>','','<%=session.getAttribute(SessionKey.USERCODE)%>',null,"+DBHelper.getValueInt(map, "maxFileSize")+");//加载附件"
                +"\n picevent('"+id+"');//事件\r";
        upload+="\n </script>";
//        String upload="\n <div class=\"form-group "+getControls(map)+"\" style=\""+(ReadOnly==1?"background:#CCC;":"")+"\">" +
//                "<input id=\""+id+"\" name=\""+id+"\" data-readonly=\""+(ReadOnly==1?"true":"false")+"\" " +
//                "data-status=\"<%=DBHelper.getValueInt(docMap,\"docstatus\")%>\" " +
//                "data-size=\""+DBHelper.getValueInt(map, "maxFileSize")+"\" " +
//                "data-type=\""+DBHelper.getValueInt(map, "ControlType")+"\" " +
//                "value=\"<%=DBHelper.getValue(docMap,\""+id+"\")%>\" " +
//                "type=\"hidden\" class=\"isFileInput\"/>";
//        upload+="<input id=\""+id+"_upload\" "+(ReadOnly==1?"disabled = \"disabled\"":"")+" type=\"file\"/></div>";
        return upload;
    }
 
    /**
     * 30类型控件。复选框(check控件:多选项,能选择多个打√)
     * @param map
     * @return
     * @throws Exception
     */
    private String getCheckBoxList(Map<String, Object> map) throws Exception {
        String returnStr = "";
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        if (DBHelper.getValue(map, "SqlScript") == null || DBHelper.getValue(map, "SqlScript").trim().equals("")) {
            String sql = "select * from _sysdict where dictid = " + DBHelper.getValueInt(map, "FT");
            returnStr = "<span id=\"" + id + "Span\"  name=\"" + id    + "Span\" style=\"border:0px solid #a5a6ad; height:26px;\">"
                    + "<input id=\"" + id + "\"  name=\"" + id + "\" value=\"" + getJspValue(id) + "\" type=\"hidden\" "
                    + "onPropertyChange=\"cheeckSValueChan('" + id + "')\" /><ul class=\"checkcss\">";
            List<HashMap<String, String>> list = null;
            list = sqlDBHelperIfc.getHashMap(sql);
            int i = 0;
            for (HashMap<String, String> mapR : list) {
                returnStr += "<li><input type=\"checkbox\" name=\"" + id + "Check\"  id=\"" + id
                        + "_" + i + "\" value=\"" + mapR.get("intervalue") + "\"  class=\""+getControls(map)+"\" onclick=\"" + panelBean.clickStr
                        + "\" style=\"width:20px;height:20px;\"><span class=\"checkcsstxt\">" + mapR.get("dictvalue")
                        + "</span></li>&nbsp;";
                i++;
            }
            returnStr += "</ul></span>" + getCheckFun(id);
        } else {
            returnStr += "<span id=\"" + id + "Span\"  name=\"" + id + "Span\" style=\"border:0px solid #a5a6ad; height:24px;\">"
                    + "<input id=\"" + id + "\"  name=\"" + id + "\" value=\"" + getJspValue(id) + "\" type=\"hidden\" "
                    + "onPropertyChange=\"cheeckSValueChan('" + id + "')\" /><ul class=\"checkcss\"><%  outStr=\"\";";
            returnStr += "\r\ntry{\r\n  int i_sql_checks=0;";
            returnStr += "\r\n  sql = \""
                    + DBHelper.replaceBr(panelBean.initialValue.getValLinShi(DBHelper.getValue(map, "SqlScript"), true)) + "\";";
            returnStr += "\r\n  SRS =  build.getSqlRowSet(DBHelper.getValRepShi(sql,session,docMap, false));";
            returnStr += "\r\n    while(SRS.next()){ %>";
            returnStr += "<li><input name=\"" + id + "Check\" type=\"checkbox\" id=\"" + id
                    + "_<%=i_sql_checks%>\" value=\"<%=SRS.getString(1)%>\" class=\""+getControls(map)+"\" onclick=\"" + panelBean.clickStr
                    + "\" style=\"width:20px;height:20px;\"><span class=\"checkcsstxt\"><%=SRS.getString(2)%></span></li>&nbsp;";
            returnStr += " <%i_sql_checks++;}}finally {}%></ul></span>" + getCheckFun(id);
        }
        return returnStr;
    }
 
    /**
     * 31类型控。下拉列表+SQL(select控件+SQL动态列表)
     *
     * @param map
     * @return
     * @throws Exception
     */
    private String getOptionsSql(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String getBackStr=panelBean.getBackStr;
        boolean toKeBack=panelBean.toKeBack;
        String selectStr = "";
        String getAll = getBackStr + ((panelBean.keyBack) ? "keyDown('" + id + "',event);" : "");
        String getAllChan = getBackStr + ((toKeBack) ? "keyDown('123',event);" : "");
        String getChan = ((toKeBack) ? "keyDown('123',event);" : "");
        String sql = DBHelper.replaceBr(DBHelper.getValue(map, "SqlScript"));
        List<String> list = DBHelper.getStrRepInfo(sql+DBHelper.replaceBr(DBHelper.getValue(map, "SqlWhere")), "&");
        if(list!=null && list.size()>0) {
             HashSet<String> set = new HashSet<String>(list); 
             for(String key:set) {
                key=key.toLowerCase();
                 panelBean.selectMap.put(key, id+(panelBean.selectMap.get(key)!=null?";"+panelBean.selectMap.get(key):""));
             }   
        }            
        if ((DBHelper.getValueInt(map, "FT") < 0 && (DBHelper.getValueInt(map, "ControlType") == 2)
                || ("").equals(sql))) {//2类型控件
            sql = "select  intervalue,dictvalue from _sysdict where dictid =" + DBHelper.getValueInt(map, "FT")
                    + " order by sequence asc";
        }
        selectStr += "\r\n<%try{";
        selectStr += "\r\n      sql = \"" + sql + "\";";
        String sqlWhere=DBHelper.replaceBr(DBHelper.getValue(map, "SqlWhere"));
        if(StringUtils.isNotBlank(sqlWhere)){
            boolean b = false;//默认组装进行
            b = (DBHelper.getValueInt(map, "ReadOnly") == 1 ? true : b);//只读状态不需要组装
            sqlWhere = b ? null : "\""+sqlWhere+"\"";//只读情况不传sqlWhere值  xin 2023-3-15 14:35:18
            selectStr += "\r\n      if(\"\".equals(DBHelper.getValue(docMap,\"docstatus\")) && request.getAttribute(\"docStatue\") != null){";
            selectStr += "\r\n          docMap.put(\"docstatus\",request.getAttribute(\"docStatue\"));//这里是为了在多表情况,子功能没状态值,这里获取主表的状态值";
            selectStr += "\r\n      }";//docStatus=((\"\".equals(docStatus) && request.getAttribute(\"docStatue\") != null)?(String)request.getAttribute(\"docStatue\"):docStatus);";
            selectStr += "\r\n      sql = DBHelper.getSqlWhere(sql," + b + ",DBHelper.getValue(docMap,\""+id+"_expr\")," +
                    "\"" + DBHelper.getValue(map, "editStatus") + "\",DBHelper.getValue(docMap,\"docstatus\")," + sqlWhere + ");";
        }
        selectStr += "\r\n      SRS = build.getSqlRowSet(DBHelper.getValRepShi(sql,session,docMap, false));";
        selectStr += "\r\n %>";
        selectStr += "\r\n <input id=\"" + id + "text\" name=\"" + id + "text\" value=\"" + getJspValue(id)
                + "\" type=\"hidden\">\r";
        //onfocus=\"" + panelBean.clickStr
        // + "getControlValue('" + id + "'," + DBHelper.getValueInt(map, "ControlType") + ",'" + id + "','"
        // + DBHelper.getValueInt(map, "FT") + "','@index@');\" 
        selectStr += "<select class=\""+getControls(map)+"\" onchange=\"getSelect31('" + id + "');getBackElse=true;"
                + getAllChan + "upSub('" + id + "',@index@);\" "+getReadOnly(map)// 后加
                + " onPropertyChange=\"if(panMain[panIndex].no_load_first){upSub('" + id + "',@index@);" + getChan
                + "}\" onkeydown=\"" + getAll + "key_Delete_Selete(event,'" + id + "');\" name=\"" + id + "\" size=\"1\" id=\"" + id + "\">";
        if (DBHelper.getValueInt(map, "issuppressblanklinefordropdown") != 1) {
            selectStr += "\r\n      <option value></option>";
        }
        selectStr += "\r   <% while(SRS!=null && SRS.next()){%> ";
        selectStr += "\r\n      <option value=\"<%= DBHelper.replaceBlank(SRS.getString(1))%>\"><%=SRS.getObject(2)%></option>";
        selectStr += "\r\n <% }%>";
        if (DBHelper.getValueInt(map, "FT") != 0) {
            selectStr += "\r\n  <option value=\"pb_xinzen\"><<新增>></option>";
        }
        selectStr += "\r\n </select>";
        selectStr += "\r\n<%}catch(Exception e){";
        selectStr += "\r\n      throw e;";
        selectStr += "\r\n}%>\r\n";
        selectStr += getSelectfun(getJspValue(id), id);
//        selectStr += "<script>" + panelBean.sqlContype + "</script>\r\n";
        return selectStr;
    }
 
    /**
     * 32类型控件。单选框(radio控件:多选项值,但只能选择一个)
     *
     * @param map
     * @return
     * @throws Exception
     */
    private String getRadio(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String returnStr = "";
        if (DBHelper.getValue(map, "SqlScript") == null || DBHelper.getValue(map, "SqlScript").trim().equals("")) {
            String sql = "select * from _sysdict where dictid = " + DBHelper.getValueInt(map, "FT");
            returnStr = "<span id=\"" + id + "Span\" style=\"border:0px solid #a5a6ad; height:24px;\">";
            List<HashMap<String, String>> list = null;
            list = sqlDBHelperIfc.getHashMap(sql);
            int i = 0;
            for (HashMap<String, String> mapR : list) {
                returnStr += "<input  name=\"" + id + "Radio\" type=\"radio\" id=\"" + id + "_" + i + "\" value=\""
                        + mapR.get("intervalue") + "\" onclick=\"getRad('" + id + "')\">" + mapR.get("dictvalue")
                        + "&nbsp;&nbsp;";
                i++;
            }
            returnStr += "</span><input id=\"" + id + "\" value=\"" + getJspValue(id)
                    + "\" type=\"hidden\" onPropertyChange=\"radioValueChan('" + id + "')\">" + getRadiosFun(id);
        } else {
            returnStr += "<span id=\"" + id
                    + "Span\" style=\"border:0px solid #a5a6ad; height:24px;\"><%  outStr=\"\";";
            returnStr += "\r\ntry{\r\n  int i_sql_radio=0;";
            returnStr += "\r\n  sql = \""
                    + DBHelper.replaceBr(panelBean.initialValue.getValLinShi(DBHelper.getValue(map, "SqlScript"), true)) + "\";";
            returnStr += "\r\n  SRS = build.getSqlRowSet(DBHelper.getValRepShi(sql,session,docMap, false));";
            returnStr += "  while(SRS.next()){ ";
            returnStr += "if((\"" + panelBean.initialValue.getValLinShi(DBHelper.getValue(map, "initValue"), false)
                    + "\").equals(SRS.getObject(2))||(\""
                    + panelBean.initialValue.getValLinShi(DBHelper.getValue(map, "initValue"), false)
                    + "\").equals(SRS.getObject(1))){";
            returnStr += "   outStr += \" checked='checked' \";";
            returnStr += "}else{outStr += \"\";}%>";
            returnStr += "<input <%=outStr%> name=\"" + id + "Radio\" type=\"radio\" id=\"" + id
                    + "_<%=i_sql_radio%>\" value=\"<%=SRS.getString(1)%>\" onclick=\"getRad('" + id
                    + "')\"><%=SRS.getString(2)%>&nbsp;&nbsp;";
            returnStr += " <%i_sql_radio++;}}finally {}%>";
            returnStr += "</span><input id=\"" + id + "\" value=\"" + getJspValue(id)
                    + "\" type=\"hidden\" onPropertyChange=\"radioValueChan('" + id + "')\">" + getRadiosFun(id);
        }
        return returnStr;
    }
 
    /**
     * 33类型控件。多功能搜索控件(文本框+下拉列表框[多字段列表])
     * @param map
     * @return
     * @throws Exception
     */
    private String getTextAndSelect(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String selectStr = "";
        selectStr += "<input type=\"text\" id=\"valueis\" style=\"border: 1px solid #a5a6ad;\" class=\"controlsr1\" />&nbsp;&nbsp;";
        selectStr += "<select onkeydown=\"keyDown('colis',event);colisKey(event);\" " + panelBean.onClickStr + " ";
        selectStr += " name=\"colis\" size=\"1\" style=\"width:168px;height:25px;\" class=\"controlsr1\" id=\"colis\">";
        String optionStr = "";
        String colAll = "";
        String colAllDataType = "";
        for (Map<String, Object> sys : panelBean.queryList) {
            Object obj = getDataTypeIfc.getDataTypeByName(panelBean.pHelper.tableIs, DBHelper.getValue(sys, "FieldID"));
            colAllDataType += obj.toString() + ";";
            colAll += DBHelper.getValue(sys, "FieldID") + ";";
            optionStr += "\r\n<option value=\"" + DBHelper.getValue(sys, "FieldID") + "\" ";
            optionStr += ">" + DBHelper.getValue(sys, "fieldname") + "</option>";
        }
        if (colAll.lastIndexOf(";") != -1) {
            colAll = colAll.substring(0, colAll.lastIndexOf(";"));
        }
 
        if (colAllDataType.lastIndexOf(";") != -1) {
            colAllDataType = colAllDataType.substring(0, colAllDataType.lastIndexOf(";"));
        }
        colAll = colAll + "|" + colAllDataType;
 
        selectStr += "\r\n<option value=\"" + colAll + "\" selected=\"selected\">查询所有字段</option>";
        selectStr += optionStr;
        selectStr += "</select>&nbsp;&nbsp;";
        selectStr += "<input id=\"dataType\" type=\"hidden\" value=" + colAll + "/>";
        selectStr += "\r\n<span class=\"preciseQuery\">精确查询" + getCheck("jqcz",panelBean)
                + "</span>&nbsp;&nbsp;<a href=\"javascript:getOder();\" class=\"easyui-linkbutton\" data-options=\"iconCls:'icon-search'\" style=\"width:80px\">查询</a>";
        //+ "<a href=\"\" class=\"easyui-linkbutton\" onclick=\"getOder();\" value=\"查找\"/>";
        // 清除第一个默认值
        String showValue = panelBean.initialValue.getInv(map);
        if (!showValue.trim().equals("")) {
            selectStr += getSelectfun(showValue, "colis");
        }
        return selectStr;
    }
 
    /**
     * 35类型控件。录入+下拉组合框
     * @param mapW
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getOptionEdit(Map<String, Object> mapW, boolean shuai) throws Exception {
        String selectStr = "";
        PanelBean panelBean= (PanelBean) mapW.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        int len = DBHelper.getValueInt(mapW, "tdLen") - 28;
        // 暂时用,没设置tdLen
        if (shuai) {
            len = 100;
        }
        if (DBHelper.getValue(mapW, "SqlScript") == null || DBHelper.getValue(mapW, "SqlScript").trim().equals("")) {
            selectStr = "<div style=\"position:relative;\"><span style=\"width:" + (len + 23)
                    + "px;overflow:hidden;\"><select onmouseover=\"" + panelBean.sqlContype + "\"  onkeydown=\"keyDown('" + id
                    + "',event);\"  style=\"\" onPropertyChange=\"set35('" + id //width:" + (len + 18) + "px;height:20px;
                    + "');upSub('" + id + "',@index@)\" onchange=\"set35('" + id + "');upSub('" + id + "',@index@)\" onclick=\"set35('"
                    + id + "');\" id=\"" + id + "_35\" class=\"" + getControls(mapW) + "\">";
            String sql = "select * from _sysdict where dictid = " + DBHelper.getValueInt(mapW, "FT");
            List<HashMap<String, String>> list = null;
            list = sqlDBHelperIfc.getHashMap(sql);
            for (HashMap<String, String> map : list) {
                selectStr += "\r\n<option value=\"" + DBHelper.replaceBr(map.get("intervalue")) + "\" ";
                selectStr += ">" + map.get("dictvalue") + "</option>";
            }
            selectStr += "</select></span>";
            selectStr += "<input type = \"text\" name=\"" + id + "\" id=\"" + id + "\" " + panelBean.maxl + "  style=\"position:absolute;left:0px;border-radius: 5px 0px 0px 5px;\" "
                    + "class=\"controlszh"+DBHelper.getValueInt(mapW, "LengthNum")+" controlsr" + DBHelper.getValueInt(mapW, "HeightNum") + "\" value=\"" + getJspValue(id)//input35
                    + "\">" + getSelectfun(getJspValue(id), id + "_35");
            selectStr += "</div>";
        } else {
            selectStr += "<div style=\"position:relative;\"><span style=\"width:" + (len + 23)
                    + "px;overflow:hidden;\"><select onmouseover=\"" + panelBean.sqlContype + "\"  onkeydown=\"keyDown('" + id
                    + "',event);\"  style=\"\" onPropertyChange=\"set35('" + id//width:" + (len + 18) + "px;height:20px;
                    + "');upSub('" + id + "',@index@)\" onchange=\"set35('" + id + "');upSub('" + id + "',@index@)\" onclick=\"set35('"
                    + id + "');\" id=\"" + id + "_35\" class=\"" + getControls(mapW) + "\"><%";
            selectStr += "\r\n  sql = \""
                    + DBHelper.replaceBr(panelBean.initialValue.getValLinShi(DBHelper.getValue(mapW, "SqlScript"), true)) + "\";";
            selectStr += "\r\n  SRS = build.getSqlRowSet(DBHelper.getValRepShi(sql,session,docMap, false));";
            selectStr += "\r\n    while(SRS.next()){ ";
            selectStr += "%><option value=\"<%=DBHelper.replaceBr(SRS.getString(1)) %>\" ><%=SRS.getObject(2) %></option>";
            selectStr += " <%}%>";
            selectStr += "</select></span><input type = \"text\" name=\"" + id + "\" id=\"" + id + "\" " + panelBean.maxl
                    + "  style=\"position:absolute;left:0px;border-radius: 5px 0px 0px 5px;\" class=\"controlszh"+DBHelper.getValueInt(mapW, "LengthNum")+" controlsr" + DBHelper.getValueInt(mapW, "HeightNum") + "\" value=\"" + getJspValue(id)//input35
                    + "\"></div>" + getSelectfun(getJspValue(id), id + "_35");
        }
        return selectStr;
    }
 
    /**
     * 42类型控件。文本框+录入时动态下拉提示选择框
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getShowFrom42(Map<String, Object> map, boolean shuai) throws Exception {
        int rod = (int) (Math.random() * 1000 + 1);// 生成1000之内的随机数
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String divId="T_"+DBHelper.getValue(map, "ft")+"_"+rod+"div";
        String tableId="T_"+DBHelper.getValue(map, "ft")+"_"+rod+"CDiv";
        panelBean.pHelper.div42="<div id=\""+divId+"\" style=\"z-index:9999;display:none;position:absolute;height:auto;max-height:320px;overflow:auto;\">" +
                "<table id=\""+tableId+"\" lay-filter=\""+tableId+"\" " +
                getSuggestFilds(DBHelper.getValue(map, "ft"),DBHelper.getValue(map, "SuggestFileds"),DBHelper.getValueInt(map, "ftformtype"))+">" +
                "</table></div>\t\n";
        String s_ = "";
        s_ += getReadOnly(map); // 是否只读
        //添加data-xxx属性 xin 2021-3-17 15:54:36
        String data="data-index=\"@index@\" data-rod=\""+rod+"\" data-relation=\""+DBHelper.getValue(map, "RelationField")+"\" data-sugges=\""+DBHelper.getValue(map, "SuggestFileds")+"\"";
        String str = "<input id=\"" + id + "Tree\" value=\""
                + ((DBHelper.getValueInt(map, "ReadOnly") == 1) ? "0" : "1") + "\" type=\"hidden\" />";
        if (DBHelper.getValueInt(map, "HeightNum") > 1) {
            str += "<textarea autocomplete=\"off\" class=\"isControl42 Three_show " + getControls(map) + "\" id=\"" + id + "\"  name=\"" + id + "\" "
                    + s_ + ">" + getJspValue(id) + "</textarea>";
        } else {
            str += "<input autocomplete=\"off\" class=\"isControl42 Three_show " + getControls(map) + "\" id=\"" + id + "\"  name=\"" + id
                    + "\" size=\"15\" " + s_ + " value=\"" + getJspValue(id) + "\"  "+data+" />";
        }
        return str;
    }
 
    /**
     * 43类型控件。下拉列表复选框
     *
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getSelect43(Map<String, Object> map, boolean shuai) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        List<String> list = DBHelper.getStrRepInfo(DBHelper.replaceBr(DBHelper.getValue(map, "SqlScript"))+DBHelper.replaceBr(DBHelper.getValue(map, "SqlWhere")), "&");
        if(list!=null && list.size()>0) {
             HashSet<String> set = new HashSet<String>(list); 
             for(String key:set) {
                key=key.toLowerCase();
                 panelBean.selectMap.put(key, id+(panelBean.selectMap.get(key)!=null?";"+panelBean.selectMap.get(key):""));
             }   
        }       
        String select = "<input id=\"" + id + "text\" name=\"" + id + "text\" value=\"" + getJspValue(id)
                + "\" type=\"hidden\">\r";
        select += " <select id=\"" + id + "\" class=\"js-" + id + " " + getControls(map) + "\" multiple=\"multiple\" ";
        select += getReadOnly(map);// style样式 1
        select += " ></select>\r";
        select += " <script>" + panelBean.sqlContype + "</script>";
        if (shuai) {
            select = getAll(map, select, shuai);// 权限控制
        }
        return select;
    }
 
    /**
     * 静态图标控件
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getBigIcon44(Map<String, Object> map, boolean shuai) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        String maxl=panelBean.maxl;
        map.put("readonly",1);//只读
        String icon = "<input type=\"" + ((DBHelper.getValueInt(map, "passwordchar") == 1) ? "password" : "text")
                + "\" ";
        icon += icon + " id=\"" + id + "\"  name=\"" + id + "\" " + maxl + " class=\"text isBigIcon " + getControls(map)
                + "\" value=\"" + getJspValue(id) + "\" ";
        icon = getAll(map, icon, true);// 这里可以提出来,还是提出来
        icon += getChange(panelBean); // 值发生改变处理
        icon += " />";
        icon +="<span class=\"bigIconImg44\" onclick=\"openIcon('"+id+"')\" title=\"点击浏览\">" +
                "<img id=\""+id+"-img44\" src=\"" + getJspValue(id) + "\"></span>";
        return icon;
    }
 
    /**
     * 获取取色器
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getColorFinder(Map<String, Object> map, boolean shuai) throws Exception {
        PanelBean panelBean = (PanelBean) map.get(PANEL_INFO);
        String id = panelBean.pHelper.id;
        //设置有sql条件(31控件类型)
        if(StringUtils.isNotBlank(DBHelper.getValue(map,"SqlWhere"))){
            String sql=DBHelper.getValue(map,"SqlWhere");
            String getBackStr=panelBean.getBackStr;
            boolean toKeBack=panelBean.toKeBack;
            String getAll = getBackStr + ((panelBean.keyBack) ? "keyDown('" + id + "',event);" : "");
            String getAllChan = getBackStr + ((toKeBack) ? "keyDown('123',event);" : "");
            String getChan = ((toKeBack) ? "keyDown('123',event);" : "");
            //判断是否只读
            boolean b=false;//默认组装进行
            b=(DBHelper.getValueInt(map, "ReadOnly") == 1?true:b);//只读状态不需要组装
            String selectStr="";
            selectStr += "\r\n<%try{";
            selectStr += "\r\n      sql = \"" + sql + "\";";
            selectStr += "\r\n      sql = DBHelper.getSqlWhere(sql,"+b+",\""+DBHelper.getValue(map, "editStatus")+"\",DBHelper.getValue(docMap,\"docstatus\"),\""+DBHelper.replaceBr(DBHelper.getValue(map, "SqlWhere"))+"\");";
            selectStr += "\r\n      SRS = build.getSqlRowSet(DBHelper.getValRepShi(sql,session,docMap, false));";
            selectStr += "\r\n %>";
            selectStr += "\r\n <input id=\"" + id + "text\" name=\"" + id + "text\" value=\"" + getJspValue(id)
                    + "\" type=\"hidden\">\r";
            selectStr += "<select class=\""+getControls(map)+"\" onchange=\"getColors46('" + id + "');getBackElse=true;"
                    + getAllChan + "upSub('" + id + "',@index@);\" "+getReadOnly(map)// 后加
                    + " onPropertyChange=\"if(panMain[panIndex].no_load_first){upSub('" + id + "',@index@);" + getChan
                    + "}\" onkeydown=\"" + getAll + "key_Delete_Selete(event,'" + id + "');\" name=\"" + id + "\" size=\"1\" id=\"" + id + "\">";
            if (DBHelper.getValueInt(map, "issuppressblanklinefordropdown") != 1) {
                selectStr += "\r\n      <option value style=\"background-color:white;color:white\"></option>";
            }
            selectStr += "\r   <% while(SRS!=null && SRS.next()){%> ";
            selectStr += "\r\n      <option value=\"<%= DBHelper.replaceBlank(SRS.getString(1))%>\" " +
                    "    style=\"background-color:<%= DBHelper.replaceBlank(SRS.getString(1))%>\"></option>";//<%=SRS.getObject(2)%>
            selectStr += "\r\n <% }%>";
            selectStr += "\r\n </select>";
            selectStr += "\r\n<%}catch(Exception e){";
            selectStr += "\r\n      throw e;";
            selectStr += "\r\n}%>\r\n";
            selectStr += getSelectfun(getJspValue(id), id);
            return selectStr;
        }
        //设置有外表单号(2控件类型)
        if(StringUtils.isNotBlank(DBHelper.getValue(map,"FT"))){
            return getColorOptions(map);
        }
        String color = "<input type=\"color\" id=\""+id+"\" class=\""+getControls(map)+"\" value=\""+getJspValue(id)+"\"";
        color += getReadOnly(map);// 这里可以提出来,还是提出来
        color += "/>";
        return color;
    }
 
    /**
     * 进度条
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getProgressBar(Map<String, Object> map, boolean shuai) throws Exception {
        PanelBean panelBean = (PanelBean) map.get(PANEL_INFO);
        String id = panelBean.pHelper.id;
        String data="data-id=\""+id+"\"";
        String bar = "<div "+data+" class=\"progressBar47 " + getControls(map) + "\"></div>";
        bar += "<input type=\"hidden\" id=\"" + id + "\" value=\"" + getJspValue(id) + "\">";
        return bar;
    }
 
    /**
     * css样式控件生成
     * @param map
     * @param shuai
     * @return
     * @throws Exception
     */
    private String getTextCssEdit(Map<String, Object> map, boolean bol)throws Exception{
        PanelBean panelBean = (PanelBean) map.get(PANEL_INFO);
        String id = panelBean.pHelper.id;
        String str = "";
        String s_ = getReadOnly(map); // 是否只读
        if (DBHelper.getValueInt(map, "HeightNum") > 1) {
            str += "<textarea class=\" Three_show " + getControls(map) + "\" id=\"" + id + "\" "
                    + "name=\"" + id + "\" " + s_ + " >" + getJspValue(id)
                    + "</textarea>";
        } else {
            str += "<input autocomplete=\"off\" class=\" Three_show " + getControls(map) + "\" id=\"" + id + "\"  "
                    + "name=\"" + id + "\" size=\"15\" " + s_ + "  value=\""
                    + getJspValue(id) + "\"  />";
        }
        String style = "";
        if (!DBHelper.getValue(map, "tabs38").equals("null")) {
            style = "position:absolute;z-index:1;margin-top:2px;";
        } else {
            int i = (DBHelper.getValueInt(map, "Hidelabel") == 1 ? 0 : 116);
            style = "display:block;margin-left:" + (256 * DBHelper.getValueInt(map, "LengthNum") - 22 - i) + "px;position:absolute;margin-top: -" + ((DBHelper.getValueInt(map, "HeightNum") * 29.2) - 2 - 5.2) + "px;";
        }
        str += "<span  class=\"AllShowType\" style=\"" + style + "border:0px solid #000000;\">"
                + "<img src=\"/images/ppp.gif\" id=\"" + id + "_click\" style=\"cursor: pointer;margin-left:-16px;\"  onclick=\""
                + (panelBean.treeMus ? "musChoies=true;" : "") + "getTextCssEdit({'id':'" + id + "','index':'@index@','onlyOne':'"
                + DBHelper.getValueInt(map, "onlyOne") + "'});" + (panelBean.treeMus ? "musChoies=false;" : "") + "\"/></span>";
        return str;
    }
 
    /**
     * 获得权限控制
     * @param sys
     * @throws Exception
     */
    private void getPermission(Map<String, Object> sys) throws Exception {
        PanelBean panelBean= (PanelBean) sys.get(PANEL_INFO);
        if (";34;".indexOf(";" + DBHelper.getValue(sys, "ControlType") + ";") == -1) {
            if (!DBHelper.getValue(sys, "EditStatus").trim().equals("")) {// 再加上判断状态,看看是否可以编辑,则此控件基本就可以了
                JsonArray read=new JsonArray();
//                fun = "0;pb#" + DBHelper.getValue(sys, "EditStatus") + ";pb#" + id + ";pb#"
//                        + ((hasButton) ? "true" : "false") + ";pb#" + DBHelper.getValue(sys, "ControlType");
                read.add(0);
                read.add(DBHelper.getValue(sys, "EditStatus"));
                read.add(panelBean.pHelper.id);
                read.add(((panelBean.hasButton) ? "true" : "false"));
                read.add(DBHelper.getValue(sys, "ControlType"));
                setFunLoadList(read, false,panelBean);
            }
            if (DBHelper.getValueInt(sys, "ReadOnly") == 1) {// 只读,js处理,避免一些未能考虑到,可以在js中逐步实现,不必要来更改类
                JsonArray read=new JsonArray();
//                fun = "1;pb#" + id + ";pb#" + DBHelper.getValue(sys, "ControlType");
                read.add(1);
                read.add(panelBean.pHelper.id);
                read.add(DBHelper.getValue(sys, "ControlType"));
                setFunLoadList(read, false,panelBean);
            }
        }
    }
 
    /**
     * f 通过,驳回,下一步 等等的审核
     *
     * @param map
     * @return
     * @throws Exception
     */
    private String getButtonNext(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        panelBean.hasButton = false;
        String buttonStr = "<span id=\"" + id + "ButtonS\" style=\"position: absolute; margin-top: -15;\">"
                + "<%if(bdMap.size()>0){%><table width=\"@butwidth@\"> <tr>";// <%if(atMap.size()>0&&nb){%>
        String addtd = "<td align=\"right\">";
        String onclickStr = "";
        String butwidht = "145";
        int cont = 0;
        if (panelBean.buttonList != null && panelBean.buttonList.size() > 0) {
            for (Map<String, Object> buttonMap : panelBean.buttonList) {// 查询按钮集合中是否有当前字段,有则在此上加按钮
                if (DBHelper.getValue(buttonMap, "fieldid").toLowerCase().equals(id)) {
                    String pawString = (DBHelper.getValueInt(buttonMap, "isShowPwdEdit") == 1) ? "true" : "false";// 弹出密码框
                    String ReturnCurChecker = DBHelper.getValue(buttonMap, "ReturnCurChecker");
                    String ReturnCurCheckerName = DBHelper.getValue(buttonMap, "ReturnCurCheckerName");
                    boolean isInspection = (DBHelper.getValueInt(buttonMap, "isInspection") == 1 ? true : false);// 是否禁止必录检查
                    String getBtnStr = pawString + ",'" + DBHelper.getValueInt(buttonMap, "formid") + "',"
                            + "'<%=URL%>/',this," + isInspection + ",'" + DBHelper.getValue(buttonMap, "ExternalURL")
                            + "'," + DBHelper.getValueInt(buttonMap, "UrlShowLocation") + ","
                            + DBHelper.getValue(buttonMap, "buttonID");
                    String url1 = DBHelper.getValueInt(buttonMap, "FT") + "/"
                            + DBHelper.getValueInt(buttonMap, "FTFormType") + "/index.jsp";
                    switch (DBHelper.getValueInt(buttonMap, "SelectChecker")) {
                        case 0:
                            onclickStr = "getBtn(" + getBtnStr + ");";
                            break;
                        case 1:
                            onclickStr = "createPopSelect('" + ReturnCurChecker + "','" + ReturnCurCheckerName + "',"
                                    + getBtnStr + ");";
                            break;
                        case 2:
                            onclickStr = "mulChoice2('" + DBHelper.getValue(buttonMap, "FK") + "','"
                                    + DBHelper.getValue(buttonMap, "SeekGroupID") + "','"
                                    + DBHelper.getValue(buttonMap, "sPremissField") + "','"
                                    + DBHelper.getValue(buttonMap, "dPremissField") + "','"
                                    + DBHelper.getValue(buttonMap, "FKeFilter") + "','<%=URL%>/app'+spellPath+'" + url1
                                    + "'," + getBtnStr + ");";
                            break;
                        default:
                            break;
                    }
                    if (cont > 1) {
                        butwidht = "175";
                    }
                    cont++;
                    String parString = id + ";" + DBHelper.getValue(buttonMap, "docitem");
                    String bds = "<%if(DBHelper.getValue(bdMap,\"" + DBHelper.getValue(buttonMap, "buttonID")
                            + "\").equals(\"1\")){%>";
                    buttonStr += addtd + bds + "<input id=\"" + DBHelper.getValue(buttonMap, "buttonID")
                            + "\" type=\"button\" class=\"easyui-linkbutton l-btn-text\" style=\"width:"+(DBHelper.getValue(buttonMap, "ButtonName").length())*20+"px;\" "
                            + "value=\"" + DBHelper.getValue(buttonMap, "ButtonName")
                            + "\" onClick=\"setOa('" + parString + "');" + onclickStr + "\" /><%}%></td>";// +"<%}%>";//<%if(docstatePan==DBHelper.getValueInt(atMap,\""+DBHelper.getValue(buttonMap,
                    // "buttonID")+"\")){%>
                    panelBean.hasButton = true;
                }
            }
        }
        if (panelBean.hasButton) {
            int tdLen = DBHelper.getValueInt(map, "tdLen") - 120;
            map.remove("tdLen");
            map.put("tdLen", tdLen);
        }
        buttonStr = buttonStr.replace("@butwidth@", butwidht);
        buttonStr += "</tr></table><%}%></span>";// <%}%>
        return panelBean.hasButton ? buttonStr : "";
    }
 
    private String getMassterCodeKeyDown(Map<String, Object> map, boolean shuai) throws Exception {// 这有一定用,很多没有设置信息却又带回了值,依照这个解决
        String iniv = DBHelper.getValue(map, "InitValue");
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String reString = "";
        String upinv = null;
        if (DBHelper.getValueInt(map, "FT") != 0) {
            reString = "(event,'" + panelBean.pHelper.id + "','@index@');";
            if (iniv != null) {
                upinv = iniv.toUpperCase().trim();
                reString = (("MASTERCODE".equals(upinv)) ? "getBackAll" : "getBack") + reString;
            } else {
                reString = "getBack" + reString;
            }
        }
        return reString;
    }
 
 
    public String getSelectAndCheckBox(String fieldid, String StatisID, String StatisType, String fieldCaption, PanelBean panelBean)
            throws Exception {
        panelBean.bian38++;//
        panelBean.pHelper.id = fieldid.toLowerCase();// "checkId__" + bian38;
        String checkId2 = panelBean.pHelper.id + "vulue"; // 复选框
        String str = "<input id=\"" + panelBean.pHelper.id + "\" name=\"checkName\" type=\"checkbox\" onchange='checkChange()' />";
        str += "<input type=\"hidden\" id='" + checkId2 + "' name=\"" + checkId2 + "\" value=\"" + StatisID + "#P#"
                + fieldid + "#P#" + StatisType + "#P#" + fieldCaption + "\">";// 后改
        // by
        // danaus
        // 因为字段名有可能是自定义sql,会存在,号的情况
        return str;
    }
 
    public String getSelectAndCheckBoxs(String s, String StatisID, String fieldid, String FieldAlias, String StatisType,
                                        String Sequence, String DisplayWidth, String displayformat, String displayYN, String isFilterZero,
                                        String jionFlag, String jionFlagGroup, String conFlag, String modfvalues, String modfvalues2,
                                        String FieldCaption,PanelBean panelBean) throws Exception {
        panelBean. bian38++;//
        panelBean.pHelper.id = fieldid.toLowerCase();// "checkId__" + bian38;
        // int a=0;
        String checkId2 = s; // 复选框
        // a++;
        String str = "<input id=\"" + panelBean.pHelper.id + "\" name=\"checkName\" type=\"hidden\" onchange='checkChange()' />";
        str += "<input type=\"hidden\" id='" + checkId2 + "' name=\"" + checkId2 + "\" value=\"" + StatisID + "#P#"
                + fieldid + "#P#" + FieldAlias + "#P#" + StatisType + "#P#" + Sequence + "#P#" + DisplayWidth + "#P#"
                + displayformat + "#P#" + displayYN + "#P#" + isFilterZero + "#P#" + jionFlag + "#P#" + jionFlagGroup
                + "#P#" + conFlag + "#P#" + modfvalues + "#P#" + modfvalues2 + "#P#" + FieldCaption + "\"></input>";// 后改
        // by
        // danaus
        // 因为字段名有可能是自定义sql,会存在,号的情况
 
        return str;
    }
 
    public String getSelectAndCheckBoxss(String StatisID, String fieldid, String FieldAlias, String StatisType,
                                         String Sequence, String DisplayWidth, String displayformat, String displayYN, String isFilterZero,
                                         String jionFlag, String jionFlagGroup, String conFlag, String modfvalues, String modfvalues2,
                                         String FieldCaption, PanelBean panelBean) throws Exception {
        panelBean.bian38++;//
        panelBean.pHelper.id = fieldid.toLowerCase();// "checkId__" + bian38;
        String str = StatisID + "#P#" + fieldid + "#P#" + FieldAlias + "#P#" + StatisType + "#P#" + Sequence + "#P#"
                + DisplayWidth + "#P#" + displayformat + "#P#" + displayYN + "#P#" + isFilterZero + "#P#" + jionFlag
                + "#P#" + jionFlagGroup + "#P#" + conFlag + "#P#" + modfvalues + "#P#" + modfvalues2 + "#P#"
                + FieldCaption + "&#039;";// 后改 by danaus
        // 因为字段名有可能是自定义sql,会存在,号的情况
 
        return str;
    }
 
    /**
     * 给控件设置长高
     * @param map
     * @return
     */
    private String getControls(Map<String, Object> map) {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        String controls = (DBHelper.getValueInt(map, "Hidelabel") == 1 ? "controlsm" : "controlsc");
        controls += DBHelper.getValueInt(map, "LengthNum");
        controls += " AllControlsWH";
        if (DBHelper.getValueInt(map, "ControlType") == 38) {
            controls += " controlsd"+DBHelper.getValueInt(map, "HeightNum");
        } else {
            controls += ((DBHelper.getValueInt(map, "ControlType") == 9
                    || DBHelper.getValueInt(map, "ControlType") == 19 ) ? ""
                    : " controlsr" + DBHelper.getValueInt(map, "HeightNum"));
        }
        //在选页卡里面的控件需要添加这个css-xin 2018-11-5 15:20:33       
        if(!DBHelper.getValue(map, "tabs38").equals("null")){
             int i=DBHelper.getValueInt(panelBean.control38height, DBHelper.getValue(map, "tabsheetname"));
             if(i>0 && DBHelper.getValueInt(map, "RowNo")<i) {
                 controls+=" z_indexTabs";
             }else if(i>0 && DBHelper.getValueInt(map, "RowNo")==i) {
                 controls+=" jiaNum";
             }
        }
        return controls;
    }
 
    /**
     * 精准查找
     * @param ids
     * @return
     * @throws Exception
     */
    private String getCheck(String ids,PanelBean panelBean) throws Exception {
        String str = "";
        String checkId = ids + "CheckBox";
        str += "<input id=\"" + checkId + "\" name=\"" + checkId + "\" type=\"checkbox\" ";
        str += " style=\"width:15px;height:15px;margin-left:5px;\" ";
        str += getKeyDown(panelBean);
        str += " onClick=\"document.getElementById('" + ids + "').value=document.getElementById('" + checkId
                + "').checked ? '1' : '0' ;\" />" + "<input type=\"hidden\" id='" + ids + "' name=\"" + ids
                + "\" value=\"0\" onPropertyChange=\"cheeckValueChan('" + panelBean.pHelper.id + "')\">";
        return str;
    }
 
    /**
     * 42类型控件调用到
     * sugg--列表显示的字段 backFilds-取外表字段,以便选择后返回哪些值。 tp ---自表字段,返回给哪些字段
     * ftformtype的值是关联表号的对应窗体类型
     */
    public String getSuggestFilds(String ft, String sugg,int ftformtype) {// 取得需要的字段名称
        int flg = 0;
        if (ftformtype == 20) {//20窗体类型是从表
            flg = 1;
        }
        List<Map<String, Object>> suglit = new ArrayList<>();
        try {
            String sql = " select FieldID,fieldname,controltype,displayformat,GridCaption,ShowOnGrid from gfield where formid=? and HeadFlag=?  order by statisid asc";
            List<Map<String, Object>> list = gridService.getSimpleJdbcTemplate().queryForList(sql,
                    new Object[]{ft, flg});
            String[] tem = sugg.replaceAll(",", ";").split(";");
            for (String sug : tem) {
                for (Map<String, Object> map : list) {
                    if (sug.equalsIgnoreCase((String) map.get("FieldID"))) {
                        Map<String, Object> sugMap = new HashMap<>();
                        sugMap.put("field", sug.toLowerCase());
                        sugMap.put("title", map.get("fieldname") == null
                                ? (String) map.get("GridCaption") : (String) map.get("fieldname"));
                        sugMap.put("controlType", DBHelper.getValueInt(map,"controltype"));
                        sugMap.put("displayformat", DBHelper.getValue(map,"displayformat"));
//                        sugMap.put("width", 150);
                        sugMap.put("align", "center");
                        if (GridUtils.prossRowSetDataType_Int(map, "ShowOnGrid") <= 0) {
                            sugMap.put("hide", true);//隐藏
                        }
                        suglit.add(sugMap);
                    }
                }
            }
            return "data-title=\"" + GridUtils.toJson(suglit).replaceAll("\"", "'") + "\" ";
        } catch (Exception e) {
            return "";
        }
    }
 
    private String getSelectfun(String showValue, String kongId) throws Exception {
        return getScriptFun("seletMorenOrValue('" + showValue + "','" + kongId + "');");// 转换一个函数,避免与页面逻辑共用一个函数出错
    }
 
    private String getCheckFun(String kongId) throws Exception {
        return getScriptFun("cheeckSValueChan('" + kongId + "');");
    }
 
    private String getRadiosFun(String id) throws Exception {
        return getScriptFun("radioValueChan('" + id + "');");
    }
 
    private String getScriptFun(String fun) throws Exception {
        return "<script type=\"text/javascript\">" + fun + "</script>\r\n";//language=\"javascript\"
    }
 
    // ----------------map
    private String getAll(Map<String, Object> sys, String str, boolean shuai) throws Exception {
        PanelBean   panelBean=(PanelBean)sys.get(PANEL_INFO);
        if (shuai) {
            str += getReadOnly(sys); // 是否只读
            str += getKeyDown(panelBean); // 键盘按下处理
        } else {
            str += getReadOnly(sys); // 是否只读
            str += getChange(panelBean); // 值发生改变处理
            str += getKeyDown(panelBean); // 键盘按下处理
        }
 
        return str;
    }
 
    private String getChange(PanelBean panelBean) throws Exception {
        String yanZheng = "";// 添加验证脚本
        yanZheng = getVerification(panelBean).trim();
        String str = " onPropertyChange=\"" + yanZheng + panelBean.dyfieldStr + "upSub('" + panelBean.pHelper.id + "',@index@);\" onChange=\"" + yanZheng
                + "upSub('" + panelBean.pHelper.id + "',@index@);\"";
        return str;
    }
 
    private String getVerification(PanelBean panelBean) throws Exception {
        String yanZheng = "";
        if (panelBean.pHelper.verificationMap != null && panelBean.pHelper.verificationMap.size() > 0) {
            if (panelBean.pHelper.verificationMap.get(panelBean.pHelper.id) != null) {
                switch (Integer.parseInt(panelBean.pHelper.verificationMap.get(panelBean.pHelper.id))) {
                    case 1:// 数字
                        yanZheng = "math(/^[-]?[0-9]*[.]?[0-9]*$/,'" + panelBean.pHelper.id + "','输入必须数字');";
                        break;
                    case 2:// 表示text,ntext,image之类
                        break;
                    case 3:// 字符
                        break;
                    case 4:// 日期
                        break;
                    default:
                        break;
                }
            }
        }
        return yanZheng;
    }
 
    private String getKeyDown(PanelBean panelBean) throws Exception {
        return (panelBean.keyBack) ? " onkeydown=\"keyDown('" + panelBean.pHelper.id + "',event);\" " : "";
    }
 
    /**
     * 只读
     * @param map
     * @return
     * @throws Exception
     */
    private String getReadOnly(Map<String, Object> map) throws Exception {
        PanelBean panelBean= (PanelBean) map.get(PANEL_INFO);
        PanelParmHelper pHelper = panelBean.pHelper;
        int hei = pHelper.rowHei * DBHelper.getValueInt(map, "HeightNum");
        hei = ((pHelper.kongHei != pHelper.rowHei && DBHelper.getValueInt(map, "HeightNum") != 1)
                ? 2 * hei - pHelper.rowHei - 6 : hei) - 6;
        String str = "style=\"";
        if (DBHelper.getValue(map, "styleCss").indexOf("!") != -1) {
        } else {
            String fenh = DBHelper.getValue(map, "styleCss");
            if (!"".equals(fenh)) {
                boolean bol = (fenh.substring(fenh.length() - 1, fenh.length()).indexOf(";") != -1);
                str += DBHelper.getValue(map, "styleCss") + (bol ? "" : ";");
            } else {
                str += fenh;
            }
        }
        if (DBHelper.getValueInt(map, "uppercase") == 1) {// 大写形式输入
            str += " text-transform: uppercase;";
        }
        if(DBHelper.getValueInt(map, "ControlType")==31 || DBHelper.getValueInt(map, "ControlType")==2){
            str += "height:24px;";
        }
        if (DBHelper.getValueInt(map, "ReadOnly") == 1) {
            panelBean.tabindexIs--;// 只读tabindex还原
            if (DBHelper.getValue(map, "styleCss") == "" || DBHelper.getValue(map, "styleCss") == null) {
                str += " background:#CCC; border:#999 1px solid; color:#000;\"  readonly=\"readonly\"  ";//
            } else {
                if (DBHelper.getValue(map, "styleCss").indexOf("background") != -1) {
                } else {
                    str += " background:#CCC; ";
                }
                if (DBHelper.getValue(map, "styleCss").indexOf("border") != -1) {
                } else {
                    str += "border:#999 1px solid; ";
                }
                if (DBHelper.getValue(map, "styleCss").indexOf("color") != -1) {
                } else {
                    str += "color:#000;";
                }
                str += " readonly=\"readonly\"";
            }
        } else {
            str += " \" tabindex=\"" + panelBean.tabindexIs + "\"";
        }
        return str;
    }
 
    /**
     *
     *
     * 38类型面板上增加的下拉编码实现
     *
     * @param colId
     *            列名
     * @param ft
     *            设置下拉到外表id
     * @param invalue
     *            给定的初始值(默认选择项)
     * @return 下拉的网页编码
     */
    public String getOptions(String colId, int ft, String invalue) throws Exception {
        String selectStr = "<select ";
        selectStr += " name=\"" + colId + "\" size=\"1\" id=\"" + colId + "\">";
        String sql = "select * from _sysdict where dictid = " + ft;
        List<HashMap<String, String>> list = null;
        list = sqlDBHelperIfc.getHashMap(sql);
        for (HashMap<String, String> map : list) {
            selectStr += "\r\n<option value=\"" + map.get("intervalue") + "\" ";
            if (invalue.trim().equals(map.get("dictvalue").trim())) {
                selectStr += " selected ";
            }
            selectStr += ">" + map.get("dictvalue") + "</option>";
        }
        selectStr += "</select>";
        return selectStr;
    }
 
    /**
     * 是否必录
     * @param map
     * @return
     * @throws Exception
     */
    private static String getKeyInput(Map<String, Object> map) throws Exception {
        String style="";
        if(!DBHelper.getValue(map, "tabs38").equals("null")){
            style="style=\"margin-left:"+((256*DBHelper.getValueInt(map, "LengthNum"))-12-8)+"px;position:absolute;\"";
        }
        return (DBHelper.getValueInt(map, "KeyInput") == 1?
                "<div class=\"bilus\" "+style+" title=\"必录\">✲</div>":"<div class=\"bilus\"></div>");
    }
 
    // 得到隐藏网页代码
    public String getHidText(Map<String, Object> sys) throws Exception {
        PanelBean panelBean= (PanelBean) sys.get(PANEL_INFO);
        getPermission(sys);
        if ((DBHelper.getValueInt(sys, "isCustomHTMLComponent") == 1
                && DBHelper.getValueInt(sys, "MasterFieldShowLocation") == 0)) {
            return "";// 因为是36控件字段 ,不输出控件,如果不在第二个面板则输出
        }
        return "<input id=\"" + panelBean.pHelper.id + "\" value=\"" + getJspValue(panelBean.pHelper.id) + "\" type=\"hidden\" />";
    }
 
    // 得到_expr隐藏网页代码
    public String getHidTextexpr(Map<String, Object> sys) throws Exception {
        PanelBean panelBean= (PanelBean) sys.get(PANEL_INFO);
        String id=panelBean.pHelper.id;
        getPermission(sys);
        if ((DBHelper.getValueInt(sys, "isCustomHTMLComponent") == 1
                && DBHelper.getValueInt(sys, "MasterFieldShowLocation") == 0)) {
            return "";// 因为是36控件字段 不输出控件,如果不在第二个面板则输出
        }
        String inp = "";
        if (!DBHelper.getValue(sys, "showfieldvalueexpression").equals("")) {
            inp += "<input id=\"" + id + "_expr\" value=\"" + getJspValue(id + "_expr") + "\" type=\"hidden\" />";
        }
        if (!DBHelper.getValue(sys, "stylecss").equals("")) {
            inp += "<input id=\"" + id + "_css\" value=\"" + getJspValue(id + "_css") + "\" type=\"hidden\" />";
        }
        return inp;
    }
 
 
 
}