src/main/java/com/whyc/pojo/db_batt_testdata/BatttestdataInf.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/BatttestdataInfService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BatttestdataInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/pojo/db_batt_testdata/BatttestdataInf.java
@@ -55,7 +55,7 @@ @ApiModelProperty(value = "是否是最新数据") private Integer dataNew; @ApiModelProperty(value = "是否有效") @ApiModelProperty(value = "是否为一次有效的记录1:有效") private Integer dataAvailable; @ApiModelProperty(value = "记录笔数") 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; } src/main/resources/mapper/BatttestdataInfMapper.xml
@@ -44,8 +44,9 @@ <select id="getNoDischargeData" resultType="com.whyc.pojo.db_batt_testdata.BatttestdataInf"> select * from db_batt_testdata.tb_batttestdata_inf <where> battgroup_id=#{battgroupId} and test_type=3 and (test_starttype!=3 or test_timelong <7200) battgroup_id=#{battgroupId} and test_type=3 and data_available!=1 <if test="testStartTime!=null"> and tb_batttestdata_inf.test_starttime>=#{stic.testStartTime} </if>