|
|
|
@ -53,14 +53,12 @@ public class TelephoneCallController {
|
|
|
|
|
public CommonResponse<TelephoneCallStopDTO> doubleCallReq(@Validated @RequestBody TelephoneCallReqDTO telephoneCallReqDTO) {
|
|
|
|
|
int hour = DateUtil.hour(DateUtil.date(), true);
|
|
|
|
|
if (hour < DefaultNumberConstants.EIGHT_NUMBER || hour >= DefaultNumberConstants.TWENTY_ONE) {
|
|
|
|
|
CommonLog.error("请在8点-21点之间拨打电话");
|
|
|
|
|
return CommonResponse.createByErrorMessage("请在8点-21点之间拨打电话");
|
|
|
|
|
}
|
|
|
|
|
//判断账号是否到期
|
|
|
|
|
Date expirationTime = userService.findExpirationTimeByUserId(SecurityUtils.getCurrentUserId());
|
|
|
|
|
if (ObjectUtil.isNull(expirationTime)
|
|
|
|
|
|| DateUtil.compare(expirationTime, DateUtil.date()) < DefaultNumberConstants.ZERO_NUMBER) {
|
|
|
|
|
CommonLog.error("您的账号已到期,请联系管理员");
|
|
|
|
|
return CommonResponse.createByErrorMessage("您的账号已到期,请联系管理员");
|
|
|
|
|
}
|
|
|
|
|
Long companyId = SecurityUtils.getCompanyId();
|
|
|
|
@ -73,11 +71,9 @@ public class TelephoneCallController {
|
|
|
|
|
}
|
|
|
|
|
Company company = companyService.findById(companyId);
|
|
|
|
|
if (ObjectUtil.isNull(organize) || ObjectUtil.isNull(company)) {
|
|
|
|
|
CommonLog.error("缺失小组信息或公司信息");
|
|
|
|
|
return CommonResponse.createByErrorMessage("缺失小组信息或公司信息");
|
|
|
|
|
}
|
|
|
|
|
if (organize.getCallMode() == null) {
|
|
|
|
|
CommonLog.error("请指定呼叫方式后使用");
|
|
|
|
|
return CommonResponse.createByErrorMessage("请指定呼叫方式后使用");
|
|
|
|
|
}
|
|
|
|
|
//呼叫方式:0:双呼 1:点呼 2:AXB
|
|
|
|
@ -151,7 +147,7 @@ public class TelephoneCallController {
|
|
|
|
|
}
|
|
|
|
|
telephoneCallService.rollCallBack(rollCallBackDTO);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("点呼回调话单错误 参数 :{},错误:{}", json, e.getMessage());
|
|
|
|
|
CommonLog.error("点呼回调话单错误:" + json);
|
|
|
|
|
return CommonResponse.createByError();
|
|
|
|
|
}
|
|
|
|
|
return CommonResponse.createBySuccess();
|
|
|
|
|