| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrder; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrderDetail; |
| | | import org.jeecg.modules.eam.entity.EamWeekMaintenanceOrder; |
| | | import org.jeecg.modules.eam.mapper.EamInspectionOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderRequest; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<EamInspectionOrder> selectUnCompleteOrder(String expiredDate) { |
| | | LambdaQueryWrapper<EamInspectionOrder> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.lt(EamInspectionOrder::getInspectionDate, expiredDate); |
| | | List<String> unCompleteStatus = new ArrayList<>(); |
| | | unCompleteStatus.add(InspectionStatus.WAIT_INSPECTION.name()); |
| | | unCompleteStatus.add(InspectionStatus.UNDER_INSPECTION.name()); |
| | | queryWrapper.in(EamInspectionOrder::getInspectionStatus, unCompleteStatus); |
| | | queryWrapper.orderByAsc(EamInspectionOrder::getInspectionDate); |
| | | return eamInspectionOrderMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addInspectionOrder(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | | EamInspectionOrder eamInspectionOrder = new EamInspectionOrder(); |
| | |
| | | |
| | | /** |
| | | * 触发流程 |
| | | * |
| | | * @param eamInspectionOrder |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 领取点检工单 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 作废点检工单 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 点检流程 |
| | | * |
| | | * @param eamInspectionOrderRequest |
| | | * @return |
| | | */ |
| | |
| | | return Result.error("操作失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | private boolean isValidRequest(EamInspectionOrderRequest request) { |
| | |
| | | |
| | | /** |
| | | * 设备是否存在异常,并进行设备维修 |
| | | * |
| | | * @param eamInspectionOrder |
| | | */ |
| | | private void updateEamInspectionOrderDetail(EamInspectionOrder eamInspectionOrder) { |
| | |
| | | |
| | | /** |
| | | * 批量作废与领取 |
| | | * |
| | | * @param ids |
| | | * @param type |
| | | * @return |