Browse Source

客服系統

trick9191 7 years ago
parent
commit
c265e15050

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/CustomerController.java

@ -292,7 +292,7 @@ public class CustomerController extends BaseController {
    @RequestMapping(value = "/saveCallService", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "保存协同服务")
    public String saveCallService(@ApiParam(name="type",value="协同服务json串")@RequestParam(required = true)String callServiceJson){
    public String saveCallService(@ApiParam(name="callServiceJson",value="协同服务json串")@RequestParam(required = true)String callServiceJson){
        try {
            return write(200,"保存成功","data",customerService.saveCallService( callServiceJson,getUID()));
        }catch (Exception e){

+ 3 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -278,7 +278,8 @@ public class CustomerService extends BaseService{
				" r.answer_status AS answerStatus, " +
				" r.service_type AS serviceType, " +
				" r.user_name AS userName, " +
				" r.user_code AS userCode " +
				" r.user_code AS userCode," +
				" r.code" +
				" FROM " +
				" manage_call_record r " +
				" WHERE " +
@ -438,7 +439,7 @@ public class CustomerService extends BaseService{
		if(adminTeamCode!=null){
			sql +=" AND s.admin_team_code ="+adminTeamCode ;
		}
		sql += " LIMIT "+(page-1)*size+","+size +" ORDER BY r.create_time DESC";
		sql += "  ORDER BY s.create_time DESC LIMIT "+(page-1)*size+","+size ;
		List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);

+ 19 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java

@ -57,7 +57,7 @@ public class CustomerService extends BaseService{
			sql +=" AND s.state ='"+state+"'";
		}
		if(StringUtils.isNotBlank(patientName)){
			sql +=" AND s.patient_name ='"+patientName+"'" ;
			sql +=" AND s.patient_name LIKE '%"+patientName+"%'" ;
		}
		if(StringUtils.isNotBlank(ssc)){
			sql +=" AND s.ssc ='"+ssc+"'" ;
@ -80,7 +80,7 @@ public class CustomerService extends BaseService{
		if(adminTeamCode!=null){
			sql +=" AND s.admin_team_code ="+adminTeamCode ;
		}
		sql += " LIMIT "+(page-1)*size+","+size +" ORDER BY r.create_time DESC";
		sql += " ORDER BY s.create_time DESC LIMIT "+(page-1)*size+","+size +" ";
		List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
@ -125,16 +125,28 @@ public class CustomerService extends BaseService{
	 * @param orderHospital
     * @return
     */
	public String dealAppointCallService(String type ,String code,String dealReason, String orderHospital,String orderHospitalName,String orderDept,String orderDeptName,String orderDoctor,String orderDoctorName,String orderTime){
		CallService callService = callServiceDao.findByCode(code);
	public String dealAppointCallService(String type ,String code,Integer dealReason,String dealContent, String orderHospital,String orderHospitalName,String orderDept,String orderDeptName,String orderDoctor,String orderDoctorName,String orderTime){
		CallService cs = callServiceDao.findByCode(code);
		//预约成功
		if("1".equals(type)){
			cs.setState(2);
			cs.setOrderDoctor(orderDoctor);
			cs.setOrderDoctorName(orderDoctorName);
			cs.setOrderDept(orderDept);
			cs.setOrderDeptName(orderDeptName);
			cs.setOrderHospital(orderHospital);
			cs.setOrderHospitalName(orderHospitalName);
			cs.setOrderTime(orderTime);
			cs.setDealTime(new Date());
			cs.setDealState(1);
		//预约失败
		}else{
			cs.setState(2);
			cs.setDealTime(new Date());
			cs.setDealReason(dealReason);
			cs.setDealContent(dealContent);
		}
		return null;
		return "1";
	}
}

+ 23 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/call/CallRecordController.java

@ -11,11 +11,12 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2017/11/14.
 */
@Controller
@RestController
@RequestMapping(value = "/doctor/pcCustomer", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "客服系统")
public class CallRecordController extends BaseController {
@ -81,4 +82,25 @@ public class CallRecordController extends BaseController {
            return error(-1,"保存失败");
        }
    }
    @RequestMapping(value = "/dealAppointCallService", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "处理预约协同服务")
    public String dealAppointCallService(@ApiParam(name="type",value="1.预约成功,2.预约失败")@RequestParam(required = true)String type ,
                                         @ApiParam(name="code",value="协同服务code(Mes中relationCode)")@RequestParam(required = false)String code,
                                         @ApiParam(name="dealReason",value="预约失败原因code")@RequestParam(required = false)Integer dealReason,
                                         @ApiParam(name="dealContent",value="预约失败内容")@RequestParam(required = false)String dealContent,
                                         @ApiParam(name="orderHospital",value="机构code")@RequestParam(required = false)String orderHospital,
                                         @ApiParam(name="orderHospitalName",value="机构")@RequestParam(required = false)String orderHospitalName,
                                         @ApiParam(name="orderDept",value="科室编码")@RequestParam(required = false)String orderDept,
                                         @ApiParam(name="orderDeptName",value="科室")@RequestParam(required = false)String orderDeptName,
                                         @ApiParam(name="orderDoctor",value="预约医生编码")@RequestParam(required = false)String orderDoctor,
                                         @ApiParam(name="orderDoctorName",value="预约医生")@RequestParam(required = false)String orderDoctorName,
                                         @ApiParam(name="orderTime",value="预约时间,按需求格式拼接字符串")@RequestParam(required = false)String orderTime){
        try {
            return write(200,"保存成功","data",customerService.dealAppointCallService( type , code, dealReason, dealContent,  orderHospital, orderHospitalName, orderDept, orderDeptName, orderDoctor, orderDoctorName, orderTime));
        }catch (Exception e){
            error(e);
            return error(-1,"保存失败");
        }
    }
}