|
@ -4,7 +4,9 @@ package com.yihu.wlyy.service.third.health.bank;/**
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.service.app.device.PatientDeviceService;
|
|
|
import com.yihu.wlyy.util.HttpClientUtil;
|
|
|
import org.slf4j.Logger;
|
|
@ -44,6 +46,10 @@ public class CreditLogService {
|
|
|
private StringRedisTemplate redisTemplate;
|
|
|
@Autowired
|
|
|
private PatientDeviceService patientDeviceService;
|
|
|
@Autowired
|
|
|
private PatientDao patientDao;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 调用第三方积分排名接口
|
|
@ -86,10 +92,16 @@ public class CreditLogService {
|
|
|
* @param object
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject insert(JSONObject object){
|
|
|
public JSONObject insert(JSONObject object) throws Exception {
|
|
|
init();
|
|
|
String response = null;
|
|
|
String integrate = getIntegrate("health:blank:integrate:"+object.getString("flag"));
|
|
|
String patientId = object.getString("patientId");
|
|
|
Patient patient = patientDao.findByCode(patientId);
|
|
|
if (patient == null){
|
|
|
throw new Exception("该居民不存在");
|
|
|
}
|
|
|
object.put("name",patient.getName());
|
|
|
object.put("integrate",integrate);
|
|
|
String url =baseUrl + "createCreditsDetail";
|
|
|
Map<String,String> params = new HashMap<>();
|
|
@ -136,7 +148,13 @@ public class CreditLogService {
|
|
|
* @param object
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject selectAccount(JSONObject object){
|
|
|
public JSONObject selectAccount(JSONObject object) throws Exception {
|
|
|
String patientId = object.getString("patientId");
|
|
|
Patient patient = patientDao.findByCode(patientId);
|
|
|
if (patient == null){
|
|
|
throw new Exception("该居民不存在");
|
|
|
}
|
|
|
object.put("name",patient.getName());
|
|
|
String response = null;
|
|
|
String url =baseUrl + "selectAccount";
|
|
|
Map<String,String> params = new HashMap<>();
|