xuefei
2020-12-22 4745238280ae22f373802470844c66cbcdbf4458
platform-modules/platform-zhyl/src/main/java/cn/cetc54/platform/zhyl/api/IndexController.java
@@ -15,6 +15,7 @@
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -30,7 +31,8 @@
@Slf4j
@RestController
@Api(description = "首页接口")
@RequestMapping("/api/index")
@RequestMapping("/api2/index")
@CrossOrigin("*")
public class IndexController {
    @Autowired
    private IOrgYanglaoService iOrgYanglaoService;
@@ -43,6 +45,10 @@
    @GetMapping("/getSubsidyStatics")
    @ApiOperation(value = "补贴统计")
    public Result getSubsidyStatics(String areaId){
        if (StrUtil.isNotBlank(areaId)&&areaId.equals("130100")){
            //如果是全市 areaId设置未空
            areaId = null;
        }
        double total = iSubsidyLogService.getTotalMoney(areaId,null);
        List<Map<String,Object>> list = iSubsidyLogService.getTypeMoney(areaId);
        list.forEach(e->{
@@ -57,8 +63,15 @@
    @GetMapping("/getOrgFWStatics")
    @ApiOperation(value = "服务机构统计")
    public Result getOrgFWStatics(String areaId){
        if (StrUtil.isNotBlank(areaId)&&areaId.equals("130100")){
            //如果是全市 areaId设置未空
            areaId = null;
        }
        QueryWrapper<OrgFuwu> wrapper = new QueryWrapper<>();
        wrapper.eq("area_id",areaId);
        if (StrUtil.isNotEmpty(areaId)){
            wrapper.eq("area_id",areaId);
        }
        int total = iOrgFuwuService.list(wrapper).size();
        List list = iOrderService.getTypeStatics(areaId);
@@ -70,6 +83,10 @@
    @GetMapping("/getYlOrgYLStatics")
    @ApiOperation(value = "养老机构统计")
    public Result getYlOrgStatics(String areaId){
        if (StrUtil.isNotBlank(areaId)&&areaId.equals("130100")){
            //如果是全市 areaId设置未空
            areaId = null;
        }
        QueryWrapper<OrgYanglao> wrapper = new QueryWrapper<>();
        if (StrUtil.isNotBlank(areaId)){
            wrapper.eq("area_id",areaId);
@@ -116,6 +133,10 @@
    @GetMapping("/getFuwuPersonStatics")
    @ApiOperation(value = "服务对象统计")
    public Result getFuwuPersonStatics(String areaId){
        if (StrUtil.isNotBlank(areaId)&&areaId.equals("130100")){
            //如果是全市 areaId设置未空
            areaId = null;
        }
        int total = iSubsidyLogService.getTotalNum(areaId,null);
        List<Map<String,Object>> list = iSubsidyLogService.getTypeNum(areaId);
        list.forEach(e->{