| | |
| | | package com.fgkj.mapper.impl; |
| | | |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.BattMap_information; |
| | | import com.fgkj.dto.Batt_Maint_Dealarm; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.mapper.FBS9100_ComBase; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface BattInfMapper{ |
| | | |
| | | //添加新的电池组(多个) |
| | | public boolean add(Object obj); |
| | | public boolean add(BattInf obj); |
| | | |
| | | //TODO 待测试 |
| | | //修改电池组信息(多个) |
| | | public boolean update(Object obj); |
| | | @Update("update db_battinf.tb_battinf set StationId=#{stationId},StationName=#{stationName},StationName1=#{stationName1}," + |
| | | "StationName2=#{stationName2},StationName3=#{stationName3},StationName4=#{stationName4},StationName5=#{stationName5}," + |
| | | "StationIp=#{stationIp},FBSDeviceId=#{fbsDeviceId},FbsDeviceIp=#{fbsDeviceIp},FBSDeviceName=#{fbsDeviceName}," + |
| | | "GroupIndexInFBSDevice=#{groupIndexInFBSDevice}" + |
| | | ",BattGroupNum=#{battGroupNum},BattGroupName=#{battGroupName},FloatVolLevel=#{floatVolLevel}," + |
| | | "OfflineVolLevel=#{offlineVolLevel},BattFloatCurrent=#{battFloatCurrent}," + |
| | | "MonCount=#{monCount},MonCapStd=#{monCapStd},monVolStd=#{monVolStd},monResStd=#{monResStd}, " + |
| | | "MonSerStd=#{monSerStd},MonVolLowToAvg=#{monVolLowToAvg},BattProducer=#{battProducer},BattModel=#{battModel}," + |
| | | "BattProductDate=#{battProductDate},BattInUseDate=#{battInUseDate}," + |
| | | "Load_curr=#{load_curr},DisCurrMax=#{disCurrMax},station_phone=#{station_phone},FbsDeviceIp=#{fbsDeviceIp},FbsDeviceIp_YM=#{fbsDeviceIp}," + |
| | | "FbsDeviceIp_WG=#{fbsDeviceIp_WG},Vol_grade=#{vol_grade},Manufacturers=#{manufacturers}," + |
| | | "Assetequipment=#{assetequipment},Deviceclasspath=#{deviceclasspath}," + |
| | | "Deviceoperationdepartment=#{deviceoperationdepartment},PropertyRightUnit=#{propertyRightUnit}," + |
| | | "PropertyAttribute=#{propertyAttribute},FactoryNumber=#{factoryNumber}," + |
| | | "OperationTeam=#{operationTeam},DeviceIdentityCode=#{deviceIdentityCode},ProjectType=#{projectType}," + |
| | | "BatteryApplicationType=#{batteryApplicationType},SingleRatedVoltage=#{singleRatedVoltage}," + |
| | | "RemoteMonitor=#{remoteMonitor},BatttIndependentPlaced=#{batttIndependentPlaced}," + |
| | | "JunChargeVoltageValue=#{junChargeVoltageValue} where battgroupId=#{battGroupId}") |
| | | public int update(BattInf obj); |
| | | |
| | | //修改电池信息配置(ip地址,掩码和网关) |
| | | public boolean updateIp(Object obj); |
| | | @Update("update db_battinf.tb_battinf set FbsDeviceIp=#{fbsDeviceIp},FbsDeviceIp_YM=#{fbsDeviceIp_YM},FbsDeviceIp_WG=#{fbsDeviceIp_WG} where FbsDeviceId=#{fbsDeviceId}") |
| | | public int updateIp(BattInf obj); |
| | | |
| | | //删除电池组(多个) |
| | | public boolean del(Object obj); |
| | | @Delete("delete from db_battinf.tb_battinf where battgroupid=#{battGroupId}") |
| | | public int del(BattInf obj); |
| | | |
| | | //电池组信息配置中查询所有的电池组信息 |
| | | public List searchInform(Object obj); |
| | | @Select("select distinct(StationId),StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp," |
| | | + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent " + |
| | | ",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 " + |
| | | " From db_battinf.tb_battinf " + |
| | | " Where StationName1 like '%${binf.stationName1}%' and StationName2 like '%${binf.stationName2}%' and StationName5 like '%${binf.stationName5}%' and StationName3 like '%${binf.stationName3}%' " + |
| | | " order by StationName3 ASC,StationId asc ") |
| | | public List<BattInf> searchInform(Batt_Maint_Dealarm obj); |
| | | |
| | | //添加电池组时查询出最大的机房id和电池组id |
| | | public List searchMaxId(); |
| | | |
| | | //判断新增的电池组是否存在 |
| | | public List judgeBattStationName(Object obj); |
| | | @Select("select distinct stationid,fBSDeviceId from db_battinf.tb_battinf where stationname=#{stationName} limit 1") |
| | | public List<BattInf> judgeBattStationName(BattInf obj); |
| | | |
| | | //判断新增机房名是否存在 |
| | | public List judgeBattStationName3(Object obj); |
| | | |
| | | //0.4根据城市名称查电池组 |
| | | public List search(Object obj); |
| | | @Select("select distinct(battgroupid) from db_battinf.tb_battinf where stationname like '%${stationName}%' ") |
| | | public List<BattInf> search(BattInf obj); |
| | | |
| | | //查询出当前存在内存中最大的设备的id(很重要**********) |
| | | @Select("select max(FbsDeviceId) as id from db_battinf.tb_battinf limit 1") |
| | | public int searchMaxdevId_binf(); |
| | | |
| | | //2.2查所有的电池组 |
| | | public List searchAll(); |
| | | @Select("select battgroupid from db_battinf.tb_battinf ") |
| | | public List<Integer> searchAll(); |
| | | |
| | | //5.3添加选取电池组或者机房或者维护区 |
| | | public List serchBatt(Object obj); |
| | | public List<BattInf> serchBatt(BattInf obj); |
| | | |
| | | //查询电池组左侧导航菜单(实时监测,历史数据查询) |
| | | public List findMenu(); |
| | | |
| | | //根据StationName1(维护区) 查不重复BattGroupName(蓄电池组) |
| | | public List serchByStationName1(Object obj); |
| | | @Select("select DISTINCT(StationName),battgroupname,moncount,BattGroupId from db_battinf.tb_battinf ORDER BY StationName1,battgroupId") |
| | | public List<BattInf> serchByStationName1(BattInf obj); |
| | | @Select("select DISTINCT(StationName),battgroupname,moncount,battgroupid from db_battinf.tb_battinf where StationName1 like '%${stationName1}%' ORDER BY StationName1,battgroupid") |
| | | List<BattInf> serchByStationName1plus(BattInf bif); |
| | | |
| | | // 根据StationName(站点) 查不重复的BattGroupName(蓄电池组) |
| | | public List serchByBattGroupName(Object obj); |
| | | |
| | | // @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); |
| | | |
| | | |
| | | // 根据StationName1(维护区) 查不重复的StationName(站点) |
| | | public List serchByStationName(Object obj); |
| | | public List<BattInf> serchByStationName(BattInf obj); |
| | | |
| | | // 根据StationName1(维护区) 查不重复的StationName(站点)不包含91000000一期设备 |
| | | public List serchByStationNameNot91(Object obj); |
| | | public List<BattInf> serchByStationNameNot91(Object obj); |
| | | |
| | | // 查不重复的StationName1(维护区) |
| | | public List serchByStation() ; |
| | | @Select("select DISTINCT(StationName1) from db_battinf.tb_battinf ORDER BY StationName1,battgroupId") |
| | | public List<String> serchByStation() ; |
| | | |
| | | // 查不重复的StationName1(维护区)不包含91000000一期设备 |
| | | public List serchByStationNot91(); |
| | | @Select("select DISTINCT(StationName1) from db_battinf.tb_battinf where fbsdeviceId >= '${@com.fgkj.mapper.FBS9100_ComBase@EQUIPMENTCLASSIFICATION_TWO}' ORDER BY StationName1,battgroupId") |
| | | public List<String> serchByStationNot91(); |
| | | |
| | | //-查询所有的省份 |
| | | public List serchAllStationName1(Object obj); |
| | | @Select(" select DISTINCT(StationName1) from db_battinf.tb_battinf " + |
| | | "where 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=#{uId} ) " |
| | | + " ORDER BY CONVERT( StationName1 USING gbk ) COLLATE gbk_chinese_ci ASC ") |
| | | public List<String> serchAllStationName1(User_inf obj); |
| | | |
| | | //-查询所有的市 |
| | | public List serchAllStationName2(Object obj); |
| | | @Select(" select DISTINCT(StationName2) from db_battinf.tb_battinf " |
| | | + " where StationName1 like '%${stationName1}%' 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=#{num}" + |
| | | " ) ORDER BY CONVERT( StationName2 USING gbk ) COLLATE gbk_chinese_ci ASC ") |
| | | public List<String> serchAllStationName2(BattInf obj); |
| | | |
| | | //-查询所有的区县 |
| | | public List serchAllStationName5(Object obj); |
| | | @Select(" select DISTINCT(StationName5) from db_battinf.tb_battinf " |
| | | + " where StationName1 like '%${stationName1}%' and StationName2 like '%${stationName2}%' " |
| | | + "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=#{num}" + |
| | | " ) " |
| | | + " ORDER BY CONVERT( StationName5 USING gbk ) COLLATE gbk_chinese_ci ASC ") |
| | | public List<String> serchAllStationName5(BattInf obj); |
| | | |
| | | //-查询所有的站点 |
| | | public List serchAllStationName(Object obj); |
| | | @Select("select DISTINCT stationId,fBSDeviceId,StationName1,StationName2,StationName3,StationName5,stationName " + |
| | | " FROM db_battinf.tb_battinf " + |
| | | " where StationName1 like '%${stationName1}%' and StationName2 like '%${stationName2}%' and StationName5 like '%${stationName5}%' " + |
| | | " 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=#{num}" + |
| | | " ) "+ |
| | | " ORDER BY CONVERT( StationName USING gbk ) COLLATE gbk_chinese_ci ASC ") |
| | | public List<BattInf> serchAllStationName(BattInf obj); |
| | | |
| | | //-查询电池组信息 |
| | | public List serchAllBattinf(Object obj); |
| | | @Select(" select DISTINCT StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationId,stationid_ex,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattModel,BattProducer,BattProductDate,BattInUseDate,GroupIndexInFBSDevice,Load_curr,DisCurrMax " + |
| | | " from db_battinf.tb_battinf where StationName1 like '%${stationName1}%' and StationName2 like '%${stationName2}%' and StationName5 like '%${stationName5}%' " |
| | | + " and StationName3=#{stationName3} " |
| | | + " ORDER BY StationName4 asc,battgroupId asc ") |
| | | public List<BattInf> serchAllBattinf(BattInf obj); |
| | | |
| | | /**查询所有省/市/区/站点机房*/ |
| | | @Deprecated |
| | | public Map searchAllStation(int uid); |
| | | |
| | | // 查电池品牌 |
| | | public List serchByBattProducer(); |
| | | @Select("select DISTINCT(BattProducer) from db_battinf.tb_battinf ORDER BY BattProducer") |
| | | public List<String> serchByBattProducer(); |
| | | |
| | | // 查单体电压 |
| | | public List serchByMonVolStd(); |
| | | @Select("select DISTINCT(MonVolStd) from db_battinf.tb_battinf ") |
| | | public List<String> serchByMonVolStd(); |
| | | |
| | | // 查电池容量 |
| | | public List serchByMonCapStd(); |
| | | @Select("select DISTINCT(MonCapStd) from db_battinf.tb_battinf ORDER BY MonCapStd") |
| | | public List<String> serchByMonCapStd(); |
| | | |
| | | // 查系统类型 |
| | | public List serchByBattGroupName1(); |
| | |
| | | public int serchByDeviceId(Object obj); |
| | | |
| | | //-根据蓄电池组查不重复的MonCount(monNum)(单体编号) |
| | | public List serchByMonNum(Object obj); |
| | | |
| | | public List serchByBattgroupId(Object obj); |
| | | @Select("select battGroupName,moncount,signalname from db_battinf.tb_battinf where battgroupid=#{battGroupId} order by signalname") |
| | | public List<BattInf> serchByMonNum(BattInf obj); |
| | | @Select("select * from db_battinf.tb_battinf where battgroupid=#{battGroupId}") |
| | | public List<BattInf> serchByBattgroupId(BattInf obj); |
| | | |
| | | //3.1/3.2/0.1/6.2/6.4.3/6.4.4根据battgroupid查机房名称和电池组名称/查capstdolstd/moncount/serstd |
| | | public List serchByCondition(Object obj); |
| | | @Select("select distinct(stationname),battgroupname,moncapstd,monserstd,monvolstd,moncount from db_battinf.tb_battinf where battgroupid=#{battGroupId} ") |
| | | public List<BattInf> serchByCondition(BattInf obj); |
| | | |
| | | //1.1根据选择的信息查满足条件的battgroupid |
| | | /*public List serchByConditionNew(Object obj) { |
| | |
| | | } |
| | | //包机人 |
| | | String userSqlF=" and db_user.tb_user_inf.uname=? and db_user.tb_user_inf.ubaojiusr=1 "; |
| | | if(uinf.getUName().equals("0")){ |
| | | if(uinf.getuName().equals("0")){ |
| | | baseSql=baseSql; |
| | | }else{ |
| | | baseSql+=userSqlF; |
| | |
| | | sql=baseSql+endSql; |
| | | //System.out.println(sql); |
| | | if(tdata.getTest_type()==4000){ |
| | | if(uinf.getUName().equals("0")){ |
| | | if(uinf.getuName().equals("0")){ |
| | | list = DateUtil.executeQuery( |
| | | sql, |
| | | DBUtil.getConn(), |
| | |
| | | "%"+binf.getBattGroupName1()+"%", |
| | | binf.getMonVolStd(), |
| | | binf.getMonCapStd(), |
| | | uinf.getUName(), |
| | | uinf.getuName(), |
| | | mainf.getMaint_done_time(), |
| | | mainf.getMaint_done_time1() |
| | | }, |
| | | new BattInfImpl()); |
| | | } |
| | | }else{ |
| | | if(uinf.getUName().equals("0")){ |
| | | if(uinf.getuName().equals("0")){ |
| | | list = DateUtil.executeQuery( |
| | | sql, |
| | | DBUtil.getConn(), |
| | |
| | | "%"+binf.getBattGroupName1()+"%", |
| | | binf.getMonVolStd(), |
| | | binf.getMonCapStd(), |
| | | uinf.getUName(), |
| | | uinf.getuName(), |
| | | mainf.getMaint_done_time(), |
| | | mainf.getMaint_done_time1() |
| | | }, |
| | |
| | | //用于包机人条件 |
| | | String userSqlT="and db_battinf.tb_battinf.battgroupid!=? ";//全部 |
| | | String userSqlF="and db_user.tb_user_inf.uId=? and db_user.tb_user_inf.ubaojiusr=1 "; |
| | | if(uinf.getUId()==0){ |
| | | if(uinf.getuId()==0){ |
| | | baseSql+=userSqlT; |
| | | }else{ |
| | | baseSql+=userSqlF; |
| | |
| | | List<BattInf> list=DateUtil.executeQueryLimit(sql,conn, new Object[]{ |
| | | binf.getBattProductDate(),binf.getBattProductDate1(),binf.getBattInUseDate(),binf.getBattInUseDate1() |
| | | ,binf.getStationName1(),binf.getStationName(),binf.getBattProducer(),binf.getBattGroupId() |
| | | ,"%"+binf.getBattGroupName1()+"%",binf.getMonVolStd(),binf.getMonCapStd(),uinf.getUId() |
| | | ,"%"+binf.getBattGroupName1()+"%",binf.getMonVolStd(),binf.getMonCapStd(),uinf.getuId() |
| | | ,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { |
| | | |
| | | public List getResults(ResultSet rs) { |
| | |
| | | public List serchByTestType(Object obj); |
| | | |
| | | //4.1作业管理——创建模板查询 |
| | | public List serchBattgroup(Object obj); |
| | | public List serchBattgroup(Batt_Maint_Dealarm obj); |
| | | |
| | | //8.1放电计划管理中查询(旧版本) |
| | | public List serchBattgroupinfo1(Object obj); |
| | |
| | | List<BattInf> list = DateUtil.executeQuery( |
| | | sql, |
| | | DBUtil.getConn(), |
| | | new Object[] {uinf.getUId()},new CallBack() { |
| | | new Object[] {uinf.getuId()},new CallBack() { |
| | | public List getResults(ResultSet rs) { |
| | | List list=new ArrayList(); |
| | | int id=0; |
| | |
| | | |
| | | return list; |
| | | }*/ |
| | | public List serchBattgroupinfo(Object obj); |
| | | |
| | | |
| | | @Select("select distinct db_battinf.tb_battinf.battgroupid,db_battinf.tb_battinf.stationid,StationName,StationName1,stationip,BattGroupName,BattGroupName1,battgroupnum,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate,groupIndexInFBSDevice " + |
| | | "from db_battinf.tb_battinf,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.BattGroupId=db_battinf.tb_battinf.BattGroupId 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}") |
| | | public List<BattInf> serchBattgroupinfo(User_inf obj); |
| | | |
| | | //新版添加放电计划查询<排除设置过放电计划的电池组> |
| | | public List serchBattPlan(Object obj); |
| | | public List serchBattPlan(BattInf obj); |
| | | |
| | | //4.1根据维护区查询所有的电池组和对应的包机人(从模板创建) |
| | | public List serchByTemplate(Object obj); |
| | |
| | | public List serchByInfo(Object obj); |
| | | |
| | | //根据电池组id查询电池的基本信息 |
| | | public List searchBattBybattgroupid(Object obj); |
| | | @Select("select DISTINCT(StationName),BattGroupId,BattGroupName,BattProducer,MonVolStd,MonCapStd,MonCount,BattProductDate,BattInUseDate from db_battinf.tb_battinf where BattGroupId=#{battGroupId}") |
| | | public List<BattInf> searchBattBybattgroupid(BattInf obj); |
| | | |
| | | //6.3会根据电池组名称查询电池id |
| | | public int serchByName(Object obj); |
| | | |
| | | //6.4数据统计报表查询(分地域查地域所在总电池数) |
| | | public List serchBylevel(int level); |
| | | public List<BattInf> serchBylevel(int level); |
| | | |
| | | //6.4.7按地域和标称电压分组统计蓄电池组服役超期的数量 |
| | | /* |
| | | * 区域层次放在stationid中*/ |
| | | public List serchBeyondTime(Object obj); |
| | | public List<BattInf> serchBeyondTime(BattInf obj); |
| | | |
| | | //6.4.8按地域和标称电压分组统计蓄电池组的数量(蓄电池组数量统计) |
| | | /* |
| | | * 区域层次放在stationid中*/ |
| | | public List serchByMonVolStdGroup(Object obj); |
| | | public List<BattInf> serchByMonVolStdGroup(BattInf obj); |
| | | |
| | | //6.4.9按地域和标称电压分组统计蓄电池组品牌的数量(蓄电池供应商信息统计) |
| | | /* |
| | | * 区域层次放在stationid中*/ |
| | | public List serchByBattProducerGroup(Object obj); |
| | | public List<BattInf> serchByBattProducerGroup(BattInf obj); |
| | | |
| | | //1 根据机房id查询电池组id排序最小值 |
| | | public List serchByIdLow(Object obj); |
| | | @Select("select distinct stationName,stationName1,stationName2,stationName3,stationName4,stationName5 from db_battinf.tb_battinf where stationid=#{stationId} order by battgroupid asc limit 1 ") |
| | | public List<BattInf> serchByIdLow(BattInf obj); |
| | | |
| | | //6.4.10按地域和标称电压分组统计蓄电池组使用时间(蓄电池投产年限统计) |
| | | /* |
| | | * 区域层次放在stationid中*/ |
| | | public List serchByBattInUseDateGroup(Object obj); |
| | | public List<BattInf> serchByBattInUseDateGroup(BattInf obj); |
| | | |
| | | //9.1根据stationid查询机房电池组数和每组电池组中单体的个数(机房信息内容画图) |
| | | public List serchMonNum(Object obj); |
| | | @Select(" select distinct db_battinf.tb_battinf.battgroupid,db_battinf.tb_battinf.battgroupname ,db_battinf.tb_battinf.moncount,db_battinf.tb_battinf.stationid,db_battinf.tb_battinf.moncapstd," + |
| | | " db_battinf.tb_battinf.battproductdate,db_battinf.tb_battinf.battinusedate " + |
| | | " from db_battinf.tb_battinf " + |
| | | " where db_battinf.tb_battinf.stationid=#{stationId}") |
| | | public List<BattInf> serchMonNum(BattMap_information obj); |
| | | |
| | | //9.1根据电池组stationid查询电池组的信息(电池寿命管理) |
| | | public List serchByStationid(Object obj); |
| | | @Select(" select distinct db_battinf.tb_battinf.battgroupid,db_battinf.tb_battinf.battgroupname ,db_battinf.tb_battinf.moncount,db_battinf.tb_battinf.stationid,db_battinf.tb_battinf.moncapstd," + |
| | | " db_battinf.tb_battinf.battproductdate,db_battinf.tb_battinf.battinusedate,db_battinf.tb_battinf.BattProducer,db_battinf.tb_battinf.BattModel,db_battinf.tb_battinf.MonVolStd " + |
| | | " from db_battinf.tb_battinf " + |
| | | " where db_battinf.tb_battinf.stationid=#{stationId}") |
| | | public List<BattInf> serchByStationid(BattMap_information obj); |
| | | /** |
| | | * 根据机房id查询电池组 |
| | | * @param obj |
| | |
| | | public List searchBattByStationId(Object obj); |
| | | |
| | | //根据battgroupid查询机房id |
| | | public int serchDev_id(Object obj); |
| | | @Select("SELECT DISTINCT db_battinf.tb_battinf.FBSDeviceId as dev_id from db_battinf.tb_battinf where battgroupid=#{battGroupId}") |
| | | public Integer serchDev_id(BattInf binf); |
| | | |
| | | //查询总的单体数(电池健康率) |
| | | /*public int serchMonAll(){ |
| | |
| | | return moncounts; |
| | | |
| | | }*/ |
| | | public int serchMonAll(Object obj); |
| | | |
| | | @Select("select sum(moncount) as moncounts " + |
| | | " from db_battinf.tb_battinf,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.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " 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}" + |
| | | " limit 1") |
| | | public Integer serchMonAll(User_inf obj); |
| | | |
| | | //测试 |
| | | public List searchStationId(Object obj); |
| | | |
| | | //查询所有的机房 |
| | | public List serchAllStation(Object obj); |
| | | @Select("select DISTINCT stationid,StationName,StationName1,StationName2,StationName3,StationName4,StationName5," + |
| | | "StationName6,StationName7,StationName8,StationName9,fBSDeviceId " + |
| | | "FROM db_battinf.tb_battinf where 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=#{uId} )") |
| | | public List<BattInf> serchAllStation(User_inf obj); |
| | | |
| | | //根据机房id查询机房下的电池组信息 |
| | | public List serchBattByStation(Object obj); |
| | | @Select("select DISTINCT StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationId,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice,Load_curr,DisCurrMax " + |
| | | "from db_battinf.tb_battinf where stationid=#{stationId} " + |
| | | "ORDER BY StationName1,battgroupId ") |
| | | public List<BattInf> serchBattByStation(BattInf obj); |
| | | |
| | | //搜索机房或电池组 |
| | | public List serchStationOrBattgroup(Object obj); |
| | | public List<BattInf> serchStationOrBattgroup(BattInf obj); |
| | | |
| | | //查询所有的电池组数 |
| | | public int serchAllBatt(Object obj); |
| | | @Select("select count(distinct battgroupid) as nums from db_battinf.tb_battinf " + |
| | | " where battgroupid in(" + |
| | | " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.battgroupid 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=#{uId}" + |
| | | " ) " + |
| | | " 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=#{uId}" + |
| | | " ) " + |
| | | " limit 1") |
| | | public int serchAllBatt(User_inf obj); |
| | | |
| | | //添加电池组时查询出最大的机房id和电池组id |
| | | @Select("select max(StationId) as id from db_battinf.tb_battinf limit 1") |
| | | public int searchMaxId_zj(); |
| | | |
| | | //查询出当前存在内存中最大的设备的id(很重要**********) |
| | | public int searchMaxdevId_binf_zj(); |
| | | |
| | | //查询出当前存在内存中最大的电池组id(很重要**********) |
| | | @Select(" select max(battgroupId) as id from db_battinf.tb_battinf limit 1") |
| | | public int searchMaxBattgroupId_zj(); |
| | | |
| | | |
| | | //查站点下的所有设备名称 |
| | | public List searchDevByStationName3(Object obj); |
| | | @Select(" select distinct(stationName4) from db_battinf.tb_battinf " + |
| | | "where stationname1 like '%${stationName1}%' and stationname2 like '%${stationName2}%' " + |
| | | "and stationname5 like '%${stationName5}%' and stationname3 like '%${stationName3}%' ") |
| | | public List<String> searchDevByStationName3(BattInf obj); |
| | | |
| | | //根据维护区和机房名称查询电池组信息(电池组信息配置)<-------跨域-> |
| | | public List searchInform_ky(); |
| | | @Select("select distinct(StationId),StationId_ex,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp," |
| | | + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" + |
| | | ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,battGuarantDayCount,SignalId,CInterFaceId,Load_curr,install_user,DisCurrMax,SignalName,Station_install,station_phone " + |
| | | " From db_battinf.tb_battinf " + |
| | | " order by StationId ") |
| | | public List<BattInf> searchInform_ky(); |
| | | |
| | | //首页上根据stationid查询电池组的机历卡 |
| | | public List serchBattAllInfoByStationId(Object obj); |
| | | @Select("select * from db_battinf.tb_battinf where db_battinf.tb_battinf.stationId=#{stationId} order by db_battinf.tb_battinf.battgroupid") |
| | | public List<BattInf> serchBattAllInfoByStationId(BattInf obj); |
| | | |
| | | //-查询电池组信息<大屏显示> |
| | | public List serchBatt_DP(Object obj); |
| | | @Select(" select DISTINCT StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationId,FBSDeviceId,BattGroupName,battgroupId,monVolStd,monCapStd " + |
| | | " from db_battinf.tb_battinf " |
| | | + " ORDER BY StationId asc,battgroupId asc ") |
| | | public List<BattInf> serchBatt_DP(Object obj); |
| | | |
| | | //紫晶山西-机房列表 |
| | | public List searchStationList(); |
| | | @Select("select distinct(StationId),StationId_ex,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp_YM,FbsDeviceIp_WG,FbsDeviceIp," |
| | | + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" + |
| | | ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,battGuarantDayCount,SignalId,CInterFaceId,Load_curr,install_user,DisCurrMax,SignalName,Station_install,station_phone " + |
| | | " From db_battinf.tb_battinf " + |
| | | " order by StationId asc,battgroupId asc") |
| | | public List<BattInf> searchStationList(); |
| | | |
| | | |
| | | /*public static void main(String[] args) throws ParseException { |
| | |
| | | binf.setStationId("42070450"); |
| | | |
| | | User_inf uinf=new User_inf(); |
| | | uinf.setUId(1002); |
| | | uinf.setuId(1002); |
| | | |
| | | Page p=new Page(); |
| | | p.setPageCurr(1); |