Commit eeb7be0d authored by 龚小红's avatar 龚小红

Merge branch 'Feature/20221108/inviterTask' into 'master'

Feature/20221108/inviter task

See merge request !44
parents 573e21ec fc104167
...@@ -212,13 +212,13 @@ public class Work implements Authorization { ...@@ -212,13 +212,13 @@ public class Work implements Authorization {
int allCallTime= response.jsonPath().getInt("data.allCallTime"); int allCallTime= response.jsonPath().getInt("data.allCallTime");
int callTimes= response.jsonPath().getInt("data.callTimes"); int callTimes= response.jsonPath().getInt("data.callTimes");
int custStar= response.jsonPath().getInt("data.custStar"); int custStar= response.jsonPath().getInt("data.custStar");
int addWxStatus= response.jsonPath().getInt("data.custStar"); int addWxStatus= response.jsonPath().getInt("data.addWxStatus");
String custHead= response.jsonPath().getString("data.custHead"); String custHead= response.jsonPath().getString("data.custHead");
String custDescription= response.jsonPath().getString("data.custDescription"); String custDescription= response.jsonPath().getString("data.custDescription");
String expertRemark= response.jsonPath().getString("data.expertRemark"); String expertRemark= response.jsonPath().getString("data.expertRemark");
Assert.assertEquals(allCallTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString())); Assert.assertEquals(allCallTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总call次数非0",response.body().asString()));
Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"新客户总call次数非0",response.body().asString())); Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"新客户总通话时间非0",response.body().asString()));
Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话时间非0",response.body().asString())); Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_header,"新客户星标不为否",response.body().asString())); Assert.assertEquals(custStar,0,network.message(params,BasicConfig.WORK_header,"新客户星标不为否",response.body().asString()));
Assert.assertEquals(addWxStatus,0,network.message(params,BasicConfig.WORK_header,"新客户的加微状态不是未添加",response.body().asString())); Assert.assertEquals(addWxStatus,0,network.message(params,BasicConfig.WORK_header,"新客户的加微状态不是未添加",response.body().asString()));
Assert.assertEquals(custHead,"https://yun.kjjcrm.com/kjy/media/file/20221018/c9c37c521ddfd949614f1b78b92a1001.png?x-oss-process=image/quality,q_80",network.message(params,BasicConfig.WORK_header,"新客户头像非默认头像",response.body().asString())); Assert.assertEquals(custHead,"https://yun.kjjcrm.com/kjy/media/file/20221018/c9c37c521ddfd949614f1b78b92a1001.png?x-oss-process=image/quality,q_80",network.message(params,BasicConfig.WORK_header,"新客户头像非默认头像",response.body().asString()));
...@@ -1482,10 +1482,10 @@ public class Work implements Authorization { ...@@ -1482,10 +1482,10 @@ public class Work implements Authorization {
public void 邀约完成任务(){ public void 邀约完成任务(){
otoInviterAuth(); otoInviterAuth();
//notDeal -未接通,dealing-已接通 //notDeal -未接通,dealing-已接通
callling("15136361301","notDeal"); callling("15136361301",0,"notDeal");
callling("15136361301","notDeal"); callling("15136361301",0,"notDeal");
callling("15136361302","notDeal"); callling("15136361302",0,"notDeal");
callling("15136361303","dealing"); callling("15136361303",30,"dealing");
//销售完成面访,跟进时间更新,联系新客户任务完成 //销售完成面访,跟进时间更新,联系新客户任务完成
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
params.put("taskConfId",7); //任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户 params.put("taskConfId",7); //任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
...@@ -1496,6 +1496,48 @@ public class Work implements Authorization { ...@@ -1496,6 +1496,48 @@ public class Work implements Authorization {
Assert.assertEquals(finishCustNum,2,network.message(params,BasicConfig.WORK_taskList,"已完成数量记录错误",response.body().asString())); Assert.assertEquals(finishCustNum,2,network.message(params,BasicConfig.WORK_taskList,"已完成数量记录错误",response.body().asString()));
} }
@Test(description = "校验通话后显示回填弹窗",priority = 106)
public void 校验通话后显示回填弹窗(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
Response response = network.getResponse(params,BasicConfig.WORK_showFeedback);
boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_showFeedback,"电话表单回填状态错误:为不需要回填",response.body().asString()));
params.put("custId", custId+2);
response = network.getResponse(params,BasicConfig.WORK_showFeedback);
data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_showFeedback,"电话表单回填状态错误:为不需要回填",response.body().asString()));
}
@Test(description = "校验邀约的通话信息",priority = 107)
public void 校验邀约的通话信息(){
HashMap<String,Object> params = new HashMap<>();
params.put("custId", custId);
params.put("type", 1);
Response response = network.getResponse(params,BasicConfig.WORK_header);
int allCallTimes= response.jsonPath().getInt("data.allCallTimes");
int allCallTime= response.jsonPath().getInt("data.allCallTime");
int callTimes= response.jsonPath().getInt("data.callTimes");
String lastCallTime= response.jsonPath().getString("data.lastCallTime");
Assert.assertEquals(allCallTimes,2,network.message(params,BasicConfig.WORK_header,"新客户总call次数非0",response.body().asString()));
Assert.assertEquals(allCallTime,0,network.message(params,BasicConfig.WORK_header,"新客户总通话时间非0",response.body().asString()));
Assert.assertEquals(callTimes,0,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
Assert.assertNull(lastCallTime,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
params.put("custId", custId+2);
params.put("type", 1);
response = network.getResponse(params,BasicConfig.WORK_header);
allCallTimes= response.jsonPath().getInt("data.allCallTimes");
allCallTime= response.jsonPath().getInt("data.allCallTime");
callTimes= response.jsonPath().getInt("data.callTimes");
lastCallTime= response.jsonPath().getString("data.lastCallTime");
Assert.assertEquals(allCallTimes,1,network.message(params,BasicConfig.WORK_header,"新客户总call次数非0",response.body().asString()));
Assert.assertEquals(allCallTime,30,network.message(params,BasicConfig.WORK_header,"新客户总通话时间非0",response.body().asString()));
Assert.assertEquals(callTimes,1,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
Assert.assertNotNull(lastCallTime,network.message(params,BasicConfig.WORK_header,"新客户总通话次数非0",response.body().asString()));
}
//修改客户的约面情况 //修改客户的约面情况
public void updateInvite(int interviewFlag,long time){ public void updateInvite(int interviewFlag,long time){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
...@@ -1662,9 +1704,9 @@ public class Work implements Authorization { ...@@ -1662,9 +1704,9 @@ public class Work implements Authorization {
} }
} }
public void callling(String custPhone,String callState){ public void callling(String custPhone,int length,String callState){
//销售完成面访,跟进时间更新,联系新客户任务完成 //销售完成面访,跟进时间更新,联系新客户任务完成
String CALL_URL = CALL_BACK_1 + custPhone + CALL_BACK_2 + callState + CALL_BACK_3; String CALL_URL = CALL_BACK_1 + custPhone + CALL_BACK_2 + length +"&State=" +callState + CALL_BACK_3;
Response response = network.getResponse(CALL_URL); Response response = network.getResponse(CALL_URL);
} }
......
...@@ -256,7 +256,7 @@ public class BasicConfig { ...@@ -256,7 +256,7 @@ public class BasicConfig {
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust"; public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord"; public static final String WORK_delPubFormRecord = WORK_HOST + "/kjy/oto/auto/test/delPubFormRecord";
public static final String CALL_BACK_1 = WORK_HOST + "/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo=18248405155&CalledNo="; public static final String CALL_BACK_1 = WORK_HOST + "/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo=18248405155&CalledNo=";
public static final String CALL_BACK_2 = "&Ring=2022-11-07%2013:57:06&RingingTime=&Begin=2022-11-07%2013:57:14&End=2022-11-07%2013:57:28&CallTimeLength=0&State="; public static final String CALL_BACK_2 = "&Ring=2022-11-07%2013:57:06&RingingTime=&Begin=2022-11-07%2013:57:14&End=2022-11-07%2013:57:28&CallTimeLength=";
public static final String CALL_BACK_3 = "&MonitorFilename=http://work-phone-record.oss-cn-beijing.aliyuncs.com/20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&RecordFile=20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&FileServer=http://work-phone-record.oss-cn-beijing.aliyuncs.com/&ring=2022-11-07%2013:57:06"; public static final String CALL_BACK_3 = "&MonitorFilename=http://work-phone-record.oss-cn-beijing.aliyuncs.com/20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&RecordFile=20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&FileServer=http://work-phone-record.oss-cn-beijing.aliyuncs.com/&ring=2022-11-07%2013:57:06";
//*************** 人管系统 *************** //*************** 人管系统 ***************
......
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