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

智能烟感接口、报警列表

zhj преди 2 години
родител
ревизия
2697105676

+ 7 - 0
src/main/java/com/welampiot/common/InterfaceResultEnum.java

@@ -77,6 +77,13 @@ public enum InterfaceResultEnum {
     TILT_ADDRESS_UNIQUE_ERROR("0270","倾斜监测设备地址重复","",""),
     LACK_PROTOCOL_TYPE_ERROR("0271","请选择协议类型","",""),
     COMMAND_FAIL("0272","指令失败","Command failure","Команда не работает"),
+    LACK_SMOKE_SENSATION_MODEL_ERROR("0273","烟感型号不能为空","The smoke sensor model cannot be empty","Модель дыма не может быть пустой"),
+    LACK_SMOKE_SENSATION_NUMBER_ERROR("0274","烟感编号不能为空","The smoke sensor number cannot be empty","Номер сигареты не может быть пустым"),
+    SMOKE_SENSATION_NUMBER_UNIQUE_ERROR("0275","烟感编号重复!","The smoke sensor number is duplicate","Номер табака повторяется"),
+    LACK_SMOKE_SENSATION_NAME_ERROR("0276","烟感名称不能为空","The smoke sensor name cannot be empty","Имя табака не может быть пустым"),
+    SMOKE_SENSATION_NAME_UNIQUE_ERROR("0277","烟感名称重复!","The smoke sensor name is duplicate","Курение повторяется"),
+    LACK_SMOKE_SENSATION_ADDRESS_ERROR("0278","烟感地址不能为空","The smoke sensor address cannot be empty","Адрес табака не может быть пустым"),
+    SMOKE_SENSATION_ADDRESS_UNIQUE_ERROR("0279","烟感地址重复!","The smoke sensor address is duplicate","Повторите адрес"),
     ;
     private String code;
     private String msgCn;

+ 150 - 0
src/main/java/com/welampiot/controller/AlarmController.java

@@ -0,0 +1,150 @@
+package com.welampiot.controller;
+
+import com.welampiot.common.BaseResult;
+import com.welampiot.common.InterfaceResultEnum;
+import com.welampiot.dto.AllAlarmInfoLogDTO;
+import com.welampiot.service.AllAlarmInfoLogService;
+import com.welampiot.utils.ToolUtils;
+import com.welampiot.vo.AllAlarmInfoLogVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * ClassName: AlarmController
+ * Package: com.welampiot.controller
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 11:00
+ * @Version: v1.0
+ */
+@RestController
+@CrossOrigin
+@RequestMapping("/alarm")
+public class AlarmController {
+    @Autowired
+    private AllAlarmInfoLogService allAlarmInfoLogService;
+
+    @Autowired
+    private ToolUtils toolUtils;
+
+    /**
+     * 获取告警列表
+     * @param request status、devType
+     * @return 告警列表
+     */
+    @RequestMapping(value = "getList", method = RequestMethod.POST)
+    public BaseResult<?> getList(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        int status = (int) toolUtils.getRequestContent(request,"status",1);
+        int devType = (int) toolUtils.getRequestContent(request,"devType",1);
+        int page = request.getParameter("page") == null ? 1 : Integer.parseInt(request.getParameter("page"));
+        int count = request.getParameter("count") == null ? 16 : Integer.parseInt(request.getParameter("count"));
+        String keyword = (String) toolUtils.getRequestContent(request,"keyword",2);
+
+        AllAlarmInfoLogVO allAlarmInfoLogVO = new AllAlarmInfoLogVO();
+        allAlarmInfoLogVO.setVersion(version);
+        allAlarmInfoLogVO.setOffset(count * (page - 1));
+        allAlarmInfoLogVO.setLimit(count);
+        allAlarmInfoLogVO.setStatus(status);
+        allAlarmInfoLogVO.setDevType(devType);
+        allAlarmInfoLogVO.setKeyword(keyword);
+        allAlarmInfoLogVO.setSectionList(toolUtils.getSectionList(request));
+        List<AllAlarmInfoLogDTO> allAlarmInfoLogList = allAlarmInfoLogService.getListByAllAlarmInfoLogVO(allAlarmInfoLogVO);
+        List<AllAlarmInfoLogDTO> list = new ArrayList<>();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        allAlarmInfoLogList.forEach(allAlarmInfoLogDTO -> {
+            if (allAlarmInfoLogDTO.getArea() == null) {
+                allAlarmInfoLogDTO.setArea("");
+            }
+            if (allAlarmInfoLogDTO.getSection() == null) {
+                allAlarmInfoLogDTO.setSection("");
+            }
+            if (allAlarmInfoLogDTO.getName() == null) {
+                allAlarmInfoLogDTO.setName("");
+            }
+            if (allAlarmInfoLogDTO.getDevType() == null) {
+                allAlarmInfoLogDTO.setDevType(0);
+            }
+            if (allAlarmInfoLogDTO.getDType() == null) {
+                allAlarmInfoLogDTO.setDType(0);
+            }
+            if (allAlarmInfoLogDTO.getStrAlarmType() == null) {
+                allAlarmInfoLogDTO.setStrAlarmType("");
+            }
+            if (allAlarmInfoLogDTO.getStatus() == null) {
+                allAlarmInfoLogDTO.setStatus(0);
+            }
+            if (allAlarmInfoLogDTO.getNumber() == null) {
+                allAlarmInfoLogDTO.setNumber("000000");
+            }
+            if (allAlarmInfoLogDTO.getUpdateTime() != null && !allAlarmInfoLogDTO.getUpdateTime().equals("")){
+                Date cmdTime;
+                try {
+                    cmdTime = simpleDateFormat.parse(allAlarmInfoLogDTO.getUpdateTime());
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+                //判断时区,为null默认东八区
+                long timezone = allAlarmInfoLogDTO.getTimezone() == null ? 8 : allAlarmInfoLogDTO.getTimezone();
+                long l = cmdTime.getTime() + timezone * 3600 * 1000;
+                cmdTime = new Date(l);
+                allAlarmInfoLogDTO.setUpdateTime(simpleDateFormat.format(cmdTime));
+            }else {
+                allAlarmInfoLogDTO.setUpdateTime("");
+            }
+            list.add(allAlarmInfoLogDTO);
+        });
+        AllAlarmInfoLogVO allAlarmInfoLogVO1 = new AllAlarmInfoLogVO();
+        allAlarmInfoLogVO1.setList(list);
+        allAlarmInfoLogVO1.setUnTreatedCount(allAlarmInfoLogService.getUnTreatedCountByStatus(allAlarmInfoLogVO));
+        allAlarmInfoLogVO1.setProcessingCount(allAlarmInfoLogService.getProcessingCountByStatus(allAlarmInfoLogVO));
+        allAlarmInfoLogVO1.setHandleCount(allAlarmInfoLogService.getHandleCountByStatus(allAlarmInfoLogVO));
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,allAlarmInfoLogVO1);
+    }
+
+    /**
+     * 标记处理
+     * @param request alarmId
+     * @return 修改status为2
+     */
+    @RequestMapping(value = "sign", method = RequestMethod.POST)
+    public BaseResult<?> sign(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        int alarmId = (int) toolUtils.getRequestContent(request,"alarmId",1);
+        if (alarmId == 0) return toolUtils.response(InterfaceResultEnum.LACK_PARAM_ERROR,version);
+        AllAlarmInfoLogDTO allAlarmInfoLogDTO = new AllAlarmInfoLogDTO();
+        allAlarmInfoLogDTO.setId(alarmId);
+        allAlarmInfoLogDTO.setStatus(2);
+        allAlarmInfoLogService.updateAlarmStatusByAlarmId(allAlarmInfoLogDTO);
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
+    }
+
+    /**
+     * 获取故障信息
+     * @param request 路段筛选
+     * @return 故障总数,未指派、处理中、已完成数
+     */
+    @RequestMapping(value = "data", method = RequestMethod.POST)
+    public BaseResult<?> data(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        AllAlarmInfoLogVO allAlarmInfoLogVO = new AllAlarmInfoLogVO();
+        allAlarmInfoLogVO.setSectionList(toolUtils.getSectionList(request));
+        AllAlarmInfoLogVO allAlarmInfoLogVO1 = new AllAlarmInfoLogVO();
+        allAlarmInfoLogVO1.setUnTreatedCount(allAlarmInfoLogService.getUnTreatedCountByStatus(allAlarmInfoLogVO));
+        allAlarmInfoLogVO1.setProcessingCount(allAlarmInfoLogService.getProcessingCountByStatus(allAlarmInfoLogVO));
+        allAlarmInfoLogVO1.setHandleCount(allAlarmInfoLogService.getHandleCountByStatus(allAlarmInfoLogVO));
+        allAlarmInfoLogVO1.setTotal(allAlarmInfoLogService.getAlarmTotalByStatus(allAlarmInfoLogVO));
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,allAlarmInfoLogVO1);
+    }
+}

+ 0 - 10
src/main/java/com/welampiot/controller/ElectricBoxController.java

@@ -443,16 +443,6 @@ public class ElectricBoxController {
                         sum--;
                     }
                 }
-                if (size == sum) {
-                    for (String airSwitchId : split) {
-                        int l = Integer.parseInt(airSwitchId);
-                        AirSwitchInfoDTO dto = new AirSwitchInfoDTO();
-                        dto.setId(l);
-                        dto.setPolicyId(0);
-                        dto.setControlType(0);
-                        loopPolicyCmdService.updateAirSwitchPolicyByDTO(dto);
-                    }
-                }
                 if (size == sum) {
                     return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
                 } else {

+ 174 - 0
src/main/java/com/welampiot/controller/SmokeSensationController.java

@@ -0,0 +1,174 @@
+package com.welampiot.controller;
+
+import com.welampiot.common.BaseResult;
+import com.welampiot.common.InterfaceResultEnum;
+import com.welampiot.dto.SmokeSensationDevInfoDTO;
+import com.welampiot.service.SmokeSensationDevInfoService;
+import com.welampiot.utils.ToolUtils;
+import com.welampiot.vo.SmokeSensationDevInfoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationController
+ * Package: com.welampiot.controller
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 15:41
+ * @Version: v1.0
+ */
+@RestController
+@CrossOrigin
+@RequestMapping("/smokeSensation")
+public class SmokeSensationController {
+    @Autowired
+    private SmokeSensationDevInfoService smokeSensationDevInfoService;
+
+    @Autowired
+    private ToolUtils toolUtils;
+
+    /**
+     * 获取智能烟感列表
+     * @param request 分页,关键字,路段筛选
+     * @return 返回智能烟感列表
+     */
+    @RequestMapping(value = "/getList", method = RequestMethod.POST)
+    public BaseResult<?> getList(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        int online = (int) toolUtils.getRequestContent(request,"online",1);
+        int page = request.getParameter("page") == null ? 1 : Integer.parseInt(request.getParameter("page"));
+        int count = request.getParameter("count") == null ? 16 : Integer.parseInt(request.getParameter("count"));
+        String keyword = (String) toolUtils.getRequestContent(request,"keyword",2);
+
+        SmokeSensationDevInfoDTO smokeSensationDevInfoDTO = new SmokeSensationDevInfoDTO();
+        smokeSensationDevInfoDTO.setPage(count * (page - 1));
+        smokeSensationDevInfoDTO.setCount(count);
+        smokeSensationDevInfoDTO.setKeyword(keyword);
+        smokeSensationDevInfoDTO.setOnline(online);
+        smokeSensationDevInfoDTO.setSectionList(toolUtils.getSectionList(request));
+        SmokeSensationDevInfoVO smokeSensationDevInfoVO = smokeSensationDevInfoService.getListBySmokeSensationDevInfoDTO(smokeSensationDevInfoDTO);
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,smokeSensationDevInfoVO);
+    }
+
+    /**
+     * 添加编辑智能烟感
+     * @param request 有id编辑,无id添加
+     * @return 更新数据
+     */
+    @RequestMapping(value = "save", method = RequestMethod.POST)
+    public BaseResult<?> save(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        int id = (int) toolUtils.getRequestContent(request,"id",1);
+        int model = (int) toolUtils.getRequestContent(request,"model",1);
+        int areaId = (int) toolUtils.getRequestContent(request,"areaId",1);
+        int sectionId = (int) toolUtils.getRequestContent(request,"sectionId",1);
+        String number = (String) toolUtils.getRequestContent(request,"number",2);
+        String name = (String) toolUtils.getRequestContent(request,"name",2);
+        String address = (String) toolUtils.getRequestContent(request,"address",2);
+        String longitude = (String) toolUtils.getRequestContent(request,"longitude",2);
+        String latitude = (String) toolUtils.getRequestContent(request,"latitude",2);
+
+        SmokeSensationDevInfoDTO smokeSensationDevInfoDTO = new SmokeSensationDevInfoDTO();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        smokeSensationDevInfoDTO.setModel(model);
+        smokeSensationDevInfoDTO.setAreaId(areaId);
+        smokeSensationDevInfoDTO.setSectionId(sectionId);
+        smokeSensationDevInfoDTO.setNumber(number);
+        smokeSensationDevInfoDTO.setName(name);
+        smokeSensationDevInfoDTO.setAddress(address);
+        smokeSensationDevInfoDTO.setLongitude(longitude);
+        smokeSensationDevInfoDTO.setLatitude(latitude);
+        smokeSensationDevInfoDTO.setUpdateTime(simpleDateFormat.format(System.currentTimeMillis()));
+        if (id == 0) { // 添加
+            smokeSensationDevInfoDTO.setCreateTime(simpleDateFormat.format(System.currentTimeMillis()));
+            if (String.valueOf(model).length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_MODEL_ERROR,version);
+            if (areaId == 0) return toolUtils.response(InterfaceResultEnum.LACK_AREA_ERROR,version);
+            if (sectionId == 0) return toolUtils.response(InterfaceResultEnum.LACK_SECTION_ERROR,version);
+            if (number == null || number.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_NUMBER_ERROR,version);
+            if (name == null || name.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_NAME_ERROR,version);
+            if (address == null || address.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_ADDRESS_ERROR,version);
+
+            SmokeSensationDevInfoDTO dto = new SmokeSensationDevInfoDTO();
+            dto.setSectionId(sectionId);
+            dto.setName(name);
+            if (smokeSensationDevInfoService.findSmokeSensationByDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_NAME_UNIQUE_ERROR,version);
+            dto = new SmokeSensationDevInfoDTO();
+            dto.setSectionId(sectionId);
+            dto.setNumber(number);
+            if (smokeSensationDevInfoService.findSmokeSensationByDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_NUMBER_UNIQUE_ERROR,version);
+            dto = new SmokeSensationDevInfoDTO();
+            dto.setAddress(address);
+            if (smokeSensationDevInfoService.findAddressBySmokeSensationDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_ADDRESS_UNIQUE_ERROR,version);
+            smokeSensationDevInfoService.addSmokeSensationDataByDTO(smokeSensationDevInfoDTO);
+        } else { // 编辑
+            smokeSensationDevInfoDTO.setId(id);
+            if (String.valueOf(model).length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_MODEL_ERROR,version);
+            if (areaId == 0) return toolUtils.response(InterfaceResultEnum.LACK_AREA_ERROR,version);
+            if (sectionId == 0) return toolUtils.response(InterfaceResultEnum.LACK_SECTION_ERROR,version);
+            if (number == null || number.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_NUMBER_ERROR,version);
+            if (name == null || name.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_NAME_ERROR,version);
+            if (address == null || address.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_SMOKE_SENSATION_ADDRESS_ERROR,version);
+
+            SmokeSensationDevInfoDTO dto = new SmokeSensationDevInfoDTO();
+            dto.setId(id);
+            dto.setSectionId(sectionId);
+            dto.setName(name);
+            if (smokeSensationDevInfoService.findSmokeSensationByDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_NAME_UNIQUE_ERROR,version);
+            dto = new SmokeSensationDevInfoDTO();
+            dto.setId(id);
+            dto.setSectionId(sectionId);
+            dto.setNumber(number);
+            if (smokeSensationDevInfoService.findSmokeSensationByDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_NUMBER_UNIQUE_ERROR,version);
+            dto = new SmokeSensationDevInfoDTO();
+            dto.setId(id);
+            dto.setAddress(address);
+            if (smokeSensationDevInfoService.findAddressBySmokeSensationDTO(dto) > 0)
+                return toolUtils.response(InterfaceResultEnum.SMOKE_SENSATION_ADDRESS_UNIQUE_ERROR,version);
+            smokeSensationDevInfoService.updateSmokeSensationDataByDTO(smokeSensationDevInfoDTO);
+        }
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
+    }
+
+    /**
+     * 删除烟感
+     * @param request id
+     * @return 删除成功
+     */
+    @RequestMapping(value = "del")
+    public BaseResult<?> del(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        String id = (String) toolUtils.getRequestContent(request,"id",2);
+        if (id == null || id.length() == 0) return toolUtils.response(InterfaceResultEnum.LACK_PARAM_ERROR,version);
+        List<String> smokeIds = Arrays.asList(id.split(","));
+        smokeSensationDevInfoService.deleteSmokeSensationById(smokeIds);
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version);
+    }
+
+    /**
+     * 智能烟感设备概览
+     * @param request 路段筛选
+     * @return 总数,正常、故障、报警、在线、新建数
+     */
+    @RequestMapping(value = "data", method = RequestMethod.POST)
+    public BaseResult<?> data(HttpServletRequest request) {
+        int version = (int) toolUtils.getRequestContent(request,"version",1);
+        SmokeSensationDevInfoDTO smokeSensationDevInfoDTO = new SmokeSensationDevInfoDTO();
+        smokeSensationDevInfoDTO.setSectionList(toolUtils.getSectionList(request));
+        SmokeSensationDevInfoVO smokeSensationData = smokeSensationDevInfoService.getSmokeSensationData(smokeSensationDevInfoDTO);
+        return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,smokeSensationData);
+    }
+}

+ 6 - 0
src/main/java/com/welampiot/dao/AllAlarmInfoLogDao.java

@@ -7,4 +7,10 @@ import java.util.List;
 
 public interface AllAlarmInfoLogDao {
     List<AllAlarmInfoLogDTO> getListByVO(AllAlarmInfoLogVO allAlarmInfoLogVO);
+    List<AllAlarmInfoLogDTO> getListByAllAlarmInfoLogVO(AllAlarmInfoLogVO vo);
+    Integer getUnTreatedCountByStatus(AllAlarmInfoLogVO vo);
+    Integer getProcessingCountByStatus(AllAlarmInfoLogVO vo);
+    Integer getHandleCountByStatus(AllAlarmInfoLogVO vo);
+    void updateAlarmStatusByAlarmId(AllAlarmInfoLogDTO dto);
+    Integer getAlarmTotalByStatus(AllAlarmInfoLogVO vo);
 }

+ 41 - 0
src/main/java/com/welampiot/dao/SmokeSensationDevInfoDao.java

@@ -0,0 +1,41 @@
+package com.welampiot.dao;
+
+import com.welampiot.dto.SmokeSensationDevInfoDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationDevInfoDao
+ * Package: com.welampiot.dao
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 15:22
+ * @Version: v1.0
+ */
+public interface SmokeSensationDevInfoDao {
+    List<SmokeSensationDevInfoDTO> getListBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer getTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    void addSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto);
+
+    void updateSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer findSmokeSensationByDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer findAddressBySmokeSensationDTO(SmokeSensationDevInfoDTO dto);
+
+    void deleteSmokeSensationById(@Param("smokeIds") List<String> smokeIds);
+
+    Integer getOnlineTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer getNormalTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer getAlarmTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer getFaultTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer getNewTotalBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+}

+ 9 - 0
src/main/java/com/welampiot/dto/AllAlarmInfoLogDTO.java

@@ -4,9 +4,18 @@ import lombok.Data;
 
 @Data
 public class AllAlarmInfoLogDTO {
+    private Integer id;
     private String number;
     private String section;
     private String strAlarmType;
     private String updateTime;
     private String area;
+    private Integer lampId;
+    private Integer status;
+    private Integer alarmType;
+    private Integer devType;
+    private Integer dType;
+    private Integer isSend;
+    private String name;
+    private Integer timezone;
 }

+ 74 - 0
src/main/java/com/welampiot/dto/SmokeSensationDevInfoDTO.java

@@ -0,0 +1,74 @@
+package com.welampiot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationDevInfoDTO
+ * Package: com.welampiot.dto
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 14:56
+ * @Version: v1.0
+ */
+@Data
+public class SmokeSensationDevInfoDTO implements Serializable {
+    private Integer id;
+
+    private String number;
+
+    private String name;
+
+    private Integer model;
+
+    private String factory;
+
+    private Integer status; // 在线状态
+
+    private Integer smokeAlert; // 烟雾报警(0 正常,1 报警)
+
+    private Integer tempAlert; // 高温报警(0 正常,1 报警)
+
+    private Integer lowValue; // 电池抵押报警(0 正常,1 报警)
+
+    private Integer canStatus; // 人体感应(0 无人,1 有人)
+
+    private Integer fault; // 故障状态(0 正常,1 故障)
+
+    private String address;
+
+    private Integer deviceId;
+
+    private String subId; // 订阅事件id
+
+    private Integer areaId;
+
+    private Integer sectionId;
+
+    private String longitude;
+
+    private String latitude;
+
+    private String createTime;
+
+    private String updateTime;
+
+    private Integer page;
+
+    private Integer count;
+
+    private String keyword;
+
+    private List<Integer> sectionList;
+
+    private Integer online;
+
+    private Integer timezone;
+
+    private List<String> smokeIds;
+
+    private static final long serialVersionUID = 1L;
+}

+ 6 - 0
src/main/java/com/welampiot/service/AllAlarmInfoLogService.java

@@ -7,4 +7,10 @@ import java.util.List;
 
 public interface AllAlarmInfoLogService {
     List<AllAlarmInfoLogDTO> getListByVO(AllAlarmInfoLogVO allAlarmInfoLogVO);
+    List<AllAlarmInfoLogDTO> getListByAllAlarmInfoLogVO(AllAlarmInfoLogVO vo);
+    Integer getUnTreatedCountByStatus(AllAlarmInfoLogVO vo);
+    Integer getProcessingCountByStatus(AllAlarmInfoLogVO vo);
+    Integer getHandleCountByStatus(AllAlarmInfoLogVO vo);
+    void updateAlarmStatusByAlarmId(AllAlarmInfoLogDTO dto);
+    Integer getAlarmTotalByStatus(AllAlarmInfoLogVO vo);
 }

+ 31 - 0
src/main/java/com/welampiot/service/SmokeSensationDevInfoService.java

@@ -0,0 +1,31 @@
+package com.welampiot.service;
+
+import com.welampiot.dto.SmokeSensationDevInfoDTO;
+import com.welampiot.vo.SmokeSensationDevInfoVO;
+
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationDevInfoService
+ * Package: com.welampiot.service
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 15:23
+ * @Version: v1.0
+ */
+public interface SmokeSensationDevInfoService {
+    SmokeSensationDevInfoVO getListBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto);
+
+    void addSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto);
+
+    void updateSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer findSmokeSensationByDTO(SmokeSensationDevInfoDTO dto);
+
+    Integer findAddressBySmokeSensationDTO(SmokeSensationDevInfoDTO dto);
+
+    void deleteSmokeSensationById(List<String> smokeIds);
+
+    SmokeSensationDevInfoVO getSmokeSensationData(SmokeSensationDevInfoDTO dto);
+}

+ 30 - 0
src/main/java/com/welampiot/service/impl/AllAlarmInfoLogServiceImpl.java

@@ -15,4 +15,34 @@ public class AllAlarmInfoLogServiceImpl implements AllAlarmInfoLogService {
     private AllAlarmInfoLogDao allAlarmInfoLogDao;
     @Override
     public List<AllAlarmInfoLogDTO> getListByVO(AllAlarmInfoLogVO allAlarmInfoLogVO) {return allAlarmInfoLogDao.getListByVO(allAlarmInfoLogVO);}
+
+    @Override
+    public List<AllAlarmInfoLogDTO> getListByAllAlarmInfoLogVO(AllAlarmInfoLogVO vo) {
+        return allAlarmInfoLogDao.getListByAllAlarmInfoLogVO(vo);
+    }
+
+    @Override
+    public Integer getUnTreatedCountByStatus(AllAlarmInfoLogVO vo) {
+        return allAlarmInfoLogDao.getUnTreatedCountByStatus(vo);
+    }
+
+    @Override
+    public Integer getProcessingCountByStatus(AllAlarmInfoLogVO vo) {
+        return allAlarmInfoLogDao.getProcessingCountByStatus(vo);
+    }
+
+    @Override
+    public Integer getHandleCountByStatus(AllAlarmInfoLogVO vo) {
+        return allAlarmInfoLogDao.getHandleCountByStatus(vo);
+    }
+
+    @Override
+    public void updateAlarmStatusByAlarmId(AllAlarmInfoLogDTO dto) {
+        allAlarmInfoLogDao.updateAlarmStatusByAlarmId(dto);
+    }
+
+    @Override
+    public Integer getAlarmTotalByStatus(AllAlarmInfoLogVO vo) {
+        return allAlarmInfoLogDao.getAlarmTotalByStatus(vo);
+    }
 }

+ 113 - 0
src/main/java/com/welampiot/service/impl/SmokeSensationDevInfoServiceImpl.java

@@ -0,0 +1,113 @@
+package com.welampiot.service.impl;
+
+import com.welampiot.dao.SmokeSensationDevInfoDao;
+import com.welampiot.dto.SmokeSensationDevInfoDTO;
+import com.welampiot.service.SmokeSensationDevInfoService;
+import com.welampiot.vo.SmokeSensationDevInfoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationDevInfoServiceImpl
+ * Package: com.welampiot.service.impl
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 15:24
+ * @Version: v1.0
+ */
+@Service
+public class SmokeSensationDevInfoServiceImpl implements SmokeSensationDevInfoService {
+    @Autowired
+    private SmokeSensationDevInfoDao smokeSensationDevInfoDao;
+
+    @Override
+    public SmokeSensationDevInfoVO getListBySmokeSensationDevInfoDTO(SmokeSensationDevInfoDTO dto) {
+        SmokeSensationDevInfoVO smokeSensationDevInfoVO = new SmokeSensationDevInfoVO();
+        smokeSensationDevInfoVO.setTotal(smokeSensationDevInfoDao.getTotalBySmokeSensationDevInfoDTO(dto));
+        List<SmokeSensationDevInfoDTO> smokeSensationList = smokeSensationDevInfoDao.getListBySmokeSensationDevInfoDTO(dto);
+        List<SmokeSensationDevInfoDTO> list = new ArrayList<>();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        smokeSensationList.forEach(devDTO -> {
+            if (devDTO.getModel() == null) {
+                devDTO.setModel(0);
+            }
+            if (devDTO.getStatus() == null) {
+                devDTO.setStatus(0);
+            }
+            if (devDTO.getSmokeAlert() == null) {
+                devDTO.setSmokeAlert(0);
+            }
+            if (devDTO.getTempAlert() == null) {
+                devDTO.setTempAlert(0);
+            }
+            if (devDTO.getLowValue() == null) {
+                devDTO.setLowValue(0);
+            }
+            if (devDTO.getCanStatus() == null) {
+                devDTO.setCanStatus(0);
+            }
+            if (devDTO.getUpdateTime() != null && !devDTO.getUpdateTime().equals("")){
+                Date cmdTime;
+                try {
+                    cmdTime = simpleDateFormat.parse(devDTO.getUpdateTime());
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+                //判断时区,为null默认东八区
+                long timezone = devDTO.getTimezone() == null ? 8 : devDTO.getTimezone();
+                long l = cmdTime.getTime() + timezone * 3600 * 1000;
+                cmdTime = new Date(l);
+                devDTO.setUpdateTime(simpleDateFormat.format(cmdTime));
+            }else {
+                devDTO.setUpdateTime("");
+            }
+            list.add(devDTO);
+        });
+        smokeSensationDevInfoVO.setList(list);
+        return smokeSensationDevInfoVO;
+    }
+
+    @Override
+    public void addSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto) {
+        smokeSensationDevInfoDao.addSmokeSensationDataByDTO(dto);
+    }
+
+    @Override
+    public void updateSmokeSensationDataByDTO(SmokeSensationDevInfoDTO dto) {
+        smokeSensationDevInfoDao.updateSmokeSensationDataByDTO(dto);
+    }
+
+    @Override
+    public Integer findSmokeSensationByDTO(SmokeSensationDevInfoDTO dto) {
+        return smokeSensationDevInfoDao.findSmokeSensationByDTO(dto);
+    }
+
+    @Override
+    public Integer findAddressBySmokeSensationDTO(SmokeSensationDevInfoDTO dto) {
+        return smokeSensationDevInfoDao.findAddressBySmokeSensationDTO(dto);
+    }
+
+    @Override
+    public void deleteSmokeSensationById(List<String> smokeIds) {
+        smokeSensationDevInfoDao.deleteSmokeSensationById(smokeIds);
+    }
+
+    @Override
+    public SmokeSensationDevInfoVO getSmokeSensationData(SmokeSensationDevInfoDTO dto) {
+        SmokeSensationDevInfoVO smokeSensationDevInfoVO = new SmokeSensationDevInfoVO();
+        smokeSensationDevInfoVO.setTotal(smokeSensationDevInfoDao.getTotalBySmokeSensationDevInfoDTO(dto));
+        smokeSensationDevInfoVO.setOnlineCount(smokeSensationDevInfoDao.getOnlineTotalBySmokeSensationDevInfoDTO(dto));
+        smokeSensationDevInfoVO.setAlarmCount(smokeSensationDevInfoDao.getAlarmTotalBySmokeSensationDevInfoDTO(dto));
+        smokeSensationDevInfoVO.setNormalCount(smokeSensationDevInfoDao.getNormalTotalBySmokeSensationDevInfoDTO(dto));
+        smokeSensationDevInfoVO.setNewCount(smokeSensationDevInfoDao.getNewTotalBySmokeSensationDevInfoDTO(dto));
+        smokeSensationDevInfoVO.setFaultCount(smokeSensationDevInfoDao.getFaultTotalBySmokeSensationDevInfoDTO(dto));
+        return smokeSensationDevInfoVO;
+    }
+}

+ 9 - 0
src/main/java/com/welampiot/vo/AllAlarmInfoLogVO.java

@@ -1,5 +1,6 @@
 package com.welampiot.vo;
 
+import com.welampiot.dto.AllAlarmInfoLogDTO;
 import lombok.Data;
 
 import java.util.List;
@@ -10,4 +11,12 @@ public class AllAlarmInfoLogVO {
     private Integer version;
     private Integer limit;
     private Integer offset;
+    private String keyword;
+    private Integer status;
+    private Integer devType;
+    private Integer unTreatedCount;
+    private Integer processingCount;
+    private Integer handleCount;
+    private Integer total;
+    private List<AllAlarmInfoLogDTO> list;
 }

+ 35 - 0
src/main/java/com/welampiot/vo/SmokeSensationDevInfoVO.java

@@ -0,0 +1,35 @@
+package com.welampiot.vo;
+
+import com.welampiot.dto.SmokeSensationDevInfoDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ClassName: SmokeSensationDevInfoVO
+ * Package: com.welampiot.vo
+ * Description:
+ *
+ * @Author: zhj_Start
+ * @Create: 2023/5/31 - 15:24
+ * @Version: v1.0
+ */
+@Data
+public class SmokeSensationDevInfoVO implements Serializable {
+    private Integer total;
+
+    private Integer onlineCount;
+
+    private Integer normalCount;
+
+    private Integer alarmCount;
+
+    private Integer faultCount;
+
+    private Integer newCount;
+
+    private List<SmokeSensationDevInfoDTO> list;
+
+    private static final long serialVersionUID = 1L;
+}

+ 125 - 0
src/main/resources/mapper/AllAlarmInfoLogMapper.xml

@@ -27,4 +27,129 @@
             limit #{offset},#{limit}
         </if>
     </select>
+    
+    <select id="getListByAllAlarmInfoLogVO" resultType="com.welampiot.dto.AllAlarmInfoLogDTO" parameterType="com.welampiot.vo.AllAlarmInfoLogVO">
+        select
+            <choose>
+                <when test="version == 0">
+                    gl.chinese_name as area,
+                </when>
+                <when test="version == 1">
+                    gl.english_name as area,
+                </when>
+                <otherwise>
+                    gl.ru_name as area,
+                </otherwise>
+            </choose>
+            a.id,s.name as secton,l.number,l.name,a.devType,a.dType,a.stralarmtype as strAlarmType,
+            a.updatetime as updateTime,a.status,a.alarmtype as alarmType,s.timezone
+        from all_alarm_info_log a
+        left join lampinfo l on a.lampid = l.id
+        left join section s on l.section_id = s.id
+        left join global_location gl on s.pid = gl.id
+        where 1=1
+            <if test="keyword != null and keyword != ''">
+                and (l.number like '%${keyword}%' or a.stralarmtype like '%${keyword}%')
+            </if>
+            <if test="sectionList != null and !sectionList.isEmpty()">
+                and l.sectionid in
+                <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                    #{dto}
+                </foreach>
+            </if>
+            <choose>
+                <when test="status == 0">
+                    and a.status = 0
+                </when>
+                <when test="status == 1">
+                    and a.status = 1
+                </when>
+                <when test="status == 2">
+                    and a.status = 2
+                </when>
+            </choose>
+            <choose>
+                <when test="devType == 0">
+                    and a.devType = 0
+                </when>
+                <when test="devType == 1">
+                    and a.devType = 1
+                </when>
+                <when test="devType == 2">
+                    and a.devType = 2
+                </when>
+                <when test="devType == 3">
+                    and a.devType = 3
+                </when>
+                <when test="devType == 4">
+                    and a.devType = 4
+                </when>
+                <when test="devType == 5">
+                    and a.devType = 5
+                </when>
+            </choose>
+            order by a.updatetime desc
+            <if test="offset >= 0 and limit > 0">
+                limit #{offset},#{limit}
+            </if>
+    </select>
+
+    <select id="getUnTreatedCountByStatus" resultType="Integer">
+        select count(a.id) as total
+        from all_alarm_info_log a
+        left join lampinfo l on a.lampid = l.id
+        where a.status = 0
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and l.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getProcessingCountByStatus" resultType="Integer">
+        select count(a.id) as total
+        from all_alarm_info_log a
+        left join lampinfo l on a.lampid = l.id
+        where a.status = 1
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and l.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getHandleCountByStatus" resultType="Integer">
+        select count(a.id) as total
+        from all_alarm_info_log a
+        left join lampinfo l on a.lampid = l.id
+        where a.status = 2
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and l.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getAlarmTotalByStatus" resultType="Integer">
+        select count(a.id) as total
+        from all_alarm_info_log a
+        left join lampinfo l on a.lampid = l.id
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            where l.sectionid in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <update id="updateAlarmStatusByAlarmId" parameterType="com.welampiot.dto.AllAlarmInfoLogDTO">
+        update
+            all_alarm_info_log a
+        set
+            a.status = #{status}
+        where a.id = #{id}
+    </update>
 </mapper>

+ 198 - 0
src/main/resources/mapper/SmokeSensationDevInfoMapper.xml

@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.welampiot.dao.SmokeSensationDevInfoDao">
+    
+    <select id="getListBySmokeSensationDevInfoDTO" resultType="SmokeSensationDevInfoDTO">
+        select s.id,s.name,s.number,s.address,s.model,s.status,s.smoke_alert smokeAlert,s.temp_alert tempAlert,s1.timezone,
+               s.low_value lowValue,s.canstatus as canStatus,s.areaId,s.sectionId,s.longitude,s.latitude,s.updatetime as updateTime
+        from smoke_sensation_dev_info s
+        left join section s1 on s.sectionId = s1.id
+        where 1=1
+        <if test="keyword != null and keyword != ''">
+            and (s.name like '%${keyword}%' or s.number like '%${keyword}%' or s.address like '%${keyword}%')
+        </if>
+        <choose>
+            <when test="online == 0">
+                and s.status = 0
+            </when>
+            <otherwise>
+                and s.status = 1
+            </otherwise>
+        </choose>
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+        order by convert(s.name using gbk) desc
+        <if test="page >= 0 and count > 0">
+            limit #{page},#{count}
+        </if>
+    </select>
+
+    <select id="getTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            where s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getOnlineTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        where s.status = 1
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getNormalTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        where s.status = 1 and s.smoke_alert = 0 and s.temp_alert = 0 and s.temp_alert = 0 and s.low_value = 0 and s.canstatus = 0 and s.fault = 0
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getAlarmTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        where s.status = 1 and (s.smoke_alert = 1 or s.temp_alert = 1 or s.temp_alert = 1 or s.low_value = 1 or s.canstatus = 1)
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getFaultTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        where s.status = 1 and s.fault = 1
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <select id="getNewTotalBySmokeSensationDevInfoDTO" resultType="Integer">
+        select count(s.id)
+        from smoke_sensation_dev_info s
+        where date(s.createtime) = date(now())
+        <if test="sectionList != null and !sectionList.isEmpty()">
+            and s.sectionId in
+            <foreach collection="sectionList" item="dto" open="(" separator="," close=")">
+                #{dto}
+            </foreach>
+        </if>
+    </select>
+
+    <insert id="addSmokeSensationDataByDTO" parameterType="com.welampiot.dto.SmokeSensationDevInfoDTO" keyProperty="id" useGeneratedKeys="true">
+        insert into
+            smoke_sensation_dev_info
+            (name,
+             number,
+             model,
+             address,
+             areaId,
+             sectionId,
+             createtime,
+             updatetime
+             <if test="latitude != null and latitude != ''">
+                 ,latitude
+             </if>
+             <if test="longitude != null and longitude != ''">
+                 ,longitude
+             </if>)
+        values
+            (#{name},
+             #{number},
+             #{model},
+             #{address},
+             #{areaId},
+             #{sectionId},
+             #{createTime},
+             #{updateTime}
+             <if test="latitude != null and latitude != ''">
+                ,#{latitude}
+             </if>
+             <if test="longitude != null and longitude != ''">
+                ,#{longitude}
+             </if>)
+    </insert>
+
+    <update id="updateSmokeSensationDataByDTO" parameterType="com.welampiot.dto.SmokeSensationDevInfoDTO">
+        update
+            smoke_sensation_dev_info s
+        set
+            s.name = #{name},
+            s.number = #{number},
+            s.model = #{model},
+            s.address = #{address},
+            s.areaId = #{areaId},
+            s.sectionId = #{sectionId},
+            s.updatetime = #{updateTime},
+            <if test="latitude != null and latitude != ''">
+                ,s.latitude = #{latitude}
+            </if>
+            <if test="longitude != null and longitude != ''">
+                ,s.longitude = #{longitude}
+            </if>
+        where s.id = #{id}
+    </update>
+    
+    <select id="findSmokeSensationByDTO" resultType="Integer">
+        select count(*)
+        from smoke_sensation_dev_info s
+        where 1=1
+        <if test="sectionId != null and sectionId != 0">
+            and s.sectionId = #{sectionId}
+        </if>
+        <if test="name != null and name != ''">
+            and s.name = #{name}
+        </if>
+        <if test="number != null and number != ''">
+            and s.number = #{number}
+        </if>
+        <if test="id != null and id != 0">
+            and s.id != #{id}
+        </if>
+    </select>
+
+    <select id="findAddressBySmokeSensationDTO" resultType="Integer">
+        select count(*)
+        from smoke_sensation_dev_info s
+        where 1=1
+        <if test="address != null and address != ''">
+            and s.address = #{address}
+        </if>
+        <if test="id != null and id != 0">
+            and s.id != #{id}
+        </if>
+    </select>
+
+    <delete id="deleteSmokeSensationById">
+        delete
+        from smoke_sensation_dev_info
+        where id in
+             <foreach collection="smokeIds" item="item" open="(" separator="," close=")">
+                 #{item}
+             </foreach>
+    </delete>
+
+</mapper>