Browse Source

# 接站接口优化

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

11
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.setModelSignage(this.getModelSignageByAnswer(submitAnswerReq));
R saveResult = deviceClient.saveVirtualDevice(virtualDeviceDTO);
Assert.isTrue(saveResult.isSuccess(),() -> {
throw new ServiceException(saveResult.getMsg());
});
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)

Loading…
Cancel
Save