trick9191 7 rokov pred
rodič
commit
595250c61e

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

@ -350,4 +350,14 @@ public class CustomerController extends BaseController {
        }
        }
    }
    }
    @RequestMapping(value = "/delCallService", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "删除协同服务")
    public String delCallService(@ApiParam(name="code",value="协同服务编号")@RequestParam(required = true)String code){
        try {
            return write(200,"操作成功","data",customerService.delCallService(code));
        }catch (Exception e){
            error(e);
            return error(-1,"操作成功");
        }
    }
}
}

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

@ -20,6 +20,7 @@ import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.aspectj.weaver.ast.Call;
import org.json.JSONObject;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
@ -567,7 +568,11 @@ public class CustomerService extends BaseService{
		return rs;
		return rs;
	}
	}
	public String delCallService(String code){
		CallService c = callServiceDao.findByCode(code);
		callServiceDao.delete(c);
		return "1";
	}

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -100,4 +100,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("from Message a where a.type = 12 and a.state=0 and a.del='1' and a.over='0' and receiver = ?1  ")
    @Query("from Message a where a.type = 12 and a.state=0 and a.del='1' and a.over='0' and receiver = ?1  ")
    List<Message> findByReceiverCallService(String doctor);
    List<Message> findByReceiverCallService(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 ")
    List<Message> getMessageByType(String doctor, Integer type, Pageable pageRequest);
}
}

+ 18 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/call/CustomerService.java

@ -11,6 +11,9 @@ import com.yihu.wlyy.service.BaseService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
@ -92,9 +95,21 @@ public class CustomerService extends BaseService{
		return list;
		return list;
	}
	}
	public List<Message> getCallServiceMes(String doctor){
		List<Message> mes =  messageDao.findByReceiverCallService(doctor);
		return mes;
//	public List<Message> getCallServiceMes(String doctor,Integer page, Integer pagesize){
//		Sort sort = new Sort(Sort.Direction.DESC, "createTime");
//		// 分页信息
//		Pageable pageRequest = new PageRequest(page - 1, pagesize, sort);
//
//		List<Message> mes =  messageDao.findByReceiverCallService(doctor);
//		return mes;
//	}
	public List<Message> getCallServiceMes(String doctor,Integer page, Integer pagesize) throws Exception {
		// 排序
		Sort sort = new Sort(Sort.Direction.DESC, "createTime");
		// 分页信息
		Pageable pageRequest = new PageRequest(page - 1, pagesize, sort);
		return messageDao.getMessageByType(doctor,12, pageRequest);
	}
	}
	public Map<String,Object> getCallServiceInfo(String code){
	public Map<String,Object> getCallServiceInfo(String code){

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

@ -49,9 +49,10 @@ public class CallRecordController extends BaseController {
    @RequestMapping(value = "/getCallServiceMes", method = {RequestMethod.GET, RequestMethod.POST})
    @RequestMapping(value = "/getCallServiceMes", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务消息")
    @ApiOperation(value = "获取协同服务消息")
    public String getCallServiceMes(){
    public String getCallServiceMes(@ApiParam(name="page",value="第几页")@RequestParam(required = false)Integer page,
                                    @ApiParam(name="pagesize",value="每页几条记录")@RequestParam(required = false)Integer pagesize){
        try {
        try {
            return write(200,"保存成功","data",customerService.getCallServiceMes(getUID()));
            return write(200,"保存成功","data",customerService.getCallServiceMes(getUID(),page,pagesize));
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            error(e);
            return error(-1,"保存失败");
            return error(-1,"保存失败");