修改了成员加入的操作,去掉原来的加入申请和审核
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);
|
return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR,"您还没有注册登录,请先注册登录",locale);
|
||||||
}
|
}
|
||||||
ProjectOverview byProjectNumber = projectOverviewDao.findByProjectNumber(projectNumber);
|
ProjectOverview byProjectNumber = projectOverviewDao.findByProjectNumber(projectNumber);
|
||||||
if("3".equals(byProjectNumber.getProjectStatus())){
|
if("0".equals(byProjectNumber.getProjectStatus())){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"该项目正在审核,您还不能加入",locale);
|
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"该项目还未启动,您还不能加入",locale);
|
||||||
}
|
}
|
||||||
MemberProject memberProjectNumber = memberProjectDao.findByMemberIdAndMemberProjectNumberAndApplicationType(sysUserEntity.getId(), projectNumber, "1");
|
MemberProject memberProjectNumber = memberProjectDao.findByMemberIdAndMemberProjectNumberAndApplicationType(sysUserEntity.getId(), projectNumber, "1");
|
||||||
if(memberProjectNumber != null){
|
if(memberProjectNumber != null){
|
||||||
@ -68,7 +68,7 @@ public class MemberProjectServiceImpl implements MemberProjectService {
|
|||||||
MemberProject memberProject = new MemberProject();
|
MemberProject memberProject = new MemberProject();
|
||||||
memberProject.setMemberProjectNumber(projectNumber);
|
memberProject.setMemberProjectNumber(projectNumber);
|
||||||
memberProject.setMemberId(sysUserEntity.getId());
|
memberProject.setMemberId(sysUserEntity.getId());
|
||||||
memberProject.setApplicationTime(DateTimeUtil.dateTimeToString(LocalDateTime.now()));
|
memberProject.setJoinTime(DateTimeUtil.dateTimeToString(LocalDateTime.now()));
|
||||||
if("QT".equals(projectNumber.substring(0,2))){
|
if("QT".equals(projectNumber.substring(0,2))){
|
||||||
memberProject.setApplicationType("1");
|
memberProject.setApplicationType("1");
|
||||||
memberProjectDao.save(memberProject);
|
memberProjectDao.save(memberProject);
|
||||||
@ -82,9 +82,17 @@ public class MemberProjectServiceImpl implements MemberProjectService {
|
|||||||
workHourRecordDao.save(workHourRecord);
|
workHourRecordDao.save(workHourRecord);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"加入成功",locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"加入成功",locale);
|
||||||
}
|
}
|
||||||
memberProject.setApplicationType("0");
|
memberProject.setApplicationType("1");
|
||||||
memberProjectDao.save(memberProject);
|
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);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"退出成功",locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------*
|
||||||
/**
|
/**
|
||||||
* 成员被允许加入
|
* 成员被允许加入
|
||||||
* @param projectNumber
|
* @param projectNumber
|
||||||
@ -158,6 +167,8 @@ public class MemberProjectServiceImpl implements MemberProjectService {
|
|||||||
return memberProjectDao.selectMemberApplication(projectNumber);
|
return memberProjectDao.selectMemberApplication(projectNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询加入的成员的信息
|
* 查询加入的成员的信息
|
||||||
* @param projectNumber
|
* @param projectNumber
|
||||||
@ -178,6 +189,10 @@ public class MemberProjectServiceImpl implements MemberProjectService {
|
|||||||
return memberProjectDao.selectProjectNumberByMemberId(userId,"1");
|
return memberProjectDao.selectProjectNumberByMemberId(userId,"1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------*
|
||||||
/**
|
/**
|
||||||
* 查询待审核项目的编号
|
* 查询待审核项目的编号
|
||||||
* @param userId
|
* @param userId
|
||||||
@ -187,6 +202,7 @@ public class MemberProjectServiceImpl implements MemberProjectService {
|
|||||||
public List<String> selectProjectNumberByMemberIds(Integer userId) {
|
public List<String> selectProjectNumberByMemberIds(Integer userId) {
|
||||||
return memberProjectDao.selectProjectNumberByMemberId(userId,"0");
|
return memberProjectDao.selectProjectNumberByMemberId(userId,"0");
|
||||||
}
|
}
|
||||||
|
//-----------------------------------------------------------------------------*
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user