whyclxw
2 天以前 dbba9c3fc5187432c34329a2a18e07feca729de5
src/main/java/com/whyc/controller/BattCompareController.java
@@ -13,6 +13,9 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import java.util.Map;
@RestController
@Api(tags = "蓄电池对比分析管理")
@RequestMapping("compare")
@@ -24,9 +27,14 @@
    @ApiOperation(value = "蓄电池组对比分析界面(同一品牌同一时间)(1.2.15)")
    @PostMapping("getBattCompare15Statistic")
    public Response getBattCompare15Statistic(@RequestBody BattCompareStic stic){
    public Response getBattCompare15Statistic(@RequestBody BattCompareStic stic) throws ParseException {
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        if(stic.getInuserYear()!=null){
            int year=ActionUtil.getNowYear();
            stic.setInuseStartTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year+1-stic.getInuserYear(),0,1,5)));
            stic.setInuseEndTime(ActionUtil.sdfwithday.parse(ActionUtil.getDayTime(year,11,31,5)));
        }
        return battTinfService.getBattCompare15Statistic(stic);
    }