平台件-合规认证计划
This commit is contained in:
+18
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.platform.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@@ -75,4 +76,21 @@ public class PlatformTaskPlanningEO implements Serializable {
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private java.lang.String projectId;
|
||||
|
||||
@ApiModelProperty(value = "字段名与项目库保持一致")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String name;
|
||||
|
||||
/**节点时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "字段名与项目库保持一致")
|
||||
@TableField(exist = false)
|
||||
private java.util.Date time;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String status;
|
||||
|
||||
@TableField(exist = false)
|
||||
private boolean isG;
|
||||
|
||||
}
|
||||
|
||||
+24
-1
@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.platform.entity.PlatformTaskPlanningEO;
|
||||
import com.jero.modules.platform.mapper.PlatformTaskPlanningEOMapper;
|
||||
import com.jero.modules.platform.service.IPlatformTaskPlanningEOService;
|
||||
import com.jero.modules.project.enums.PlanStatusEnum;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -102,9 +105,29 @@ public class PlatformTaskPlanningEOServiceImpl extends ServiceImpl<PlatformTaskP
|
||||
*/
|
||||
@Override
|
||||
public List<PlatformTaskPlanningEO> queryList(String projectId) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
|
||||
Date date = null;
|
||||
try {
|
||||
date = sdf.parse(sdf.format(new Date()));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
LambdaQueryWrapper<PlatformTaskPlanningEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PlatformTaskPlanningEO::getProjectId,projectId);
|
||||
wrapper.orderByAsc(PlatformTaskPlanningEO::getNodeTime);
|
||||
return list(wrapper);
|
||||
List<PlatformTaskPlanningEO> taskPlanningEOList = list(wrapper);
|
||||
for (PlatformTaskPlanningEO platformTaskPlanningEO : taskPlanningEOList) {
|
||||
platformTaskPlanningEO.setName(platformTaskPlanningEO.getNodeName());
|
||||
platformTaskPlanningEO.setTime(platformTaskPlanningEO.getNodeTime());
|
||||
platformTaskPlanningEO.setG(false);
|
||||
if(platformTaskPlanningEO.getNodeTime().after(date)){
|
||||
platformTaskPlanningEO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
|
||||
}else if(platformTaskPlanningEO.getNodeTime().before(date)){
|
||||
platformTaskPlanningEO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
|
||||
}else{
|
||||
platformTaskPlanningEO.setStatus(PlanStatusEnum.ON_GOING.getValue());
|
||||
}
|
||||
}
|
||||
return taskPlanningEOList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user