I2新增查询功能

master
liuguijing 1 year ago
parent fc1e415fb1
commit 4804848466

@ -40,6 +40,22 @@
<type>pom</type>
</dependency>
<!-- SpringBoot Web容器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- SpringBoot 拦截器 -->
<dependency>
<groupId>org.springframework.boot</groupId>

@ -0,0 +1,17 @@
package com.shxy.i2.bean;
/**
* API
*
*/
public interface IErrorCode {
/**
*
*/
int getCode();
/**
*
*/
String getMessage();
}

@ -0,0 +1,34 @@
package com.shxy.i2.bean;
import lombok.Data;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
/**
* 线
*/
@Data
public class ListModel implements Serializable {
private List<Beans> list = new ArrayList<>();
@Data
public static class Beans {
private String name;
private BigInteger history;//历史数据量
private BigInteger uploadnum;//已上传数据量
private BigInteger nownum;//今日数据量
private BigInteger nowuploadnum;//今日上传数据量
}
}

@ -0,0 +1,121 @@
package com.shxy.i2.bean;
import cn.hutool.http.HttpStatus;
import java.io.Serializable;
public class ResponseReult<T> implements Serializable {
/**
*
*/
private T data;
/**
*
*/
private int code;
/**
*
*/
private String msg;
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public void setCode(int code, String msg) {
this.code = code;
this.msg = msg;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
/**
*
*
* @return
*/
public static <T> ResponseReult<T> success(T obj) {
ResponseReult<T> success = ResponseReult.success();
if (obj != null) {
success.setData(obj);
}
return success;
}
/**
*
*
* @return
*/
public static <T> ResponseReult<T> success() {
ResponseReult<T> response = new ResponseReult<>();
response.setCode(HttpStatus.HTTP_OK, "操作成功");
return response;
}
/**
*
*
* @param message
*/
public static <T> ResponseReult<T> fail(String message) {
return ResponseReult.error(HttpStatus.HTTP_BAD_REQUEST, message);
}
public static <T> ResponseReult<T> fail(int code, String msg) {
ResponseReult<T> response = new ResponseReult<>();
response.setCode(code, msg);
return response;
}
/**
*
*
* @return
*/
public static <T> ResponseReult<T> error(int code, String msg) {
ResponseReult<T> response = new ResponseReult<>();
response.setCode(code, msg);
return response;
}
/**
*
*
* @param errorCode
*/
public static <T> ResponseReult<T> error(IErrorCode errorCode) {
return ResponseReult.error(errorCode.getCode(), errorCode.getMessage());
}
/**
*
*
* @param message
*/
public static <T> ResponseReult<T> error(String message) {
return ResponseReult.error(HttpStatus.HTTP_INTERNAL_ERROR, message);
}
}

@ -0,0 +1,25 @@
package com.shxy.i2.bean;
import lombok.Data;
/**
* service
*
* @author
*/
@Data
public class ServiceBody<T> {
/**
*
*/
private T data;
/**
*
*/
private int code;
/**
*
*/
private String msg;
}

@ -0,0 +1,17 @@
package com.shxy.i2.bean;
/**
*
*
* @author xzg
*/
public class ServiceStatus {
/**
*
*/
public static final int SUCCESS = 200;
/**
*
*/
public static final int ERROR = 400;
}

@ -0,0 +1,32 @@
package com.shxy.i2.controller;
import com.shxy.i2.bean.ListModel;
import com.shxy.i2.bean.ResponseReult;
import com.shxy.i2.bean.ServiceBody;
import com.shxy.i2.bean.ServiceStatus;
import com.shxy.i2.service.XydlI2Service;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Slf4j
public class CheckController {
@Autowired
XydlI2Service xydlI2Service;
@RequestMapping("/list")
public ResponseReult<ListModel> list() {
ServiceBody<ListModel> serviceBody = xydlI2Service.list();
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -15,6 +15,10 @@ public interface Data_Byq_JbfdDao {
List<Data_Byq_Jbfd> selectUpload(@Param("isupload") Integer isupload);
Data_Byq_Jbfd selectMaxId();
Data_Byq_Jbfd selectNowId(@Param("date") Date date);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Byq_Jbfd;
import com.shxy.i2.entity.Data_Cnj;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_CnjDao {
List<Data_Cnj> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Cnj selectMaxId();
Data_Cnj selectNowId(@Param("date") Date date);
List<Data_Cnj> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Cnj;
import com.shxy.i2.entity.Data_Dcyw;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_DcywDao {
List<Data_Dcyw> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Dcyw selectMaxId();
Data_Dcyw selectNowId(@Param("date") Date date);
List<Data_Dcyw> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,6 +1,7 @@
package com.shxy.i2.dao;
import com.shxy.i2.bean.SendDataBean;
import com.shxy.i2.entity.Data_Dcyw;
import com.shxy.i2.entity.Data_Dlq_Jbfd;
import org.apache.ibatis.annotations.Param;
@ -13,6 +14,10 @@ public interface Data_Dlq_JbfdDao {
List<Data_Dlq_Jbfd> selectUpload(@Param("isupload") Integer isupload);
Data_Dlq_Jbfd selectMaxId();
Data_Dlq_Jbfd selectNowId(@Param("date") Date date);
List<Data_Dlq_Jbfd> selectUploadById(@Param("maxid") BigInteger maxid);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Dlq_Jbfd;
import com.shxy.i2.entity.Data_Dr_Jyjc;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_Dr_JyjcDao {
List<Data_Dr_Jyjc> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Dr_Jyjc selectMaxId();
Data_Dr_Jyjc selectNowId(@Param("date") Date date);
List<Data_Dr_Jyjc> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Dr_Jyjc;
import com.shxy.i2.entity.Data_Fhdlbx;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,11 @@ public interface Data_FhdlbxDao {
List<Data_Fhdlbx> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Fhdlbx selectMaxId();
Data_Fhdlbx selectNowId(@Param("date") Date date);
List<Data_Fhdlbx> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Fhdlbx;
import com.shxy.i2.entity.Data_Fhzxq;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_FhzxqDao {
List<Data_Fhzxq> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Fhzxq selectMaxId();
Data_Fhzxq selectNowId(@Param("date") Date date);
List<Data_Fhzxq> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Fhzxq;
import com.shxy.i2.entity.Data_Jsyhw_Jyjc;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_Jsyhw_JyjcDao {
List<Data_Jsyhw_Jyjc> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Jsyhw_Jyjc selectMaxId();
Data_Jsyhw_Jyjc selectNowId(@Param("date") Date date);
List<Data_Jsyhw_Jyjc> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Jsyhw_Jyjc;
import com.shxy.i2.entity.Data_Microclimate;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_MicroclimateDao {
List<Data_Microclimate> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Microclimate selectMaxId();
Data_Microclimate selectNowId(@Param("date") Date date);
List<Data_Microclimate> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Microclimate;
import com.shxy.i2.entity.Data_SF6_Qtsf;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_SF6_QtsfDao {
List<Data_SF6_Qtsf> selectUploadById(@Param("maxid") BigInteger maxid);
Data_SF6_Qtsf selectMaxId();
Data_SF6_Qtsf selectNowId(@Param("date") Date date);
List<Data_SF6_Qtsf> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_SF6_Qtsf;
import com.shxy.i2.entity.Data_SF6_Qtyl;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,11 @@ public interface Data_SF6_QtylDao {
List<Data_SF6_Qtyl> selectUploadById(@Param("maxid") BigInteger maxid);
Data_SF6_Qtyl selectMaxId();
Data_SF6_Qtyl selectNowId(@Param("date") Date date);
List<Data_SF6_Qtyl> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,6 +1,8 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_SF6_Qtyl;
import com.shxy.i2.entity.Data_Tx;
import com.shxy.i2.entity.Data_Ysp;
import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
@ -11,6 +13,10 @@ public interface Data_TxDao {
List<Data_Tx> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Tx selectMaxId();
Data_Tx selectNowId(@Param("date") Date date);
List<Data_Tx> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
@ -18,4 +24,5 @@ public interface Data_TxDao {
int updateList(@Param("isupload") Integer isupload, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
}

@ -1,5 +1,6 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Data_Tx;
import com.shxy.i2.entity.Data_Ws;
import org.apache.ibatis.annotations.Param;
@ -11,6 +12,10 @@ public interface Data_WsDao {
List<Data_Ws> selectUploadById(@Param("maxid") BigInteger maxid);
Data_Ws selectMaxId();
Data_Ws selectNowId(@Param("date") Date date);
List<Data_Ws> selectUpload(@Param("isupload") Integer isupload);
int updateByPrimaryKey(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") List<BigInteger> id, @Param("updateTime") Date updateTime);

@ -1,6 +1,8 @@
package com.shxy.i2.dao;
import cn.hutool.core.date.DateTime;
import com.shxy.i2.bean.SendDataBean;
import com.shxy.i2.entity.Data_Byq_Jbfd;
import com.shxy.i2.entity.Data_Ysp;
import org.apache.ibatis.annotations.Param;
@ -24,4 +26,8 @@ public interface Data_YspDao {
int updateDataList2(@Param("isupload") Integer isupload, @Param("maxid") BigInteger maxid, @Param("idlist") ArrayList<Integer> id, @Param("updateTime") Date updateTime);
int deleteData(@Param("time") Date time);
Data_Ysp selectMaxId();
Data_Ysp selectNowId(@Param("date") Date time);
}

@ -1,6 +1,7 @@
package com.shxy.i2.dao;
import com.shxy.i2.dto.Data_YxlDto;
import com.shxy.i2.entity.Data_Ws;
import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
@ -11,5 +12,9 @@ public interface Data_YxDao {
List<Data_YxlDto> selectByPrimaryKey(@Param("maxid") BigInteger maxid);
Data_YxlDto selectMaxId();
Data_YxlDto selectNowId(@Param("date") Date date);
int deleteData(@Param("time") Date time);
}

@ -5,11 +5,14 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
public interface Upload_checkDao {
Upload_check selectByPrimaryKey(String checkType);
List<Upload_check> selectAll();
int updateByPrimaryKey(@Param("checkType") String checkType, @Param("value") BigInteger value, @Param("updateTime") Date updateTime);
}

@ -10,6 +10,8 @@ import java.util.List;
public class Data_YxlDto {
BigInteger id;
BigInteger maxid;
BigInteger minid;
Integer sadr;
Date dtime;
Integer ival;

@ -9,6 +9,8 @@ import java.util.Date;
@Data
public class Data_Byq_Jbfd implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Cnj implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Dcyw implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -8,7 +8,8 @@ import java.util.Date;
@Data
public class Data_Dlq_Jbfd implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Dr_Jyjc implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Fhdlbx implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Fhzxq implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Jsyhw_Jyjc implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_Microclimate implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,7 +9,8 @@ import java.util.Date;
@Data
public class Data_SF6_Qtsf implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -10,7 +10,8 @@ import java.util.Date;
public class Data_SF6_Qtyl implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,6 +9,8 @@ import java.util.Date;
@Data
public class Data_Tx implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;

@ -8,7 +8,8 @@ import java.util.Date;
@Data
public class Data_Ws implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;
private Date acquisitiontime;

@ -9,6 +9,8 @@ import java.util.Date;
@Data
public class Data_Ysp implements Serializable {
private BigInteger id;
private BigInteger maxid;
private BigInteger minid;
private Integer eqmid;

@ -3,12 +3,14 @@ package com.shxy.i2.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
@Data
public class Data_Yx implements Serializable {
private Long id;
private BigInteger maxid;
private BigInteger minid;
private Integer sadr;
private Date dTime;

@ -1,5 +1,7 @@
package com.shxy.i2.service;
import com.shxy.i2.bean.ListModel;
import com.shxy.i2.bean.ServiceBody;
import com.shxy.i2.entity.Niec_Sensors;
import org.apache.cxf.endpoint.Client;
@ -38,4 +40,6 @@ public interface XydlI2Service {
void upload_yx(Client client);
void clear_history();
ServiceBody<ListModel> list();
}

@ -6,13 +6,8 @@ import com.shxy.i2.entity.*;
import com.shxy.i2.service.Webservcies;
import com.shxy.i2.service.XydlI2Service;
import lombok.extern.slf4j.Slf4j;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;
import java.util.HashMap;

File diff suppressed because it is too large Load Diff

@ -1,80 +1,76 @@
package com.shxy.i2.timeTask;
import com.shxy.i2.bean.AttrBean;
import com.shxy.i2.service.Webservcies;
import com.shxy.i2.service.XydlI2Service;
import lombok.extern.slf4j.Slf4j;
import org.apache.cxf.endpoint.Client;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author jingjing
* @date 2023-11-16 15:06
*/
@Component
@EnableScheduling
@Slf4j
//@EnableAsync
public class ScheduledTask {
@Autowired
Webservcies webservcies;
@Autowired
XydlI2Service xydlI2Service;
@Scheduled(fixedDelay = 60 * 60 * 1000)
public void cacyspupload() {
log.info("cacyspupload执行" );
webservcies.uploadyspData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cacjfjcupload() {
log.info("cacjfjcupload执行" );
webservcies.uploadjfjcData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cacupload() {
log.info("cacupload执行" );
webservcies.uploadData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cactxupload() {
log.info("cactxupload执行" );
webservcies.uploadtxData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cacyxupload() {
log.info("cacyxupload执行" );
webservcies.uploadyxData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cacdcywupload() {
log.info("cacdcywupload执行" );
webservcies.uploaddcywData();
}
@Scheduled(fixedDelay = 1 * 30 * 1000)
public void cacjsyhwjyjcupload() {
log.info("cacjsyhwjyjcupload执行" );
webservcies.uploadjsyhwjyjcData();
}
@Scheduled(cron = "0 0 13 * * ?")
public void clear() {
log.info("clear" );
xydlI2Service.clear_history();
}
}
//package com.shxy.i2.timeTask;
//
//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.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
///**
// * @author jingjing
// * @date 2023-11-16 15:06
// */
//@Component
//@EnableScheduling
//@Slf4j
////@EnableAsync
//public class ScheduledTask {
//
// @Autowired
// Webservcies webservcies;
//
// @Autowired
// XydlI2Service xydlI2Service;
//
// @Scheduled(fixedDelay = 60 * 60 * 1000)
// public void cacyspupload() {
// log.info("cacyspupload执行" );
// webservcies.uploadyspData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cacjfjcupload() {
// log.info("cacjfjcupload执行" );
// webservcies.uploadjfjcData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cacupload() {
// log.info("cacupload执行" );
// webservcies.uploadData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cactxupload() {
// log.info("cactxupload执行" );
// webservcies.uploadtxData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cacyxupload() {
// log.info("cacyxupload执行" );
// webservcies.uploadyxData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cacdcywupload() {
// log.info("cacdcywupload执行" );
// webservcies.uploaddcywData();
// }
//
// @Scheduled(fixedDelay = 1 * 30 * 1000)
// public void cacjsyhwjyjcupload() {
// log.info("cacjsyhwjyjcupload执行" );
// webservcies.uploadjsyhwjyjcData();
// }
//
//
// @Scheduled(cron = "0 0 13 * * ?")
// public void clear() {
// log.info("clear" );
// xydlI2Service.clear_history();
// }
//
//}

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_Byq_JbfdDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Byq_Jbfd">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="dischargeCapacity" jdbcType="REAL" property="dischargecapacity"/>
@ -23,9 +25,28 @@
t1.id, t1.eqmid, t1.acquisitionTime, t1.dischargeCapacity, t1.dischargePosition, t1.pulseCount, t1.isupload,
t1.dischargeWaveform,t1.create_time, t1.update_time
FROM
data_byq_jbfd t1 where t1.id <![CDATA[>]]> #{maxid}
data_byq_jbfd t1 where t1.id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_byq_jbfd
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_byq_jbfd where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
SELECT
t1.id, t1.eqmid, t1.acquisitionTime, t1.dischargeCapacity, t1.dischargePosition, t1.pulseCount, t1.isupload,

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_CnjDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Cnj">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="chargeTime" jdbcType="REAL" property="chargetime"/>
@ -18,8 +20,29 @@
select
<include refid="Base_Column_List"/>
from data_cnj
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_cnj
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_cnj where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_DcywDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Dcyw">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="oilTemperature" jdbcType="REAL" property="oiltemperature"/>
@ -18,8 +20,28 @@
select
<include refid="Base_Column_List"/>
from data_dcyw
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_dcyw
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dcyw where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_Dlq_JbfdDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Dlq_Jbfd">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="phase" jdbcType="VARCHAR" property="phase"/>
@ -26,8 +28,30 @@
t1.isupload,t1.dischargeWaveform,t1.create_time, t1.update_time
FROM
data_dlq_jbfd t1
where t1.id <![CDATA[>]]> #{maxid}
where t1.id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_dlq_jbfd
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dlq_jbfd where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
SELECT

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_Dr_JyjcDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Dr_Jyjc">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="capacitance" jdbcType="REAL" property="capacitance"/>
@ -24,8 +26,26 @@
select
<include refid="Base_Column_List"/>
from data_dr_jyjc
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_dr_jyjc
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dr_jyjc where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_FhdlbxDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Fhdlbx">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="action" jdbcType="INTEGER" property="action"/>
@ -19,9 +21,28 @@
select
<include refid="Base_Column_List"/>
from data_fhdlbx
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_fhdlbx
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_fhdlbx where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_Jsyhw_JyjcDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Jsyhw_Jyjc">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="systemVoltage" jdbcType="REAL" property="systemvoltage"/>
@ -23,8 +25,27 @@
select
<include refid="Base_Column_List"/>
from data_jsyhw_jyjc
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_jsyhw_jyjc
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_jsyhw_jyjc where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
@ -32,6 +53,9 @@
from data_jsyhw_jyjc
where isupload is null or isupload = #{isupload} order by id desc limit 1
</select>
<update id="updateByPrimaryKey" parameterType="com.shxy.i2.entity.Data_Jsyhw_Jyjc">
update data_jsyhw_jyjc
<set>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_MicroclimateDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Microclimate">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="airTemperature" jdbcType="REAL" property="airtemperature"/>
@ -26,9 +28,25 @@
select
<include refid="Base_Column_List"/>
from data_microclimate
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_microclimate
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_microclimate where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_SF6_QtsfDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_SF6_Qtsf">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="temperature" jdbcType="REAL" property="temperature"/>
@ -19,8 +21,23 @@
select
<include refid="Base_Column_List"/>
from data_sf6_qtsf
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_sf6_qtsf
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtsf where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_SF6_QtylDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_SF6_Qtyl">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="temperature" jdbcType="REAL" property="temperature"/>
@ -36,8 +38,28 @@
select
<include refid="Base_Column_List"/>
from data_sf6_qtyl
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_sf6_qtyl
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtyl where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_TxDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Tx">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="totalCoreCurrent" jdbcType="REAL" property="totalcorecurrent"/>
@ -13,11 +15,32 @@
<sql id="Base_Column_List">
id, eqmid, acquisitionTime, totalCoreCurrent, isupload, create_time, update_time
</sql>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_tx
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_tx where acquisitionTime >= #{date}
</select>
<select id="selectUploadById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from data_tx
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectUpload" resultMap="BaseResultMap">

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_WsDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Ws">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="moisture" jdbcType="REAL" property="moisture"/>
@ -17,9 +19,25 @@
select
<include refid="Base_Column_List"/>
from data_ws
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_ws
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_ws where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_YspDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Ysp">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="H2" jdbcType="REAL" property="h2"/>
@ -23,16 +25,35 @@
id, eqmid, acquisitionTime, H2, CH4, C2H6, C2H4, C2H2, CO, CO2, O2, N2, TotalHydrocarbon,
isupload, create_time, update_time
</sql>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_ysp
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_ysp where acquisitionTime >= #{date}
</select>
<!--//每组只查最大的-->
<select id="selectUploadById" resultMap="BaseResultMap">
SELECT
t1.id, t1.eqmid, t1.acquisitionTime, t1.H2, t1.CH4, t1.C2H6, t1.C2H4, t1.C2H2,t1.CO, t1.CO2, t1.O2, t1.N2,
t1.TotalHydrocarbon,t1.isupload, t1.create_time, t1.update_time
FROM
data_ysp t1 where t1.id <![CDATA[>]]> #{maxid}
data_ysp t1 where t1.id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectUpload" resultMap="BaseResultMap">
<!-- select-->
<!-- <include refid="Base_Column_List"/>-->
@ -139,4 +160,5 @@
from data_ysp
where acquisitionTime <![CDATA[<]]> #{time}
</delete>
</mapper>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_YxDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.dto.Data_YxlDto">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="sadr" jdbcType="INTEGER" property="sadr"/>
<result column="d_time" jdbcType="TIMESTAMP" property="dtime"/>
<result column="ival" jdbcType="INTEGER" property="ival"/>
@ -26,7 +28,14 @@
c.table_name as table_name,
c.phase as phase
from data_yx a left join niec_points b on a.sadr = b.sadr left join niec_sensors c on b.sensor_id = c.id
where a.id <![CDATA[>]]> #{maxid}
where a.id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_yx
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_yx where d_time >= #{date}
</select>
<delete id="deleteData" >

@ -7,18 +7,28 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
check_type, value, update_time
</sql>
check_type, value, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from upload_check
where check_type = #{checkType,jdbcType=VARCHAR}
<if test="checkType != null">
where check_type = #{checkType,jdbcType=VARCHAR}
</if>
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from upload_check
</select>
<update id="updateByPrimaryKey">
update upload_check
set value = #{value},
update_time = #{updateTime}
where check_type = #{checkType}
</update>
update upload_check
set value = #{value},
update_time = #{updateTime}
where check_type = #{checkType}
</update>
</mapper>

@ -3,6 +3,8 @@
<mapper namespace="com.shxy.i2.dao.Data_FhzxqDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Data_Fhzxq">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="maxid" jdbcType="BIGINT" property="maxid"/>
<result column="minid" jdbcType="BIGINT" property="minid"/>
<result column="eqmid" jdbcType="INTEGER" property="eqmid"/>
<result column="acquisitionTime" jdbcType="TIMESTAMP" property="acquisitiontime"/>
<result column="action" jdbcType="INTEGER" property="action"/>
@ -18,9 +20,29 @@
select
<include refid="Base_Column_List"/>
from data_fhzxq
where id <![CDATA[>]]> #{maxid}
where id <![CDATA[>]]> #{maxid} limit 10000
</select>
<select id="selectMaxId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid FROM data_fhzxq
</select>
<select id="selectNowId" resultMap="BaseResultMap">
SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_fhzxq where acquisitionTime >= #{date}
</select>
<select id="selectUpload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>

Loading…
Cancel
Save