whycrzh
2021-01-22 14e5b2eacc67978580858d01b4fa53bc30d62ef5
update battInf.inform  and modify announce.byCondition
5个文件已修改
36 ■■■■ 已修改文件
src/main/java/com/fgkj/mapper/impl/BattInfMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fgkj/mapper/impl/ram/Server_stateMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fgkj/services/BattInfServices.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/AnnounceMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattInfMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fgkj/mapper/impl/BattInfMapper.java
@@ -46,7 +46,15 @@
    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();
src/main/java/com/fgkj/mapper/impl/ram/Server_stateMapper.java
@@ -30,6 +30,6 @@
    public List<Server_state> searchAll();
    @Select("select * from db_ram_db.tb_server_state where num=#{num}")
    public List serchByCondition(Server_state state);
    public List<Server_state> serchByCondition(Server_state state);
}
src/main/java/com/fgkj/services/BattInfServices.java
@@ -11,6 +11,8 @@
import com.fgkj.services.ram.Fbs9100_setparamService;
import com.fgkj.util.ActionUtil;
import com.fgkj.util.DateUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
@@ -56,6 +58,8 @@
    //添加新的电池组
    public ServiceModel add(List<BattInf> list) {
        //更新数据库备份标志表的标志
        boolean flag1 = backupmapper.updateBackupEn("tb_battinf") > 0;
        TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
        ServiceModel model = new ServiceModel();
        boolean flag=true;
@@ -104,6 +108,8 @@
    //修改电池组信息
    public ServiceModel update( List<BattInf> list) {
        //更新数据库备份标志表的标志
        boolean flag1 = backupmapper.updateBackupEn("tb_battinf") > 0;
        TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
        ServiceModel model = new ServiceModel();
        boolean flag = true;
@@ -172,6 +178,8 @@
    //删除电池组
    public ServiceModel delete(List<BattInf> list) {
        //更新数据库备份标志表的标志
        boolean flag1 = backupmapper.updateBackupEn("tb_battinf") > 0;
        TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
        ServiceModel model = new ServiceModel();
        boolean flag = true;
@@ -212,11 +220,17 @@
        return model;
    }
     //根据维护区和机房名称查询电池组信息
    public ServiceModel searchInform(Object obj) {
    public ServiceModel searchInform(Batt_Maint_Dealarm obj) {
        //更新数据库备份标志表的标志
        boolean flag1 = backupmapper.updateBackupEn("tb_battinf") > 0;
        ServiceModel model = new ServiceModel();
        PageBean pageBean = obj.getPageBean();
        PageHelper.startPage(pageBean.getPageNum(),pageBean.getPageSize(),true);
        List<BattInf> list=mapper.searchInform(obj);
        if (list != null && list.size() > 0) {
            PageInfo<BattInf> pageInfo = new PageInfo<>(list);
            model.setCode(1);
            model.setData(list);
            model.setData(pageInfo);
            model.setMsg("查询成功!");
        }
        else{
@@ -227,6 +241,8 @@
    }
    public ServiceModel searchAll() {
        //更新数据库备份标志表的标志
        boolean flag1 = backupmapper.updateBackupEn("tb_battinf") > 0;
        ServiceModel model = new ServiceModel();
        List<Integer> list = mapper.searchAll();
        /*for (int i = 0; i < 100; i++) {
src/main/resources/mapper/AnnounceMapper.xml
@@ -6,7 +6,7 @@
    <select id="serchByCondition" resultType="Announce">
        select num,usr_id,announce_time,message,note
        FROM web_site.tb_announce where announce_time<![CDATA[>=]]>#{announce_time} and announce_time<![CDATA[<=]]>#{announce_time1}
        and message like concat('%',#{message},'%');
        and message like '%${message}%'
        <choose>
            <when test="usr_id==0">
                and usr_id!=#{usr_id}
src/main/resources/mapper/BattInfMapper.xml
@@ -4301,7 +4301,7 @@
<!--    <update id="update"></update>-->
<!--    <update id="updateIp"></update>-->
<!--    <delete id="del"></delete>-->
    <select id="searchInform" resultType="java.util.List"></select>
<!--    <select id="searchInform" resultType="java.util.List"></select>-->
    <select id="searchMaxId" resultType="java.util.List"></select>
    <select id="judgeBattStationName" resultType="java.util.List"></select>
    <select id="judgeBattStationName3" resultType="java.util.List"></select>