|
|
@@ -58,6 +58,12 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
@Autowired
|
|
|
private CrowdTestProjectDao projectDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PersonalAuthenticationDao personalAuthenticationDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private EnterpriseAuthenticationDao enterpriseAuthenticationDao;
|
|
|
+
|
|
|
@Override
|
|
|
public UserDTO loginByMobileAndPwd(LoginCommand cmd) {
|
|
|
return null;
|
|
|
@@ -328,6 +334,54 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
return agencyList;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<BaseAuthVO> renderAuthingList() {
|
|
|
+ List<BaseAuthVO> authingList = new ArrayList<>();
|
|
|
+ authingList.addAll(personalAuthenticationDao.findByIsAuthentication(AuthenticationStatus.isAuthenIng).stream().map(personalAuthenticationPO -> {
|
|
|
+ PersonalAuthentication personalAuthentication = new PersonalAuthentication();
|
|
|
+ BeanUtils.copyProperties(personalAuthenticationPO, personalAuthentication);
|
|
|
+ return new BaseAuthVO(personalAuthentication);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+
|
|
|
+ authingList.addAll(enterpriseAuthenticationDao.findByIsAuthentication(AuthenticationStatus.isAuthenIng).stream().map(enterpriseAuthenticationPO -> {
|
|
|
+ EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
|
|
|
+ BeanUtils.copyProperties(enterpriseAuthenticationPO, enterpriseAuthentication);
|
|
|
+ return new BaseAuthVO(enterpriseAuthentication);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+
|
|
|
+ authingList.addAll(agencyDao.findByIsAuthentication(AuthenticationStatus.isAuthenIng).stream().map(evaluationAgencyPO -> {
|
|
|
+ EvaluationAgency agency = new EvaluationAgency();
|
|
|
+ BeanUtils.copyProperties(evaluationAgencyPO, agency);
|
|
|
+ return new BaseAuthVO(agency);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ authingList.sort(Comparator.comparing(BaseAuthVO::getApplytime).reversed());
|
|
|
+ return authingList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<BaseAuthVO> renderAuthedList() {
|
|
|
+ List<BaseAuthVO> authingList = new ArrayList<>();
|
|
|
+ authingList.addAll(personalAuthenticationDao.findByIsAuthenticationIsNot(AuthenticationStatus.isAuthenIng).stream().map(personalAuthenticationPO -> {
|
|
|
+ PersonalAuthentication personalAuthentication = new PersonalAuthentication();
|
|
|
+ BeanUtils.copyProperties(personalAuthenticationPO, personalAuthentication);
|
|
|
+ return new BaseAuthVO(personalAuthentication);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+
|
|
|
+ authingList.addAll(enterpriseAuthenticationDao.findByIsAuthenticationIsNot(AuthenticationStatus.isAuthenIng).stream().map(enterpriseAuthenticationPO -> {
|
|
|
+ EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
|
|
|
+ BeanUtils.copyProperties(enterpriseAuthenticationPO, enterpriseAuthentication);
|
|
|
+ return new BaseAuthVO(enterpriseAuthentication);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+
|
|
|
+ authingList.addAll(agencyDao.findByIsAuthenticationIsNot(AuthenticationStatus.isAuthenIng).stream().map(evaluationAgencyPO -> {
|
|
|
+ EvaluationAgency agency = new EvaluationAgency();
|
|
|
+ BeanUtils.copyProperties(evaluationAgencyPO, agency);
|
|
|
+ return new BaseAuthVO(agency);
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ authingList.sort(Comparator.comparing(BaseAuthVO::getApplytime).reversed());
|
|
|
+ return authingList;
|
|
|
+ }
|
|
|
+
|
|
|
private ProjectOperationControl initProjectPermission(CrowdTestProject project, User user){
|
|
|
ProjectOperationControl operationControl = new ProjectOperationControl();
|
|
|
if (user==null)
|