diff --git a/.gitignore b/.gitignore index 6614dc3..6b4d809 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,9 @@ target *.log *.properties .DS_Store -pom.xml \ No newline at end of file +target/ +.settings +.classpath +.project +.vscode +pom.xml diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsHealthQueryRecord.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsHealthQueryRecord.java new file mode 100644 index 0000000..ec6c23d --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsHealthQueryRecord.java @@ -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; +// + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dto/WmsHealthQueryResultDTO.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dto/WmsHealthQueryResultDTO.java new file mode 100644 index 0000000..8539b48 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dto/WmsHealthQueryResultDTO.java @@ -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; + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsHealthQueryRecordRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsHealthQueryRecordRepository.java new file mode 100644 index 0000000..660b2ed --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsHealthQueryRecordRepository.java @@ -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 { + + @Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time >= :queryTime") + List queryByCodeAndTime(String indicatorCode, Long queryTime); + + @Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time between :startTime and :endTime") + List queryByCodeBetweenTime(String indicatorCode, Long startTime, Long endTime); + +}