Browse Source

closeCaseTime改为Date

master
yinzuomei 4 years ago
parent
commit
92c29b03af
  1. 3
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java
  2. 27
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java

3
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java

@ -104,7 +104,8 @@ public class ScreenProjectDataInfoFormDTO implements Serializable {
/**
* 结案日期
*/
private String closeCaseTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date closeCaseTime;
/**
* 所有上级ID用英文逗号分开

27
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java

@ -44,7 +44,6 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
@ -136,22 +135,18 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl<ScreenProjectD
//todo 动态获取超时时间
//如果结案 结案时间立项时间;
if ("closed_case".equals(projectStatusCode)) {
try {
Date createTime = item.getProjectCreateTime();
Date closeCaseTime = sdf.parse(item.getCloseCaseTime());
Date createTime = item.getProjectCreateTime();
Date closeCaseTime = item.getCloseCaseTime();
if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) {
//如果结案时间-立项时间小于等于4天 未超期 level3
item.setProjectLevel(3);
} else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) {
//如果结案时间-立项时间大于4天小于5天 即将超期 level2
item.setProjectLevel(2);
} else {
//大于5天 已超期 level1
item.setProjectLevel(1);
}
} catch (ParseException e) {
e.printStackTrace();
if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) {
//如果结案时间-立项时间小于等于4天 未超期 level3
item.setProjectLevel(3);
} else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) {
//如果结案时间-立项时间大于4天小于5天 即将超期 level2
item.setProjectLevel(2);
} else {
//大于5天 已超期 level1
item.setProjectLevel(1);
}
} else if ("pending".equals(projectStatusCode)) {
//如果处理中 当前时间-立项时间;

Loading…
Cancel
Save