|
@ -1,14 +1,12 @@
|
|
|
package com.yihu.wlyy.web.doctor.sign;
|
|
|
|
|
|
import java.net.URLDecoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
|
|
|
import com.yihu.wlyy.entity.message.Message;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamilyServer;
|
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
|
import com.yihu.wlyy.repository.doctor.SignPatientLabelDao;
|
|
@ -16,9 +14,13 @@ import com.yihu.wlyy.repository.patient.SignFamilyServerDao;
|
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
|
import com.yihu.wlyy.service.app.family.FamilyMemberService;
|
|
|
import com.yihu.wlyy.service.app.message.MessageService;
|
|
|
import com.yihu.wlyy.service.app.sign.FamilyContractService;
|
|
|
import com.yihu.wlyy.service.app.sign.PatientRemindService;
|
|
|
import com.yihu.wlyy.service.app.team.AdminTeamService;
|
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.util.*;
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -37,14 +39,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.service.app.sign.FamilyContractService;
|
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import springfox.documentation.spring.web.json.Json;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
/**
|
|
|
* 医生端:家庭签约控制类
|
|
@ -1091,24 +1091,25 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
}
|
|
|
//查找患者最近的一次到期记录
|
|
|
SignFamily jtSign = familyContractService.findOutTimeSigningByPatient(patient);
|
|
|
JSONObject jtjson = new JSONObject(jtSign);
|
|
|
//1.4.9新增健管师判断
|
|
|
if(StringUtils.isNotBlank(jtSign.getDoctorHealth())){
|
|
|
Doctor doctor = doctorService.findDoctorByCode(jtSign.getDoctorHealth());
|
|
|
if("0".equals(doctor.getDel())){
|
|
|
jtjson.put("doctorHealth","");
|
|
|
jtjson.put("doctorHealthName","");
|
|
|
}
|
|
|
}
|
|
|
// 家庭签约
|
|
|
JSONObject jtjson = null;
|
|
|
|
|
|
if (jtSign != null) {
|
|
|
jtjson = new JSONObject(jtSign);
|
|
|
//1.4.9新增健管师判断
|
|
|
if(StringUtils.isNotBlank(jtSign.getDoctorHealth())){
|
|
|
Doctor doctor = doctorService.findDoctorByCode(jtSign.getDoctorHealth());
|
|
|
if("0".equals(doctor.getDel())){
|
|
|
jtjson.put("doctorHealth","");
|
|
|
jtjson.put("doctorHealthName","");
|
|
|
}
|
|
|
}
|
|
|
// 家庭签约
|
|
|
List<SignFamilyServer> servers = signFamilyServerDao.findBySignCode(jtSign.getCode());
|
|
|
json.put("applySurrDate", jtSign.getPatientApplyUnsignDate());
|
|
|
json.put("applyDate", jtSign.getPatientApplyDate());
|
|
|
json.put("jtSign",jtjson);
|
|
|
json.put("signFamilyServer",servers);
|
|
|
}
|
|
|
|
|
|
json.put("countryCode", temp.getSickVillage() == null ? "" : temp.getSickVillage());
|
|
|
json.put("countryName", temp.getSickVillageName() == null ? "" : temp.getSickVillageName());
|
|
|
|