|
@ -418,11 +418,11 @@ public class DataHandingService {
|
|
}
|
|
}
|
|
|
|
|
|
public void addPointOldDeviceBind()throws Exception{
|
|
public void addPointOldDeviceBind()throws Exception{
|
|
String sql = "SELECT pd.*,p.town FROM wlyy_patient_device pd LEFT JOIN wlyy_patient p ON pd.`user` = p.`code`";
|
|
|
|
|
|
String sql = "SELECT pd.*,sf.hospital FROM wlyy_patient_device pd LEFT JOIN wlyy_sign_family sf ON pd.`user` = sf.patient where sf.`status`>0";
|
|
List<Map<String,Object>> patientDeviceList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String,Object>> patientDeviceList = jdbcTemplate.queryForList(sql);
|
|
Map<String,String> map = new HashedMap();
|
|
Map<String,String> map = new HashedMap();
|
|
for (Map<String,Object> patientDeviceMap : patientDeviceList) {
|
|
for (Map<String,Object> patientDeviceMap : patientDeviceList) {
|
|
if (org.apache.commons.lang.StringUtils.equals(String.valueOf(patientDeviceMap.get("town")),"350205")){
|
|
|
|
|
|
if (org.apache.commons.lang.StringUtils.equals(String.valueOf(patientDeviceMap.get("hospital")).substring(0,6),"350205")){
|
|
String deviceType=null;
|
|
String deviceType=null;
|
|
if (!map.containsKey(String.valueOf(patientDeviceMap.get("user")))) {
|
|
if (!map.containsKey(String.valueOf(patientDeviceMap.get("user")))) {
|
|
deviceType = map.get(String.valueOf(patientDeviceMap.get("user")));
|
|
deviceType = map.get(String.valueOf(patientDeviceMap.get("user")));
|
|
@ -441,7 +441,7 @@ public class DataHandingService {
|
|
}else if ("2".equals(entry.getValue())){
|
|
}else if ("2".equals(entry.getValue())){
|
|
flagStr="BP_BIND";
|
|
flagStr="BP_BIND";
|
|
}
|
|
}
|
|
String creditDetail = "{\"tradeType\":\"HEALTH_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+entry.getKey()+"\",\"hospital\":\"350205\"}";
|
|
|
|
|
|
String creditDetail = "{\"tradeType\":\"ACTIVITY_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+entry.getKey()+"\",\"hospital\":\"350205\"}";
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(creditDetail);
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(creditDetail);
|
|
com.alibaba.fastjson.JSONObject response = creditLogService.insert(jsonObject);
|
|
com.alibaba.fastjson.JSONObject response = creditLogService.insert(jsonObject);
|
|
String status = response.getString("status");
|
|
String status = response.getString("status");
|
|
@ -466,7 +466,7 @@ public class DataHandingService {
|
|
}else if (StringUtils.pathEquals("2",type)){
|
|
}else if (StringUtils.pathEquals("2",type)){
|
|
flagStr = "BP_MEASURE";
|
|
flagStr = "BP_MEASURE";
|
|
}
|
|
}
|
|
String creditDetail = "{\"tradeType\":\"HEALTH_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+user+"\",\"hospital\":\"350205\"}";
|
|
|
|
|
|
String creditDetail = "{\"tradeType\":\"ACTIVITY_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+user+"\",\"hospital\":\"350205\"}";
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(creditDetail);
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(creditDetail);
|
|
com.alibaba.fastjson.JSONObject response = creditLogService.insert(jsonObject);
|
|
com.alibaba.fastjson.JSONObject response = creditLogService.insert(jsonObject);
|
|
String status = response.getString("status");
|
|
String status = response.getString("status");
|