Browse Source

删除设备假删除接口

8 years ago
parent
commit
d719d1142d

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultService.java

@ -127,9 +127,9 @@ public class ConsultService extends BaseService {
			type=0;
		}
		if(type!=0){
			new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,type+"").start();
			new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,type+"",sfList.get(0).getTeamCode()).start();
		}else{
			new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,"2").start();
			new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,"2",sfList.get(0).getTeamCode()).start();
		}
	}
}

+ 30 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -996,6 +996,20 @@ public class FamilyContractService extends BaseService {
            // 添加到发送队列
            PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
            new Thread(new SignUploadTask(sf.getCode())).start();
            JSONObject participants = new JSONObject();
            participants.put(sf.getPatient(),0);
            if(StringUtils.equals(sf.getDoctor(),sf.getDoctorHealth())){//全科和建管同一个人
                participants.put(sf.getDoctor(),0);
            }else{//全科和建管不同一个人
                participants.put(sf.getDoctorHealth(),0);
                participants.put(sf.getDoctor(),1);
            }
            //创建医生会话讨论组
            JSONObject sessionObj  =  ImUtill.createSession(participants,ImUtill.SESSION_TYPE_MUC,patient.getName(),patient.getCode()+"_"+sf.getTeamCode()+"_"+2);
            if(sessionObj.getInt("status")==-1){
                throw  new RuntimeException(sessionObj.getString("message"));
            }
        }
        BusinessLogs.info(BusinessLogs.BusinessType.sign, signDoctorCode, sf.getPatient(), new JSONObject(sf));
        return temp;
@ -1045,6 +1059,7 @@ public class FamilyContractService extends BaseService {
            result.put("status", 0);
            return result;
        }
        String doctorTeamCode  =null;//服务团队的CODE;
        if (type == 1) {
            //判断是否有三师签约 并且判断全科医生一致
            SignFamily sssignFamily = signFamilyDao.findSSByIdcard(p.getIdcard());
@ -1143,7 +1158,7 @@ public class FamilyContractService extends BaseService {
            //sf.setFamilyCode(createSignCode(sf.getDoctor(), doc.getHospital()));
            //建立团队
            DoctorTeam doctorTeam = new DoctorTeam();
            String doctorTeamCode = getCode();
            doctorTeamCode = getCode();
            doctorTeam.setName("三师签约团队患者:" + p.getName());
            doctorTeam.setCode(doctorTeamCode);
            doctorTeam.setCzrq(new Date());
@ -1232,6 +1247,20 @@ public class FamilyContractService extends BaseService {
            // 添加到发送队列
            PushMsgTask.getInstance().putWxMsg(access_token, 1, sf.getOpenid(), sf.getName(), json);
            new Thread(new SignUploadTask(sf.getCode())).start();
            JSONObject participants = new JSONObject();
            participants.put(sf.getPatient(),0);
            if(StringUtils.equals(sf.getDoctor(),sf.getDoctorHealth())){//全科和建管同一个人
                participants.put(sf.getDoctor(),0);
            }else{//全科和建管不同一个人
                participants.put(sf.getDoctorHealth(),0);
                participants.put(sf.getDoctor(),1);
            }
            Patient patient = patientDao.findByCode(sf.getPatient());
            //创建医生会话讨论组
            JSONObject sessionObj  =  ImUtill.createSession(participants,ImUtill.SESSION_TYPE_MUC,patient.getName(),patient.getCode()+"_"+sf.getTeamCode()+"_"+2);
            if(sessionObj.getInt("status")==-1){
                throw  new RuntimeException(sessionObj.getString("message"));
            }
        }
        result.put("status", 1);
        BusinessLogs.info(BusinessLogs.BusinessType.sign, caller, sf.getPatient(), new JSONObject(sf));

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/HttpUtil.java

@ -128,7 +128,7 @@ public class HttpUtil {
			JSONObject participants = new JSONObject();
			participants.put("system",0);
			participants.put(receiver,0);
			JSONObject sessionObj  = ImUtill.createSession(participants,"0","系统消息","");
			JSONObject sessionObj  = ImUtill.createSession(participants,ImUtill.SESSION_TYPE_SYSTEM,"系统消息","");
			if(sessionObj.getInt("status")==-1){
				throw  new RuntimeException(sessionObj.getString("message"));
			}

+ 4 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImUtill.java

@ -237,4 +237,8 @@ public class ImUtill {
    }
    public  static final String SESSION_TYPE_MUC = "1";
    public  static final String SESSION_TYPE_P2P = "2";
    public  static final String SESSION_TYPE_GROUP = "3";
    public  static final String SESSION_TYPE_SYSTEM = "0";
}

+ 7 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SendPatientUtil.java

@ -18,8 +18,9 @@ public class SendPatientUtil extends  Thread {
	private String content;
	private String title;
	private String type;
	private String teamCode;
	public SendPatientUtil(String from,String fromName,String to,String contentType,String content,String title,String type){
	public SendPatientUtil(String from,String fromName,String to,String contentType,String content,String title,String type,String teamCode){
		this.from = from;
		this.fromName = fromName;
		this.to = to;
@ -27,11 +28,12 @@ public class SendPatientUtil extends  Thread {
		this.content = content;
		this.title = title;
		this.type = type;
		this.teamCode =teamCode;
	}
	public String sendToPatient(String from,String fromName,String to,String contentType,String content,String title,String type){
		JSONArray jsonArray = ImUtill.getParticipants(to+"_consult_"+type);
	public String sendToPatient(String from,String fromName,String to,String contentType,String content,String title,String type,String teamCode){
		JSONArray jsonArray = ImUtill.getParticipants(to+"_"+teamCode+"_"+type);
		JSONObject participants = new JSONObject();
		for(Object object:jsonArray){
			JSONObject jsonObject = (JSONObject)object;
@ -47,7 +49,7 @@ public class SendPatientUtil extends  Thread {
		if(!"4".equals(contentType)){
			contentType = "0";
		}
		JSONObject sessionJson  = ImUtill.createSession(participants,"1",title,to+"_consult_"+type);
		JSONObject sessionJson  = ImUtill.createSession(participants,ImUtill.SESSION_TYPE_MUC,title,to+"_"+teamCode+"_"+type);
		if(sessionJson.getInt("status")==-1){
			throw  new RuntimeException(sessionJson.getString("message"));
		}
@ -56,6 +58,6 @@ public class SendPatientUtil extends  Thread {
	}
	public void run(){
		this.sendToPatient(from,fromName,to,contentType,content,title,type);
		this.sendToPatient(from,fromName,to,contentType,content,title,type,teamCode);
	}
}

+ 9 - 9
patient-co-wlyy/src/main/resources/application.properties

@ -54,21 +54,21 @@
##------------------------------------�����������ݿ�����------------------------------------#
#### mysql database setting
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://172.19.103.77/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
jdbc.username=root
jdbc.password=123456
jdbc.url=jdbc:mysql://172.19.103.85/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
jdbc.username=linzhou
jdbc.password=linzhou
#### health index
health.jdbc.driver=com.mysql.jdbc.Driver
health.jdbc.url=jdbc:mysql://172.19.103.77/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
health.jdbc.username=root
health.jdbc.password=123456
health.jdbc.url=jdbc:mysql://172.19.103.85/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
health.jdbc.username=linzhou
health.jdbc.password=linzhou
#### suifang
fv.jdbc.driver=com.mysql.jdbc.Driver
fv.jdbc.url=jdbc:mysql://172.19.103.77/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
fv.jdbc.username=root
fv.jdbc.password=123456
fv.jdbc.url=jdbc:mysql://172.19.103.85/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
fv.jdbc.username=linzhou
fv.jdbc.password=linzhou
#### redis
redis.host=172.19.103.47