From 7df22a72a9dd61e6890d73eb17574d2464359f57 Mon Sep 17 00:00:00 2001 From: xiejunyu Date: Wed, 20 Apr 2022 16:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E8=AE=A1=E5=88=92(=E5=90=84=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E7=A1=AE=E8=AE=A4=E8=BF=9B=E5=BA=A6)=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ProjectTaskPlanningMapper.java | 2 +- .../impl/ProjectTaskPlanningServiceImpl.java | 85 +++++++++---------- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/ProjectTaskPlanningMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/ProjectTaskPlanningMapper.java index 6059b7b69..5bcc74c21 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/ProjectTaskPlanningMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/ProjectTaskPlanningMapper.java @@ -14,6 +14,6 @@ import java.util.List; */ public interface ProjectTaskPlanningMapper extends BaseMapper { @Select("SELECT * FROM project_task_planning where project_id=#{projectId}") - List getByProjectId(String projectId); + ProjectTaskPlanning getByProjectId(String projectId); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java index 7bf90f44a..c704b657d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskPlanningServiceImpl.java @@ -31,10 +31,10 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl queryByProjectId(String projectId) { - List projectTaskPlanningList = projectTaskPlanningMapper.getByProjectId(projectId); - + ProjectTaskPlanning projectTaskPlanning = projectTaskPlanningMapper.getByProjectId(projectId); List timeNodeVOS = new ArrayList<>(); - for (ProjectTaskPlanning projectTaskPlanning : projectTaskPlanningList) { + TimeNodeVO listConfirmationVO = new TimeNodeVO(); + listConfirmationVO.setName(ProjectTaskPlanningNameEnum.LIST_CONFIRMATION.getName()); + listConfirmationVO.setTime(projectTaskPlanning.getListConfirmation()); + timeNodeVOS.add(listConfirmationVO); - TimeNodeVO listConfirmationVO = new TimeNodeVO(); - listConfirmationVO.setName(ProjectTaskPlanningNameEnum.LIST_CONFIRMATION.getName()); - listConfirmationVO.setTime(projectTaskPlanning.getListConfirmation()); - timeNodeVOS.add(listConfirmationVO); + TimeNodeVO legalTaskConfirmationVO = new TimeNodeVO(); + legalTaskConfirmationVO.setName(ProjectTaskPlanningNameEnum.LEGAL_TASK_CONFIRMATION.getName()); + legalTaskConfirmationVO.setTime(projectTaskPlanning.getLegalTaskConfirmation()); + timeNodeVOS.add(legalTaskConfirmationVO); - TimeNodeVO legalTaskConfirmationVO = new TimeNodeVO(); - legalTaskConfirmationVO.setName(ProjectTaskPlanningNameEnum.LEGAL_TASK_CONFIRMATION.getName()); - legalTaskConfirmationVO.setTime(projectTaskPlanning.getLegalTaskConfirmation()); - timeNodeVOS.add(legalTaskConfirmationVO); + TimeNodeVO designDeadlineVO = new TimeNodeVO(); + designDeadlineVO.setName(ProjectTaskPlanningNameEnum.DESIGN_DEADLINE.getName()); + designDeadlineVO.setTime(projectTaskPlanning.getDesignDeadline()); + timeNodeVOS.add(designDeadlineVO); - TimeNodeVO designDeadlineVO = new TimeNodeVO(); - designDeadlineVO.setName(ProjectTaskPlanningNameEnum.DESIGN_DEADLINE.getName()); - designDeadlineVO.setTime(projectTaskPlanning.getDesignDeadline()); - timeNodeVOS.add(designDeadlineVO); + TimeNodeVO prehomoDeadlineVO = new TimeNodeVO(); + prehomoDeadlineVO.setName(ProjectTaskPlanningNameEnum.PREHOMO_DEADLINE.getName()); + prehomoDeadlineVO.setTime(projectTaskPlanning.getPrehomoDeadline()); + timeNodeVOS.add(prehomoDeadlineVO); - TimeNodeVO prehomoDeadlineVO = new TimeNodeVO(); - prehomoDeadlineVO.setName(ProjectTaskPlanningNameEnum.PREHOMO_DEADLINE.getName()); - prehomoDeadlineVO.setTime(projectTaskPlanning.getPrehomoDeadline()); - timeNodeVOS.add(prehomoDeadlineVO); + TimeNodeVO attestationStartTimeVO = new TimeNodeVO(); + attestationStartTimeVO.setName(ProjectTaskPlanningNameEnum.ATTESTATION_START_TIME.getName()); + attestationStartTimeVO.setTime(projectTaskPlanning.getAttestationStartTime()); + timeNodeVOS.add(attestationStartTimeVO); - TimeNodeVO attestationStartTimeVO = new TimeNodeVO(); - attestationStartTimeVO.setName(ProjectTaskPlanningNameEnum.ATTESTATION_START_TIME.getName()); - attestationStartTimeVO.setTime(projectTaskPlanning.getAttestationStartTime()); - timeNodeVOS.add(attestationStartTimeVO); + TimeNodeVO attestationEndTimeVO = new TimeNodeVO(); + attestationEndTimeVO.setName(ProjectTaskPlanningNameEnum.ATTESTATION_END_TIME.getName()); + attestationEndTimeVO.setTime(projectTaskPlanning.getAttestationEndTime()); + timeNodeVOS.add(attestationEndTimeVO); - TimeNodeVO attestationEndTimeVO = new TimeNodeVO(); - attestationEndTimeVO.setName(ProjectTaskPlanningNameEnum.ATTESTATION_END_TIME.getName()); - attestationEndTimeVO.setTime(projectTaskPlanning.getAttestationEndTime()); - timeNodeVOS.add(attestationEndTimeVO); + TimeNodeVO verifyDeadlineVO = new TimeNodeVO(); + verifyDeadlineVO.setName(ProjectTaskPlanningNameEnum.VERIFY_DEADLINE.getName()); + verifyDeadlineVO.setTime(projectTaskPlanning.getVerifyDeadline()); + timeNodeVOS.add(verifyDeadlineVO); - TimeNodeVO verifyDeadlineVO = new TimeNodeVO(); - verifyDeadlineVO.setName(ProjectTaskPlanningNameEnum.VERIFY_DEADLINE.getName()); - verifyDeadlineVO.setTime(projectTaskPlanning.getVerifyDeadline()); - timeNodeVOS.add(verifyDeadlineVO); + // 排序 + Collections.sort(timeNodeVOS, listConfirmationVO); - // 排序 - Collections.sort(timeNodeVOS, listConfirmationVO); - } return timeNodeVOS; } - /** + /** * 列表查询 * * @return */ @Override - public List queryList() { - return list(); - } + public List queryList() { + return list(); + } }