|
|
@@ -41,6 +41,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.io.Serializable; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@@ -299,8 +300,6 @@ public class DmDigitalmanServiceImpl extends BaseServiceImpl<DmDigitalmanQuery, |
|
|
|
dmSkillService.batchInitInsert(digitalmanDto); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 添加展示页 |
|
|
|
DmModelDto modelDto = new DmModelDto(); |
|
|
|
modelDto.setName(digitalmanDto.getName()); |
|
|
@@ -384,4 +383,26 @@ public class DmDigitalmanServiceImpl extends BaseServiceImpl<DmDigitalmanQuery, |
|
|
|
this.worktimeUpdate(worktimeDto); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<String> selectRegisteredDevices() { |
|
|
|
List<DmDigitalmanExtPo> dmDigitalmanPoList = dmDigitalmanExtMapper.selectList(Wrappers.<DmDigitalmanExtPo>query().lambda() |
|
|
|
.isNotNull(DmDigitalmanExtPo::getDeviceId)); |
|
|
|
return dmDigitalmanPoList.stream().map(DmDigitalmanExtPo::getDeviceId) |
|
|
|
.filter(Objects::nonNull) |
|
|
|
.filter(str->!str.isEmpty()) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean syncRegisteredDevice(String deviceId) { |
|
|
|
DmDigitalmanExtPo po = dmDigitalmanExtMapper.selectOne(Wrappers.<DmDigitalmanExtPo>query().lambda() |
|
|
|
.eq(DmDigitalmanExtPo::getDeviceId,deviceId)); |
|
|
|
if (po != null) { |
|
|
|
po.setIsOnline(Integer.parseInt(transferService.getDeviceOnlineStatus(deviceId).get("msg").toString())); |
|
|
|
dmDigitalmanExtMapper.updateById(po); |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |