diff --git a/sql/sql b/sql/sql new file mode 100644 index 0000000..a59def5 --- /dev/null +++ b/sql/sql @@ -0,0 +1,8 @@ +CREATE TABLE `upload_statics` ( + `id` int NOT NULL AUTO_INCREMENT, + `check_type` varchar(32) NOT NULL, + `first_value` bigint DEFAULT NULL, + `upload_time` date DEFAULT NULL COMMENT '上传记录的日期', + `update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='i2上传Id的确认表'; diff --git a/src/main/java/com/shxy/i2/Tool/AsyncMethod.java b/src/main/java/com/shxy/i2/Tool/AsyncMethod.java index 01fa9f5..89d274b 100644 --- a/src/main/java/com/shxy/i2/Tool/AsyncMethod.java +++ b/src/main/java/com/shxy/i2/Tool/AsyncMethod.java @@ -21,47 +21,6 @@ import java.util.List; @Component //@EnableAsync public class AsyncMethod { - @Autowired - private Data_Dlq_JbfdDao data_dlq_jbfdDao; - - @Autowired - private Data_Byq_JbfdDao data_byq_jbfdDao; - - @Autowired - private Data_SF6_QtylDao data_sf6_qtylDao; - - @Autowired - private Data_YspDao data_yspDao; - - @Autowired - private Data_WsDao data_wsDao; - - @Autowired - private Data_TxDao data_txDao; - - @Autowired - private Data_DcywDao data_dcywDao; - - @Autowired - private Data_Dr_JyjcDao data_dr_jyjcDao; - - @Autowired - private Data_Jsyhw_JyjcDao data_jsyhw_jyjcDao; - - @Autowired - private Data_FhzxqDao data_fhzxqDao; - - @Autowired - private Data_FhdlbxDao data_fhdlbxDao; - - @Autowired - private Data_SF6_QtsfDao data_sf6_qtsfDao; - - @Autowired - private Data_MicroclimateDao data_microclimateDao; - - @Autowired - private Data_CnjDao data_cnjDao; @Autowired private Upload_checkDao upload_checkDao; @@ -71,104 +30,7 @@ public class AsyncMethod { // @Async(value = "asyncServiceExecutor") - public void sendData(Client client, List idlist, String xml, String type) throws Exception { - Object[] objects = client.invoke("uploadCACData", xml); - String threadId = Thread.currentThread().getName(); - log.info("线程序号: " + threadId + "当前时间:" + new Date()); - if (objects != null && objects.length > 0) { - String string = String.valueOf(objects[0]); - log.info("返回的长度 : " + objects.length + " 返回的对象 : " + string); - JSONObject jsonObject = XML.toJSONObject(string); - if (jsonObject != null) { - JSONObject response = (JSONObject) jsonObject.get("response"); - if (response != null) { - JSONObject result = (JSONObject) response.get("result"); - if (result != null) { - Integer code = (Integer) result.get("code"); - if (code != null && code.intValue() == 0) { - log.info("上传成功"); - log.info("修改的id: " + idlist.toString()); - if (CollectionUtil.isNotEmpty(idlist)) { - if (StrUtil.equals(type, Constant.SF6_QTYL)) { - data_sf6_qtylDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.BYQ_JBFD)) { - data_byq_jbfdDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.DLQJBFD)) { - data_dlq_jbfdDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.YSP)) { - data_yspDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.WS)) { - data_wsDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.TX)) { - data_txDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.DCYW)) { - data_dcywDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.DRJYJC)) { - data_dr_jyjcDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.JSYHW)) { - data_jsyhw_jyjcDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.FHZXQ)) { - data_fhzxqDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.FHDLBX)) { - data_fhdlbxDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.CNJ)) { - data_cnjDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.SF6_QTSF)) { - data_sf6_qtsfDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } else if (StrUtil.equals(type, Constant.WQX)) { - data_microclimateDao.updateList(CommonStatus.UPLOAD.value(), idlist, new Date()); - } - - - } - } else { - log.info("上传失败"); - } - } - } - } - } - } - -// @Async(value = "asyncServiceExecutor") - public void sendJBFDData2(Client client, BigInteger maxid, ArrayList list1, String xml, String type) throws Exception { - Object[] objects = client.invoke("uploadCACData", xml); - String threadId = Thread.currentThread().getName(); - log.info("线程序号: " + threadId + "当前时间:" + new Date()); -// log.info("上传的油色谱数据: " + xml); - if (objects != null && objects.length > 0) { - String string = String.valueOf(objects[0]); - log.info("返回的长度 : " + objects.length + " 返回的对象 : " + string); - JSONObject jsonObject = XML.toJSONObject(string); - if (jsonObject != null) { - JSONObject response = (JSONObject) jsonObject.get("response"); - if (response != null) { - JSONObject result = (JSONObject) response.get("result"); - if (result != null) { - Integer code = (Integer) result.get("code"); - if (code != null && code.intValue() == 0) { - log.info("上传成功"); - log.info("修改的id: " + list1.toString()); - if (CollectionUtil.isNotEmpty(list1)) { - if (StrUtil.equals(type, Constant.BYQ_JBFD)) { - data_byq_jbfdDao.updateDataList2(CommonStatus.UPLOAD.value(), maxid, list1, new Date()); - } else if (StrUtil.equals(type, Constant.DLQJBFD)) { - data_dlq_jbfdDao.updateDataList2(CommonStatus.UPLOAD.value(), maxid, list1, new Date()); - } else if (StrUtil.equals(type, Constant.YSP)) { - data_yspDao.updateDataList2(CommonStatus.UPLOAD.value(), maxid, list1, new Date()); - } - } - } else { - log.info("上传失败"); - } - } - } - } - } - } - -// @Async(value = "asyncServiceExecutor") - public void sendData2(Client client, String xml) throws Exception { + public void sendData2(String xml) throws Exception { Object[] objects = createDynamicClient.invoke("uploadCACData", xml); String threadId = Thread.currentThread().getName(); log.info("线程序号: " + threadId + "当前时间:" + new Date()); @@ -193,34 +55,6 @@ public class AsyncMethod { } } - -// @Async(value = "asyncServiceExecutor") - public void sendYxData(Client client, BigInteger maxid, String xml) throws Exception { -// Object[] objects = client.invoke("uploadCACData", xml); -// if (objects != null && objects.length > 0) { -// String string = String.valueOf(objects[0]); -// log.info("返回的长度 : " + objects.length + " 返回的对象 : " + string); -// JSONObject jsonObject = XML.toJSONObject(string); -// if (jsonObject != null) { -// JSONObject response = (JSONObject) jsonObject.get("response"); -// if (response != null) { -// JSONObject result = (JSONObject) response.get("result"); -// if (result != null) { -// Integer code = (Integer) result.get("code"); -// if (code != null && code.intValue() == 0) { -// log.info("上传成功"); - if (maxid != null && maxid.longValue() > 0) { - upload_checkDao.updateByPrimaryKey(Constant.YXID, maxid, new Date()); - } -// } else { -// log.info("上传失败"); -// } -// } -// } -// } -// } - } - // @Async(value = "asyncServiceExecutor") public void updateRecordId(BigInteger maxid,String type) { if (maxid != null && maxid.longValue() > 0) { diff --git a/src/main/java/com/shxy/i2/dao/Data_Byq_JbfdDao.java b/src/main/java/com/shxy/i2/dao/Data_Byq_JbfdDao.java index fbf3891..6b3da69 100644 --- a/src/main/java/com/shxy/i2/dao/Data_Byq_JbfdDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_Byq_JbfdDao.java @@ -17,4 +17,5 @@ public interface Data_Byq_JbfdDao { Data_Byq_Jbfd selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_CnjDao.java b/src/main/java/com/shxy/i2/dao/Data_CnjDao.java index 29451ec..97283cb 100644 --- a/src/main/java/com/shxy/i2/dao/Data_CnjDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_CnjDao.java @@ -16,5 +16,5 @@ public interface Data_CnjDao { Data_Cnj selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_DcywDao.java b/src/main/java/com/shxy/i2/dao/Data_DcywDao.java index 2053877..ae9d4ed 100644 --- a/src/main/java/com/shxy/i2/dao/Data_DcywDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_DcywDao.java @@ -16,5 +16,5 @@ public interface Data_DcywDao { Data_Dcyw selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_Dlq_JbfdDao.java b/src/main/java/com/shxy/i2/dao/Data_Dlq_JbfdDao.java index d742515..04fdebf 100644 --- a/src/main/java/com/shxy/i2/dao/Data_Dlq_JbfdDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_Dlq_JbfdDao.java @@ -19,4 +19,5 @@ public interface Data_Dlq_JbfdDao { List selectUploadById(@Param("maxid") BigInteger maxid); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_Dr_JyjcDao.java b/src/main/java/com/shxy/i2/dao/Data_Dr_JyjcDao.java index 2fc5617..d472982 100644 --- a/src/main/java/com/shxy/i2/dao/Data_Dr_JyjcDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_Dr_JyjcDao.java @@ -16,4 +16,5 @@ public interface Data_Dr_JyjcDao { Data_Dr_Jyjc selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_FhdlbxDao.java b/src/main/java/com/shxy/i2/dao/Data_FhdlbxDao.java index d35c8dd..8d74983 100644 --- a/src/main/java/com/shxy/i2/dao/Data_FhdlbxDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_FhdlbxDao.java @@ -16,5 +16,5 @@ public interface Data_FhdlbxDao { Data_Fhdlbx selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_FhzxqDao.java b/src/main/java/com/shxy/i2/dao/Data_FhzxqDao.java index da0f730..72511ef 100644 --- a/src/main/java/com/shxy/i2/dao/Data_FhzxqDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_FhzxqDao.java @@ -16,4 +16,5 @@ public interface Data_FhzxqDao { Data_Fhzxq selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_Jsyhw_JyjcDao.java b/src/main/java/com/shxy/i2/dao/Data_Jsyhw_JyjcDao.java index 0adac19..d55b4c7 100644 --- a/src/main/java/com/shxy/i2/dao/Data_Jsyhw_JyjcDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_Jsyhw_JyjcDao.java @@ -16,4 +16,5 @@ public interface Data_Jsyhw_JyjcDao { Data_Jsyhw_Jyjc selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_MicroclimateDao.java b/src/main/java/com/shxy/i2/dao/Data_MicroclimateDao.java index 0c69574..f336b66 100644 --- a/src/main/java/com/shxy/i2/dao/Data_MicroclimateDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_MicroclimateDao.java @@ -16,5 +16,5 @@ public interface Data_MicroclimateDao { Data_Microclimate selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_SF6_QtsfDao.java b/src/main/java/com/shxy/i2/dao/Data_SF6_QtsfDao.java index 78f3f7c..ba4d993 100644 --- a/src/main/java/com/shxy/i2/dao/Data_SF6_QtsfDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_SF6_QtsfDao.java @@ -16,4 +16,5 @@ public interface Data_SF6_QtsfDao { Data_SF6_Qtsf selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_SF6_QtylDao.java b/src/main/java/com/shxy/i2/dao/Data_SF6_QtylDao.java index 4faa9d5..23cb558 100644 --- a/src/main/java/com/shxy/i2/dao/Data_SF6_QtylDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_SF6_QtylDao.java @@ -16,5 +16,5 @@ public interface Data_SF6_QtylDao { Data_SF6_Qtyl selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_TxDao.java b/src/main/java/com/shxy/i2/dao/Data_TxDao.java index 91b8c7d..256a3b8 100644 --- a/src/main/java/com/shxy/i2/dao/Data_TxDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_TxDao.java @@ -17,5 +17,5 @@ public interface Data_TxDao { Data_Tx selectNowId(@Param("date") Date date); - + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_WsDao.java b/src/main/java/com/shxy/i2/dao/Data_WsDao.java index fcd7530..09d4399 100644 --- a/src/main/java/com/shxy/i2/dao/Data_WsDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_WsDao.java @@ -16,4 +16,5 @@ public interface Data_WsDao { Data_Ws selectNowId(@Param("date") Date date); + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Data_YspDao.java b/src/main/java/com/shxy/i2/dao/Data_YspDao.java index d23c31b..809e490 100644 --- a/src/main/java/com/shxy/i2/dao/Data_YspDao.java +++ b/src/main/java/com/shxy/i2/dao/Data_YspDao.java @@ -18,4 +18,6 @@ public interface Data_YspDao { Data_Ysp selectMaxId(); Data_Ysp selectNowId(@Param("date") Date time); + + int deleteData(@Param("time") Date time); } \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/dao/Upload_StaticsDao.java b/src/main/java/com/shxy/i2/dao/Upload_StaticsDao.java new file mode 100644 index 0000000..07d64d8 --- /dev/null +++ b/src/main/java/com/shxy/i2/dao/Upload_StaticsDao.java @@ -0,0 +1,30 @@ +package com.shxy.i2.dao; + +import com.shxy.i2.entity.Upload_Statics; +import com.shxy.i2.entity.Upload_StaticsExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface Upload_StaticsDao { + long countByExample(Upload_StaticsExample example); + + int deleteByExample(Upload_StaticsExample example); + + int deleteByPrimaryKey(String checkType); + + int insert(Upload_Statics record); + + int insertSelective(Upload_Statics record); + + List selectByExample(Upload_StaticsExample example); + + Upload_Statics selectByPrimaryKey(String checkType); + + int updateByExampleSelective(@Param("record") Upload_Statics record, @Param("example") Upload_StaticsExample example); + + int updateByExample(@Param("record") Upload_Statics record, @Param("example") Upload_StaticsExample example); + + int updateByPrimaryKeySelective(Upload_Statics record); + + int updateByPrimaryKey(Upload_Statics record); +} \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/entity/Upload_Statics.java b/src/main/java/com/shxy/i2/entity/Upload_Statics.java new file mode 100644 index 0000000..1117943 --- /dev/null +++ b/src/main/java/com/shxy/i2/entity/Upload_Statics.java @@ -0,0 +1,23 @@ +package com.shxy.i2.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; +import java.util.Date; + +@Data +public class Upload_Statics implements Serializable { + private String checkType; + + private Integer id; + + private BigInteger firstValue; + + private Date uploadTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/entity/Upload_StaticsExample.java b/src/main/java/com/shxy/i2/entity/Upload_StaticsExample.java new file mode 100644 index 0000000..386c074 --- /dev/null +++ b/src/main/java/com/shxy/i2/entity/Upload_StaticsExample.java @@ -0,0 +1,538 @@ +package com.shxy.i2.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class Upload_StaticsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public Upload_StaticsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andCheckTypeIsNull() { + addCriterion("check_type is null"); + return (Criteria) this; + } + + public Criteria andCheckTypeIsNotNull() { + addCriterion("check_type is not null"); + return (Criteria) this; + } + + public Criteria andCheckTypeEqualTo(String value) { + addCriterion("check_type =", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeNotEqualTo(String value) { + addCriterion("check_type <>", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeGreaterThan(String value) { + addCriterion("check_type >", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeGreaterThanOrEqualTo(String value) { + addCriterion("check_type >=", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeLessThan(String value) { + addCriterion("check_type <", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeLessThanOrEqualTo(String value) { + addCriterion("check_type <=", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeLike(String value) { + addCriterion("check_type like", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeNotLike(String value) { + addCriterion("check_type not like", value, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeIn(List values) { + addCriterion("check_type in", values, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeNotIn(List values) { + addCriterion("check_type not in", values, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeBetween(String value1, String value2) { + addCriterion("check_type between", value1, value2, "checkType"); + return (Criteria) this; + } + + public Criteria andCheckTypeNotBetween(String value1, String value2) { + addCriterion("check_type not between", value1, value2, "checkType"); + return (Criteria) this; + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFirstValueIsNull() { + addCriterion("first_value is null"); + return (Criteria) this; + } + + public Criteria andFirstValueIsNotNull() { + addCriterion("first_value is not null"); + return (Criteria) this; + } + + public Criteria andFirstValueEqualTo(Long value) { + addCriterion("first_value =", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueNotEqualTo(Long value) { + addCriterion("first_value <>", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueGreaterThan(Long value) { + addCriterion("first_value >", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueGreaterThanOrEqualTo(Long value) { + addCriterion("first_value >=", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueLessThan(Long value) { + addCriterion("first_value <", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueLessThanOrEqualTo(Long value) { + addCriterion("first_value <=", value, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueIn(List values) { + addCriterion("first_value in", values, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueNotIn(List values) { + addCriterion("first_value not in", values, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueBetween(Long value1, Long value2) { + addCriterion("first_value between", value1, value2, "firstValue"); + return (Criteria) this; + } + + public Criteria andFirstValueNotBetween(Long value1, Long value2) { + addCriterion("first_value not between", value1, value2, "firstValue"); + return (Criteria) this; + } + + public Criteria andUploadTimeIsNull() { + addCriterion("upload_time is null"); + return (Criteria) this; + } + + public Criteria andUploadTimeIsNotNull() { + addCriterion("upload_time is not null"); + return (Criteria) this; + } + + public Criteria andUploadTimeEqualTo(Date value) { + addCriterionForJDBCDate("upload_time =", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotEqualTo(Date value) { + addCriterionForJDBCDate("upload_time <>", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeGreaterThan(Date value) { + addCriterionForJDBCDate("upload_time >", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("upload_time >=", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeLessThan(Date value) { + addCriterionForJDBCDate("upload_time <", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("upload_time <=", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeIn(List values) { + addCriterionForJDBCDate("upload_time in", values, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotIn(List values) { + addCriterionForJDBCDate("upload_time not in", values, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeBetween(Date value1, Date value2) { + addCriterionForJDBCDate("upload_time between", value1, value2, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("upload_time not between", value1, value2, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/shxy/i2/service/XydlI2Service.java b/src/main/java/com/shxy/i2/service/XydlI2Service.java index ec5eb80..75533c7 100644 --- a/src/main/java/com/shxy/i2/service/XydlI2Service.java +++ b/src/main/java/com/shxy/i2/service/XydlI2Service.java @@ -9,37 +9,40 @@ import java.util.HashMap; public interface XydlI2Service { - void upload_byq_jbfd(Client client, HashMap equipMap); + void upload_byq_jbfd( HashMap equipMap); - void upload_sf6_qtyl(Client client, HashMap equipMap); + void upload_sf6_qtyl( HashMap equipMap); - void upload_dcyw(Client client, HashMap equipMap); + void upload_dcyw(HashMap equipMap); - void upload_fhdlbx(Client client, HashMap equipMap); + void upload_fhdlbx( HashMap equipMap); - void upload_fhzxq(Client client, HashMap equipMap); + void upload_fhzxq(HashMap equipMap); - void upload_sf6_qtsf(Client client, HashMap equipMap); + void upload_sf6_qtsf( HashMap equipMap); - void upload_tx(Client client, HashMap equipMap); + void upload_tx( HashMap equipMap); - void upload_ws(Client client, HashMap equipMap); + void upload_ws( HashMap equipMap); - void upload_dr_jyjc(Client client, HashMap equipMap); + void upload_dr_jyjc( HashMap equipMap); - void upload_jsyhw_jyjc(Client client, HashMap equipMap); + void upload_jsyhw_jyjc( HashMap equipMap); - void upload_microclimate(Client client, HashMap equipMap); + void upload_microclimate( HashMap equipMap); - void upload_dlq_jbfd(Client client, HashMap equipMap); + void upload_dlq_jbfd( HashMap equipMap); - void upload_ysp(Client client, HashMap equipMap); + void upload_ysp(HashMap equipMap); - void upload_cnj(Client client, HashMap equipMap); + void upload_cnj( HashMap equipMap); - void upload_yx(Client client); + void upload_yx(); void clear_history(); ServiceBody list(); + + void statics(); + } diff --git a/src/main/java/com/shxy/i2/serviceimpl/WebServiceImpl.java b/src/main/java/com/shxy/i2/serviceimpl/WebServiceImpl.java index 675e442..e5a73e1 100644 --- a/src/main/java/com/shxy/i2/serviceimpl/WebServiceImpl.java +++ b/src/main/java/com/shxy/i2/serviceimpl/WebServiceImpl.java @@ -56,16 +56,16 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_sf6_qtyl(null, equipMap); + xydlI2Service.upload_sf6_qtyl( equipMap); - xydlI2Service.upload_fhdlbx(null, equipMap); - xydlI2Service.upload_fhzxq(null, equipMap); - xydlI2Service.upload_sf6_qtsf(null, equipMap); - xydlI2Service.upload_ws(null, equipMap); - xydlI2Service.upload_dr_jyjc(null, 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(null, equipMap); - xydlI2Service.upload_cnj(null, equipMap); + xydlI2Service.upload_microclimate( equipMap); + xydlI2Service.upload_cnj( equipMap); log.info("实时数据定时任务结束"); } @@ -79,7 +79,7 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_tx(null, equipMap); + xydlI2Service.upload_tx( equipMap); log.info("实时数据定时任务结束"); } @@ -95,7 +95,7 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_ysp(null, equipMap); + xydlI2Service.upload_ysp( equipMap); log.info("油色谱数据定时任务结束"); } @@ -108,14 +108,14 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_dlq_jbfd(null, equipMap); - xydlI2Service.upload_byq_jbfd(null, equipMap); + xydlI2Service.upload_dlq_jbfd( equipMap); + xydlI2Service.upload_byq_jbfd( equipMap); log.info("局放监测数据定时任务结束"); } @Override public void uploadyxData() { - log.info("实时数据定时任务启动"); + log.info("实时数据定时任务启动"); // 动态客户端 log.info("开始执行定时任务-查询数据库"); HashMap equipMap = new HashMap(); @@ -123,7 +123,7 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_yx(null); + xydlI2Service.upload_yx(); log.info("实时数据定时任务结束"); } @@ -137,7 +137,7 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_dcyw(null, equipMap); + xydlI2Service.upload_dcyw( equipMap); log.info("实时数据定时任务结束"); } @@ -151,7 +151,7 @@ public class WebServiceImpl implements Webservcies { for (Niec_Sensors item : niec_sensors) { equipMap.put(item.getId(), item); } - xydlI2Service.upload_jsyhw_jyjc(null, equipMap); + xydlI2Service.upload_jsyhw_jyjc( equipMap); log.info("实时数据定时任务结束"); } diff --git a/src/main/java/com/shxy/i2/serviceimpl/XydlI2ServiceImpl.java b/src/main/java/com/shxy/i2/serviceimpl/XydlI2ServiceImpl.java index a67c42d..ebae4d7 100644 --- a/src/main/java/com/shxy/i2/serviceimpl/XydlI2ServiceImpl.java +++ b/src/main/java/com/shxy/i2/serviceimpl/XydlI2ServiceImpl.java @@ -3,7 +3,6 @@ package com.shxy.i2.serviceimpl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; @@ -16,10 +15,8 @@ import com.shxy.i2.dto.Data_YxlDto; import com.shxy.i2.entity.*; 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.stereotype.Service; -import org.springframework.util.Assert; import java.math.BigDecimal; import java.math.BigInteger; @@ -75,13 +72,15 @@ public class XydlI2ServiceImpl implements XydlI2Service { @Autowired private Data_MicroclimateDao data_microclimateDao; - @Autowired private Upload_checkDao upload_checkDao; @Autowired private Data_YxDao data_yxDao; + @Autowired + private Upload_StaticsDao upload_staticsDao; + @Autowired AsyncMethod asyncMethod; @@ -91,7 +90,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { public static int sendlimit = 1000; @Override - public void upload_byq_jbfd(Client client, HashMap equipMap) { + public void upload_byq_jbfd(HashMap equipMap) { //查询目前上传的变压器局部放电的id 记录变压器局部放电上传的id大小 Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.BYQJBFDID); BigInteger value = null; @@ -176,7 +175,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { sendDataBean.setMaxid(id); if ((index != 0 && index % sendlimit == 0) || index == (data_byq_jbfdlist.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -191,7 +190,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_cnj(Client client, HashMap equipMap) { + public void upload_cnj(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.CNJID); BigInteger value = null; if (upload_check == null) { @@ -249,7 +248,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -264,7 +263,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_dcyw(Client client, HashMap equipMap) { + public void upload_dcyw(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DCYWID); BigInteger value = null; if (upload_check == null) { @@ -321,7 +320,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -336,7 +335,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_dlq_jbfd(Client client, HashMap equipMap) { + public void upload_dlq_jbfd(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DLQJBFDID); BigInteger value = null; if (upload_check == null) { @@ -415,7 +414,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -430,7 +429,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_dr_jyjc(Client client, HashMap equipMap) { + public void upload_dr_jyjc(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.DRJYJCID); BigInteger value = null; if (upload_check == null) { @@ -524,7 +523,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -539,7 +538,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_fhdlbx(Client client, HashMap equipMap) { + public void upload_fhdlbx(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHDLBXID); BigInteger value = null; if (upload_check == null) { @@ -603,7 +602,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -618,7 +617,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_fhzxq(Client client, HashMap equipMap) { + public void upload_fhzxq(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.FHZXQID); BigInteger value = null; if (upload_check == null) { @@ -682,7 +681,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -697,7 +696,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_jsyhw_jyjc(Client client, HashMap equipMap) { + public void upload_jsyhw_jyjc(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.JSYHWJYJCID); BigInteger value = null; if (upload_check == null) { @@ -783,7 +782,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -798,7 +797,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_sf6_qtsf(Client client, HashMap equipMap) { + public void upload_sf6_qtsf(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTSFID); BigInteger value = null; if (upload_check == null) { @@ -862,7 +861,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -877,7 +876,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_sf6_qtyl(Client client, HashMap equipMap) { + public void upload_sf6_qtyl(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.SF6QTYLID); BigInteger value = null; if (upload_check == null) { @@ -956,7 +955,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { log.info("开始传输"); String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -971,7 +970,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_tx(Client client, HashMap equipMap) { + public void upload_tx(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.TXID); BigInteger value = null; if (upload_check == null) { @@ -1028,7 +1027,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -1045,7 +1044,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_ws(Client client, HashMap equipMap) { + public void upload_ws(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.WSID); BigInteger value = null; if (upload_check == null) { @@ -1102,7 +1101,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -1117,7 +1116,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_ysp(Client client, HashMap equipMap) { + public void upload_ysp(HashMap equipMap) { //查询目前上传的油色谱的id 记录油色谱上传的id大小 Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YSPID); BigInteger value = null; @@ -1241,7 +1240,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { log.info("测试断点4"); String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); log.info("ysp组装完成,开始上传"); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -1253,11 +1252,10 @@ public class XydlI2ServiceImpl implements XydlI2Service { } else { log.info("没有查询到ysp的数据"); } -// } } @Override - public void upload_microclimate(Client client, HashMap equipMap) { + public void upload_microclimate(HashMap equipMap) { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.MICROCLIMATEID); BigInteger value = null; if (upload_check == null) { @@ -1349,7 +1347,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { cacdatalist.add(cacdata); if ((index != 0 && index % sendlimit == 0) || index == (list.size() - 1)) { String xml = GenerateI2Xml.generateEndCacXml(cacdatalist); - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); cacdatalist = new ArrayList<>(); } } catch (Exception e) { @@ -1364,9 +1362,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { } @Override - public void upload_yx(Client client) { -// Boolean iscontiue = true; -// while (iscontiue) { + public void upload_yx() { Upload_check upload_check = upload_checkDao.selectByPrimaryKey(Constant.YXID); BigInteger value = null; if (upload_check == null) { @@ -1442,12 +1438,11 @@ public class XydlI2ServiceImpl implements XydlI2Service { try { String xml = GenerateI2Xml.generateYxCacXml(attr); if (xml != null && !xml.equals("")) { - asyncMethod.sendData2(client, xml); + asyncMethod.sendData2(xml); } } catch (Exception e) { e.printStackTrace(); } - } asyncMethod.updateRecordId(maxid, Constant.YXID); } else { @@ -1458,7 +1453,7 @@ public class XydlI2ServiceImpl implements XydlI2Service { @Override public void clear_history() { log.info("开启定时删除"); - DateTime dateTime = DateUtil.offsetDay(new Date(), -3); + DateTime dateTime = DateUtil.offsetDay(new Date(), -7); data_byq_jbfdDao.deleteData(dateTime); data_cnjDao.deleteData(dateTime); data_dcywDao.deleteData(dateTime); @@ -1479,14 +1474,14 @@ public class XydlI2ServiceImpl implements XydlI2Service { @Override public ServiceBody list() { ListModel listModel = new ListModel(); - HashMap map = new HashMap(); + HashMap map = new HashMap(); List upload_checks = upload_checkDao.selectAll(); - for (Upload_check item:upload_checks) { + for (Upload_check item : upload_checks) { map.put(item.getCheckType(), item.getValue()); } -// String today = DateUtil.today(); - String today = "2024-02-01"; + String today = DateUtil.today(); +// String today = "2024-02-01"; ListModel.Beans yspbeans = new ListModel.Beans(); yspbeans.setName("油色谱"); @@ -1504,7 +1499,6 @@ public class XydlI2ServiceImpl implements XydlI2Service { yspbeans.setNowuploadnum(BigInteger.valueOf(ysptodayupload.longValue())); listModel.getList().add(yspbeans); - ListModel.Beans txbeans = new ListModel.Beans(); txbeans.setName("铁芯夹件"); Data_Tx data_tx1 = data_txDao.selectMaxId(); @@ -1521,7 +1515,6 @@ public class XydlI2ServiceImpl implements XydlI2Service { txbeans.setNowuploadnum(BigInteger.valueOf(txtodayupload.longValue())); listModel.getList().add(txbeans); - ListModel.Beans dlqbeans = new ListModel.Beans(); dlqbeans.setName("断路器局放"); Data_Dlq_Jbfd data_dlq_jbfd1 = data_dlq_jbfdDao.selectMaxId(); @@ -1539,7 +1532,6 @@ public class XydlI2ServiceImpl implements XydlI2Service { listModel.getList().add(dlqbeans); - ListModel.Beans sf6beans = new ListModel.Beans(); sf6beans.setName("SF6气体压力"); Data_SF6_Qtyl data_sf6_qtyl1 = data_sf6_qtylDao.selectMaxId(); @@ -1593,6 +1585,188 @@ public class XydlI2ServiceImpl implements XydlI2Service { serviceBody.setCode(ServiceStatus.SUCCESS); serviceBody.setData(listModel); return serviceBody; + } + + /** + * 统计每日上传量 + */ + @Override + public void statics() { +// Date updateTime = new Date(); +// DateTime uploadTime = DateUtil.beginOfDay(updateTime); +// +// Data_Byq_Jbfd data_byq_jbfd = data_byq_jbfdDao.selectMaxId(); +// BigInteger jbfdid = data_byq_jbfd.getMaxid(); +// if (jbfdid!=null) { +// Upload_Statics jbfdrecord = new Upload_Statics(); +// jbfdrecord.setCheckType(Constant.BYQJBFDID); +// jbfdrecord.setFirstValue(jbfdid); +// jbfdrecord.setUploadTime(uploadTime); +// jbfdrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(jbfdrecord); +// } +// +// Data_Cnj data_cnj = data_cnjDao.selectMaxId(); +// BigInteger cnjId = data_cnj.getMaxid(); +// if (cnjId != null) { +// Upload_Statics cnjrecord = new Upload_Statics(); +// cnjrecord.setCheckType(Constant.CNJID); +// cnjrecord.setFirstValue(cnjId); +// cnjrecord.setUploadTime(uploadTime); +// cnjrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(cnjrecord); +// } +// +// +// Data_Dcyw data_dcyw = data_dcywDao.selectMaxId(); +// BigInteger dcywId = data_dcyw.getId(); +// if (dcywId != null) { +// Upload_Statics dcywrecord = new Upload_Statics(); +// dcywrecord.setCheckType(Constant.DCYWID); +// dcywrecord.setFirstValue(dcywId); +// dcywrecord.setUploadTime(uploadTime); +// dcywrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(dcywrecord); +// } +// +// Data_Dlq_Jbfd data_dlq_jbfd = data_dlq_jbfdDao.selectMaxId(); +// BigInteger dlq_jbfdId = data_dlq_jbfd.getId(); +// if (dlq_jbfdId!=null) { +// Upload_Statics dlq_jbfdrecord = new Upload_Statics(); +// dlq_jbfdrecord.setCheckType(Constant.DLQJBFDID); +// dlq_jbfdrecord.setFirstValue(dlq_jbfdId); +// dlq_jbfdrecord.setUploadTime(uploadTime); +// dlq_jbfdrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(dlq_jbfdrecord); +// } +// +// +// Data_Dr_Jyjc data_dr_jyjc = data_dr_jyjcDao.selectMaxId(); +// BigInteger dr_jyjcId = data_dr_jyjc.getId(); +// if (dr_jyjcId !=null) { +// Upload_Statics dr_jyjcrecord = new Upload_Statics(); +// dr_jyjcrecord.setCheckType(Constant.DRJYJCID); +// dr_jyjcrecord.setFirstValue(dr_jyjcId); +// dr_jyjcrecord.setUploadTime(uploadTime); +// dr_jyjcrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(dr_jyjcrecord); +// } +// +// Data_Fhdlbx data_fhdlbx = data_fhdlbxDao.selectMaxId(); +// BigInteger fhdlbxId = data_fhdlbx.getId(); +// if (fhdlbxId!=null) { +// Upload_Statics fhdlbxIdrecord = new Upload_Statics(); +// fhdlbxIdrecord.setCheckType(Constant.FHDLBXID); +// fhdlbxIdrecord.setFirstValue(fhdlbxId); +// fhdlbxIdrecord.setUploadTime(uploadTime); +// fhdlbxIdrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(fhdlbxIdrecord); +// } +// +// Data_Fhzxq data_fhzxq = data_fhzxqDao.selectMaxId(); +// BigInteger fhzxqId = data_fhzxq.getId(); +// if (fhzxqId!=null) { +// Upload_Statics fhzxqrecord = new Upload_Statics(); +// fhzxqrecord.setCheckType(Constant.FHZXQID); +// fhzxqrecord.setFirstValue(fhzxqId); +// fhzxqrecord.setUploadTime(uploadTime); +// fhzxqrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(fhzxqrecord); +// } +// +// +// Data_Jsyhw_Jyjc data_jsyhw_jyjc = data_jsyhw_jyjcDao.selectMaxId(); +// BigInteger jsyhw_jyjcId = data_jsyhw_jyjc.getId(); +// if (jsyhw_jyjcId !=null) { +// Upload_Statics jsyhw_jyjcrecord = new Upload_Statics(); +// jsyhw_jyjcrecord.setCheckType(Constant.JSYHWJYJCID); +// jsyhw_jyjcrecord.setFirstValue(jsyhw_jyjcId); +// jsyhw_jyjcrecord.setUploadTime(uploadTime); +// jsyhw_jyjcrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(jsyhw_jyjcrecord); +// } +// +// Data_SF6_Qtsf data_sf6_qtsf = data_sf6_qtsfDao.selectMaxId(); +// BigInteger sf6_qtsfId = data_sf6_qtsf.getId(); +// if (sf6_qtsfId != null) { +// Upload_Statics sf6_qtsfrecord = new Upload_Statics(); +// sf6_qtsfrecord.setCheckType(Constant.SF6QTSFID); +// sf6_qtsfrecord.setFirstValue(sf6_qtsfId); +// sf6_qtsfrecord.setUploadTime(uploadTime); +// sf6_qtsfrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(sf6_qtsfrecord); +// } +// +// Data_SF6_Qtyl data_sf6_qtyl = data_sf6_qtylDao.selectMaxId(); +// BigInteger sf6_qtylId = data_sf6_qtyl.getId(); +// if (sf6_qtylId !=null) { +// Upload_Statics sf6_qtylIdrecord = new Upload_Statics(); +// sf6_qtylIdrecord.setCheckType(Constant.SF6QTYLID); +// sf6_qtylIdrecord.setFirstValue(sf6_qtylId); +// sf6_qtylIdrecord.setUploadTime(uploadTime); +// sf6_qtylIdrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(sf6_qtylIdrecord); +// } +// +// Data_Tx data_tx = data_txDao.selectMaxId(); +// BigInteger txId = data_tx.getId(); +// if (txId != null) { +// Upload_Statics txrecord = new Upload_Statics(); +// txrecord.setCheckType(Constant.TXID); +// txrecord.setFirstValue(txId); +// txrecord.setUploadTime(uploadTime); +// txrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(txrecord); +// } +// +// +// Data_Ws data_ws = data_wsDao.selectMaxId(); +// BigInteger wsId = data_ws.getId(); +// if (wsId!=null) { +// Upload_Statics wsrecord = new Upload_Statics(); +// wsrecord.setCheckType(Constant.WSID); +// wsrecord.setFirstValue(wsId); +// wsrecord.setUploadTime(uploadTime); +// wsrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(wsrecord); +// } +// +// +// Data_Ysp data_ysp = data_yspDao.selectMaxId(); +// BigInteger yspId = data_ysp.getId(); +// if (yspId!=null) { +// Upload_Statics ysprecord = new Upload_Statics(); +// ysprecord.setCheckType(Constant.YSPID); +// ysprecord.setFirstValue(yspId); +// ysprecord.setUploadTime(uploadTime); +// ysprecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(ysprecord); +// } +// +// +// Data_Microclimate data_microclimate = data_microclimateDao.selectMaxId(); +// BigInteger microclimateId = data_microclimate.getId(); +// if (microclimateId !=null) { +// Upload_Statics microclimaterecord = new Upload_Statics(); +// microclimaterecord.setCheckType(Constant.MICROCLIMATEID); +// microclimaterecord.setFirstValue(microclimateId); +// microclimaterecord.setUploadTime(uploadTime); +// microclimaterecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(microclimaterecord); +// } +// +// +// Data_YxlDto data_yxlDto = data_yxDao.selectMaxId(); +// BigInteger yxId = data_yxlDto.getId(); +// if (yxId!=null) { +// Upload_Statics yxrecord = new Upload_Statics(); +// yxrecord.setCheckType(Constant.YXID); +// yxrecord.setFirstValue(yxId); +// yxrecord.setUploadTime(uploadTime); +// yxrecord.setUpdateTime(updateTime); +// upload_staticsDao.insertSelective(yxrecord); +// +// } } diff --git a/src/main/java/com/shxy/i2/timeTask/ScheduledTask.java b/src/main/java/com/shxy/i2/timeTask/ScheduledTask.java index a550299..fb24715 100644 --- a/src/main/java/com/shxy/i2/timeTask/ScheduledTask.java +++ b/src/main/java/com/shxy/i2/timeTask/ScheduledTask.java @@ -66,11 +66,16 @@ public class ScheduledTask { webservcies.uploadjsyhwjyjcData(); } - @Scheduled(cron = "0 0 13 * * ?") public void clear() { log.info("clear" ); xydlI2Service.clear_history(); } +// @Scheduled(cron = "0 0 * * * ?") +// public void statics() { +// log.info("开始统计" ); +// xydlI2Service.statics(); +// } + } diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 3ed67ed..2df1d35 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -68,7 +68,21 @@ spring: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8094 + port: 8095 + servlet: + # 应用的访问路径 + context-path: /xymanager + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + max-swallow-size: -1 # tomcat默认大小2M,超过2M的文件不会被捕获,需要调整此处大小为100MB或者-1即可 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 # 日志配置 logging: diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 80327d0..45585ca 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -17,7 +17,7 @@ @@ -181,11 +181,18 @@ - + + + + + + + + +
diff --git a/src/main/resources/mappers/Data_Byq_JbfdDao.xml b/src/main/resources/mappers/Data_Byq_JbfdDao.xml index 5cb19f1..c6aaf3e 100644 --- a/src/main/resources/mappers/Data_Byq_JbfdDao.xml +++ b/src/main/resources/mappers/Data_Byq_JbfdDao.xml @@ -36,4 +36,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_byq_jbfd where acquisitionTime >= #{date} + + delete + from data_byq_jbfd + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_CnjDao.xml b/src/main/resources/mappers/Data_CnjDao.xml index d27bc09..b6e564a 100644 --- a/src/main/resources/mappers/Data_CnjDao.xml +++ b/src/main/resources/mappers/Data_CnjDao.xml @@ -30,4 +30,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_cnj where acquisitionTime >= #{date} + + delete + from data_cnj + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_DcywDao.xml b/src/main/resources/mappers/Data_DcywDao.xml index 791a028..50eaaf1 100644 --- a/src/main/resources/mappers/Data_DcywDao.xml +++ b/src/main/resources/mappers/Data_DcywDao.xml @@ -30,4 +30,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dcyw where acquisitionTime >= #{date} + + delete + from data_dcyw + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_Dlq_JbfdDao.xml b/src/main/resources/mappers/Data_Dlq_JbfdDao.xml index 0a6f0b2..6fc3cfb 100644 --- a/src/main/resources/mappers/Data_Dlq_JbfdDao.xml +++ b/src/main/resources/mappers/Data_Dlq_JbfdDao.xml @@ -37,4 +37,10 @@ + + + delete + from data_dlq_jbfd + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_Dr_JyjcDao.xml b/src/main/resources/mappers/Data_Dr_JyjcDao.xml index d0b590e..ca82df4 100644 --- a/src/main/resources/mappers/Data_Dr_JyjcDao.xml +++ b/src/main/resources/mappers/Data_Dr_JyjcDao.xml @@ -36,5 +36,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_dr_jyjc where acquisitionTime >= #{date} - + + delete + from data_dr_jyjc + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_FhdlbxDao.xml b/src/main/resources/mappers/Data_FhdlbxDao.xml index 4aad4c3..71db873 100644 --- a/src/main/resources/mappers/Data_FhdlbxDao.xml +++ b/src/main/resources/mappers/Data_FhdlbxDao.xml @@ -32,4 +32,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_fhdlbx where acquisitionTime >= #{date} + + delete + from data_fhdlbx + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_Jsyhw_JyjcDao.xml b/src/main/resources/mappers/Data_Jsyhw_JyjcDao.xml index a3e84e4..1aa0a65 100644 --- a/src/main/resources/mappers/Data_Jsyhw_JyjcDao.xml +++ b/src/main/resources/mappers/Data_Jsyhw_JyjcDao.xml @@ -35,5 +35,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_jsyhw_jyjc where acquisitionTime >= #{date} - + + delete + from data_jsyhw_jyjc + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_MicroclimateDao.xml b/src/main/resources/mappers/Data_MicroclimateDao.xml index a9cdd2d..9b4ad61 100644 --- a/src/main/resources/mappers/Data_MicroclimateDao.xml +++ b/src/main/resources/mappers/Data_MicroclimateDao.xml @@ -38,4 +38,10 @@ + + + delete + from data_microclimate + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_SF6_QtsfDao.xml b/src/main/resources/mappers/Data_SF6_QtsfDao.xml index eb7d6fd..3474f13 100644 --- a/src/main/resources/mappers/Data_SF6_QtsfDao.xml +++ b/src/main/resources/mappers/Data_SF6_QtsfDao.xml @@ -31,4 +31,10 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtsf where acquisitionTime >= #{date} + + + delete + from data_sf6_qtsf + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_SF6_QtylDao.xml b/src/main/resources/mappers/Data_SF6_QtylDao.xml index 31880e3..9e8a2c9 100644 --- a/src/main/resources/mappers/Data_SF6_QtylDao.xml +++ b/src/main/resources/mappers/Data_SF6_QtylDao.xml @@ -48,4 +48,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_sf6_qtyl where acquisitionTime >= #{date} + + delete + from data_sf6_qtyl + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_TxDao.xml b/src/main/resources/mappers/Data_TxDao.xml index b233923..0038ef5 100644 --- a/src/main/resources/mappers/Data_TxDao.xml +++ b/src/main/resources/mappers/Data_TxDao.xml @@ -30,4 +30,11 @@ from data_tx where id ]]> #{maxid} limit 10000 + + + delete + from data_tx + where acquisitionTime #{time} + + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_WsDao.xml b/src/main/resources/mappers/Data_WsDao.xml index 336dcfe..9876352 100644 --- a/src/main/resources/mappers/Data_WsDao.xml +++ b/src/main/resources/mappers/Data_WsDao.xml @@ -30,4 +30,9 @@ SELECT MAX( id ) AS maxid,MIN( id ) AS minid FROM data_ws where acquisitionTime >= #{date} + + delete + from data_ws + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Data_YspDao.xml b/src/main/resources/mappers/Data_YspDao.xml index a1b881c..72dd19f 100644 --- a/src/main/resources/mappers/Data_YspDao.xml +++ b/src/main/resources/mappers/Data_YspDao.xml @@ -44,4 +44,9 @@ data_ysp t1 where t1.id ]]> #{maxid} limit 10000 + + delete + from data_ysp + where acquisitionTime #{time} + \ No newline at end of file diff --git a/src/main/resources/mappers/Upload_StaticsDao.xml b/src/main/resources/mappers/Upload_StaticsDao.xml new file mode 100644 index 0000000..44b2a64 --- /dev/null +++ b/src/main/resources/mappers/Upload_StaticsDao.xml @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + check_type, id, first_value, upload_time, update_time + + + + + delete from upload_statics + where check_type = #{checkType,jdbcType=VARCHAR} + + + delete from upload_statics + + + + + + insert into upload_statics (check_type, id, first_value, + upload_time, update_time) + values (#{checkType,jdbcType=VARCHAR}, #{id,jdbcType=INTEGER}, #{firstValue,jdbcType=BIGINT}, + #{uploadTime,jdbcType=DATE}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into upload_statics + + + check_type, + + + id, + + + first_value, + + + upload_time, + + + update_time, + + + + + #{checkType,jdbcType=VARCHAR}, + + + #{id,jdbcType=INTEGER}, + + + #{firstValue,jdbcType=BIGINT}, + + + #{uploadTime,jdbcType=DATE}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + + update upload_statics + + + check_type = #{record.checkType,jdbcType=VARCHAR}, + + + id = #{record.id,jdbcType=INTEGER}, + + + first_value = #{record.firstValue,jdbcType=BIGINT}, + + + upload_time = #{record.uploadTime,jdbcType=DATE}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + + + + + + update upload_statics + set check_type = #{record.checkType,jdbcType=VARCHAR}, + id = #{record.id,jdbcType=INTEGER}, + first_value = #{record.firstValue,jdbcType=BIGINT}, + upload_time = #{record.uploadTime,jdbcType=DATE}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + update upload_statics + + + id = #{id,jdbcType=INTEGER}, + + + first_value = #{firstValue,jdbcType=BIGINT}, + + + upload_time = #{uploadTime,jdbcType=DATE}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where check_type = #{checkType,jdbcType=VARCHAR} + + + update upload_statics + set id = #{id,jdbcType=INTEGER}, + first_value = #{firstValue,jdbcType=BIGINT}, + upload_time = #{uploadTime,jdbcType=DATE}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where check_type = #{checkType,jdbcType=VARCHAR} + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + check_type, value, update_time + + + + + delete from upload_statics + where check_type = #{checkType,jdbcType=VARCHAR} + + + delete from upload_statics + + + + + + insert into upload_statics (check_type, value, update_time + ) + values (#{checkType,jdbcType=VARCHAR}, #{value,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into upload_statics + + + check_type, + + + value, + + + update_time, + + + + + #{checkType,jdbcType=VARCHAR}, + + + #{value,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + + update upload_statics + + + check_type = #{record.checkType,jdbcType=VARCHAR}, + + + value = #{record.value,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + + + + + + update upload_statics + set check_type = #{record.checkType,jdbcType=VARCHAR}, + value = #{record.value,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP} + + + + + + update upload_statics + + + value = #{value,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where check_type = #{checkType,jdbcType=VARCHAR} + + + update upload_statics + set value = #{value,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where check_type = #{checkType,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/mappers/data_FhzxqDao.xml b/src/main/resources/mappers/data_FhzxqDao.xml index b9a5252..ca7d251 100644 --- a/src/main/resources/mappers/data_FhzxqDao.xml +++ b/src/main/resources/mappers/data_FhzxqDao.xml @@ -30,4 +30,10 @@ + + + delete + from data_fhzxq + where acquisitionTime #{time} + \ No newline at end of file