Browse Source

# 接站接口优化

zhongwei
H.X 2 years ago
parent
commit
f210130db4
  1. 3
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/EquipmentInstanceServiceImpl.java

3
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/EquipmentInstanceServiceImpl.java

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

Loading…
Cancel
Save