瀏覽代碼

通话详情 待办事项

zd_123 6 年之前
父節點
當前提交
dcd355296c

+ 19 - 7
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java

@ -210,8 +210,8 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "saveCallLabel",method = RequestMethod.POST)
    @ApiOperation(value = "保存所有通话标签")
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(required = false)String callLabels){
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value = "callCode")String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(value = "callLabels",required = false)String callLabels){
        try{
            String sql ="UPDATE manage_call_record SET call_label='"+callLabels+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
@ -224,7 +224,7 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "getCallInfo",method = RequestMethod.GET)
    @ApiOperation(value = "获取通话的详情")
    public String getCallTypeAndContent(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode){
    public String getCallTypeAndContent(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value ="callCode")String callCode){
        try{
            CallRecord callRecord = callRecordDao.findByCode(callCode);
            return write(200,"查询成功!","data",callCode);
@ -235,10 +235,10 @@ public class CustomerSynergyManageController extends BaseController {
    }
    @RequestMapping(value = "saveCallInfo",method = RequestMethod.POST)
    @ApiOperation(value = "显示所有通话标签")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(required = false)String serviceContent){
    @ApiOperation(value = "保存通话记录详情")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value ="callCode")String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(value = "serviceType",required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(value = "serviceContent",required = false)String serviceContent){
        try{
            String sql ="UPDATE manage_call_record SET service_type='"+serviceType+"',service_content='"+serviceContent+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
@ -248,5 +248,17 @@ public class CustomerSynergyManageController extends BaseController {
            return write(-1,"保存失败!");
        }
    }
    @RequestMapping(value = "getDealList",method = RequestMethod.GET)
    @ApiOperation(value = "通话详情获取待办事项")
    public String getDealList(@ApiParam(name="idcard",value="居民身份证")@RequestParam(value ="idcard")String idcard){
        try{
            return write(200,"获取成功!","data",synergyManageService.getDealList(idcard));
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"获取失败!");
        }
    }
}

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

@ -92,9 +92,11 @@ public class CustomerService extends BaseService{
				doctors.add(doctor);
			}
		}
		String labelSql="SELECT  DISTINCT CASE call_label WHEN '1' THEN '有待跟踪' WHEN '2' THEN '电话骚扰' WHEN '3' THEN '态度恶劣' END FROM manage_call_record mcr WHERE (caller_number='"+patient.getPhone()+"' OR caller_number='"+patient.getMobile()+"') AND type=1 AND call_label IS NOT NULL";
		List<Map<String,Object>> labelInfo = jdbcTemplate.queryForList(labelSql);
		resp.put("signInfo",signInfo);
		resp.put("doctors",doctors);
		resp.put("labelInfo",labelInfo);
		return resp;
	}
@ -387,13 +389,20 @@ public class CustomerService extends BaseService{
	public Map<String,Object> getCallRecordInfo(String code){
		CallRecord callRecord = callRecordDao.findByCode(code);
		List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);
		/*List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);*/
		List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
		Map<String,Object> rs = new HashedMap();
		rs.put("callRecord",callRecord);
		rs.put("consultService",consultService);
		rs.put("orderService",orderService);
		/*rs.put("consultService",consultService);
		rs.put("orderService",orderService);*/
		rs.put("patientReservation",patientReservation);
		return rs;
	}

+ 33 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -744,4 +744,37 @@ public class SynergyManageService extends BaseJpaService {
        }
        return resultList;
    }
    public List<Map<String,Object>> getDealList(String idcard){
        Patient patient = patientDao.findByIdcard(idcard);
        if (patient==null){
            return null;
        }
        String sql ="SELECT" +
                " s.create_time," +
                " s.service_patient_name," +
                " w.priority," +
                " w.relation_code," +
                " w.relation_code_name," +
                " w.create_user_type," +
                " w.create_user_name," +
                " w.create_user," +
                " w.remark," +
                " w.service_time" +
                " FROM" +
                " `manage_synergy_workorder_servicer` s" +
                " LEFT JOIN manage_synergy_workorder w ON s.workorder_code = w.`code`" +
                " WHERE" +
                " s.service_patient_code = '"+patient.getCode()+"'" +
                " AND s.`status` = 1" +
                " ORDER BY" +
                " s.create_time" +
                " LIMIT 2";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> map : list){
            int isOver = isServiceOverTime(DateUtil.strToDate(String.valueOf(map.get("service_time")),DateUtil.YYYY_MM_DD_HH_MM_SS));
            map.put("isOver",isOver);
        }
        return list;
    }
}