src/main/java/com/whyc/controller/FileInfoController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/mapper/FileInfoMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/pojo/FileInfo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/FileInfoService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/FileInfoMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/controller/FileInfoController.java
@@ -59,4 +59,11 @@ } return paramService.updateXmlByParamMap(map,filePath); } @ApiOperation("对比时下拉选择站点下挂在的文件信息") @PostMapping("selectFileInStation") public Response selectFileInStation(){ return service.selectFileInStation(); } } src/main/java/com/whyc/mapper/FileInfoMapper.java
@@ -17,4 +17,7 @@ //查询出机房下所有的文件fileIds List<Integer> selectListFiles(int stationId); //对比时下拉选择站点下挂在的文件信息 List selectFileInStation(); } src/main/java/com/whyc/pojo/FileInfo.java
@@ -56,6 +56,10 @@ @ApiModelProperty(value = "电池组信息集合") private List<BattgroupInfo> battInfoList; @TableField(exist = false) @ApiModelProperty(value = "站点名称") private String stationName; public FileInfo() { fileParam=new FileParam(); battInfoList=new ArrayList<>(); src/main/java/com/whyc/service/FileInfoService.java
@@ -3,17 +3,25 @@ import com.whyc.dto.ActionUtil; import com.whyc.dto.FileParamToXml; import com.whyc.dto.Response; import com.whyc.mapper.FileInfoMapper; import com.whyc.pojo.FileParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.lang.reflect.Field; import java.text.ParseException; import java.util.HashMap; import java.util.List; import java.util.Map; @Service public class FileInfoService { @Autowired(required = false) private FileInfoMapper mapper; //对比时下拉选择站点下挂在的文件信息 public Response selectFileInStation() { List list=mapper.selectFileInStation(); return new Response().setII(1,list.size()>0,list,"挂在的文件信息"); } } src/main/resources/mapper/FileInfoMapper.xml
@@ -15,4 +15,12 @@ <select id="selectListFiles" resultType="java.lang.Integer"> select distinct file_id from db_res_meter.tb_file_info where station_id=#{stationId} </select> <select id="selectFileInStation" resultType="fileinfo"> select distinct db_res_meter.tb_file_info.*,db_res_meter.tb_station_info.station_name from db_res_meter.tb_file_info,db_res_meter.tb_station_info where tb_file_info.station_id=tb_station_info.station_id order by tb_file_info.station_id asc </select> </mapper>