Преглед изворни кода

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

shikejing пре 3 година
родитељ
комит
6cabf4b3f7

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

@ -102,8 +102,8 @@ public class PatientDeviceController extends BaseController {
    public String saveDevice(@ApiParam(name = "json", value = "设备数据json", defaultValue = "{\"deviceId\": \"3\",\"deviceName\": \"血压计-优瑞恩\",\"deviceSn\": \"7052169111\",\"categoryCode\": \"1\",\"userType\": \"-1\"}")
                             @RequestParam(value = "json", required = true) String json,
                             @ApiParam(name = "sleepPlanJson", value = "睡眠计划json") @RequestParam(value = "sleepPlanJson", required = false) String sleepPlanJson,
                             @ApiParam(name = "iotDeviceSn", value = "iotDeviceSn") @RequestParam(value = "iotDeviceSn", required = false) String iotDeviceSn,
                             @ApiParam(name = "safeAreaGz", value = "safeAreaGz") @RequestParam(value = "safeAreaGz", required = false) String safeAreaGz){
                             @ApiParam(name = "iotDeviceSn", value = "对应的设备sn码") @RequestParam(value = "iotDeviceSn", required = false) String iotDeviceSn,
                             @ApiParam(name = "safeAreaGz", value = "智能拐杖时需要传围栏地址") @RequestParam(value = "safeAreaGz", required = false) String safeAreaGz){
        //{"deviceSn": "7052169111","getUpTime": "07:00","napTime": "13:00","nightRestTime": "21:30"})
        try {
            DevicePatientDevice device = objectMapper.readValue(json, DevicePatientDevice.class);

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

@ -388,6 +388,10 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                "when category_code=7 then '报警器'\n" +
                "when category_code=12 then '监控器'\n" +
                "when category_code=13 then '睡眠带'\n" +
                "when category_code=14 then '可燃气体探测器'\n" +
                "when category_code=15 then '火灾探测报警器'\n" +
                "when category_code=16 then '智能拐杖'\n" +
                "when category_code=17 then '随身WiFi'\n" +
                "else '未知'\n" +
                "end as categoryName\n" +
                " from dm_device where del=1 GROUP BY category_code ";

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/DetectionPlatformService.java

@ -229,7 +229,8 @@ public class DetectionPlatformService  {
                String dataSql= "";
                List<Map<String , Object>> dataList = new ArrayList<>();
                switch (categoryCode) {
                    // 1=血糖仪  2=血压计  4=智能手表  13=智能床带/睡眠带  14=燃气报警器  15=烟雾报警器
                    // 1=血糖仪  2=血压计 14=燃气报警器  15=烟雾报警器
                    // 4=智能手表  7=居家安全报警器  16=智能拐杖  13=智能床带/睡眠带
                    case "1" :
                        dataSql = "SELECT record_date recordDate,value1,value2,value3,value4,value5,value6,value7,type FROM wlyy_patient_health_index WHERE device_sn = '"+deviceSn+"' AND del = 1 ORDER BY sort_date DESC LIMIT 10";
                        dataList = jdbcTemplate.queryForList(dataSql);

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

@ -136,7 +136,7 @@ public class DeviceController {
                deviceDetail.setDeviceModel(deviceModel);
                deviceDetail.setDeviceCode(deviceCode);
                deviceDetail.setSim(sim);
                deviceDetail.setBindingCount("");
                deviceDetail.setBindingCount("0");
                deviceDetail.setDeviceType(Integer.parseInt(deviceType));
                correctLs.add(deviceDetail);
            }