|
@@ -9,6 +9,8 @@ import com.bizmatics.model.vo.CorrespondDeviceListVO;
|
|
import com.bizmatics.model.vo.CorrespondDeviceVO;
|
|
import com.bizmatics.model.vo.CorrespondDeviceVO;
|
|
import com.bizmatics.model.vo.DeviceOneVo;
|
|
import com.bizmatics.model.vo.DeviceOneVo;
|
|
import com.bizmatics.service.DeviceService;
|
|
import com.bizmatics.service.DeviceService;
|
|
|
|
+import com.bizmatics.service.aop.BusinessType;
|
|
|
|
+import com.bizmatics.service.aop.Log;
|
|
import com.bizmatics.service.vo.DeviceCountVO;
|
|
import com.bizmatics.service.vo.DeviceCountVO;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -87,6 +89,7 @@ public class DeviceController {
|
|
* @param device
|
|
* @param device
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.INSERT)
|
|
@PostMapping("correspondDeviceAdd")
|
|
@PostMapping("correspondDeviceAdd")
|
|
public ApiResult<Void> correspondDeviceAdd(@RequestBody Device device) {
|
|
public ApiResult<Void> correspondDeviceAdd(@RequestBody Device device) {
|
|
deviceService.correspondDeviceAdd(device);
|
|
deviceService.correspondDeviceAdd(device);
|
|
@@ -99,6 +102,7 @@ public class DeviceController {
|
|
* @param device
|
|
* @param device
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.UPDATE)
|
|
@PostMapping("correspondDeviceUpdate")
|
|
@PostMapping("correspondDeviceUpdate")
|
|
public ApiResult<Void> correspondDeviceUpdate(@RequestBody Device device) {
|
|
public ApiResult<Void> correspondDeviceUpdate(@RequestBody Device device) {
|
|
deviceService.correspondDeviceUpdate(device);
|
|
deviceService.correspondDeviceUpdate(device);
|
|
@@ -111,6 +115,7 @@ public class DeviceController {
|
|
* @param id
|
|
* @param id
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.DELETE)
|
|
@GetMapping("correspondDeviceDel")
|
|
@GetMapping("correspondDeviceDel")
|
|
public ApiResult<Void> correspondDeviceDel(@RequestParam int id) {
|
|
public ApiResult<Void> correspondDeviceDel(@RequestParam int id) {
|
|
deviceService.correspondDeviceDel(id);
|
|
deviceService.correspondDeviceDel(id);
|
|
@@ -173,6 +178,7 @@ public class DeviceController {
|
|
* @param deviceName 设备名称
|
|
* @param deviceName 设备名称
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.INSERT)
|
|
@GetMapping("variableCloning")
|
|
@GetMapping("variableCloning")
|
|
public ApiResult<Void> variableCloning(@RequestParam Integer type,
|
|
public ApiResult<Void> variableCloning(@RequestParam Integer type,
|
|
@RequestParam String newDeviceCode,
|
|
@RequestParam String newDeviceCode,
|
|
@@ -206,6 +212,7 @@ public class DeviceController {
|
|
* @param deviceType 1:183用电设备,2:视频监控设备,3:171用电设备,4:173用电设备,5:158智能网关,6:其他
|
|
* @param deviceType 1:183用电设备,2:视频监控设备,3:171用电设备,4:173用电设备,5:158智能网关,6:其他
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-摄像头", businessType = BusinessType.EXPORT)
|
|
@GetMapping("deviceExport")
|
|
@GetMapping("deviceExport")
|
|
public ApiResult<String> deviceExport(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
|
|
public ApiResult<String> deviceExport(@RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId,
|
|
@RequestParam(required = false) String deviceName,
|
|
@RequestParam(required = false) String deviceName,
|
|
@@ -220,6 +227,7 @@ public class DeviceController {
|
|
* @param deviceName 设备名称
|
|
* @param deviceName 设备名称
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.EXPORT)
|
|
@GetMapping("correspondDeviceExport")
|
|
@GetMapping("correspondDeviceExport")
|
|
public ApiResult<String> correspondDeviceExport(@RequestParam(required = false) String deviceName) {
|
|
public ApiResult<String> correspondDeviceExport(@RequestParam(required = false) String deviceName) {
|
|
return ApiResult.success(deviceService.correspondDeviceExport(deviceName));
|
|
return ApiResult.success(deviceService.correspondDeviceExport(deviceName));
|
|
@@ -232,6 +240,7 @@ public class DeviceController {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
|
|
+ @Log(title = "设备管理-通信设备", businessType = BusinessType.IMPORT)
|
|
@PostMapping("/deviceImport")
|
|
@PostMapping("/deviceImport")
|
|
public ApiResult<Void> deviceImport(@RequestParam("file") MultipartFile file){
|
|
public ApiResult<Void> deviceImport(@RequestParam("file") MultipartFile file){
|
|
deviceService.deviceImport(file);
|
|
deviceService.deviceImport(file);
|