From f127214ad1076769c9cb4a97963ee3ad5053e970 Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期二, 18 三月 2025 10:15:47 +0800
Subject: [PATCH] 锂电设备A200相关代码更新

---
 src/main/java/com/whyc/service/BattLithiumTestDataInfService.java |   58 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/main/java/com/whyc/service/BattTestDataInfService.java b/src/main/java/com/whyc/service/BattLithiumTestDataInfService.java
similarity index 66%
rename from src/main/java/com/whyc/service/BattTestDataInfService.java
rename to src/main/java/com/whyc/service/BattLithiumTestDataInfService.java
index 395a250..5f4927a 100644
--- a/src/main/java/com/whyc/service/BattTestDataInfService.java
+++ b/src/main/java/com/whyc/service/BattLithiumTestDataInfService.java
@@ -2,10 +2,10 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.whyc.dto.Response;
-import com.whyc.mapper.BattTestDataIdMapper;
-import com.whyc.mapper.BattTestDataInfMapper;
-import com.whyc.pojo.db_batt_testdata.BattTestDataId;
-import com.whyc.pojo.db_batt_testdata.BattTestDataInf;
+import com.whyc.mapper.BattLithiumTestDataMapper;
+import com.whyc.mapper.BattLithiumTestDataInfMapper;
+import com.whyc.pojo.db_lithium_testdata.BattLithiumTestData;
+import com.whyc.pojo.db_lithium_testdata.BattLithiumTestDataInf;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -16,13 +16,13 @@
 import java.util.stream.Collectors;
 
 @Service
-public class BattTestDataInfService {
+public class BattLithiumTestDataInfService {
 
     @Autowired(required = false)
-    private BattTestDataInfMapper mapper;
+    private BattLithiumTestDataInfMapper mapper;
 
     @Autowired(required = false)
-    private BattTestDataIdMapper dataMapper;
+    private BattLithiumTestDataMapper dataMapper;
 
     @Autowired(required = false)
     private SubTablePageInfoService subService;
@@ -31,7 +31,7 @@
     public Map<String, Object> getDevTinfByYearMonth(int userId) {
         Map<String,Object> map=new HashMap<>();
         //鏈勾
-        List<BattTestDataInf> listYear=mapper.getDevTinfByYear(userId);
+        List<BattLithiumTestDataInf> listYear=mapper.getDevTinfByYear(userId);
 
         Map<String,Object> a200Map=new HashMap<>();
         Map<String,Object> actmMap=new HashMap<>();
@@ -44,11 +44,11 @@
         actmYearMap.put(3,0);
         actmYearMap.put(4,0);
         //鏈勾
-        Map<Integer, List<BattTestDataInf>> typeMapY = listYear.stream().collect(Collectors.groupingBy(BattTestDataInf::getDevType));
+        Map<Integer, List<BattLithiumTestDataInf>> typeMapY = listYear.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getDevType));
 
         for (Integer type : typeMapY.keySet()) {
-            List<BattTestDataInf> list=typeMapY.get(type);
-            Map<Integer, List<BattTestDataInf>> testMapY = list.stream().collect(Collectors.groupingBy(BattTestDataInf::getTestType));
+            List<BattLithiumTestDataInf> list=typeMapY.get(type);
+            Map<Integer, List<BattLithiumTestDataInf>> testMapY = list.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getTestType));
             for (Integer test : testMapY.keySet()) {
                 if(type==1){
                     a200YearMap.put(test, testMapY.get(test).size());
@@ -70,11 +70,11 @@
         actmMonthMap.put(2,0);
         actmMonthMap.put(3,0);
         actmMonthMap.put(4,0);
-        List<BattTestDataInf> listMonth=mapper.getDevTinfByMonth(userId);
-        Map<Integer, List<BattTestDataInf>> typeMapM = listMonth.stream().collect(Collectors.groupingBy(BattTestDataInf::getDevType));
+        List<BattLithiumTestDataInf> listMonth=mapper.getDevTinfByMonth(userId);
+        Map<Integer, List<BattLithiumTestDataInf>> typeMapM = listMonth.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getDevType));
         for (Integer type : typeMapM.keySet()) {
-            List<BattTestDataInf> list=typeMapM.get(type);
-            Map<Integer, List<BattTestDataInf>> testMapM = list.stream().collect(Collectors.groupingBy(BattTestDataInf::getTestType));
+            List<BattLithiumTestDataInf> list=typeMapM.get(type);
+            Map<Integer, List<BattLithiumTestDataInf>> testMapM = list.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getTestType));
             for (Integer test : testMapM.keySet()) {
                 if(type==1){
                     a200MonthMap.put(test, testMapM.get(test).size());
@@ -116,11 +116,11 @@
             actmdataMap.put(resultDate.toString(),actmweekDataMap);
         }
 
-        List<BattTestDataInf> listW1=mapper.getDevTinfByWeek(userId,1);
-        Map<String, List<BattTestDataInf>> typeMapW1 = listW1.stream().collect(Collectors.groupingBy(BattTestDataInf::getWeekDay));
+        List<BattLithiumTestDataInf> listW1=mapper.getDevTinfByWeek(userId,1);
+        Map<String, List<BattLithiumTestDataInf>> typeMapW1 = listW1.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getWeekDay));
         for (String day : typeMapW1.keySet()) {
-            List<BattTestDataInf> list1=typeMapW1.get(day);
-            Map<Integer, List<BattTestDataInf>> testMapM1 = list1.stream().collect(Collectors.groupingBy(BattTestDataInf::getTestType));
+            List<BattLithiumTestDataInf> list1=typeMapW1.get(day);
+            Map<Integer, List<BattLithiumTestDataInf>> testMapM1 = list1.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getTestType));
             //杩戜竴鍛╝200
             Map<Integer,Integer> a200weekMap=new HashMap<>();
             a200weekMap.put(2,0);
@@ -131,11 +131,11 @@
             a200dataMap.put(day,a200weekMap);
         }
 
-        List<BattTestDataInf> listW2=mapper.getDevTinfByWeek(userId,2);
-        Map<String, List<BattTestDataInf>> typeMapW2= listW2.stream().collect(Collectors.groupingBy(BattTestDataInf::getWeekDay));
+        List<BattLithiumTestDataInf> listW2=mapper.getDevTinfByWeek(userId,2);
+        Map<String, List<BattLithiumTestDataInf>> typeMapW2= listW2.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getWeekDay));
         for (String day : typeMapW2.keySet()) {
-            List<BattTestDataInf> list2=typeMapW2.get(day);
-            Map<Integer, List<BattTestDataInf>> testMapM2 = list2.stream().collect(Collectors.groupingBy(BattTestDataInf::getTestType));
+            List<BattLithiumTestDataInf> list2=typeMapW2.get(day);
+            Map<Integer, List<BattLithiumTestDataInf>> testMapM2 = list2.stream().collect(Collectors.groupingBy(BattLithiumTestDataInf::getTestType));
             //杩戜竴鍛╝ctm
             Map<Integer,Integer> actmweekMap=new HashMap<>();
             actmweekMap.put(2,0);
@@ -154,12 +154,12 @@
     public Response getTinfById(Integer devId) {
         Map<String,Object> map=new HashMap<>();
         //鑾峰彇鍏呮斁鐢垫暟鎹�
-        List<BattTestDataInf> listDis=mapper.getTinfById(3,devId);
-        List<BattTestDataInf> listChr=mapper.getTinfById(2,devId);
+        List<BattLithiumTestDataInf> listDis=mapper.getTinfById(3,devId);
+        List<BattLithiumTestDataInf> listChr=mapper.getTinfById(2,devId);
         map.put("dis",listDis);
         map.put("chr",listChr);
         if(devId/100000000==2){
-            List<BattTestDataInf> listJun=mapper.getTinfById(4,devId);
+            List<BattLithiumTestDataInf> listJun=mapper.getTinfById(4,devId);
             map.put("jun",listJun);
         }
 
@@ -167,17 +167,17 @@
     }
     //鑾峰彇璁惧鏌愭璁板綍璇︾粏鐨勫崟浣撴斁鐢佃繃绋�
     public Response getTdataById(Integer devId, Integer testRecordCount) {
-        List<BattTestDataId> list=subService.getTdataById(devId,testRecordCount);
+        List<BattLithiumTestData> list=subService.getTdataById(devId,testRecordCount);
 
         return new Response().setII(1,list!=null,list,"鑾峰彇璁惧鏌愭璁板綍璇︾粏鐨勫崟浣撴斁鐢佃繃绋�");
     }
     //鑾峰彇鏀剧數inf
-    public BattTestDataInf getTinfExport(Integer devId, Integer testRecordCount) {
+    public BattLithiumTestDataInf getTinfExport(Integer devId, Integer testRecordCount) {
         QueryWrapper wrapper=new QueryWrapper();
         wrapper.eq("dev_id",devId);
         wrapper.eq("test_record_count",testRecordCount);
         wrapper.last("limit 1");
-        BattTestDataInf tinf=mapper.selectOne(wrapper);
+        BattLithiumTestDataInf tinf=mapper.selectOne(wrapper);
         return  tinf;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1