Commit 75837ed7 authored by tianbo's avatar tianbo

96333修改提交

parent bf071e1e
package com.yeejoin.amos.boot.module.elevator.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 96333坐席信息
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "CtiUserDto", description = "坐席信息")
public class CtiUserDto {
@ApiModelProperty(value = "坐席对应主叫号码")
private String callerNo;
}
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.elevator.api.service; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.elevator.api.service;
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.module.elevator.api.dto.CtiUserDto;
import java.util.Map; import java.util.Map;
...@@ -48,5 +49,5 @@ public interface ICtiService { ...@@ -48,5 +49,5 @@ public interface ICtiService {
/** /**
* 根据坐席配置获取主叫号码 * 根据坐席配置获取主叫号码
*/ */
String getCallPhone(); CtiUserDto getCallPhone(String userId);
} }
...@@ -2,10 +2,13 @@ package com.yeejoin.amos.boot.module.elevator.biz.controller; ...@@ -2,10 +2,13 @@ package com.yeejoin.amos.boot.module.elevator.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.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
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.elevator.api.dto.CtiDto; import com.yeejoin.amos.boot.module.elevator.api.dto.CtiDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.CtiUserDto;
import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService; import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
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;
...@@ -110,8 +113,9 @@ public class CtiController extends BaseController { ...@@ -110,8 +113,9 @@ public class CtiController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/callPhone") @GetMapping(value = "/callPhone")
@ApiOperation(httpMethod = "GET", value = "获取坐席技能组对应主叫号码信息", notes = "获取坐席技能组对应主叫号码信息") @ApiOperation(httpMethod = "GET", value = "获取坐席技能组对应主叫号码信息", notes = "获取坐席技能组对应主叫号码信息")
public ResponseModel<String> getCallPhone() { public ResponseModel<CtiUserDto> getCallPhone() {
String callPhone = ctiService.getCallPhone(); ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(callPhone); AgencyUserModel loginUserModel = reginParams.getUserModel();
return ResponseHelper.buildResponse(ctiService.getCallPhone(loginUserModel.getUserId()));
} }
} }
...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.enums.DictTypeEnum; ...@@ -9,6 +9,7 @@ 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.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.elevator.api.dto.CtiUserDto;
import com.yeejoin.amos.boot.module.elevator.api.entity.TzsCitInfo; import com.yeejoin.amos.boot.module.elevator.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService; import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService;
import com.yeejoin.amos.boot.module.elevator.biz.utils.HttpUtils; import com.yeejoin.amos.boot.module.elevator.biz.utils.HttpUtils;
...@@ -236,16 +237,20 @@ public class CtiServiceImpl implements ICtiService { ...@@ -236,16 +237,20 @@ public class CtiServiceImpl implements ICtiService {
} }
@Override @Override
public String getCallPhone() { public CtiUserDto getCallPhone(String userId) {
CtiUserDto ctiUserDto = new CtiUserDto();
if (ValidationUtil.isEmpty(userId)) {
return ctiUserDto;
}
AgencyUserModel me = Privilege.agencyUserClient.getme().getResult(); AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzsCitInfo::getCtiUserId,me.getUserId()); wrapper.eq(TzsCitInfo::getCtiUserId, userId);
TzsCitInfo ctiInfo = ctiInfoService.getOne(wrapper); TzsCitInfo ctiInfo = ctiInfoService.getOne(wrapper);
if (!ValidationUtil.isEmpty(ctiInfo)) { if (!ValidationUtil.isEmpty(ctiInfo)) {
String groupCode = ctiInfo.getGid().split(",")[0]; String groupCode = ctiInfo.getGid().split(",")[0];
DataDictionary dataDictionary = dictionaryService.getByCode(groupCode, DictTypeEnum.坐席技能组.getType()); DataDictionary dataDictionary = dictionaryService.getByCode(groupCode, DictTypeEnum.坐席技能组.getType());
return dataDictionary.getName(); ctiUserDto.setCallerNo(dataDictionary.getName());
} }
return ""; return ctiUserDto;
} }
} }
\ No newline at end of file
...@@ -218,9 +218,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc ...@@ -218,9 +218,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
String trappedFloorNum = dynamicParms.get("trapped_floor_num") == null ? "" : dynamicParms.get("trapped_floor_num"); String trappedFloorNum = dynamicParms.get("trapped_floor_num") == null ? "" : dynamicParms.get("trapped_floor_num");
String isLight = dynamicParms.get("is_light") == null ? "" : dynamicParms.get("is_light"); String isLight = dynamicParms.get("is_light") == null ? "" : dynamicParms.get("is_light");
String trappedTime = dynamicParms.get("trapped_time") == null ? "" : dynamicParms.get("trapped_time"); String trappedTime = dynamicParms.get("trapped_time") == null ? "" : dynamicParms.get("trapped_time");
content = content.replace("$trapped_num",trappedNum).replace("$trapped_floor_num",trappedFloorNum); String injuredNum = dynamicParms.get("injured_num") == null ? "" : dynamicParms.get("injured_num");
content = content.replace("$emergency_call",emergencyCall).replace("$contact_phone",contactPhone); String dieNum = dynamicParms.get("die_num") == null ? "" : dynamicParms.get("die_num");
content = content.replace("$is_light",isLight).replace("$trapped_time",trappedTime); String hasInjury = Integer.parseInt(injuredNum) + Integer.parseInt(dieNum) > 0 ? "有" : "无";
content = content.replace("$trapped_num",trappedNum).replace("$trapped_floor_num", trappedFloorNum);
content = content.replace("$emergency_call",emergencyCall).replace("$contact_phone", contactPhone);
content = content.replace("$is_light", isLight).replace("$trapped_time", trappedTime);
content = content.replace("$hasInjury", hasInjury);
break; break;
case "GZWX" : // 故障维修 case "GZWX" : // 故障维修
dispatchTaskDto.setIsSaveTask(false); dispatchTaskDto.setIsSaveTask(false);
......
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