WebBasicInformationController.java 31.8 KB
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
package com.lhcredit.project.webbusiness.controller;

import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.lhcredit.common.utils.StringUtils;
import com.lhcredit.framework.aspectj.lang.annotation.CheckToken;
import com.lhcredit.framework.web.domain.AjaxResult;
import com.lhcredit.framework.web.page.TableDataInfo;
import com.lhcredit.project.business.BasicInformation.service.BasicInformationService;
import com.lhcredit.project.business.TianYC.entity.param.RequestParams;
import com.lhcredit.project.business.reportDirectoryData.service.QxbHttpUtils;
import com.lhcredit.project.webbusiness.domain.RelationVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

import static com.lhcredit.framework.web.domain.AjaxResult.success;

@Api(tags = "基本信息")
@Controller
@RequestMapping("/api-V2.0/basic")
@RequiredArgsConstructor
public class WebBasicInformationController {

    private final BasicInformationService basicInformationService;

    @ResponseBody
    @ApiOperation(value = "联系方式", notes = "联系方式")
    @PostMapping("/corpContactInfo")
    @CheckToken
    public AjaxResult corpContactInfo(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.corpContactInfo(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows(jsonObject.getJSONObject("data").getJSONArray("items"));
            rspData.setTotal(jsonObject.getJSONObject("data").getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

//    @ResponseBody
//    @ApiOperation(value = "企业基本信息(含主要人员)", notes = "企业基本信息(含主要人员)")
//    @PostMapping("/baseinfo")
//    public AjaxResult baseinfo(@RequestBody RequestParams requestParams) {
//        JSONObject jsonObject = basicInformationService.baseinfo(requestParams);
//        if ("2000".equals(jsonObject.getString("code"))){
//            return success(jsonObject.getJSONObject("data"));
//        }else{
//            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
//        }
//    }

//    @ResponseBody
//    @ApiOperation(value = "企业基本信息(含企业联系方式)", notes = "企业基本信息(含企业联系方式)")
//    @PostMapping("/baseinfo2")
//    public AjaxResult baseinfo2(@RequestBody RequestParams requestParams) {
//        JSONObject jsonObject = basicInformationService.baseinfo2(requestParams);
//        if ("2000".equals(jsonObject.getString("code"))){
//            return success(jsonObject.getJSONObject("data"));
//        }else{
//            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
//        }
//    }

    @ResponseBody
    @ApiOperation(value = "企业简介", notes = "企业简介")
    @PostMapping("/profile")
    @CheckToken
    public AjaxResult profile(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.profile(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            return success(jsonObject.getJSONObject("data"));
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

    @ResponseBody
    @ApiOperation(value = "特殊企业基本信息", notes = "特殊企业基本信息")
    @PostMapping("/special")
    @CheckToken
    public AjaxResult special(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.special(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            return success(jsonObject.getJSONObject("data"));
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

    @ResponseBody
    @ApiOperation(value = "企业股东", notes = "企业股东")
    @PostMapping("/holder")
    @CheckToken
    public AjaxResult holder(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.holder(requestParams);
//        Object htmlStr = QxbHttpUtils.sendHttpRequest(WebTycChartController.holder,new JSONObject(){{put("name",requestParams.getName());}} );
//        JSONObject jsonObject = JSONObject.parseObject(htmlStr.toString());
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows(jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

    @ResponseBody
    @ApiOperation(value = "主要管理人", notes = "主要管理人")
    @PostMapping("/staff")
    @CheckToken
    public AjaxResult staff(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.staff(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows( jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

    @ResponseBody
    @ApiOperation(value = "核心团队", notes = "核心团队")
    @PostMapping("/findTeamMember")
    @CheckToken
    public AjaxResult findTeamMember(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.findTeamMember(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows( jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }

    @ResponseBody
    @ApiOperation(value = "企业变更", notes = "企业变更")
    @PostMapping("/changeInfo")
    @CheckToken
    public AjaxResult changeInfo(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.changeInfo(requestParams);
        System.err.println(jsonObject);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows( jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }
    @ResponseBody
    @ApiOperation(value = "企业头部信息", notes = "企业头部信息")
    @PostMapping("/base")
    @CheckToken
    public AjaxResult base(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.baseinfo2(requestParams);
        JSONObject jsonObject1 = basicInformationService.taxpalyer(requestParams);
        if (jsonObject!=null&&"2000".equals(jsonObject.getString("code"))){
            JSONObject data = jsonObject.getJSONObject("data");
            if (jsonObject1!=null&&"2000".equals(jsonObject1.getString("code"))){
                String taxpayerQualificationType = jsonObject1.getJSONArray("data").getJSONObject(0).getString("taxNum");
                data.put("creditCode",taxpayerQualificationType);
                String registCapiNew = data.getString("registCapiNew");
                String currencyUnit = data.getString("currencyUnit");
                if (StringUtils.isNotEmpty(currencyUnit)){
                    currencyUnit=getUnit(currencyUnit);
                    currencyUnit=StringUtils.isEmpty(currencyUnit)?"":"万"+currencyUnit;
                }
                data.put("registCapiNewUnit",registCapiNew+currencyUnit);
            }
            return success(data);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }


    @ResponseBody
    @ApiOperation(value = "关联关系查询", notes = "企业头部信息")
    @RequestMapping("/relation")
//    @CheckToken
    public Object relation(@RequestBody String json) {
        JSONObject params = JSONObject.parseObject(json);
        JSONObject jsonObject = QxbHttpUtils.sendHttpRequestRootPath("http://lhapi.lhdna.com/api/web/EnterpriseExport/relationship?key=xygj&keyword="+
                params.getString("keyword")+"&attIds="+params.getString("attIds")+"&level="+params.getString("level"));
        return jsonObject.getString("code").equals("2000")?AjaxResult.success(jsonObject.get("data")):AjaxResult.error(jsonObject.getString("msg"));
    }

    @ResponseBody
    @ApiOperation(value = "关联关系查询", notes = "企业头部信息")
    @RequestMapping("/export")
//    @CheckToken
    public void export(@RequestBody String json, HttpServletResponse response) throws IOException {
        JSONObject params = JSONObject.parseObject(json);
        JSONObject jsonObjects = QxbHttpUtils.sendHttpRequestRootPath("http://lhapi.lhdna.com/api/web/EnterpriseExport/relationship?key=xygj&keyword="+
                params.getString("keyword")+"&attIds="+params.getString("attIds")+"&level="+params.getString("level"));
        if (Objects.nonNull(jsonObjects) && jsonObjects.getString("code").equals("2000")){
            JSONObject data = jsonObjects.getJSONObject("data");
            JSONArray nodes = data.getJSONArray("nodes");
            JSONArray links = data.getJSONArray("links");
            JSONObject nodeObj = new JSONObject();
            String[] split = params.getString("keyword").split(";");
            List<String> idList = new ArrayList<>();

            for (int i = 0; i < nodes.size(); i++) {
                JSONObject jsonObject = nodes.getJSONObject(i);
                String name = jsonObject.getString("NAME");
                String id = jsonObject.getString("ID");
                for (String s : split) {
                    if (s.equals(name)) {
                        idList.add(id);
                    }
                }
                nodeObj.put(id, name);
            }

//            JSONArray resarray=new JSONArray();
            List<RelationVo> resList = new ArrayList<>();
            for (int i = 0; i < idList.size(); i++) {

                for (int j = i + 1; j < idList.size(); j++) {

                    String id1 = idList.get(i);
                    String id2 = idList.get(j);

                    String companyName1 = nodeObj.getString(id1);
                    String companyName2 = nodeObj.getString(id2);

                    String a1 = nodeObj.getString(id1);
                    //有效链路
                    JSONArray effLinks = new JSONArray();
                    JSONArray effNodes = new JSONArray();
                    effNodes.add(id1);
                    pingjie(id1, id2, nodeObj, links, resList, a1, Integer.parseInt(params.getString("level")), 1, companyName1, companyName2, effLinks, effNodes);
                }
            }
            String fileName = "公司关系";
            //response为HttpServletResponse对象
            response.setContentType("application/vnd.ms-excel;charset=utf-8");
            //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
            response.setHeader("Content-Disposition", "attachment;filename=" + java.net.URLEncoder
                    .encode(fileName, "UTF-8") + ".xlsx");
            ServletOutputStream out = response.getOutputStream();

            ExcelWriter writer = ExcelUtil.getWriter();
            writer.renameSheet("公司关系");
            writer.setOnlyAlias(true);
            writer.write(resList, true);
            writer.flush(out, true);
            // 关闭writer,释放内存
            writer.close();
        }
    }
    public static  void  pingjie(String id1,String id2,JSONObject nodeObj,JSONArray links,List<RelationVo> resultList,String pre,int level,int dqlevl,String companyName1,String companyName2,JSONArray effLinks,JSONArray effNodes){

        for (int i = 0; i < links.size(); i++) {
            JSONObject jsonObject = links.getJSONObject(i);
            String name = jsonObject.getString("NAME");
            String from = jsonObject.getString("FROM");
            String to = jsonObject.getString("TO");

            String type = jsonObject.getString("TYPE");
            JSONObject attibutemap = jsonObject.getJSONObject("ATTIBUTEMAP");
            JSONArray yxLinks=new JSONArray();
            yxLinks.addAll(effLinks);
            yxLinks.add(jsonObject);

            if(from.equals(id1)){
                if(!effNodes.contains(to)){
                    JSONArray yxNodes=new JSONArray();
                    yxNodes.addAll(effNodes);
                    yxNodes.add(to);
                    JSONObject j=new JSONObject();
                    if (type.equals("SPE")){//任职
                        j.put("str",pre + "->任职:" + attibutemap.getString("POSITION") + "->" + nodeObj.getString(to));
                    }
                    //投资
                    else if (type.equals("IPEE")){
                        j.put("str",pre + "->投资:" + attibutemap.getBigDecimal("CONRATIO") .multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%" + "->" + nodeObj.getString(to));
                    }
                    //分支机构
                    else if (type.equals("BEE")){
                        j.put("str",pre+"->分支机构:" + name + "->" + nodeObj.getString(to));
                    }
                    //相同办公地
                    else if (type.equals("RED")){
                        j.put("str",pre+"->相同办公地:" + name + "->" + nodeObj.getString(to));
                    }
                    //共同联系方式
                    else if (type.equals("LEE")){
                        j.put("str",pre+"->共同联系方式:" + attibutemap.getString("DOMAIN") + "->" + nodeObj.getString(to));
                    }
                    //共有专利关系
                    else if (type.equals("OPEP")){
                        j.put("str",pre+"->共有专利关系:" + name + "->" + nodeObj.getString(to));
                    }
                    //诉讼关系
                    else if (type.equals("LEL")){
                        j.put("str",pre+"->诉讼关系:" + name + "->" + nodeObj.getString(to));
                    }
                    //历史投资关系
                    else if (type.equals("IHPEEN")){
                        j.put("str",pre+"->历史投资关系:" + attibutemap.getString("HIS_DATE") + "->" + nodeObj.getString(to));
                    }


                    if(!to.equals(id2)){
                        //递归
                        if(dqlevl<level){
                            JSONArray j2= new JSONArray();
                            j2.addAll(links);
                            j2.remove(i);
                            pingjie(to,id2,nodeObj,j2,resultList,j.getString("str"),level,dqlevl+1,companyName1,companyName2,yxLinks,yxNodes);
                        }

                    }else {
                        RelationVo relationVo = new RelationVo();
                        relationVo.setCompanyNameA(companyName1);
                        relationVo.setCompanyNameB(companyName2);
                        relationVo.setLevel(dqlevl);
                        relationVo.setLinkStr(j.getString("str"));

                        relationVo.setLinks(yxLinks);
                        relationVo.setNodes(yxNodes);
                        //                    relationVo.put("目标对象",companyName1 + "->" + companyName2);
                        //                    object.put("路径节点",dqlevl);
                        //                    object.put("路径详情",j.getString("str"));
                        resultList.add(relationVo);
                    }
                }
            }
            if(to.equals(id1)){
                if(!effNodes.contains(from)) {
                    JSONObject j = new JSONObject();
                    if (type.equals("SPE")) {//任职
                        j.put("str", pre + "<-任职:" + attibutemap.getString("POSITION") + "<-" + nodeObj.getString(from));
                    }
                    //投资
                    else if (type.equals("IPEE")) {
                        j.put("str", pre + "<-投资:" + attibutemap.getBigDecimal("CONRATIO").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%" + "<-" + nodeObj.getString(from));
                    }
                    //分支机构
                    else if (type.equals("BEE")) {
                        j.put("str", pre + "<-分支机构:" + name + "<-" + nodeObj.getString(from));
                    }
                    //相同办公地
                    else if (type.equals("RED")) {
                        j.put("str", pre + "<-相同办公地:" + name + "<-" + nodeObj.getString(from));
                    }
                    //共同联系方式
                    else if (type.equals("LEE")) {
                        j.put("str", pre + "<-共同联系方式:" + attibutemap.getString("DOMAIN") + "<-" + nodeObj.getString(from));
                    }
                    //共有专利关系
                    else if (type.equals("OPEP")) {
                        j.put("str", pre + "<-共有专利关系:" + name + "<-" + nodeObj.getString(from));
                    }
                    //诉讼关系
                    else if (type.equals("LEL")) {
                        j.put("str", pre + "<-诉讼关系:" + name + "<-" + nodeObj.getString(from));
                    }
                    //历史投资关系
                    else if (type.equals("IHPEEN")) {
                        j.put("str", pre + "<-历史投资关系:" + attibutemap.getString("HIS_DATE") + "<-" + nodeObj.getString(from));
                    }
                    JSONArray yxNodes = new JSONArray();
                    yxNodes.addAll(effNodes);
                    yxNodes.add(from);
                    if (!from.equals(id2)) {
                        //递归
                        if (dqlevl < level) {
                            JSONArray j2 = new JSONArray();
                            j2.addAll(links);
                            j2.remove(i);
                            pingjie(from, id2, nodeObj, j2, resultList, j.getString("str"), level, dqlevl + 1, companyName1, companyName2, yxLinks, yxNodes);
                        }
                    } else {
//                    JSONObject object = new JSONObject();
//                    object.put("目标对象",companyName1 + "->" + companyName2);
//                    object.put("路径节点",dqlevl);
//                    object.put("路径详情",j.getString("str"));
//                    resultList.add(object);
                        RelationVo relationVo = new RelationVo();
                        relationVo.setCompanyNameA(companyName1);
                        relationVo.setCompanyNameB(companyName2);
                        relationVo.setLevel(dqlevl);
                        relationVo.setLinkStr(j.getString("str"));
                        relationVo.setLinks(yxLinks);
                        relationVo.setNodes(yxNodes);
                        resultList.add(relationVo);
                    }
                }
            }
        }
    }

    @ResponseBody
    @ApiOperation(value = "关联关系字典", notes = "企业头部信息")
    @RequestMapping("/attIds")
    @CheckToken
    public Object attIds() {
        JSONObject map=new JSONObject();
        map.put("R101","企业对外投资");
        map.put("R102","企业股东");
        map.put("R103","自然人对外投资");
        map.put("R104","自然人股东");
        map.put("R105","管理人员公司任职");
        map.put("R106","公司管理人员");
        map.put("R107","分支机构");
        map.put("R108","总部");
        map.put("R111","企业关联注册地");
        map.put("R112","注册地关联企业");
        map.put("R113","企业关联邮箱/电话");
        map.put("R114","邮箱/电话关联企业");
        map.put("R115","企业关联专利");
        map.put("R116","专利关联企业");
        map.put("R117","企业关联诉讼");
        map.put("R118","诉讼关联企业");
        map.put("R119","人员关联专利");
        map.put("R120","专利关联人员");
        map.put("R139","历史企业股东");
        map.put("R140","历史企业对外投资");
        map.put("R141","历史自然人股东");
        map.put("R142","历史自然人对外投资");
        map.put("R143","历史公司管理人员");
        map.put("R144","历史管理人员公司任职");
        return AjaxResult.success(map);
    }

    @ResponseBody
    @ApiOperation(value = "关联关系字典", notes = "企业头部信息-企业关联关系")
    @RequestMapping("/attIdsNx")
    public Object attIdsNx() {
        JSONObject map=new JSONObject();
        map.put("R101","企业对外投资");
        map.put("R102","企业股东");
        map.put("R106","公司管理人员");
        map.put("R107","分支机构");
        return success(map);
    }


    @ResponseBody
    @ApiOperation(value = "企业股东历史", notes = "企业股东历史")
    @PostMapping("/holderIsHistory")
    @CheckToken
    public AjaxResult holderIsHistory(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.holderIsHistory(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows(jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }



    @ResponseBody
    @ApiOperation(value = "企业变更历史", notes = "企业变更历史")
    @PostMapping("/changeInfoIsHistory")
    @CheckToken
    public AjaxResult changeInfoIsHistory(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.changeInfoIsHistory(requestParams);
        System.err.println(jsonObject);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows( jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }


    @ResponseBody
    @ApiOperation(value = "主要管理人历史", notes = "主要管理人历史")
    @PostMapping("/staffIsHistory")
    @CheckToken
    public AjaxResult staffIsHistory(@RequestBody RequestParams requestParams) {
        JSONObject jsonObject = basicInformationService.staffIsHistory(requestParams);
        if ("2000".equals(jsonObject.getString("code"))){
            TableDataInfo rspData = new TableDataInfo();
            rspData.setRows( jsonObject.getJSONArray("data"));
            rspData.setTotal(jsonObject.getLong("total"));
            return success(rspData);
        }else{
            return new AjaxResult(AjaxResult.Type.NODATA,"暂无数据");
        }
    }



    public  String getUnit(String unit){
        Map<String,String> xxx=new HashMap<>();
        xxx.put("AED","阿联酋迪拉姆");
        xxx.put("AFN","阿富汗尼");
        xxx.put("ATS","奥地利先令");
        xxx.put("ALL","阿尔巴尼列克");
        xxx.put("AMD","亚美尼亚德拉姆");
        xxx.put("ANG","荷属安的列斯盾");
        xxx.put("AOA","安哥拉宽扎");
        xxx.put("ARS","阿根廷比索");
        xxx.put("AUD","澳大利亚元");
        xxx.put("AWG","阿鲁巴弗罗林");
        xxx.put("AZN","阿塞拜疆马纳特");
        xxx.put("BAM","波黑可兑换马克");
        xxx.put("BBD","巴巴多斯元");
        xxx.put("BDT","孟加拉国塔卡");
        xxx.put("BEF","比利时法郎");
        xxx.put("BGN","保加利亚列弗");
        xxx.put("BHD","巴林第纳尔");
        xxx.put("BIF","布隆迪法郎");
        xxx.put("BMD","百慕大元");
        xxx.put("BND","文莱林吉特");
        xxx.put("BOB","玻利维亚诺");
        xxx.put("BRL","巴西雷亚尔");
        xxx.put("BSD","巴哈马元");
        xxx.put("BTC","比特币");
        xxx.put("BTN","不丹努扎姆");
        xxx.put("BWP","博茨瓦纳普拉");
        xxx.put("BYR","白俄罗斯卢布");
        xxx.put("BZD","伯利兹元");
        xxx.put("CAD","加拿大元");
        xxx.put("CDF","刚果法郎");
        xxx.put("CHF","瑞士法郎");
        xxx.put("CLP","智利比索");
        xxx.put("CNH","中国离岸人民币");
        xxx.put("CNY","人民币");
        xxx.put("COP","哥伦比亚比索");
        xxx.put("CRC","哥斯达黎加科朗");
        xxx.put("CUP","古巴比索");
        xxx.put("CVE","佛得角埃斯库多");
        xxx.put("CYP","塞普路斯镑");
        xxx.put("CZK","捷克克朗");
        xxx.put("DEM","德国马克");
        xxx.put("DJF","吉布提法郎");
        xxx.put("DKK","丹麦克朗");
        xxx.put("DOP","多米尼加比索");
        xxx.put("DZD","阿尔及利亚第纳尔");
        xxx.put("ECS","厄瓜多尔苏克雷");
        xxx.put("EGP","埃及镑");
        xxx.put("ESP","西班牙比塞塔");
        xxx.put("ERN","厄立特里亚纳克法");
        xxx.put("ETB","埃塞俄比亚比尔");
        xxx.put("EUR","欧元");
        xxx.put("FCFA","塞内加尔非洲法郎");
        xxx.put("FJD","斐济元");
        xxx.put("FIM","芬兰马克");
        xxx.put("FKP","福克兰群岛镑");
        xxx.put("FRF","法国法郎");
        xxx.put("GBP","英镑");
        xxx.put("GEL","格鲁吉亚拉里");
        xxx.put("GHS","加纳塞地");
        xxx.put("GIP","直布罗陀镑");
        xxx.put("GMD","冈比亚达拉西");
        xxx.put("GNF","几内亚法郎");
        xxx.put("GTQ","危地马拉格查尔");
        xxx.put("GYD","圭亚那元");
        xxx.put("HKD","港元");
        xxx.put("HNL","洪都拉斯伦皮拉");
        xxx.put("HRK","克罗地亚库纳");
        xxx.put("HTG","海地古德");
        xxx.put("HUF","匈牙利福林");
        xxx.put("IDR","印度尼西亚卢比");
        xxx.put("IEP","爱尔兰镑");
        xxx.put("ILS","以色列新谢克尔");
        xxx.put("INR","印度卢比");
        xxx.put("IQD","伊拉克第纳尔");
        xxx.put("IRR","伊朗里亚尔");
        xxx.put("ISK","冰岛克郎");
        xxx.put("ITL","意大利里拉");
        xxx.put("JMD","牙买加元");
        xxx.put("JOD","约旦第纳尔");
        xxx.put("JPY","日元");
        xxx.put("KES","肯尼亚先令");
        xxx.put("KGS","吉尔吉斯斯坦索姆");
        xxx.put("KHR","柬埔寨瑞尔");
        xxx.put("KMF","科摩罗法郎");
        xxx.put("KPW","朝鲜元");
        xxx.put("KRW","韩国元");
        xxx.put("KWD","科威特第纳尔");
        xxx.put("KYD","开曼群岛元");
        xxx.put("KZT","哈萨克斯坦坚戈");
        xxx.put("LAK","老挝基普");
        xxx.put("LBP","黎巴嫩镑");
        xxx.put("LKR","斯里兰卡卢比");
        xxx.put("LRD","利比里亚元");
        xxx.put("LSL","莱索托洛蒂");
        xxx.put("LTL","立陶宛立特");
        xxx.put("LVL","拉脱维亚拉特");
        xxx.put("LYD","利比亚第纳尔");
        xxx.put("LUF","卢森堡法郎");
        xxx.put("MAD","摩洛哥迪拉姆");
        xxx.put("MDL","摩尔多瓦列伊");
        xxx.put("MGA","马达加斯加阿里亚里");
        xxx.put("MKD","马其顿代纳尔");
        xxx.put("MMK","缅甸元");
        xxx.put("MNT","蒙古图格里克");
        xxx.put("MOP","澳门元");
        xxx.put("MRO","毛里塔尼亚乌吉亚");
        xxx.put("MUR","毛里求斯卢比");
        xxx.put("MVR","马尔代夫拉菲亚");
        xxx.put("MWK","马拉维克瓦查");
        xxx.put("MXN","墨西哥比索");
        xxx.put("MYR","马来西亚林吉特");
        xxx.put("MZN","莫桑比克新梅蒂卡尔");
        xxx.put("NAD","纳米比亚元");
        xxx.put("NGN","尼日利亚奈拉");
        xxx.put("NIO","尼加拉瓜新科多巴");
        xxx.put("NLG","荷兰盾");
        xxx.put("NOK","挪威克朗");
        xxx.put("NPR","尼泊尔卢比");
        xxx.put("NZD","新西兰元");
        xxx.put("OMR","阿曼里亚尔");
        xxx.put("PAB","巴拿马巴波亚");
        xxx.put("PEN","秘鲁新索尔");
        xxx.put("PGK","巴布亚新几内亚基那");
        xxx.put("PHP","菲律宾比索");
        xxx.put("PKR","巴基斯坦卢比");
        xxx.put("PLN","波兰兹罗提");
        xxx.put("PTE","葡萄牙埃斯库多");
        xxx.put("PYG","巴拉圭瓜拉尼");
        xxx.put("QAR","卡塔尔里亚尔");
        xxx.put("RON","罗马尼亚列伊");
        xxx.put("RSD","塞尔维亚第纳尔");
        xxx.put("RUB","俄罗斯卢布");
        xxx.put("RWF","卢旺达法郎");
        xxx.put("SAR","沙特里亚尔");
        xxx.put("SBD","所罗门群岛元");
        xxx.put("SCR","塞舌尔卢比");
        xxx.put("SDG","苏丹镑");
        xxx.put("SEK","瑞典克朗");
        xxx.put("SGD","新加坡元");
        xxx.put("SHP","圣赫勒拿镑");
        xxx.put("SIT","斯洛文尼亚托拉尔");
        xxx.put("SLL","塞拉利昂利昂");
        xxx.put("SOS","索马里先令");
        xxx.put("SOL","秘鲁索尔");
        xxx.put("SRD","苏里南元");
        xxx.put("STD","圣多美多布拉");
        xxx.put("SVC","萨尔瓦多科朗");
        xxx.put("SYP","叙利亚镑");
        xxx.put("SZL","斯威士兰里兰吉尼");
        xxx.put("THB","泰国铢");
        xxx.put("TJS","塔吉克斯坦索莫尼");
        xxx.put("TMT","土库曼斯坦马纳特");
        xxx.put("TND","突尼斯第纳尔");
        xxx.put("TOP","汤加潘加");
        xxx.put("TRY","土耳其里拉");
        xxx.put("TTD","特立尼达多巴哥元");
        xxx.put("TWD","新台币");
        xxx.put("TZS","坦桑尼亚先令");
        xxx.put("UAH","乌克兰格里夫纳");
        xxx.put("UGX","乌干达先令");
        xxx.put("USD","美元");
        xxx.put("UYU","乌拉圭比索");
        xxx.put("UZS","乌兹别克斯坦苏姆");
        xxx.put("VEF","委内瑞拉玻利瓦尔");
        xxx.put("VND","越南盾");
        xxx.put("VUV","瓦努阿图瓦图");
        xxx.put("WST","萨摩亚塔拉");
        xxx.put("XAF","中非法郎");
        xxx.put("XAG","银价盎司");
        xxx.put("XAU","金价盎司");
        xxx.put("XCD","东加勒比元");
        xxx.put("XCP","铜价盎司");
        xxx.put("XDR","IMF特别提款权");
        xxx.put("XOF","西非法郎");
        xxx.put("XPD","钯价盎司");
        xxx.put("XPF","太平洋法郎");
        xxx.put("XPT","珀价盎司");
        xxx.put("YER","也门里亚尔");
        xxx.put("ZAR","南非兰特");
        xxx.put("ZMW","赞比亚克瓦查");
        xxx.put("ZWL","津巴布韦元");
        xxx.put("SDR","特别提款权");
        xxx.put("ADP","安道尔比塞塔");
        xxx.put("GRD","德拉克马");
        xxx.put("GU","股");
        String s = xxx.get(unit);
        return s;
    }
}