src/main/java/com/whyc/controller/BattInfController.java
File was deleted src/main/java/com/whyc/controller/BattTestInfController.java
@@ -1,10 +1,10 @@ /* package com.whyc.controller; import com.whyc.dto.ReportBattDTO; import com.whyc.dto.Response; import com.whyc.service.BattTestInfDataService; import com.whyc.service.BattTestInfService; import com.whyc.util.ActionUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -48,4 +48,4 @@ return service.searchMonNumAssess(binfId,monNum); } } }*/ src/main/java/com/whyc/controller/SinfBinfController.java
File was deleted src/main/java/com/whyc/controller/StationInfController.java
New file @@ -0,0 +1,25 @@ package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.service.StationInfService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @Api(tags = "机房管理") @RequestMapping("sinf") public class StationInfController { @Autowired private StationInfService service; @ApiOperation("查询左侧机房信息列表") @GetMapping("getAllSinf") public Response getAllSinf(){ Response res=service.getAllSinf(); return res; } } src/main/java/com/whyc/mapper/BattInfMapper.java
File was deleted src/main/java/com/whyc/mapper/SinfBinfMapper.java
File was deleted src/main/java/com/whyc/mapper/StationInfMapper.java
@@ -2,5 +2,10 @@ import com.whyc.pojo.StationInf; import java.util.List; public interface StationInfMapper extends CustomMapper<StationInf>{ //查询左侧机房信息列表 List<StationInf> getAllSinf(); } src/main/java/com/whyc/pojo/BattInf.java
File was deleted src/main/java/com/whyc/pojo/PowerInf.java
@@ -53,5 +53,29 @@ @ApiModelProperty("电源类型:1<包含电源实时rt>,2<包含电源实时rt>,3<不包含电源实时rt>") private Integer devType; @TableField("binf_name") @ApiModelProperty("电池组名称") private String binfName; @TableField("mon_count") @ApiModelProperty("电池组单体总数") private Integer monCount; @TableField("mon_vol") @ApiModelProperty("电池组标称电压") private Float monVol; @TableField("mon_cap") @ApiModelProperty("电池组标称容量") private Float monCap; @TableField("mon_res") @ApiModelProperty("电池组标称内阻") private Float monRes; @TableField("load_curr") @ApiModelProperty("电池组负载电流") private Float loadCurr; } src/main/java/com/whyc/pojo/SinfBinf.java
File was deleted src/main/java/com/whyc/pojo/StationInf.java
@@ -32,8 +32,5 @@ private Integer stype; @TableField(exist = false) private List<BattInf> binfList; @TableField(exist = false) private List<PowerInf> pinfList; } src/main/java/com/whyc/service/BattInfService.java
File was deleted src/main/java/com/whyc/service/BattTestInfService.java
@@ -1,3 +1,4 @@ /* package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -199,11 +200,13 @@ map.put("flag",1); } /*劣化:本年度未放电,内阻告警(预告警(重要),告警(紧急)) */ /*劣化:本年度未放电,内阻告警(预告警(重要),告警(紧急)) *容量小于劣化阈值,大于损坏阈值,内阻告警(预告警,告警) * 容量小于劣化阈值,内阻正常 * 容量正常,内阻告警(预告警,告警) */ *//* if (((disNum==0)&&(listALmRes.size()>0)) ||((disNum>0)&&(realCap <= capAlarm * monCapStd && realCap >= capChange * monCapStd)&&(listALmRes.size()>0)) ||((disNum>0)&&(realCap <= capAlarm * monCapStd)&&(listALmRes.size()<=0)) @@ -221,14 +224,16 @@ return map; } //查询电池告警(2024。4.15修改) /*未放电:本年度未放电 */ /*未放电:本年度未放电 *优秀:本年度已放电,且容量健康,无内阻告警(预告警(重要),告警(紧急)) *劣化:本年度未放电,内阻告警(预告警(重要),告警(紧急)) * 容量小于劣化阈值,大于损坏阈值,内阻告警(预告警,告警) * 容量小于劣化阈值,内阻正常 * 容量正常,内阻告警(预告警,告警) * 损坏:容量低,内阻告警 * */ * *//* private List getAlm2(Integer battGroupId) { List list = alarmMapper.getAlm2(battGroupId); return list; @@ -268,9 +273,11 @@ if ((disNum > 0) && (realCap > capAlarm * monCapStd)) { map.put("flag", 1); } /*劣化: */ /*劣化: *容量小于劣化阈值,大于损坏阈值 */ *//* if (((disNum > 0) && (realCap <= capAlarm * monCapStd && realCap >= capChange * monCapStd))) { map.put("flag", 2); } @@ -308,4 +315,4 @@ return new Response().set(1, map, "查询成功"); } } }*/ src/main/java/com/whyc/service/SinfBinfService.java
File was deleted src/main/java/com/whyc/service/StationInfService.java
New file @@ -0,0 +1,22 @@ package com.whyc.service; import com.whyc.dto.Response; import com.whyc.mapper.StationInfMapper; import com.whyc.pojo.StationInf; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class StationInfService { @Autowired(required = false) private StationInfMapper mapper; //查询左侧机房信息列表 public Response getAllSinf() { List<StationInf> list=mapper.getAllSinf(); return new Response().setII(1,list!=null,list,"查询左侧机房信息列表"); } } src/main/resources/config/application.yml
@@ -1,8 +1,8 @@ spring: profiles: # active: dev active: dev # active: prod active: dev-mysql # active: dev-mysql src/main/resources/mapper/BattInfMapper.xml
File was deleted src/main/resources/mapper/SinfBinfMapper.xml
File was deleted src/main/resources/mapper/StationInfMapper.xml
New file @@ -0,0 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.whyc.mapper.StationInfMapper"> <resultMap id="sinfList" type="StationInf"> <id property="sinfId" column="sinf_id"></id> <result property="sinfName" column="sinf_name"></result> <collection property="pinfList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.PowerInf" column="{sinfId=sinf_id}" select="selectPinfList"> </collection> </resultMap> <select id="getAllSinf" resultMap="sinfList"> select * from db_batt.station_inf order by sinf_id asc </select> <select id="selectPinfList" resultType="powerInf"> select power_inf.* from db_batt.power_inf,db_batt.sinf_pinf <where> power_inf.power_id=sinf_pinf.pinf_id and sinf_pinf.sinf_id=#{sinfId} and power_inf.binf_id!=0 </where> </select> </mapper>