|
|
@ -0,0 +1,30 @@ |
|
|
|
package com.storeroom.modules.device.service.impl; |
|
|
|
|
|
|
|
import com.storeroom.exception.BaseException; |
|
|
|
import com.storeroom.modules.device.domain.DeviceArchivesTag; |
|
|
|
import com.storeroom.modules.device.repository.DeviceArchivesTagRepository; |
|
|
|
import com.storeroom.modules.device.service.DeviceArchivesTagService; |
|
|
|
import com.storeroom.utils.StringUtils; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class DeviceArchivesTagImpl implements DeviceArchivesTagService { |
|
|
|
|
|
|
|
|
|
|
|
private final DeviceArchivesTagRepository deviceArchivesTagRepository; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean findByDeviceInfoIdAndPosition(String deviceInfoId, String position) { |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(deviceInfoId) && StringUtils.isEmpty(position)) { |
|
|
|
throw new BaseException("查询数据异常"); |
|
|
|
} |
|
|
|
List<DeviceArchivesTag> deviceArchivesTags = deviceArchivesTagRepository.findByDeviceInfoIdAndAndPosition(deviceInfoId, position); |
|
|
|
return deviceArchivesTags.size() != 0; |
|
|
|
} |
|
|
|
} |