hdw
2018-10-30 22ae9f2be193c5783ebfbeeb09f3b675923dbb28
Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
2个文件已修改
26 ■■■■ 已修改文件
gx_tieta/WebRoot/js/VoiceUtil.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/js/VoiceUtil.js
@@ -1,11 +1,12 @@
// 设置语音播报对象
var Voice = function() {
    this.speak = window.speechSynthesis;
    this.tospeak = new SpeechSynthesisUtterance('');
    this.voice = '';
    this.zh_CN = false;
    this.rate = 1.5; 
    this._setLang();            // 获取并检测是否有中文的环境
    this.timeInterval = 28;        //循环间隔(秒)
    this.timeInterval = 27;        //循环间隔(秒)
    this.speak_enable = true;            //ture:开启语音播报         false:停止语音播报
};
@@ -15,7 +16,7 @@
        console.info('你的电脑不支持中文播报!');        
    }
    _timeInterval = this.timeInterval;
    //console.info(this.zh_CN);
    //console.info(this.speak_enable);
    if(!this.speak_enable){                                    //识别是否开启声音播报
        if(callback && typeof callback == 'function'){
            setTimeout(function(){
@@ -25,15 +26,15 @@
        return;
    }
    this.cancel();
    var to_speak = new SpeechSynthesisUtterance(txt);
    to_speak.voice = this.voice;    // 设定中文播报
    to_speak.rate = this.rate;
    this.tospeak.text = txt;
    this.tospeak.voice = this.voice;    // 设定中文播报
    this.tospeak.rate = this.rate;
    //console.info(to_speak);
    this.speak.speak(to_speak);
    var starttime = new Date();
    to_speak.onend = function(event) {
        //console.info(event);
    this.speak.speak(this.tospeak);
    //console.info(this.tospeak);
    this.tospeak.onend = function(event) {
        //console.info("播放结束");
        if(callback && typeof callback == 'function'){
            var endtime = new Date();
            var timelong = (endtime.getTime()-starttime.getTime())/1000;
@@ -48,9 +49,7 @@
        }
    };
    
    to_speak.onerror = function(event) {
        //console.info(event);
    };
};
// 退出当前播报
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -3478,7 +3478,7 @@
    //根据机房id查询机房下的电池组信息(左侧导航第四层,根据机房查询下面的电池组,num中存放uid)
    public List serchBattByStation(Object obj){
        BattInf binf=(BattInf) obj;
        String sql="select DISTINCT StationName,StationName1,StationName2,StationId,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice,Load_curr,DisCurrMax " +
        String sql="select DISTINCT StationName,StationName1,StationName2,StationId,stationid_ex,StationIP,FBSDeviceId,BattGroupName,BattGroupName1,BattGroupName2,MonCount,battgroupId,MonCapStd,MonVolStd,MonResStd,MonSerStd,BattProducer,BattInUseDate,GroupIndexInFBSDevice,Load_curr,DisCurrMax " +
                "from db_battinf.tb_battinf  where StationName1 like ? and StationName2 like ?  and  StationName like ?  ";
        //机房id
        String idSqlT=" and  Stationid like ? ";
@@ -3503,6 +3503,7 @@
                        batt.setStationName1(rs.getString("stationName1"));
                        batt.setStationName2(rs.getString("stationName2"));
                        batt.setStationId(rs.getString("StationId"));
                        batt.setStationId_ex(rs.getString("stationId_ex"));
                        batt.setStationIp(rs.getString("StationIP"));
                        batt.setBattGroupName(rs.getString("BattGroupName").trim());
                        batt.setBattGroupName1(rs.getString("BattGroupName1").trim());