From 2753ad7aee272a5a5a8a0124b1feea5a1e4cc83e Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期五, 20 六月 2025 22:40:52 +0800 Subject: [PATCH] 电源告警参数返回 --- src/main/java/com/whyc/service/BatttestdataInfService.java | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whyc/service/BatttestdataInfService.java b/src/main/java/com/whyc/service/BatttestdataInfService.java index 1a81da5..f763f91 100644 --- a/src/main/java/com/whyc/service/BatttestdataInfService.java +++ b/src/main/java/com/whyc/service/BatttestdataInfService.java @@ -113,7 +113,8 @@ wrapper.eq("battgroup_id", battgroupId); wrapper.eq("test_type", 3); wrapper.eq("test_starttype", 3); - wrapper.last(" and test_timelong >= 7200 ORDER BY test_starttime DESC "); + wrapper.eq("data_available", 1);//涓�娆℃湁鏁堢殑璁板綍 + wrapper.last(" ORDER BY test_starttime DESC "); wrapper.last("limit 1"); BatttestdataInf tinf = mapper.selectOne(wrapper); tinf.setTestStoptypeReason(StopReasonEnum.getValue(tinf.getTestStoptype())); @@ -132,8 +133,9 @@ if(testEndTime!=null){ wrapper.lt("test_starttime",testEndTime); } - wrapper.last(" and test_timelong >= 7200 ORDER BY test_starttime DESC "); - wrapper.last("limit 1"); + wrapper.eq("data_available", 1);//涓�娆℃湁鏁堢殑璁板綍 + wrapper.last(" ORDER BY test_starttime DESC "); + wrapper.last(" limit 1 "); BatttestdataInf tinf = mapper.selectOne(wrapper); return tinf; } @@ -581,13 +583,12 @@ dto.setMoncapstd(binf.getMoncapstd()); dto.setMonCount(binf.getMoncount()); dto.setMonvolstd(binf.getMonvolstd()); + dto.setFloatchartVol(tinf.getFloatGroupVol()); if(battRtstate!=null){ Float restTime= BattCapFactory.getTheoryTime(battRtstate.getLoadCurr(), realCap, binf.getMoncapstd()); dto.setRestTime(restTime); - dto.setFloatchartVol(battRtstate.getGroupVol()); }else{ dto.setRestTime(0f); - dto.setFloatchartVol(0f); } //鎵捐繖娆℃斁鐢电殑鎸囧畾涓�绗旀暟鎹� List<BatttestdataId> idDataList=battTestdataIdService.getLastDataByBattgroupId(tinf.getBattgroupId(),tinf.getTestRecordCount(),1); @@ -996,4 +997,20 @@ public int getHrDisCount(Integer userId, Date startTime, Date endTime) { return mapper.getHrDisCount(userId, startTime, endTime); } + //鑾峰彇杩欎竴娆$殑鏀剧數淇℃伅 + public BatttestdataInf getTinfByTestRecordCount(Integer battgroupId, Integer testRecordCount) { + QueryWrapper wrapper=new QueryWrapper(); + wrapper.eq("battgroup_id",battgroupId); + wrapper.eq("test_record_count",testRecordCount); + wrapper.last(" limit 1"); + return mapper.selectOne(wrapper); + } + //鍘嗗彶娴嬭瘯鏁版嵁瀵煎嚭 + public BatttestdataInf exportTinfDataByTestRecordCount(Integer battgroupId, Integer testRecordCount) { + QueryWrapper wrapper =new QueryWrapper(); + wrapper.eq("battgroup_id",battgroupId); + wrapper.eq("test_record_count",testRecordCount); + wrapper.last(" limit 1"); + return mapper.selectOne(wrapper); + } } \ No newline at end of file -- Gitblit v1.9.1