WebIndexController.java 5.35 KB
package com.lhcredit.project.webbusiness.controller;

import com.lhcredit.framework.web.domain.AjaxResult;
import com.lhcredit.project.business.BasicInformation.service.BasicInformationService;
import com.lhcredit.project.business.TianYC.entity.param.RequestParams;
import com.lhcredit.project.business.judicial.service.JudicialService;
import com.lhcredit.project.business.jycount.domain.Jycount;
import com.lhcredit.project.business.jycount.service.IJycountService;
import com.lhcredit.project.business.memberUnit.service.IMemberUnitService;
import com.lhcredit.project.business.organization.domain.Organization;
import com.lhcredit.project.business.organization.service.IOrganizationService;
import com.lhcredit.project.business.sfcount.domain.Sfcount;
import com.lhcredit.project.business.sfcount.service.ISfcountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/web/index")
public class WebIndexController {
    @Autowired
    IMemberUnitService memberUnitService;

    @Autowired
    IOrganizationService organizationService;

    @Autowired
    BasicInformationService basicInformationService;

    @Autowired
    private JudicialService judicialService;

    @Autowired
    private ISfcountService sfcountService;

    @Autowired
    private IJycountService jycountService;

    @RequestMapping("/baseinfo")
    @ResponseBody
    public AjaxResult baseinfo() {
        Map respData = new HashMap();
        List<Map> listLevel= organizationService.selectAllOrganizationGroupLevel();
        if(!listLevel.contains("D")){
            Map resp = new HashMap();
            resp.put("creditLevel","D");
            resp.put("count",0);
            listLevel.add(resp);
        }
        respData.put("level",listLevel);

        List<Map> listreg = organizationService.selectAllOrganizationGroupReg();
        respData.put("registCapi",listreg);

        List<Map> listOrgType=organizationService.selectAllOrganizationGroupOrgTyp();
        respData.put("orgType",listOrgType);

        List<Map> listScopeType=organizationService.selectAllOrganizationGroupScopeTyp();
        respData.put("scopeType",listScopeType);

        int orgCount=organizationService.selectAllOrganizationCount();
        respData.put("orgCount",orgCount);
        int memberCount=memberUnitService.selectMemberUnitCount();
        respData.put("memberCount",memberCount);

        return AjaxResult.success(respData);
    }

    @RequestMapping("/getJudiciary")
    @ResponseBody
    public AjaxResult getJudiciary() {
        Map respData = new HashMap();
        Sfcount sf=new Sfcount();
        sf.setStatus("0");
        List<Sfcount> list=sfcountService.selectSfcountList(sf);
        Map oneMap=new HashMap();
        Map twoMap=new HashMap();
        Map threeMap=new HashMap();
        Map fourMap=new HashMap();
        int count=0;
        for(Sfcount sfcount:list){
            count+=sfcount.getMs()+sfcount.getXs()+sfcount.getXz()+sfcount.getFsbq()+sfcount.getZx()+sfcount.getPc();


            oneMap.put("民事案件",sfcount.getMs());
            oneMap.put("刑事案件",sfcount.getXs());
            oneMap.put("行政案件",sfcount.getXz());
            oneMap.put("非诉保全案件",sfcount.getFsbq());
            oneMap.put("执行案件",sfcount.getZx());
            oneMap.put("破产案件",sfcount.getPc());

            twoMap.put("已结案",sfcount.getYja());
            twoMap.put("未结案",sfcount.getWja());

            threeMap.put("原告",sfcount.getYg());
            threeMap.put("被告",sfcount.getBg());
            threeMap.put("第三人",sfcount.getDsr());

            fourMap.put("案由",sfcount.getAy());


        }
        respData.put("sfNum",count);
        respData.put("one",oneMap);
        respData.put("two",twoMap);
        respData.put("three",threeMap);
        respData.put("four",fourMap);

//        respData.put("SfcountList",list);

        return AjaxResult.success(respData);
    }

    @RequestMapping("/getOperate")
    @ResponseBody
    public AjaxResult getOperate() {
        Map respData = new HashMap();
        Jycount jy=new Jycount();
        jy.setStatus("0");
        List<Jycount> list=jycountService.selectJycountList(jy);
        int count=0;
        for(Jycount jycount:list){
            count+=jycount.getJyyc()+jycount.getXzcf()+jycount.getYzwf()+jycount.getGqcz()+jycount.getGqdj()+jycount.getQsgg()+jycount.getQsxx()+jycount.getDcdy()+jycount.getTddy()+jycount.getCcjc();
            respData.put("经营异常",jycount.getJyyc());
            respData.put("行政处罚",jycount.getXzcf());
            respData.put("严重违法",jycount.getYzwf());
            respData.put("股权出质",jycount.getGqcz());
            respData.put("股权冻结",jycount.getGqdj());
            respData.put("欠税公告",jycount.getQsgg());
            respData.put("清算信息",jycount.getQsxx());
            respData.put("动产抵押",jycount.getDcdy());
            respData.put("土地质押",jycount.getTddy());
            respData.put("抽查检查",jycount.getCcjc());
        }
        respData.put("jyNum",count);

        return AjaxResult.success(respData);
    }


}