|
@ -12,8 +12,6 @@ import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
|
|
|
import com.yihu.jw.entity.care.doorCoach.*;
|
|
|
import com.yihu.jw.entity.door.WlyyDoorFeeDetailDO;
|
|
|
import com.yihu.jw.entity.door.WlyyDoorOrderItemDO;
|
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
|
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
|
|
|
import com.yihu.jw.im.dao.ConsultDao;
|
|
@ -961,6 +959,40 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 调度员进入聊天室
|
|
|
* @param dispatcher
|
|
|
* @param orderId
|
|
|
*/
|
|
|
public JSONObject dispatcherIntoTopic(String orderId, String hospitalName, String dispatcher, String dispatcherName) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
BaseDoorCoachOrderDO orderDO = baseDoorCoachOrderDao.findOne(orderId);
|
|
|
if (null == orderDO) {
|
|
|
String failMsg = "调度员进入聊天室时,找不到对应工单,工单id=" + orderId;
|
|
|
result.put(ResponseContant.resultFlag, ResponseContant.fail);
|
|
|
result.put(ResponseContant.resultMsg, failMsg);
|
|
|
logger.error(failMsg);
|
|
|
return result;
|
|
|
}
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
String sessionId = orderDO.getPatient() + "_" + consult.getId() + "_" + orderDO.getNumber() + "_" + consult.getType();
|
|
|
// 把调度员拉入会话,作为其中一个成员,第一个进入会话的调度员,系统发送欢迎语和居民的预约卡片信息
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(orderDO.getDispatcher())) {
|
|
|
orderDO.setDispatcher(dispatcher);
|
|
|
orderDO.setDispatcherName(dispatcherName);
|
|
|
this.save(orderDO);
|
|
|
// 先进入会话,再聊天
|
|
|
imUtill.updateParticipantNew(sessionId,dispatcher,null);
|
|
|
String noticeContent = hospitalName + dispatcherName + "为您服务";
|
|
|
this.qucikSendIM(orderId, dispatcher, "智能助手", "1", noticeContent);
|
|
|
}
|
|
|
// 把调度员拉入会话,作为其中一个成员
|
|
|
imUtill.updateParticipantNew(sessionId,dispatcher,null);
|
|
|
result.put(ResponseContant.resultFlag, ResponseContant.success);
|
|
|
result.put(ResponseContant.resultMsg, "调度员["+dispatcherName+"]进入会话成功");
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 工单与服务项费用关联关系
|
|
|
*
|
|
@ -1002,11 +1034,6 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
|
|
|
JSONObject oneJson = (JSONObject)one;
|
|
|
try {
|
|
|
feeDetailDO = EntityUtils.jsonToEntity(one.toString(), BaseDoorCoachFeeDetailDO.class);
|
|
|
WlyyDoorOrderItemDO orderItemDO = new WlyyDoorOrderItemDO();
|
|
|
orderItemDO.setDoctor(order.getDoctor());
|
|
|
orderItemDO.setCode(feeDetailDO.getCode());
|
|
|
orderItemDO.setCreateTime(new Date());
|
|
|
orderItemDO.setPatient(order.getPatient());
|
|
|
} catch (Exception e) {
|
|
|
result.put(ResponseContant.resultFlag, ResponseContant.fail);
|
|
|
String failMsg = "工单与服务费用关联关系时," + e.getMessage();
|