|
@@ -5,16 +5,20 @@ import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
|
|
+import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.fs.common.utils.SecurityUtils;
|
|
|
import com.fs.company.domain.CompanyVoiceRoboticCallLogCallphone;
|
|
import com.fs.company.domain.CompanyVoiceRoboticCallLogCallphone;
|
|
|
import com.fs.company.service.ICompanyVoiceRoboticCallLogCallphoneService;
|
|
import com.fs.company.service.ICompanyVoiceRoboticCallLogCallphoneService;
|
|
|
|
|
+import com.fs.crm.domain.CrmCustomer;
|
|
|
|
|
+import com.fs.crm.service.ICrmCustomerService;
|
|
|
import com.fs.company.vo.CompanyVoiceRoboticCallLogCallPhoneVO;
|
|
import com.fs.company.vo.CompanyVoiceRoboticCallLogCallPhoneVO;
|
|
|
import com.fs.company.vo.CompanyVoiceRoboticCallLogCount;
|
|
import com.fs.company.vo.CompanyVoiceRoboticCallLogCount;
|
|
|
|
|
+import com.fs.framework.security.LoginUser;
|
|
|
|
|
+import com.fs.framework.service.TokenService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -32,6 +36,10 @@ public class CompanyVoiceRoboticCallLogCallphoneController extends BaseControlle
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICompanyVoiceRoboticCallLogCallphoneService companyVoiceRoboticCallLogCallphoneService;
|
|
private ICompanyVoiceRoboticCallLogCallphoneService companyVoiceRoboticCallLogCallphoneService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ICrmCustomerService crmCustomerService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TokenService tokenService;
|
|
|
/**
|
|
/**
|
|
|
* 查询调用日志_ai打电话列表
|
|
* 查询调用日志_ai打电话列表
|
|
|
*/
|
|
*/
|
|
@@ -91,6 +99,59 @@ public class CompanyVoiceRoboticCallLogCallphoneController extends BaseControlle
|
|
|
return AjaxResult.success(companyVoiceRoboticCallLogCount);
|
|
return AjaxResult.success(companyVoiceRoboticCallLogCount);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询转人工接听记录列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('company:handleManualAnswered:query')")
|
|
|
|
|
+ @GetMapping("/manualAnsweredList")
|
|
|
|
|
+ public TableDataInfo manualAnsweredList(CompanyVoiceRoboticCallLogCallphone companyVoiceRoboticCallLogCallphone)
|
|
|
|
|
+ {
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ companyVoiceRoboticCallLogCallphone.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
|
|
+ companyVoiceRoboticCallLogCallphone.setManualAnswered(1);
|
|
|
|
|
+ startPage();
|
|
|
|
|
+ List<CompanyVoiceRoboticCallLogCallphone> list = companyVoiceRoboticCallLogCallphoneService.selectManualAnsweredList(companyVoiceRoboticCallLogCallphone);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据外呼记录ID查询CRM客户信息(处理数据弹窗用)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('company:handleManualAnswered:handle')")
|
|
|
|
|
+ @GetMapping("/getCrmCustomerByLogId")
|
|
|
|
|
+ public AjaxResult getCrmCustomerByLogId(@RequestParam("callphoneLogId") Long callphoneLogId)
|
|
|
|
|
+ {
|
|
|
|
|
+ CrmCustomer crmCustomer = crmCustomerService.selectCrmCustomerByCallphoneLogId(callphoneLogId);
|
|
|
|
|
+ return AjaxResult.success(crmCustomer);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 确认信息(仅标记外呼记录为已处理,不更新客户信息)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('company:handleManualAnswered:handle')")
|
|
|
|
|
+ @Log(title = "转人工接听确认信息", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PostMapping("/confirmManualAnswered")
|
|
|
|
|
+ public AjaxResult confirmManualAnswered(@RequestBody CompanyVoiceRoboticCallLogCallphone param)
|
|
|
|
|
+ {
|
|
|
|
|
+ return toAjax(companyVoiceRoboticCallLogCallphoneService.markHandleFlag(param.getLogId()));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理数据(标记外呼记录为已处理 + 更新CRM客户信息)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('company:handleManualAnswered:handle')")
|
|
|
|
|
+ @Log(title = "转人工接听处理数据", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @PostMapping("/submitManualAnswered")
|
|
|
|
|
+ public AjaxResult submitManualAnswered(@RequestBody CrmCustomer param)
|
|
|
|
|
+ {
|
|
|
|
|
+ // 1. 标记外呼记录为已处理
|
|
|
|
|
+ if (param.getLastEffectiveCallphoneLogId() != null) {
|
|
|
|
|
+ companyVoiceRoboticCallLogCallphoneService.markHandleFlag(param.getLastEffectiveCallphoneLogId());
|
|
|
|
|
+ }
|
|
|
|
|
+ // 2. 更新CRM客户信息
|
|
|
|
|
+ return toAjax(crmCustomerService.updateCrmCustomer(param));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 导出调用日志_ai打电话列表
|
|
* 导出调用日志_ai打电话列表
|
|
|
*/
|
|
*/
|