whyclxw
1 天以前 add5c816a5281cf6b1df4a0988e8b3a0c2b59bee
src/main/java/com/whyc/controller/BattCompareController.java
@@ -32,14 +32,14 @@
    @Autowired
    private AppParamService appParamService;
    @ApiOperation(value = "蓄电池组对比分析界面(同一时间同一品牌/同一时间不同一品牌/不同一时间同一品牌)(1.2.15/16/17)")
    @ApiOperation(value = "蓄电池组对比分析界面(同一时间同一品牌/同一时间不同一品牌/不同一时间同一品牌)(2.5.1/2/3)")
    @PostMapping("getBattCompare15Statistic")
    public Response getBattCompare15Statistic(@RequestBody BattCompareStic stic) throws ParseException {
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        if(stic.getInuserYear()!=null){
        if(stic.getInuseYear()!=null){
            int year=ActionUtil.getNowYear();
            stic.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-stic.getInuserYear(),0,1,5)));
            stic.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-stic.getInuseYear(),0,1,5)));
            stic.setInuseEndTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year,11,31,5)));
        }
        return battTinfService.getBattCompare15Statistic(stic);
@@ -68,11 +68,24 @@
    public Response getScoreByHehavior(@RequestBody SocreHehaviorDto dto) throws ParseException {
        User uinf= ActionUtil.getUser();
        dto.setUid(uinf.getId());
        if(dto.getInuserYear()!=null){
        if(dto.getInuseYear()!=null){
            int year=ActionUtil.getNowYear();
            dto.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-dto.getInuserYear(),0,1,5)));
            dto.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-dto.getInuseYear(),0,1,5)));
            dto.setInuseEndTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year,11,31,5)));
        }
        if (dto.getProduct()!=null) {
            if(dto.getInuseYear()!=null){
                dto.setSelectType(1);
            }else{
                dto.setSelectType(2);
            }
        }else{
            if(dto.getInuseYear()!=null){
                dto.setSelectType(3);
            }else{
                dto.setSelectType(4);
            }
        }
        return battTinfService.getScoreByHehavior(dto);
    }