lihao16 10 kuukautta sitten
vanhempi
sitoutus
0c491061f5

+ 19 - 0
inspur-work/src/main/java/com/inspur/thrid/impl/PBXServiceImpl.java

@@ -281,6 +281,25 @@ public class PBXServiceImpl implements IPBXService {
         }
         if (dtmf.length() > 6) {
             log.info("dtmf length > 6, dtmf : {}",dtmf);
+            // bugfix dtmf出现转接的电话号码
+            String toPhone = "";
+            if (dtmf.length() == 11) {
+                toPhone = dtmf;
+            }
+            if (dtmf.length() == 12) {
+                toPhone = dtmf.substring(1,12);
+            }
+            if (!StringUtils.isEmpty(toPhone)) {
+                String callId2Phone = redisCache.getCacheObject(PBXConstant.PBX_TRANSFER_CODE_KEY + toPhone);
+                if (StringUtils.isEmpty(callId2Phone)) {
+                    log.info("callId2Phone no cache transferToValue,key : {}",PBXConstant.PBX_TRANSFER_CODE_KEY + toPhone);
+                }else {
+                    if (callId.equals(callId2Phone)) {
+                        log.info("dtmf is to phone number : {}",toPhone);
+                        return;
+                    }
+                }
+            }
         }
         log.info("dtmfEvent,callId:{}", callId);
         /** 以#结束 通过info获取 begin  */

+ 1 - 0
inspur-work/src/main/resources/mapper/work/ElevatorWorkOrderMapper.xml

@@ -192,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="failNum != null">fail_num = #{failNum},</if>
             <if test="deviceSn != null">device_sn = #{deviceSn},</if>
             <if test="deviceNo != null">device_no = #{deviceNo},</if>
+            <if test="regionCode != null">region_code = #{regionCode},</if>
         </trim>
         where id = #{id}
     </update>