LAPTOP-KB9HII50\70708 2 éve
szülő
commit
4d9a204200

+ 28 - 1
svr/svr-cloud-care/readme.MD

@ -3,4 +3,31 @@
    每个模块下面有独立的Endpoint,service,model和dao
@ObserverRequired
医生端观察者模式。医生端请求的post的接口必须加这个注解
医生端观察者模式。医生端请求的post的接口必须加这个注解
为了做接口权限
controller 链接配置规范
不同角色链接前缀要区分,同一个接口不同角色不能复用controller层
通用接口 /common/
居民统一用 /patient/
幼儿接口 /children/
老人接口 /older/
医生统一用 /patient/
助老员 /helper/
社工 /social/
医生行政管理端 /manager/
免登录统一 /open/
开放第三方对接的接口 /wlyygc/
第三方单点登录安全方案一,点击我们链接,链接带对方平台的用户随机token,
前端把token传给后端,后端调用第三方接口 通过token获取用户信息,这样才能安全,
避免在连接上面直接带用户参数,
方案二 参数全部加密传输

+ 3 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/DoctorDeviceController.java

@ -180,6 +180,8 @@ public class DoctorDeviceController extends BaseController {
								@RequestParam(value = "patient")String patient,
								@ApiParam(name = "orderId", required = false,value = "对应工单的id")
								@RequestParam(value = "orderId", required = false) String orderId,
								@ApiParam(name = "videoType", required = false,value = "视频直播类型:ys")
								@RequestParam(value = "videoType", required = false) String videoType,
								@ApiParam(name = "deviceSn",value = "设备SN码")
								@RequestParam(value = "deviceSn")String deviceSn){
		try {
@ -189,7 +191,7 @@ public class DoctorDeviceController extends BaseController {
			if(permissionService.noPermission(2,param)){
				return write(-1,"该操作没有权限");
			}
			org.json.JSONObject result = deviceManageService.getDeviceInfo(patient, deviceSn,doctorId,orderId);
			org.json.JSONObject result = deviceManageService.getDeviceInfo(patient, deviceSn,doctorId,orderId,videoType);
			if (result.getInt(ResponseContant.resultFlag)==ResponseContant.success){
				return write(200,"获取成功","data", JSON.parseObject(result.getString(ResponseContant.resultMsg)));
			}else {

+ 3 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/PatientDeviceController.java

@ -440,12 +440,14 @@ public class PatientDeviceController extends BaseController {
                                         @RequestParam(value = "deviceSN")String deviceSn,
                                         @ApiParam(name = "orderId", required = false,value = "对应工单的id")
                                         @RequestParam(value = "orderId", required = false) String orderId,
                                         @ApiParam(name = "videoType", required = false,value = "视频直播类型:ys")
                                         @RequestParam(value = "videoType", required = false) String videoType,
                                         @ApiParam(name="day",value = "yyyy-mm-dd")
                                         @RequestParam(value = "day",required = false)String day){
        try {
            String uid = permissionService.getUID();
            JSONObject result = patientDeviceService.getPatientDeviceDetail(patient,deviceSn,day,uid,orderId);
            JSONObject result = patientDeviceService.getPatientDeviceDetail(patient,deviceSn,day,uid,orderId,videoType);
            if (result.getInt(ResponseContant.resultFlag)==ResponseContant.success){
                return write(200,"获取成功","data", JSON.parseObject(result.getString(ResponseContant.resultMsg)));
            }else {

+ 3 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/statistics/DetectionPlatformEndpoint.java

@ -159,10 +159,12 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint {
                                          @RequestParam(value = "deviceSN") String deviceSn,
                                          @ApiParam(name = "orderId", required = false,value = "对应工单的id")
                                          @RequestParam(value = "orderId", required = false) String orderId,
                                          @ApiParam(name = "videoType", required = false,value = "视频直播类型:ys")
                                          @RequestParam(value = "videoType", required = false) String videoType,
                                          @ApiParam(name = "day", value = "yyyy-mm-dd")
                                          @RequestParam(value = "day", required = false) String day) {
        try {
            org.json.JSONObject result = patientDeviceService.getPatientDeviceDetail(patient, deviceSn, day,permissionService.getUID(),orderId);
            org.json.JSONObject result = patientDeviceService.getPatientDeviceDetail(patient, deviceSn, day,permissionService.getUID(),orderId,videoType);
            if (result.getInt(ResponseContant.resultFlag) == ResponseContant.success) {
                return success(JSON.parseObject(result.getString(ResponseContant.resultMsg)));
            } else {

+ 2 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/DeviceManageService.java

@ -67,8 +67,8 @@ public class DeviceManageService extends BaseJpaService<BaseDeviceRepairEntity,B
    }
    /*设备详细信息*/
    public org.json.JSONObject getDeviceInfo(String patient, String deviceSn,String doctorId,String orderId) throws Exception {
        return patientDeviceService.getPatientDeviceDetail(patient, deviceSn, null,doctorId,orderId);
    public org.json.JSONObject getDeviceInfo(String patient, String deviceSn,String doctorId,String orderId,String videoType) throws Exception {
        return patientDeviceService.getPatientDeviceDetail(patient, deviceSn, null,doctorId,orderId,videoType);
    }
    /*监护信息*/

+ 7 - 6
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -930,7 +930,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
     * @param deviceSn 设备sn码
     * @return
     */
    public JSONObject getPatientDeviceDetail(String patient,String deviceSn,String day,String doctor,String orderId) throws Exception {
    public JSONObject getPatientDeviceDetail(String patient,String deviceSn,String day,String doctor,String orderId,String videoType) throws Exception {
        JSONObject result = new JSONObject();
        BasePatientDO patientDO = patientDao.findById(patient);
        if (null==patientDO){
@ -943,10 +943,6 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
            result.put(ResponseContant.resultMsg,"未查询到该设备");
        }else {
            DevicePatientDevice device = devices.get(0);
//            if (!patient.equals(device.getUser())){
//                result.put(ResponseContant.resultFlag,ResponseContant.fail);
//                result.put(ResponseContant.resultMsg,"居民未绑定该设备");
//            }else {
            String sql = "select dd.photo,GROUP_CONCAT(DISTINCT p.name) as patientName,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime,wd.manufacturer,p.mobile,p.address,p.idcard,wd.device_type  " +
                    "from dm_device dd INNER JOIN wlyy_patient_device pd on dd.category_code = pd.category_code INNER JOIN base_patient p on p.id = pd.user " +
                    " INNER JOIN wlyy_devices wd on dd.model = wd.device_model and pd.device_sn = wd.device_code " +
@ -1077,7 +1073,12 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                    content +="SOS紧急呼叫器";
                    break;
                case "12"://监控 视频地址
                    com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                    com.alibaba.fastjson.JSONObject tmp = null;
                    if("ys".equals(videoType)){
                        tmp = ysDeviceService.getDeviceLiveAddress2(deviceSn,1);
                    }else {
                        tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                    }
                    devInfoObj.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                    if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        devInfoObj.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));