| | |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.intf.user.IOrgInnerServiceSMO; |
| | | import com.java110.dto.org.OrgDto; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.intf.user.IOrgStaffRelInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeOrgConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IOrgInnerServiceSMO orgInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOrgStaffRelInnerServiceSMO iOrgStaffRelInnerServiceSMO; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | OrgDto orgDto = BeanConvertUtil.covertBean(reqJson, OrgDto.class); |
| | | // if(reqJson.getString("orgLevel").equals("2")){ |
| | | // //默认只查看当前归属组织架构 |
| | | // BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto(); |
| | | // basePrivilegeDto.setResource("/viewAllOrganization"); |
| | | // basePrivilegeDto.setUserId(reqJson.getString("userId")); |
| | | // List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto); |
| | | // if(privileges.size()==0){ |
| | | // //查询员工所属二级组织架构 |
| | | // OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto(); |
| | | // orgStaffRelDto.setStaffId(reqJson.getString("userId")); |
| | | // List<OrgStaffRelDto> orgStaffRelDtos = iOrgStaffRelInnerServiceSMO.queryOrgInfoByStaffIds(orgStaffRelDto); |
| | | // if(orgStaffRelDtos.size()>0){ |
| | | // orgDto.setOrgId(orgStaffRelDtos.get(0).getCompanyId()); |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | |
| | | int count = orgInnerServiceSMOImpl.queryOrgsCount(orgDto); |
| | | |