4 changed files with 194 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||||
|
package io.sc.engine.mv.jpa.repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import io.sc.engine.mv.jpa.entity.GeneralSampleHistory; |
||||
|
import io.sc.engine.mv.jpa.entity.id.GeneralSampleHistoryId; |
||||
|
import io.sc.platform.orm.repository.DaoRepository; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
import org.springframework.data.domain.Pageable; |
||||
|
import org.springframework.data.jpa.repository.Query; |
||||
|
|
||||
|
public interface GeneralSampleHistoryRepository extends DaoRepository<GeneralSampleHistory, GeneralSampleHistoryId> { |
||||
|
/** |
||||
|
* 分页查询某个模型某个验证日期的所有历史模型验证合格样本 |
||||
|
* @param modelId 模型ID |
||||
|
* @param validateDate 验证日期 |
||||
|
* @param pageable 分页信息 |
||||
|
* @return 历史模型验证合格样本分页对象 |
||||
|
*/ |
||||
|
public Page<GeneralSampleHistory> findAllByModelIdAndValidateDate(String modelId,String validateDate,Pageable pageable); |
||||
|
|
||||
|
/** |
||||
|
* 获取模型验证合格样本中包含的所有不重复的验证日期 |
||||
|
* @return 模型验证合格样本中包含的所有不重复的验证日期 |
||||
|
*/ |
||||
|
@Query("select distinct his.validateDate from GeneralSampleHistory his order by his.validateDate desc") |
||||
|
public List<String> findDistinctValidateDates(); |
||||
|
|
||||
|
/** |
||||
|
* 获取模型验证合格样本中包含的所有不重复的模型标识和模型名称 |
||||
|
* @return 模型验证合格样本中包含的所有不重复的模型标识和模型名称 |
||||
|
*/ |
||||
|
@Query("select e.modelId,max(e.modelName) from GeneralSampleHistory e group by e.modelId") |
||||
|
public List<Object[]> findDistinctModelIdAndNames(); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package io.sc.engine.mv.service.result; |
||||
|
|
||||
|
|
||||
|
import io.sc.engine.mv.jpa.entity.GeneralSampleHistory; |
||||
|
import io.sc.engine.mv.jpa.entity.id.GeneralSampleHistoryId; |
||||
|
import io.sc.engine.mv.jpa.repository.GeneralSampleHistoryRepository; |
||||
|
import io.sc.platform.orm.service.DaoService; |
||||
|
|
||||
|
public interface GeneralSampleHistoryService extends DaoService<GeneralSampleHistory, GeneralSampleHistoryId, GeneralSampleHistoryRepository> { |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package io.sc.engine.mv.service.result.impl; |
||||
|
|
||||
|
import io.sc.engine.mv.jpa.entity.GeneralSampleHistory; |
||||
|
import io.sc.engine.mv.jpa.entity.id.GeneralSampleHistoryId; |
||||
|
import io.sc.engine.mv.jpa.repository.GeneralSampleHistoryRepository; |
||||
|
import io.sc.engine.mv.service.result.GeneralSampleHistoryService; |
||||
|
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class GeneralSampleHistoryServiceImpl extends DaoServiceImpl<GeneralSampleHistory, GeneralSampleHistoryId, GeneralSampleHistoryRepository> implements GeneralSampleHistoryService { |
||||
|
|
||||
|
} |
@ -0,0 +1,135 @@ |
|||||
|
package io.sc.engine.mv.vo; |
||||
|
|
||||
|
import io.sc.platform.orm.api.vo.BaseVo; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class GeneralSampleHistoryVo extends BaseVo { |
||||
|
private String validateDate; |
||||
|
private String customId; |
||||
|
private String customName; |
||||
|
private String modelId; |
||||
|
private String modelName; |
||||
|
private BigDecimal pd; |
||||
|
private BigDecimal score; |
||||
|
private BigDecimal scoreQuantitative; |
||||
|
private BigDecimal scoreQualitative; |
||||
|
private String level; |
||||
|
private Date beginDate; |
||||
|
private Date endDate; |
||||
|
private String status; |
||||
|
private Date defaultConfirmDate; |
||||
|
|
||||
|
public String getValidateDate() { |
||||
|
return validateDate; |
||||
|
} |
||||
|
|
||||
|
public void setValidateDate(String validateDate) { |
||||
|
this.validateDate = validateDate; |
||||
|
} |
||||
|
|
||||
|
public String getCustomId() { |
||||
|
return customId; |
||||
|
} |
||||
|
|
||||
|
public void setCustomId(String customId) { |
||||
|
this.customId = customId; |
||||
|
} |
||||
|
|
||||
|
public String getCustomName() { |
||||
|
return customName; |
||||
|
} |
||||
|
|
||||
|
public void setCustomName(String customName) { |
||||
|
this.customName = customName; |
||||
|
} |
||||
|
|
||||
|
public String getModelId() { |
||||
|
return modelId; |
||||
|
} |
||||
|
|
||||
|
public void setModelId(String modelId) { |
||||
|
this.modelId = modelId; |
||||
|
} |
||||
|
|
||||
|
public String getModelName() { |
||||
|
return modelName; |
||||
|
} |
||||
|
|
||||
|
public void setModelName(String modelName) { |
||||
|
this.modelName = modelName; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getPd() { |
||||
|
return pd; |
||||
|
} |
||||
|
|
||||
|
public void setPd(BigDecimal pd) { |
||||
|
this.pd = pd; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getScore() { |
||||
|
return score; |
||||
|
} |
||||
|
|
||||
|
public void setScore(BigDecimal score) { |
||||
|
this.score = score; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getScoreQuantitative() { |
||||
|
return scoreQuantitative; |
||||
|
} |
||||
|
|
||||
|
public void setScoreQuantitative(BigDecimal scoreQuantitative) { |
||||
|
this.scoreQuantitative = scoreQuantitative; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getScoreQualitative() { |
||||
|
return scoreQualitative; |
||||
|
} |
||||
|
|
||||
|
public void setScoreQualitative(BigDecimal scoreQualitative) { |
||||
|
this.scoreQualitative = scoreQualitative; |
||||
|
} |
||||
|
|
||||
|
public String getLevel() { |
||||
|
return level; |
||||
|
} |
||||
|
|
||||
|
public void setLevel(String level) { |
||||
|
this.level = level; |
||||
|
} |
||||
|
|
||||
|
public Date getBeginDate() { |
||||
|
return beginDate; |
||||
|
} |
||||
|
|
||||
|
public void setBeginDate(Date beginDate) { |
||||
|
this.beginDate = beginDate; |
||||
|
} |
||||
|
|
||||
|
public Date getEndDate() { |
||||
|
return endDate; |
||||
|
} |
||||
|
|
||||
|
public void setEndDate(Date endDate) { |
||||
|
this.endDate = endDate; |
||||
|
} |
||||
|
|
||||
|
public String getStatus() { |
||||
|
return status; |
||||
|
} |
||||
|
|
||||
|
public void setStatus(String status) { |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public Date getDefaultConfirmDate() { |
||||
|
return defaultConfirmDate; |
||||
|
} |
||||
|
|
||||
|
public void setDefaultConfirmDate(Date defaultConfirmDate) { |
||||
|
this.defaultConfirmDate = defaultConfirmDate; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue