设备类型关联
This commit is contained in:
parent
a69106d8f8
commit
622fb1a1e6
|
|
@ -13,6 +13,8 @@ public class DevInfoVo implements Serializable {
|
|||
|
||||
private String bdId;
|
||||
|
||||
private String relType;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -88,4 +88,11 @@ public interface DataCenterMapper {
|
|||
* @return
|
||||
*/
|
||||
String getDevBdData(@Param("edgeId") String edgeId);
|
||||
|
||||
/**
|
||||
* 查询本系统设备类型
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Integer getDevTypeId(DevInfoVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ public class DataCenterServiceImpl implements DataCenterService{
|
|||
if (StringUtils.isNotEmpty(list)) {
|
||||
list.forEach(vo->{
|
||||
vo.setBdId(bdId);
|
||||
vo.setRelType(vo.getDeviceType());
|
||||
Integer devType=mapper.getDevTypeId(vo);
|
||||
if(devType!=null && devType!=0){
|
||||
vo.setDeviceType(devType.toString());
|
||||
}
|
||||
int nums = mapper.getDevInfoNum(vo);
|
||||
if(nums>0){
|
||||
//是否更新
|
||||
|
|
|
|||
|
|
@ -92,4 +92,11 @@
|
|||
LEFT JOIN tb_bd_record tbr on tbr.id=bdr.record_id
|
||||
where tbr.audit_status=1 and bdr.dev_code=#{edgeId}
|
||||
</select>
|
||||
<select id="getDevTypeId" resultType="java.lang.Integer">
|
||||
select dict_code
|
||||
FROM sys_dict_data
|
||||
WHERE dict_type='dev_type'
|
||||
and status=0
|
||||
and dict_value LIKE CONCAT("%",#{},',',"%")
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>bonus-datacenter</artifactId>
|
||||
<artifactId>bonus-data</artifactId>
|
||||
|
||||
<description>
|
||||
bonus-modules-datacenter 数据中心服务
|
||||
bonus-modules-data 数据中心服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -16,9 +16,9 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class BonusDataCenterApplication {
|
||||
public class BonusDataApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BonusDataCenterApplication.class, args);
|
||||
SpringApplication.run(BonusDataApplication.class, args);
|
||||
System.err.println("(♥◠‿◠)ノ゙ 数据中心服务启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
Loading…
Reference in New Issue