powerInf/getPowerDevicesPage 添加电源品牌 powerProducer 全部就不传
| | |
| | | |
| | | @GetMapping("getPowerDevicesPage") |
| | | @ApiOperation(value = "用户管理的电源信息分页") |
| | | public Response getPowerDevicesPage(@RequestParam int pageNum,@RequestParam int pageSize,@RequestParam(required = false) String stationId, @RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2,@RequestParam(required = false) String stationName5){ |
| | | public Response getPowerDevicesPage(@RequestParam int pageNum, @RequestParam int pageSize |
| | | , @RequestParam(required = false) String stationId, @RequestParam(required = false) String stationName1 |
| | | , @RequestParam(required = false) String stationName2, @RequestParam(required = false) String stationName5 |
| | | , @RequestParam(required = false) String powerProducer) { |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.getPowerDevicesPage(pageNum,pageSize,userInf.getUId(),stationId, stationName1,stationName2,stationName5); |
| | | return service.getPowerDevicesPage(pageNum, pageSize, userInf.getUId(), stationId, stationName1, stationName2, stationName5, powerProducer); |
| | | } |
| | | |
| | | |
| | |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.getPwrInf(userInf.getUId()); |
| | | } |
| | | |
| | | @GetMapping("getPwrProducer") |
| | | @ApiOperation(value = "获取所有的电源品牌") |
| | | public Response getPwrProducer() { |
| | | return service.getPwrProducer(); |
| | | } |
| | | } |
| | |
| | | |
| | | // List<PowerInf> getPowerDevicesPage(@Param("uId")Long uId, @Param("powerInf") PowerInf powerInf); |
| | | |
| | | List<PowerInf> getPowerDevicesPage(@Param("uId") Long uId, @Param("stationId") String stationId, @Param("stationName1") String stationName1, @Param("stationName2") String stationName2, @Param("stationName5") String stationName5); |
| | | List<PowerInf> getPowerDevicesPage(@Param("uId") Long uId, @Param("stationId") String stationId, @Param("stationName1") String stationName1, @Param("stationName2") String stationName2, @Param("stationName5") String stationName5, @Param("powerProducer") String powerProducer); |
| | | |
| | | List<PowerInf> getStations(@Param("uId") Long uId, @Param("stationName5") String stationName5); |
| | | |
| | |
| | | List<PowerInf> getPwrdevInfAnalysis(int userId); |
| | | |
| | | List<PowerInf> getPwrInf(@Param("uId") Long uId); |
| | | |
| | | //获取所有的电源品牌 |
| | | List<String> getPwrProducer(); |
| | | } |
| | |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public Response getExistStations(String stationName1,String stationName2,String stationName5){ |
| | | List<PowerInf> list = mapper.getExistStations(stationName1,stationName2,stationName5); |
| | | return new Response().set(1,list,"查询成功"); |
| | | public Response getExistStations(String stationName1, String stationName2, String stationName5) { |
| | | List<PowerInf> list = mapper.getExistStations(stationName1, stationName2, stationName5); |
| | | return new Response().set(1, list, "查询成功"); |
| | | } |
| | | |
| | | public Response getStations(Long userId,String stationName5){ |
| | | List<PowerInf> list = mapper.getStations(userId,stationName5); |
| | | return new Response().set(1,list,"查询成功"); |
| | | public Response getStations(Long userId, String stationName5) { |
| | | List<PowerInf> list = mapper.getStations(userId, stationName5); |
| | | return new Response().set(1, list, "查询成功"); |
| | | } |
| | | |
| | | public Response getPowerDevicesPage(int pageNum,int pageSize,Long uId,String stationId, String stationName1,String stationName2,String stationName5){ |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<PowerInf> list = mapper.getPowerDevicesPage(uId,stationId, stationName1, stationName2,stationName5); |
| | | public Response getPowerDevicesPage(int pageNum, int pageSize, Long uId, String stationId, String stationName1, String stationName2, String stationName5, String powerProducer) { |
| | | PageHelper.startPage(pageNum, pageSize); |
| | | List<PowerInf> list = mapper.getPowerDevicesPage(uId, stationId, stationName1, stationName2, stationName5, powerProducer); |
| | | PageInfo<PowerInf> pageInfo = new PageInfo<>(list); |
| | | return new Response().set(1,pageInfo,"查询成功"); |
| | | return new Response().set(1, pageInfo, "查询成功"); |
| | | } |
| | | |
| | | public Response getPowerDevices(String stationId){ |
| | | public Response getPowerDevices(String stationId) { |
| | | QueryWrapper<PowerInf> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("stationid",stationId); |
| | | queryWrapper.eq("stationid", stationId); |
| | | List<PowerInf> list = mapper.selectList(queryWrapper); |
| | | return new Response().set(1,list,"查询成功"); |
| | | return new Response().set(1, list, "查询成功"); |
| | | } |
| | | |
| | | //查询某个电源的详细信息 |
| | |
| | | List<PowerInf> list = mapper.getPwrInf(uId); |
| | | return new Response().set(1, list, "查询成功"); |
| | | } |
| | | |
| | | //获取所有的电源品牌 |
| | | public Response getPwrProducer() { |
| | | List<String> list = mapper.getPwrProducer(); |
| | | return new Response().setII(1, list.size() > 0 ? true : false, list, "获取所有的电源品牌"); |
| | | } |
| | | } |
| | |
| | | <if test="stationName5!=null and stationName5!='' and stationName5!='null'"> |
| | | and StationName5=#{stationName5} |
| | | </if> |
| | | <if test="powerProducer!=null and powerProducer!='' and powerProducer!='null'"> |
| | | and powerProducer=#{powerProducer} |
| | | </if> |
| | | <if test="uId!=null and uId!=0"> |
| | | and StationId in ( select distinct inf.StationId from |
| | | (select StationId from db_battinf.tb_battinf union select StationId from db_pwrdev_inf.tb_pwrdev_inf ) inf, |
| | | (select StationId from db_battinf.tb_battinf union select StationId from db_pwrdev_inf.tb_pwrdev_inf ) |
| | | inf, |
| | | db_user.tb_user_battgroup_baojigroup_battgroup, |
| | | db_user.tb_user_battgroup_baojigroup_usr, |
| | | db_user.tb_user_inf |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.StationId=inf.StationId |
| | | and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and |
| | | db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | and db_user.tb_user_inf.uid=#{uId} ) |
| | | </if> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getPwrProducer" resultType="java.lang.String"> |
| | | select distinct PowerProducer |
| | | from db_pwrdev_inf.tb_pwrdev_inf |
| | | </select> |
| | | |
| | | |
| | | </mapper> |