三方指标查询POJO
parent
976369fa10
commit
73191c1961
@ -0,0 +1,53 @@
|
||||
package cn.estsh.i3plus.pojo.wms.bean;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.InheritanceType;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @Description : 指标编号查询记录
|
||||
* @Reference :
|
||||
* @Author : siliter.yuan
|
||||
* @CreateDate : 2020-05-13 13:54
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="WMS_HEALTH_QUERY_RECORD", indexes = {
|
||||
@Index(columnList = "INDICATOR_CODE"),
|
||||
@Index(columnList = "QUERY_SOURCE")
|
||||
})
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Inheritance(strategy = InheritanceType.JOINED)
|
||||
@Api(value="仓库健康度指标编号查询记录",description = "仓库健康度指标编号查询记录")
|
||||
public class WmsHealthQueryRecord extends BaseBean {
|
||||
|
||||
private static final long serialVersionUID = 7332606119041273554L;
|
||||
|
||||
@Column(name = "INDICATOR_CODE")
|
||||
@ApiParam(value = "指标代码")
|
||||
private String indicatorCode;
|
||||
|
||||
@Column(name = "INDICATOR_VALUE")
|
||||
@ApiParam(value = "指标结果")
|
||||
private String indicatorValue;
|
||||
|
||||
@Column(name = "QUERY_TIME",length = 13)
|
||||
@ApiParam(value = "查询时间")
|
||||
private Long queryTime;
|
||||
|
||||
// @Column(name = "QUERY_TIME",length = 13)
|
||||
// @ApiParam(value = "查询来源【第三方标签】")
|
||||
// private String querySource;
|
||||
//
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cn.estsh.i3plus.pojo.wms.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WmsHealthQueryResultDTO implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 3662345968978175458L;
|
||||
|
||||
private String code;
|
||||
|
||||
private String value;
|
||||
|
||||
private Long time;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.estsh.i3plus.pojo.wms.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.wms.bean.WmsHealthQueryRecord;
|
||||
|
||||
@Repository
|
||||
public interface WmsHealthQueryRecordRepository extends BaseRepository<WmsHealthQueryRecord, Long> {
|
||||
|
||||
@Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time >= :queryTime")
|
||||
List<WmsHealthQueryRecord> queryByCodeAndTime(String indicatorCode, Long queryTime);
|
||||
|
||||
@Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time between :startTime and :endTime")
|
||||
List<WmsHealthQueryRecord> queryByCodeBetweenTime(String indicatorCode, Long startTime, Long endTime);
|
||||
|
||||
}
|
Loading…
Reference in New Issue