|
@ -110,16 +110,13 @@ public class DoctorDeviceController extends BaseController {
|
|
patientDeviceService.saveDevice(device);
|
|
patientDeviceService.saveDevice(device);
|
|
|
|
|
|
//修改设备表中是否是首绑{"1":"1", "2":"1"}修改成{"1":"0", "2":"0"} 和其他绑定信息,
|
|
//修改设备表中是否是首绑{"1":"1", "2":"1"}修改成{"1":"0", "2":"0"} 和其他绑定信息,
|
|
wlyyDeviceDetailService.updateAfterBinding(device.getDeviceSn(),device.getUserIdcard(),device.getUserType(),new Date(),flag);
|
|
|
|
|
|
wlyyDeviceDetailService.updateAfterBinding(device.getDeviceSn(),device.getUserIdcard(),device.getUserType(),new Date());
|
|
//调用增加积分接口
|
|
//调用增加积分接口
|
|
System.out.println("是否首次====="+flag);
|
|
|
|
|
|
|
|
if (flag){
|
|
if (flag){
|
|
Patient patient = patientService.findByCode(device.getUser());
|
|
Patient patient = patientService.findByCode(device.getUser());
|
|
String creditDetail = "{\"tradeType\":\"HEALTH_TASK\",\"flag\":\"BIND\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+device.getUser()+"\",\"hospital\":\""+patient.getTown()+"\"}";
|
|
String creditDetail = "{\"tradeType\":\"HEALTH_TASK\",\"flag\":\"BIND\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+device.getUser()+"\",\"hospital\":\""+patient.getTown()+"\"}";
|
|
JSONObject jsonObject = JSONObject.parseObject(creditDetail);
|
|
JSONObject jsonObject = JSONObject.parseObject(creditDetail);
|
|
JSONObject response = creditLogService.insert(jsonObject);
|
|
JSONObject response = creditLogService.insert(jsonObject);
|
|
System.out.println("添加积分返回数据======"+response.toJSONString());
|
|
|
|
String status = response.getString("status");
|
|
String status = response.getString("status");
|
|
if ("200".equals(status)){
|
|
if ("200".equals(status)){
|
|
List<Map<String,Object>> list = (List<Map<String,Object>>)response.get("detailModelList");
|
|
List<Map<String,Object>> list = (List<Map<String,Object>>)response.get("detailModelList");
|