修改了成员加入的操作,去掉原来的加入申请和审核
This commit is contained in:
parent
8ff1d7b174
commit
374b53ba9b
@ -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<String> selectProjectNumberByMemberIds(Integer userId) {
|
||||
return memberProjectDao.selectProjectNumberByMemberId(userId,"0");
|
||||
}
|
||||
//-----------------------------------------------------------------------------*
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user