|
@ -53,7 +53,7 @@ public class BaseServiceNewsService {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> findPatinetByName(String name){
|
|
|
String sql = "SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,CAST(archive_type AS char) type from base_patient p\n" +
|
|
|
String sql = "SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,p.pad_imei,p.openid,CAST(archive_type AS char) type from base_patient p\n" +
|
|
|
"WHERE p.del = 1 and p.name like '%"+name+"%'";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
List<DevicePatientDevice> feeDetail = patientDeviceDao.findByAll();
|
|
@ -61,6 +61,13 @@ public class BaseServiceNewsService {
|
|
|
.collect(Collectors.groupingBy(DevicePatientDevice::getUser));
|
|
|
for (Map<String,Object> map:list){
|
|
|
String idcard = map.get("idcard").toString();
|
|
|
String devices= deviceService.getPatientDeviceCategoryCode(map.get("id").toString());
|
|
|
if ("0".equals(devices)){
|
|
|
map.put("devices",new ArrayList<>());
|
|
|
}else {
|
|
|
String[] ss = devices.split(",");
|
|
|
map.put("devices",ss);
|
|
|
}
|
|
|
map.put("age", IdCardUtil.getAgeForIdcard(idcard));
|
|
|
List<DevicePatientDevice> patientDevices = byDept1.get(map.get("id"));
|
|
|
map.put("devices",patientDevices);
|
|
@ -74,10 +81,10 @@ public class BaseServiceNewsService {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> findPatinetLocations(){
|
|
|
String sql = "SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,archive_type type,p.pad_imei from base_doctor_patient_tmp t,base_patient p " +
|
|
|
String sql = "SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,archive_type type,p.pad_imei,p.openid from base_doctor_patient_tmp t,base_patient p " +
|
|
|
"WHERE t.patient = p.id and t.del=1 and t.`status`=1 and p.del =1 " +
|
|
|
"UNION " +
|
|
|
"SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,archive_type type,p.pad_imei from base_service_package_sign_record t,base_patient p " +
|
|
|
"SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,archive_type type,p.pad_imei,p.openid from base_service_package_sign_record t,base_patient p " +
|
|
|
"WHERE t.patient = p.id and t.`status`=1 and p.del =1";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
for (Map<String,Object> map:list){
|