| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.DailyInspectionStandard; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandard; |
| | | import org.jeecg.modules.eam.mapper.DailyInspectionStandardMapper; |
| | |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.IDailyInspectionStandardService; |
| | | import org.jeecg.modules.eam.service.IMaintenanceStandardService; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service |
| | | public class MaintenanceStandardServiceImpl extends ServiceImpl<MaintenanceStandardMapper, MaintenanceStandard> implements IMaintenanceStandardService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getMaintenanceStandardList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | SysUser sysUser = sysUserService.getById(user.getId()); |
| | | String areaId = sysUser.getAreaId(); |
| | | List<String> workCenterIds = null; |
| | | if(StringUtils.isNotBlank(areaId)){ |
| | | String[] split = areaId.split(","); |
| | | workCenterIds = Arrays.asList(split); |
| | | params.put("workCenterIds",workCenterIds); |
| | | } |
| | | return super.baseMapper.getMaintenanceStandardList(pageData,params); |
| | | } |
| | | |