|
|
|
@ -50,10 +50,13 @@ public class EquipmentInstanceServiceImpl implements IEquipmentInstanceService {
|
|
|
|
|
virtualDeviceDTO.setDeviceName(submitAnswerReq.getEmName()); |
|
|
|
|
// 模型标识根据题目答案获取
|
|
|
|
|
virtualDeviceDTO.setModelSignage(this.getModelSignageByAnswer(submitAnswerReq)); |
|
|
|
|
R<Boolean> exist = deviceClient.isDeviceCodeExist(submitAnswerReq.getEmCode()); |
|
|
|
|
if(exist.isSuccess() && !exist.getData()) { |
|
|
|
|
R saveResult = deviceClient.saveVirtualDevice(virtualDeviceDTO); |
|
|
|
|
Assert.isTrue(saveResult.isSuccess(),() -> { |
|
|
|
|
throw new ServiceException(saveResult.getMsg()); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// Long instanceId = Long.valueOf(String.valueOf(saveResult.getData()));
|
|
|
|
|
// LambdaUpdateWrapper<EmInfoEntity> luw = Wrappers.<EmInfoEntity>lambdaUpdate()
|
|
|
|
|
// .set(EmInfoEntity::getDeviceInstanceId, instanceId)
|
|
|
|
|