whycxzp
2025-04-14 8e85ad8e022d2885c410d0654bce08e2a392b08f
放电记录查询
5个文件已修改
35 ■■■■ 已修改文件
src/main/java/com/whyc/controller/BattTestInfController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BattTestInfMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattTestInfService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattTestInfMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/BattTestInfController.java
@@ -18,20 +18,25 @@
    @Autowired
    private BattTestInfDataService dataService;
    @ApiOperation("查询分页-电池组的充放电记录")
    /*@ApiOperation("查询分页-电池组的充放电记录")
    @GetMapping("getPageByBattGroupId")
    public Response getPageByBattGroupId(@RequestParam int battGroupId
            , @RequestParam int pageNum, @RequestParam int pageSize){
        return service.getPageByBattGroupId(battGroupId,pageNum,pageSize);
    }*/
    @GetMapping("getDischargePage")
    public Response getDischargePage(@RequestParam int pageNum,@RequestParam int pageSize){
        return service.getDischargePage(pageNum,pageSize);
    }
    //根据充放电记录查询单体放电历史详情
    /*//根据充放电记录查询单体放电历史详情
    @ApiOperation("查询单次放电记录详情")
    @GetMapping("getByBattGroupIdAndTestRecordCount")
    public Response getByBattGroupIdAndTestRecordCount(@RequestParam int battGroupId,@RequestParam int testRecordCount){
        Response res=dataService.getByBattGroupIdAndTestRecordCount(battGroupId,testRecordCount);
        return res;
    }
    }*/
    /*@PostMapping("searchGroupAssess")
src/main/java/com/whyc/mapper/BattTestInfMapper.java
@@ -16,4 +16,6 @@
    //获取有效的放电记录
    List<BattTestInf> searchDischarge(int battGroupId);
    List<BattTestInf> getDischargeList();
}
src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java
@@ -25,7 +25,7 @@
    @TableField("binf_id")
    @ApiModelProperty("电池组id")
    private Integer binfId;
    private Integer battGroupId;
    @TableField("record_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -95,4 +95,8 @@
    @TableField(exist = false)
    private float realCap;
    @TableField(exist = false)
    private String battGroupName;
}
src/main/java/com/whyc/service/BattTestInfService.java
@@ -50,6 +50,13 @@
        return new Response().set(1, pageInfo);
    }
    public Response getDischargePage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<BattTestInf> list =mapper.getDischargeList();
        PageInfo pageInfo = new PageInfo(list);
        return new Response().set(1, pageInfo);
    }
    /*
    //1.4电池性能评估
    public Response searchGroupAssess(int pageNum, int pageSize, ReportBattDTO tinf, int userId){
src/main/resources/mapper/BattTestInfMapper.xml
@@ -53,4 +53,13 @@
        </where>
        ORDER BY db_dis_batt.batt_test_inf.BattGroupId asc, test_starttime desc
    </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
        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)
        or (test_stoptype=2 and test_timelong>=7200))
        ORDER BY db_dis_batt.batt_test_inf.test_starttime desc
    </select>
</mapper>