|
@ -468,8 +468,13 @@ public class SignWebService extends BaseService {
|
|
|
return jsonArray;
|
|
|
}
|
|
|
|
|
|
public JSONObject getSignInfo(String teamCode){
|
|
|
List<SignFamily> signFamilys = signFamilyDao.findByTeamCodeIsValid(teamCode);
|
|
|
/**
|
|
|
* 已过时,启用getSignInfoOrRenewInfo
|
|
|
* @param teamCode
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getSignInfo(String teamCode,String code){
|
|
|
List<SignFamily> signFamilys = signFamilyDao.findByTeamCodeIsValid(teamCode,code);
|
|
|
SignFamily signFamily =null;
|
|
|
if(signFamilys==null||signFamilys.size()==0){
|
|
|
throw new RuntimeException("找不到签约关系!");
|
|
@ -1266,18 +1271,19 @@ public class SignWebService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public JSONObject getSignInfoOrRenewInfo(String teamCode){
|
|
|
public JSONObject getSignInfoOrRenewInfo(String teamCode,String code){
|
|
|
|
|
|
//签约或续签参数
|
|
|
String patientCode = null;
|
|
|
Long adminTeamId = null;
|
|
|
String doctorHealth = null;
|
|
|
String doctor =null;
|
|
|
|
|
|
List<SignFamilyRenew> renews = signFamilyRenewDao.findByTeamCodeIsValid(teamCode);
|
|
|
//先查找续签表有没有记录
|
|
|
List<SignFamilyRenew> renews = signFamilyRenewDao.findByTeamCodeIsValid(teamCode,code);
|
|
|
|
|
|
if(renews==null||renews.size()==0){
|
|
|
List<SignFamily> signFamilys = signFamilyDao.findByTeamCodeIsValid(teamCode);
|
|
|
//再查找签约表记录
|
|
|
List<SignFamily> signFamilys = signFamilyDao.findByTeamCodeIsValid(teamCode,code);
|
|
|
if(signFamilys==null||signFamilys.size()==0){
|
|
|
throw new RuntimeException("找不到签约关系!");
|
|
|
}else{
|
|
@ -1311,14 +1317,22 @@ public class SignWebService extends BaseService {
|
|
|
//签约团队的健管师
|
|
|
if(StringUtils.isNotBlank(doctorHealth)){
|
|
|
Doctor health = doctorService.findDoctorByCode(doctorHealth);
|
|
|
JSONObject healthObj = this.doctorParse(health);
|
|
|
resultObject.put("doctorHealth",healthObj);
|
|
|
if(health!=null){
|
|
|
JSONObject healthObj = this.doctorParse(health);
|
|
|
resultObject.put("doctorHealth",healthObj);
|
|
|
}else{
|
|
|
resultObject.put("doctorHealth","");
|
|
|
}
|
|
|
}
|
|
|
//签约团队的全科医生
|
|
|
if(StringUtils.isNotBlank(doctor)){
|
|
|
Doctor qk = doctorService.findDoctorByCode(doctor);
|
|
|
JSONObject qkObj = this.doctorParse(qk);
|
|
|
resultObject.put("doctor",qkObj);
|
|
|
if(qk!=null){
|
|
|
JSONObject healthObj = this.doctorParse(qk);
|
|
|
resultObject.put("doctor",healthObj);
|
|
|
}else{
|
|
|
resultObject.put("doctor","");
|
|
|
}
|
|
|
}
|
|
|
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00"));
|
|
|
int year = calendar.get(Calendar.YEAR);
|