From 374b53ba9b1aa8b5c3fc83badd99270d1ccba900 Mon Sep 17 00:00:00 2001 From: "DESKTOP-G8BCEP0\\HP" <2037158277@qq.com> Date: Tue, 24 Aug 2021 16:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=9A=84=E6=93=8D=E4=BD=9C=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=8E=9F=E6=9D=A5=E7=9A=84=E5=8A=A0=E5=85=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=92=8C=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MemberProjectServiceImpl.java | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/xkrs/service/impl/MemberProjectServiceImpl.java b/src/main/java/com/xkrs/service/impl/MemberProjectServiceImpl.java index e82b618..ecb491d 100644 --- a/src/main/java/com/xkrs/service/impl/MemberProjectServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/MemberProjectServiceImpl.java @@ -57,8 +57,8 @@ public class MemberProjectServiceImpl implements MemberProjectService { return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR,"您还没有注册登录,请先注册登录",locale); } ProjectOverview byProjectNumber = projectOverviewDao.findByProjectNumber(projectNumber); - if("3".equals(byProjectNumber.getProjectStatus())){ - return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"该项目正在审核,您还不能加入",locale); + if("0".equals(byProjectNumber.getProjectStatus())){ + return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"该项目还未启动,您还不能加入",locale); } MemberProject memberProjectNumber = memberProjectDao.findByMemberIdAndMemberProjectNumberAndApplicationType(sysUserEntity.getId(), projectNumber, "1"); if(memberProjectNumber != null){ @@ -68,7 +68,7 @@ public class MemberProjectServiceImpl implements MemberProjectService { MemberProject memberProject = new MemberProject(); memberProject.setMemberProjectNumber(projectNumber); memberProject.setMemberId(sysUserEntity.getId()); - memberProject.setApplicationTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); + memberProject.setJoinTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); if("QT".equals(projectNumber.substring(0,2))){ memberProject.setApplicationType("1"); memberProjectDao.save(memberProject); @@ -82,9 +82,17 @@ public class MemberProjectServiceImpl implements MemberProjectService { workHourRecordDao.save(workHourRecord); return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"加入成功",locale); } - memberProject.setApplicationType("0"); + memberProject.setApplicationType("1"); memberProjectDao.save(memberProject); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"提交加入申请成功",locale); + WorkHourRecord workHourRecord = new WorkHourRecord(); + workHourRecord.setWorkContent("优化"); + workHourRecord.setWorkHour(0); + workHourRecord.setUserId(sysUserEntity.getId()); + workHourRecord.setProjectNumber(projectNumber); + workHourRecord.setColor("1"); + workHourRecord.setSubmitTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); + workHourRecordDao.save(workHourRecord); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"加入成功",locale); } } @@ -117,6 +125,7 @@ public class MemberProjectServiceImpl implements MemberProjectService { return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"退出成功",locale); } + // -----------------------------------------------------------------------------------------* /** * 成员被允许加入 * @param projectNumber @@ -158,6 +167,8 @@ public class MemberProjectServiceImpl implements MemberProjectService { return memberProjectDao.selectMemberApplication(projectNumber); } + //-----------------------------------------------------------------------------------------* + /** * 查询加入的成员的信息 * @param projectNumber @@ -178,6 +189,10 @@ public class MemberProjectServiceImpl implements MemberProjectService { return memberProjectDao.selectProjectNumberByMemberId(userId,"1"); } + + + + //------------------------------------------------------------------------------* /** * 查询待审核项目的编号 * @param userId @@ -187,6 +202,7 @@ public class MemberProjectServiceImpl implements MemberProjectService { public List selectProjectNumberByMemberIds(Integer userId) { return memberProjectDao.selectProjectNumberByMemberId(userId,"0"); } + //-----------------------------------------------------------------------------* }