Browse Source

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

liubing 3 năm trước cách đây
mục cha
commit
f4df5d57a7

+ 73 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentCompanyEndpoint.java

@ -10,10 +10,21 @@ import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import org.apache.http.client.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.Date;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
/**
 * Created with IntelliJ IDEA.
 * Created with IntelliJ IDEA.
@ -42,7 +53,7 @@ public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "update")
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    @ApiOperation(value = "更新")
    public ObjEnvelop<VoluntaryRecruitmentCompanyDO> update (
    public ObjEnvelop<VoluntaryRecruitmentCompanyDO> update(
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
            @RequestParam String jsonData) throws Exception {
        VoluntaryRecruitmentCompanyDO appVersion = toEntity(jsonData, VoluntaryRecruitmentCompanyDO.class);
        VoluntaryRecruitmentCompanyDO appVersion = toEntity(jsonData, VoluntaryRecruitmentCompanyDO.class);
@ -55,7 +66,7 @@ public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = "page")
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<VoluntaryRecruitmentCompanyDO> page (
    public PageEnvelop<VoluntaryRecruitmentCompanyDO> page(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -67,13 +78,13 @@ public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
            @RequestParam(value = "size") int size) throws Exception {
        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts, page, size);
        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts, page, size);
        int count = (int)companyService.getCount(filters);
        int count = (int) companyService.getCount(filters);
        return success(appVersions, count, page, size, VoluntaryRecruitmentCompanyDO.class);
        return success(appVersions, count, page, size, VoluntaryRecruitmentCompanyDO.class);
    }
    }
    @GetMapping(value = "list")
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<VoluntaryRecruitmentCompanyDO> list (
    public ListEnvelop<VoluntaryRecruitmentCompanyDO> list(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -85,4 +96,62 @@ public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint {
    }
    }
    @GetMapping(value = "exportExcel")
    @ApiOperation("导出列表")
    @ResponseBody
    public void searchList(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            HttpServletResponse response) {
        try {
            List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts);
            response.setContentType("octets/stream");
            response.setHeader("Content-Disposition", "attachment; filename=" + new String("volunteerInfo.xls"));
            OutputStream os = response.getOutputStream();
            this.write(os, appVersions);
        } catch (Exception ex) {
            Envelop.getError("导出失败");
        }
    }
    private void write(OutputStream os, List<VoluntaryRecruitmentCompanyDO> list) throws Exception {
        WritableWorkbook wwb = Workbook.createWorkbook(os);
        try {
            WritableSheet sheet = wwb.createSheet("sheet", 1);
            String header[] = {"序号", "所在单位", "单位联系人", " 联系人手机号", "报名志愿者人数", "意向服务时间段", "意向服务的核酸采集点"};
            int i = 0;
            for (String h : header) {
                addCell(sheet, 0, i, h);
                i++;
            }
            int j = 1;
            for (VoluntaryRecruitmentCompanyDO tmp : list) {
                int ii=1;
                addCell(sheet, j, 0, ii + "");
                addCell(sheet, j, 1, tmp.getName());
                addCell(sheet, j, 2, tmp.getContacts());
                addCell(sheet, j, 3, tmp.getPhone() + "");
                addCell(sheet, j, 4, tmp.getNum()+"");
                addCell(sheet, j, 5, tmp.getTimes() + "");
                addCell(sheet, j, 6, tmp.getServiceStation() + "");
                j++;
                ii++;
            }
            wwb.write();
            wwb.close();
        } catch (Exception e) {
            e.printStackTrace();
            if (wwb != null) wwb.close();
        }
    }
    private void addCell(WritableSheet ws, int row, int column, String data) throws WriteException {
        Label label = new Label(column, row, data);
        ws.addCell(label);
    }
}
}

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentEndpoint.java

@ -25,7 +25,7 @@ import java.util.List;
@RequestMapping(value = "open/voluntary")
@RequestMapping(value = "open/voluntary")
@Api(value = "新冠-志愿招募管理", description = "新冠-志愿招募管理", tags = {"新冠-志愿招募管理"})
@Api(value = "新冠-志愿招募管理", description = "新冠-志愿招募管理", tags = {"新冠-志愿招募管理"})
public class VoluntaryRecruitmentEndpoint extends EnvelopRestEndpoint {
public class VoluntaryRecruitmentEndpoint extends EnvelopRestEndpoint {
 
    @Autowired
    @Autowired
    private VoluntaryRecruitmentService voluntaryRecruitmentService;
    private VoluntaryRecruitmentService voluntaryRecruitmentService;
    @Autowired
    @Autowired

+ 7 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/birthday/BirthdayWishesService.java

@ -333,8 +333,12 @@ public class BirthdayWishesService {
                            map.put("birthday", esMap.get("birthday") + "");
                            map.put("birthday", esMap.get("birthday") + "");
                            map.put("doctorName", esMap.get("doctorName") + "");
                            map.put("doctorName", esMap.get("doctorName") + "");
                            map.put("content", esMap.get("content") + "");
                            map.put("content", esMap.get("content") + "");
                            map.put("createTime", (esMap.get("createTime") + "").replace("T", " ").replace("+0800", ""));
                            map.put("createTimeStr", (esMap.get("createTime") + "").replace("T", " ").replace("+0800", ""));
                            Date dateTmp = DateUtil.strToDate(esMap.get("createTime") + "");
                            map.put("createTime", (DateUtil.dateToChineseDate(dateTmp)));
                            map.put("status", "已发送");
                            map.put("status", "已发送");
                            BasePatientDO patientDO = patientDao.findById(map.get("patient") + "");
                            map.put("patientBirthday", IdCardUtil.getBirthdayForIdcardStr(patientDO.getIdcard()));
                            patientSet.add(patientCode);
                            patientSet.add(patientCode);
                            resultList.add(map);
                            resultList.add(map);
                        }
                        }
@ -349,11 +353,10 @@ public class BirthdayWishesService {
                        String birthday = map.get("birthday")+"日";
                        String birthday = map.get("birthday")+"日";
                        StringBuilder bir = new StringBuilder(birthday);
                        StringBuilder bir = new StringBuilder(birthday);
                        bir.insert(2, "月");
                        bir.insert(2, "月");
//                            int age = IdCardUtil.getAgeForIdcard(map.get("idcard") + "");
                        map.put("birthday", bir.toString());
                        map.put("birthday", bir.toString());
//                        int age = IdCardUtil.getAgeForIdcard(map.get("idcard") + "");
//                        map.put("age", age);
                        map.put("status", "未发送");
                        map.put("status", "未发送");
                        BasePatientDO patientDO = patientDao.findById(map.get("patient") + "");
                        map.put("patientBirthday", IdCardUtil.getBirthdayForIdcardStr(patientDO.getIdcard()));
                        resultList.add(map);
                        resultList.add(map);
                    }
                    }
                }
                }

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

@ -107,7 +107,7 @@ public class DeviceController {
    }
    }
    //
    //
    @ApiOperation("柏颐设备位置接收")
    @ApiOperation("爱牵挂位置接收")
    @RequestMapping(value = "byLocation", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "byLocation", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byLocation(
    public String byLocation(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
@ -131,7 +131,7 @@ public class DeviceController {
            HttpServletRequest request){
            HttpServletRequest request){
        try {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐设备位置接收,请求参数:\n"+paraString);
            logger.info("爱牵挂位置接收,请求参数:\n"+paraString);
            deviceService.byLocation(imei,time_begin,is_reply,is_track,city,address,lon,lat,type);
            deviceService.byLocation(imei,time_begin,is_reply,is_track,city,address,lon,lat,type);
            return success();
            return success();
@ -142,7 +142,7 @@ public class DeviceController {
    }
    }
    @ApiOperation("柏颐心率数据接收")
    @ApiOperation("爱牵挂心率数据接收")
    @RequestMapping(value = "byHeartRate", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "byHeartRate", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byHeartRate(
    public String byHeartRate(
            @ApiParam(name = "imei", value = "15位设备唯一序号")
            @ApiParam(name = "imei", value = "15位设备唯一序号")
@ -158,7 +158,7 @@ public class DeviceController {
            HttpServletRequest request){
            HttpServletRequest request){
        try {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐心率数据接收,请求参数: \n"+paraString);
            logger.info("爱牵挂心率数据接收,请求参数: \n"+paraString);
            deviceService.byHeartRate(imei,time_begin,heartrate,theshold_heartrate_h,theshold_heartrate_l);
            deviceService.byHeartRate(imei,time_begin,heartrate,theshold_heartrate_h,theshold_heartrate_l);
            return success();
            return success();
@ -168,7 +168,7 @@ public class DeviceController {
        }
        }
    }
    }
    @ApiOperation("柏颐血压数据接收")
    @ApiOperation("爱牵挂血压数据接收")
    @RequestMapping(value = "byBloodPressure", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "byBloodPressure", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byBloodPressure(
    public String byBloodPressure(
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
@ -186,7 +186,7 @@ public class DeviceController {
            HttpServletRequest request){
            HttpServletRequest request){
        try {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐血压数据,接收请求参数:\n"+paraString);
            logger.info("爱牵挂血压数据,接收请求参数:\n"+paraString);
            deviceService.byBloodPressure(imei,time_begin,dbp,dbp_l,sbp,sbp_h);
            deviceService.byBloodPressure(imei,time_begin,dbp,dbp_l,sbp,sbp_h);
            return success();
            return success();
@ -196,7 +196,7 @@ public class DeviceController {
        }
        }
    }
    }
    @ApiOperation("柏颐跌倒数据接收")
    @ApiOperation("爱牵挂跌倒数据接收")
    @RequestMapping(value = "byFall", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "byFall", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byFall(
    public String byFall(
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
@ -216,7 +216,7 @@ public class DeviceController {
            HttpServletRequest request){
            HttpServletRequest request){
        try {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐跌倒数据接收,请求参数: \n"+paraString);
            logger.info("爱牵挂跌倒数据接收,请求参数: \n"+paraString);
            deviceService.byFall(imei,time_begin,city,address,lon,lat,type);
            deviceService.byFall(imei,time_begin,city,address,lon,lat,type);
            return success();
            return success();
@ -238,7 +238,7 @@ public class DeviceController {
            HttpServletRequest request) {
            HttpServletRequest request) {
        try {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐设备步数接收,请求参数:\n"+paraString);
            logger.info("爱牵挂步数接收,请求参数:\n"+paraString);
            deviceService.bySteps(imei,time_begin,value);
            deviceService.bySteps(imei,time_begin,value);
            return success();
            return success();
@ -248,29 +248,87 @@ public class DeviceController {
        }
        }
    }
    }
    @ApiOperation("柏颐设备睡眠接收")
    @ApiOperation("爱牵挂设备睡眠接收")
    @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySleep(
    public String bySleep(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
            @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
            @RequestParam(value = "device",required = true) String device,
            @ApiParam(name="time_begin",required = false,value="发生时间YYYY-MM-DD HH:mm:SS")
            @ApiParam(name="time_begin",required = false,value="发生时间YYYY-MM-DD HH:mm:SS")
            @RequestParam(value = "time_begin",required = false) String time_begin,
            @RequestParam(value = "time_begin",required = false) String time_begin,
            @ApiParam(name="time_end",required = false,value="结束时间YYYY-MM-DD HH:mm:SS")
            @RequestParam(value = "time_end",required = false) String time_end,
            @ApiParam(name="interval",required = false,value="固定30分钟")
            @RequestParam(value = "interval",required = false) int interval,
            @ApiParam(name="total",required = false,value="检测次数")
            @RequestParam(value = "total",required = false) int total,
            @ApiParam(name="data",required = false,value="样例截取 睡眠数据 (格式:state,turn_over|state,turn_over|...)")
            @RequestParam(value = "data",required = false)String data,
            @ApiParam(name="heartrate",required = false,value="心率数据(离床或翻身测量失败时为0)")
            @RequestParam(value = "heartrate",required = false) String heartrate,
            @ApiParam(name="breath",required = false,value="呼吸率(离床或翻身测量失败时为0)")
            @RequestParam(value = "breath",required = false) String breath,
            @ApiParam(name="bed_status",required = false,value="在离床状态(0 离床,1 在床) ")
            @RequestParam(value = "bed_status",required = false) String bed_status,
            @ApiParam(name="turn_over",required = false,value="翻身状态(0 没翻身,1 在翻身)")
            @RequestParam(value = "turn_over",required = false)String turn_over,
            @ApiParam(name="is_warn",required = false,value="是否为离床报警(0 否 默认,1 是)")
            @RequestParam(value = "is_warn",required = false)String is_warn,
            HttpServletRequest request) {
            HttpServletRequest request) {
        try {
        try {
            //data 为字符串,格式为:  state,turn_over|state,turn_over|state, ... state和turn_over的
            // 含义见object.md 文档中sleepdatasleep
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("爱牵挂睡眠接收,请求参数:"+paraString);
            deviceService.bySleep(device,time_begin,heartrate,breath,turn_over,is_warn);
            return success();
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1,"Device data incoming failure");
        }
    }
    @ApiOperation("爱牵挂设备睡眠报告接收")
    @RequestMapping(value = "bySleepReport", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySleep(
            @ApiParam(name="device",required = false,value="睡眠带MAC地址",defaultValue = "")
            @RequestParam(value = "device",required = true) String device,
            @ApiParam(name="date",required = false,value="产生日期 YYYYMMDD")
            @RequestParam(value = "date",required = false) String date,
            @ApiParam(name="fallasleep",required = false,value="入睡时长 (分钟)")
            @RequestParam(value = "fallasleep",required = false) String fallasleep,
            @ApiParam(name="sleepTime",required = false,value="睡眠时长 (分钟)")
            @RequestParam(value = "sleepTime",required = false) String sleepTime,
            @ApiParam(name="restTime",required = false,value="休息时长 (分钟)")
            @RequestParam(value = "restTime",required = false) String restTime,
            @ApiParam(name="bed_status",required = false,value="在离床状态(0 离床,1 在床) ")
            @RequestParam(value = "bed_status",required = false) String bed_status,
            @ApiParam(name="awakeTime",required = false,value="清醒时长 (分钟)")
            @RequestParam(value = "awakeTime",required = false)String awakeTime,
            @ApiParam(name="lightTime",required = false,value="浅睡时长 (分钟)")
            @RequestParam(value = "lightTime",required = false)String lightTime,
            @ApiParam(name="remTime",required = false,value="rem时长  (分钟)")
            @RequestParam(value = "remTime",required = false)String remTime,
            @ApiParam(name="deepTime",required = false,value="深睡时长 (分钟) ")
            @RequestParam(value = "deepTime",required = false)String deepTime,
            @ApiParam(name="bucket",required = false,value="睡眠时段 ['18:00-18:21', '21:30-07:09'] ")
            @RequestParam(value = "bucket",required = false)String[] bucket,
            @ApiParam(name="avghr",required = false,value="平均心率 ")
            @RequestParam(value = "avghr",required = false)String avghr,
            @ApiParam(name="avgbr",required = false,value="平均呼吸率 ")
            @RequestParam(value = "avgbr",required = false)String avgbr,
            @ApiParam(name="awakePer",required = false,value="清醒百分比")
            @RequestParam(value = "awakePer",required = false)String awakePer,
            @ApiParam(name="remPer",required = false,value="rem百分比")
            @RequestParam(value = "remPer",required = false)String remPer,
            @ApiParam(name="lightPer",required = false,value="浅睡百分比")
            @RequestParam(value = "lightPer",required = false)String lightPer,
            @ApiParam(name="deepPer",required = false,value="深睡百分比")
            @RequestParam(value = "deepPer",required = false)String deepPer,
            @ApiParam(name="efficiency",required = false,value="睡眠效率")
            @RequestParam(value = "efficiency",required = false)String efficiency,
            @ApiParam(name="score",required = false,value="睡眠评分 <=0无睡眠数据,<60待改善,<70一般,<85良好 其他,非常好")
            @RequestParam(value = "score",required = false)String score,
            HttpServletRequest request) {
        try {
            String paraString = JSON.toJSONString(request.getParameterMap());
            String paraString = JSON.toJSONString(request.getParameterMap());
            logger.info("柏颐设备睡眠接收,请求参数:"+paraString);
            logger.info("爱牵挂睡眠接收,请求参数:"+paraString);
            deviceService.bySleep(imei,time_begin,time_end,interval,total,data);
            deviceService.bySleepReport(device,date,fallasleep,sleepTime,restTime,awakeTime,lightTime,remTime,deepTime,bucket,
                    avghr,avgbr,awakePer,remPer,lightPer,efficiency,score);
            return success();
            return success();
        } catch (Exception e) {
        } catch (Exception e) {
            e.printStackTrace();
            e.printStackTrace();

+ 24 - 9
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java

@ -537,18 +537,33 @@ public class DeviceService {
    }
    }
    /**
    /**
     *柏颐睡眠数据接收
     * @param imei 15位设备唯一序号
     * @param time_begin 发生时间YYYY-MM-DD HH:mm:SS
     * @param time_end 结束时间YYYY-MM-DD HH:mm:SS
     * @param interval 固定30分钟
     * @param total 检测次数
     * @param data 样例截取   睡眠数据 (格式:state,turn_over|state,turn_over|...) 含义见object.md 文档中sleepdatasleep
     *
     * @param device
     * @param time_begin
     * @param heartrate
     * @param breath
     * @param turn_over
     * @param is_warn
     */
     */
    @Async
    @Async
    public void bySleep(String imei,String time_begin,String time_end,int interval,int total,String data) {
    public void bySleep(String device,String time_begin,String heartrate,String breath,String turn_over,String is_warn) {
        try {
        try {
            if(StringUtils.isNotBlank(imei)){
            if(StringUtils.isNotBlank(device)){
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @Async
    public void bySleepReport(String device,String date,String fallasleep,String sleepTime,String restTime,String awakeTime,String lightTime,
                              String remTime,String deepTime,String[] bucket,String avghr,String avgbr,String awakePer,String remPer,String lightPer,
                              String efficiency,String score) {
        try {
            if(StringUtils.isNotBlank(device)){
            }
            }