src/main/java/com/fgkj/controller/BattInfController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/mapper/impl/BattInfMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/services/BattInfServices.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BattInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/fgkj/controller/BattInfController.java
@@ -252,36 +252,44 @@ return service.findMenu(); } //判断新增的电池组是否存在 @GetMapping("judgeBatt") @ApiOperation(notes = "",value="判断新增的电池组是否存在") public ServiceModel judgeBatt(@RequestBody BattInf binf){ //判断新增的电池组是否存在 @PostMapping("judgeBatt") @ApiOperation(notes = "",value="判断新增的电池组是否存在") public ServiceModel judgeBatt(@RequestParam String stationName) { BattInf binf = new BattInf(); binf.setStationName(stationName); return service.judgeBatt(binf); } @GetMapping("byBattGroupId2") @PostMapping("byBattGroupId2") @ApiOperation(notes = "",value="byBattGroupId2") public ServiceModel findByBattGroupId(@RequestBody BattInf bif){ ServiceModel model=service.findByBattGroupId(bif); public ServiceModel findByBattGroupId(@RequestParam Integer battGroupId){ BattInf binf = new BattInf(); binf.setBattGroupId(battGroupId); ServiceModel model=service.findByBattGroupId(binf); return model; } //根据电池组id查询不重复的单体编号 @GetMapping("monNumByBattGroupId") @PostMapping("monNumByBattGroupId") @ApiOperation(notes = "",value="电池组id查询不重复的单体编号") public ServiceModelOnce serchByMonNum(@RequestBody BattInf bif){ public ServiceModelOnce serchByMonNum(@RequestParam Integer battGroupId) { BattInf binf = new BattInf(); binf.setBattGroupId(battGroupId); return service.serchByMonNum(bif); return service.serchByMonNum(binf); } //5.3添加选取电池组或者机房或者维护区(未被应用) @Deprecated public ServiceModel serchBatt(@RequestBody BattInf bif) { // bif=ActionUtil.getGson("yyyy-MM-dd").fromJson(result,BattInf.class); return service.serchBatt(bif); //5.3添加选取电池组或者机房或者维护区(未被应用) @PostMapping("serchBatt") @ApiOperation(notes = "结果集:{ \"code\": 1, \"msg\": null, \"data\": [{ \"stationId\": \"42010007\", \"stationName\": \"山西省-太原市-迎泽区-局机房119-局机房站-1\", \"stationName1\": \"山西省\"\"battGroupId\": 1000003, \"battGroupName\": \"电池组1\", \"battGroupName\": \"电池组1\" }]}",value="添加选取电池组或者机房或者维护区(未被应用)") public ServiceModel serchBatt(@ApiParam(value = "地址",required = true) @RequestParam String stationName,@ApiParam(value = "省",required = true) @RequestParam String stationName1,@RequestParam Integer battGroupId) { BattInf binf = new BattInf(); binf.setStationName(stationName); binf.setStationName1(stationName1); binf.setBattGroupId(battGroupId); return service.serchBatt(binf); } //6.4.7按地域和标称电压分组统计蓄电池组服役超期的数量 src/main/java/com/fgkj/mapper/impl/BattInfMapper.java
@@ -80,7 +80,7 @@ public List<Integer> searchAll(); //5.3添加选取电池组或者机房或者维护区 public List serchBatt(Object obj); public List serchBatt(BattInf obj); //查询电池组左侧导航菜单(实时监测,历史数据查询) public List findMenu(); @@ -92,6 +92,8 @@ List<BattInf> serchByStationName1plus(BattInf bif); // 根据StationName(站点) 查不重复的BattGroupName(蓄电池组) // @Select("select DISTINCT(StationName),FBSDeviceId,StationId,battgroupname,moncount,BattGroupId,StationName,battproducer,moncapstd,monvolstd,battproductdate,battinusedate,GroupIndexInFBSDevice " + // "from db_battinf.tb_battinf where stationname1=#{stationName1} ORDER BY StationName1,battgroupId") public List<BattInf> serchByBattGroupName(BattInf obj); @@ -99,7 +101,7 @@ public List<BattInf> serchByStationName(BattInf obj); // 根据StationName1(维护区) 查不重复的StationName(站点)不包含91000000一期设备 public List<BattInf> serchByStationNameNot91(BattInf obj); public List<BattInf> serchByStationNameNot91(Object obj); // 查不重复的StationName1(维护区) @Select("select DISTINCT(StationName1) from db_battinf.tb_battinf ORDER BY StationName1,battgroupId") src/main/java/com/fgkj/services/BattInfServices.java
@@ -313,6 +313,7 @@ public ServiceModelOnce serchByStationName1(BattInf bif) { ServiceModelOnce model = new ServiceModelOnce(); List list = null; System.out.println("bif = " + bif); if (bif.getStationName1() == null&&!bif.getStationName1().equals("null")) { list = mapper.serchByStationName1(bif); }else{ @@ -472,13 +473,14 @@ return model; } //5.3添加选取电池组或者机房或者维护区(未被应用) public ServiceModel serchBatt(Object obj) { Boolean bl=false; List<BattInf> list=mapper.serchBatt(obj); if(list!=null && list.size()>0){ public ServiceModel serchBatt(BattInf obj) { ServiceModel model = new ServiceModel(); Boolean bl = false; List<BattInf> list = mapper.serchBatt(obj); if (list != null && list.size() > 0) { model.setCode(1); model.setData(list); }else{ } else { model.setCode(0); model.setMsg("查询失败!"); } @@ -537,14 +539,14 @@ return model; } public ServiceModelOnce serchByBattGroupName(BattInf obj) { ServiceModelOnce model = new ServiceModelOnce(); List list = mapper.serchByBattGroupName(obj); ServiceModelOnce model=new ServiceModelOnce(); List list=mapper.serchByBattGroupName(obj); if (list != null && list.size() > 0) { model.setCode(1); model.setData(list); model.setSum(list.size()); model.setSum(list.size()); model.setMsg("查询成功!"); } else { }else{ model.setCode(0); model.setMsg("查询失败!"); } src/main/resources/mapper/BattInfMapper.xml
@@ -4352,7 +4352,18 @@ <select id="search" resultType="java.util.List"></select> <!-- <select id="searchMaxdevId_binf" resultType="java.lang.Integer"></select>--> <!-- <select id="searchAll" resultType="java.util.List"></select>--> <select id="serchBatt" resultType="java.util.List"></select> <select id="serchBatt" resultType="BattInf"> select distinct(battgroupid),stationid,stationname,stationname1,battgroupname from db_battinf.tb_battinf where <if test="stationName1==''">stationName1!=#{stationName1}</if> <if test="stationName1!=''">stationName1=#{stationName1}</if> <if test="stationName==''"> and stationName!=#{stationName}</if> <if test="stationName!=''"> and stationName=#{stationName}</if> <if test="battGroupId==0">and battGroupId!=#{battGroupId}</if> <if test="battGroupId!=0">and battGroupId=#{battGroupId}</if> order by stationid </select> <select id="findMenu" resultType="java.util.List"></select> <!-- <select id="serchByStationName1" resultType="java.util.List">/</select>--> <select id="serchByBattGroupName" resultMap="BaseResultMapBattInf2">