Browse Source

导出

master
sunyuchao 3 years ago
parent
commit
30ca772059
  1. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreFormDTO.java
  2. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreListFormDTO.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

9
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreFormDTO.java

@ -1,9 +1,12 @@
package com.epmet.dto.indexcollect.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@ -20,7 +23,7 @@ public class HistoryScoreFormDTO implements Serializable {
/**
* id
*/
@NotBlank(message = "标题不能为空", groups = Edit.class)
@NotBlank(message = "id不能为空", groups = Edit.class)
private String id;
/**
@ -32,11 +35,15 @@ public class HistoryScoreFormDTO implements Serializable {
/**
* 起始时间
*/
@NotNull(message = "起始时间不能为空", groups = {Add.class})
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/**
* 截止时间
*/
@NotNull(message = "截止时间不能为空", groups = {Add.class})
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/**

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/HistoryScoreListFormDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.indexcollect.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@ -18,11 +19,13 @@ public class HistoryScoreListFormDTO implements Serializable {
/**
* 起始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/**
* 截止时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/**
@ -38,7 +41,7 @@ public class HistoryScoreListFormDTO implements Serializable {
/**
* 是否分页true分 false不分
*/
private Boolean isPage;
private Boolean isPage = true;
private String customerId;
private String userId;

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -77,6 +78,7 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
public void save(HistoryScoreFormDTO formDTO) {
//1.主表新增数据
ScreenPyHistoryScoreEntity entity = ConvertUtils.sourceToTarget(formDTO, ScreenPyHistoryScoreEntity.class);
entity.setReleaseTime(new Date());
screenPyHistoryScoreDao.insert(entity);
//2.明细表新增数据
ScreenPyWeightConfigurationDTO wcDTO = screenPyWeightConfigurationDao.selectOneDTO();

Loading…
Cancel
Save