zd_123 7 سال پیش
والد
کامیت
1bd13a320a

+ 1 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java

@ -110,16 +110,13 @@ public class DoctorDeviceController extends BaseController {
			patientDeviceService.saveDevice(device);
			//修改设备表中是否是首绑{"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){
				Patient patient = patientService.findByCode(device.getUser());
				String creditDetail = "{\"tradeType\":\"HEALTH_TASK\",\"flag\":\"BIND\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+device.getUser()+"\",\"hospital\":\""+patient.getTown()+"\"}";
				JSONObject jsonObject = JSONObject.parseObject(creditDetail);
				JSONObject response = creditLogService.insert(jsonObject);
				System.out.println("添加积分返回数据======"+response.toJSONString());
				String status = response.getString("status");
				if ("200".equals(status)){
                    List<Map<String,Object>> list = (List<Map<String,Object>>)response.get("detailModelList");