| | |
| | | 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 org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.eam.entity.InspectionOrder; |
| | | import org.jeecg.modules.eam.mapper.InspectionOrderMapper; |
| | | import org.jeecg.modules.eam.model.InspectionCycleVo; |
| | | import org.jeecg.modules.eam.service.IInspectionOrderService; |
| | | 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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class InspectionOrderServiceImpl extends ServiceImpl<InspectionOrderMapper, InspectionOrder> implements IInspectionOrderService { |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | //根据设备获取点检周期 (手动生成日常点检工单) |
| | | @Override |
| | |
| | | @Override |
| | | public IPage<Map<String, Object>> getInspectionOrderList(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); |
| | | } |
| | | //状态筛选 |
| | | List<String> statusEnumList = null; |
| | | if(params.get("statusEnums") != null && StringUtils.isNotBlank(params.get("statusEnums").toString())) { |
| | | String[] statusEnums = params.get("statusEnums").toString().split(","); |
| | | statusEnumList = Arrays.asList(statusEnums); |
| | | params.put("statusEnums",statusEnumList); |
| | | } |
| | | return super.getBaseMapper().getInspectionOrderList(pageData,params); |
| | | } |
| | | |
| | |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return this.baseMapper.findWeekInspectionProjectList(pageData,params); |
| | | } |
| | | |
| | | /** |
| | | * 点检报表 new |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> findDayInspectionStandard(String equipmentNum) { |
| | | return this.baseMapper.findDayInspectionStandard(equipmentNum); |
| | | } |
| | | |
| | | /** |
| | | * 获取点检项 new |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> findDayInspectionStandardProject(String name, String detectionStandard) { |
| | | return this.baseMapper.findDayInspectionStandardProject(name,detectionStandard); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUserQianZi(String num) { |
| | | return this.baseMapper.getUserQianzi(num); |
| | | } |
| | | } |