瀏覽代碼

兼容紧急呼叫

weizhengliang 1 年之前
父節點
當前提交
8f806df188

+ 44 - 15
lcd_board/src/main/java/com/wdkl/lcd_board/activity/MainActivity.kt

@@ -514,7 +514,14 @@ class MainActivity :BaseActivity<MainActivityPresenter, ActivityMainLayoutBindin
 
                         if (tcpModel.action == TcpAction.SOSAction.CALL || tcpModel.action == TcpAction.SOSAction.ROOM_CALL) {
                             val sosInteractionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
-                            val sosCall: String = sosInteractionVO.fromFrameFullName + SOS_CALL
+                            //优先使用data数据
+                            val sosCall: String
+                            if (sosInteractionVO.data != null) {
+                                sosCall = sosInteractionVO.data
+                            } else {
+                                sosCall = sosInteractionVO.fromFrameFullName + SOS_CALL
+                            }
+
                             for (program in programs) {
                                 if (sosCall == program.text) {
                                     programs.remove(program)
@@ -525,11 +532,42 @@ class MainActivity :BaseActivity<MainActivityPresenter, ActivityMainLayoutBindin
                             program2.text = sosCall
                             programs.add(0, program2)
                             callHandler.sendEmptyMessage(NEW_CALL_WHAT)
-                        } else if (tcpModel.action == TcpAction.SOSAction.CANCEL) {
+                        } else if (tcpModel.action == TcpAction.SOSAction.CANCEL || tcpModel.action == TcpAction.SOSAction.CANCELED) {
                             val sosInteractionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
-                            val sosCall: String = sosInteractionVO.fromFrameFullName + SOS_CALL
+                            val sosCall: String
+                            if (sosInteractionVO.data != null) {
+                                sosCall = sosInteractionVO.data
+                            } else {
+                                sosCall = sosInteractionVO.fromFrameFullName + SOS_CALL
+                            }
 
                             deleteCall(sosCall)
+                        } else if (tcpModel.action == TcpAction.SOSAction.RECEIVED
+                            || tcpModel.action == TcpAction.SOSAction.NO_MATCH) {
+                            //不处理
+                        } else {
+                            //其他类型紧急呼叫
+                            if (tcpModel.data != null) {
+                                val sosInteractionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
+                                //优先使用data数据
+                                val sosCall: String
+                                if (sosInteractionVO.data != null) {
+                                    sosCall = sosInteractionVO.data
+                                } else {
+                                    sosCall = sosInteractionVO.fromFrameFullName + SOS_CALL
+                                }
+
+                                for (program in programs) {
+                                    if (sosCall == program.text) {
+                                        programs.remove(program)
+                                    }
+                                }
+                                val program2 = Program()
+                                program2.time = System.currentTimeMillis()
+                                program2.text = sosCall
+                                programs.add(0, program2)
+                                callHandler.sendEmptyMessage(NEW_CALL_WHAT)
+                            }
                         }
                     } else if (tcpModel.type == TcpType.DEVICE) {
                         //检查APP版本
@@ -539,13 +577,8 @@ class MainActivity :BaseActivity<MainActivityPresenter, ActivityMainLayoutBindin
                             /*if (Constant.PART_ID != null) {
                                 presenter.loadPartSettings(Constant.PART_ID)
                             }*/
-                        } else if (tcpModel.action == TcpAction.DeviceAction.DEVICE_REFRESH || tcpModel.action == TcpAction.DeviceAction.RESTART) {
-                            //收到重启app指令,若当前处于正常待机状态则直接重启app,否则等待通话结束再重启
-                            if (Constant.CALL_STATE == Constant.CALL_STANDBY) {
-                                AppUpdateHelper.restartApp(activity)
-                            } else {
-                                Constant.LATER_RESTART = true
-                            }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.RESTART) {
+                            AppUpdateHelper.restartApp(activity)
                         } else if (tcpModel.action == TcpAction.DeviceAction.SERVER_CHANGE) {
                             //服务器地址变更
                             if (tcpModel.data != null) {
@@ -690,10 +723,6 @@ class MainActivity :BaseActivity<MainActivityPresenter, ActivityMainLayoutBindin
                     //updateTcpState()
                     updateNetState()
                     resetPrograms()
-
-                    if (Constant.LATER_RESTART && Constant.CALL_STATE == Constant.CALL_STANDBY) {
-                        AppUpdateHelper.restartApp(activity)
-                    }
                 }
             } else if (intent.action == ConnectivityManager.CONNECTIVITY_ACTION) {
                 updateNetState()
@@ -772,7 +801,7 @@ class MainActivity :BaseActivity<MainActivityPresenter, ActivityMainLayoutBindin
     private fun resetPrograms() {
         val curTime = System.currentTimeMillis()
         for (program in programs) {
-            if (curTime - program.time > 600000) { //5分钟
+            if (curTime - program.time > 1800000) { //5分钟
                 programs.remove(program)
                 callHandler.removeMessages(UPDATE_CALL_WHAT)
                 callHandler.sendEmptyMessage(UPDATE_CALL_WHAT)

+ 562 - 30
middleware/src/main/code/com/wdkl/ncs/android/middleware/model/dos/InteractionDO.java

@@ -1,5 +1,7 @@
 package com.wdkl.ncs.android.middleware.model.dos;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
 import com.fasterxml.jackson.databind.annotation.JsonNaming;
 import com.wdkl.ncs.android.middleware.model.annotation.Column;
@@ -8,6 +10,7 @@ import com.wdkl.ncs.android.middleware.model.annotation.PrimaryKeyField;
 import com.wdkl.ncs.android.middleware.model.annotation.Table;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -43,6 +46,12 @@ public class InteractionDO implements Serializable {
     @ApiModelProperty(value = "科室Id", required = false)
     private Integer partId;
     /**
+     * 科室名称
+     */
+    @Column(name = "part_name")
+    @ApiModelProperty(value = "科室名称", required = false)
+    private String partName;
+    /**
      * 交互类型(1:语音通话,2:视频通话,3:卫生间紧急呼叫,4:语音留言,5:文本消息,6:按键事件)
      */
     @Column(name = "action_type")
@@ -54,6 +63,8 @@ public class InteractionDO implements Serializable {
     @Column(name = "action_result")
     @ApiModelProperty(value = "0失败,1成功", required = false)
     private Integer actionResult;
+
+
     /**
      * 交互发起设备Id
      */
@@ -61,23 +72,63 @@ public class InteractionDO implements Serializable {
     @ApiModelProperty(value = "交互发起设备Id", required = false)
     private Integer fromDeviceId;
     /**
-     * 交互对象设备Id
+     * null
      */
-    @Column(name = "to_device_id")
-    @ApiModelProperty(value = "交互对象设备Id", required = false)
-    private Integer toDeviceId;
+    @Column(name = "from_eth_mac")
+    @ApiModelProperty(value = "发起端设备的有线以太网卡MAC地址", required = false)
+    private String fromEthMac;
+
+    @Column(name = "from_eth_ip")
+    @ApiModelProperty(value = "发起端设备的有线以太网卡分配的IP地址", required = false)
+    private String fromEthIp;
+    /**
+     * null
+     */
+    @Column(name = "from_sip_id")
+    @ApiModelProperty(value = "发起端设备的SIP账号", required = false)
+    private String fromSipId;
+    /**
+     * null
+     */
+    @Column(name = "from_device_type")
+    @ApiModelProperty(value = "发起端设备的设备类型", required = false)
+    private Integer fromDeviceType;
+
+    @Column(name = "from_device_name")
+    @ApiModelProperty(value = "发起端设备的名称", required = false)
+    private String fromDeviceName;
+    /**
+     * null
+     */
+    @Column(name = "from_device_phone_number")
+    @ApiModelProperty(value = "发起端设备号码", required = false)
+    private String fromDevicePhoneNumber;
     /**
      * 发起设备所在空间结构
      */
     @Column(name = "from_device_frame_id")
     @ApiModelProperty(value = "发起设备所在空间结构", required = false)
     private Integer fromDeviceFrameId;
+
+    @Column(name = "from_frame_type")
+    @ApiModelProperty(value = "发起端空间结构类型:0楼、1病房、2床位", required = false)
+    private Integer fromFrameType;
     /**
-     * 交互对象所在空间结果
+     * null
      */
-    @Column(name = "to_device_frame_id")
-    @ApiModelProperty(value = "交互对象所在空间结果", required = false)
-    private Integer toDeviceFrameId;
+    @Column(name = "from_frame_name")
+    @ApiModelProperty(value = "发起端空间结构名称", required = false)
+    private String fromFrameName;
+    /**
+     * null
+     */
+    @Column(name = "from_frame_full_name")
+    @ApiModelProperty(value = "发起端空间结构全名", required = false)
+    private String fromFrameFullName;
+
+    @Column(name = "from_frame_parent_id")
+    @ApiModelProperty(value = "发起端空间父级id", required = false)
+    private Integer fromFrameParentId;
     /**
      * 交互发起设备使用者member_id
      */
@@ -85,11 +136,132 @@ public class InteractionDO implements Serializable {
     @ApiModelProperty(value = "交互发起设备使用者member_id", required = false)
     private Integer fromDeviceMemberId;
     /**
+     * 用户
+     **/
+    @Column(name = "from_customer_id")
+    @ApiModelProperty(value = "发起端用户CustomId", required = false)
+    private Integer fromCustomerId;
+    /**
+     * null
+     */
+    @Column(name = "from_member_name")
+    @ApiModelProperty(value = "发起端用户姓名", required = false)
+    private String fromMemberName;
+    /**
+     * null
+     */
+    @Column(name = "from_member_face")
+    @ApiModelProperty(value = "发起端用户头像", required = false)
+    private String fromMemberFace;
+
+    @Column(name = "from_clerk_id")
+    @ApiModelProperty(value = "发起端用户成员Id,发起端为护士主机,腕表,医生机时才有", required = false)
+    private Integer fromClerkId;
+    /**
+     * null
+     */
+    @Column(name = "from_role_name")
+    @ApiModelProperty(value = "发起端用户角色名(医生、护士、护工)", required = false)
+    private String fromRoleName;
+
+
+    /**
+     * 交互对象设备Id
+     */
+    @Column(name = "to_device_id")
+    @ApiModelProperty(value = "交互对象设备Id", required = false)
+    private Integer toDeviceId;
+    /**
+     * null
+     */
+    @Column(name = "to_eth_mac")
+    @ApiModelProperty(value = "目的端设备的有线以太网卡MAC地址", required = false)
+    private String toEthMac;
+
+    @Column(name = "to_eth_ip")
+    @ApiModelProperty(value = "目的端设备的有线以太网卡分配的IP地址", required = false)
+    private String toEthIp;
+    /**
+     * null
+     */
+    @Column(name = "to_sip_id")
+    @ApiModelProperty(value = "目的端设备的SIP账号", required = false)
+    private String toSipId;
+    /**
+     * null
+     */
+    @Column(name = "to_device_type")
+    @ApiModelProperty(value = "目的端设备的设备类型", required = false)
+    private Integer toDeviceType;
+
+    @Column(name = "to_device_name")
+    @ApiModelProperty(value = "目的端设备的名称", required = false)
+    private String toDeviceName;
+    /**
+     * null
+     */
+    @Column(name = "to_device_phone_number")
+    @ApiModelProperty(value = "目的端设备号码", required = false)
+    private String toDevicePhoneNumber;
+    /**
+     * 交互对象所在空间结果
+     */
+    @Column(name = "to_device_frame_id")
+    @ApiModelProperty(value = "交互对象所在空间结果", required = false)
+    private Integer toDeviceFrameId;
+
+    @Column(name = "to_frame_type")
+    @ApiModelProperty(value = "目的端空间结构类型:0楼、1病房、2床位", required = false)
+    private Integer toFrameType;
+    /**
+     * null
+     */
+    @Column(name = "to_frame_name")
+    @ApiModelProperty(value = "目的端空间结构名称", required = false)
+    private String toFrameName;
+    /**
+     * null
+     */
+    @Column(name = "to_frame_full_name")
+    @ApiModelProperty(value = "目的端空间结构全名", required = false)
+    private String toFrameFullName;
+
+    @Column(name = "to_frame_parent_id")
+    @ApiModelProperty(value = "目的端空间父级id", required = false)
+    private Integer toFrameParentId;
+    /**
      * 交互对象设备使用者member_id
      */
     @Column(name = "to_device_member_id")
     @ApiModelProperty(value = "交互对象设备使用者member_id", required = false)
     private Integer toDeviceMemberId;
+
+    @Column(name = "to_customer_id")
+    @ApiModelProperty(value = "目的端用户CustomId", required = false)
+    private Integer toCustomerId;
+
+    /**
+     * null
+     */
+    @Column(name = "to_member_name")
+    @ApiModelProperty(value = "目的端用户姓名", required = false)
+    private String toMemberName;
+    /**
+     * null
+     */
+    @Column(name = "to_member_face")
+    @ApiModelProperty(value = "目的端用户头像", required = false)
+    private String toMemberFace;
+
+    @Column(name = "to_clerk_id")
+    @ApiModelProperty(value = "目的端用户成员Id,目的端为护士主机,腕表,医生机时才有", required = false)
+    private Integer toClerkId;
+    /**
+     * null
+     */
+    @Column(name = "to_role_name")
+    @ApiModelProperty(value = "目的端用户角色名(医生、护士、护工)", required = false)
+    private String toRoleName;
     /**
      * 是否为呼叫系统内部交互(如果是外部电话呼叫为true,否则为false)
      */
@@ -133,6 +305,24 @@ public class InteractionDO implements Serializable {
     @ApiModelProperty(value = "交互结束时间(通话时指通话挂断时间,通话挂断后要更新此字段)。事件响应时间、语音已读时间", required = false)
     private Long actionEnd;
     /**
+     * 交互处理者的member_id
+     */
+    @Column(name = "action_end_member_id")
+    @ApiModelProperty(value = "交互处理者的member_id", required = false)
+    private Integer actionEndMemberId;
+    /**
+     * null
+     */
+    @Column(name = "action_end_member_name")
+    @ApiModelProperty(value = "交互处理者的用户姓名", required = false)
+    private String actionEndMemberName;
+    /**
+     * 交互完成时间
+     */
+    @Column(name = "action_completed")
+    @ApiModelProperty(value = "交互完成时间", required = false)
+    private Long actionCompleted;
+    /**
      * 交互数据(类型1,2,3为空)(类型4为音频文件地址)(5为文本内容)(类型6为具体按键类型)
      */
     @Column(name = "data")
@@ -152,9 +342,51 @@ public class InteractionDO implements Serializable {
     private String errorMessage;
 
     @Column(name = "action_direction_type")
-    @ApiModelProperty(value = "交互方向类型(1:分机到主机、腕表、医生机,2:主机、腕表、医生机到分机,3主机、腕表、医生机之间互通,4:分机到分机)",required = false)
+    @ApiModelProperty(value = "交互方向类型(1:分机到主机、腕表、医生机,2:主机、腕表、医生机到分机,3主机、腕表、医生机之间互通,4:分机到分机)", required = false)
     private Integer actionDirectionType;
 
+    @Column(name = "action_status")
+    @ApiModelProperty(value = "事件类型的交互状态(包括:发出,响应,取消,完成)", required = false)
+    private String actionStatus;
+    /**
+     * null
+     */
+    @Column(name = "relative_id")
+    @ApiModelProperty(value = "亲属id,外部来电时,from_member亲属的memberId", required = false)
+    private Integer relativeId;
+    /**
+     * null
+     */
+    @Column(name = "relative_name")
+    @ApiModelProperty(value = "外部来电时,from_member亲属关系", required = false)
+    private String relativeName;
+
+
+    /**
+     *交互接收者的顺序,一个JS数组,一个交互可能同时给同一角色的多个用户,用JS数组可以个分多个层级
+     */
+    @Column(name = "spread_member_path")
+    @ApiModelProperty(value = "交互接收者的顺序", required = false)
+    private String spreadMemberPath;
+
+
+    /**
+     *交互接收的memberId,用逗号隔开,可以不考虑顺序,方便查询用户交互记录,把spread_member_path字段打散后用逗号连接
+     */
+    @Column(name = "spread_member_ids")
+    @ApiModelProperty(value = "交互接收的memberId,", required = false)
+    private String spreadMemberIds;
+
+
+    /**
+     *交互已触达的memberIds,交互被多人接收后,有任意一人处理,需要通知其他已触达的用户取消处理
+     */
+    @Column(name = "reached_member_ids")
+    @ApiModelProperty(value = "交互已触达的memberIds", required = false)
+    private String reachedMemberIds;
+
+    private ArrayList<Integer[]> spreadMemberPathArray;
+
 
     @PrimaryKeyField
     public Integer getId() {
@@ -165,7 +397,6 @@ public class InteractionDO implements Serializable {
         this.id = id;
     }
 
-
     public String getUnionId() {
         return unionId;
     }
@@ -174,7 +405,6 @@ public class InteractionDO implements Serializable {
         this.unionId = unionId;
     }
 
-
     public Long getCreateDate() {
         return createDate;
     }
@@ -183,7 +413,6 @@ public class InteractionDO implements Serializable {
         this.createDate = createDate;
     }
 
-
     public Integer getPartId() {
         return partId;
     }
@@ -192,6 +421,13 @@ public class InteractionDO implements Serializable {
         this.partId = partId;
     }
 
+    public String getPartName() {
+        return partName;
+    }
+
+    public void setPartName(String partName) {
+        this.partName = partName;
+    }
 
     public String getActionType() {
         return actionType;
@@ -201,7 +437,6 @@ public class InteractionDO implements Serializable {
         this.actionType = actionType;
     }
 
-
     public Integer getActionResult() {
         return actionResult;
     }
@@ -210,7 +445,6 @@ public class InteractionDO implements Serializable {
         this.actionResult = actionResult;
     }
 
-
     public Integer getFromDeviceId() {
         return fromDeviceId;
     }
@@ -219,15 +453,53 @@ public class InteractionDO implements Serializable {
         this.fromDeviceId = fromDeviceId;
     }
 
+    public String getFromEthMac() {
+        return fromEthMac;
+    }
 
-    public Integer getToDeviceId() {
-        return toDeviceId;
+    public void setFromEthMac(String fromEthMac) {
+        this.fromEthMac = fromEthMac;
     }
 
-    public void setToDeviceId(Integer toDeviceId) {
-        this.toDeviceId = toDeviceId;
+    public String getFromEthIp() {
+        return fromEthIp;
+    }
+
+    public void setFromEthIp(String fromEthIp) {
+        this.fromEthIp = fromEthIp;
+    }
+
+    public String getFromSipId() {
+        return fromSipId;
+    }
+
+    public void setFromSipId(String fromSipId) {
+        this.fromSipId = fromSipId;
+    }
+
+    public Integer getFromDeviceType() {
+        return fromDeviceType;
+    }
+
+    public void setFromDeviceType(Integer fromDeviceType) {
+        this.fromDeviceType = fromDeviceType;
+    }
+
+    public String getFromDeviceName() {
+        return fromDeviceName;
+    }
+
+    public void setFromDeviceName(String fromDeviceName) {
+        this.fromDeviceName = fromDeviceName;
     }
 
+    public String getFromDevicePhoneNumber() {
+        return fromDevicePhoneNumber;
+    }
+
+    public void setFromDevicePhoneNumber(String fromDevicePhoneNumber) {
+        this.fromDevicePhoneNumber = fromDevicePhoneNumber;
+    }
 
     public Integer getFromDeviceFrameId() {
         return fromDeviceFrameId;
@@ -237,15 +509,37 @@ public class InteractionDO implements Serializable {
         this.fromDeviceFrameId = fromDeviceFrameId;
     }
 
+    public Integer getFromFrameType() {
+        return fromFrameType;
+    }
 
-    public Integer getToDeviceFrameId() {
-        return toDeviceFrameId;
+    public void setFromFrameType(Integer fromFrameType) {
+        this.fromFrameType = fromFrameType;
     }
 
-    public void setToDeviceFrameId(Integer toDeviceFrameId) {
-        this.toDeviceFrameId = toDeviceFrameId;
+    public String getFromFrameName() {
+        return fromFrameName;
     }
 
+    public void setFromFrameName(String fromFrameName) {
+        this.fromFrameName = fromFrameName;
+    }
+
+    public String getFromFrameFullName() {
+        return fromFrameFullName;
+    }
+
+    public void setFromFrameFullName(String fromFrameFullName) {
+        this.fromFrameFullName = fromFrameFullName;
+    }
+
+    public Integer getFromFrameParentId() {
+        return fromFrameParentId;
+    }
+
+    public void setFromFrameParentId(Integer fromFrameParentId) {
+        this.fromFrameParentId = fromFrameParentId;
+    }
 
     public Integer getFromDeviceMemberId() {
         return fromDeviceMemberId;
@@ -255,6 +549,141 @@ public class InteractionDO implements Serializable {
         this.fromDeviceMemberId = fromDeviceMemberId;
     }
 
+    public Integer getFromCustomerId() {
+        return fromCustomerId;
+    }
+
+    public void setFromCustomerId(Integer fromCustomerId) {
+        this.fromCustomerId = fromCustomerId;
+    }
+
+    public String getFromMemberName() {
+        return fromMemberName;
+    }
+
+    public void setFromMemberName(String fromMemberName) {
+        this.fromMemberName = fromMemberName;
+    }
+
+    public String getFromMemberFace() {
+        return fromMemberFace;
+    }
+
+    public void setFromMemberFace(String fromMemberFace) {
+        this.fromMemberFace = fromMemberFace;
+    }
+
+    public Integer getFromClerkId() {
+        return fromClerkId;
+    }
+
+    public void setFromClerkId(Integer fromClerkId) {
+        this.fromClerkId = fromClerkId;
+    }
+
+    public String getFromRoleName() {
+        return fromRoleName;
+    }
+
+    public void setFromRoleName(String fromRoleName) {
+        this.fromRoleName = fromRoleName;
+    }
+
+    public Integer getToDeviceId() {
+        return toDeviceId;
+    }
+
+    public void setToDeviceId(Integer toDeviceId) {
+        this.toDeviceId = toDeviceId;
+    }
+
+    public String getToEthMac() {
+        return toEthMac;
+    }
+
+    public void setToEthMac(String toEthMac) {
+        this.toEthMac = toEthMac;
+    }
+
+    public String getToEthIp() {
+        return toEthIp;
+    }
+
+    public void setToEthIp(String toEthIp) {
+        this.toEthIp = toEthIp;
+    }
+
+    public String getToSipId() {
+        return toSipId;
+    }
+
+    public void setToSipId(String toSipId) {
+        this.toSipId = toSipId;
+    }
+
+    public Integer getToDeviceType() {
+        return toDeviceType;
+    }
+
+    public void setToDeviceType(Integer toDeviceType) {
+        this.toDeviceType = toDeviceType;
+    }
+
+    public String getToDeviceName() {
+        return toDeviceName;
+    }
+
+    public void setToDeviceName(String toDeviceName) {
+        this.toDeviceName = toDeviceName;
+    }
+
+    public String getToDevicePhoneNumber() {
+        return toDevicePhoneNumber;
+    }
+
+    public void setToDevicePhoneNumber(String toDevicePhoneNumber) {
+        this.toDevicePhoneNumber = toDevicePhoneNumber;
+    }
+
+    public Integer getToDeviceFrameId() {
+        return toDeviceFrameId;
+    }
+
+    public void setToDeviceFrameId(Integer toDeviceFrameId) {
+        this.toDeviceFrameId = toDeviceFrameId;
+    }
+
+    public Integer getToFrameType() {
+        return toFrameType;
+    }
+
+    public void setToFrameType(Integer toFrameType) {
+        this.toFrameType = toFrameType;
+    }
+
+    public String getToFrameName() {
+        return toFrameName;
+    }
+
+    public void setToFrameName(String toFrameName) {
+        this.toFrameName = toFrameName;
+    }
+
+    public String getToFrameFullName() {
+        return toFrameFullName;
+    }
+
+    public void setToFrameFullName(String toFrameFullName) {
+        this.toFrameFullName = toFrameFullName;
+    }
+
+    public Integer getToFrameParentId() {
+        return toFrameParentId;
+    }
+
+    public void setToFrameParentId(Integer toFrameParentId) {
+        this.toFrameParentId = toFrameParentId;
+    }
 
     public Integer getToDeviceMemberId() {
         return toDeviceMemberId;
@@ -264,6 +693,45 @@ public class InteractionDO implements Serializable {
         this.toDeviceMemberId = toDeviceMemberId;
     }
 
+    public Integer getToCustomerId() {
+        return toCustomerId;
+    }
+
+    public void setToCustomerId(Integer toCustomerId) {
+        this.toCustomerId = toCustomerId;
+    }
+
+    public String getToMemberName() {
+        return toMemberName;
+    }
+
+    public void setToMemberName(String toMemberName) {
+        this.toMemberName = toMemberName;
+    }
+
+    public String getToMemberFace() {
+        return toMemberFace;
+    }
+
+    public void setToMemberFace(String toMemberFace) {
+        this.toMemberFace = toMemberFace;
+    }
+
+    public Integer getToClerkId() {
+        return toClerkId;
+    }
+
+    public void setToClerkId(Integer toClerkId) {
+        this.toClerkId = toClerkId;
+    }
+
+    public String getToRoleName() {
+        return toRoleName;
+    }
+
+    public void setToRoleName(String toRoleName) {
+        this.toRoleName = toRoleName;
+    }
 
     public Boolean getOuteriorAction() {
         return outeriorAction;
@@ -273,7 +741,6 @@ public class InteractionDO implements Serializable {
         this.outeriorAction = outeriorAction;
     }
 
-
     public String getOuteriorActionNumber() {
         return outeriorActionNumber;
     }
@@ -282,7 +749,6 @@ public class InteractionDO implements Serializable {
         this.outeriorActionNumber = outeriorActionNumber;
     }
 
-
     public Long getOuteriorActionMemberId() {
         return outeriorActionMemberId;
     }
@@ -291,7 +757,6 @@ public class InteractionDO implements Serializable {
         this.outeriorActionMemberId = outeriorActionMemberId;
     }
 
-
     public Integer getRemarkId() {
         return remarkId;
     }
@@ -300,7 +765,6 @@ public class InteractionDO implements Serializable {
         this.remarkId = remarkId;
     }
 
-
     public Long getActionStart() {
         return actionStart;
     }
@@ -309,7 +773,6 @@ public class InteractionDO implements Serializable {
         this.actionStart = actionStart;
     }
 
-
     public Long getActionAccept() {
         return actionAccept;
     }
@@ -318,7 +781,6 @@ public class InteractionDO implements Serializable {
         this.actionAccept = actionAccept;
     }
 
-
     public Long getActionEnd() {
         return actionEnd;
     }
@@ -327,6 +789,29 @@ public class InteractionDO implements Serializable {
         this.actionEnd = actionEnd;
     }
 
+    public Integer getActionEndMemberId() {
+        return actionEndMemberId;
+    }
+
+    public void setActionEndMemberId(Integer actionEndMemberId) {
+        this.actionEndMemberId = actionEndMemberId;
+    }
+
+    public String getActionEndMemberName() {
+        return actionEndMemberName;
+    }
+
+    public void setActionEndMemberName(String actionEndMemberName) {
+        this.actionEndMemberName = actionEndMemberName;
+    }
+
+    public Long getActionCompleted() {
+        return actionCompleted;
+    }
+
+    public void setActionCompleted(Long actionCompleted) {
+        this.actionCompleted = actionCompleted;
+    }
 
     public String getData() {
         return data;
@@ -336,7 +821,6 @@ public class InteractionDO implements Serializable {
         this.data = data;
     }
 
-
     public String getErrorCode() {
         return errorCode;
     }
@@ -345,7 +829,6 @@ public class InteractionDO implements Serializable {
         this.errorCode = errorCode;
     }
 
-
     public String getErrorMessage() {
         return errorMessage;
     }
@@ -361,4 +844,53 @@ public class InteractionDO implements Serializable {
     public void setActionDirectionType(Integer actionDirectionType) {
         this.actionDirectionType = actionDirectionType;
     }
+
+    public String getActionStatus() {
+        return actionStatus;
+    }
+
+    public void setActionStatus(String actionStatus) {
+        this.actionStatus = actionStatus;
+    }
+
+    public Integer getRelativeId() {
+        return relativeId;
+    }
+
+    public void setRelativeId(Integer relativeId) {
+        this.relativeId = relativeId;
+    }
+
+    public String getRelativeName() {
+        return relativeName;
+    }
+
+    public void setRelativeName(String relativeName) {
+        this.relativeName = relativeName;
+    }
+
+
+    public String getSpreadMemberPath() {
+        return spreadMemberPath;
+    }
+
+    public void setSpreadMemberPath(String spreadMemberPath) {
+        this.spreadMemberPath = spreadMemberPath;
+    }
+
+    public String getSpreadMemberIds() {
+        return spreadMemberIds;
+    }
+
+    public void setSpreadMemberIds(String spreadMemberIds) {
+        this.spreadMemberIds = spreadMemberIds;
+    }
+
+    public String getReachedMemberIds() {
+        return reachedMemberIds;
+    }
+
+    public void setReachedMemberIds(String reachedMemberIds) {
+        this.reachedMemberIds = reachedMemberIds;
+    }
 }

+ 37 - 669
middleware/src/main/code/com/wdkl/ncs/android/middleware/model/vo/InteractionVO.java

@@ -2,12 +2,7 @@ package com.wdkl.ncs.android.middleware.model.vo;
 
 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
 import com.fasterxml.jackson.databind.annotation.JsonNaming;
-import com.wdkl.ncs.android.middleware.model.annotation.Column;
-import com.wdkl.ncs.android.middleware.model.annotation.Id;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
+import com.wdkl.ncs.android.middleware.model.dos.InteractionDO;
 
 /**
  * @program nc
@@ -16,668 +11,41 @@ import java.io.Serializable;
  * @create: 2021/04/02 15:27
  */
 @JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
-public class InteractionVO implements Serializable {
-
-    /**
-     * id
-     */
-    @Column(name = "id")
-    @ApiModelProperty(value = "id", required = false)
-    @Id(name = "id")
-    private Integer id;
-    /**
-     * 创建时间
-     */
-    @Column(name = "create_date")
-    @ApiModelProperty(value = "创建时间", required = false)
-    private Long createDate;
-    /**
-     * 科室Id
-     */
-    @Column(name = "part_id")
-    @ApiModelProperty(value = "科室Id", required = false)
-    private Integer partId;
-    /**
-     * 交互类型(1:语音通话,2:视频通话,3:卫生间紧急呼叫,4:语音留言,5:文本消息,6:按键事件)
-     */
-    @Column(name = "action_type")
-    @ApiModelProperty(value = "交互类型(1:语音通话,2:视频通话,3:卫生间紧急呼叫,4:语音留言,5:文本消息,6:按键事件)", required = false)
-    private String actionType;
-    /**
-     * SUCCESS、FAILED
-     */
-    @Column(name = "action_result")
-    @ApiModelProperty(value = "0失败,1成功", required = false)
-    private Integer actionResult;
-    /**
-     * 交互发起设备Id
-     */
-    @Column(name = "from_device_id")
-    @ApiModelProperty(value = "交互发起设备Id", required = false)
-    private Integer fromDeviceId;
-    /**
-     * 交互对象设备Id
-     */
-    @Column(name = "to_device_id")
-    @ApiModelProperty(value = "交互对象设备Id", required = false)
-    private Integer toDeviceId;
-    /**
-     * 发起设备所在空间结构
-     */
-    @Column(name = "from_device_frame_id")
-    @ApiModelProperty(value = "发起设备所在空间结构", required = false)
-    private Integer fromDeviceFrameId;
-    /**
-     * 交互对象所在空间结果
-     */
-    @Column(name = "to_device_frame_id")
-    @ApiModelProperty(value = "交互对象所在空间结果", required = false)
-    private Integer toDeviceFrameId;
-    /**
-     * 交互发起设备使用者member_id
-     */
-    @Column(name = "from_device_member_id")
-    @ApiModelProperty(value = "交互发起设备使用者member_id", required = false)
-    private Integer fromDeviceMemberId;
-    /**
-     * 交互对象设备使用者member_id
-     */
-    @Column(name = "to_device_member_id")
-    @ApiModelProperty(value = "交互对象设备使用者member_id", required = false)
-    private Integer toDeviceMemberId;
-    /**
-     * 交互开始时间(通话时指通话接通时间,与create_time相同)
-     */
-    @Column(name = "action_start")
-    @ApiModelProperty(value = "交互开始时间(通话时指通话接通时间,与create_time相同)", required = false)
-    private Long actionStart;
-    /**
-     * 应答时间
-     */
-    @Column(name = "action_accept")
-    @ApiModelProperty(value = "应答时间", required = false)
-    private Long actionAccept;
-    /**
-     * 交互结束时间(通话时指通话挂断时间,通话挂断后要更新此字段)。事件响应时间、语音已读时间
-     */
-    @Column(name = "action_end")
-    @ApiModelProperty(value = "交互结束时间(通话时指通话挂断时间,通话挂断后要更新此字段)。事件响应时间、语音已读时间", required = false)
-    private Long actionEnd;
-    /**
-     * 交互处理者的member_id
-     */
-    @Column(name = "action_end_member_id")
-    @ApiModelProperty(value = "交互处理者的member_id", required = false)
-    private Integer actionEndMemberId;
-    /**
-     * 交互数据(类型1,2,3为空)(类型4为音频文件地址)(5为文本内容)(类型6为具体按键类型)
-     */
-    @Column(name = "data")
-    @ApiModelProperty(value = "交互数据(类型1,2,3为空)(类型4为音频文件地址)(5为文本内容)(类型6为具体按键类型)", required = false)
-    private String data;
-
-    @Column(name = "action_direction_type")
-    @ApiModelProperty(value = "交互方向类型(1:分机到主机、腕表、医生机,2:主机、腕表、医生机到分机,3主机、腕表、医生机之间互通,4:分机到分机)",required = false)
-    private Integer actionDirectionType;
-
-    /** 用户 **/
-    @Column(name = "from_customer_id")
-    @ApiModelProperty(value = "发起端用户CustomId", required = false)
-    private Integer fromCustomerId;
-
-    @Column(name = "from_member_name")
-    @ApiModelProperty(value = "发起端用户姓名", required = false)
-    private String fromMemberName;
-
-    @Column(name = "from_member_face")
-    @ApiModelProperty(value = "发起端用户头像", required = false)
-    private String fromMemberFace;
-
-    @Column(name = "from_clerk_id")
-    @ApiModelProperty(value = "发起端用户成员Id,发起端为护士主机,腕表,医生机时才有", required = false)
-    private Integer fromClerkId;
-
-    @Column(name = "from_role_name")
-    @ApiModelProperty(value = "发起端用户角色名(医生、护士、护工)", required = false)
-    private String fromRoleName;
-
-
-    @Column(name = "to_customer_id")
-    @ApiModelProperty(value = "目的端用户CustomId", required = false)
-    private Integer toCustomerId;
-
-    @Column(name = "to_member_name")
-    @ApiModelProperty(value = "目的端用户姓名", required = false)
-    private String toMemberName;
-
-    @Column(name = "to_member_face")
-    @ApiModelProperty(value = "目的端用户头像", required = false)
-    private String toMemberFace;
-
-    @Column(name = "to_clerk_id")
-    @ApiModelProperty(value = "目的端用户成员Id,目的端为护士主机,腕表,医生机时才有", required = false)
-    private Integer toClerkId;
-
-    @Column(name = "to_role_name")
-    @ApiModelProperty(value = "目的端用户角色名(医生、护士、护工)", required = false)
-    private String toRoleName;
-
-
-    /** 设备 **/
-    @Column(name = "from_eth_mac")
-    @ApiModelProperty(value = "发起端设备的有线以太网卡MAC地址", required = false)
-    private String fromEthMac;
-
-    @Column(name = "from_eth_ip")
-    @ApiModelProperty(value = "发起端设备的有线以太网卡分配的IP地址", required = false)
-    private String fromEthIp;
-
-
-    @Column(name = "from_sip_id")
-    @ApiModelProperty(value = "发起端设备的SIP账号", required = false)
-    private String fromSipId;
-
-    @Column(name = "from_device_type")
-    @ApiModelProperty(value = "发起端设备的设备类型", required = false)
-    private Integer fromDeviceType;
-
-    @Column(name = "from_device_name")
-    @ApiModelProperty(value = "发起端设备的名称", required = false)
-    private String fromDeviceName;
-
-    @Column(name = "from_device_phone_number" )
-    @ApiModelProperty(value="发起端设备号码",required=false)
-    private String fromDevicePhoneNumber;
-
-
-    @Column(name = "to_eth_mac")
-    @ApiModelProperty(value = "目的端设备的有线以太网卡MAC地址", required = false)
-    private String toEthMac;
-
-    @Column(name = "to_eth_ip")
-    @ApiModelProperty(value = "目的端设备的有线以太网卡分配的IP地址", required = false)
-    private String toEthIp;
-
-
-    @Column(name = "to_sip_id")
-    @ApiModelProperty(value = "目的端设备的SIP账号", required = false)
-    private String toSipId;
-
-    @Column(name = "to_device_type")
-    @ApiModelProperty(value = "目的端设备的设备类型", required = false)
-    private Integer toDeviceType;
-
-    @Column(name = "to_device_name")
-    @ApiModelProperty(value = "目的端设备的名称", required = false)
-    private String toDeviceName;
-
-    @Column(name = "to_device_phone_number" )
-    @ApiModelProperty(value="目的端设备号码",required=false)
-    private String toDevicePhoneNumber;
-
-
-    /** 空间结构 **/
-
-    @Column(name = "from_frame_type")
-    @ApiModelProperty(value = "发起端空间结构类型:0楼、1病房、2床位", required = false)
-    private Integer fromFrameType;
-
-
-    @Column(name = "from_frame_name")
-    @ApiModelProperty(value = "发起端空间结构名称", required = false)
-    private String fromFrameName;
-
-    @Column(name = "from_frame_full_name")
-    @ApiModelProperty(value = "发起端空间结构全名", required = false)
-    private String fromFrameFullName;
-
-    @Column(name = "from_frame_parent_id")
-    @ApiModelProperty(value = "发起端空间父级id", required = false)
-    private String fromFrameParentId;
-
-
-    @Column(name = "to_frame_type")
-    @ApiModelProperty(value = "目的端空间结构类型:0楼、1病房、2床位", required = false)
-    private Integer toFrameType;
-
-
-    @Column(name = "to_frame_name")
-    @ApiModelProperty(value = "目的端空间结构名称", required = false)
-    private String toFrameName;
-
-    @Column(name = "to_frame_full_name")
-    @ApiModelProperty(value = "目的端空间结构全名", required = false)
-    private String toFrameFullName;
-
-    @Column(name = "to_frame_parent_id")
-    @ApiModelProperty(value = "目的端空间父级id", required = false)
-    private String toFrameParentId;
-
-
-    @Column(name = "relative_id")
-    @ApiModelProperty(value = "亲属id,外部来电时,from_member亲属的memberId", required = false)
-    private Integer relativeId;
-
-    @Column(name = "relative_name")
-    @ApiModelProperty(value = "外部来电时,from_member亲属关系", required = false)
-    private String relativeName;
-
-    @Column(name = "action_end_member_name")
-    @ApiModelProperty(value = "交互处理者的用户姓名", required = false)
-    private String actionEndMemberName;
-
-
-    @Column(name = "action_status")
-    @ApiModelProperty(value = "事件类型的交互状态(包括:发出,响应,取消,完成)",required = false)
-    private String actionStatus;
-
-
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Long getCreateDate() {
-        return createDate;
-    }
-
-    public void setCreateDate(Long createDate) {
-        this.createDate = createDate;
-    }
-
-    public Integer getPartId() {
-        return partId;
-    }
-
-    public void setPartId(Integer partId) {
-        this.partId = partId;
-    }
-
-    public String getActionType() {
-        return actionType;
-    }
-
-    public void setActionType(String actionType) {
-        this.actionType = actionType;
-    }
-
-    public Integer getActionResult() {
-        return actionResult;
-    }
-
-    public void setActionResult(Integer actionResult) {
-        this.actionResult = actionResult;
-    }
-
-    public Integer getFromDeviceId() {
-        return fromDeviceId;
-    }
-
-    public void setFromDeviceId(Integer fromDeviceId) {
-        this.fromDeviceId = fromDeviceId;
-    }
-
-    public Integer getToDeviceId() {
-        return toDeviceId;
-    }
-
-    public void setToDeviceId(Integer toDeviceId) {
-        this.toDeviceId = toDeviceId;
-    }
-
-    public Integer getFromDeviceFrameId() {
-        return fromDeviceFrameId;
-    }
-
-    public void setFromDeviceFrameId(Integer fromDeviceFrameId) {
-        this.fromDeviceFrameId = fromDeviceFrameId;
-    }
-
-    public Integer getToDeviceFrameId() {
-        return toDeviceFrameId;
-    }
-
-    public void setToDeviceFrameId(Integer toDeviceFrameId) {
-        this.toDeviceFrameId = toDeviceFrameId;
-    }
-
-    public Integer getFromDeviceMemberId() {
-        return fromDeviceMemberId;
-    }
-
-    public void setFromDeviceMemberId(Integer fromDeviceMemberId) {
-        this.fromDeviceMemberId = fromDeviceMemberId;
-    }
-
-    public Integer getToDeviceMemberId() {
-        return toDeviceMemberId;
-    }
-
-    public void setToDeviceMemberId(Integer toDeviceMemberId) {
-        this.toDeviceMemberId = toDeviceMemberId;
-    }
-
-    public Long getActionStart() {
-        return actionStart;
-    }
-
-    public void setActionStart(Long actionStart) {
-        this.actionStart = actionStart;
-    }
-
-    public Long getActionAccept() {
-        return actionAccept;
-    }
-
-    public void setActionAccept(Long actionAccept) {
-        this.actionAccept = actionAccept;
-    }
-
-    public Long getActionEnd() {
-        return actionEnd;
-    }
-
-    public void setActionEnd(Long actionEnd) {
-        this.actionEnd = actionEnd;
-    }
-
-    public Integer getActionEndMemberId() {
-        return actionEndMemberId;
-    }
-
-    public void setActionEndMemberId(Integer actionEndMemberId) {
-        this.actionEndMemberId = actionEndMemberId;
-    }
-
-    public String getData() {
-        return data;
-    }
-
-    public void setData(String data) {
-        this.data = data;
-    }
-
-    public Integer getActionDirectionType() {
-        return actionDirectionType;
-    }
-
-    public void setActionDirectionType(Integer actionDirectionType) {
-        this.actionDirectionType = actionDirectionType;
-    }
-
-    public Integer getFromCustomerId() {
-        return fromCustomerId;
-    }
-
-    public void setFromCustomerId(Integer fromCustomerId) {
-        this.fromCustomerId = fromCustomerId;
-    }
-
-    public String getFromMemberName() {
-        return fromMemberName;
-    }
-
-    public void setFromMemberName(String fromMemberName) {
-        this.fromMemberName = fromMemberName;
-    }
-
-    public String getFromMemberFace() {
-        return fromMemberFace;
-    }
-
-    public void setFromMemberFace(String fromMemberFace) {
-        this.fromMemberFace = fromMemberFace;
-    }
-
-    public Integer getFromClerkId() {
-        return fromClerkId;
-    }
-
-    public void setFromClerkId(Integer fromClerkId) {
-        this.fromClerkId = fromClerkId;
-    }
-
-    public String getFromRoleName() {
-        return fromRoleName;
-    }
-
-    public void setFromRoleName(String fromRoleName) {
-        this.fromRoleName = fromRoleName;
-    }
-
-    public Integer getToCustomerId() {
-        return toCustomerId;
-    }
-
-    public void setToCustomerId(Integer toCustomerId) {
-        this.toCustomerId = toCustomerId;
-    }
-
-    public String getToMemberName() {
-        return toMemberName;
-    }
-
-    public void setToMemberName(String toMemberName) {
-        this.toMemberName = toMemberName;
-    }
-
-    public String getToMemberFace() {
-        return toMemberFace;
-    }
-
-    public void setToMemberFace(String toMemberFace) {
-        this.toMemberFace = toMemberFace;
-    }
-
-    public Integer getToClerkId() {
-        return toClerkId;
-    }
-
-    public void setToClerkId(Integer toClerkId) {
-        this.toClerkId = toClerkId;
-    }
-
-    public String getToRoleName() {
-        return toRoleName;
-    }
-
-    public void setToRoleName(String toRoleName) {
-        this.toRoleName = toRoleName;
-    }
-
-    public String getFromEthMac() {
-        return fromEthMac;
-    }
-
-    public void setFromEthMac(String fromEthMac) {
-        this.fromEthMac = fromEthMac;
-    }
-
-    public String getFromEthIp() {
-        return fromEthIp;
-    }
-
-    public void setFromEthIp(String fromEthIp) {
-        this.fromEthIp = fromEthIp;
-    }
-
-    public String getFromSipId() {
-        return fromSipId;
-    }
-
-    public void setFromSipId(String fromSipId) {
-        this.fromSipId = fromSipId;
-    }
-
-    public Integer getFromDeviceType() {
-        return fromDeviceType;
-    }
-
-    public void setFromDeviceType(Integer fromDeviceType) {
-        this.fromDeviceType = fromDeviceType;
-    }
-
-    public String getFromDeviceName() {
-        return fromDeviceName;
-    }
-
-    public void setFromDeviceName(String fromDeviceName) {
-        this.fromDeviceName = fromDeviceName;
-    }
-
-    public String getFromDevicePhoneNumber() {
-        return fromDevicePhoneNumber;
-    }
-
-    public void setFromDevicePhoneNumber(String fromDevicePhoneNumber) {
-        this.fromDevicePhoneNumber = fromDevicePhoneNumber;
-    }
-
-    public String getToEthMac() {
-        return toEthMac;
-    }
-
-    public void setToEthMac(String toEthMac) {
-        this.toEthMac = toEthMac;
-    }
-
-    public String getToEthIp() {
-        return toEthIp;
-    }
-
-    public void setToEthIp(String toEthIp) {
-        this.toEthIp = toEthIp;
-    }
-
-    public String getToSipId() {
-        return toSipId;
-    }
-
-    public void setToSipId(String toSipId) {
-        this.toSipId = toSipId;
-    }
-
-    public Integer getToDeviceType() {
-        return toDeviceType;
-    }
-
-    public void setToDeviceType(Integer toDeviceType) {
-        this.toDeviceType = toDeviceType;
-    }
-
-    public String getToDeviceName() {
-        return toDeviceName;
-    }
-
-    public void setToDeviceName(String toDeviceName) {
-        this.toDeviceName = toDeviceName;
-    }
-
-    public String getToDevicePhoneNumber() {
-        return toDevicePhoneNumber;
-    }
-
-    public void setToDevicePhoneNumber(String toDevicePhoneNumber) {
-        this.toDevicePhoneNumber = toDevicePhoneNumber;
-    }
-
-    public Integer getFromFrameType() {
-        return fromFrameType;
-    }
-
-    public void setFromFrameType(Integer fromFrameType) {
-        this.fromFrameType = fromFrameType;
-    }
-
-    public String getFromFrameName() {
-        return fromFrameName;
-    }
-
-    public void setFromFrameName(String fromFrameName) {
-        this.fromFrameName = fromFrameName;
-    }
-
-    public String getFromFrameFullName() {
-        return fromFrameFullName;
-    }
-
-    public void setFromFrameFullName(String fromFrameFullName) {
-        this.fromFrameFullName = fromFrameFullName;
-    }
-
-    public String getFromFrameParentId() {
-        return fromFrameParentId;
-    }
-
-    public void setFromFrameParentId(String fromFrameParentId) {
-        this.fromFrameParentId = fromFrameParentId;
-    }
-
-    public Integer getToFrameType() {
-        return toFrameType;
-    }
-
-    public void setToFrameType(Integer toFrameType) {
-        this.toFrameType = toFrameType;
-    }
-
-    public String getToFrameName() {
-        return toFrameName;
-    }
-
-    public void setToFrameName(String toFrameName) {
-        this.toFrameName = toFrameName;
-    }
-
-    public String getToFrameFullName() {
-        return toFrameFullName;
-    }
-
-    public void setToFrameFullName(String toFrameFullName) {
-        this.toFrameFullName = toFrameFullName;
-    }
-
-    public String getToFrameParentId() {
-        return toFrameParentId;
-    }
-
-    public void setToFrameParentId(String toFrameParentId) {
-        this.toFrameParentId = toFrameParentId;
-    }
-
-    public Integer getRelativeId() {
-        return relativeId;
-    }
-
-    public void setRelativeId(Integer relativeId) {
-        this.relativeId = relativeId;
-    }
-
-    public String getRelativeName() {
-        return relativeName;
-    }
-
-    public void setRelativeName(String relativeName) {
-        this.relativeName = relativeName;
-    }
-
-    public String getActionEndMemberName() {
-        return actionEndMemberName;
-    }
-
-    public void setActionEndMemberName(String actionEndMemberName) {
-        this.actionEndMemberName = actionEndMemberName;
-    }
-
-    public String getActionStatus() {
-        return actionStatus;
-    }
-
-    public void setActionStatus(String actionStatus) {
-        this.actionStatus = actionStatus;
+public class InteractionVO extends InteractionDO {
+
+    @Override
+    public String toString() {
+        return "InteractionVO{" +
+                "fromCustomerId=" + getFromCustomerId() +
+                ", fromMemberName='" + getFromDeviceType() + '\'' +
+                ", fromMemberFace='" + getFromMemberFace() + '\'' +
+                ", fromClerkId=" + getFromClerkId() +
+                ", fromRoleName='" + getFromRoleName() + '\'' +
+                ", toCustomerId=" + getToCustomerId() +
+                ", toMemberName='" + getToMemberName() + '\'' +
+                ", toMemberFace='" + getToMemberFace() + '\'' +
+                ", toClerkId=" + getToClerkId() +
+                ", toRoleName='" + getToRoleName() + '\'' +
+                ", fromEthMac='" + getFromEthMac() + '\'' +
+                ", fromEthIp='" + getFromEthIp() + '\'' +
+                ", fromSipId='" + getFromSipId() + '\'' +
+                ", fromDeviceType=" + getFromDeviceType() +
+                ", toEthMac='" + getToEthMac() + '\'' +
+                ", toEthIp='" + getToEthIp() + '\'' +
+                ", toSipId='" + getToSipId() + '\'' +
+                ", toDeviceType=" + getToDeviceType() +
+                ", fromFrameType=" + getFromFrameType() +
+                ", fromFrameName='" + getFromFrameName() + '\'' +
+                ", fromFrameFullName='" + getFromFrameFullName() + '\'' +
+                ", toFrameType=" + getToFrameType() +
+                ", toFrameName='" + getToFrameName() + '\'' +
+                ", toFrameFullName='" + getToFrameFullName() + '\'' +
+                ", relativeId=" + getRelativeId() +
+                ", relativeName='" + getRelativeName() + '\'' +
+                ", actionStatus='" + getActionStatus() + '\'' +
+                ", actionEndMemberId=" + getActionEndMemberId() +
+                ", actionEndMemberName='" + getActionEndMemberName() + '\'' +
+                '}';
     }
 }
+

+ 268 - 9
middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/enums/TcpAction.java

@@ -14,6 +14,7 @@ public interface TcpAction {
     String getDescription();
 
     enum CallbackAction implements TcpAction {
+        ACK("反馈"),
         SUCCESS("同步"),
         FAILED("失败"),
         NO_MATCH("没有匹配");
@@ -88,7 +89,7 @@ public interface TcpAction {
         HANDOFF("挂断"),
         CANCEL("取消"),
         PCALLING("已经通话中"),
-        VOICE_OFF("通话被接听"),
+        VOICE_OFF("通话被其他设备处理"),
         RS485CALL("485界面发起呼叫"),
         RS485CANCEL("485界面呼叫取消"),
         RS485CANCEL_BY_DOOR("485门口机取消房间内的呼叫"),
@@ -104,6 +105,7 @@ public interface TcpAction {
         GAINED("呼叫被应答"),
         HCALL("手柄呼叫"),
         HRESPONSE("响应手柄"),
+        HRESPONSED("响应过手柄了"),
         NO_MATCH("没有匹配");
 
 
@@ -145,6 +147,7 @@ public interface TcpAction {
         CANCEL("取消"),
         SUCCESS("呼叫成功"),
         FAILED("呼叫失败"),
+        VIDEO_OFF("视频被其他设备处理"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -174,8 +177,9 @@ public interface TcpAction {
 
 
     enum SOSAction implements TcpAction {
-        CALL("紧急呼叫"),
-        CANCEL("取消"),
+        CALL("紧急呼叫"),   //1
+        CANCEL("取消"),   //1
+        CANCELED("已取消"),    //1
         TRANSFER("转接"),
         ALARM_TEST("测试报警"),
         ALARM_INTRUSION("侵入报警"),
@@ -192,12 +196,16 @@ public interface TcpAction {
         ALARM_WATER_OVERFLOW("浸水报警"),
         ALARM_LOW_VOLTAGE("低电压报警"),
         ALARM_TEMPERATURE("温度报警"),
-        ALARM_FALL("跌报警"),
+        ALARM_FALL("跌报警"),
         ALARM_VITAL("体征报警"),
         AlARM_BUTTON("紧急按钮"),
-        ALARM_FALL_RADAR("跌报警"),
+        ALARM_FALL_RADAR("跌报警"),
         ALARM_INFUSION_RADAR("输液报警"),
-        ROOM_CALL("房间紧急呼叫"),
+        ROOM_CALL("房间紧急呼叫"),    //1
+        OTHER_CALL("其他紧急呼叫"),   //1
+        RECEIVED("客户端收到确认"),
+        // 当设备在科室级时用这个PART_USER_CALL,比如:用户手环
+        PART_USER_CALL("用户紧急呼叫"),   //
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -321,7 +329,9 @@ public interface TcpAction {
     }
 
     enum DeviceAction implements TcpAction {
-        RESTART("重启"),
+        RESTART("重启APP"),
+        REBOOT("重启机器"),
+        OPEN_DEBUG("打开网络调试"),
         CONNECT("连接"),
         APP_UPDATE("APP更新"),
         DEVICE_REFRESH("设备刷新"),
@@ -329,6 +339,8 @@ public interface TcpAction {
         DEVICE_CHANGE("设备更换"),
         USER_CHANGE("用户绑定"),
         SERVER_CHANGE("设备ip地址更换"),
+        S485_POWER_RESET("485控制版复位电路"),
+        S485_POWER_RESET_SUCCESS("485控制版复位电路成功"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -357,13 +369,14 @@ public interface TcpAction {
 
     enum EventAction implements TcpAction {
         KEY_CLICK("按键事件"),
-        RESPONSE("已响应"),
+        RESPONSE("响应"),
+        RESPONSED("已响应"),
         RECEIVED("接收端收到确认"),
         CANCEL("取消"),
         CANCEL_CONFIRM("接收端确认收到取消"),
+        NO_TARGET("没有目标设备"),
         COMPLETED("完成"),
         NO_MATCH("没有匹配");
-
         private final String description;
         EventAction(String description){
             this.description = description;
@@ -396,6 +409,8 @@ public interface TcpAction {
         SOS_CANCEL("取消"),
         NURSING("护理"),
         NURSING_END("护理结束"),
+        SHOW("显示"),
+        CLEAR("清除"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -427,6 +442,7 @@ public interface TcpAction {
     enum DataAction implements TcpAction {
         REFRESH("刷新数据"),
         INTERACTION("刷新交互列表"),
+        REMIND("提醒消息"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -578,4 +594,247 @@ public interface TcpAction {
             return userOptionEnum == null ? NO_MATCH :userOptionEnum;
         }
     }
+
+    /**
+     * 433相关action
+      */
+    enum S433Action implements TcpAction {
+        CALL("呼叫"),
+        SOS_CALL("紧急呼叫"),
+        CANCEL("取消"),
+        SYNC_TIME("同步时间"),
+        DATA("同步数据"),
+        EXIST("调试"),
+        ACK("返回"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        S433Action(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , S433Action> ENUM_MAP = new HashMap<String, S433Action>();
+        static {
+            for(S433Action v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static S433Action fromString(String v) {
+            S433Action userOptionEnum = ENUM_MAP.get(v);
+            return userOptionEnum == null ? NO_MATCH :userOptionEnum;
+        }
+    }
+
+    enum SignInAction implements TcpAction{
+        SIGN_IN("发起签到"),
+        SIGN_IN_SUCCESS("签到成功"),
+        SIGN_IN_FAILED("签到失败"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        SignInAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , SignInAction> ENUM_MAP = new HashMap<String, SignInAction>();
+        static {
+            for(SignInAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static SignInAction fromString(String v) {
+            SignInAction signInAction = ENUM_MAP.get(v);
+            return signInAction == null ? NO_MATCH :signInAction;
+        }
+    }
+
+
+    enum PositionAction implements TcpAction{
+        POSITION_START("定位开始"),
+        POSITION_END("结束定位"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        PositionAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , PositionAction> ENUM_MAP = new HashMap<String, PositionAction>();
+        static {
+            for(PositionAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static PositionAction fromString(String v) {
+            PositionAction positionAction = ENUM_MAP.get(v);
+            return positionAction == null ? NO_MATCH : positionAction;
+        }
+    }
+
+    enum BlueCodeAction implements TcpAction{
+        CALL("呼叫"),
+        SUCCESS("成功"),
+        RESPONSE("响应"),
+        RESPONDED("已响应"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        BlueCodeAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , BlueCodeAction> ENUM_MAP = new HashMap<String, BlueCodeAction>();
+        static {
+            for(BlueCodeAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static BlueCodeAction fromString(String v) {
+            return ENUM_MAP.get(v);
+        }
+    }
+
+
+    enum CountdownAction implements TcpAction {
+        START("倒计时开始"),
+        END("倒计时结束"),
+        CANCEL("倒计时取消"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        CountdownAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , CountdownAction> ENUM_MAP = new HashMap<String, CountdownAction>();
+        static {
+            for(CountdownAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static CountdownAction fromString(String v) {
+            return ENUM_MAP.get(v);
+        }
+    }
+
+
+    enum RoomCheckAction implements TcpAction {
+        START("巡房开始"),
+        END("巡房结束"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        RoomCheckAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , RoomCheckAction> ENUM_MAP = new HashMap<String, RoomCheckAction>();
+        static {
+            for(RoomCheckAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static RoomCheckAction fromString(String v) {
+            return ENUM_MAP.get(v);
+        }
+    }
+
+
+    enum ScreenTipAction implements TcpAction {
+        START("提示语开始"),
+        QUIT("提示语退出"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        ScreenTipAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , ScreenTipAction> ENUM_MAP = new HashMap<String, ScreenTipAction>();
+        static {
+            for(ScreenTipAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static ScreenTipAction fromString(String v) {
+            return ENUM_MAP.get(v);
+        }
+    }
+
+    enum AuthAction implements TcpAction {
+        LOGIN("登录"),
+        LOGOUT("退出"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        AuthAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , AuthAction> ENUM_MAP = new HashMap<String, AuthAction>();
+        static {
+            for(AuthAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static AuthAction fromString(String v) {
+            return ENUM_MAP.get(v);
+        }
+    }
+
 }

+ 12 - 2
middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/enums/TcpType.java

@@ -21,9 +21,19 @@ public enum TcpType {
     BROADCAST("广播"),
     ENTRACEGUARD("门禁"),
     CHANNELIM("频道留言"),
-    TIME("时间");
+    TIME("时间"),
+    LOCATION("定位"),
+    S433("433"),
+    /** 新增床旁交互Tcp类型 **/
+    SIGN_IN("床旁交互签到"),
+    POSITION("床旁交互定位"),
+    COUNTDOWN("床旁交互倒计时"),
+    ROOMCHECK("床旁交互巡房"),
+    SCREEN_TIP("设置门口机提示语"),
+    AUTH("认证"),
+    BLUE_CODE("blue code");
 
-    private String description;
+    private final String description;
     TcpType(String description){
         this.description = description;
     }