Преглед на файлове

Merge branch 'dev' of chinawu123/wlyy2.0 into dev

chinawu123 преди 2 години
родител
ревизия
763ff47c9a

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/admin/AdminListInfoController.java

@ -52,7 +52,7 @@ public class AdminListInfoController extends EnvelopRestEndpoint {
                return ObjEnvelop.getError("该操作没有权限");
            }
            return ObjEnvelop.getSuccess("查询成功",patientInfoPlatFormService.getPatientDeviceInfoWithDetail(patient,null,null));
            return ObjEnvelop.getSuccess("查询成功",patientInfoPlatFormService.getPatientDeviceInfoWithDetail(patient,null,null,null));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }

+ 4 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java

@ -173,9 +173,11 @@ public class PatientInfoPlatFormEndpoint extends EnvelopRestEndpoint {
                                                     @ApiParam(name="deviceSn",value = "设备SN",required = false)
                                                     @RequestParam(value = "deviceSn",required = false)String deviceSn,
                                                     @ApiParam(name = "warnTime",value = "预警时间")
                                                     @RequestParam(value = "warnTime",required = false)String warnTime){
                                                     @RequestParam(value = "warnTime",required = false)String warnTime,
                                                     @ApiParam(name="isShow",value = "是否展示综合信息",required = false)
                                                     @RequestParam(value = "isShow",required = false)Integer isShow){
        try {
            return ObjEnvelop.getSuccess("查询成功",patientInfoPlatFormService.getPatientDeviceInfoWithDetail(patient,deviceSn,warnTime));
            return ObjEnvelop.getSuccess("查询成功",patientInfoPlatFormService.getPatientDeviceInfoWithDetail(patient,deviceSn,warnTime,isShow));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }

+ 6 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/third/PatientInfoPlatFormService.java

@ -713,7 +713,7 @@ public class PatientInfoPlatFormService {
    /**
     *获取设备详情
     */
    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient,String deviceSn,String warnTime){
    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient,String deviceSn,String warnTime,Integer isShow){
        List<Map<String,Object>>  list = new ArrayList<>();
        String sql = "select dd.photo,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime,dd.device_type as deviceType " +
                "from dm_device dd INNER JOIN wlyy_patient_device pd on dd.category_code = pd.category_code INNER JOIN wlyy_devices wd on dd.model = wd.device_model and pd.device_sn = wd.device_code \n" +
@ -733,9 +733,11 @@ public class PatientInfoPlatFormService {
            Map<String,Object> detailInfo =  getDeviceIndexAndOrder(category_code,deviceSN,patient,warnTime);
            tmp.put("detailInfo",detailInfo);
        }
        Map<String,Object> resultMap =  deviceIndexInfo(list);
        list.add(resultMap);
        if (null!=isShow&&1==isShow){
            Map<String,Object> resultMap =  deviceIndexInfo(list);
            list.add(resultMap);
        }
        return list;
    }
@ -874,7 +876,7 @@ public class PatientInfoPlatFormService {
    public List<Map<String, Object>> patientDeviceNameList(String patient){
        String sql = "SELECT dd.category_code,dd.model,pd.device_name,dd.device_type AS deviceType  FROM dm_device dd " +
                " INNER JOIN wlyy_patient_device pd ON dd.category_code = pd.category_code INNER JOIN wlyy_devices wd ON dd.model = wd.device_model " +
                " INNER JOIN wlyy_patient_device pd ON dd.category_code = pd.category_code AND pd.category_code <> '17' INNER JOIN wlyy_devices wd ON dd.model = wd.device_model " +
                " AND pd.device_sn = wd.device_code  WHERE 1 = 1 AND pd.del = 0 AND pd.`user` = '"+patient+"' " +
                " GROUP BY dd.category_code ORDER BY dd.device_type DESC,pd.czrq ASC";