| | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.damage.entity.request.DamageRequest; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.entity.vo.CutDrawingVO; |
| | | import com.mes.edgstoragecage.entity.vo.EdgSlotRemainVO; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | |
| | | import com.mes.engineering.mapper.EngineeringMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import com.mes.pp.entity.OptimizeHeatDetail; |
| | | import com.mes.pp.entity.OptimizeHeatLayout; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeHeatDetailMapper; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | |
| | | @Autowired |
| | | EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | |
| | | @Override |
| | | public List<CutDrawingVO> queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | public JSONObject queryCurrentCutDrawing(int deviceId, int stationCell) { |
| | | // 获取本条线当前正在执行的工程 |
| | | Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>() |
| | | .eq(Engineering::getState, 1).eq(Engineering::getStationCell, stationCell)); |
| | |
| | | patternSequence = lastGlass.getPatternSequence() + 1; |
| | | } else { |
| | | //当前版图是否有剩余,有剩余显示当前版图 |
| | | patternSequence = lastGlass.getPatternSequence(); } |
| | | patternSequence = lastGlass.getPatternSequence(); |
| | | } |
| | | } |
| | | return baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<CutDrawingVO> currentCutDrawings = baseMapper.queryCutDrawingByEngineerId(engineering.getEngineerId(), patternSequence, 0); |
| | | jsonObject.append("currentCutTerritory", currentCutDrawings); |
| | | if (CollectionUtil.isNotEmpty(currentCutDrawings)) { |
| | | jsonObject.append("engineer", engineering.getEngineerId()); |
| | | jsonObject.append("sequence", patternSequence); |
| | | UpPattenUsage upPattenUsage = upPattenUsageMapper.selectOne(new LambdaQueryWrapper<UpPattenUsage>() |
| | | .eq(UpPattenUsage::getEngineeringId, engineering.getEngineerId()) |
| | | .eq(UpPattenUsage::getLayoutSequence, patternSequence)); |
| | | jsonObject.append("upPattenUsage", upPattenUsage); |
| | | } |
| | | return jsonObject; |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getEngineerId, engineerId)); |
| | | long totalPatternSequence = glassInfoList.stream().map(GlassInfo::getPatternSequence).distinct().count(); |
| | | map.put("totalPatternSequence", totalPatternSequence); |
| | | UpPattenUsage upPattenUsage = upPattenUsageMapper.selectOne(new LambdaQueryWrapper<UpPattenUsage>().eq(UpPattenUsage::getEngineeringId, engineerId) |
| | | .eq(UpPattenUsage::getLayoutSequence, patternSequence)); |
| | | map.put("upPattenUsage", upPattenUsage); |
| | | return map; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public EdgStorageCageDetails queryEdgStorageDetailsBySize(int deviceId, int currentSlot, double width, double height) { |
| | | return baseMapper.queryEdgStorageDetailsBySize(deviceId, currentSlot, width, height); |
| | | public EdgStorageCageDetails queryEdgStorageDetailsBySize(int deviceId, int currentSlot, double width, double height, int cell, int maxThickness) { |
| | | return baseMapper.queryEdgStorageDetailsBySize(deviceId, currentSlot, width, height, cell, maxThickness); |
| | | } |
| | | |
| | | @Override |
| | | public EdgStorageCageDetails queryEdgStorageDetailsByLimitSize(int deviceId, Integer currentCell, double width, double height, int cell, int minOneFirstLength, int minOneSecondLength, int maxTwoFirstLength, int maxTwoSecondLength, int maxThickness) { |
| | | return baseMapper.queryEdgStorageDetailsByLimitSize(deviceId, currentCell, width, height, cell, minOneFirstLength, minOneSecondLength, maxTwoFirstLength, maxTwoSecondLength, maxThickness); |
| | | } |
| | | |
| | | @Override |
| | | public String edgDetailsOperate(DamageRequest request) { |
| | | //卧式理片笼爆破损 |
| | | damageService.autoSubmitReport(request.getGlassId(), request.getLine(), request.getWorkingProcedure(), "卧式理片笼", request.getState()); |
| | | this.remove(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getGlassId,request.getGlassId())); |
| | | this.remove(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getGlassId, request.getGlassId())); |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EdgSlotRemainVO> querySlotRemainWidth(int cellLength, int glassGap) { |
| | | return this.baseMapper.querySlotRemainWidth(cellLength, glassGap); |
| | | } |
| | | |
| | | @Override |
| | | public List<PieChartVO> queryPieChart() { |
| | | return this.baseMapper.queryPieChart(); |
| | | } |
| | | } |