|
|
@@ -9,9 +9,12 @@ import com.zd.laboratory.api.entity.SensorFunctionStatus;
|
|
|
import com.zd.laboratory.api.vo.HardwareCVO;
|
|
|
import com.zd.laboratory.api.vo.SenseValVO;
|
|
|
import com.zd.laboratory.domain.FaceVO;
|
|
|
+import com.zd.laboratory.domain.LabCheckMachineMsg;
|
|
|
import com.zd.laboratory.domain.LabRotationChart;
|
|
|
import com.zd.laboratory.domain.dto.LabHazardDTO;
|
|
|
import com.zd.laboratory.domain.dto.LabHazardNewVo;
|
|
|
+import com.zd.laboratory.domain.vo.LabMessageContentVO;
|
|
|
+import com.zd.laboratory.domain.vo.LabMessageGroupVO;
|
|
|
import com.zd.laboratory.domain.vo.SubLayoutVO;
|
|
|
import com.zd.laboratory.domain.vo.SubSimpleVO;
|
|
|
import com.zd.laboratory.mapper.LabHazardMapper;
|
|
|
@@ -24,6 +27,8 @@ import com.zd.model.constant.HttpStatus;
|
|
|
import com.zd.model.constant.SecurityConstants;
|
|
|
import com.zd.model.domain.R;
|
|
|
import com.zd.model.domain.ResultData;
|
|
|
+import com.zd.model.domain.per.PerFun;
|
|
|
+import com.zd.model.domain.per.PerPrefix;
|
|
|
import com.zd.model.entity.SysUser;
|
|
|
import com.zd.model.enums.HardwareTypeEnum;
|
|
|
import com.zd.model.enums.SignEnum;
|
|
|
@@ -41,8 +46,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -101,6 +105,12 @@ public class OneMachineController extends BaseController {
|
|
|
@Autowired
|
|
|
private SubMessageSendManager messageSendService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ILabMessageContentService labMessageContentService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ILabCheckMachineMsgService labCheckMachineMsgService;
|
|
|
+
|
|
|
// /**
|
|
|
// * 最低危险等级
|
|
|
// */
|
|
|
@@ -441,4 +451,62 @@ public class OneMachineController extends BaseController {
|
|
|
return oneMachineService.lotPostSignIn(code, faceVO.getData());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询消息发布列表
|
|
|
+ */
|
|
|
+ @GetMapping("/{subId}/newMsg")
|
|
|
+ public TableDataInfo newMsg(@PathVariable("subId") Long subId) {
|
|
|
+ startPage();
|
|
|
+ List<LabMessageContentVO> list = labMessageContentService.selectLabNewMessageContentVOList(subId);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询整改消息最新列表
|
|
|
+ */
|
|
|
+ @GetMapping("/{subId}/checkNewMsg")
|
|
|
+ public TableDataInfo checkNewMsg(@PathVariable("subId") Long subId) {
|
|
|
+ startPage();
|
|
|
+ List<LabCheckMachineMsg> list = labCheckMachineMsgService.selectCheckNewMsgBySubId(subId);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询组合消息滚动
|
|
|
+ */
|
|
|
+ @GetMapping("/{subId}/newMsgGroup")
|
|
|
+ public ResultData newMsgGroup(@PathVariable("subId") Long subId) {
|
|
|
+ List<LabMessageGroupVO> messageGroupVOList = new ArrayList <>();
|
|
|
+
|
|
|
+ List<LabMessageContentVO> msgList = labMessageContentService.selectLabNewMessageContentVOList(subId);
|
|
|
+ Optional.ofNullable(msgList).orElseGet(Collections::emptyList)
|
|
|
+ .stream()
|
|
|
+ .forEach(a->{
|
|
|
+ LabMessageGroupVO labMessageGroupVO = new LabMessageGroupVO();
|
|
|
+ labMessageGroupVO.setId(a.getId());
|
|
|
+ labMessageGroupVO.setMessContent(a.getContent());
|
|
|
+ labMessageGroupVO.setMessType(1);
|
|
|
+ labMessageGroupVO.setCreateTime(a.getCreateTime());
|
|
|
+ messageGroupVOList.add(labMessageGroupVO);
|
|
|
+ });
|
|
|
+ List<LabCheckMachineMsg> checkList = labCheckMachineMsgService.selectCheckNewMsgBySubId(subId);
|
|
|
+ Optional.ofNullable(checkList).orElseGet(Collections::emptyList)
|
|
|
+ .stream()
|
|
|
+ .forEach(b->{
|
|
|
+ LabMessageGroupVO labMessageGroupVO = new LabMessageGroupVO();
|
|
|
+ labMessageGroupVO.setId(b.getId());
|
|
|
+ labMessageGroupVO.setMessContent(b.getCheckMsg());
|
|
|
+ labMessageGroupVO.setMessType(2);
|
|
|
+ labMessageGroupVO.setCreateTime(b.getCreateTime());
|
|
|
+ messageGroupVOList.add(labMessageGroupVO);
|
|
|
+ });
|
|
|
+
|
|
|
+ return ResultData.success(Optional.ofNullable(messageGroupVOList).orElseGet(Collections::emptyList)
|
|
|
+ .stream()
|
|
|
+ .sorted(Comparator.comparing(LabMessageGroupVO::getCreateTime).reversed())
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+
|
|
|
}
|