You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
5.2 KiB
Java
158 lines
5.2 KiB
Java
package com.shxy.i2.serviceimpl;
|
|
|
|
import com.shxy.i2.Tool.AsyncMethod;
|
|
import com.shxy.i2.dao.*;
|
|
import com.shxy.i2.entity.*;
|
|
import com.shxy.i2.service.Webservcies;
|
|
import com.shxy.i2.service.XydlI2Service;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
@Service
|
|
@Slf4j
|
|
//@EnableAsync
|
|
public class WebServiceImpl implements Webservcies {
|
|
|
|
@Autowired
|
|
XydlI2Service xydlI2Service;
|
|
|
|
@Autowired
|
|
AsyncMethod asyncMethod;
|
|
|
|
@Autowired
|
|
private Niec_SensorsDao niec_sensorsDao;
|
|
|
|
|
|
@Value("${webservice.address}")
|
|
public String address;
|
|
//
|
|
@Value("${webservice.connecttime}")
|
|
public int connecttime;
|
|
|
|
@Value("${webservice.receivetime}")
|
|
public int receivetime;
|
|
|
|
// private static String address = "http://10.238.71.98:18096/ppa/webservice/CAGAccessService?wsdl";
|
|
//
|
|
// public static int receivetime = 60;
|
|
//
|
|
// public static int connecttime = 60;
|
|
|
|
/**
|
|
* 上传cac数据
|
|
*/
|
|
@Override
|
|
public void uploadData() {
|
|
log.info("实时数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_sf6_qtyl( equipMap);
|
|
|
|
xydlI2Service.upload_fhdlbx(equipMap);
|
|
xydlI2Service.upload_fhzxq( equipMap);
|
|
xydlI2Service.upload_sf6_qtsf( equipMap);
|
|
xydlI2Service.upload_ws( equipMap);
|
|
xydlI2Service.upload_dr_jyjc( equipMap);
|
|
|
|
xydlI2Service.upload_microclimate( equipMap);
|
|
xydlI2Service.upload_cnj( equipMap);
|
|
log.info("实时数据定时任务结束");
|
|
}
|
|
|
|
@Override
|
|
public void uploadtxData() {
|
|
log.info("实时铁芯数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_tx( equipMap);
|
|
log.info("实时数据定时任务结束");
|
|
}
|
|
|
|
|
|
//放到配置文件
|
|
@Override
|
|
public void uploadyspData() {
|
|
log.info("油色谱数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_ysp( equipMap);
|
|
log.info("油色谱数据定时任务结束");
|
|
}
|
|
|
|
@Override
|
|
public void uploadjfjcData() {
|
|
log.info("局放监测数据定时任务启动");
|
|
// 动态客户端
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_dlq_jbfd( equipMap);
|
|
xydlI2Service.upload_byq_jbfd( equipMap);
|
|
log.info("局放监测数据定时任务结束");
|
|
}
|
|
|
|
@Override
|
|
public void uploadyxData() {
|
|
log.info("实时数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_yx();
|
|
log.info("实时数据定时任务结束");
|
|
}
|
|
|
|
@Override
|
|
public void uploaddcywData() {
|
|
log.info("实时数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_dcyw( equipMap);
|
|
log.info("实时数据定时任务结束");
|
|
}
|
|
|
|
@Override
|
|
public void uploadjsyhwjyjcData() {
|
|
log.info("实时数据定时任务启动");
|
|
// 动态客户端
|
|
log.info("开始执行定时任务-查询数据库");
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
equipMap.put(item.getId(), item);
|
|
}
|
|
xydlI2Service.upload_jsyhw_jyjc( equipMap);
|
|
log.info("实时数据定时任务结束");
|
|
}
|
|
|
|
} |