whyclxw
2025-06-12 1231655a352410f9086895efaff185fb6f94c647
src/main/java/com/whyc/controller/StatisticController.java
@@ -13,6 +13,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@Api(tags = "统计管理")
@RequestMapping("statistic")
@@ -22,6 +24,7 @@
    @Autowired
    private BatttestdataInfService battTinfService;
    @Autowired
    private BattInfService battService;
@@ -60,7 +63,49 @@
    public Response getMonStatistic(@RequestBody MonStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getMonStatistic(stic);
        Map<String,Object> map= battTinfService.getMonStatistic(stic);
        return new Response().setII(1,true,map,"单节数量统计");
    }
    @ApiOperation(value = "本年度已放电数量统计(1.2.5)")
    @PostMapping("getDischr5Statistic")
    public Response getDischr5Statistic(@RequestBody DisChargeStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getDischr5Statistic(stic);
    }
    @ApiOperation(value = "本年度已放电数量统计右侧图表(1.2.5)")
    @PostMapping("getDischr5Chart")
    public Response getDischr5Chart(){
        User uinf= ActionUtil.getUser();
        return battTinfService.getDischr5Chart(uinf.getId());
    }
    @ApiOperation(value = "本年度未放电数量统计右侧图表(1.2.6)")
    @PostMapping("getDischr6Chart")
    public Response getDischr6Chart(){
        User uinf= ActionUtil.getUser();
        return battTinfService.getDischr6Chart(uinf.getId());
    }
    @ApiOperation(value = "本年度未放电数量统计(1.2.6)")
    @PostMapping("getDischr6Statistic")
    public Response getDischr6Statistic(@RequestBody DisChargeStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        if(stic.getTypeList()==null||stic.getTypeList().size()==0){
            stic.setStopReasonType(0);
        }else{
            stic.setStopReasonType(1);
        }
        return battTinfService.getDischr6Statistic(stic);
    }
    @ApiOperation(value = "电池组电池性能统计(未放电,优秀,劣化,损坏)统计(1.2.8/9/10)")
    @PostMapping("getPerformanceStatistic")
    public Response getPerformanceStatistic(@RequestBody PerformanceStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getPerformanceStatistic(stic);
    }