|
|
|
@ -17,6 +17,7 @@ import com.bellmann.service.DeviceTypeVerService; |
|
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
@ -39,6 +40,7 @@ public class DeviceTypeVerController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Operation(summary = "审核设备类型版本") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:status')") |
|
|
|
|
@PutMapping("/audit-soft-state/{typeAndVerId}") |
|
|
|
|
public Result<String> updateTypeAndVersionState(@PathVariable @Valid @NotNull(message = "设备类型软件版本ID为空") Long typeAndVerId){ |
|
|
|
|
return deviceTypeVerService.updateTypeAndVersionState(typeAndVerId); |
|
|
|
@ -47,12 +49,14 @@ public class DeviceTypeVerController { |
|
|
|
|
|
|
|
|
|
@Operation(summary = "审核最新软件版本") |
|
|
|
|
@PutMapping("/audit-new-soft-state/{typeAndVerId}") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:soft:ver:audit')") |
|
|
|
|
public Result<String> updateTypeNewSoftState( |
|
|
|
|
@PathVariable @Valid @NotNull(message = "设备类型软件版本ID为空") Long typeAndVerId){ |
|
|
|
|
return deviceTypeVerService.updateTypeNewSoftState(typeAndVerId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Operation(summary = "复制设备类型软件版本信息") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:copy')") |
|
|
|
|
@PutMapping("/audit-new-soft-state/{typeAndVerId}/{devTypeId}") |
|
|
|
|
public Result<String> copySoftVerToOtherOui( |
|
|
|
|
@PathVariable @Valid @NotNull(message = "设备类型软件版本ID为空") Long typeAndVerId, |
|
|
|
@ -63,12 +67,14 @@ public class DeviceTypeVerController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Operation(summary = "删除设备类型软件版本") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:delete')") |
|
|
|
|
@DeleteMapping("/delete-device-type/{typeAndVerId}") |
|
|
|
|
public Result<String> deleteDeviceTypeVersionById( |
|
|
|
|
@PathVariable @Valid @NotNull(message = "设备类型软件版本ID为空") Long typeAndVerId){ |
|
|
|
|
return deviceTypeVerService.deleteDeviceTypeVersionById(typeAndVerId); |
|
|
|
|
} |
|
|
|
|
@Operation(summary = "删除软件版本文件") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:delete:file')") |
|
|
|
|
@DeleteMapping("/delete-device-ver-file/{typeAndVerId}/{fileId}") |
|
|
|
|
public Result<String> deleteDeviceTypeVersionFile( |
|
|
|
|
@PathVariable @Valid @NotNull(message = "设备类型软件版本ID为空") Long typeAndVerId, |
|
|
|
@ -83,12 +89,14 @@ public class DeviceTypeVerController { |
|
|
|
|
} |
|
|
|
|
@Operation(summary = "修改设备类型软件版本信息 ") |
|
|
|
|
@PostMapping("/edit-dev-type-ver-form") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:update:info')") |
|
|
|
|
public Result<Integer> editDevTypeVerForm(@RequestBody DeviceTypeVerForm deviceTypeVerForm){ |
|
|
|
|
int rows = deviceTypeVerService.editDevTypeVerForm(deviceTypeVerForm); |
|
|
|
|
return Result.success(rows); |
|
|
|
|
} |
|
|
|
|
@Operation(summary = "新增厂商配置文件信息") |
|
|
|
|
@PostMapping("/add-vendor-profile") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:add:profile')") |
|
|
|
|
public Result<String> addVendorProfile(@RequestBody VendorProfileForm form){ |
|
|
|
|
return deviceTypeVerService.addVendorProfile(form); |
|
|
|
|
} |
|
|
|
@ -101,6 +109,7 @@ public class DeviceTypeVerController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Operation(summary = "删除厂商配置文件信息") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:delete:profile')") |
|
|
|
|
@DeleteMapping("/delete-vendor-profile/{fileId}/{typeAndVerId}") |
|
|
|
|
public Result<Integer> deleteVendorProfile(@PathVariable Long fileId, @PathVariable Long typeAndVerId){ |
|
|
|
|
int rows = deviceTypeVerService.deleteVendorProfile(fileId,typeAndVerId); |
|
|
|
@ -121,6 +130,7 @@ public class DeviceTypeVerController { |
|
|
|
|
} |
|
|
|
|
@Operation(summary = "更新软件版本系统管理域数据") |
|
|
|
|
@PostMapping("/edit-ver-domain/{typeAndVerId}") |
|
|
|
|
@PreAuthorize("@ss.hasPerm('device:type:ver:add:domain')") |
|
|
|
|
public Result<Integer> editVerDomain(@PathVariable Long typeAndVerId,@RequestBody List<Long> list){ |
|
|
|
|
int rows = deviceTypeVerService.editVerDomain(typeAndVerId,list); |
|
|
|
|
return Result.success(rows); |
|
|
|
|