Browse Source

启用设置

2024年9月27日16:31:33
thing_master
lishuai 1 year ago
parent
commit
6f23779654
  1. 4
      modules/thing/src/main/java/com/thing/device/source/service/impl/IotThingSourceServiceImpl.java

4
modules/thing/src/main/java/com/thing/device/source/service/impl/IotThingSourceServiceImpl.java

@ -243,6 +243,7 @@ public class IotThingSourceServiceImpl extends BaseServiceImpl<IotThingSourceMap
.setDataTreatingMark("0") .setDataTreatingMark("0")
.setDataDealConfig(params.getDataDealConfig()) .setDataDealConfig(params.getDataDealConfig())
.setShowStatus(params.getShowStatus()) .setShowStatus(params.getShowStatus())
.setStartStatus("0")
// .setSort(increment) // .setSort(increment)
.setFromId(entityDTO.getId()) .setFromId(entityDTO.getId())
.setFromCode(entityDTO.getCode()) .setFromCode(entityDTO.getCode())
@ -292,6 +293,7 @@ public class IotThingSourceServiceImpl extends BaseServiceImpl<IotThingSourceMap
.setDataTreatingMark("0") .setDataTreatingMark("0")
.setDataDealConfig(params.getDataDealConfig()) .setDataDealConfig(params.getDataDealConfig())
.setShowStatus(params.getShowStatus()) .setShowStatus(params.getShowStatus())
.setStartStatus("0")
// .setSort(increment) // .setSort(increment)
.setFromId(entityDTO.getId()) .setFromId(entityDTO.getId())
.setFromCode(entityDTO.getCode()) .setFromCode(entityDTO.getCode())
@ -576,7 +578,7 @@ public class IotThingSourceServiceImpl extends BaseServiceImpl<IotThingSourceMap
.eq(IotThingSourceEntity::getTenantCode, UserContext.getRealTenantCode()) .eq(IotThingSourceEntity::getTenantCode, UserContext.getRealTenantCode())
); );
if(CollectionUtils.isEmpty(iotThingSourceEntities)){ if(CollectionUtils.isEmpty(iotThingSourceEntities)){
return 0L;
return 1L;
} }
return iotThingSourceEntities.stream().max(Comparator.comparing(IotThingSourceEntity::getSort)).get().getSort()+1; return iotThingSourceEntities.stream().max(Comparator.comparing(IotThingSourceEntity::getSort)).get().getSort()+1;
} }

Loading…
Cancel
Save