src/main/java/com/fgkj/mapper/impl/BattInfMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/mapper/impl/BattMap_informationMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/mapper/impl/Dev_paramMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/mapper/impl/Process_surveyMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/services/BattMap_informationService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fgkj/services/Dev_paramService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BattInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BattMapInformationMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/DevParamMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/fgkj/mapper/impl/BattInfMapper.java
@@ -813,7 +813,11 @@ 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 src/main/java/com/fgkj/mapper/impl/BattMap_informationMapper.java
@@ -4,6 +4,7 @@ import com.fgkj.dto.BattInf; import com.fgkj.dto.BattMap_information; import com.fgkj.dto.User_inf; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; @@ -40,19 +41,41 @@ public List<BattInf> serchNotInBattMap(); //9.1查询未添加物理信息的机房(用户管理的) public List serchNotInBattMapByUid(Object obj); @Select("select distinct db_battinf.tb_battinf.stationname1,db_battinf.tb_battinf.stationname2,db_battinf.tb_battinf.stationname3,db_battinf.tb_battinf.stationname5 " + " from db_battinf.tb_battinf " + " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " + " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + " where db_user.tb_user_inf.uid=#{UId} " + " and db_battinf.tb_battinf.stationId not in(select web_site.tb_battmap_information.stationId from web_site.tb_battmap_information )") public List<BattInf> serchNotInBattMapByUid(User_inf obj); //9.1查询已经添加物理信息的机房(用户管理的) public List serchInBattMapByUid(Object obj); @Select("select distinct tb_battmap_information.num,tb_battmap_information.StationId,tb_battmap_information.StationName,tb_battmap_information.StationName3,address,longitude,latitude,information,db_battinf.tb_battinf.FBSDeviceId " + " from web_site.tb_battmap_information,db_battinf.tb_battinf " + " where tb_battmap_information.StationId=db_battinf.tb_battinf.StationId " + " and tb_battmap_information.StationId in (" + " select distinct db_battinf.tb_battinf.stationid " + " from db_battinf.tb_battinf " + " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " + " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + " where db_user.tb_user_inf.uid=#{UId})") public List<BattMap_information> serchInBattMapByUid(User_inf obj); //9.1查询机房所在的所有省份 public List serchStationName1(); @Select("SELECT DISTINCT substring_index(substring_index(address,'-',2),'-',1) as stationname1 FROM web_site.tb_BattMap_information") public List<String> serchStationName1(); //9.1根据省份查询机房所在的所有城市 public List serchStationName2(Object obj); @Select(" SELECT DISTINCT substring_index(substring_index(address,'-',2),'-',-1) as stationname2 FROM web_site.tb_BattMap_information" + " where address like '%${address}%' ") public List<String> serchStationName2(BattMap_information obj); //9.1根据省份和城市查询机房所在的所有机房 public List serchStationName(Object obj); @Select(" SELECT DISTINCT StationName,longitude,latitude FROM web_site.tb_BattMap_information " + "WHERE address like '%${Address}%'") public List<BattMap_information> serchStationName(BattMap_information obj); //9.1地图上根据维护区查询机房经纬度 @Select("select num, StationId,StationName,address,longitude,latitude,information from web_site.tb_battmap_information " + @@ -60,14 +83,21 @@ public List<BattMap_information> serchByInfo(BattMap_information obj) ; //查询站点的经纬度 public List serchAddressByStationName3(Object obj); @Select("select distinct stationName3,address,longitude,latitude from web_site.tb_battmap_information " + " where stationName like '%${stationName}%'") public List<BattMap_information> serchAddressByStationName3(BattMap_information obj); //9.1百度地图定位根据省份查询所有该区域的机房 @Select("select num,StationId,StationName,address,longitude,latitude,information from web_site.tb_battmap_information " + " where address like '%${Address}%' ") " where address like '%${Address}%'") public List<BattMap_information> serchByCondition(BattMap_information obj) ; //根据省/市/区县查询所有的站点 public List serchStationName3(Object obj); @Select(" select DISTINCT db_battinf.tb_battinf.StationName3,longitude,latitude " + " FROM db_battinf.tb_battinf " + " left outer join web_site.tb_BattMap_information " + " on web_site.tb_BattMap_information.StationName3=db_battinf.tb_battinf.StationName3 " + " where StationName1 like '%${stationName1}%' and StationName2 like '%${stationName2}%' and StationName5 like '%${stationName5}%' ") public List<BattMap_information> serchStationName3(BattInf obj); } src/main/java/com/fgkj/mapper/impl/Dev_paramMapper.java
@@ -4,6 +4,7 @@ import com.fgkj.dto.Dev_param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; public interface Dev_paramMapper{ @@ -12,7 +13,9 @@ public boolean add(Object obj) ; //修改设备参数(单个) public boolean update(Object obj); @Update("update db_param.tb_dev_param set alm_high_coe=#{alm_high_coe},alm_low_coe=#{alm_low_coe},alm_high_level=#{alm_high_level},alm_low_level=#{alm_low_level}" + ",alm_high_en=#{alm_high_en},alm_low_en=#{alm_low_en} where dev_id=#{dev_id} and alm_id=#{alm_id}") public int update(Dev_param obj); public boolean del(Object obj) ; src/main/java/com/fgkj/mapper/impl/Process_surveyMapper.java
@@ -9,7 +9,7 @@ public interface Process_surveyMapper { //根据进程名字,将服务是否开启的标识符改为0 @Update("update web_site.tb_Process_survey set ServerFlag=#{ServerFlag} where ProcessName=#{ProcessName} and ServerFlag!=#{num}") @Update("update web_site.tb_Process_survey set ServerFlag='${@com.fgkj.mapper.ProcessServerDao@PROCESS_OFF}' where ProcessName=#{ProcessName} and ServerFlag!='${@com.fgkj.mapper.ProcessServerDao@PROCESS_TEMP}'") public boolean update(Process_survey process); //界面修改进程名字和超时时间以及进程版本号 src/main/java/com/fgkj/services/BattMap_informationService.java
@@ -105,7 +105,7 @@ } //首页上查询用户管理的已经设置过位置的机房信息 public List searchUserManageStation(Object obj){ public List searchUserManageStation(User_inf obj){ List<BattMap_information> list = mapper.serchInBattMapByUid(obj); List listAll=new ArrayList();//存放最后的结果 String state=""; @@ -209,7 +209,8 @@ } //9.1电池寿命管理 public ServiceModel serchByStationid(Object obj){ public ServiceModel serchByStationid(BattMap_information obj){ ServiceModel model= new ServiceModel(); List<BattInf> list=battInfMapper.serchByStationid(obj); List listAll=new ArrayList();//存放指定机房的信息 if(list!=null && list.size()>0){ @@ -220,16 +221,18 @@ binf.setNum(dayM); } model.setCode(1); model.setMsg("查询成功!"); model.setData(list); }else{ model.setCode(0); model.setMsg("删除失败!"); model.setMsg("查询失败!"); } return model; } //9.1查询未添加物理信息的机房 public ServiceModel serchNotInBattMap(){ ServiceModel model= new ServiceModel(); List list=mapper.serchNotInBattMap(); if(list!=null&&list.size()>0){ model.setCode(1); @@ -243,7 +246,8 @@ return model; } //9.1查询未添加物理信息的机房(用户管理的) public ServiceModel serchNotInBattMapByUid(Object obj) { public ServiceModel serchNotInBattMapByUid(User_inf obj) { ServiceModel model= new ServiceModel(); List list=mapper.serchNotInBattMapByUid(obj); if(list!=null&&list.size()>0){ model.setCode(1); @@ -258,7 +262,8 @@ } //9.1查询已经添加物理信息的机房(用户管理的) public ServiceModel serchInBattMapByUid(Object obj) { public ServiceModel serchInBattMapByUid(User_inf obj) { ServiceModel model= new ServiceModel(); List list=mapper.serchInBattMapByUid(obj); if(list!=null&&list.size()>0){ model.setCode(1); @@ -274,6 +279,7 @@ //9.1查询机房所在的所有省份 public ServiceModel serchStationName1(){ ServiceModel model= new ServiceModel(); List list=mapper.serchStationName1(); //System.out.println(list.size()); if(list!=null&&list.size()>0){ @@ -287,7 +293,8 @@ return model; } //9.1根据省份查询机房所在的所有城市 public ServiceModel serchStationName2(Object obj){ public ServiceModel serchStationName2(BattMap_information obj){ ServiceModel model= new ServiceModel(); List list=mapper.serchStationName2(obj); //System.out.println(list.size()); if(list!=null&&list.size()>0){ @@ -301,7 +308,8 @@ return model; } //根据省/市/区县查询所有的站点 public ServiceModel serchStationName3(Object obj){ public ServiceModel serchStationName3(BattInf obj){ ServiceModel model= new ServiceModel(); List list=mapper.serchStationName3(obj); if(list!=null&&list.size()>0){ model.setCode(1); @@ -314,7 +322,8 @@ return model; } //9.1根据省份和城市查询机房所在的所有机房 public ServiceModel serchStationName(Object obj){ public ServiceModel serchStationName(BattMap_information obj){ ServiceModel model= new ServiceModel(); List list=mapper.serchStationName(obj); //System.out.println(list.size()); if(list!=null&&list.size()>0){ @@ -342,7 +351,8 @@ return model; } //查询站点的经纬度 public ServiceModel serchAddressByStationName3(Object obj) { public ServiceModel serchAddressByStationName3(BattMap_information obj) { ServiceModel model = new ServiceModel(); List list=mapper.serchAddressByStationName3(obj); if(list!=null&&list.size()>0){ model.setCode(1); src/main/java/com/fgkj/services/Dev_paramService.java
@@ -7,7 +7,10 @@ import com.fgkj.mapper.impl.Dev_paramMapper; import com.fgkj.mapper.impl.Process_surveyMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.stereotype.Service; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import java.util.List; @@ -35,8 +38,9 @@ return model; } //查询所有设备的所有的告警参数 public ServiceModel update(Object obj){ Boolean bl=mapper.update(obj); public ServiceModel update(Dev_param obj){ ServiceModel model = new ServiceModel(); Boolean bl=mapper.update(obj)>0; if(bl){ //告警参数修改成功后重启服务 int alarm_id=((Dev_param) obj).getAlm_id(); src/main/resources/mapper/BattInfMapper.xml
@@ -4307,7 +4307,7 @@ <select id="serchByBattProducerGroup" resultType="java.util.List"></select> <select id="serchByBattInUseDateGroup" resultType="java.util.List"></select> <!-- <select id="serchMonNum" resultType="java.util.List"></select>--> <select id="serchByStationid" resultType="java.util.List"></select> <!-- <select id="serchByStationid" resultType="java.util.List"></select>--> <select id="searchBattByStationId" resultType="java.util.List"></select> <select id="serchMonAll" resultType="java.lang.Integer"></select> <select id="searchStationId" resultType="java.util.List"></select> src/main/resources/mapper/BattMapInformationMapper.xml
@@ -327,13 +327,13 @@ <!-- <delete id="del"></delete>--> <!-- <select id="searchAll" resultType="java.util.List"></select>--> <!-- <select id="serchNotInBattMap" resultType="java.util.List"></select>--> <select id="serchNotInBattMapByUid" resultType="java.util.List"></select> <select id="serchInBattMapByUid" resultType="java.util.List"></select> <select id="serchStationName1" resultType="java.util.List"></select> <select id="serchStationName2" resultType="java.util.List"></select> <select id="serchStationName" resultType="java.util.List"></select> <!-- <select id="serchNotInBattMapByUid" resultType="java.util.List"></select>--> <!-- <select id="serchInBattMapByUid" resultType="java.util.List"></select>--> <!-- <select id="serchStationName1" resultType="java.util.List"></select>--> <!-- <select id="serchStationName2" resultType="java.util.List"></select>--> <!-- <select id="serchStationName" resultType="java.util.List"></select>--> <!-- <select id="serchByInfo" resultType="java.util.List"></select>--> <select id="serchAddressByStationName3" resultType="java.util.List"></select> <!-- <select id="serchAddressByStationName3" resultType="java.util.List"></select>--> <!-- <select id="serchByCondition" resultType="java.util.List"></select>--> <select id="serchStationName3" resultType="java.util.List"></select> <!-- <select id="serchStationName3" resultType="java.util.List"></select>--> </mapper> src/main/resources/mapper/DevParamMapper.xml
@@ -255,7 +255,7 @@ --> <insert id="add"></insert> <update id="update"></update> <!-- <update id="update"></update>--> <delete id="del"></delete> <!-- <select id="searchAll" resultType="java.util.List"></select>--> <select id="serchByCondition" resultMap="BaseResultMap">