|
@@ -27,20 +27,19 @@ public class UpdateTask implements ITask {
|
|
try {
|
|
try {
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
String pstr = jsonObject.getString("name");
|
|
String pstr = jsonObject.getString("name");
|
|
- Record record = Db.use("connected").findFirst("SELECT * FROM 住院病人信息表 where 姓名=?", pstr);
|
|
|
|
|
|
+ Record record = Db.use("connected").findFirst("SELECT * FROM gh_ghjl where name=? order by ghrq desc", pstr);
|
|
String phoneString = "";
|
|
String phoneString = "";
|
|
String idcardString = "";
|
|
String idcardString = "";
|
|
if (record != null) {
|
|
if (record != null) {
|
|
-// phoneString = record.getStr("DEPARTMENT");
|
|
|
|
- idcardString =record.getStr("sfzh");
|
|
|
|
- continue;
|
|
|
|
|
|
+ phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
|
+ idcardString =record.getStr("id");
|
|
}else {
|
|
}else {
|
|
- record = Db.use("connected").findFirst("SELECT * FROM gh_ghjl where name=?", pstr);
|
|
|
|
|
|
+ record = Db.use("connected").findFirst("SELECT * FROM 住院病人信息表 where 姓名=? order by 入院日期 desc", pstr);
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- phoneString = record.getStr("mobile")==null?"":record.getStr("mobile");
|
|
|
|
- idcardString =record.getStr("id");
|
|
|
|
|
|
+ idcardString =record.getStr("sfzh");
|
|
|
|
+ phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
|
|
|
}
|
|
}
|
|
Map<String, String> params = new HashMap<>();
|
|
Map<String, String> params = new HashMap<>();
|