From 8557f4a954278b76a3054ee1edbb93f656b533ba Mon Sep 17 00:00:00 2001 From: whycxzp <glperry@163.com> Date: 星期一, 14 四月 2025 09:29:48 +0800 Subject: [PATCH] 更新容量 --- src/main/resources/mapper/BattTestInfMapper.xml | 2 +- src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java | 8 ++++++++ src/main/java/com/whyc/service/BattTestInfService.java | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java b/src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java index 58fe937..00a5299 100644 --- a/src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java +++ b/src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java @@ -99,4 +99,12 @@ @TableField(exist = false) private String battGroupName; + /**鏍囩О鍗曚綋鐢靛帇*/ + @TableField(exist = false) + private int monVol; + + /**鏍囩О瀹归噺*/ + @TableField(exist = false) + private int monCap; + } \ No newline at end of file diff --git a/src/main/java/com/whyc/service/BattTestInfService.java b/src/main/java/com/whyc/service/BattTestInfService.java index edecf98..aa8858c 100644 --- a/src/main/java/com/whyc/service/BattTestInfService.java +++ b/src/main/java/com/whyc/service/BattTestInfService.java @@ -53,6 +53,14 @@ public Response getDischargePage(int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); List<BattTestInf> list =mapper.getDischargeList(); + list.forEach(item->{ + //灏忔椂鐜� + int hourRate = BattCapFactory.GetHourRate(item.getMonCap(), item.getTestCurr()); + //瀹归噺璁$畻 + Double realCap = BattCapFactory.GetMonomerCap(item.getMonCap(), hourRate, item.getTestCap(), item.getMaxMonvol(), item.getMinMonvol(), item.getMonVol(), BattCapFactory.CapType_Real); + item.setRealCap(realCap.floatValue()); + }); + PageInfo pageInfo = new PageInfo(list); return new Response().set(1, pageInfo); } diff --git a/src/main/resources/mapper/BattTestInfMapper.xml b/src/main/resources/mapper/BattTestInfMapper.xml index 182b343..a1987aa 100644 --- a/src/main/resources/mapper/BattTestInfMapper.xml +++ b/src/main/resources/mapper/BattTestInfMapper.xml @@ -55,7 +55,7 @@ </select> <select id="getDischargeList" resultType="com.whyc.pojo.db_dis_batt.BattTestInf"> select - binf_name as battGroupName,batt_test_inf.binf_id as battGroupId,test_record_count,group_vol,test_curr,max_monvol,min_monvol,test_cap,test_starttime,record_time,test_timelong,test_stoptype + binf_name as battGroupName,batt_test_inf.binf_id as battGroupId,mon_cap,mon_vol,test_record_count,group_vol,test_curr,max_monvol,min_monvol,test_cap,test_starttime,record_time,test_timelong,test_stoptype from db_dis_batt.batt_test_inf,db_batt.power_inf where db_batt.power_inf.binf_id=db_dis_batt.batt_test_inf.binf_id and test_starttype=3 and test_type=3 and (test_stoptype in (3, 4, 6) -- Gitblit v1.9.1