|
|
|
@ -34,13 +34,19 @@ public class DeviceInspectSetServiceImpl implements DeviceInspectSetService {
|
|
|
|
|
if (StrUtil.isBlank(code)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
return deviceInspectSetDao.selectInspectSet(code);
|
|
|
|
|
|
|
|
|
|
DeviceInspectSetResponse deviceInspectSetResponse = deviceInspectSetDao.selectInspectSet(code);
|
|
|
|
|
if (null == deviceInspectSetResponse) {
|
|
|
|
|
//此设备未配置巡检设置,查询此设备的信息
|
|
|
|
|
deviceInspectSetResponse = deptDeviceDetailDao.selectInspectSet(code);
|
|
|
|
|
}
|
|
|
|
|
return deviceInspectSetResponse;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse updateInspectSet(DeviceInspectSetEntity deviceInspectSetEntity) {
|
|
|
|
|
DeviceInspectSetEntity inspectSetEntity = deviceInspectSetDao.selectById(deviceInspectSetEntity.getId());
|
|
|
|
|
BeanUtil.copyProperties(deviceInspectSetEntity, inspectSetEntity, "id","createUser", "createTime");
|
|
|
|
|
BeanUtil.copyProperties(deviceInspectSetEntity, inspectSetEntity, "id", "createUser", "createTime");
|
|
|
|
|
inspectSetEntity.setUpdateTime(new Date());
|
|
|
|
|
deviceInspectSetDao.updateById(inspectSetEntity);
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
@ -57,7 +63,7 @@ public class DeviceInspectSetServiceImpl implements DeviceInspectSetService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DeviceInspectSetEntity deviceInspectSetEntity = new DeviceInspectSetEntity();
|
|
|
|
|
BeanUtil.copyProperties(addDeviceInspectSetRequest, deviceInspectSetEntity);
|
|
|
|
|
BeanUtil.copyProperties(addDeviceInspectSetRequest, deviceInspectSetEntity, "id");
|
|
|
|
|
deviceInspectSetEntity.setStatus(1);
|
|
|
|
|
deviceInspectSetEntity.setCreateTime(new Date());
|
|
|
|
|
deviceInspectSetEntity.setUpdateTime(new Date());
|
|
|
|
|