| | |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchStationNameInGroup(userInf.getUId().intValue(), stationName1); |
| | | } |
| | | @GetMapping("/searchInform") |
| | | @ApiOperation(value = "电池组信息配置中查询所有的电池组信息") |
| | | public Response searchInform(@RequestParam(required = false)String stationName1,@RequestParam(required = false)String stationName2,@RequestParam(required = false)String stationName5,@RequestParam(required = false)String stationName3){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchInfo(userInf.getUId().intValue(),stationName1,stationName2,stationName5,stationName3); |
| | | } |
| | | |
| | | |
| | | @GetMapping("StationList") |
| | | @ApiOperation(value = "查询用户管理下的机房2") |
| | |
| | | |
| | | @GetMapping("/getProvincesContainBatt") |
| | | @ApiOperation(value = "获取包含电池的省份") |
| | | public List<String> getProvincesContainBatt(){ |
| | | List<String> list = service.getProvincesContainBatt(); |
| | | return list; |
| | | public Response getProvincesContainBatt(){ |
| | | return service.getProvincesContainBatt(); |
| | | } |
| | | |
| | | @GetMapping("/getCitiesContainBatt") |
| | | @ApiOperation(value = "获取某省下的城市") |
| | | public List<String> getCitiesContainBatt(@RequestParam String stationName1){ |
| | | List<String> list = service.getCitiesContainBatt(stationName1); |
| | | return list; |
| | | public Response getCitiesContainBatt(@RequestParam String stationName1){ |
| | | return service.getCitiesContainBatt(stationName1); |
| | | } |
| | | |
| | | @GetMapping("/getDistrictsContainBatt") |
| | | @ApiOperation(value = "获取某省某城市下的地区") |
| | | public List<String> getDistrictsContainBatt(@RequestParam String stationName1,@RequestParam String stationName2){ |
| | | List<String> list = service.getDistrictsContainBatt(stationName1,stationName2); |
| | | return list; |
| | | public Response getDistrictsContainBatt(@RequestParam String stationName1,@RequestParam String stationName2){ |
| | | return service.getDistrictsContainBatt(stationName1,stationName2); |
| | | } |
| | | |
| | | @GetMapping("/getProvinces") |
| | | @ApiOperation(value = "用户管理的机房省份") |
| | | public List<String> getProvinces(){ |
| | | public Response getProvinces(){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | List<String> list = service.getProvinces(userInf.getUId()); |
| | | return list; |
| | | return service.getProvinces(userInf.getUId()); |
| | | } |
| | | @GetMapping("/getCities") |
| | | @ApiOperation(value = "用户管理的省份的城市") |
| | | public List<String> getCities(@RequestParam(required = false) String stationName1){ |
| | | public Response getCities(@RequestParam(required = false) String stationName1){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | List<String> list = service.getCities(userInf.getUId(),stationName1); |
| | | return list; |
| | | return service.getCities(userInf.getUId(),stationName1); |
| | | } |
| | | @GetMapping("/getDistricts") |
| | | @ApiOperation(value = "用户管理的地区") |
| | | public List<String> getDistricts(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2){ |
| | | public Response getDistricts(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | List<String> list = service.getDistricts(userInf.getUId(),stationName1,stationName2); |
| | | return list; |
| | | return service.getDistricts(userInf.getUId(),stationName1,stationName2); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getExistStations") |
| | | @ApiOperation(value = "获取机房") |
| | | public List<PowerInf> getExistStations( @RequestParam String stationName1,@RequestParam String stationName2,@RequestParam String stationName5){ |
| | | List<PowerInf> list = service.getExistStations(stationName1,stationName2,stationName5); |
| | | return list; |
| | | public Response getExistStations( @RequestParam String stationName1,@RequestParam String stationName2,@RequestParam String stationName5){ |
| | | return service.getExistStations(stationName1,stationName2,stationName5); |
| | | } |
| | | |
| | | @GetMapping("/getPowerDevicesPage") |
| | |
| | | |
| | | List<String> getStationNameInGroup(@Param("userId")Integer userId,@Param("stationName1")String stationName1); |
| | | |
| | | List<Battinf> searchInform(@Param("userId")Integer userId,@Param("stationName1")String stationName1,@Param("stationName2")String stationName2,@Param("stationName5")String stationName5,@Param("stationName3")String stationName3); |
| | | |
| | | List<Battinf> getStationListOfBattPower(); |
| | | |
| | | List<Battinf> getBattgroupListByStationNameAndStationName1(@Param("userId")Integer userId,@Param("stationName1")String stationName1,@Param("stationName")String stationName); |
| | |
| | | return new Response().set(1,battinf,"添加成功"); |
| | | } |
| | | |
| | | public Response searchInfo(Integer userId,String stationName1,String stationName2,String stationName5,String stationName3){ |
| | | List<Battinf> list = battInfMapper.searchInform(userId, stationName1, stationName2,stationName5, stationName3); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | public void addBatch(List<Battinf> battInfList){ |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.PowerInfMapper; |
| | | import com.whyc.pojo.PowerInf; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | |
| | | public List<String> getProvincesContainBatt(){ |
| | | public Response getProvincesContainBatt(){ |
| | | List<String> list= mapper.getProvincesContainBatt(); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public List<String> getCitiesContainBatt(String stationName1){ |
| | | public Response getCitiesContainBatt(String stationName1){ |
| | | List<String> list= mapper.getCitiesContainBatt(stationName1); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public List<String> getDistrictsContainBatt(String stationName1,String stationName2){ |
| | | public Response getDistrictsContainBatt(String stationName1,String stationName2){ |
| | | List<String> list= mapper.getDistrictsContainBatt(stationName1,stationName2); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public List<String> getProvinces(Long uId){ |
| | | public Response getProvinces(Long uId){ |
| | | List<String> list= mapper.getProvinces(uId); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public List<String> getCities(Long uId,String stationName1){ |
| | | public Response getCities(Long uId,String stationName1){ |
| | | List<String> list= mapper.getCities(uId,stationName1); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | public List<String> getDistricts(Long uId,String stationName1,String stationName2){ |
| | | public Response getDistricts(Long uId,String stationName1,String stationName2){ |
| | | List<String> list= mapper.getDistricts(uId,stationName1,stationName2); |
| | | return delEmptyData(list); |
| | | delEmptyData(list); |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public List<PowerInf> getExistStations(String stationName1,String stationName2,String stationName5){ |
| | | public Response getExistStations(String stationName1,String stationName2,String stationName5){ |
| | | List<PowerInf> list = mapper.getExistStations(stationName1,stationName2,stationName5); |
| | | return list; |
| | | return new Response().set(1,list,"查询成功"); |
| | | } |
| | | |
| | | public PageInfo<PowerInf> getPowerDevicesPage(Long uId,String stationId, String stationName1,String stationName2,String stationName5){ |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.BattInfMapper" > |
| | | |
| | | |
| | | <select id="getMaxBattGroupId_zj" resultType="int"> |
| | | select max(battgroupId) as id from db_battinf.tb_battinf limit 1 |
| | | </select> |
| | |
| | | select baoji_group_id,#{stationId},#{battgroupId} from db_user.tb_user_battgroup_baojigroup_usr where uid=#{userId} |
| | | </insert> |
| | | |
| | | <select id="searchInform" resultType="com.whyc.pojo.Battinf"> |
| | | select distinct(stationId),StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp, |
| | | FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent,tmp_id, |
| | | MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,DisCurrMax,station_phone, |
| | | Vol_grade,Manufacturers,Assetequipment,Deviceclasspath,Deviceoperationdepartment,PropertyRightUnit,PropertyAttribute,FactoryNumber,OperationTeam, |
| | | DeviceIdentityCode,ProjectType,BatteryApplicationType,SingleRatedVoltage,RemoteMonitor,BatttIndependentPlaced,JunChargeVoltageValue,video_url,charge_type,buscouple_state |
| | | from db_battinf.tb_battinf |
| | | <where> |
| | | <if test="stationName1!=null and stationName1!='' and stationName1!='null'"> |
| | | and stationname1 like CONCAT('%',#{stationName1},'%') |
| | | </if> |
| | | <if test="stationName2!=null and stationName2!='' and stationName2!='null'"> |
| | | and stationName2 like CONCAT('%',#{stationName2},'%') |
| | | </if> |
| | | <if test="stationName5!=null and stationName5!='' and stationName5!='null'"> |
| | | and stationName5 like CONCAT('%',#{stationName5},'%') |
| | | </if> |
| | | <if test="stationName3!=null and stationName3!='' and stationName3!='null'"> |
| | | and stationName3 like CONCAT('%',#{stationName3},'%') |
| | | </if> |
| | | <if test="userId!=null and userId!=0"> |
| | | and StationId in( |
| | | select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from |
| | | db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id |
| | | and db_user.tb_user_battgroup_baojigroup_usr.uId=#{userId} |
| | | ) |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |