|
@ -2,6 +2,7 @@ package com.yihu.wlyy.controller.synergy.customer;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.controller.BaseController;
|
|
import com.yihu.wlyy.controller.BaseController;
|
|
|
import com.yihu.wlyy.service.synergy.QuestionnaireManageService;
|
|
import com.yihu.wlyy.service.synergy.QuestionnaireManageService;
|
|
|
|
|
import com.yihu.wlyy.service.synergy.SynergyManageService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -22,19 +23,19 @@ public class CustomerQuestionnaireController extends BaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private QuestionnaireManageService questionnaireService;
|
|
private QuestionnaireManageService questionnaireService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SynergyManageService synergyManageService;
|
|
|
|
|
|
|
|
@RequestMapping(value = "saveAnswer", method = RequestMethod.POST)
|
|
@RequestMapping(value = "saveAnswer", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "保存用户答案")
|
|
@ApiOperation(value = "保存用户答案")
|
|
|
public String saveAnswer( @ApiParam(value = "问卷题目及选项")@RequestParam String jsonData,
|
|
|
|
|
@ApiParam(value = "客服code")@RequestParam(value = "customerCode")String customerCode,
|
|
|
|
|
@ApiParam(value = "居民code")@RequestParam(value = "patientCode")String patientCode,
|
|
|
|
|
@ApiParam(value = "问卷标签")@RequestParam(value = "labelType")Integer labelType,
|
|
|
|
|
@ApiParam(value = "筛查入口(labelType=5时要填),0是第一次筛查 1是再次评估", defaultValue = "1")@RequestParam(value = "isAgain")int isAgain,
|
|
|
|
|
@ApiParam(value = "来源(1医生发放 2居民自我评估)")@RequestParam(value = "source")int source,
|
|
|
|
|
@ApiParam(value = "协同工单服务对象表code")@RequestParam(value = "source")String serviceCode) {
|
|
|
|
|
|
|
public String saveAnswer( @ApiParam(value = "问卷题目及选项", required = true)@RequestParam String jsonData,
|
|
|
|
|
@ApiParam(value = "客服code", required = true)@RequestParam(value = "customerCode")String customerCode,
|
|
|
|
|
@ApiParam(value = "居民code", required = true)@RequestParam(value = "patientCode")String patientCode,
|
|
|
|
|
@ApiParam(value = "问卷标签", required = false)@RequestParam(value = "labelType")Integer labelType,
|
|
|
|
|
@ApiParam(value = "来源(1医生发放 2居民自我评估)", required = false, defaultValue = "1")@RequestParam(value = "source")Integer source,
|
|
|
|
|
@ApiParam(value = "协同工单服务对象表code", required = true)@RequestParam(value = "serviceCode")String serviceCode) {
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
return write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, isAgain, source,jsonData, serviceCode));
|
|
|
|
|
|
|
return write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, source,jsonData, serviceCode));
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
return write(-1, "保存失败!");
|
|
return write(-1, "保存失败!");
|
|
@ -43,7 +44,7 @@ public class CustomerQuestionnaireController extends BaseController {
|
|
|
|
|
|
|
|
@RequestMapping(value = "getAnswers", method = RequestMethod.GET)
|
|
@RequestMapping(value = "getAnswers", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "查看调查统计结果")
|
|
@ApiOperation(value = "查看调查统计结果")
|
|
|
public String getAnswers(@ApiParam(value = "问卷code") @RequestParam String templateCode) {
|
|
|
|
|
|
|
public String getAnswers(@ApiParam(value = "问卷code", required = true) @RequestParam String templateCode) {
|
|
|
try {
|
|
try {
|
|
|
return write(200, "查询成功!", "data", questionnaireService.getAnswers(templateCode));
|
|
return write(200, "查询成功!", "data", questionnaireService.getAnswers(templateCode));
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@ -73,4 +74,30 @@ public class CustomerQuestionnaireController extends BaseController {
|
|
|
return write(-1, "查询失败!");
|
|
return write(-1, "查询失败!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "isNotException", method = RequestMethod.POST)
|
|
|
|
|
@ApiOperation(value = "判断是否异常通话")
|
|
|
|
|
public String isNotException(@ApiParam(value = "协同服务工单code") @RequestParam String workorderCode,
|
|
|
|
|
@ApiParam(value = "客服code") @RequestParam String customerCode) {
|
|
|
|
|
try {
|
|
|
|
|
//判断是否有异常中断
|
|
|
|
|
Integer count = synergyManageService.findExceptionCount(workorderCode, customerCode);
|
|
|
|
|
return write(200, "查询成功!", "data", count);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return write(-1, "查询失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "loadingInfo", method = RequestMethod.GET)
|
|
|
|
|
@ApiOperation(value = "载入异常工单信息")
|
|
|
|
|
public String loadingInfo(@ApiParam(value = "协同服务工单code") @RequestParam String workorderCode,
|
|
|
|
|
@ApiParam(value = "客服code") @RequestParam String customerCode) {
|
|
|
|
|
try {
|
|
|
|
|
return write(200, "查询成功!", "data", synergyManageService.loadingInfo(workorderCode, customerCode));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return write(-1, "查询失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
}
|
|
}
|