Commit 213220a6 authored by zhengjiangtao's avatar zhengjiangtao

修复日志修改bug

parent 197c7d4d
......@@ -4,8 +4,7 @@ import java.util.List;
import java.util.Map;
import com.yeejoin.amos.spc.core.util.StringUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
@Component
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();
......@@ -71,7 +70,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
try {
String jsonStr = new String(mqttMessage.getPayload());
logger.error(">>>>>>>>>>>>>>>>>jsonStr",jsonStr);
logger.debug(">>>>>>>>>>>>>>>>>jsonStr" + jsonStr);
JSONObject parseObject = JSON.parseObject(jsonStr);
Long eqpId = parseObject.getLong("eqpId");
String eqpName = parseObject.getString("eqpName");
......@@ -85,7 +84,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) {
return;
}
logger.error(">>>>>>>>>>>>>>>>>string",string);
logger.debug(">>>>>>>>>>>>>>>>>string"+ string);
JSONObject metricJson = JSONObject.parseObject(string);
for (Map.Entry entry : metricJson.entrySet()) {
// 指标名
......@@ -97,8 +96,8 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
List<Long> riskFactorId = equipmentMapper.judgeEquipmentExists(equipmentsPointId);
if ((remark.equals("currentState") || "异常".equals(statusName) || "正常".equals(statusName)) && !ObjectUtils.isEmpty(queryEquipmentPoint) && riskFactorId.size() > 0) {
logger.error(">>>>>>>>>>>>>>>>>remark",remark);
logger.error(">>>>>>>>>>>>>>>>>statusName",statusName);
logger.debug(">>>>>>>>>>>>>>>>>remark" + remark);
logger.debug(">>>>>>>>>>>>>>>>>statusName" + statusName);
// 指标的值 0正常 1告警
Integer value = DevicePointEnum.getValue(statusName);
equipmentMapper.updateEquipmentPointStatus(value, queryEquipmentPoint.getId());
......
......@@ -4,8 +4,7 @@ import java.util.List;
import java.util.Map;
import com.yeejoin.amos.spc.core.util.StringUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,7 +27,7 @@ import com.yeejoin.amos.spc.business.dao.mapper.EquipmentMapper;
@Component
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();
......@@ -93,8 +92,8 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
if (!StringUtil.isNotEmpty(string)) {
return;
}
logger.error("---------shudu--string",string);
System.out.println("----shidumqtt chuli recording : "+ string);
logger.error("---------shudu--string"+ string);
System.out.println("----shidumqtt chuli recording : " + string);
//{"describe":"A中心机房-机房温湿度监测-温度过高报警-报警值:35℃","temperatureAlarm":"正常","humidityAlarm":"正常"}
JSONObject metricJson = JSONObject.parseObject(string);
for (Map.Entry entry : metricJson.entrySet()) {
......
......@@ -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.remote.RemoteWebSocketServer;
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.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -36,7 +34,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.component.emq.EmqxListener;
import org.apache.log4j.Logger;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -52,7 +50,7 @@ import static com.yeejoin.amos.bank.constants.AlarmConstant.*;
@Component
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
private EmqKeeper emqKeeper;
......@@ -108,7 +106,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
private void blueprintMsgtransfer(MqttMessage mqttMessage) {
try {
String jsonStr = new String(mqttMessage.getPayload());
logger.info(">>>>>>>>>>>>>>>>>jsonStr", jsonStr);
logger.debug(">>>>>>>>>>>>>>>>>jsonStr" + jsonStr);
JSONArray jsonArray = JSON.parseObject(jsonStr).getJSONArray("metricDatas");
if (ObjectUtils.isEmpty(jsonArray)) {
return;
......@@ -121,7 +119,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) {
return;
}
logger.error(">>>>>>>>>>>>>>>>>string", string);
logger.debug(">>>>>>>>>>>>>>>>>string" + string);
JSONObject metricJson = JSONObject.parseObject(string);
String communication = metricJson.get("communication").toString();
int status = communication.equals("正常") ? 0 : 1;
......@@ -183,7 +181,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
if (!StringUtil.isNotEmpty(string)) {
return;
}
logger.error("---------ip equipment--string", string);
logger.debug("---------ip equipment--string" + string);
System.out.println("----ip equipment chuli recording : " + string);
// {"describe":"状态","communication":"异常"}
JSONObject metricJson = JSONObject.parseObject(string);
......
package com.yeejoin.amos.bank.config;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import com.yeejoin.amos.bank.dao.mapper.AlarmMapper;
import com.yeejoin.amos.bank.remote.AmosWsService;
import com.yeejoin.amos.bank.utils.DateTimeKit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.log4j.Logger;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.InitializingBean;
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.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.component.emq.EmqxListener;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.bank.TopographyNode;
import com.yeejoin.amos.bank.common.enums.AlarmPointTypeEnum;
import com.yeejoin.amos.bank.common.enums.DevicePointEnum;
......@@ -40,29 +33,22 @@ import com.yeejoin.amos.bank.entity.EquipmentQualityVo;
import com.yeejoin.amos.bank.remote.client.RiskModelRemoteClient;
import com.yeejoin.amos.bank.service.IAlarmPointService;
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.spc.business.dao.mapper.EquipmentMapper;
import com.yeejoin.amos.spc.business.remote.RemoteWebSocketServer;
import com.yeejoin.amos.spc.core.util.StringUtil;
import liquibase.integration.commandline.Main;
import static com.yeejoin.amos.bank.constants.AlarmConstant.*;
@Component
public class SelfSupportListener extends EmqxListener implements InitializingBean {
private final Logger logger = LogManager.getLogger(SelfSupportListener.class);
private static ObjectMapper mapper = new ObjectMapper();
private static final Logger logger = Logger.getLogger(SelfSupportListener.class);
@Autowired
private EmqKeeper emqKeeper;
private static TaskExecutor taskExecutor;
@Autowired
EquipmentMapper equipmentMapper;
......@@ -153,7 +139,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
if (!StringUtil.isNotEmpty(string)) {
return;
}
logger.error("---------shudu--string", string);
logger.debug("---------shudu--string" + string);
System.out.println("----supprtmqtt chuli recording : " + string);
//{\"maxTime\":\"1\",\"packetLossRate\":\"0\",\"avgTime\":\"0\",\"minTime\":\"0\",\"发包数\":\"\",\"icmpPackSize\":\"32\",\"status\":\"通\"}
JSONObject metricJson = JSONObject.parseObject(string);
......@@ -173,6 +159,9 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
record.setName(eqpName + " " + ipAddress);
iDeviceRecord.save(record);
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);
......
......@@ -4,9 +4,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -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.param.ReginParams;
import io.swagger.annotations.ApiParam;
import io.micrometer.core.instrument.util.StringUtils;
@RestController
@RequestMapping(value = "/rtsp")
public class AddressController extends BaseController{
private final Logger log = LoggerFactory.getLogger(AddressController.class);
private static final Logger log = Logger.getLogger(AddressController.class);
@Autowired
VideoService videoService;
......@@ -105,9 +105,12 @@ public class AddressController extends BaseController{
* @return
*/
@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 {
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);
} catch (Exception e) {
log.error(e.getMessage(), e);
......
......@@ -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.param.ReginParams;
import com.yeejoin.amos.spc.business.remote.RemoteSecurityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.util.ObjectUtils;
......@@ -28,11 +25,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -43,8 +37,7 @@ import java.util.stream.Collectors;
@Api(value = "/bank/alarm", tags = {"告警数据API"})
public class AlarmPointController extends BaseController {
private final Logger log = LoggerFactory.getLogger(AlarmPointController.class);
private static final Logger log = Logger.getLogger(AlarmPointController.class);
@Autowired
private IAlarmPointService alarmPointService;
......
......@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Sort;
......@@ -40,6 +41,8 @@ import io.swagger.annotations.ApiParam;
@Api(value = "/bank/equipment", tags = {"设备API"})
public class EquipmentController extends BaseController{
private static final Logger log = Logger.getLogger(EquipmentController.class);
@Autowired
private WarnService warnService;
......@@ -94,7 +97,9 @@ public class EquipmentController extends BaseController{
@GetMapping(value = "/synchronization", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "同步设备接口", notes = "添加设备接口")
public CommonResponse synDevice() {
log.debug("synchronization deviece");
equipmentService.syncDeviceList();
log.debug("synchronization sucess");
return CommonResponseUtil.success("同步成功");
}
......
package com.yeejoin.amos.bank.controller;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -28,7 +26,7 @@ import io.swagger.annotations.ApiOperation;
@Api(value = "/bank", tags = {"新平台请求数据API测试"})
public class TestController extends BaseController {
private final Logger log = LoggerFactory.getLogger(TestController.class);
private static final Logger log = Logger.getLogger(TestController.class);
// @Autowired
// RemoteSecurityService service;
......
......@@ -2,8 +2,7 @@ package com.yeejoin.amos.bank.controller;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -28,7 +27,7 @@ import com.yeejoin.amos.op.core.util.CommonResponseUtil;
@RequestMapping(value = "/video")
public class VideoController {
private final Logger log = LoggerFactory.getLogger(VideoController.class);
private static final Logger log = Logger.getLogger(VideoController.class);
@Autowired
VideoService videoService;
......
......@@ -19,7 +19,7 @@ public interface VideoMapper {
* @param floor3d
* @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);
......
......@@ -13,6 +13,6 @@ public interface IDynamicRingDataService {
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 {
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);
......
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -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.exception.YeeException;
import feign.Logger;
@Service
public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
......@@ -46,7 +49,7 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
}
@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 resStr = deviceService.selectEquipments(params1);
//String resStr = deviceService.dynamicRingData(DeviceUriEnum.查询三维设备点, token, params1);
......@@ -62,57 +65,73 @@ public class DynamicRingDataServiceImpl implements IDynamicRingDataService {
ArrayList<Node3DVoResponse> list = new ArrayList<>();
if (resJson != null) {
convertNode3DVoResponse(list, resJson, "01");
convertNode3DVoResponse(list, resJson, "01",orgCode);
}
if (fireDetectionJson != null) {
convertNode3DVoResponse(list, fireDetectionJson, "02");
convertNode3DVoResponse(list, fireDetectionJson, "02",orgCode);
}
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");
dataArray.forEach(e -> {
Node3DVoResponse node3dVoResponse = new Node3DVoResponse();
JSONObject paramsRes = e.getJSONObject("cfgParamJsonObject");
node3dVoResponse.setId(e.getString("id"));
// node3dVoResponse.setIsDoor(paramsRes.getBoolean("isDoor"));
node3dVoResponse.setKey("dynamicRingData" + e.getString("id"));
node3dVoResponse.setLabel(e.getString("name"));
node3dVoResponse.setLevel(type);
node3dVoResponse.setTitle(e.getString("name"));
node3dVoResponse.setLevelStr("dynamicRingData_" + type);
node3dVoResponse.setObjType(type);
node3dVoResponse.setObjKey(paramsRes.getString("storey"));
node3dVoResponse.setSourceId(paramsRes.getString("sourceId"));
CoordDTO postion = new CoordDTO();
String positonStr = paramsRes.getString("position");
if (positonStr != null && positonStr.contains("{")) {
JSONObject parseObject = JSONObject.parseObject(positonStr);
postion.setX(parseObject.getDouble("x"));
postion.setY(parseObject.getDouble("y"));
postion.setZ(parseObject.getDouble("z"));
} else if (positonStr != null && !"".equals(positonStr)) {
positonStr = positonStr.replace("[", "").replace("]", "").replace(",", ",");
String[] split = positonStr.split(",");
postion.setX(Double.valueOf(split[0]));
postion.setY(Double.valueOf(split[1]));
postion.setZ(Double.valueOf(split[2]));
}
node3dVoResponse.setPositionDTO(postion.toString());
node3dVoResponse.setPosition(postion);
node3dVoResponse.setRate(0);
node3dVoResponse.setRotation(new CoordDTO(0d, 0d, 0d));
node3dVoResponse.setRotationDTO(new CoordDTO(0d, 0d, 0d).toString());
node3dVoResponse.setScale(new CoordDTO(1d, 1d, 1d));
node3dVoResponse.setScaleDTO(new CoordDTO(1d, 1d, 1d).toString());
node3dVoResponse.setShowInfo(false);
node3dVoResponse.setTwinkle(false);
node3dVoResponse.setType("dynamicRingData");
list.add(node3dVoResponse);
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();
JSONObject paramsRes = e.getJSONObject("cfgParamJsonObject");
node3dVoResponse.setId(e.getString("id"));
// node3dVoResponse.setIsDoor(paramsRes.getBoolean("isDoor"));
node3dVoResponse.setKey("dynamicRingData" + e.getString("id"));
node3dVoResponse.setLabel(e.getString("name"));
node3dVoResponse.setLevel(type);
node3dVoResponse.setTitle(e.getString("name"));
node3dVoResponse.setLevelStr("dynamicRingData_" + type);
node3dVoResponse.setObjType(type);
node3dVoResponse.setObjKey(paramsRes.getString("storey"));
node3dVoResponse.setSourceId(paramsRes.getString("sourceId"));
CoordDTO postion = new CoordDTO();
String positonStr = paramsRes.getString("position");
if (positonStr != null && positonStr.contains("{")) {
JSONObject parseObject = JSONObject.parseObject(positonStr);
postion.setX(parseObject.getDouble("x"));
postion.setY(parseObject.getDouble("y"));
postion.setZ(parseObject.getDouble("z"));
} else if (positonStr != null && !"".equals(positonStr)) {
positonStr = positonStr.replace("[", "").replace("]", "").replace(",", ",");
String[] split = positonStr.split(",");
postion.setX(Double.valueOf(split[0]));
postion.setY(Double.valueOf(split[1]));
postion.setZ(Double.valueOf(split[2]));
}
node3dVoResponse.setPositionDTO(postion.toString());
node3dVoResponse.setPosition(postion);
node3dVoResponse.setRate(0);
node3dVoResponse.setRotation(new CoordDTO(0d, 0d, 0d));
node3dVoResponse.setRotationDTO(new CoordDTO(0d, 0d, 0d).toString());
node3dVoResponse.setScale(new CoordDTO(1d, 1d, 1d));
node3dVoResponse.setScaleDTO(new CoordDTO(1d, 1d, 1d).toString());
node3dVoResponse.setShowInfo(false);
node3dVoResponse.setTwinkle(false);
node3dVoResponse.setType("dynamicRingData");
return node3dVoResponse;
}
}
......@@ -47,8 +47,8 @@ public class VideoServiceImpl implements VideoService {
}
@Override
public List<Video> findAll(String floor3d) {
List<Video> findAll = mapper.findAll(floor3d);
public List<Video> findAll(String floor3d,String orgCode) {
List<Video> findAll = mapper.findAll(floor3d,orgCode);
return findAll;
}
......
......@@ -14,8 +14,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort;
......@@ -44,7 +43,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/
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 IAlarmService alarmService;
......
......@@ -14,8 +14,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort;
......@@ -46,7 +45,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/
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 IAlarmService alarmService;
......
......@@ -17,8 +17,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort;
......@@ -55,7 +54,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/
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 ITopographyService iTopographyService;
......
......@@ -15,9 +15,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.data.domain.Sort;
......@@ -46,7 +44,7 @@ import com.yeejoin.amos.spc.exception.YeeException;
*/
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 IAlarmService alarmService;
......
......@@ -26,8 +26,7 @@ import java.util.Properties;
import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.support.PropertiesLoaderUtils;
......@@ -53,7 +52,6 @@ import com.yeejoin.amos.bank.utils.JsonUtil;
import com.yeejoin.amos.op.core.common.response.CommonResponse;
import com.yeejoin.amos.spc.exception.YeeException;
import fr.opensagres.xdocreport.template.velocity.internal.Foreach;
import io.micrometer.core.instrument.util.StringUtils;
import org.springframework.util.ObjectUtils;
......@@ -64,7 +62,7 @@ import org.springframework.util.ObjectUtils;
*/
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 IAlarmService alarmService;
......
......@@ -13,8 +13,7 @@ import com.yeejoin.amos.spc.core.util.FileHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -32,7 +31,7 @@ import java.util.UUID;
@Api(tags = "风险清单相关")
public class ExcelController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(ExcelController.class);
private static final Logger logger = Logger.getLogger(ExcelController.class);
@Autowired
private ExcelMapper excelMapper;
......
......@@ -7,8 +7,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -42,7 +41,7 @@ import io.swagger.annotations.ApiOperation;
@Api(tags = "巡检信息推送")
public class ProtalDataController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(ProtalDataController.class);
private static final Logger log = Logger.getLogger(ProtalDataController.class);
@Autowired
private RemoteRuleServer remoteRuleServer;
......
......@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -31,7 +30,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcAftermath")
@Api(tags = "可能造成的后果")
public class SpcAftermathController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcAftermathController.class);
private static final Logger log = Logger.getLogger(SpcAftermathController.class);
@Autowired
private ISpcAftermathService iSpcAftermathService;
......
......@@ -5,8 +5,7 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
......@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcCamera")
@Api(tags = "摄像机api")
public class SpcCameraController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcCameraController.class);
private static final Logger log = Logger.getLogger(SpcCameraController.class);
@Autowired
ISpcCameraService iCameraService;
......
......@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -35,7 +34,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "api/spcControlMeasure")
@Api(tags = "控制措施管理")
public class SpcControlMeasureController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcControlMeasureController.class);
private static final Logger log = Logger.getLogger(SpcControlMeasureController.class);
@Autowired
private ISpcControlMeasureService iSpcControlMeasuresService;
......
......@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
......@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcEuipmentFacilities")
@Api(tags = "设备设施api")
public class SpcEquipmentController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcEquipmentController.class);
private static final Logger log = Logger.getLogger(SpcEquipmentController.class);
@Autowired
ISpcCameraService iCameraService;
......
......@@ -4,8 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcHazardSourceClassify")
@Api(tags = "危险源分类")
public class SpcHazardSourceClassifyController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcHazardSourceClassifyController.class);
private static final Logger log = Logger.getLogger(SpcHazardSourceClassifyController.class);
@Autowired
private IHazardSourceClassifyService iHazardSourceClassifyService;
......
......@@ -5,8 +5,7 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
......@@ -36,7 +35,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcIdentificationMethod")
@Api(tags = "风险辨识方法api")
public class SpcIdentificationMethodController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcIdentificationMethodController.class);
private static final Logger log = Logger.getLogger(SpcIdentificationMethodController.class);
@Autowired
ISpcIdentificationMethodService iIdentificationMethodService;
......
......@@ -2,8 +2,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "重大危险源api")
public class SpcMajorHazardInstallationController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcMajorHazardInstallationController.class);
private static final Logger log = Logger.getLogger(SpcMajorHazardInstallationController.class);
@Autowired
ISpcMajorHazardInstallationService iSpcMajorHazardInstallationService;
......
package com.yeejoin.amos.spc.business.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -21,7 +20,7 @@ import io.swagger.annotations.ApiOperation;
@Api(tags = "控制措施内容api")
public class SpcMeasureContentController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcCameraController.class);
private static final Logger log = Logger.getLogger(SpcMeasureContentController.class);
@Autowired
private ISpcMeasureContentService iSpcMeasureContentService;
......
......@@ -5,8 +5,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
......@@ -43,7 +42,7 @@ import io.swagger.annotations.ApiParam;
@RequestMapping(value = "/api/spcRiskFactor")
@Api(tags = "风险因素")
public class SpcRiskFactorController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcRiskFactorController.class);
private static final Logger log = Logger.getLogger(SpcRiskFactorController.class);
@Autowired
private ISpcRiskSourceService spcRiskSourceService;
......
......@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
......@@ -30,7 +29,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "风险源管理")
public class SpcRiskSourceController extends BaseController {
private final Logger log = LoggerFactory.getLogger(SpcRiskSourceController.class);
private static final Logger log = Logger.getLogger(SpcRiskSourceController.class);
@Autowired
......
......@@ -6,8 +6,7 @@ import com.yeejoin.amos.spc.business.service.intfc.ISpcStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -19,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "统计相关")
public class SpcStatisticsController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(SpcStatisticsController.class);
private static final Logger logger = Logger.getLogger(SpcStatisticsController.class);
@Autowired
private ISpcStatisticsService iSpcStatisticsService;
......
......@@ -3,8 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -37,7 +36,7 @@ import io.swagger.annotations.ApiParam;
@Api(tags = "作业活动模块相关")
public class SpcTaskworkController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(SpcTaskworkController.class);
private static final Logger logger = Logger.getLogger(SpcTaskworkController.class);
@Autowired
private ISpcTaskworkService iSpcTaskworkService;
......
......@@ -10,8 +10,7 @@ import com.yeejoin.amos.spc.core.common.request.CommonRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.util.CollectionUtils;
......@@ -27,7 +26,7 @@ import java.util.Map;
@Api(tags="时间轴")
public class TimeLineController extends BaseController{
private static final Logger log = LoggerFactory.getLogger(TimeLineController.class);
private static final Logger log = Logger.getLogger(TimeLineController.class);
@Autowired
IContingencyInstance iContingencyInstance;
......
......@@ -93,7 +93,7 @@ public class View3DController extends BaseController {
//动环数据
String token = getToken();
if(type.equals("dynamicRingData")) {
ArrayList<Node3DVoResponse> query3dData = iDynamicRingDataService.query3dData(token);
ArrayList<Node3DVoResponse> query3dData = iDynamicRingDataService.query3dData(token,orgCode);
return CommonResponseUtil.success(query3dData);
}else if(type.equals("impEquipment")){//设备
return CommonResponseUtil.success(iequipmentService.queryEqui3dData(orgCode));
......
......@@ -71,4 +71,6 @@ public interface EquipmentMapper extends BaseMapper {
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;
import com.yeejoin.amos.spc.business.service.model.OperateGroup;
import com.yeejoin.amos.spc.dao.entity.ContingencyOriginalData;
import com.yeejoin.amos.spc.dao.entity.ContingencyPlanInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -29,7 +28,7 @@ import java.util.Map;
@Service
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;
......
......@@ -8,8 +8,7 @@ import java.util.Set;
import java.util.UUID;
import org.assertj.core.util.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
......@@ -74,7 +73,7 @@ import com.yeejoin.amos.spc.dao.entity.SpcTaskworkMeasure;
@Service("iSpcRiskFactorService")
public class SpcRiskFactorServiceImpl implements ISpcRiskFactorService {
private final Logger log = LoggerFactory.getLogger(SpcRiskFactorServiceImpl.class);
private static final Logger log = Logger.getLogger(SpcRiskFactorServiceImpl.class);
@Autowired
private RemoteSecurityService remoteSecurityService;
......
......@@ -5,8 +5,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -43,7 +42,7 @@ import com.yeejoin.amos.spc.core.util.StringUtil;
@Service
public class SpcRiskListServiceImpl implements ISpcRiskListService {
private final Logger log = LoggerFactory.getLogger(SpcRiskListServiceImpl.class);
private static final Logger log = Logger.getLogger(SpcRiskListServiceImpl.class);
@Autowired
private RiskSourceMapper riskSourceMapper;
......
......@@ -61,6 +61,9 @@
<if test="floor3d != null">
and a.floor3d=#{floor3d}
</if>
<if test="orgCode != null">
and a.org_code LIKE concat('',#{orgCode},'%')
</if>
</select>
<select id="findPageList"
......
......@@ -276,6 +276,7 @@
<if test="fname != null" >
AND fe.`name` like concat('%',#{fname},'%')
</if>
</select>
......@@ -330,5 +331,23 @@
</trim>
WHERE nodeid=#{nodeid}
</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>
\ 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.io.netty=info
......@@ -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.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=logs/safetyPreIndustry.log
log4j.appender.logfile.MaxFileSize=10240KB
log4j.appender.logfile.File=logs/ccpc.log
log4j.appender.logfile.MaxFileSize=1024KB
log4j.appender.logfile.MaxBackupIndex=30
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %t %-5p [%c{1}:%L] %m%n
......
......@@ -77,18 +77,14 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.3.8.RELEASE</version>
</dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.3.8.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
......
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