识别报表三层
parent
ac5c3b86c0
commit
c403a9622f
|
|
@ -0,0 +1,170 @@
|
||||||
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 雷达原始数据对象 sys_primary_radar_data
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class SysDiscern extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 用户ID */
|
||||||
|
@Excel(name = "数据序号", cellType = ColumnType.NUMERIC)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 标签id号
|
||||||
|
*/
|
||||||
|
@Excel(name = "标签id号")
|
||||||
|
private String tagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰值4·
|
||||||
|
*/
|
||||||
|
@Excel(name = "峰值4")
|
||||||
|
private Integer value4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天线号
|
||||||
|
*/
|
||||||
|
@Excel(name = "天线号")
|
||||||
|
private Integer number;
|
||||||
|
/**
|
||||||
|
* 雷达位置
|
||||||
|
*/
|
||||||
|
@Excel(name = "雷达位置")
|
||||||
|
private String radarLocation;
|
||||||
|
/**、
|
||||||
|
* 车架号
|
||||||
|
*/
|
||||||
|
@Excel(name = "车架号")
|
||||||
|
private String ladleNumber;
|
||||||
|
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 识别类型
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public SysDiscern() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTagId() {
|
||||||
|
return tagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagId(String tagId) {
|
||||||
|
this.tagId = tagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValue4() {
|
||||||
|
return value4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue4(Integer value4) {
|
||||||
|
this.value4 = value4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumber() {
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumber(Integer number) {
|
||||||
|
this.number = number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRadarLocation() {
|
||||||
|
return radarLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadarLocation(String radarLocation) {
|
||||||
|
this.radarLocation = radarLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLadleNumber() {
|
||||||
|
return ladleNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLadleNumber(String ladleNumber) {
|
||||||
|
this.ladleNumber = ladleNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(Integer count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("tagId",getTagId())
|
||||||
|
.append("value4",getValue4())
|
||||||
|
.append("number",getNumber())
|
||||||
|
.append("type",getType())
|
||||||
|
.append("count",getCount())
|
||||||
|
.append("radarLocation",getRadarLocation())
|
||||||
|
.append("ladleNumber",getLadleNumber())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,4 +11,8 @@ public class SocketModel {
|
||||||
private String radarLocation;
|
private String radarLocation;
|
||||||
|
|
||||||
private Socket socket;
|
private Socket socket;
|
||||||
|
|
||||||
|
private int readCount;
|
||||||
|
|
||||||
|
private long lastReceiveTimestamp;
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.entity.RadarTableVO;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户表 数据层
|
* 原始数据表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.PrimaryRadarData;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDiscern;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户表 数据层
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public interface SysDiscernMapper
|
||||||
|
{
|
||||||
|
|
||||||
|
List<SysDiscern> selectDiscernList(SysDiscern sysDiscern);
|
||||||
|
|
||||||
|
int insertDiscern(SysDiscern sysDiscern);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.PrimaryRadarData;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDiscern;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*高温标识器 业务层
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public interface ISysDiscernService
|
||||||
|
{
|
||||||
|
List<SysDiscern> selectDiscernList(SysDiscern sysDiscern);
|
||||||
|
|
||||||
|
int insertDiscern(SysDiscern sysDiscern);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.PrimaryRadarData;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDiscern;
|
||||||
|
import com.ruoyi.system.mapper.PrimaryRadarDataMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysDiscernMapper;
|
||||||
|
import com.ruoyi.system.service.ISysDiscernService;
|
||||||
|
import com.ruoyi.system.service.PrimaryRadarDataService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.validation.Validator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 雷达 业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysDiscernServiceImpl implements ISysDiscernService
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(SysDiscernServiceImpl.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysDiscernMapper sysDiscernMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected Validator validator;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysDiscern> selectDiscernList(SysDiscern sysDiscern) {
|
||||||
|
return sysDiscernMapper.selectDiscernList(sysDiscern);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertDiscern(SysDiscern sysDiscern) {
|
||||||
|
return sysDiscernMapper.insertDiscern(sysDiscern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.SysDiscernMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.common.core.domain.entity.SysDiscern" id="SysDiscernResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="tagId" column="tag_id" />
|
||||||
|
<result property="ladleNumber" column="ladle_number" />
|
||||||
|
<result property="radarLocation" column="radar_location" />
|
||||||
|
<result property="count" column="count" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="value4" column="value4" />
|
||||||
|
<result property="number" column="number" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectPrimaryRadarDataList" resultMap="SysDiscernResult">
|
||||||
|
select p.id,p.tag_id,p.value1,p.value2,p.value3,p.value4,p.value5,p.base_line,p.query_fre,p.number,p.radar_location,p.ladle_number,p.radar_ip,p.create_by,p.create_time,p.update_by,p.update_time,p.remark,p.del_flag from sys_primary_radar_data p
|
||||||
|
where p.del_flag = '0'
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">
|
||||||
|
AND p.radar_location like concat('%',#{radarLocation}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="ladleNumber != null and ladleNumber != ''">
|
||||||
|
AND p.ladle_number like concat('%',#{ladleNumber}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="tagId != null and tagId != ''">
|
||||||
|
AND p.tag_id like concat('%',#{tagId},'%')
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null and updateTime != null">
|
||||||
|
AND DATE_FORMAT(p.update_time,'%Y-%m-%d') between DATE_FORMAT(#{createTime},'%Y-%m-%d') and DATE_FORMAT(#{updateTime},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertPrimaryRadarData">
|
||||||
|
insert into sys_primary_radar_data(
|
||||||
|
<if test="id != null and id != 0">id,</if>
|
||||||
|
<if test="tagId != null and tagId != ''">tag_id,</if>
|
||||||
|
<if test="value1 != null and value1 != ''">value1,</if>
|
||||||
|
<if test="value2 != null and value2 != ''">value2,</if>
|
||||||
|
<if test="value3 != null and value3 != ''">value3,</if>
|
||||||
|
<if test="value4 != null and value4 != ''">value4,</if>
|
||||||
|
<if test="value5 != null and value5 != ''">value5,</if>
|
||||||
|
<if test="baseLine != null and baseLine != ''">base_line,</if>
|
||||||
|
<if test="queryFre != null ">query_fre,</if>
|
||||||
|
<if test="number != null and number != ''">number,</if>
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">radar_location,</if>
|
||||||
|
<if test="ladleNumber != null and ladleNumber != ''">ladle_number,</if>
|
||||||
|
<if test="radarIp != null and radarIp != ''">radar_ip,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
)values(
|
||||||
|
<if test="id != null and id != 0">#{id},</if>
|
||||||
|
<if test="tagId != null and tagId != ''">#{tagId},</if>
|
||||||
|
<if test="value1 != null and value1 != ''">#{value1},</if>
|
||||||
|
<if test="value2 != null and value2 != ''">#{value2},</if>
|
||||||
|
<if test="value3 != null and value3 != ''">#{value3},</if>
|
||||||
|
<if test="value4 != null and value4 != ''">#{value4},</if>
|
||||||
|
<if test="value5 != null and value5 != ''">#{value5},</if>
|
||||||
|
<if test="baseLine != null and baseLine != ''">#{baseLine},</if>
|
||||||
|
<if test="queryFre != null">#{queryFre},</if>
|
||||||
|
<if test="number != null and number != ''">#{number},</if>
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">#{radarLocation},</if>
|
||||||
|
<if test="ladleNumber != null and ladleNumber != ''">#{ladleNumber},</if>
|
||||||
|
<if test="radarIp != null and radarIp != ''">#{radarIp},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
sysdate(),
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectDiscernList" resultMap="SysDiscernResult">
|
||||||
|
|
||||||
|
SELECT d.id,d.tag_id,d.ladle_number,d.radar_location,d.count,d.type,d.value4,d.number,d.create_time,d.update_time
|
||||||
|
FROM sys_discern d
|
||||||
|
where
|
||||||
|
<if test="tagId != null and tagId != ''">
|
||||||
|
AND tag_id like concat('%',#{tagId}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">
|
||||||
|
AND radar_location like concat('%',#{radarLocation}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
AND ladle_number = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null and updateTime != null">
|
||||||
|
AND DATE_FORMAT(update_time,'%Y-%m-%d') between DATE_FORMAT(#{createTime},'%Y-%m-%d') and DATE_FORMAT(#{updateTime},'%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertDiscern">
|
||||||
|
insert into sys_discern(
|
||||||
|
<if test="id != null and id != 0">id,</if>
|
||||||
|
<if test="tagId != null and tagId != ''">tag_id,</if>
|
||||||
|
<if test="ladleNumber != null and ladleNumber != ''">ladle_number,</if>
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">radar_location,</if>
|
||||||
|
<if test="count != null and count != ''">count,</if>
|
||||||
|
<if test="type != null and type != ''">type,</if>
|
||||||
|
<if test="value4 != null and value4 != ''">value4,</if>
|
||||||
|
<if test="number != null and number != ''">number,</if>
|
||||||
|
<if test="createTime != null and createTime != ''">create_time,</if>
|
||||||
|
<if test="updateTime != null and updateTime != ''">update_time,</if>
|
||||||
|
)values(
|
||||||
|
<if test="id != null and id != 0">#{id},</if>
|
||||||
|
<if test="tagId != null and tagId != ''">#{tagId},</if>
|
||||||
|
<if test="ladleNumber != null and ladleNumber != ''">#{ladleNumber},</if>
|
||||||
|
<if test="radarLocation != null and radarLocation != ''">#{radarLocation},</if>
|
||||||
|
<if test="count != null and count != ''">#{count},</if>
|
||||||
|
<if test="type != null and type != ''">#{type},</if>
|
||||||
|
<if test="value4 != null and value4 != ''">#{value4},</if>
|
||||||
|
<if test="number != null and number != ''">#{number},</if>
|
||||||
|
<if test="createTime != null" >#{createTime},</if>
|
||||||
|
<if test="updateTime != null" >#{updateTime},</if>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue