diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 45d0e69..43030a4 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -1,5 +1,6 @@ package cn.com.tenlion.service.apply.impl; +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.pojo.dtos.apply.ApplyClassPlanDTO; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO; @@ -9,6 +10,7 @@ import cn.com.tenlion.pojo.vos.traininginstitutionuser.InstitutionUserVO; import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService; +import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.ParamsException; import ink.wgink.exceptions.SaveException; @@ -55,6 +57,8 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic private IClassPlanService classPlanService; @Autowired private IDistributionCardService distributionCardService; + @Autowired + private ITrainingInstitutionUserService trainingInstitutionUserService; @@ -327,10 +331,15 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic @Override public SuccessResultList> listPage(ListPage page) { - InstitutionUserVO institutionUserVO = securityComponent.getExpandData(InstitutionUserVO.class); - if(institutionUserVO != null){ - page.getParams().put("applyInstitutionId",institutionUserVO.getInstitutionId()); + InstitutionDTO institutionDTO = trainingInstitutionUserService.getByUserId(securityComponent.getCurrentUser().getUserId()); + if(institutionDTO != null){ + page.getParams().put("applyInstitutionId",institutionDTO.getInstitutionId()); } + +// InstitutionUserVO institutionUserVO = securityComponent.getExpandData(InstitutionUserVO.class); +// if(institutionUserVO != null){ +// page.getParams().put("applyInstitutionId",institutionUserVO.getInstitutionId()); +// } PageHelper.startPage(page.getPage(), page.getRows()); List applyDTOs = list(page.getParams()); PageInfo pageInfo = new PageInfo<>(applyDTOs);