|
@ -242,6 +242,41 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 初始化杭州老人,只保存有身份证且有手机号的数据
|
|
|
*/
|
|
|
public void initJczdPersonNew(String type){
|
|
|
String sql = "select certificate_number from hz.jczd_person_bak";
|
|
|
if("1".equals(type)){
|
|
|
sql += " limit 1";
|
|
|
}
|
|
|
String sqlpatient = "select * from base_patient_bak where idcard = ? limit 1";
|
|
|
List<String> list = jdbcTemplate.queryForList(sql,String.class);
|
|
|
for (String idcard : list){
|
|
|
List<BasePatientDO> basePatientDOS = jdbcTemplate.query(sqlpatient,new Object[]{idcard},new BeanPropertyRowMapper<>(BasePatientDO.class));
|
|
|
if(basePatientDOS.size()>0){
|
|
|
BasePatientDO patientDO = basePatientDOS.get(0);
|
|
|
patientDO.setRegister("2");
|
|
|
String address = patientDO.getAddress();
|
|
|
|
|
|
if(StringUtils.isNotBlank(address)){
|
|
|
if(!address.contains("杭州市")){
|
|
|
address = "杭州市拱墅区"+address;
|
|
|
}
|
|
|
patientDO.setAddress(address);
|
|
|
Map<String,String> map = LatitudeUtils.getGeocoderLatitude(address);
|
|
|
if(map!=null){
|
|
|
String latlon = map.get("lat")+","+map.get("lng");
|
|
|
patientDO.setLatLon(latlon);
|
|
|
}
|
|
|
}
|
|
|
patientDao.save(patientDO);
|
|
|
}
|
|
|
logger.info("idcard=="+idcard);
|
|
|
}
|
|
|
logger.info("新增人数="+list.size());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 初始化杭州老人,只保存有身份证且有手机号的数据
|
|
|
*/
|
|
@ -260,7 +295,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
lableCodeNameMap.put("4","孤寡");//孤寡
|
|
|
lableCodeNameMap.put("7","特困");//特困
|
|
|
|
|
|
String sql = "select * from base_patient where openid = 'jczd' limit ?";
|
|
|
String sql = "select * from hz.base_patient where openid = 'jczd' limit ?";
|
|
|
List<BasePatientDO> list = jdbcTemplate.query(sql,new Object[]{size},new BeanPropertyRowMapper<>(BasePatientDO.class));
|
|
|
for (BasePatientDO patient:list){
|
|
|
String idcard = patient.getIdcard();
|