diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalExtController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalExtController.java index ad7845f..d5aedd1 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalExtController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalExtController.java @@ -1,8 +1,10 @@ package com.shxy.xymanager_admin.controller; +import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.entity.*; +import com.shxy.xymanager_common.exception.ApiException; import com.shxy.xymanager_common.model.PhotoDayModel; import com.shxy.xymanager_common.model.TerminalGpsModel; import com.shxy.xymanager_common.page.TableDataInfo; @@ -57,6 +59,18 @@ public class TerminalExtController extends BaseController { return ResponseReult.success("OK"); } + @GetMapping("listReport") + @ApiOperation("查询运维数据历史") + public ResponseReult> listReport(Integer termId, Integer pageNum, Integer pageSize) { + if (termId == null) { + throw new ApiException("termId不能为空"); + } + pageNum = this.initPageNum(pageNum); + pageSize = this.initPageSize(pageSize); + PageInfo result = terminalExtService.listReport(termId, pageNum, pageSize); + return ResponseReult.success(result); + } + @GetMapping("listForMaintain") @ApiOperation("运维查询装置") public ResponseReult> listForMaintain(TerminalSelectVo vo) { diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReports.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReports.java new file mode 100644 index 0000000..2f6bb9f --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReports.java @@ -0,0 +1,168 @@ +package com.shxy.xymanager_common.entity; + +public class MntnRawReports { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_raw_reports.id + * + * @mbg.generated + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_raw_reports.term_id + * + * @mbg.generated + */ + private Integer termId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_raw_reports.content + * + * @mbg.generated + */ + private String content; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_raw_reports.ip + * + * @mbg.generated + */ + private String ip; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column mntn_raw_reports.create_time + * + * @mbg.generated + */ + private Long createTime; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_raw_reports.id + * + * @return the value of mntn_raw_reports.id + * + * @mbg.generated + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_raw_reports.id + * + * @param id the value for mntn_raw_reports.id + * + * @mbg.generated + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_raw_reports.term_id + * + * @return the value of mntn_raw_reports.term_id + * + * @mbg.generated + */ + public Integer getTermId() { + return termId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_raw_reports.term_id + * + * @param termId the value for mntn_raw_reports.term_id + * + * @mbg.generated + */ + public void setTermId(Integer termId) { + this.termId = termId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_raw_reports.content + * + * @return the value of mntn_raw_reports.content + * + * @mbg.generated + */ + public String getContent() { + return content; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_raw_reports.content + * + * @param content the value for mntn_raw_reports.content + * + * @mbg.generated + */ + public void setContent(String content) { + this.content = content; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_raw_reports.ip + * + * @return the value of mntn_raw_reports.ip + * + * @mbg.generated + */ + public String getIp() { + return ip; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_raw_reports.ip + * + * @param ip the value for mntn_raw_reports.ip + * + * @mbg.generated + */ + public void setIp(String ip) { + this.ip = ip; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column mntn_raw_reports.create_time + * + * @return the value of mntn_raw_reports.create_time + * + * @mbg.generated + */ + public Long getCreateTime() { + return createTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column mntn_raw_reports.create_time + * + * @param createTime the value for mntn_raw_reports.create_time + * + * @mbg.generated + */ + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReportsExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReportsExample.java new file mode 100644 index 0000000..25e81d5 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MntnRawReportsExample.java @@ -0,0 +1,621 @@ +package com.shxy.xymanager_common.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MntnRawReportsExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public MntnRawReportsExample() { + oredCriteria = new ArrayList<>(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + 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)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTermIdIsNull() { + addCriterion("term_id is null"); + return (Criteria) this; + } + + public Criteria andTermIdIsNotNull() { + addCriterion("term_id is not null"); + return (Criteria) this; + } + + public Criteria andTermIdEqualTo(Integer value) { + addCriterion("term_id =", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotEqualTo(Integer value) { + addCriterion("term_id <>", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThan(Integer value) { + addCriterion("term_id >", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThanOrEqualTo(Integer value) { + addCriterion("term_id >=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThan(Integer value) { + addCriterion("term_id <", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThanOrEqualTo(Integer value) { + addCriterion("term_id <=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdIn(List values) { + addCriterion("term_id in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotIn(List values) { + addCriterion("term_id not in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdBetween(Integer value1, Integer value2) { + addCriterion("term_id between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotBetween(Integer value1, Integer value2) { + addCriterion("term_id not between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andIpIsNull() { + addCriterion("ip is null"); + return (Criteria) this; + } + + public Criteria andIpIsNotNull() { + addCriterion("ip is not null"); + return (Criteria) this; + } + + public Criteria andIpEqualTo(String value) { + addCriterion("ip =", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpNotEqualTo(String value) { + addCriterion("ip <>", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpGreaterThan(String value) { + addCriterion("ip >", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpGreaterThanOrEqualTo(String value) { + addCriterion("ip >=", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpLessThan(String value) { + addCriterion("ip <", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpLessThanOrEqualTo(String value) { + addCriterion("ip <=", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpLike(String value) { + addCriterion("ip like", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpNotLike(String value) { + addCriterion("ip not like", value, "ip"); + return (Criteria) this; + } + + public Criteria andIpIn(List values) { + addCriterion("ip in", values, "ip"); + return (Criteria) this; + } + + public Criteria andIpNotIn(List values) { + addCriterion("ip not in", values, "ip"); + return (Criteria) this; + } + + public Criteria andIpBetween(String value1, String value2) { + addCriterion("ip between", value1, value2, "ip"); + return (Criteria) this; + } + + public Criteria andIpNotBetween(String value1, String value2) { + addCriterion("ip not between", value1, value2, "ip"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table mntn_raw_reports + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + 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/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MntnRawReportsMapper.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MntnRawReportsMapper.java new file mode 100644 index 0000000..cc4ca97 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MntnRawReportsMapper.java @@ -0,0 +1,97 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.entity.MntnRawReports; +import com.shxy.xymanager_common.entity.MntnRawReportsExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface MntnRawReportsMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + long countByExample(MntnRawReportsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int deleteByExample(MntnRawReportsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int insert(MntnRawReports row); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int insertSelective(MntnRawReports row); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + List selectByExample(MntnRawReportsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + MntnRawReports selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("row") MntnRawReports row, @Param("example") MntnRawReportsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int updateByExample(@Param("row") MntnRawReports row, @Param("example") MntnRawReportsExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(MntnRawReports row); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table mntn_raw_reports + * + * @mbg.generated + */ + int updateByPrimaryKey(MntnRawReports row); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/MntnRawReportsMapper.xml b/xymanager_dao/src/main/resources/mappers/MntnRawReportsMapper.xml new file mode 100644 index 0000000..dc50e9c --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/MntnRawReportsMapper.xml @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + + id, term_id, content, ip, create_time + + + + + + delete from mntn_raw_reports + where id = #{id,jdbcType=BIGINT} + + + + delete from mntn_raw_reports + + + + + + + + SELECT LAST_INSERT_ID() + + insert into mntn_raw_reports (term_id, content, ip, + create_time) + values (#{termId,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}) + + + + + SELECT LAST_INSERT_ID() + + insert into mntn_raw_reports + + + term_id, + + + content, + + + ip, + + + create_time, + + + + + #{termId,jdbcType=INTEGER}, + + + #{content,jdbcType=VARCHAR}, + + + #{ip,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + + + + + update mntn_raw_reports + + + id = #{row.id,jdbcType=BIGINT}, + + + term_id = #{row.termId,jdbcType=INTEGER}, + + + content = #{row.content,jdbcType=VARCHAR}, + + + ip = #{row.ip,jdbcType=VARCHAR}, + + + create_time = #{row.createTime,jdbcType=BIGINT}, + + + + + + + + + update mntn_raw_reports + set id = #{row.id,jdbcType=BIGINT}, + term_id = #{row.termId,jdbcType=INTEGER}, + content = #{row.content,jdbcType=VARCHAR}, + ip = #{row.ip,jdbcType=VARCHAR}, + create_time = #{row.createTime,jdbcType=BIGINT} + + + + + + + update mntn_raw_reports + + + term_id = #{termId,jdbcType=INTEGER}, + + + content = #{content,jdbcType=VARCHAR}, + + + ip = #{ip,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update mntn_raw_reports + set term_id = #{termId,jdbcType=INTEGER}, + content = #{content,jdbcType=VARCHAR}, + ip = #{ip,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalExtServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalExtServiceImpl.java index f7e6736..7d3d62d 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalExtServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalExtServiceImpl.java @@ -1,11 +1,14 @@ package com.shxy.xymanager_service.impl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.bean.PermissionDetail; import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_common.enums.CommonStatus; import com.shxy.xymanager_common.exception.ApiException; import com.shxy.xymanager_common.util.xinyin.TerminalUtils; import com.shxy.xymanager_common.vo.TerminalSelectVo; +import com.shxy.xymanager_dao.dao.MntnRawReportsMapper; import com.shxy.xymanager_dao.dao.MntnStatusMapper; import com.shxy.xymanager_dao.dao.TerminalsDao; import com.shxy.xymanager_dao.dao.View_Dy_Line_Tower_TerminalsDao; @@ -38,6 +41,8 @@ public class TerminalExtServiceImpl implements TerminalExtService { View_Dy_Line_Tower_TerminalsDao viewDyLineTowerTerminalsDao; @Resource MntnStatusMapper statusMapper; + @Resource + MntnRawReportsMapper rawReportsMapper; @Override @@ -168,4 +173,15 @@ public class TerminalExtServiceImpl implements TerminalExtService { item.setUpdateTime(new Date()); statusMapper.updateByPrimaryKey(item); } + + @Override + public PageInfo listReport(Integer termId, Integer pageNum, Integer pageSize) { + MntnRawReportsExample example = new MntnRawReportsExample(); + MntnRawReportsExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termId); + + PageHelper.startPage(pageNum, pageSize); + List list = rawReportsMapper.selectByExample(example); + return new PageInfo<>(list); + } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalExtService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalExtService.java index 2220e97..c28cea0 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalExtService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalExtService.java @@ -1,5 +1,6 @@ package com.shxy.xymanager_service.service; +import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_common.vo.*; @@ -13,4 +14,6 @@ public interface TerminalExtService { Terminals getByCmdid(String cmdid); void updateComment(MntnStatus model); + + PageInfo listReport(Integer termId, Integer pageNum, Integer pageSize); }