| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.Area; |
| | | import org.jeecg.modules.eam.entity.CalibrationOrder; |
| | | import org.jeecg.modules.eam.entity.CalibrationOrderDetail; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.mapper.CalibrationOrderDetailMapper; |
| | | import org.jeecg.modules.eam.mapper.CalibrationOrderMapper; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.IAreaService; |
| | | import org.jeecg.modules.eam.service.ICalibrationOrderService; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private CalibrationOrderMapper calibrationOrderMapper; |
| | | @Autowired |
| | | private CalibrationOrderDetailMapper calibrationOrderDetailMapper; |
| | | |
| | | @Autowired |
| | | private IAreaService areaService; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | //qsw 2023-7-18================================================================================ |
| | | |
| | | /** |
| | | * 根据模型传入的编码 判断改编码公司/中心/工段的哪一级 |
| | | * qsw 2024-3-18 |
| | | */ |
| | | @Override |
| | | public String findOrgType(String productionCode) { |
| | | return this.baseMapper.findOrgType(productionCode); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前登录人是中心及对应的编码 |
| | | * qsw 2024-3-18 |
| | | */ |
| | | @Override |
| | | public String findProductionCode(String userId) { |
| | | return this.baseMapper.findProductionCode(userId); |
| | | } |
| | | |
| | | /** |
| | | * 设备检定工单 创建时通过设备获取设备精度参数 |
| | | * qsw 2023-7-18 |
| | |
| | | * qsw 2024-3-13 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getEquipmentTechnologyStatusList(String factoryModelId) { |
| | | return this.baseMapper.getEquipmentTechnologyStatusList(factoryModelId); |
| | | public List<Map<String, Object>> getEquipmentTechnologyStatusList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getEquipmentTechnologyStatusList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * qsw 2024-3-13 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getReportRepairEquipmentList(String factoryModelId) { |
| | | return this.baseMapper.getReportRepairEquipmentList(factoryModelId); |
| | | public List<Map<String, Object>> getReportRepairEquipmentList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getReportRepairEquipmentList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getThisMonthMaintenanceList(String factoryModelId) { |
| | | return this.baseMapper.getThisMonthMaintenanceList(factoryModelId); |
| | | public List<Map<String, Object>> getThisMonthMaintenanceList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getThisMonthMaintenanceList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getNextMonthMaintenanceList(String factoryModelId) { |
| | | return this.baseMapper.getNextMonthMaintenanceList(factoryModelId); |
| | | public List<Map<String, Object>> getNextMonthMaintenanceList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getNextMonthMaintenanceList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getNextNextMonthMaintenanceList(String factoryModelId) { |
| | | return this.baseMapper.getNextNextMonthMaintenanceList(factoryModelId); |
| | | public List<Map<String, Object>> getNextNextMonthMaintenanceList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getNextNextMonthMaintenanceList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getThisMonthMaintenanceFinishList(String factoryModelId) { |
| | | return this.baseMapper.getThisMonthMaintenanceFinishList(factoryModelId); |
| | | public List<Map<String, Object>> getThisMonthMaintenanceFinishList(String workCenterId,String areaId) { |
| | | return this.baseMapper.getThisMonthMaintenanceFinishList(workCenterId,areaId); |
| | | } |
| | | |
| | | /** |
| | | *首页二保计划展示 |
| | | * qsw 2024-3-15 |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getTwoMaintenancePlanList() { |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | List<Area> areaList = areaService.lambdaQuery().eq(Area::getType, "1").eq(Area::getDelFlag, "0").list(); |
| | | List<Map<String, Object>> arrayList = new ArrayList<>(); |
| | | for (Area area : areaList) { |
| | | String id = area.getId(); |
| | | List<Map<String, Object>> centerTwoMaintenancePlanList = this.baseMapper.getCenterTwoMaintenancePlanList(id); |
| | | if(centerTwoMaintenancePlanList.size()>0){ |
| | | arrayList.add(centerTwoMaintenancePlanList.get(0)); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |