项目状态看板--时间轴
This commit is contained in:
+9
-2
@@ -98,8 +98,15 @@ public class DictAspect {
|
|||||||
if(!"java.util.LinkedHashMap".equals(name) && !"java.util.HashMap".equals(name) && !"java.lang.String".equals(name)){
|
if(!"java.util.LinkedHashMap".equals(name) && !"java.util.HashMap".equals(name) && !"java.lang.String".equals(name)){
|
||||||
List<JSONObject> items = new ArrayList<>();
|
List<JSONObject> items = new ArrayList<>();
|
||||||
for (Object record : (List)((Result) result).getResult()) {
|
for (Object record : (List)((Result) result).getResult()) {
|
||||||
JSONObject item = getJsonObject(record,cut);
|
if("java.util.ArrayList".equals(record.getClass().getName())){
|
||||||
items.add(item);
|
for (Object o : (List) record) {
|
||||||
|
JSONObject item = getJsonObject(o,cut);
|
||||||
|
items.add(item);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
JSONObject item = getJsonObject(record,cut);
|
||||||
|
items.add(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
((Result) result).setResult(items);
|
((Result) result).setResult(items);
|
||||||
}
|
}
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
|
import com.jero.modules.project.service.IProjectStatusBoardService;
|
||||||
|
import com.jero.modules.project.vo.TimeNodeVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/5/13 9:56
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
@Api(tags="项目状态看板")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/ProjectStatusBoardController")
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectStatusBoardController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectStatusBoardService iProjectStatusBoardService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间轴列表
|
||||||
|
*
|
||||||
|
* @param projectLibraryBase
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "时间轴列表")
|
||||||
|
@ApiOperation(value="时间轴列表", notes="时间轴列表")
|
||||||
|
@GetMapping(value = "/timelineList")
|
||||||
|
public Result<?> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) {
|
||||||
|
List<List<TimeNodeVO>> result = iProjectStatusBoardService.timelineList(projectLibraryBase, req);
|
||||||
|
if(result==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/5/13 10:00
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public interface ProjectStatusBoardMapper {
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.project.mapper.ProjectStatusBoardMapper">
|
||||||
|
<resultMap id="ProjectLibraryBaseResultMap" type="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
|
||||||
|
<result column="project_name_id" property="projectNameId" />
|
||||||
|
<result column="target_market" property="targetMarket" />
|
||||||
|
<result column="project_status" property="projectStatus" />
|
||||||
|
<result column="studio_engineer" property="studioEngineer" />
|
||||||
|
<result column="certification_engineer" property="certificationEngineer" />
|
||||||
|
<result column="vehicle_platform" property="vehiclePlatform" />
|
||||||
|
<result column="digital_platform" property="digitalPlatform" />
|
||||||
|
<result column="ipd_info" property="ipdInfo" />
|
||||||
|
<result column="vehicle_development_plan" property="vehicleDevelopmentPlan" />
|
||||||
|
<result column="attestation_plan" property="attestationPlan" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
|
import com.jero.modules.project.vo.TimeNodeVO;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/5/13 9:59
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public interface IProjectStatusBoardService {
|
||||||
|
|
||||||
|
List<List<TimeNodeVO>> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req);
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
|
import com.jero.modules.project.service.IProjectStatusBoardService;
|
||||||
|
import com.jero.modules.project.vo.TimeNodeVO;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/5/13 9:59
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService {
|
||||||
|
@Autowired
|
||||||
|
private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
|
||||||
|
@Autowired
|
||||||
|
private ProjectLibraryBaseServiceImpl projectLibraryBaseService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<List<TimeNodeVO>> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) {
|
||||||
|
|
||||||
|
QueryWrapper<ProjectLibraryBase> queryWrapper = QueryGenerator.initQueryWrapper(projectLibraryBase, req.getParameterMap());
|
||||||
|
|
||||||
|
//项目库信息
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseService.list(queryWrapper);
|
||||||
|
List<List<TimeNodeVO>> result = new ArrayList<>();
|
||||||
|
if(projectLibraryBaseList.size() != 0){
|
||||||
|
//项目库id
|
||||||
|
List<String> projectLibraryBaseIdList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//时间轴数据
|
||||||
|
result = projectTaskPlanningService.queryByProjectId(StringUtils.join(projectLibraryBaseIdList, ","), projectLibraryBase.getCut());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
-12
@@ -10,6 +10,7 @@ import com.jero.modules.project.enums.ProjectTaskPlanningNameEnum;
|
|||||||
import com.jero.modules.project.mapper.ProjectTaskPlanningMapper;
|
import com.jero.modules.project.mapper.ProjectTaskPlanningMapper;
|
||||||
import com.jero.modules.project.service.IProjectTaskPlanningService;
|
import com.jero.modules.project.service.IProjectTaskPlanningService;
|
||||||
import com.jero.modules.project.vo.TimeNodeVO;
|
import com.jero.modules.project.vo.TimeNodeVO;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -93,7 +94,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
public List<List<TimeNodeVO>> queryByProjectId(String projectId,String cut) {
|
public List<List<TimeNodeVO>> queryByProjectId(String projectId,String cut) {
|
||||||
List<ProjectTaskPlanning> projectTaskPlanningList = projectTaskPlanningMapper.getByProjectId(projectId);
|
List<ProjectTaskPlanning> projectTaskPlanningList = projectTaskPlanningMapper.getByProjectId(projectId);
|
||||||
List<List<TimeNodeVO>> result = new ArrayList<>();
|
List<List<TimeNodeVO>> result = new ArrayList<>();
|
||||||
List<TimeNodeVO> timeNodeVOS = new ArrayList<>();
|
|
||||||
TimeNodeVO listConfirmationVO=null;
|
TimeNodeVO listConfirmationVO=null;
|
||||||
|
|
||||||
Date now=new Date();
|
Date now=new Date();
|
||||||
@@ -106,7 +107,8 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
cal1.set(Calendar.MILLISECOND, 0);
|
cal1.set(Calendar.MILLISECOND, 0);
|
||||||
Date trueNow = cal1.getTime();
|
Date trueNow = cal1.getTime();
|
||||||
for (ProjectTaskPlanning projectTaskPlanning : projectTaskPlanningList) {
|
for (ProjectTaskPlanning projectTaskPlanning : projectTaskPlanningList) {
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getListConfirmation().toString())) {
|
List<TimeNodeVO> timeNodeVOS = new ArrayList<>();
|
||||||
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getListConfirmation())) {
|
||||||
listConfirmationVO = new TimeNodeVO();
|
listConfirmationVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -126,7 +128,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
timeNodeVOS.add(listConfirmationVO);
|
timeNodeVOS.add(listConfirmationVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(projectTaskPlanning.getLegalTaskConfirmation().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getLegalTaskConfirmation())) {
|
||||||
TimeNodeVO legalTaskConfirmationVO = new TimeNodeVO();
|
TimeNodeVO legalTaskConfirmationVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -146,7 +148,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
timeNodeVOS.add(legalTaskConfirmationVO);
|
timeNodeVOS.add(legalTaskConfirmationVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getDesignDeadline().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getDesignDeadline())) {
|
||||||
TimeNodeVO designDeadlineVO = new TimeNodeVO();
|
TimeNodeVO designDeadlineVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -166,7 +168,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
timeNodeVOS.add(designDeadlineVO);
|
timeNodeVOS.add(designDeadlineVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getPrehomoDeadline().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getPrehomoDeadline())) {
|
||||||
TimeNodeVO prehomoDeadlineVO = new TimeNodeVO();
|
TimeNodeVO prehomoDeadlineVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -186,7 +188,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
timeNodeVOS.add(prehomoDeadlineVO);
|
timeNodeVOS.add(prehomoDeadlineVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getAttestationStartTime().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getAttestationStartTime())) {
|
||||||
TimeNodeVO attestationStartTimeVO = new TimeNodeVO();
|
TimeNodeVO attestationStartTimeVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -205,7 +207,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
}
|
}
|
||||||
timeNodeVOS.add(attestationStartTimeVO);
|
timeNodeVOS.add(attestationStartTimeVO);
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getAttestationEndTime().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getAttestationEndTime())) {
|
||||||
TimeNodeVO attestationEndTimeVO = new TimeNodeVO();
|
TimeNodeVO attestationEndTimeVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -225,7 +227,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
timeNodeVOS.add(attestationEndTimeVO);
|
timeNodeVOS.add(attestationEndTimeVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(projectTaskPlanning.getVerifyDeadline().toString())) {
|
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getVerifyDeadline())) {
|
||||||
TimeNodeVO verifyDeadlineVO = new TimeNodeVO();
|
TimeNodeVO verifyDeadlineVO = new TimeNodeVO();
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -248,16 +250,19 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
Collections.sort(timeNodeVOS, listConfirmationVO);
|
Collections.sort(timeNodeVOS, listConfirmationVO);
|
||||||
//设置在已过时,和未发生之间的数据的状态为进行中
|
//设置在已过时,和未发生之间的数据的状态为进行中
|
||||||
for(int i=0;i<timeNodeVOS.size();i++){
|
for(int i=0;i<timeNodeVOS.size();i++){
|
||||||
|
if(i == timeNodeVOS.size()-1){
|
||||||
|
break;
|
||||||
|
}
|
||||||
if(timeNodeVOS.get(i).getStatus().equals(PlanStatusEnum.OUT_OF_DATE.getValue())
|
if(timeNodeVOS.get(i).getStatus().equals(PlanStatusEnum.OUT_OF_DATE.getValue())
|
||||||
&& timeNodeVOS.get(i+1).getStatus().equals(PlanStatusEnum.LESS_THAN_TIME.getValue())){
|
&& timeNodeVOS.get(i+1).getStatus().equals(PlanStatusEnum.LESS_THAN_TIME.getValue())){
|
||||||
timeNodeVOS.get(i+1).setStatus(PlanStatusEnum.ON_GOING.getValue());
|
timeNodeVOS.get(i+1).setStatus(PlanStatusEnum.ON_GOING.getValue());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
result.add(timeNodeVOS);
|
if(timeNodeVOS.size() != 0){
|
||||||
|
result.add(timeNodeVOS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/5/13 10:04
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public class ProjectStatusBoardVO {
|
||||||
|
//项目名称
|
||||||
|
|
||||||
|
|
||||||
|
//目标市场
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user