|
|
@ -1,22 +1,22 @@ |
|
|
|
package com.psdc.controller.control; |
|
|
|
package com.psdc.controller.control; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
|
|
|
|
import com.github.pagehelper.page.PageMethod; |
|
|
|
import com.psdc.core.controller.BaseController; |
|
|
|
import com.psdc.core.controller.BaseController; |
|
|
|
import com.psdc.core.domain.AjaxResult; |
|
|
|
import com.psdc.core.domain.AjaxResult; |
|
|
|
import com.psdc.core.domain.entity.SysUser; |
|
|
|
|
|
|
|
import com.psdc.core.page.TableDataInfo; |
|
|
|
import com.psdc.core.page.TableDataInfo; |
|
|
|
import com.psdc.domain.SysConfig; |
|
|
|
|
|
|
|
import com.psdc.entity.PsdcControlLog; |
|
|
|
import com.psdc.entity.PsdcControlLog; |
|
|
|
import com.psdc.entity.vo.DeviceStatusVo; |
|
|
|
import com.psdc.entity.vo.DeviceStatusVo; |
|
|
|
import com.psdc.service.IPsdcControlLogService; |
|
|
|
import com.psdc.service.IPsdcControlLogService; |
|
|
|
import com.psdc.service.IPsdcDeviceService; |
|
|
|
import com.psdc.service.IPsdcDeviceService; |
|
|
|
import org.aspectj.weaver.loadtime.Aj; |
|
|
|
import com.psdc.utils.SecurityUtils; |
|
|
|
|
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
@RestController |
|
|
@ -49,7 +49,7 @@ public class ManualControl extends BaseController { |
|
|
|
@PreAuthorize("@ss.hasPermi('control:manual:startstop')") |
|
|
|
@PreAuthorize("@ss.hasPermi('control:manual:startstop')") |
|
|
|
@PostMapping("/startAndStop") |
|
|
|
@PostMapping("/startAndStop") |
|
|
|
public AjaxResult deviceStartAndStop(@RequestBody JSONObject jsonObject){ |
|
|
|
public AjaxResult deviceStartAndStop(@RequestBody JSONObject jsonObject){ |
|
|
|
int i = psdcDeviceService.controlDeviceStartAndStop(jsonObject.getInteger("deviceId"), jsonObject.getInteger("runStatus")); |
|
|
|
int i = psdcDeviceService.controlDeviceStartAndStop(jsonObject.getInteger("deviceId"), jsonObject.getInteger("runStatus"), SecurityUtils.getUsername()); |
|
|
|
if ( i == 1){ |
|
|
|
if ( i == 1){ |
|
|
|
return AjaxResult.success("控制成功"); |
|
|
|
return AjaxResult.success("控制成功"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -60,11 +60,14 @@ public class ManualControl extends BaseController { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取调控日志列表 |
|
|
|
* 获取调控日志列表 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PreAuthorize("@ss.hasPermi('control:timer:controlLogList')") |
|
|
|
@PreAuthorize("@ss.hasPermi('control:manual:controlLogList')") |
|
|
|
@GetMapping("/controlLogList") |
|
|
|
@PostMapping("/controlLogList") |
|
|
|
public TableDataInfo controlLogList(PsdcControlLog psdcControlLog) { |
|
|
|
public TableDataInfo controlLogList(@RequestBody JSONObject jsonObject) { |
|
|
|
startPage(); |
|
|
|
PageMethod.startPage(jsonObject.getInteger("pageNum"),jsonObject.getInteger("pageSize")); |
|
|
|
|
|
|
|
PsdcControlLog psdcControlLog = JSON.parseObject(String.valueOf(jsonObject), PsdcControlLog.class); |
|
|
|
List<PsdcControlLog> list = psdcControlLogService.query(psdcControlLog); |
|
|
|
List<PsdcControlLog> list = psdcControlLogService.query(psdcControlLog); |
|
|
|
return getDataTable(list); |
|
|
|
return getDataTable(list); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|