Commit 4706c258 authored by tianbo's avatar tianbo

96333主叫号码根据坐席配置来获取

parent 53a46a65
package com.yeejoin.amos.boot.biz.common.enums;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public enum DictTypeEnum {
坐席技能组("ZXJNZ","坐席技能组");
private String type;//字典类型
private String desc;//描述
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
...@@ -44,4 +44,9 @@ public interface ICtiService { ...@@ -44,4 +44,9 @@ public interface ICtiService {
* @return * @return
*/ */
Map<Object, Object> getUserStatus(); Map<Object, Object> getUserStatus();
/**
* 根据坐席配置获取主叫号码
*/
String getCallPhone();
} }
...@@ -3,12 +3,9 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller; ...@@ -3,12 +3,9 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.tzs.api.dto.CtiDto; import com.yeejoin.amos.boot.module.tzs.api.dto.CtiDto;
import com.yeejoin.amos.boot.module.tzs.api.service.ICtiService; import com.yeejoin.amos.boot.module.tzs.api.service.ICtiService;
import com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -25,11 +22,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -25,11 +22,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.security.MessageDigest;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
...@@ -109,5 +102,16 @@ public class CtiController extends BaseController { ...@@ -109,5 +102,16 @@ public class CtiController extends BaseController {
return ResponseHelper.buildResponse(recordInfo); return ResponseHelper.buildResponse(recordInfo);
} }
/**
* 获取坐席技能组对应主叫号码信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/callPhone")
@ApiOperation(httpMethod = "GET", value = "获取坐席技能组对应主叫号码信息", notes = "获取坐席技能组对应主叫号码信息")
public ResponseModel<String> getCallPhone() {
String callPhone = ctiService.getCallPhone();
return ResponseHelper.buildResponse(callPhone);
}
} }
...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.enums.DictTypeEnum;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo; import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo;
...@@ -40,6 +43,9 @@ public class CtiServiceImpl implements ICtiService { ...@@ -40,6 +43,9 @@ public class CtiServiceImpl implements ICtiService {
@Autowired @Autowired
TzsCitInfoServiceImpl ctiInfoService; TzsCitInfoServiceImpl ctiInfoService;
@Autowired
DataDictionaryServiceImpl dictionaryService;
/** /**
* token 过期时间, cti 系统为7200 ,tzs 系统小于7200 防止获取到无效token * token 过期时间, cti 系统为7200 ,tzs 系统小于7200 防止获取到无效token
*/ */
...@@ -229,8 +235,17 @@ public class CtiServiceImpl implements ICtiService { ...@@ -229,8 +235,17 @@ public class CtiServiceImpl implements ICtiService {
return encryptStr; return encryptStr;
} }
@Override
public String getCallPhone() {
AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzsCitInfo::getCtiUserId,me.getUserId());
TzsCitInfo ctiInfo = ctiInfoService.getOne(wrapper);
if (!ValidationUtil.isEmpty(ctiInfo)) {
String groupCode = ctiInfo.getGid().split(",")[0];
DataDictionary dataDictionary = dictionaryService.getByCode(groupCode, DictTypeEnum.坐席技能组.getType());
return dataDictionary.getName();
}
return "";
}
} }
\ No newline at end of file
...@@ -188,7 +188,7 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc ...@@ -188,7 +188,7 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
if (!ValidationUtil.isEmpty(elevator.getUseSiteCategory())) { if (!ValidationUtil.isEmpty(elevator.getUseSiteCategory())) {
String categoryCode = elevator.getUseSiteCategory(); String categoryCode = elevator.getUseSiteCategory();
DataDictionary categoryDict = iDataDictionaryService.getByCode(categoryCode, "USE_SITE_CATEGORY"); DataDictionary categoryDict = iDataDictionaryService.getByCode(categoryCode, "USE_SITE_CATEGORY");
useSiteCategory = categoryDict.getName(); useSiteCategory = ValidationUtil.isEmpty(categoryDict) ? "" : categoryDict.getName();
} }
String useUnit = elevator.getUseUnit(); String useUnit = elevator.getUseUnit();
content = content.replace("$call_time",createTime).replace("$address",address).replace("$rescue_code",rescueCode).replace("$use_site_category",useSiteCategory); content = content.replace("$call_time",createTime).replace("$address",address).replace("$rescue_code",rescueCode).replace("$use_site_category",useSiteCategory);
......
...@@ -33,7 +33,6 @@ import com.yeejoin.amos.feign.systemctl.Systemctl; ...@@ -33,7 +33,6 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import liquibase.pro.packaged.O;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment