|
@@ -0,0 +1,388 @@
|
|
|
|
+package com.care.bms.service;
|
|
|
|
+
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import com.care.common.cache.RedisKeyConstant;
|
|
|
|
+import com.care.common.cache.RedisUtil;
|
|
|
|
+import com.care.common.entity.*;
|
|
|
|
+import com.care.common.enums.*;
|
|
|
|
+import com.care.common.exception.BDException;
|
|
|
|
+import com.care.common.service.*;
|
|
|
|
+import com.care.common.vo.PageReqVO;
|
|
|
|
+import com.care.common.vo.UserLogindConvertVO;
|
|
|
|
+import com.care.common.vo.event.*;
|
|
|
|
+import com.care.common.vo.outcall.CcCallResultVO;
|
|
|
|
+import org.apache.commons.compress.utils.Lists;
|
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 事件定单表(CareEventOrder)表服务实现类
|
|
|
|
+ *
|
|
|
|
+ * @author makejava
|
|
|
|
+ * @since 2021-05-21 00:08:29
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+@Transactional(rollbackFor = Exception.class)
|
|
|
|
+public class BmsEventOrderService {
|
|
|
|
+ @Autowired
|
|
|
|
+ RedisUtil redisUtil;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareOlderContactService careOlderContactService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareOlderService careOlderService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareEventOrderService careEventOrderService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareSysUserService careSysUserService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareChamberlainOlderRelService careChamberlainOlderRelService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareEventOrderContactStatusService careEventOrderContactStatusService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareEventOrderHandleHisService careEventOrderHandleHisService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CareEventOrderKeyApplyService careEventOrderKeyApplyService;
|
|
|
|
+ @Resource
|
|
|
|
+ private CcCallResultService ccCallResultService;
|
|
|
|
+ /**
|
|
|
|
+ * 工单查询
|
|
|
|
+ * @param orderStatus
|
|
|
|
+ * @param olderName
|
|
|
|
+ * @param loginUser
|
|
|
|
+ * @param pageReqVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public IPage<EventOrderVO> listEvent(String orderStatus, String olderName, UserLogindConvertVO loginUser, PageReqVO pageReqVo) {
|
|
|
|
+ IPage<CareEventOrder> page = new Page<>(pageReqVo.getCurrent(), pageReqVo.getPageSize());
|
|
|
|
+ QueryWrapper<CareEventOrder> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(StrUtil.isNotEmpty(orderStatus),CareEventOrder::getStatus, orderStatus)
|
|
|
|
+ .like(StrUtil.isNotEmpty(olderName),CareEventOrder::getOlderName,olderName)
|
|
|
|
+ .eq(CareEventOrder::getOrgId,loginUser.getOrgId())
|
|
|
|
+ .eq(loginUser.getStationId()!=null,CareEventOrder::getStationId,loginUser.getStationId())
|
|
|
|
+ .orderByAsc(CareEventOrder::getCreateTime);
|
|
|
|
+
|
|
|
|
+ IPage<CareEventOrder> pageRes = this.careEventOrderService.page(page, queryWrapper);
|
|
|
|
+ IPage<EventOrderVO> results = new Page<>(pageRes.getCurrent(),pageRes.getSize(),pageRes.getTotal());
|
|
|
|
+ if(CollUtil.isNotEmpty(pageRes.getRecords())){
|
|
|
|
+ List<EventOrderVO> list = new ArrayList<>();
|
|
|
|
+ pageRes.getRecords().forEach(item -> {
|
|
|
|
+ EventOrderVO resVO = new EventOrderVO();
|
|
|
|
+ BeanUtils.copyProperties(item,resVO);
|
|
|
|
+ resVO.setOrderTypeName(OrderTypeEnum.getCodeToName(item.getOrderType()));
|
|
|
|
+ resVO.setStatusName(OrderStatusEnum.getCodeToName(item.getStatus()));
|
|
|
|
+ list.add(resVO);
|
|
|
|
+ });
|
|
|
|
+ results.setRecords(list);
|
|
|
|
+ }
|
|
|
|
+ return results;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 我的处理事件 - 坐席
|
|
|
|
+ *
|
|
|
|
+ * @param orderStatus
|
|
|
|
+ * @param olderName
|
|
|
|
+ * @param loginUser
|
|
|
|
+ * @param pageReqVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public IPage<EventOrderVO> listEvent4MyDo(String orderStatus, String olderName, UserLogindConvertVO loginUser, PageReqVO pageReqVo) {
|
|
|
|
+ IPage<CareEventOrder> page = new Page<>(pageReqVo.getCurrent(), pageReqVo.getPageSize());
|
|
|
|
+ QueryWrapper<CareEventOrder> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(StrUtil.isNotEmpty(orderStatus),CareEventOrder::getStatus, orderStatus)
|
|
|
|
+ .like(StrUtil.isNotEmpty(olderName),CareEventOrder::getOlderName,olderName)
|
|
|
|
+ .eq(CareEventOrder::getOrgId,loginUser.getOrgId())
|
|
|
|
+ .eq(CareEventOrder::getSeatId,loginUser.getId())
|
|
|
|
+ .orderByAsc(CareEventOrder::getModifyTime);
|
|
|
|
+ IPage<CareEventOrder> pageRes = this.careEventOrderService.page(page, queryWrapper);
|
|
|
|
+ IPage<EventOrderVO> results = new Page<>(pageRes.getCurrent(),pageRes.getSize(),pageRes.getTotal());
|
|
|
|
+ if(CollUtil.isNotEmpty(pageRes.getRecords())){
|
|
|
|
+ List<EventOrderVO> list = new ArrayList<>();
|
|
|
|
+ pageRes.getRecords().forEach(item -> {
|
|
|
|
+ EventOrderVO resVO = new EventOrderVO();
|
|
|
|
+ BeanUtils.copyProperties(item,resVO);
|
|
|
|
+ resVO.setOrderTypeName(OrderTypeEnum.getCodeToName(item.getOrderType()));
|
|
|
|
+ resVO.setStatusName(OrderStatusEnum.getCodeToName(item.getStatus()));
|
|
|
|
+ list.add(resVO);
|
|
|
|
+ });
|
|
|
|
+ results.setRecords(list);
|
|
|
|
+ }
|
|
|
|
+ return results;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 处理工单
|
|
|
|
+ * 使用分布式锁
|
|
|
|
+ *
|
|
|
|
+ * @param orderId
|
|
|
|
+ * @param loginUser
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ public void receiveOrder(Long orderId, UserLogindConvertVO loginUser) {
|
|
|
|
+ String key = RedisKeyConstant.DO_ORDER+":"+orderId;
|
|
|
|
+ boolean result = redisUtil.tryLock(key,3000);
|
|
|
|
+ try{
|
|
|
|
+ if (result){
|
|
|
|
+ CareEventOrder order = this.careEventOrderService.getById(orderId);
|
|
|
|
+ //1.判断工单的状态,如果不是未处理状态,则不能处理
|
|
|
|
+ if (OrderStatusEnum.TODO.getValue().equals(order.getStatus())){
|
|
|
|
+ UpdateWrapper<CareEventOrder> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.lambda().eq(CareEventOrder::getId,orderId)
|
|
|
|
+ .set(CareEventOrder::getStatus,OrderStatusEnum.DOING)
|
|
|
|
+ .set(CareEventOrder::getSeatId,loginUser.getId())
|
|
|
|
+ .set(CareEventOrder::getModifyTime,DateUtil.date());
|
|
|
|
+ this.careEventOrderService.update(updateWrapper);
|
|
|
|
+ //2. 将老人的联系人、管家 插入到 事件工单 联系人中
|
|
|
|
+ List<CareEventOrderContactStatus> orderContactList = Lists.newArrayList();
|
|
|
|
+ //查询老人
|
|
|
|
+ addOlderToOrderContact(order,orderContactList);
|
|
|
|
+ //查询管家
|
|
|
|
+ addChamberlainToOrderContact(order,orderContactList);
|
|
|
|
+ //查询紧急联系人
|
|
|
|
+ addContactToOrderContact(order,orderContactList);
|
|
|
|
+ this.careEventOrderContactStatusService.saveBatch(orderContactList);
|
|
|
|
+ }else{
|
|
|
|
+ throw new BDException("该工单状态已变化,请刷新");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ throw new BDException("该工单已经再被处理");
|
|
|
|
+ }
|
|
|
|
+ }finally {
|
|
|
|
+ redisUtil.releaseLock(key);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询老人信息
|
|
|
|
+ * @param orderId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public OrderOlderVO getOrderOlderInfo(Long orderId){
|
|
|
|
+ OrderOlderVO orderOlderVo = new OrderOlderVO();
|
|
|
|
+ CareEventOrder order = this.careEventOrderService.getById(orderId);
|
|
|
|
+ if (order!=null){
|
|
|
|
+ CareOlder older = this.careOlderService.getById(order.getOlderId());
|
|
|
|
+ BeanUtil.copyProperties(older,orderOlderVo);
|
|
|
|
+ orderOlderVo.setEventType(order.getOrderType());
|
|
|
|
+ orderOlderVo.setEventTypeDesc(OrderTypeEnum.getCodeToName(order.getOrderType()));
|
|
|
|
+ //查看老人联系状态
|
|
|
|
+ QueryWrapper<CareEventOrderContactStatus> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(CareEventOrderContactStatus::getOrderId,orderId)
|
|
|
|
+ .eq(CareEventOrderContactStatus::getContactRole,UserRoleEnum.OLDER.getValue())
|
|
|
|
+ .eq(CareEventOrderContactStatus::getContactId,older.getId());
|
|
|
|
+ List<CareEventOrderContactStatus> ceocs = this.careEventOrderContactStatusService.list(queryWrapper);
|
|
|
|
+ if (CollUtil.isNotEmpty(ceocs)){
|
|
|
|
+ CareEventOrderContactStatus contactStatus = ceocs.get(0);
|
|
|
|
+ orderOlderVo.setContactStatus(contactStatus.getStatus());
|
|
|
|
+ orderOlderVo.setContactStatusDesc(ContactorStatusEnum.getCodeToName(contactStatus.getStatus()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //查询管家
|
|
|
|
+ ChamberlainVO chamberlainVO = new ChamberlainVO();
|
|
|
|
+ CareSysUser user = this.careChamberlainOlderRelService.getMainChamberlainByOlderId(older.getId());
|
|
|
|
+ if (user!= null){
|
|
|
|
+ BeanUtil.copyProperties(user,chamberlainVO);
|
|
|
|
+ orderOlderVo.setChamberlain(chamberlainVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return orderOlderVo;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询事件处理历史
|
|
|
|
+ * @param orderId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<OrderHandleHisVO> queryOrderHandleHis(Long orderId){
|
|
|
|
+ List<OrderHandleHisVO> result = Lists.newArrayList();
|
|
|
|
+ QueryWrapper<CareEventOrderHandleHis> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(CareEventOrderHandleHis::getOrderId,orderId)
|
|
|
|
+ .orderByDesc(CareEventOrderHandleHis::getCreateTime);
|
|
|
|
+ List<CareEventOrderHandleHis> datas = this.careEventOrderHandleHisService.list(queryWrapper);
|
|
|
|
+ if (CollUtil.isNotEmpty(datas)){
|
|
|
|
+ datas.forEach(item ->{
|
|
|
|
+ OrderHandleHisVO hisVO = new OrderHandleHisVO();
|
|
|
|
+ BeanUtil.copyProperties(item,hisVO);
|
|
|
|
+ result.add(hisVO);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询工单的相关联系人
|
|
|
|
+ * @param orderId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<OrderContactorVO> queryContactList(Long orderId){
|
|
|
|
+ List<OrderContactorVO> result = Lists.newArrayList();
|
|
|
|
+ QueryWrapper<CareEventOrderContactStatus> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(CareEventOrderContactStatus::getOrderId,orderId).orderByAsc(CareEventOrderContactStatus::getContactLevel);
|
|
|
|
+ List<CareEventOrderContactStatus> ceocs = this.careEventOrderContactStatusService.list(queryWrapper);
|
|
|
|
+ if (CollUtil.isNotEmpty(ceocs)){
|
|
|
|
+ ceocs.forEach(item -> {
|
|
|
|
+ OrderContactorVO contactorVO = new OrderContactorVO();
|
|
|
|
+ BeanUtil.copyProperties(item,contactorVO);
|
|
|
|
+ contactorVO.setStatusDesc(ContactorStatusEnum.getCodeToName(item.getStatus()));
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更新工单状态
|
|
|
|
+ * @param orderId
|
|
|
|
+ * @param orderStatusEnum
|
|
|
|
+ */
|
|
|
|
+ public void updateOrderStatus(Long orderId,OrderStatusEnum orderStatusEnum){
|
|
|
|
+ UpdateWrapper<CareEventOrder> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.lambda().eq(CareEventOrder::getId,orderId)
|
|
|
|
+ .set(CareEventOrder::getStatus,orderStatusEnum.getValue())
|
|
|
|
+ .set(CareEventOrder::getModifyTime,DateUtil.date());
|
|
|
|
+ }
|
|
|
|
+ public List<OrderKeyApplyVO> queryKeyAuthList(Long orderId){
|
|
|
|
+ List<OrderKeyApplyVO> result = Lists.newArrayList();
|
|
|
|
+ QueryWrapper<CareEventOrderKeyApply> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(CareEventOrderKeyApply::getOrderId,orderId).orderByDesc(CareEventOrderKeyApply::getCreateTime);
|
|
|
|
+ List<CareEventOrderKeyApply> ceocs = this.careEventOrderKeyApplyService.list(queryWrapper);
|
|
|
|
+ if (CollUtil.isNotEmpty(ceocs)){
|
|
|
|
+ ceocs.forEach(item -> {
|
|
|
|
+ OrderKeyApplyVO keyApplyVO = new OrderKeyApplyVO();
|
|
|
|
+ BeanUtil.copyProperties(item,keyApplyVO);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 钥匙授权
|
|
|
|
+ * @param applyId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public boolean keyAuth(Long applyId){
|
|
|
|
+ UpdateWrapper<CareEventOrderKeyApply> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.lambda().eq(CareEventOrderKeyApply::getId,applyId)
|
|
|
|
+ .set(CareEventOrderKeyApply::getStatus,KeyAuthEnum.AUTHED.getValue());
|
|
|
|
+ return this.careEventOrderKeyApplyService.update(updateWrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改联系人状态
|
|
|
|
+ * @param orderContactId
|
|
|
|
+ * @param status
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public boolean updateOrderContactStatus(Long orderContactId,Integer status){
|
|
|
|
+ UpdateWrapper<CareEventOrderContactStatus> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.lambda().eq(CareEventOrderContactStatus::getId,orderContactId)
|
|
|
|
+ .set(CareEventOrderContactStatus::getStatus,status);
|
|
|
|
+ return this.careEventOrderContactStatusService.update(updateWrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取通话结果
|
|
|
|
+ * @param hisId
|
|
|
|
+ */
|
|
|
|
+ public CcCallResultVO getCallRadio(Long hisId){
|
|
|
|
+ CareEventOrderHandleHis his = this.careEventOrderHandleHisService.getById(hisId);
|
|
|
|
+ if (his.getCallResultId()!= null){
|
|
|
|
+ return this.ccCallResultService.getCallResult(his.getCallResultId());
|
|
|
|
+ }else {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * 将老人加入到 工单联系人
|
|
|
|
+ * @param order
|
|
|
|
+ * @param orderContactList
|
|
|
|
+ */
|
|
|
|
+ private void addOlderToOrderContact(CareEventOrder order,List<CareEventOrderContactStatus> orderContactList){
|
|
|
|
+ CareOlder older = this.careOlderService.getById(order.getOlderId());
|
|
|
|
+ CareEventOrderContactStatus orderContactStatus = new CareEventOrderContactStatus();
|
|
|
|
+ orderContactStatus.setOrgId(order.getOrgId());
|
|
|
|
+ orderContactStatus.setStationId(order.getStationId());
|
|
|
|
+ orderContactStatus.setOrderId(order.getId());
|
|
|
|
+ orderContactStatus.setContactRole(UserRoleEnum.OLDER.getValue());
|
|
|
|
+ orderContactStatus.setContactId(older.getId());
|
|
|
|
+ orderContactStatus.setStatus(ContactorStatusEnum.WEI_LIAN_XI.getValue());
|
|
|
|
+ orderContactStatus.setContactName(older.getName());
|
|
|
|
+ orderContactStatus.setContactPhone(older.getPhone());
|
|
|
|
+ orderContactStatus.setLongitude(older.getLongitude());
|
|
|
|
+ orderContactStatus.setLatitude(older.getLatitude());
|
|
|
|
+ orderContactStatus.setCreateTime(DateUtil.date());
|
|
|
|
+ orderContactStatus.setModifyTime(DateUtil.date());
|
|
|
|
+ orderContactStatus.setRelationTypeDesc(RelationTypeEnum.OLDER.getValue());
|
|
|
|
+ orderContactList.add(orderContactStatus);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 将管家加入到联系人当中
|
|
|
|
+ * @param order
|
|
|
|
+ * @param orderContactList
|
|
|
|
+ */
|
|
|
|
+ private void addChamberlainToOrderContact(CareEventOrder order,List<CareEventOrderContactStatus> orderContactList){
|
|
|
|
+ CareSysUser user = careChamberlainOlderRelService.getMainChamberlainByOlderId(order.getOlderId());
|
|
|
|
+ if (user != null){
|
|
|
|
+ CareEventOrderContactStatus orderContactStatus = new CareEventOrderContactStatus();
|
|
|
|
+ orderContactStatus.setOrgId(order.getOrgId());
|
|
|
|
+ orderContactStatus.setStationId(order.getStationId());
|
|
|
|
+ orderContactStatus.setOrderId(order.getId());
|
|
|
|
+ orderContactStatus.setContactRole(UserRoleEnum.CHANMB.getValue());
|
|
|
|
+ orderContactStatus.setContactId(user.getId());
|
|
|
|
+ orderContactStatus.setStatus(ContactorStatusEnum.WEI_LIAN_XI.getValue());
|
|
|
|
+ orderContactStatus.setContactName(user.getName());
|
|
|
|
+ orderContactStatus.setContactPhone(user.getPhone());
|
|
|
|
+ orderContactStatus.setLongitude(user.getLongitude());
|
|
|
|
+ orderContactStatus.setLatitude(user.getLatitude());
|
|
|
|
+ orderContactStatus.setCreateTime(DateUtil.date());
|
|
|
|
+ orderContactStatus.setModifyTime(DateUtil.date());
|
|
|
|
+ orderContactStatus.setRelationTypeDesc(RelationTypeEnum.CHANMB.getValue());
|
|
|
|
+ orderContactList.add(orderContactStatus);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 将紧急联系人加入到联系人当中
|
|
|
|
+ * @param order
|
|
|
|
+ * @param orderContactList
|
|
|
|
+ */
|
|
|
|
+ private void addContactToOrderContact(CareEventOrder order,List<CareEventOrderContactStatus> orderContactList){
|
|
|
|
+ List<CareOlderContact> cons = this.careOlderContactService.queryContactByOlderId(order.getOlderId());
|
|
|
|
+ if (CollUtil.isNotEmpty(cons)){
|
|
|
|
+ cons.forEach(item ->{
|
|
|
|
+ CareEventOrderContactStatus orderContactStatus = new CareEventOrderContactStatus();
|
|
|
|
+ orderContactStatus.setOrgId(order.getOrgId());
|
|
|
|
+ orderContactStatus.setStationId(order.getStationId());
|
|
|
|
+ orderContactStatus.setOrderId(order.getId());
|
|
|
|
+ orderContactStatus.setContactRole(UserRoleEnum.CONTACT.getValue());
|
|
|
|
+ orderContactStatus.setContactId(item.getId());
|
|
|
|
+ orderContactStatus.setStatus(ContactorStatusEnum.WEI_LIAN_XI.getValue());
|
|
|
|
+ orderContactStatus.setContactName(item.getName());
|
|
|
|
+ orderContactStatus.setContactPhone(item.getPhone());
|
|
|
|
+ orderContactStatus.setLongitude(item.getLongitude());
|
|
|
|
+ orderContactStatus.setLatitude(item.getLatitude());
|
|
|
|
+ orderContactStatus.setRelationTypeDesc(RelationTypeEnum.getCodeToName(item.getRelationType()));
|
|
|
|
+ orderContactStatus.setContactLevel(item.getContactLevel());
|
|
|
|
+ orderContactStatus.setCreateTime(DateUtil.date());
|
|
|
|
+ orderContactStatus.setModifyTime(DateUtil.date());
|
|
|
|
+ orderContactList.add(orderContactStatus);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|