Commit 213220a6 authored by zhengjiangtao's avatar zhengjiangtao

修复日志修改bug

parent 197c7d4d
...@@ -4,8 +4,7 @@ import java.util.List; ...@@ -4,8 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.amos.spc.core.util.StringUtil; import com.yeejoin.amos.spc.core.util.StringUtil;
import org.apache.logging.log4j.LogManager; import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper; ...@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
@Component @Component
public class BlueprintListener extends EmqxListener implements InitializingBean { public class BlueprintListener extends EmqxListener implements InitializingBean {
private final Logger logger = LogManager.getLogger(BlueprintListener.class); private static final Logger logger = Logger.getLogger(BlueprintListener.class);
private static ObjectMapper mapper = new ObjectMapper(); private static ObjectMapper mapper = new ObjectMapper();
...@@ -71,7 +70,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean ...@@ -71,7 +70,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
try { try {
String jsonStr = new String(mqttMessage.getPayload()); String jsonStr = new String(mqttMessage.getPayload());
logger.error(">>>>>>>>>>>>>>>>>jsonStr",jsonStr); logger.debug(">>>>>>>>>>>>>>>>>jsonStr" + jsonStr);
JSONObject parseObject = JSON.parseObject(jsonStr); JSONObject parseObject = JSON.parseObject(jsonStr);
Long eqpId = parseObject.getLong("eqpId"); Long eqpId = parseObject.getLong("eqpId");
String eqpName = parseObject.getString("eqpName"); String eqpName = parseObject.getString("eqpName");
...@@ -85,7 +84,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean ...@@ -85,7 +84,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) { if (!StringUtil.isNotEmpty(string)) {
return; return;
} }
logger.error(">>>>>>>>>>>>>>>>>string",string); logger.debug(">>>>>>>>>>>>>>>>>string"+ string);
JSONObject metricJson = JSONObject.parseObject(string); JSONObject metricJson = JSONObject.parseObject(string);
for (Map.Entry entry : metricJson.entrySet()) { for (Map.Entry entry : metricJson.entrySet()) {
// 指标名 // 指标名
...@@ -97,8 +96,8 @@ public class BlueprintListener extends EmqxListener implements InitializingBean ...@@ -97,8 +96,8 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
List<Long> riskFactorId = equipmentMapper.judgeEquipmentExists(equipmentsPointId); List<Long> riskFactorId = equipmentMapper.judgeEquipmentExists(equipmentsPointId);
if ((remark.equals("currentState") || "异常".equals(statusName) || "正常".equals(statusName)) && !ObjectUtils.isEmpty(queryEquipmentPoint) && riskFactorId.size() > 0) { if ((remark.equals("currentState") || "异常".equals(statusName) || "正常".equals(statusName)) && !ObjectUtils.isEmpty(queryEquipmentPoint) && riskFactorId.size() > 0) {
logger.error(">>>>>>>>>>>>>>>>>remark",remark); logger.debug(">>>>>>>>>>>>>>>>>remark" + remark);
logger.error(">>>>>>>>>>>>>>>>>statusName",statusName); logger.debug(">>>>>>>>>>>>>>>>>statusName" + statusName);
// 指标的值 0正常 1告警 // 指标的值 0正常 1告警
Integer value = DevicePointEnum.getValue(statusName); Integer value = DevicePointEnum.getValue(statusName);
equipmentMapper.updateEquipmentPointStatus(value, queryEquipmentPoint.getId()); equipmentMapper.updateEquipmentPointStatus(value, queryEquipmentPoint.getId());
......
...@@ -4,8 +4,7 @@ import java.util.List; ...@@ -4,8 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.amos.spc.core.util.StringUtil; import com.yeejoin.amos.spc.core.util.StringUtil;
import org.apache.logging.log4j.LogManager; import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper; ...@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
@Component @Component
public class DeviceListener extends EmqxListener implements InitializingBean { public class DeviceListener extends EmqxListener implements InitializingBean {
private final Logger logger = LogManager.getLogger(DeviceListener.class); private static final Logger logger = Logger.getLogger(DeviceListener.class);
private static ObjectMapper mapper = new ObjectMapper(); private static ObjectMapper mapper = new ObjectMapper();
...@@ -93,8 +92,8 @@ public class DeviceListener extends EmqxListener implements InitializingBean { ...@@ -93,8 +92,8 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
if (!StringUtil.isNotEmpty(string)) { if (!StringUtil.isNotEmpty(string)) {
return; return;
} }
logger.error("---------shudu--string",string); logger.error("---------shudu--string"+ string);
System.out.println("----shidumqtt chuli recording : "+ string); System.out.println("----shidumqtt chuli recording : " + string);
//{"describe":"A中心机房-机房温湿度监测-温度过高报警-报警值:35℃","temperatureAlarm":"正常","humidityAlarm":"正常"} //{"describe":"A中心机房-机房温湿度监测-温度过高报警-报警值:35℃","temperatureAlarm":"正常","humidityAlarm":"正常"}
JSONObject metricJson = JSONObject.parseObject(string); JSONObject metricJson = JSONObject.parseObject(string);
for (Map.Entry entry : metricJson.entrySet()) { for (Map.Entry entry : metricJson.entrySet()) {
......
...@@ -26,8 +26,6 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException; ...@@ -26,8 +26,6 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper; import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
import com.yeejoin.amos.spc.business.remote.RemoteWebSocketServer; import com.yeejoin.amos.spc.business.remote.RemoteWebSocketServer;
import com.yeejoin.amos.spc.core.util.StringUtil; import com.yeejoin.amos.spc.core.util.StringUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -36,7 +34,7 @@ import org.springframework.stereotype.Component; ...@@ -36,7 +34,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.component.emq.EmqxListener; import org.typroject.tyboot.component.emq.EmqxListener;
import org.apache.log4j.Logger;
import java.io.IOException; import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -52,7 +50,7 @@ import static com.yeejoin.amos.bank.constants.AlarmConstant.*; ...@@ -52,7 +50,7 @@ import static com.yeejoin.amos.bank.constants.AlarmConstant.*;
@Component @Component
public class EquipmentListener extends EmqxListener implements InitializingBean { public class EquipmentListener extends EmqxListener implements InitializingBean {
private final Logger logger = LogManager.getLogger(EquipmentListener.class); private static final Logger logger = Logger.getLogger(EquipmentListener.class);
@Autowired @Autowired
private EmqKeeper emqKeeper; private EmqKeeper emqKeeper;
...@@ -108,7 +106,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean ...@@ -108,7 +106,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
private void blueprintMsgtransfer(MqttMessage mqttMessage) { private void blueprintMsgtransfer(MqttMessage mqttMessage) {
try { try {
String jsonStr = new String(mqttMessage.getPayload()); String jsonStr = new String(mqttMessage.getPayload());
logger.info(">>>>>>>>>>>>>>>>>jsonStr", jsonStr); logger.debug(">>>>>>>>>>>>>>>>>jsonStr" + jsonStr);
JSONArray jsonArray = JSON.parseObject(jsonStr).getJSONArray("metricDatas"); JSONArray jsonArray = JSON.parseObject(jsonStr).getJSONArray("metricDatas");
if (ObjectUtils.isEmpty(jsonArray)) { if (ObjectUtils.isEmpty(jsonArray)) {
return; return;
...@@ -121,7 +119,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean ...@@ -121,7 +119,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) { if (!StringUtil.isNotEmpty(string)) {
return; return;
} }
logger.error(">>>>>>>>>>>>>>>>>string", string); logger.debug(">>>>>>>>>>>>>>>>>string" + string);
JSONObject metricJson = JSONObject.parseObject(string); JSONObject metricJson = JSONObject.parseObject(string);
String communication = metricJson.get("communication").toString(); String communication = metricJson.get("communication").toString();
int status = communication.equals("正常") ? 0 : 1; int status = communication.equals("正常") ? 0 : 1;
...@@ -183,7 +181,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean ...@@ -183,7 +181,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) { if (!StringUtil.isNotEmpty(string)) {
return; return;
} }
logger.error("---------ip equipment--string", string); logger.debug("---------ip equipment--string" + string);
System.out.println("----ip equipment chuli recording : " + string); System.out.println("----ip equipment chuli recording : " + string);
// {"describe":"状态","communication":"异常"} // {"describe":"状态","communication":"异常"}
JSONObject metricJson = JSONObject.parseObject(string); JSONObject metricJson = JSONObject.parseObject(string);
......
package com.yeejoin.amos.bank.config; package com.yeejoin.amos.bank.config;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties;
import com.yeejoin.amos.bank.dao.mapper.AlarmMapper; import com.yeejoin.amos.bank.dao.mapper.AlarmMapper;
import com.yeejoin.amos.bank.remote.AmosWsService; import com.yeejoin.amos.bank.remote.AmosWsService;
import com.yeejoin.amos.bank.utils.DateTimeKit; import com.yeejoin.amos.bank.utils.DateTimeKit;
import org.apache.logging.log4j.LogManager; import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.component.emq.EmqxListener; import org.typroject.tyboot.component.emq.EmqxListener;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.bank.TopographyNode; import com.yeejoin.amos.bank.TopographyNode;
import com.yeejoin.amos.bank.common.enums.AlarmPointTypeEnum; import com.yeejoin.amos.bank.common.enums.AlarmPointTypeEnum;
import com.yeejoin.amos.bank.common.enums.DevicePointEnum; import com.yeejoin.amos.bank.common.enums.DevicePointEnum;
...@@ -40,29 +33,22 @@ import com.yeejoin.amos.bank.entity.EquipmentQualityVo; ...@@ -40,29 +33,22 @@ import com.yeejoin.amos.bank.entity.EquipmentQualityVo;
import com.yeejoin.amos.bank.remote.client.RiskModelRemoteClient; import com.yeejoin.amos.bank.remote.client.RiskModelRemoteClient;
import com.yeejoin.amos.bank.service.IAlarmPointService; import com.yeejoin.amos.bank.service.IAlarmPointService;
import com.yeejoin.amos.bank.service.IAlarmService; import com.yeejoin.amos.bank.service.IAlarmService;
import com.yeejoin.amos.bank.utils.HttpUtil;
import com.yeejoin.amos.bank.webSocket.WebsocketParam;
import com.yeejoin.amos.component.feign.config.InnerInvokException; import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper; import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
import com.yeejoin.amos.spc.business.remote.RemoteWebSocketServer; import com.yeejoin.amos.spc.business.remote.RemoteWebSocketServer;
import com.yeejoin.amos.spc.core.util.StringUtil; import com.yeejoin.amos.spc.core.util.StringUtil;
import liquibase.integration.commandline.Main;
import static com.yeejoin.amos.bank.constants.AlarmConstant.*; import static com.yeejoin.amos.bank.constants.AlarmConstant.*;
@Component @Component
public class SelfSupportListener extends EmqxListener implements InitializingBean { public class SelfSupportListener extends EmqxListener implements InitializingBean {
private final Logger logger = LogManager.getLogger(SelfSupportListener.class); private static final Logger logger = Logger.getLogger(SelfSupportListener.class);
private static ObjectMapper mapper = new ObjectMapper();
@Autowired @Autowired
private EmqKeeper emqKeeper; private EmqKeeper emqKeeper;
private static TaskExecutor taskExecutor;
@Autowired @Autowired
EquipmentMapper equipmentMapper; EquipmentMapper equipmentMapper;
...@@ -153,7 +139,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea ...@@ -153,7 +139,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
if (!StringUtil.isNotEmpty(string)) { if (!StringUtil.isNotEmpty(string)) {
return; return;
} }
logger.error("---------shudu--string", string); logger.debug("---------shudu--string" + string);
System.out.println("----supprtmqtt chuli recording : " + string); System.out.println("----supprtmqtt chuli recording : " + string);
//{\"maxTime\":\"1\",\"packetLossRate\":\"0\",\"avgTime\":\"0\",\"minTime\":\"0\",\"发包数\":\"\",\"icmpPackSize\":\"32\",\"status\":\"通\"} //{\"maxTime\":\"1\",\"packetLossRate\":\"0\",\"avgTime\":\"0\",\"minTime\":\"0\",\"发包数\":\"\",\"icmpPackSize\":\"32\",\"status\":\"通\"}
JSONObject metricJson = JSONObject.parseObject(string); JSONObject metricJson = JSONObject.parseObject(string);
...@@ -173,6 +159,9 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea ...@@ -173,6 +159,9 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
record.setName(eqpName + " " + ipAddress); record.setName(eqpName + " " + ipAddress);
iDeviceRecord.save(record); iDeviceRecord.save(record);
TopographyNode node = equipmentMapper.queryNodeBySourceId(String.valueOf(eqpId)); TopographyNode node = equipmentMapper.queryNodeBySourceId(String.valueOf(eqpId));
logger.debug("start delete one hour deivceRecord");
equipmentMapper.deleteOneHourNormal();
logger.debug("end delete one hour deivceRecord");
//触发风险合格不合格 //触发风险合格不合格
EquipmentQualityVo queryEquipmentPoint = equipmentMapper.queryEquipmentPoint(eqpId, remark); EquipmentQualityVo queryEquipmentPoint = equipmentMapper.queryEquipmentPoint(eqpId, remark);
......
...@@ -4,9 +4,9 @@ import java.util.ArrayList; ...@@ -4,9 +4,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -26,13 +26,13 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil; ...@@ -26,13 +26,13 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil;
import com.yeejoin.amos.spc.business.controller.BaseController; import com.yeejoin.amos.spc.business.controller.BaseController;
import com.yeejoin.amos.spc.business.param.ReginParams; import com.yeejoin.amos.spc.business.param.ReginParams;
import io.swagger.annotations.ApiParam; import io.micrometer.core.instrument.util.StringUtils;
@RestController @RestController
@RequestMapping(value = "/rtsp") @RequestMapping(value = "/rtsp")
public class AddressController extends BaseController{ public class AddressController extends BaseController{
private final Logger log = LoggerFactory.getLogger(AddressController.class); private static final Logger log = Logger.getLogger(AddressController.class);
@Autowired @Autowired
VideoService videoService; VideoService videoService;
...@@ -105,9 +105,12 @@ public class AddressController extends BaseController{ ...@@ -105,9 +105,12 @@ public class AddressController extends BaseController{
* @return * @return
*/ */
@GetMapping(value = "/list", produces = "application/json;charset=UTF-8") @GetMapping(value = "/list", produces = "application/json;charset=UTF-8")
public CommonResponse getVideosList(@RequestParam("floor3d") String floor3d) { public CommonResponse getVideosList(@RequestParam("floor3d") String floor3d,@RequestParam("orgCode") String orgCode) {
try { try {
List<Video> findAll = videoService.findAll(floor3d); if(StringUtils.isEmpty(orgCode)) {
return CommonResponseUtil.success(new ArrayList<Video>());
}
List<Video> findAll = videoService.findAll(floor3d,orgCode);
return CommonResponseUtil.success(findAll); return CommonResponseUtil.success(findAll);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
...@@ -12,13 +12,10 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil; ...@@ -12,13 +12,10 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil;
import com.yeejoin.amos.spc.business.controller.BaseController; import com.yeejoin.amos.spc.business.controller.BaseController;
import com.yeejoin.amos.spc.business.param.ReginParams; import com.yeejoin.amos.spc.business.param.ReginParams;
import com.yeejoin.amos.spc.business.remote.RemoteSecurityService; import com.yeejoin.amos.spc.business.remote.RemoteSecurityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.log4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -28,11 +25,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -28,11 +25,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -43,8 +37,7 @@ import java.util.stream.Collectors; ...@@ -43,8 +37,7 @@ import java.util.stream.Collectors;
@Api(value = "/bank/alarm", tags = {"告警数据API"}) @Api(value = "/bank/alarm", tags = {"告警数据API"})
public class AlarmPointController extends BaseController { public class AlarmPointController extends BaseController {
private final Logger log = LoggerFactory.getLogger(AlarmPointController.class); private static final Logger log = Logger.getLogger(AlarmPointController.class);
@Autowired @Autowired
private IAlarmPointService alarmPointService; private IAlarmPointService alarmPointService;
......
...@@ -4,6 +4,7 @@ import java.util.ArrayList; ...@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -40,6 +41,8 @@ import io.swagger.annotations.ApiParam; ...@@ -40,6 +41,8 @@ import io.swagger.annotations.ApiParam;
@Api(value = "/bank/equipment", tags = {"设备API"}) @Api(value = "/bank/equipment", tags = {"设备API"})
public class EquipmentController extends BaseController{ public class EquipmentController extends BaseController{
private static final Logger log = Logger.getLogger(EquipmentController.class);
@Autowired @Autowired
private WarnService warnService; private WarnService warnService;
...@@ -94,7 +97,9 @@ public class EquipmentController extends BaseController{ ...@@ -94,7 +97,9 @@ public class EquipmentController extends BaseController{
@GetMapping(value = "/synchronization", produces = "application/json;charset=UTF-8") @GetMapping(value = "/synchronization", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "同步设备接口", notes = "添加设备接口") @ApiOperation(value = "同步设备接口", notes = "添加设备接口")
public CommonResponse synDevice() { public CommonResponse synDevice() {
log.debug("synchronization deviece");
equipmentService.syncDeviceList(); equipmentService.syncDeviceList();
log.debug("synchronization sucess");
return CommonResponseUtil.success("同步成功"); return CommonResponseUtil.success("同步成功");
} }
......
package com.yeejoin.amos.bank.controller; package com.yeejoin.amos.bank.controller;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -28,7 +26,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -28,7 +26,7 @@ import io.swagger.annotations.ApiOperation;
@Api(value = "/bank", tags = {"新平台请求数据API测试"}) @Api(value = "/bank", tags = {"新平台请求数据API测试"})
public class TestController extends BaseController { public class TestController extends BaseController {
private final Logger log = LoggerFactory.getLogger(TestController.class); private static final Logger log = Logger.getLogger(TestController.class);
// @Autowired // @Autowired
// RemoteSecurityService service; // RemoteSecurityService service;
......
...@@ -2,8 +2,7 @@ package com.yeejoin.amos.bank.controller; ...@@ -2,8 +2,7 @@ package com.yeejoin.amos.bank.controller;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -28,7 +27,7 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil; ...@@ -28,7 +27,7 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil;
@RequestMapping(value = "/video") @RequestMapping(value = "/video")
public class VideoController { public class VideoController {
private final Logger log = LoggerFactory.getLogger(VideoController.class); private static final Logger log = Logger.getLogger(VideoController.class);
@Autowired @Autowired
VideoService videoService; VideoService videoService;
......
...@@ -19,7 +19,7 @@ public interface VideoMapper { ...@@ -19,7 +19,7 @@ public interface VideoMapper {
* @param floor3d * @param floor3d
* @return * @return
*/ */
public List<Video> findAll(@Param("floor3d") String floor3d); public List<Video> findAll(@Param("floor3d") String floor3d,@Param("orgCode")String orgCode);
List<Video> selectByParentId(@Param("orgCode")String orgCode); List<Video> selectByParentId(@Param("orgCode")String orgCode);
......
...@@ -13,6 +13,6 @@ public interface IDynamicRingDataService { ...@@ -13,6 +13,6 @@ public interface IDynamicRingDataService {
JSONArray queryDynamicRingDataById(Long id,String token); JSONArray queryDynamicRingDataById(Long id,String token);
ArrayList<Node3DVoResponse> query3dData(String token); ArrayList<Node3DVoResponse> query3dData(String token,String orgCode);
} }
...@@ -12,7 +12,7 @@ public interface VideoService { ...@@ -12,7 +12,7 @@ public interface VideoService {
public PageModel<Video> findPageList(MonitorParam param); public PageModel<Video> findPageList(MonitorParam param);
List<Video> findAll(String floor3d); List<Video> findAll(String floor3d,String orgCode);
List<Map<String, Object>>videoTree(String code); List<Map<String, Object>>videoTree(String code);
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -22,6 +23,8 @@ import com.yeejoin.amos.spc.core.common.response.CoordDTO; ...@@ -22,6 +23,8 @@ import com.yeejoin.amos.spc.core.common.response.CoordDTO;
import com.yeejoin.amos.spc.core.common.response.Node3DVoResponse; import com.yeejoin.amos.spc.core.common.response.Node3DVoResponse;
import com.yeejoin.amos.spc.exception.YeeException; import com.yeejoin.amos.spc.exception.YeeException;
import feign.Logger;
@Service @Service
public class DynamicRingDataServiceImpl implements IDynamicRingDataService { public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
...@@ -46,7 +49,7 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService { ...@@ -46,7 +49,7 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
} }
@Override @Override
public ArrayList<Node3DVoResponse> query3dData(String token) { public ArrayList<Node3DVoResponse> query3dData(String token,String orgCode) {
String params1 = "{\"eqpTempAttr\":{\"name\":\"affiliatedSystem\",\"value\":\"动环系统\"},\"pageNumber\":0,\"pageSize\":1000000000,\"needAttr\":[\"position\",\"storey\",\"storey\"]}"; String params1 = "{\"eqpTempAttr\":{\"name\":\"affiliatedSystem\",\"value\":\"动环系统\"},\"pageNumber\":0,\"pageSize\":1000000000,\"needAttr\":[\"position\",\"storey\",\"storey\"]}";
String resStr = deviceService.selectEquipments(params1); String resStr = deviceService.selectEquipments(params1);
//String resStr = deviceService.dynamicRingData(DeviceUriEnum.查询三维设备点, token, params1); //String resStr = deviceService.dynamicRingData(DeviceUriEnum.查询三维设备点, token, params1);
...@@ -62,18 +65,35 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService { ...@@ -62,18 +65,35 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
ArrayList<Node3DVoResponse> list = new ArrayList<>(); ArrayList<Node3DVoResponse> list = new ArrayList<>();
if (resJson != null) { if (resJson != null) {
convertNode3DVoResponse(list, resJson, "01"); convertNode3DVoResponse(list, resJson, "01",orgCode);
} }
if (fireDetectionJson != null) { if (fireDetectionJson != null) {
convertNode3DVoResponse(list, fireDetectionJson, "02"); convertNode3DVoResponse(list, fireDetectionJson, "02",orgCode);
} }
return list; return list;
} }
private void convertNode3DVoResponse(ArrayList<Node3DVoResponse> list, JSONObject json, String type) { private void convertNode3DVoResponse(ArrayList<Node3DVoResponse> list, JSONObject json, String type,String orgCode) {
List<JSONObject> dataArray = (List<JSONObject>) json.get("content"); List<JSONObject> dataArray = (List<JSONObject>) json.get("content");
dataArray.forEach(e -> { dataArray.forEach(e -> {
JSONArray authOrgs = e.getJSONArray("authOrg");
if(!ObjectUtils.isEmpty(authOrgs)) {
List<String> authOrgList = JSONObject.parseArray(authOrgs.toJSONString(), String.class);
//确认授权才显示
if(authOrgList.contains(orgCode)) {
try {
Node3DVoResponse node3dVoResponse = handledata(type, e);
list.add(node3dVoResponse);
} catch (Exception e1) {
System.out.println("device iot piezhi is error: " + e1.getMessage());
}
}
}
});
}
private Node3DVoResponse handledata(String type, JSONObject e) {
Node3DVoResponse node3dVoResponse = new Node3DVoResponse(); Node3DVoResponse node3dVoResponse = new Node3DVoResponse();
JSONObject paramsRes = e.getJSONObject("cfgParamJsonObject"); JSONObject paramsRes = e.getJSONObject("cfgParamJsonObject");
node3dVoResponse.setId(e.getString("id")); node3dVoResponse.setId(e.getString("id"));
...@@ -110,9 +130,8 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService { ...@@ -110,9 +130,8 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
node3dVoResponse.setShowInfo(false); node3dVoResponse.setShowInfo(false);
node3dVoResponse.setTwinkle(false); node3dVoResponse.setTwinkle(false);
node3dVoResponse.setType("dynamicRingData"); node3dVoResponse.setType("dynamicRingData");
list.add(node3dVoResponse); return node3dVoResponse;
});
} }
} }
...@@ -47,8 +47,8 @@ public class VideoServiceImpl implements VideoService { ...@@ -47,8 +47,8 @@ public class VideoServiceImpl implements VideoService {
} }
@Override @Override
public List<Video> findAll(String floor3d) { public List<Video> findAll(String floor3d,String orgCode) {
List<Video> findAll = mapper.findAll(floor3d); List<Video> findAll = mapper.findAll(floor3d,orgCode);
return findAll; return findAll;
} }
......
...@@ -14,8 +14,7 @@ import java.util.Properties; ...@@ -14,8 +14,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket; import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -44,7 +43,7 @@ import com.yeejoin.amos.spc.exception.YeeException; ...@@ -44,7 +43,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/ */
public class AlarmWebSocketClient extends WebSocketClient { public class AlarmWebSocketClient extends WebSocketClient {
private final Logger log = LoggerFactory.getLogger(AlarmWebSocketClient.class); private static final Logger log = Logger.getLogger(AlarmWebSocketClient.class);
private IAlarmPointService alarmPointService; private IAlarmPointService alarmPointService;
private IAlarmService alarmService; private IAlarmService alarmService;
......
...@@ -14,8 +14,7 @@ import java.util.Properties; ...@@ -14,8 +14,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket; import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -46,7 +45,7 @@ import com.yeejoin.amos.spc.exception.YeeException; ...@@ -46,7 +45,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/ */
public class FireDetectionWebSocketClient extends WebSocketClient { public class FireDetectionWebSocketClient extends WebSocketClient {
private final Logger log = LoggerFactory.getLogger(FireDetectionWebSocketClient.class); private static final Logger log = Logger.getLogger(FireDetectionWebSocketClient.class);
private IAlarmPointService alarmPointService; private IAlarmPointService alarmPointService;
private IAlarmService alarmService; private IAlarmService alarmService;
......
...@@ -17,8 +17,7 @@ import java.util.Properties; ...@@ -17,8 +17,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket; import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -55,7 +54,7 @@ import com.yeejoin.amos.spc.exception.YeeException; ...@@ -55,7 +54,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/ */
public class InspectionWebSocketClient extends WebSocketClient{ public class InspectionWebSocketClient extends WebSocketClient{
private final Logger log = LoggerFactory.getLogger(InspectionWebSocketClient.class); private static final Logger log = Logger.getLogger(InspectionWebSocketClient.class);
private IAutoInspectionService autoInspectionService; private IAutoInspectionService autoInspectionService;
private ITopographyService iTopographyService; private ITopographyService iTopographyService;
......
...@@ -15,9 +15,7 @@ import java.util.Properties; ...@@ -15,9 +15,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket; import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
...@@ -46,7 +44,7 @@ import com.yeejoin.amos.spc.exception.YeeException; ...@@ -46,7 +44,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/ */
public class MonitorAlarmWebSocketClient extends WebSocketClient { public class MonitorAlarmWebSocketClient extends WebSocketClient {
private final Logger log = LoggerFactory.getLogger(MonitorAlarmWebSocketClient.class); private static final Logger log = Logger.getLogger(MonitorAlarmWebSocketClient.class);
private IAlarmPointService alarmPointService; private IAlarmPointService alarmPointService;
private IAlarmService alarmService; private IAlarmService alarmService;
......
...@@ -26,8 +26,7 @@ import java.util.Properties; ...@@ -26,8 +26,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket; import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient; import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake; import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
...@@ -53,7 +52,6 @@ import com.yeejoin.amos.bank.utils.JsonUtil; ...@@ -53,7 +52,6 @@ import com.yeejoin.amos.bank.utils.JsonUtil;
import com.yeejoin.amos.op.core.common.response.CommonResponse; import com.yeejoin.amos.op.core.common.response.CommonResponse;
import com.yeejoin.amos.spc.exception.YeeException; import com.yeejoin.amos.spc.exception.YeeException;
import fr.opensagres.xdocreport.template.velocity.internal.Foreach;
import io.micrometer.core.instrument.util.StringUtils; import io.micrometer.core.instrument.util.StringUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -64,7 +62,7 @@ import org.springframework.util.ObjectUtils; ...@@ -64,7 +62,7 @@ import org.springframework.util.ObjectUtils;
*/ */
public class ShiduAlarmWebSocketClient extends WebSocketClient { public class ShiduAlarmWebSocketClient extends WebSocketClient {
private final Logger log = LoggerFactory.getLogger(ShiduAlarmWebSocketClient.class); private static final Logger log = Logger.getLogger(ShiduAlarmWebSocketClient.class);
private IAlarmPointService alarmPointService; private IAlarmPointService alarmPointService;
private IAlarmService alarmService; private IAlarmService alarmService;
......
...@@ -13,8 +13,7 @@ import com.yeejoin.amos.spc.core.util.FileHelper; ...@@ -13,8 +13,7 @@ import com.yeejoin.amos.spc.core.util.FileHelper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -32,7 +31,7 @@ import java.util.UUID; ...@@ -32,7 +31,7 @@ import java.util.UUID;
@Api(tags = "风险清单相关") @Api(tags = "风险清单相关")
public class ExcelController extends BaseController { public class ExcelController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(ExcelController.class); private static final Logger logger = Logger.getLogger(ExcelController.class);
@Autowired @Autowired
private ExcelMapper excelMapper; private ExcelMapper excelMapper;
......
...@@ -7,8 +7,7 @@ import java.util.Map; ...@@ -7,8 +7,7 @@ import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.UUID; import java.util.UUID;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -42,7 +41,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -42,7 +41,7 @@ import io.swagger.annotations.ApiOperation;
@Api(tags = "巡检信息推送") @Api(tags = "巡检信息推送")
public class ProtalDataController extends BaseController { public class ProtalDataController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(ProtalDataController.class); private static final Logger log = Logger.getLogger(ProtalDataController.class);
@Autowired @Autowired
private RemoteRuleServer remoteRuleServer; private RemoteRuleServer remoteRuleServer;
......
...@@ -4,8 +4,7 @@ import java.util.Date; ...@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -31,7 +30,7 @@ import io.swagger.annotations.ApiParam; ...@@ -31,7 +30,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcAftermath") @RequestMapping(value = "/api/spcAftermath")
@Api(tags = "可能造成的后果") @Api(tags = "可能造成的后果")
public class SpcAftermathController extends BaseController { public class SpcAftermathController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcAftermathController.class); private static final Logger log = Logger.getLogger(SpcAftermathController.class);
@Autowired @Autowired
private ISpcAftermathService iSpcAftermathService; private ISpcAftermathService iSpcAftermathService;
......
...@@ -5,8 +5,7 @@ import java.util.Date; ...@@ -5,8 +5,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam; ...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcCamera") @RequestMapping(value = "/api/spcCamera")
@Api(tags = "摄像机api") @Api(tags = "摄像机api")
public class SpcCameraController extends BaseController { public class SpcCameraController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcCameraController.class); private static final Logger log = Logger.getLogger(SpcCameraController.class);
@Autowired @Autowired
ISpcCameraService iCameraService; ISpcCameraService iCameraService;
......
...@@ -4,8 +4,7 @@ import java.util.Date; ...@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -35,7 +34,7 @@ import io.swagger.annotations.ApiParam; ...@@ -35,7 +34,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "api/spcControlMeasure") @RequestMapping(value = "api/spcControlMeasure")
@Api(tags = "控制措施管理") @Api(tags = "控制措施管理")
public class SpcControlMeasureController extends BaseController { public class SpcControlMeasureController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcControlMeasureController.class); private static final Logger log = Logger.getLogger(SpcControlMeasureController.class);
@Autowired @Autowired
private ISpcControlMeasureService iSpcControlMeasuresService; private ISpcControlMeasureService iSpcControlMeasuresService;
......
...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller; ...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam; ...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcEuipmentFacilities") @RequestMapping(value = "/api/spcEuipmentFacilities")
@Api(tags = "设备设施api") @Api(tags = "设备设施api")
public class SpcEquipmentController extends BaseController { public class SpcEquipmentController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcEquipmentController.class); private static final Logger log = Logger.getLogger(SpcEquipmentController.class);
@Autowired @Autowired
ISpcCameraService iCameraService; ISpcCameraService iCameraService;
......
...@@ -4,8 +4,7 @@ import java.util.Date; ...@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam; ...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcHazardSourceClassify") @RequestMapping(value = "/api/spcHazardSourceClassify")
@Api(tags = "危险源分类") @Api(tags = "危险源分类")
public class SpcHazardSourceClassifyController extends BaseController { public class SpcHazardSourceClassifyController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcHazardSourceClassifyController.class); private static final Logger log = Logger.getLogger(SpcHazardSourceClassifyController.class);
@Autowired @Autowired
private IHazardSourceClassifyService iHazardSourceClassifyService; private IHazardSourceClassifyService iHazardSourceClassifyService;
......
...@@ -5,8 +5,7 @@ import java.util.Date; ...@@ -5,8 +5,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -36,7 +35,7 @@ import io.swagger.annotations.ApiParam; ...@@ -36,7 +35,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcIdentificationMethod") @RequestMapping(value = "/api/spcIdentificationMethod")
@Api(tags = "风险辨识方法api") @Api(tags = "风险辨识方法api")
public class SpcIdentificationMethodController extends BaseController { public class SpcIdentificationMethodController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcIdentificationMethodController.class); private static final Logger log = Logger.getLogger(SpcIdentificationMethodController.class);
@Autowired @Autowired
ISpcIdentificationMethodService iIdentificationMethodService; ISpcIdentificationMethodService iIdentificationMethodService;
......
...@@ -2,8 +2,7 @@ package com.yeejoin.amos.spc.business.controller; ...@@ -2,8 +2,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.List; import java.util.List;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam; ...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "重大危险源api") @Api(tags = "重大危险源api")
public class SpcMajorHazardInstallationController extends BaseController { public class SpcMajorHazardInstallationController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcMajorHazardInstallationController.class); private static final Logger log = Logger.getLogger(SpcMajorHazardInstallationController.class);
@Autowired @Autowired
ISpcMajorHazardInstallationService iSpcMajorHazardInstallationService; ISpcMajorHazardInstallationService iSpcMajorHazardInstallationService;
......
package com.yeejoin.amos.spc.business.controller; package com.yeejoin.amos.spc.business.controller;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -21,7 +20,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -21,7 +20,7 @@ import io.swagger.annotations.ApiOperation;
@Api(tags = "控制措施内容api") @Api(tags = "控制措施内容api")
public class SpcMeasureContentController extends BaseController { public class SpcMeasureContentController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcCameraController.class); private static final Logger log = Logger.getLogger(SpcMeasureContentController.class);
@Autowired @Autowired
private ISpcMeasureContentService iSpcMeasureContentService; private ISpcMeasureContentService iSpcMeasureContentService;
......
...@@ -5,8 +5,7 @@ import java.util.HashMap; ...@@ -5,8 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -43,7 +42,7 @@ import io.swagger.annotations.ApiParam; ...@@ -43,7 +42,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcRiskFactor") @RequestMapping(value = "/api/spcRiskFactor")
@Api(tags = "风险因素") @Api(tags = "风险因素")
public class SpcRiskFactorController extends BaseController { public class SpcRiskFactorController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcRiskFactorController.class); private static final Logger log = Logger.getLogger(SpcRiskFactorController.class);
@Autowired @Autowired
private ISpcRiskSourceService spcRiskSourceService; private ISpcRiskSourceService spcRiskSourceService;
......
...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller; ...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam; ...@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "风险源管理") @Api(tags = "风险源管理")
public class SpcRiskSourceController extends BaseController { public class SpcRiskSourceController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcRiskSourceController.class); private static final Logger log = Logger.getLogger(SpcRiskSourceController.class);
@Autowired @Autowired
......
...@@ -6,8 +6,7 @@ import com.yeejoin.amos.spc.business.service.intfc.ISpcStatisticsService; ...@@ -6,8 +6,7 @@ import com.yeejoin.amos.spc.business.service.intfc.ISpcStatisticsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -19,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -19,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "统计相关") @Api(tags = "统计相关")
public class SpcStatisticsController extends BaseController { public class SpcStatisticsController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(SpcStatisticsController.class); private static final Logger logger = Logger.getLogger(SpcStatisticsController.class);
@Autowired @Autowired
private ISpcStatisticsService iSpcStatisticsService; private ISpcStatisticsService iSpcStatisticsService;
......
...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller; ...@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam; ...@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "作业活动模块相关") @Api(tags = "作业活动模块相关")
public class SpcTaskworkController extends BaseController { public class SpcTaskworkController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(SpcTaskworkController.class); private static final Logger logger = Logger.getLogger(SpcTaskworkController.class);
@Autowired @Autowired
private ISpcTaskworkService iSpcTaskworkService; private ISpcTaskworkService iSpcTaskworkService;
......
...@@ -10,8 +10,7 @@ import com.yeejoin.amos.spc.core.common.request.CommonRequest; ...@@ -10,8 +10,7 @@ import com.yeejoin.amos.spc.core.common.request.CommonRequest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -27,7 +26,7 @@ import java.util.Map; ...@@ -27,7 +26,7 @@ import java.util.Map;
@Api(tags="时间轴") @Api(tags="时间轴")
public class TimeLineController extends BaseController{ public class TimeLineController extends BaseController{
private static final Logger log = LoggerFactory.getLogger(TimeLineController.class); private static final Logger log = Logger.getLogger(TimeLineController.class);
@Autowired @Autowired
IContingencyInstance iContingencyInstance; IContingencyInstance iContingencyInstance;
......
...@@ -93,7 +93,7 @@ public class View3DController extends BaseController { ...@@ -93,7 +93,7 @@ public class View3DController extends BaseController {
//动环数据 //动环数据
String token = getToken(); String token = getToken();
if(type.equals("dynamicRingData")) { if(type.equals("dynamicRingData")) {
ArrayList<Node3DVoResponse> query3dData = iDynamicRingDataService.query3dData(token); ArrayList<Node3DVoResponse> query3dData = iDynamicRingDataService.query3dData(token,orgCode);
return CommonResponseUtil.success(query3dData); return CommonResponseUtil.success(query3dData);
}else if(type.equals("impEquipment")){//设备 }else if(type.equals("impEquipment")){//设备
return CommonResponseUtil.success(iequipmentService.queryEqui3dData(orgCode)); return CommonResponseUtil.success(iequipmentService.queryEqui3dData(orgCode));
......
...@@ -71,4 +71,6 @@ public interface EquipmentMapper extends BaseMapper { ...@@ -71,4 +71,6 @@ public interface EquipmentMapper extends BaseMapper {
void updateNodeDetail(@Param("nodeid")String nodeid,@Param("nodeDetail")String nodeDetail); void updateNodeDetail(@Param("nodeid")String nodeid,@Param("nodeDetail")String nodeDetail);
void deleteOneHourNormal();
} }
//package com.yeejoin.amos.spc.business.remote;
//
//import com.alibaba.fastjson.JSONObject;
//import com.google.common.collect.Maps;
//import com.yeejoin.amos.spc.business.constants.FasConstant;
//import com.yeejoin.amos.spc.common.enums.JiaodaUriEnum;
//import com.yeejoin.amos.spc.core.util.HttpUtil;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.springframework.util.StringUtils;
//
//import java.util.Map;
//
//@Service("remoteJiaodaService")
//public class RemoteJiaodaService {
//
// private final Logger logger = LoggerFactory.getLogger(RemoteJiaodaService.class);
//
// @Value("${params.jiaoda.address}")
// private String address;
//
// private String buildUrl(String address, JiaodaUriEnum jiaodaUriEnum, Map<String, String> map) {
// String uri = jiaodaUriEnum.getUri();
// String params = jiaodaUriEnum.getParams();
// if (!StringUtils.isEmpty(params) && map != null) {
// String[] paramsArr = params.split(",");
// for (String param : paramsArr) {
// uri = uri.replace("{" + param + "}", map.get(param));
// }
// }
// return address + uri;
// }
//
// public JSONObject wakeUpRiskFactorFlow(String processInstanceId, String token) {
// Map<String, String> map = Maps.newHashMap();
// map.put("operationType", processInstanceId);
// String url = buildUrl(address, JiaodaUriEnum.唤起设备设施风险评级流程, map);
// Map<String, String> headerMap = Maps.newHashMap();
// headerMap.put(FasConstant.TOKEN_KEY, token);
// String resultStr = HttpUtil.sendHttpPostWithHeader(url, headerMap);
// logger.info("\r\n请求路径=======================>" + url + "\r\n返回参数=======================>" + resultStr);
// return JSONObject.parseObject(resultStr);
// }
//
//}
//package com.yeejoin.amos.spc.business.remote;
//
//import java.util.Map;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.springframework.util.StringUtils;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.google.common.collect.Maps;
//import com.yeejoin.amos.spc.business.constants.FasConstant;
//import com.yeejoin.amos.spc.common.enums.PatrolSynOperationTypeEnum;
//import com.yeejoin.amos.spc.common.enums.PatrolSynUriEnum;
//
//@Service("remotePatrolService")
//public class RemotePatrolService {
//
// private final Logger logger = LoggerFactory.getLogger(RemotePatrolService.class);
//
// @Value("${params.patrol.address}")
// private String address;
//
// private static final String success = "SUCCESS";
//
// private String buildUrl(String address, PatrolSynUriEnum patrolSynUriEnum, Map<String, String> map) {
// String uri = patrolSynUriEnum.getUri();
// String params = patrolSynUriEnum.getParams();
// if (!StringUtils.isEmpty(params) && map != null) {
// String[] paramsArr = params.split(",");
// for (String param : paramsArr) {
// uri = uri.replace("{" + param + "}", map.get(param));
// }
// }
// return address + uri;
// }
//
// private JSONObject handleResult(String resultStr) {
// if (resultStr == null) {
// return null;
// }
// JSONObject json = JSON.parseObject(resultStr);
// if (success.equals(json.getString("result"))) {
// return json;
// }
// return null;
// }
//
// public JSONObject synDataToPatrol(PatrolSynUriEnum patrolSynUriEnum, PatrolSynOperationTypeEnum operationType, String body, String token) {
// Map<String, String> map = Maps.newHashMap();
// map.put("operationType", operationType.getOperationType());
// String url = buildUrl(address, patrolSynUriEnum, map);
// Map<String, String> headerMap = Maps.newHashMap();
// headerMap.put(FasConstant.TOKEN_KEY, token);
// String resultStr = HttpUtil.sendHttpPostJsonWithHeader(url, body, headerMap);
// logger.info("\r\n请求路径=======================>" + url + "\r\n请求参数=======================>" + body + "\r\n返回参数=======================>" + resultStr);
// return handleResult(resultStr);
// }
//
// public JSONObject saveLatentDanger(PatrolSynUriEnum patrolSynUriEnum, String body, String token) {
// String url = buildUrl(address, patrolSynUriEnum, null);
// Map<String, String> headerMap = Maps.newHashMap();
// headerMap.put(FasConstant.TOKEN_KEY, token);
// String resultStr = HttpUtil.sendHttpPostJsonWithHeader(url, body, headerMap);
// logger.info("\r\n请求路径=======================>" + url + "\r\n请求参数=======================>" + body + "\r\n返回参数=======================>" + resultStr);
// return handleResult(resultStr);
// }
//
//}
//package com.yeejoin.amos.spc.business.remote;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.google.common.collect.Maps;
//import com.yeejoin.amos.spc.business.constants.FasConstant;
//import com.yeejoin.amos.spc.common.enums.WorkFlowUriEnum;
//import com.yeejoin.amos.spc.core.util.HttpUtil;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.springframework.util.StringUtils;
//
//import java.util.Map;
//
//@Service("remoteWorkFlowService")
//public class RemoteWorkFlowService {
//
// private final Logger logger = LoggerFactory.getLogger(RemoteWorkFlowService.class);
//
// @Value("${params.work.flow.address}")
// private String address;
//
// private static final String success = "SUCCESS";
//
// private static final String appKey = "8b193f7cb22c842b5a56e866c2e20dbf";
//
// private String buildUrl(String address, WorkFlowUriEnum workFlowUriEnum, Map<String, String> map) {
// String uri = workFlowUriEnum.getUri();
// String params = workFlowUriEnum.getParams();
// if (!StringUtils.isEmpty(params) && map != null) {
// String[] paramsArr = params.split(",");
// for (String param : paramsArr) {
// uri = uri.replace("{" + param + "}", map.get(param));
// }
// }
// return address + uri;
// }
//
// private JSONObject handleResult(String resultStr) {
// if (resultStr == null) {
// return null;
// }
// JSONObject json = JSON.parseObject(resultStr);
// if (success.equals(json.getString("result"))) {
// return json;
// }
// return null;
// }
//
// public JSONObject start(JSONObject body, String token) {
// String url = buildUrl(address, WorkFlowUriEnum.启动流程, null);
// Map<String, String> headerMap = Maps.newHashMap();
// headerMap.put(FasConstant.TOKEN_KEY, token);
// String requestBody = body.toJSONString();
// String resultStr = HttpUtil.sendHttpPostJsonWithHeader(url, requestBody, headerMap);
// logger.info("\r\n请求路径=======================>" + url + "\r\n请求参数=======================>" + requestBody + "\r\n返回参数=======================>" + resultStr);
// return handleResult(resultStr);
// }
//
// public JSONObject startWithAppKey(JSONObject body) {
// Map<String, String> map = Maps.newHashMap();
// map.put("appKey", appKey);
// String url = buildUrl(address, WorkFlowUriEnum.启动免登录流程, map);
// String requestBody = body.toJSONString();
// String resultStr = HttpUtil.sendHttpPostJson(url, requestBody);
// logger.info("\r\n请求路径=======================>" + url + "\r\n请求参数=======================>" + requestBody + "\r\n返回参数=======================>" + resultStr);
// return handleResult(resultStr);
// }
//
//// public JSONObject excute(String taskId, String requestBody) {
//// Map<String, String> map = Maps.newHashMap();
//// map.put("taskId", taskId);
//// String url = buildUrl(address, WorkFlowUriEnum.执行流程, map);
//// String resultStr = HttpUtil.sendHttpPostJson(url, requestBody);
//// JSONObject json = handleResult(resultStr);
//// logger.info("\r\n请求路径=======================>" + url + "\r\n请求参数=======================>" + requestBody + "\r\n返回参数=======================>" + resultStr);
//// return json;
//// }
////
//// public JSONObject currentTask(String instanceId) {
//// Map<String, String> map = Maps.newHashMap();
//// map.put("instanceId", instanceId);
//// String url = buildUrl(address, WorkFlowUriEnum.当前节点, map);
//// String resultStr = HttpUtil.sendHttpGet(url);
//// JSONObject json = handleResult(resultStr);
//// logger.info("\r\n请求路径=======================>" + url + "\r\n返回参数=======================>" + resultStr);
//// if (json == null) {
//// return null;
//// }
//// JSONArray reviewContent = json.getJSONObject("dataList").getJSONArray("content");
//// if (reviewContent != null && reviewContent.size() > 0) {
//// return reviewContent.getJSONObject(0);
//// }
//// return null;
//// }
//
//}
...@@ -11,8 +11,7 @@ import com.yeejoin.amos.spc.business.service.model.Operate; ...@@ -11,8 +11,7 @@ import com.yeejoin.amos.spc.business.service.model.Operate;
import com.yeejoin.amos.spc.business.service.model.OperateGroup; import com.yeejoin.amos.spc.business.service.model.OperateGroup;
import com.yeejoin.amos.spc.dao.entity.ContingencyOriginalData; import com.yeejoin.amos.spc.dao.entity.ContingencyOriginalData;
import com.yeejoin.amos.spc.dao.entity.ContingencyPlanInstance; import com.yeejoin.amos.spc.dao.entity.ContingencyPlanInstance;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -29,7 +28,7 @@ import java.util.Map; ...@@ -29,7 +28,7 @@ import java.util.Map;
@Service @Service
public class ContingencyInstanceImpl extends GenericManagerImpl<ContingencyPlanInstance, String> implements IContingencyInstance { public class ContingencyInstanceImpl extends GenericManagerImpl<ContingencyPlanInstance, String> implements IContingencyInstance {
private static final Logger log = LoggerFactory.getLogger(ContingencyInstanceImpl.class); private static final Logger log = Logger.getLogger(ContingencyInstanceImpl.class);
IContingencyPlanInstanceRepository repository; IContingencyPlanInstanceRepository repository;
......
...@@ -8,8 +8,7 @@ import java.util.Set; ...@@ -8,8 +8,7 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.assertj.core.util.Sets; import org.assertj.core.util.Sets;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -74,7 +73,7 @@ import com.yeejoin.amos.spc.dao.entity.SpcTaskworkMeasure; ...@@ -74,7 +73,7 @@ import com.yeejoin.amos.spc.dao.entity.SpcTaskworkMeasure;
@Service("iSpcRiskFactorService") @Service("iSpcRiskFactorService")
public class SpcRiskFactorServiceImpl implements ISpcRiskFactorService { public class SpcRiskFactorServiceImpl implements ISpcRiskFactorService {
private final Logger log = LoggerFactory.getLogger(SpcRiskFactorServiceImpl.class); private static final Logger log = Logger.getLogger(SpcRiskFactorServiceImpl.class);
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
......
...@@ -5,8 +5,7 @@ import java.util.List; ...@@ -5,8 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.slf4j.Logger; import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
...@@ -43,7 +42,7 @@ import com.yeejoin.amos.spc.core.util.StringUtil; ...@@ -43,7 +42,7 @@ import com.yeejoin.amos.spc.core.util.StringUtil;
@Service @Service
public class SpcRiskListServiceImpl implements ISpcRiskListService { public class SpcRiskListServiceImpl implements ISpcRiskListService {
private final Logger log = LoggerFactory.getLogger(SpcRiskListServiceImpl.class); private static final Logger log = Logger.getLogger(SpcRiskListServiceImpl.class);
@Autowired @Autowired
private RiskSourceMapper riskSourceMapper; private RiskSourceMapper riskSourceMapper;
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
<if test="floor3d != null"> <if test="floor3d != null">
and a.floor3d=#{floor3d} and a.floor3d=#{floor3d}
</if> </if>
<if test="orgCode != null">
and a.org_code LIKE concat('',#{orgCode},'%')
</if>
</select> </select>
<select id="findPageList" <select id="findPageList"
......
...@@ -276,6 +276,7 @@ ...@@ -276,6 +276,7 @@
<if test="fname != null" > <if test="fname != null" >
AND fe.`name` like concat('%',#{fname},'%') AND fe.`name` like concat('%',#{fname},'%')
</if> </if>
</select> </select>
...@@ -331,4 +332,22 @@ ...@@ -331,4 +332,22 @@
WHERE nodeid=#{nodeid} WHERE nodeid=#{nodeid}
</update > </update >
<delete id="deleteOneHourNormal">
DELETE
FROM
b_device_record
WHERE
id IN (
SELECT a.id from(
SELECT
`ID`
FROM
b_device_record record
WHERE
record.update_date <![CDATA[<=]]> CURRENT_TIMESTAMP - INTERVAL 60 MINUTE) a
)
</delete>
</mapper> </mapper>
\ No newline at end of file
log4j.rootLogger=info, stdout, logfile log4j.rootLogger=DEBUG, stdout, logfile
log4j.logger.com.yeejoin.amos.spc.business.dao.mapper=debug log4j.logger.com.yeejoin.amos.spc.business.dao.mapper=debug
log4j.logger.io.netty=info log4j.logger.io.netty=info
...@@ -14,8 +14,8 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout ...@@ -14,8 +14,8 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %t %-5p [%c{1}:%L] %m%n log4j.appender.stdout.layout.ConversionPattern=%d %t %-5p [%c{1}:%L] %m%n
log4j.appender.logfile=org.apache.log4j.RollingFileAppender log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=logs/safetyPreIndustry.log log4j.appender.logfile.File=logs/ccpc.log
log4j.appender.logfile.MaxFileSize=10240KB log4j.appender.logfile.MaxFileSize=1024KB
log4j.appender.logfile.MaxBackupIndex=30 log4j.appender.logfile.MaxBackupIndex=30
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %t %-5p [%c{1}:%L] %m%n log4j.appender.logfile.layout.ConversionPattern=%d %t %-5p [%c{1}:%L] %m%n
......
...@@ -78,10 +78,6 @@ ...@@ -78,10 +78,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment