15928045575 2 سال پیش
والد
کامیت
d416c8f44a

+ 8 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/controller/DeviceController.java

@@ -99,4 +99,12 @@ public class DeviceController {
         log.info("设备编辑 update param:{}", JSONObject.toJSONString(deviceAdd));
         return deviceService.update(deviceAdd, request);
     }
+
+    /*@Log(description = "获取设备基准信息")
+    //@RepeatSubmit(interval = 3000, message = "两次请求间隔未超过3秒")
+    @RequestMapping(name = "获取设备基准信息", value = "/getSet", method = RequestMethod.GET)
+    public HttpResult getSet(@Valid @RequestBody DeviceAdd deviceAdd, HttpServletRequest request) {
+        log.info("获取设备基准信息 getSet param:{}", JSONObject.toJSONString(deviceAdd));
+        return deviceService.getSet(deviceAdd, request);
+    }*/
 }

+ 3 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/dao/mysql/KwsDeviceIntegrationMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.slope.detection.model.dos.mysql.KwsDeviceIntegration;
 import com.sckw.slope.detection.model.dto.DeviceElementDTO;
+import com.sckw.slope.detection.model.vo.DeviceVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -29,4 +30,6 @@ public interface KwsDeviceIntegrationMapper extends BaseMapper<KwsDeviceIntegrat
                                                    @Param("status") List<Integer> status,
                                                    @Param("deviceId") Long deviceId
                                                    );
+
+    List<KwsDeviceIntegration> selectListByParms(@Param("vo") DeviceVo vo);
 }

+ 9 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/model/vo/DeviceVo.java

@@ -2,11 +2,13 @@ package com.sckw.slope.detection.model.vo;
 
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.slope.detection.model.dos.mysql.KwsDeviceIntegration;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author lfdc
@@ -154,5 +156,12 @@ public class DeviceVo implements Serializable {
      */
     private Long deviceType;
 
+    /**
+     * 产品类型
+     */
+    private List<KwsDeviceIntegration> integration;
+
+
+
     private static final long serialVersionUID = 1L;
 }

+ 6 - 0
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/DeviceService.java

@@ -197,6 +197,12 @@ public class DeviceService {
             vo.setManufacturer_contacts(deviceModel.getManufacturerContacts());
             vo.setManufacturer_phone(deviceModel.getManufacturerPhone());
         }
+        List<KwsDeviceIntegration> intergData = new ArrayList<>();
+        intergData = deviceIntegrationMapper.selectListByParms(vo);
+        if(!Objects.isNull(intergData)){
+            vo.setIntegration(intergData);
+        }
+
         return HttpResult.ok(vo);
     }
 

+ 10 - 0
slope-modules/slope-detection/src/main/resources/mapper/mysql/KwsDeviceIntegrationMapper.xml

@@ -189,4 +189,14 @@
             and b.device_id = #{deviceId}
         </if>
     </select>
+    <select id="selectListByParms" resultType="com.sckw.slope.detection.model.dos.mysql.KwsDeviceIntegration">
+        <!--@mbg.generated-->
+        select
+        <include refid="Base_Column_List"/>
+        from kws_device_integration
+        where del_flag = 0
+        <if test="vo.id != null and vo.id != ''">
+            and device_id = #{vo.id}
+        </if>
+    </select>
 </mapper>