From a6c0ad601911684f1641c41c6abe4afe770bebb8 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 25 六月 2025 16:23:03 +0800 Subject: [PATCH] 蓄电池对比分析中弹窗根据设置的权重表格评分 --- src/main/java/com/whyc/controller/BattCompareController.java | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/controller/BattCompareController.java b/src/main/java/com/whyc/controller/BattCompareController.java index ff8e2b0..85697ce 100644 --- a/src/main/java/com/whyc/controller/BattCompareController.java +++ b/src/main/java/com/whyc/controller/BattCompareController.java @@ -37,9 +37,9 @@ 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); } -- Gitblit v1.9.1