| | |
| | | * @param poleCode |
| | | */ |
| | | public void saveDeviceOperationLog(String deviceCode, String deviceName, String operation, String content, String poleCode) { |
| | | DeviceOperationLog deviceOperationLog = new DeviceOperationLog(); |
| | | deviceOperationLog.setUserId(SecurityUtils.getUserId()); |
| | | deviceOperationLog.setUserName(SecurityUtils.getUsername()); |
| | | if (deviceCode != null && !"[]".equals(deviceCode)) { |
| | | deviceOperationLog.setDeviceCode(deviceCode); |
| | | try { |
| | | DeviceOperationLog deviceOperationLog = new DeviceOperationLog(); |
| | | deviceOperationLog.setUserId(SecurityUtils.getUserId()); |
| | | deviceOperationLog.setUserName(SecurityUtils.getUsername()); |
| | | if (deviceCode != null && !"[]".equals(deviceCode)) { |
| | | deviceOperationLog.setDeviceCode(deviceCode); |
| | | } |
| | | if (deviceName != null) { |
| | | deviceOperationLog.setDeviceName(deviceName); |
| | | } |
| | | deviceOperationLog.setOperation(operation); |
| | | deviceOperationLog.setContent(content); |
| | | if (poleCode != null && !"[]".equals(poleCode)) { |
| | | deviceOperationLog.setPoleCode(poleCode); |
| | | } |
| | | this.save(deviceOperationLog); |
| | | } catch (Exception e) { |
| | | System.out.println("存储操作帧失败,数据异常"); |
| | | } |
| | | if (deviceName != null) { |
| | | deviceOperationLog.setDeviceName(deviceName); |
| | | } |
| | | deviceOperationLog.setOperation(operation); |
| | | deviceOperationLog.setContent(content); |
| | | if (poleCode != null && !"[]".equals(poleCode)) { |
| | | deviceOperationLog.setPoleCode(poleCode); |
| | | } |
| | | this.save(deviceOperationLog); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param content |
| | | */ |
| | | public void storeOperationLoginData(Long userId, String UserName, String operation, String content) { |
| | | DeviceOperationLog deviceOperationLog = new DeviceOperationLog(); |
| | | deviceOperationLog.setUserId(userId); |
| | | deviceOperationLog.setUserName(UserName); |
| | | deviceOperationLog.setOperation(operation); |
| | | deviceOperationLog.setContent(content); |
| | | this.save(deviceOperationLog); |
| | | try { |
| | | DeviceOperationLog deviceOperationLog = new DeviceOperationLog(); |
| | | deviceOperationLog.setUserId(userId); |
| | | deviceOperationLog.setUserName(UserName); |
| | | deviceOperationLog.setOperation(operation); |
| | | deviceOperationLog.setContent(content); |
| | | this.save(deviceOperationLog); |
| | | } catch (Exception e) { |
| | | System.out.println("存储操作帧失败,数据异常"); |
| | | } |
| | | } |
| | | |
| | | |