linft hace 2 años
padre
commit
e134e07098

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabCheckOptionController.java

@@ -60,7 +60,7 @@ public class LabCheckOptionController extends BaseController {
      */
     @GetMapping("/listApp")
     @ApiOperation(value = "查询检查项选项列表-小程序")
-    public ResultData<List<LabCheckOption>> listApp(LabCheckOption labCheckOption) {
+    public ResultData<List<LabCheckOption>> lstApp(LabCheckOption labCheckOption) {
         List<LabCheckOption> list = labCheckOptionService.selectLabCheckOptionList(labCheckOption);
         return ResultData.success(list);
     }

+ 14 - 28
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabCheckRecordController.java

@@ -342,10 +342,10 @@ public class LabCheckRecordController extends BaseController {
         labCheckRecord.setIsFabu(1);//已发布的数据
         List<LabCheckRecord> list = labCheckRecordService.selectLabCheckRecordList(labCheckRecord);
 
-        Map<String,Object> maplist = new HashMap<String,Object>();
+        Map<String,Object> maplist = new HashMap<>();
         //按照日期对数据分组
         if(list!=null){
-            Map<String, List<LabCheckRecord>> map = new HashMap<String, List<LabCheckRecord>>();
+            Map<String, List<LabCheckRecord>> map = new HashMap<>();
             for (LabCheckRecord record : list) {
                 String date = DateUtils.dateTime(record.getCreateTime());
                 List<LabCheckRecord> tmpList = map.get(date);
@@ -353,10 +353,6 @@ public class LabCheckRecordController extends BaseController {
                     tmpList = new ArrayList<>();
                     tmpList.add(record);
                     map.put(date, tmpList);
-
-                    //maplist.put("list",tmpList);
-                    //maplist.put("date",date);
-
                 }else {
                     tmpList.add(record);
                 }
@@ -377,7 +373,7 @@ public class LabCheckRecordController extends BaseController {
     @GetMapping("/selectInfoByRoom")
     @ApiOperation(value = "小程序未安全检查列表")
     public ResultData selectInfoByRoom(String room,String name,String userName) {
-        Map<String,Object> map = new HashMap<String, Object>();
+        Map<String,Object> map = new HashMap<>();
 
         //获取当前登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
@@ -414,7 +410,7 @@ public class LabCheckRecordController extends BaseController {
     @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CHECKRECORD + PerFun.QUERY)
     @GetMapping("/recordDettailsList")
     public ResultData recordDettailsList( Long id) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getRecordDettailsList(id);
         return ResultData.success(map);
     }
@@ -426,7 +422,7 @@ public class LabCheckRecordController extends BaseController {
      */
     @GetMapping("/recordDettailsListApp")
     public ResultData recordDettailsListApp( Long id) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getRecordDettailsList(id);
         return ResultData.success(map);
     }
@@ -435,7 +431,7 @@ public class LabCheckRecordController extends BaseController {
         //获取当前登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
 
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         //检查记录
         LabCheckRecord labCheckRecord = labCheckRecordService.selectLabCheckRecordById(id);
         if(labCheckRecord==null){
@@ -443,14 +439,9 @@ public class LabCheckRecordController extends BaseController {
         }
         //判断负责人是否第一次查看
         if(sysUser.getUserId().equals(labCheckRecord.getFzrId()) && labCheckRecord.getFirstTime()==null ){
-            int flg= labCheckRecordService.updateFirstTimeById(labCheckRecord.getId());
+            labCheckRecordService.updateFirstTimeById(labCheckRecord.getId());
         }
 
-        //隐患详情
-        /*LabCheckRecordDetails labCheckRecordDetails = new LabCheckRecordDetails();
-        labCheckRecordDetails.setCheckId(id);
-        List<LabCheckRecordDetails> list= labCheckRecordDetailsService.selectLabCheckRecordDetailsList(labCheckRecordDetails);
-        */
         LabCheckRecordDetailsVO dzgDetailsVo = new LabCheckRecordDetailsVO();
         dzgDetailsVo.setCheckId(id);
         List<LabCheckRecordDetailsVO> list= labCheckRecordDetailsService.selectLabCheckRecordDetailsListVo(dzgDetailsVo);
@@ -483,7 +474,7 @@ public class LabCheckRecordController extends BaseController {
         //获取当前登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
 
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         //检查记录
         LabCheckRecord labCheckRecord = labCheckRecordService.selectLabCheckRecordById(id);
         if(labCheckRecord==null){
@@ -500,11 +491,6 @@ public class LabCheckRecordController extends BaseController {
         dzgDetailsVo.setIsZg(1L);//待整改
         dzgDetailsVo.setIsZgStatus(0);//不包含无法整改的数据
         List<LabCheckRecordDetailsVO> dzglist= labCheckRecordDetailsService.selectLabCheckRecordDetailsListVo(dzgDetailsVo);
-       /* //对象复制
-        LabCheckRecordVO checkRecordVO = new LabCheckRecordVO();
-        BeanUtils.copyProperties(checkRecordVO,labCheckRecord);
-        //添加整改项详情集合
-        checkRecordVO.setDetailsListVo(dzglist);*/
 
         if(dzglist.size()>0){
             LabCheckRecordDetailslog detailslog = new LabCheckRecordDetailslog();
@@ -575,7 +561,7 @@ public class LabCheckRecordController extends BaseController {
     public ResultData recordDettailsBh( Long id) {
         //获取当前登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
 
         //检查记录
         LabCheckRecord labCheckRecord = labCheckRecordService.selectLabCheckRecordById(id);
@@ -625,7 +611,7 @@ public class LabCheckRecordController extends BaseController {
     @GetMapping("/recordDettailsWc")
     public ResultData recordDettailsWc( Long id) {
         //获取当前登录用户信息
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
 
         //检查记录
         LabCheckRecord labCheckRecord = labCheckRecordService.selectLabCheckRecordById(id);
@@ -698,7 +684,7 @@ public class LabCheckRecordController extends BaseController {
     @GetMapping("/getLoginUserInfo")
     public ResultData getLoginUserInfo( ) {
 
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         //获取当前登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
 
@@ -726,7 +712,7 @@ public class LabCheckRecordController extends BaseController {
      */
     @GetMapping("/getCheckIdByoptionId")
     public ResultData getCheckIdByoptionId( Long jcxId) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         Long checkid=0L;
         boolean flg=false;
         //根据检查项id模糊匹配
@@ -909,7 +895,7 @@ public class LabCheckRecordController extends BaseController {
             throw new ServiceException("参数不能为空!");
         }
         // 参数 检查项checkId  ,实验室id laboratoryId
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map.put("laboratoryId",String.valueOf(laboratoryId));
         map.put("checkId", String.valueOf(checkId));
         List<LabCheckRecordVO> list = labCheckRecordService.selectHiddenDangerCount(map);
@@ -925,7 +911,7 @@ public class LabCheckRecordController extends BaseController {
             }
         }
 
-        Map<String, Object> backmap =new HashMap<String, Object>();
+        Map<String, Object> backmap =new HashMap<>();
         backmap.put("yhcount",list.size());
         backmap.put("yhlist",list);
         backmap.put("yhflg",flg);

+ 4 - 13
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabCheckRecordDetailsController.java

@@ -110,7 +110,7 @@ public class LabCheckRecordDetailsController extends BaseController {
     //@PreAuthorize(hasPermi = PerPrefix.LABORATORY_CHECKRECORDDETAILS + PerFun.QUERY)
     @GetMapping(value = "/getInfoById")
     public ResultData getInfoById( Long id) {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         //隐患项详情
         LabCheckRecordDetails details = labCheckRecordDetailsService.selectLabCheckRecordDetailsById(id);
 
@@ -275,7 +275,7 @@ public class LabCheckRecordDetailsController extends BaseController {
     @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CHECKRECORDDETAILS + PerFun.QUERY)
     @GetMapping("/dettailsList")
     public ResultData dettailsList( Long id) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getDettailsList(id);
         return ResultData.success(map);
     }
@@ -287,7 +287,7 @@ public class LabCheckRecordDetailsController extends BaseController {
      */
     @GetMapping("/dettailsListApp")
     public ResultData dettailsListApp( Long id) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getDettailsList(id);
         return ResultData.success(map);
     }
@@ -295,7 +295,7 @@ public class LabCheckRecordDetailsController extends BaseController {
      public   Map<String, Object> getDettailsList(Long id){
          //获取当前登录用户信息
          SysUser sysUser = tokenService.getLoginUser().getSysUser();
-         Map<String, Object> map =new HashMap<String, Object>();
+         Map<String, Object> map =new HashMap<>();
 
          //查询隐患项详情
          LabCheckRecordDetails details = labCheckRecordDetailsService.selectLabCheckRecordDetailsById(id);
@@ -379,15 +379,6 @@ public class LabCheckRecordDetailsController extends BaseController {
             //根据id查村实体
             labCheckRecordRelease =labCheckRecordReleaseService.selectLabCheckRecordReleaseById(labCheckRecordDetailsVO.getId());
         }
-        /*if(labCheckRecordRelease.getCheckId()!=null){
-            String[] strids=  labCheckRecordRelease.getCheckId().split(",");
-            //Long[] ids = new Long[strids.length];
-            List<Long> ids= new ArrayList<>();
-            for (int i=0;i<strids.length;i++){
-                ids.add(Long.valueOf(strids[i]));
-            }
-            labCheckRecordDetailsVO.setIds(ids);
-        }*/
 
         //查询该条发布的检查详情 查询除最新检查发布外的所有数据
         startPage();

+ 3 - 36
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabNotifyplanController.java

@@ -120,7 +120,7 @@ public class LabNotifyplanController extends BaseController
     public ResultData listCollegeJh(LabNotifyplanVO labNotifyplan, HttpServletRequest request)
     {
         startPage();
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         labNotifyplan.setType(2);//计划类型
         labNotifyplan.setRemark("1");//解析xecel
         List<LabNotifyplanVO> list = labNotifyplanService.selectLabNotifyplanListVO(labNotifyplan,request);
@@ -137,7 +137,7 @@ public class LabNotifyplanController extends BaseController
     public ResultData listIndexJh(LabNotifyplanVO labNotifyplan, HttpServletRequest request)
     {
         startPage();
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         labNotifyplan.setType(2);//计划类型
         labNotifyplan.setRemark("1");//解析xecel
         List<LabNotifyplanVO> list = labNotifyplanService.selectLabNotifyplanListVO(labNotifyplan,request);
@@ -153,7 +153,7 @@ public class LabNotifyplanController extends BaseController
     @GetMapping("/listIndexJhDetals")
     public ResultData listIndexJhDetals(LabNotifyplanVO labNotifyplan, HttpServletRequest request)
     {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         labNotifyplan.setType(2);//计划类型
         labNotifyplan.setRemark("1");//解析xecel
         List<LabNotifyplanVO> list = labNotifyplanService.listIndexJhDetals(labNotifyplan,request);
@@ -161,24 +161,6 @@ public class LabNotifyplanController extends BaseController
         return ResultData.success(map);
     }
 
-   /* public static InputStream byteByUrl(String urlOrPath) throws IOException {
-        InputStream in = null;
-        byte[] bytes;
-        if (urlOrPath.toLowerCase().startsWith("https")) {
-            bytes = HttpsUtils.doGet(urlOrPath);
-        } else if (urlOrPath.toLowerCase().startsWith("http")) {
-            URL url = new URL(urlOrPath);
-            return url.openStream();
-        } else {
-            File file = new File(urlOrPath);
-            if (!file.isFile() || !file.exists() || !file.canRead()) {
-                return null;
-            }
-            return new FileInputStream(file);
-        }
-        return new ByteArrayInputStream(bytes);
-    }*/
-
     /**
      * 导出大屏通知计划列表
      */
@@ -213,21 +195,6 @@ public class LabNotifyplanController extends BaseController
     @PostMapping
     public ResultData add(@RequestBody LabNotifyplan labNotifyplan,HttpServletRequest request)
     {
-        //大屏通知发布
-        /* `title`   '通知标题',
-        `notify_type` '通知类型 1工作通知 2校院通知  ',
-        `type` '1大屏通知  ',
-        `content`   '内容',
-        `company`   '发布单位',*/
-
-        //大屏工作计划发布
-        /* `title`   '标题',
-        `type` '2工作计划  ',
-        `content`   '内容',
-        `company`   '发布单位',
-        `content_name`   '工作计划文件名称',
-        `content_url`   '附件地址',
-        */
         return ResultData.result(labNotifyplanService.insertLabNotifyplan(labNotifyplan,request));
     }
 

+ 8 - 29
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecurityApplyController.java

@@ -250,7 +250,7 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/getDetails")
     public ResultData  getDetails( Long id)
     {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getDetailsById(id);
         return ResultData.success(map);
     }
@@ -263,13 +263,13 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/getDetailsApp")
     public ResultData  getDetailsApp( Long id)
     {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         map = getDetailsById(id);
         return ResultData.success(map);
     }
 
     public Map<String, Object> getDetailsById( Long id){
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         //查询申请信息
         LabSecurityApplyVO labSecurityApply= labSecurityApplyService.selectLabSecurityApplyById(id);
 
@@ -277,14 +277,6 @@ public class LabSecurityApplyController extends BaseController
         R<SysUser> rDate =remoteUserService.getUserInfoByUserId(labSecurityApply.getUserId(), SecurityConstants.INNER);
         SysUser  sysUser = rDate.getData();
 
-        /*if("login".equals(userType)){
-            //查询登录用户信息
-            sysUser = tokenService.getLoginUser().getSysUser();
-        }else{
-            //根据id查询用户信息
-            ResultData<SysUser> rDate =remoteUserService.getUserInfoByUserId(labSecurityApply.getUserId(), SecurityConstants.INNER);
-            sysUser = rDate.getData();
-        }*/
         List<LabSecurityMaterialDataVO> listTemp=Collections.emptyList();//模板
         List<Map<String, Object>> listcert = Collections.emptyList();//学生考试证数
         List<Map<String, Object>> fzrsysUser = Collections.emptyList();//实验室负责人
@@ -313,19 +305,6 @@ public class LabSecurityApplyController extends BaseController
                     lmr.setApplyId(labSecurityApply.getId());
                     lmr.setMaterialId(listTemp.get(i).getId());
                     List<LabSecurityMaterialrelation>  list =iLabSecurityMaterialrelationService.selectLabSecurityMaterialrelationList(lmr);
-//                    for(LabSecurityMaterialrelation materialrelation: list){
-//                        String splitUrl[]=materialrelation.getDataUrl().split(",");
-//                        String finalUrl="";
-//                        for(String sp:splitUrl){
-//                            String dataUrl[]=sp.split(";");
-//                            String newUrl=fileConfigUtils.getRemoteUrl().replace("http","https")+"/"+dataUrl[1];
-//                            newUrl= UrlFormatUtils.getHttpsORHttpUrl(newUrl);
-//                            String newDataUrl=dataUrl[0]+";"+newUrl;
-//                            finalUrl+=newDataUrl+",";
-//                        }
-//                        finalUrl=finalUrl.substring(0,finalUrl.length()-1);
-//                        materialrelation.setDataUrl(finalUrl);
-//                    }
                     listTemp.get(i).setListMr(list);
                 }
             }
@@ -420,7 +399,7 @@ public class LabSecurityApplyController extends BaseController
      */
     @GetMapping("/materialApply")
     public ResultData materialApply(Long subjectId,String remark,String beginTime, String endTime ) {
-        Map<String, Object> map =new HashMap<String, Object>();
+        Map<String, Object> map =new HashMap<>();
         //获取当前登录用户信息
         SysUser tokensysUser = tokenService.getLoginUser().getSysUser();
 
@@ -552,7 +531,7 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/getUserTemplate")
     public ResultData getUserTemplate(Long subjectId)
     {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         //获取登录用户信息
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
         List<LabSecurityMaterialDataVO> listTeacher=Collections.emptyList();//教职工
@@ -640,7 +619,7 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/listSchoolApplyColumn")
     public ResultData listSchoolApplyColumn()
     {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         LabSecurityApply labSecurityApply = new LabSecurityApply();
         //通过
         //labSecurityApply.setAuditStatus(2);
@@ -655,7 +634,7 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/listCollegeApplyColumn")
     public ResultData listCollegeApplyColumn()
     {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         LabSecurityApply labSecurityApply = new LabSecurityApply();
         //通过
         //labSecurityApply.setAuditStatus(2);
@@ -690,7 +669,7 @@ public class LabSecurityApplyController extends BaseController
     @GetMapping(value = "/listSchoolColumn")
     public ResultData listSchoolColumn()
     {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         LabSecurityApply labSecurityApply = new LabSecurityApply();
         //申请
         List<Map<String, Object>> listSq = labSecurityApplyService.selectApplyListSchoolColumn(labSecurityApply);

+ 1 - 6
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecurityMaterialDataController.java

@@ -138,14 +138,9 @@ public class LabSecurityMaterialDataController extends BaseController
      */
     @GetMapping("/listTemplate")
     public ResultData  listTemplate(Long subjectId) {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
         List<LabSecurityMaterialDataVO> listTeacher= labSecurityMaterialDataService.selectLabSecurityMaterialDataTeacher(subjectId);
         List<LabSecurityMaterialDataVO> listStudent= labSecurityMaterialDataService.selectLabSecurityMaterialDataStudent(subjectId);
-
-        /* //教职工模板
-        List<LabSecuritySubjectmaterialVO> listTeacher=  labSecuritySubjectmaterialService.selectTeacherList();
-        //学生模板
-        List<LabSecuritySubjectmaterialVO> listStudent=  labSecuritySubjectmaterialService.selectStudentList();*/
         map.put("listTeacher",listTeacher);
         map.put("listStudent",listStudent);
         return ResultData.success(map);

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecuritySubjectmaterialController.java

@@ -154,7 +154,7 @@ public class LabSecuritySubjectmaterialController extends BaseController
      */
     @GetMapping("/listData")
     public ResultData  listData(LabSecurityMaterialDataVO materialDataVO) {
-        Map<String,Object> map = new HashMap<String,Object>();
+        Map<String,Object> map = new HashMap<>();
          List<LabSecurityMaterialDataVO> listTeacher= labSecurityMaterialDataService.selectTemplateTeacherList();
          List<LabSecurityMaterialDataVO> listStudent= labSecurityMaterialDataService.selectTemplateStudentList();
 

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/SubDiyVO.java

@@ -93,7 +93,7 @@ public class SubDiyVO {
 
 
     @ApiModelProperty("所属测点功能列表")
-    volatile private List<SensorFunctionStatus> sensorFunctionList= Collections.emptyList();
+    private List<SensorFunctionStatus> sensorFunctionList= Collections.emptyList();
 
 
     @ApiModelProperty("所属设备列表")

+ 4 - 7
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/netty/ChannelMap.java

@@ -1,7 +1,6 @@
 package com.zd.laboratory.netty;
 
 import io.netty.channel.ChannelHandlerContext;
-
 import java.util.concurrent.ConcurrentHashMap;
 
 public class ChannelMap {
@@ -9,17 +8,15 @@ public class ChannelMap {
     /**
      * 存放客户端标识ID(消息ID)与channel的对应关系
      */
-    private static volatile ConcurrentHashMap<String, ChannelHandlerContext> channelMap = new ConcurrentHashMap<>();
+    private static ConcurrentHashMap<String, ChannelHandlerContext> channelMap = new ConcurrentHashMap<>();
 
     private ChannelMap() {
     }
 
     public static ConcurrentHashMap<String, ChannelHandlerContext> getChannelMap() {
-        if (null == channelMap) {
-            synchronized (ChannelMap.class) {
-                if (null == channelMap) {
-                    channelMap = new ConcurrentHashMap<>();
-                }
+        synchronized(channelMap) {
+            if (null == channelMap) {
+                channelMap = new ConcurrentHashMap<>();
             }
         }
         return channelMap;

+ 3 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabCheckMachineMsgServiceImpl.java

@@ -90,13 +90,13 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
             labCheckRecordDetails.setCheckId(checkMachineMsg.getCheckRecordId());
             checkMachineMsg.setDetails(labCheckRecordDetailsService.selectLabCheckRecordDetailsList(labCheckRecordDetails));
 
+            String checkDateStr = null;
             LabCheckRecord labCheckRecord = labCheckRecordService.selectLabCheckRecordById(checkMachineMsg.getCheckRecordId());
             if (labCheckRecord != null) {
                 checkMachineMsg.setCheckRecord(labCheckRecord);
+                checkDateStr = DateUtil.format(labCheckRecord.getCreateTime(), "yyyy年MM月dd日");
 
             }
-            String checkDateStr = DateUtil.format(labCheckRecord.getCreateTime(), "yyyy年MM月dd日");
-
             String str = "  学院于check_date对你实验室实施了安全管理现场检查,共发现了count个整改项(见整改详情)。请逐一对照、分析原因、采取有效措施实施整改,并于check_date在系统里提交整改证明材料和整改报告。\n" +
                     "  请你实验室务必高度重视,积极采取有效措施,切实加强对实验室的安全管理。同时,要举一反三,对实验室定期开展安全自查与整改,不断提升实验室安全工作水平。";
             str = str.replaceAll("check_date", checkDateStr).replaceAll("count", checkMachineMsg.getDetails().size() + "");
@@ -366,7 +366,7 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                 logger.error("发送消息通知失败,ID无效");
             }
             // 查询实验室负责人
-            Long userId = checkRecord.getFzrId();
+            Long userId = checkRecord != null ? checkRecord.getFzrId():null;
 
             LabCheckMachineMsg labCheckMachineMsg = null;
             LabMessageContent labMessageContent = null;

+ 1 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabExitLineServiceImpl.java

@@ -483,8 +483,7 @@ public class LabExitLineServiceImpl implements ILabExitLineService
                 logger.info("打开疏散指示灯:{},{},{}", lineJoin.getRelayCode(), lineJoin.getRelayBit(), "发送成功");
                 try {
                     Thread.sleep(500);
-                } catch (InterruptedException e) {
-                    //e.printStackTrace();
+                } catch (Exception e) {
                     logger.error("打开疏散指示灯异常", e);
                 }
             }

+ 2 - 4
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/utils/FireLaborUtil.java

@@ -19,10 +19,8 @@ public class FireLaborUtil {
     //36个寄存器查询地址
     private static final  String All_REGISTER="00 24";
 
-    //private static final  String
 
-
-    public static final Map<String, String> statusMap = new HashMap<String, String>();
+    public static final Map<String, String> statusMap = new HashMap<>();
     static {
         statusMap.put("00","无事件");
         statusMap.put("01","火警");
@@ -35,7 +33,7 @@ public class FireLaborUtil {
      * 静态map,用于存储 寄存器状态说明
      *
      */
-    public static final Map<Integer, String> myMap_0 = new HashMap<Integer, String>();
+    public static final Map<Integer, String> myMap_0 = new HashMap<>();
     static {
         myMap_0.put(1, "01 02");
         myMap_0.put(2, "03 04");