|
@ -25,6 +25,7 @@ import com.yihu.jw.restmodel.patient.signPackage.ServicePackageVO;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.rm.patient.PatientRequestMapping;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@ -258,14 +259,34 @@ public class PackageService {
|
|
|
return Envelop.getSuccess(PatientRequestMapping.SignPackage.api_success);
|
|
|
}
|
|
|
|
|
|
public Envelop signPackageAndFamily(ServicePackageSignRecordDO recordDO,String patient, String familyMobile, Integer platform, Integer familyBindRole,
|
|
|
public Map<String,Object> signPackageAndFamily(ServicePackageSignRecordDO recordDO,String patient, String familyMobile, Integer platform, Integer familyBindRole,
|
|
|
Integer isAdult,String familyName,String principalNum,String idcard) throws Exception{
|
|
|
//1.绑定家人
|
|
|
myFamilyService.signBindFamily(patient,familyMobile,platform,familyBindRole,isAdult,familyName,principalNum,idcard);
|
|
|
//2.服务签约
|
|
|
servicePackageSignRecordDao.save(recordDO);
|
|
|
Map<String,Object> map = myFamilyService.signBindFamily(patient,familyMobile,platform,familyBindRole,isAdult,familyName,principalNum,idcard);
|
|
|
|
|
|
return Envelop.getSuccess(PatientRequestMapping.SignPackage.api_success);
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
|
|
|
if(map!=null){
|
|
|
//2.服务签约
|
|
|
String memberPatient = map.get("familyMemberCode").toString();
|
|
|
recordDO.setPatient(memberPatient);
|
|
|
|
|
|
if(findPatientSignExist(memberPatient,recordDO.getServicePackageId())){
|
|
|
rs.put("mes","用户已存在");
|
|
|
rs.put("status","-1");
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
servicePackageSignRecordDao.save(recordDO);
|
|
|
rs.put("mes","签约成功");
|
|
|
rs.put("status","1");
|
|
|
return rs;
|
|
|
}else{
|
|
|
rs.put("mes","用户创建失败!");
|
|
|
rs.put("status","-2");
|
|
|
}
|
|
|
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
|