|
@ -29,6 +29,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
|
|
|
import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
|
import com.yihu.jw.entity.base.org.BaseDoctorPatientFollowDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientAddressInfoDO;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
|
|
|
import com.yihu.jw.entity.base.servicePackage.ServiceItemPlanDO;
|
|
@ -84,6 +85,7 @@ import com.yihu.jw.order.dao.BusinessOrderDao;
|
|
|
import com.yihu.jw.order.pay.ylz.YlzPayService;
|
|
|
import com.yihu.jw.org.dao.BaseOrgDao;
|
|
|
import com.yihu.jw.patient.dao.BaseDoctorPatientFollowDao;
|
|
|
import com.yihu.jw.patient.dao.BasePatientAddressInfoDao;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
|
|
|
import com.yihu.jw.rehabilitation.ServiceItemPlanDao;
|
|
@ -363,6 +365,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
private OutpatientHospitalizationDao outpatientHospitalizationDao;
|
|
|
@Autowired
|
|
|
private HealthCareNewService healthCareNewService;
|
|
|
@Autowired
|
|
|
private BasePatientAddressInfoDao addressInfoDao;
|
|
|
|
|
|
//已就诊医生列表
|
|
|
public PageEnvelop visitedDoctorPage(String patientId,String startTime,String endTime,Integer page,Integer size){
|
|
@ -15835,4 +15839,45 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 地址转坐标及详细信息
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
public List<BasePatientAddressInfoDO> getAddressToStreet(Integer id){
|
|
|
List<BasePatientAddressInfoDO> addressInfoDOS = new ArrayList<>();
|
|
|
if (id!=null){
|
|
|
BasePatientAddressInfoDO addressInfoDO = addressInfoDao.findById(id).get();
|
|
|
addressInfoDOS.add(addressInfoDO);
|
|
|
}else {
|
|
|
addressInfoDOS = addressInfoDao.findAll();
|
|
|
}
|
|
|
for (BasePatientAddressInfoDO addressInfoDO:addressInfoDOS){
|
|
|
String url = "https://restapi.amap.com/v3/geocode/geo?city=厦门市&address="+addressInfoDO.getAddress()+"&output=JSON&key=60a518937bd4cc128a5e15c1613e5d56";
|
|
|
|
|
|
String rest = httpClientUtil.get(url,"utf-8");
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(rest)){
|
|
|
com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(rest);
|
|
|
if (object.getString("infocode").equals("10000")){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = object.getJSONArray("geocodes").getJSONObject(0);
|
|
|
//通过经纬度获取具体详情地址
|
|
|
String res = httpClientUtil.get("https://restapi.amap.com/v3/geocode/regeo?output=JSON&location="+jsonObject.getString("location")+"&key=60a518937bd4cc128a5e15c1613e5d56&radius=0&extensions=all","utf-8");
|
|
|
if (StringUtils.isNoneBlank(res)){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject1 = com.alibaba.fastjson.JSONObject.parseObject(res);
|
|
|
if (jsonObject1.getString("infocode").equals("10000")){
|
|
|
com.alibaba.fastjson.JSONObject resjson = jsonObject1.getJSONObject("regeocode").getJSONObject("addressComponent");
|
|
|
String street = resjson.getString("township");
|
|
|
String town = resjson.getString("district");
|
|
|
addressInfoDO.setTown(town);
|
|
|
addressInfoDO.setStreet(street);
|
|
|
addressInfoDao.save(addressInfoDO);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
return addressInfoDOS;
|
|
|
}
|
|
|
|
|
|
}
|