|
@ -1206,7 +1206,7 @@ public class FamilyContractService extends BaseService {
|
|
|
* @param reason 解约原因
|
|
|
* @return
|
|
|
*/
|
|
|
public int handleSurrender(String access_token, long msgid, String patient, int type, String reason) {
|
|
|
public int handleSurrender(String access_token, long msgid, String patient, int type, String reason) throws Exception {
|
|
|
if (type != 1 && type != 2) {
|
|
|
return -1;
|
|
|
}
|
|
@ -1221,6 +1221,10 @@ public class FamilyContractService extends BaseService {
|
|
|
message.setOver("0");
|
|
|
}
|
|
|
if (type == 1) {
|
|
|
// 设置家庭签约疾病无效
|
|
|
if(!patientDiseaseService.updatePatientDisease(patient,"")){
|
|
|
throw new Exception("patient's disease update failed");
|
|
|
}
|
|
|
// 将签约状态改为已解约
|
|
|
sf.setReason(reason);
|
|
|
sf.setStatus(-3);
|
|
@ -1234,8 +1238,6 @@ public class FamilyContractService extends BaseService {
|
|
|
doctorPatientGroupInfoDao.deleteByPatient(patient);
|
|
|
//结束患者家庭签约咨询
|
|
|
consultTeamDao.updateStatusByPatient(patient);
|
|
|
// 设置家庭签约疾病无效
|
|
|
patientDiseaseService.updatePatientDisease(patient,"");
|
|
|
|
|
|
// 推送消息消息给微信端
|
|
|
JSONObject json = new JSONObject();
|