2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
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
package com.landtool.lanbase.modules.res.service.impl;
 
import java.io.IOException;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.landtool.lanbase.common.utils.HttpOperateUtils;
import com.landtool.lanbase.config.SysTemPropertyConfig;
import com.landtool.lanbase.modules.res.dao.ZiYuanMuLuMapper;
import com.landtool.lanbase.modules.res.entity.Res_Catalog;
import com.landtool.lanbase.modules.res.entity.Res_MainInfo;
import com.landtool.lanbase.modules.res.entity.UserDefined.UserDef_ZYML_ChaXunQu;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_DanWeiTongJi;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_GongXiangXieYi;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_ShiJianTongJi;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_XingZhengQuHua;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_ZYTJ_ShenHeZhuangTai;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_ZYTJ_XingZhengQuHua;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_ZYTJ_ZiYuanLeiXing;
import com.landtool.lanbase.modules.res.entity.UserDefined.ZiYuanMuLu.UserDef_ZiYuanLeiXing;
import com.landtool.lanbase.modules.res.service.ZiYuanMuLuService;
import com.landtool.lanbase.modules.sys.service.SysFieldvalueService;
 
 
/**
 * 资源目录
 */
@Service("ZiYuanMuLuService")
public class ZiYuanMuLuServiceImpl implements ZiYuanMuLuService {
 
    @Autowired
    private ZiYuanMuLuMapper ziYuanMuLuMapper;
 
    @Autowired
    private SysTemPropertyConfig sysConfig;
 
    @Autowired
    private SysFieldvalueService fieldUtils;
 
    /**
     * 获取资源目录树数据
     */
    @Override
    public String getTreeData(int id, int treeType, String XZQHID, String NF, int IsSC) {
 
        //String apiServer = sysConfig.getApiServer();  //临时
 
        String result = "";
        Map<String, Object> map = new HashMap<>();
        map.put("parentid", id);
        map.put("xzqhid", XZQHID);
        if(NF != null && !NF.isEmpty()) {
            map.put("nf", NF);
        }
        map.put("shoucang", IsSC);
        if (treeType == 0) {  //资源目录
            List<Res_Catalog> resCatalogList = ziYuanMuLuMapper.getTreeData(map);
            for (Res_Catalog resCatalog : resCatalogList) {
                int childCount = ziYuanMuLuMapper.getChildNodeCount(resCatalog.getCatlogid());
                if (result.length() > 0) {
                    result += ",";
                }
                //result += (result.length() > 0 ? "," : "");
                result += "{ id:" + resCatalog.getCatlogid() + ", code: '" + resCatalog.getCatlogcode() + "', name:'" + resCatalog.getTitle() + "', pId:" + resCatalog.getParentid() + ", rpId:" + resCatalog.getParentid() + (childCount > 0 ? ",isParent:true" : "") + " }";
            }
        }
        else if (treeType == 4) {  //资源类型
//            LinkedHashMap<String, String> ResourceTypeList = fieldUtils.getFieldListByKey("ResourceType");  //获取资源类型列表
//            List<Res_MainInfo> resMainInfoList = resCatalogService.getResourceClassTreeData(map);
//            if(resMainInfoList.size() > 0) {
//                String[] arr = new String[resMainInfoList.size()];
//                for (int i = 0; i < resMainInfoList.size(); i++) {
//                    arr[i] = resMainInfoList.get(i).getResourceclass();
//                }
//                Iterator<Map.Entry<String, String>> iterator = ResourceTypeList.entrySet().iterator();
//                while(iterator.hasNext())
//                {
//                    Map.Entry<String, String> entry = iterator.next();
//                    if(Arrays.binarySearch(arr, entry.getKey()) > -1) {
//                        result += (result.length() > 0 ? "," : "") + "{id:'" + entry.getKey() + "', code: '" + entry.getKey() + "', name:'" + entry.getValue() + "'}";
//                    }
//                }
//            }
            return "";
        }
        return "[" + result + "]";
 
        //return ziYuanMuLuMapper.getTreeData(map);
    }
 
    /**
     * 获取子节点数量
     */
    //public int getChildNodeCount(int parentId) {
    //    return ziYuanMuLuMapper.getChildNodeCount(parentId);
    //}
 
    /**
     * 资源类型图表
     */
    @Override
    public String getZiYuanLeiXingChart() {
        String jsonResult = "";
        LinkedHashMap<String, String> resourceTypeList = fieldUtils.getFieldListByKey("ResourceType");
        List<UserDef_ZiYuanLeiXing> list = ziYuanMuLuMapper.getZiYuanLeiXingChart();
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        //多于4个类型的话数据显示前7个资源数量最多的类型,后面的都以其它统计
        if (list.size() > 4) {
            int counter = 0;
            for (int i = 4; i < list.size(); i++) {
                counter += list.get(i).getRecordcount();
            }
            for (int i = 0; i < 4; i++) {
                UserDef_ZiYuanLeiXing item = list.get(i);
                String leixing = resourceTypeList.get(item.getResourceclass());
                seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + leixing + "'}";
                legendData += (legendData == "" ? "" : ",") + "'" + leixing + "'";
                recordcount += item.getRecordcount();
            }
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + counter + ", name: '" + "其它" + "'}";
            legendData += (legendData == "" ? "" : ",") + " '" + "其它" + "'";
            recordcount += counter;
        }
        //少于等于4个类型就全部显示
        else {
            for (int i = 0; i < list.size(); i++) {
                UserDef_ZiYuanLeiXing item = list.get(i);
                String leixing = resourceTypeList.get(item.getResourceclass());
                seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + leixing + "'}";
                legendData += (legendData == "" ? "" : ",") + "'" + leixing + "'";
                recordcount += item.getRecordcount();
            }
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 行政区划统计图
     */
    @Override
    public String getXingZhengQuHuaChart() {
        String jsonResult = "";
        String apiServer = sysConfig.getApiServer();
        List<UserDef_XingZhengQuHua> list = ziYuanMuLuMapper.getXingZhengQuHuaChart();
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        String jsonStr = "";
        String getRegionInfourl = apiServer + "/api/org/region/queryList";
        try {
            jsonStr = HttpOperateUtils.httpGet(getRegionInfourl.trim());
        }
        catch (IOException e) {
            e.printStackTrace();
        }
        JSONArray XZQHItem = JSONObject.parseArray(jsonStr);
        if (list.size() > 5) {
            int XZcounter = 0;
            for (int i = 5; i < list.size(); i++) {
                XZcounter += list.get(i).getRecordcount();
            }
            for (int i = 0; i < 5; i++) {
                UserDef_XingZhengQuHua item = list.get(i);
                String quhua = item.getAdministrativeid().trim();
                if (quhua.length() > 0) {
                    if (!quhua.substring(2, quhua.length()).equals("0000")) {
                        quhua = quhua.substring(0, 2) + "0000";   //下级市区归属到省
                    }
                } else {
                    continue;
                }//为空跳过
                for (int j = 0; j < XZQHItem.size(); j++) {
                    JSONObject temp = (JSONObject) XZQHItem.get(j);
                    String regionid = temp.getString("regionid");
                    if (regionid.equals(quhua)) {
                        quhua = temp.getString("regionname");
                        break;
                    }
                }
                seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + quhua + "'}";
                legendData += (legendData == "" ? "" : ",") + "'" + quhua + "'";
                recordcount += item.getRecordcount();
            }
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + XZcounter + ", name: '" + "其它" + "'}";
            legendData += (legendData == "" ? "" : ",") + " '" + "其它" + "'";
            recordcount += XZcounter;
        } else {
            for (int i = 0; i < list.size(); i++) {
                UserDef_XingZhengQuHua item = list.get(i);
                String quhua = item.getAdministrativeid().trim();
                if (quhua.length() > 0) {
                    if (!quhua.substring(2, quhua.length()).equals("0000")) {
                        quhua = quhua.substring(0, 2) + "0000";   //下级市区归属到省
                    }
                } else {
                    continue;
                }//为空跳过
                for (int j = 0; j < XZQHItem.size(); j++) {
                    JSONObject temp = (JSONObject) XZQHItem.get(j);
                    String regionid = temp.getString("regionid");
                    if (regionid.equals(quhua)) {
                        quhua = temp.getString("regionname");
                        break;
                    }
                }
                seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + quhua + "'}";
                legendData += (legendData == "" ? "" : ",") + "'" + quhua + "'";
                recordcount += item.getRecordcount();
            }
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 资源概况 - 共享协议
     */
    @Override
    public String getGongXiangXieYiChart() {
        String jsonResult = "";
        //LinkedHashMap<String, String> GongXiangXieYiList = FieldUtils.getFieldListByKey("SharProtocol", env.getProperty("backstageWebRoot"));//获取共享协议列表
        List<UserDef_GongXiangXieYi> list = ziYuanMuLuMapper.getGongXiangXieYiChart();
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        for (int i = 0; i < list.size(); i++) {
            UserDef_GongXiangXieYi item = list.get(i);
            String xieyi = item.getSharprotocol();
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + xieyi + "'}";
            legendData += (legendData == "" ? "" : ",") + "'" + xieyi + "'";
            recordcount += item.getRecordcount();
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 资源概况 - 时间统计
     */
    @Override
    public String getShiJianTongJiChart(UserDef_ZYML_ChaXunQu userDefZymlChaXunQu) {
        String jsonResult = "";
        String legend = "";
        String xAxis = "";
        LinkedHashMap<String, String> resourceClass = fieldUtils.getFieldListByKey("ResourceType");  //获取所有资源类型
        LinkedHashMap<String, String> hasDataResourceClass = new LinkedHashMap<String, String>();    //有数据的资源类型
        Calendar calendar = Calendar.getInstance();
        int currentYear = calendar.get(Calendar.YEAR);         //本年
        int currentMonth = calendar.get(Calendar.MONTH) + 1;   //本月
        int lastYear = currentYear - 1;                        //去年
        String str_lastYear_Month = "";                        //去年已过的月份
        String str_currentYear_Month = "";                     //本年已过的月份
 
        //获取本年的月份
        for (int i = currentMonth; i >= 1 ; i--) {
            if (!str_currentYear_Month.isEmpty()) {
                str_currentYear_Month += ",";
            }
            str_currentYear_Month += String.valueOf(i);
        }
 
        //获取去年的月份
        for (int i = 12; ; i--) {
            if(str_currentYear_Month.split(",").length+str_lastYear_Month.split(",").length>=24||i<=0){
                break;
            }
            if (!str_lastYear_Month.isEmpty()) {
                str_lastYear_Month += ",";
            }
            str_lastYear_Month += String.valueOf(i);
        }
 
        //SQL查询的条件参数
        Map<String,Object> paramMap = new HashMap<String,Object>();
        paramMap.put("lastYear", lastYear);
        paramMap.put("str_lastYear_Month", str_lastYear_Month);
        paramMap.put("currentYear", currentYear);
        paramMap.put("str_currentYear_Month", str_currentYear_Month);
        //mainInfo查询条件
        paramMap.put("title",userDefZymlChaXunQu.getTitle());
        paramMap.put("resourceclass",userDefZymlChaXunQu.getResourceclass());
        paramMap.put("createuserid",userDefZymlChaXunQu.getCreateuserid());
        paramMap.put("catlogcode",userDefZymlChaXunQu.getCatlogcode());
        paramMap.put("datasources",userDefZymlChaXunQu.getDatasources());
        paramMap.put("ExistPermission",userDefZymlChaXunQu.getExistPermission());
        paramMap.put("sourcetype",userDefZymlChaXunQu.getSourcetype());
        paramMap.put("filetype",userDefZymlChaXunQu.getFiletype());
        paramMap.put("integratetype",userDefZymlChaXunQu.getIntegratetype());
        paramMap.put("showmodel",userDefZymlChaXunQu.getShowmodel());
        paramMap.put("rendermode",userDefZymlChaXunQu.getRendermode());
        paramMap.put("publishsoft",userDefZymlChaXunQu.getPublishsoft());
        paramMap.put("basemaptype",userDefZymlChaXunQu.getBasemaptype());
        paramMap.put("imageaccuracy",userDefZymlChaXunQu.getImageaccuracy());
        paramMap.put("servertype",userDefZymlChaXunQu.getServertype());
        paramMap.put("type",userDefZymlChaXunQu.getType());
        paramMap.put("tmpublishsoft",userDefZymlChaXunQu.getTmpublishsoft());
        paramMap.put("ywpublishsoft",userDefZymlChaXunQu.getYwpublishsoft());
        paramMap.put("databasealias",userDefZymlChaXunQu.getDatabasealias());
        paramMap.put("espproxy",userDefZymlChaXunQu.getEspproxy());
        paramMap.put("pubdateBegin",userDefZymlChaXunQu.getPubdateBegin());
        paramMap.put("pubdatefinish",userDefZymlChaXunQu.getPubdatefinish());
        paramMap.put("resourcestatus",userDefZymlChaXunQu.getResourcestatus());
        List<UserDef_ShiJianTongJi> list = ziYuanMuLuMapper.getShiJianTongJiChart(paramMap);
 
        //构造 Legend
        for (int i = 0; i < list.size(); i++) {
            UserDef_ShiJianTongJi item = list.get(i);
            String resTypeKey = item.getResourceclass();
            String resTypeValue = resourceClass.get(resTypeKey);
            if (legend.indexOf(resTypeValue) > -1) {
                continue;
            }
            else {
                if (!legend.isEmpty()) {
                    legend += ",";
                }
                legend += "{name: '" + resTypeValue + "', key: '" + resTypeKey + "', icon: 'rect'}";
                hasDataResourceClass.put(resTypeKey, resTypeValue);
            }
        }
        legend = "Legend: [" + legend + "]";
 
        //构造本年和去年 xAxis
        String[] arr_currentYear_Month = str_currentYear_Month.split(",");
        for (int i = 0; i < arr_currentYear_Month.length; i++) {
            if (!xAxis.isEmpty()) {
                xAxis += ",";
            }
            xAxis += "'" + arr_currentYear_Month[i] + "月'";
        }
        String[] arr_lastYear_Month = str_lastYear_Month.split(",");
        int MonthCount=arr_currentYear_Month.length;
        for (int i = 0; i < arr_lastYear_Month.length; i++) {
            if(MonthCount>=12){ break;}
            MonthCount++;
            if (!xAxis.isEmpty()) {
                xAxis += ",";
            }
            xAxis += "'去年" + arr_lastYear_Month[i] + "月'";
 
        }
        xAxis = "xAxis: [" + xAxis + "]";
 
        //构造 Series
        String series = "";
        Iterator iter = hasDataResourceClass.entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry entry = (Map.Entry) iter.next();
            String resClass = entry.getKey().toString();
            if (!series.isEmpty()) {
                series += ",";
            }
            series += "" + resClass + ": [" + getShiJianTongJiData(resClass, list, arr_currentYear_Month, arr_lastYear_Month, currentYear, lastYear) + "]";
        }
        series = "Series: {" + series + "}";
 
        jsonResult = "{" + legend + ", " + xAxis + ", " + series + "}";
        return jsonResult;
    }
 
    /**
     * 获取数据
     */
    private String getShiJianTongJiData(String resourceClass, List<UserDef_ShiJianTongJi> list, String[] arr_currentYear_Month, String[] arr_lastYear_Month, int currentYear, int lastYear) {
        String data = "";
        //本年
        for (int i = 0; i < arr_currentYear_Month.length; i++) {
            boolean isFind = false;
            if (!data.isEmpty()) {
                data += ",";
            }
            for (int j = 0; j < list.size(); j++) {
                UserDef_ShiJianTongJi item = list.get(j);
                if (resourceClass.equals(item.getResourceclass()) && currentYear == item.getYear() && Integer.valueOf(arr_currentYear_Month[i]) == item.getMonth()) {
                    data += String.valueOf(item.getRecordcount());
                    isFind = true;
                    break;
                }
            }
            //没有找到就为零
            if (isFind == false) {
                data += String.valueOf(0);
            }
        }
        //去年
        int MonthDataCount=arr_currentYear_Month.length;
        for (int i = 0; i < arr_lastYear_Month.length; i++) {
            if(MonthDataCount>=12){break;}
            MonthDataCount++;
            boolean isFind = false;
            if (!data.isEmpty()) {
                data += ",";
            }
            for (int j = 0; j < list.size(); j++) {
                UserDef_ShiJianTongJi item = list.get(j);
                if (resourceClass.equals(item.getResourceclass()) && lastYear == item.getYear() && Integer.valueOf(arr_lastYear_Month[i]) == item.getMonth()) {
                    data += String.valueOf(item.getRecordcount());
                    isFind = true;
                    break;
                }
            }
            //没有找到就为零
            if (isFind == false) {
                data += String.valueOf(0);
            }
        }
        return data;
    }
 
    /**
     * 资源概况 - 单位统计
     */
    @Override
    public String getDanWeiTongJiChart() {
        String jsonResult = "";
        List<UserDef_DanWeiTongJi> pubunitidList = ziYuanMuLuMapper.getDanWeiTongJiChart();
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        String UnitStr = "";
        for (int i = 0; i < pubunitidList.size(); i++) {
            UserDef_DanWeiTongJi item = pubunitidList.get(i);
            String id = item.getPubunitid();
            String getUnitInfourl = sysConfig.getApiServer() + "/api/org/unit/getInfoById/" + id;
            try {
                UnitStr = HttpOperateUtils.httpGet(getUnitInfourl.trim());
            } catch (IOException e) {
                e.printStackTrace();
            }
            JSONObject UnitData = JSONObject.parseObject(UnitStr);
            String temp = UnitData.getString("unitname");
            seriesData += (seriesData == "" ? "" : ",") + item.getRecordcount();
            legendData += (legendData == "" ? "" : ",") + "'" + temp + "'";
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 资源统计 - 资源类型
     */
    @Override
    public String getZYTJ_ZiYuanLeiXingChart(UserDef_ZYML_ChaXunQu userDefZymlChaXunQu) {
        String jsonResult = "";
        LinkedHashMap<String, String> resourceTypeList = fieldUtils.getFieldListByKey("ResourceType");
        List<UserDef_ZYTJ_ZiYuanLeiXing> list = ziYuanMuLuMapper.getZYTJ_ZiYuanLeiXingChart(userDefZymlChaXunQu);
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        for (int i = 0; i < list.size(); i++) {
            UserDef_ZYTJ_ZiYuanLeiXing item = list.get(i);
            String leixing = resourceTypeList.get(item.getResourceclass());
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + leixing + "'}";
            legendData += (legendData == "" ? "" : ",") + "'" + leixing + "'";
            recordcount += item.getRecordcount();
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 资源统计 - 行政划区
     */
    @Override
    public String getZYTJ_XingZhengQuHuaChart(UserDef_ZYML_ChaXunQu userDefZymlChaXunQu) {
        String jsonResult = "";
        String apiServer = sysConfig.getApiServer();
        List<UserDef_ZYTJ_XingZhengQuHua> list = ziYuanMuLuMapper.getZYTJ_XingZhengQuHuaChart(userDefZymlChaXunQu);
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        String jsonStr = "";
        String getRegionInfourl = apiServer + "/api/org/region/queryList";
        try {
            jsonStr = HttpOperateUtils.httpGet(getRegionInfourl.trim());
        }
        catch (IOException e) {
            e.printStackTrace();
        }
        JSONArray XZQHItem = JSONObject.parseArray(jsonStr);
        for (int i = 0; i < list.size(); i++) {
            UserDef_ZYTJ_XingZhengQuHua item = list.get(i);
            String quhua = item.getAdministrativeid();
            if (quhua == null || quhua.trim().equals("") || quhua.length() == 0) {
                continue;
            }//为空跳过
            for (int j = 0; j < XZQHItem.size(); j++) {
                JSONObject temp = (JSONObject) XZQHItem.get(j);
                String regionid = temp.getString("regionid");
                if (regionid.equals(quhua+"0000")) {
                    quhua = temp.getString("regionname");
                    break;
                }
            }
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + quhua + "'}";
            legendData += (legendData == "" ? "" : ",") + "'" + quhua + "'";
            recordcount += item.getRecordcount();
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    /**
     * 资源审核状态统计饼图
     */
    public String getZYTJ_ShenHeZhuangTai() {
        String jsonResult = "";
        List<UserDef_ZYTJ_ShenHeZhuangTai> list = ziYuanMuLuMapper.getZYTJ_ShenHeZhuangTai();
        String seriesData = "";
        String legendData = "";
        int recordcount = 0;
        for (int i = 0; i < list.size(); i++) {
            UserDef_ZYTJ_ShenHeZhuangTai item = list.get(i);
            String zhuangtai = item.getAuditstatus();
            if(zhuangtai.equals("0")) {
                zhuangtai = "未提交";
            }
            else if(zhuangtai.equals("1")) {
                zhuangtai = "待审核";
            }
            else if(zhuangtai.equals("2")) {
                zhuangtai = "审核已通过";
            }
            else if(zhuangtai.equals("3")) {
                zhuangtai = "审核未通过";
            }
            seriesData += (seriesData == "" ? "" : ",") + "{ value: " + item.getRecordcount() + ", name: '" + zhuangtai + "'}";
            legendData += (legendData == "" ? "" : ",") + "'" + zhuangtai + "'";
            recordcount += item.getRecordcount();
        }
        jsonResult = "{ seriesData: [" + seriesData + "], legendData: [" + legendData + "], recordcount: " + recordcount + " }";
        return jsonResult;
    }
 
    @Override
    public List<Res_MainInfo> getZiYuanLiuLangList(Map<String, Object> map) {
        return ziYuanMuLuMapper.getZiYuanLiuLangList(map);
    }
 
    @Override
    public List<Res_MainInfo> selectZiYuanMuLuList(UserDef_ZYML_ChaXunQu userDef_zyml_chaXunQu) {
        return ziYuanMuLuMapper.selectZiYuanMuLuList(userDef_zyml_chaXunQu);
    }
}