| | |
| | | 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.mapper.DailyInspectionStandardMapper; |
| | | import org.jeecg.modules.eam.service.IDailyInspectionStandardService; |
| | | 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 DailyInspectionStandardServiceImpl extends ServiceImpl<DailyInspectionStandardMapper, DailyInspectionStandard> implements IDailyInspectionStandardService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> getInspectionStandardList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | String num = String.valueOf(params.get("num")); |
| | | String name = String.valueOf(params.get("name")); |
| | | String versionStatus = String.valueOf(params.get("versionStatus")); |
| | | return super.baseMapper.getInspectionStandardPage(pageData,num,name,versionStatus); |
| | | |
| | | 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); |
| | | } |
| | | |
| | | return super.baseMapper.getInspectionStandardPage(pageData,num,name,versionStatus,workCenterIds); |
| | | } |
| | | |
| | | /** |