Merge branch 'master' of http://10.153.19.25:10101/r/YiWuProject
| | |
| | | height: `${rect.height}px`, |
| | | backgroundColor: 'lightblue'}"> |
| | | <div class="centered-text"> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.sort }}</div> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.process_id }}</div> |
| | | <div style="font-size: 15px;font-weight: bold;">{{ rect.project_no }}</div> |
| | | <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="font-size: 10px;font-weight: bold;">{{ rect.sort }}</div> |
| | | <div style="font-size: 10px;font-weight: bold;">{{ rect.process_id }}</div> |
| | | <div style="font-size: 10px;font-weight: bold;">{{ rect.project_no }}</div> |
| | | <div style="font-size: 10px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | } |
| | | // 任务重置 |
| | | const handleptask = async() => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.partasks'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCage/resetCage') |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | // const handleptask = async() => { |
| | | // try { |
| | | // const confirmResult = await ElMessageBox.confirm( |
| | | // t('searchOrder.partasks'), |
| | | // t('workOrder.prompt'), |
| | | // { |
| | | // confirmButtonText: t('workOrder.yes'), |
| | | // cancelButtonText: t('workOrder.cancel'), |
| | | // type: 'warning', |
| | | // } |
| | | // ); |
| | | // if (confirmResult === 'confirm') { |
| | | // const response = await request.post('/cacheVerticalGlass/bigStorageCage/resetCage') |
| | | // if (response.code === 200) { |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } |
| | | // } catch (error) { |
| | | // } |
| | | // }; |
| | | // 警报确认 |
| | | const handleSure = async (row) => { |
| | | try { |
| | |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="success" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">{{ $t('searchOrder.searchlayout') }}</el-button> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> |
| | | <!-- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> --> |
| | | <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" /> |
| | | <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="diaodu" class="mb-2" :inactive-text="$t('searchOrder.Schedulingswitch')" @change="handlediaodu" /> |
| | | <div id="dotClass"> |
| | |
| | | selectedRow.value = row; // 更新选中的行数据 |
| | | } |
| | | // 任务重置 |
| | | const handleptask = async() => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.partasks'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post('/hollowGlass/hollowBigStorageCage/resetCage') |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | } |
| | | }; |
| | | // const handleptask = async() => { |
| | | // try { |
| | | // const confirmResult = await ElMessageBox.confirm( |
| | | // t('searchOrder.partasks'), |
| | | // t('workOrder.prompt'), |
| | | // { |
| | | // confirmButtonText: t('workOrder.yes'), |
| | | // cancelButtonText: t('workOrder.cancel'), |
| | | // type: 'warning', |
| | | // } |
| | | // ); |
| | | // if (confirmResult === 'confirm') { |
| | | // const response = await request.post('/hollowGlass/hollowBigStorageCage/resetCage') |
| | | // if (response.code === 200) { |
| | | // ElMessage.success(response.message); |
| | | // } else { |
| | | // ElMessage.error(response.msg); |
| | | // } |
| | | // } |
| | | // } catch (error) { |
| | | // } |
| | | // }; |
| | | // 调度开关 |
| | | const handlediaodu = async () => { |
| | | try { |
| | |
| | | <div style="display: flex;"> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary" @click="handlexiang">{{ $t('searchOrder.cageinformation') }}</el-button> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="success" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button> |
| | | <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> |
| | | <!-- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> --> |
| | | <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="diaodu" class="mb-2" :inactive-text="$t('searchOrder.Schedulingswitch')" @change="handlediaodu" /> |
| | | <div style="display: flex;"> |
| | | <div style="margin-left: 15px;margin-top: 5px;font-size: 14px;top: 5vh;margin-top: 12px;">{{ $t('searchOrder.hollowPriority') }}:</div> |
| | |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.HollowFormulaDetails; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.*; |
| | | import com.mes.hollow.entity.dto.LisecHollowDetails; |
| | | import com.mes.hollow.entity.dto.LisecHollowFrameDetails; |
| | | import com.mes.hollow.entity.dto.LisecHollowGlassAndFrameDetails; |
| | | import com.mes.hollow.entity.dto.LisecHollowGlassDetails; |
| | | import com.mes.hollow.entity.request.HollowHistoryTaskRequest; |
| | | import com.mes.hollow.entity.request.HollowTaskRequest; |
| | | import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper; |
| | |
| | | private static final int ID_RATIO = 10; |
| | | |
| | | @Override |
| | | @Transactional |
| | | // @Transactional |
| | | public HollowGlassOutRelationInfo receiveTask(HollowTaskRequest request) { |
| | | return childrenTask(request, 0); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | // @Transactional |
| | | public HollowGlassOutRelationInfo forceOutGlass(HollowTaskRequest request) { |
| | | return childrenTask(request, 1); |
| | | } |
| | |
| | | if (CollectionUtil.isEmpty(outRelationList) || outRelationList.size() != 1) { |
| | | return "本条线不存在该流程任务或者同流程卡任务数大于1"; |
| | | } |
| | | log.info("李赛克流程卡:{}", flowCardId); |
| | | HollowGlassOutRelationInfo relationInfo = outRelationList.get(0); |
| | | if (relationInfo.getTotalLayer() < 2) { |
| | | return "任务总层数小于2,不生成李赛克文件"; |
| | |
| | | if (null == order) { |
| | | return "生成失败,相关订单信息不存在"; |
| | | } |
| | | log.info("李赛克相关订单信息{}", order); |
| | | //获取配方相关信息 |
| | | HollowFormulaDetails formulaDetails = hollowFormulaDetailsService.getById(relationInfo.getFormulaId()); |
| | | if (null == formulaDetails) { |
| | |
| | | if (layerCount != relationInfo.getTotalLayer() && isForce == 0) { |
| | | return "生成失败,该流程卡内层数与进笼关系表内层数数量不相同"; |
| | | } |
| | | |
| | | log.info("李赛克总层数{}", layerCount); |
| | | //设置文件的主体内容 |
| | | LisecHollowDetails details = new LisecHollowDetails(); |
| | | String randomNumber = "" + (int) (Math.random() * 100000 + 100000); |
| | |
| | | // 创建Calculator实例 |
| | | Blank blank = new Blank(); |
| | | |
| | | log.info("李赛克基础数据已生成:{}", details); |
| | | // 创建数据模型 |
| | | Map<String, Object> root = new HashMap<>(); |
| | | root.put("blank", blank); |
| | |
| | | writer.write(out.toString()); |
| | | } catch (TemplateException | IOException e) { |
| | | e.printStackTrace(); |
| | | |
| | | log.info("李赛克生成异常:{}", e.getMessage()); |
| | | } |
| | | return "success"; |
| | | } |
| | |
| | | } |
| | | |
| | | private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) { |
| | | |
| | | try { |
| | | |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1")); |
| | | HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo(); |
| | | if (null == glassInfo) { |
| | | log.info("该流程卡信息系统未找到"); |
| | | return info; |
| | | } |
| | | log.error("创建任务时获取玻璃信息:{}", info); |
| | | List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, request.getFlowCardId()) |
| | | .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)); |
| | |
| | | int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>(); |
| | | Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH); |
| | | // Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP); |
| | | Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness()); |
| | | if (930 == request.getCell()) { |
| | | Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream() |
| | |
| | | } |
| | | hollowGlassQueueInfoService.saveBatch(hollowQueues); |
| | | try { |
| | | log.info("李赛克生成文件:{}", request); |
| | | if (request.getCell() == 930) { |
| | | generateHollowLisecFile(request.getFlowCardId(), 930, isForce, 0); |
| | | } |
| | |
| | | log.info("生成李赛克文件时发生异常,流程卡号为{}", request.getFlowCardId()); |
| | | } |
| | | return info; |
| | | |
| | | } catch (Exception e) { |
| | | log.error("创建任务时发生异常:{}", e.getMessage()); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | private HollowGlassQueueInfo HollowBDetailToQueue(HollowBigStorageCageDetails details, Long taskId, int targetCell) { |
| | |
| | | .eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).last("limit 1")); |
| | | log.info("中空大理片直通台玻璃信息{}", details); |
| | | if (details != null && details.getGlassId().equals(unFinishHollowQueueList.get(0).getGlassId())) { |
| | | unFinishHollowQueueList.get(0).setSlot(THROUGH_SLOT); |
| | | log.info("将中空队列中的格子号替换为直通台{}", unFinishHollowQueueList); |
| | | if (details != null) { |
| | | unFinishHollowQueueList.stream().forEach(e -> { |
| | | if (e.getGlassId().equals(details.getGlassId())) { |
| | | e.setSlot(THROUGH_SLOT); |
| | | e.setDeviceId(0); |
| | | log.info("将中空队列中的格子号替换为直通台{}", e); |
| | | } |
| | | List<HollowGlassQueueInfo> infoList = unFinishHollowQueueList.stream().filter(e -> !(e.getSlot() > 500 && e.getIsPair() != 1)).collect(Collectors.toList()); |
| | | }); |
| | | } |
| | | |
| | | List<HollowGlassQueueInfo> infoList = unFinishHollowQueueList.stream().filter(e -> !(e.getSlot() > 500 && e.getSlot() < 900 && e.getIsPair() != 1)).collect(Collectors.toList()); |
| | | log.info("有正在出片的中空任务"); |
| | | Integer isPair = infoList.get(0).getIsPair(); |
| | | hollowOutGlassByIsPair(infoList, hollowGlassOutRelationInfo.getCell(), isPair, hollowGlassOutRelationInfo.getTotalLayer(), hollowGlassOutRelationInfo.getIsForce()); |
| | |
| | | int count = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT)); |
| | | log.info("直通片台的任务数量为:{}", count); |
| | | if (count > 0) { |
| | | return; |
| | | } |
| | | List<HollowBigStorageCageDetails> list = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .in(HollowBigStorageCageDetails::getDeviceId, 6) |
| | | // .in(HollowBigStorageCageDetails::getDeviceId, 6) |
| | | .in(HollowBigStorageCageDetails::getGlassId, glassIdList)); |
| | | log.info("获取调度任务列表:{}", list); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | return; |
| | | } |
| | | HollowBigStorageCageDetails details = list.get(0); |
| | | //todo:生成进进片大车任务 |
| | | log.info("获取需要调度的单条任务:{}", details); |
| | | //生成进进片大车任务 |
| | | hollowBigStorageCageDetailsService.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>() |
| | | .set(HollowBigStorageCageDetails::getState, Const.RAW_GLASS_STATE_OUT) |
| | | .eq(HollowBigStorageCageDetails::getGlassId, details.getGlassId())); |
| | |
| | | Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(list.get(0).getThickness()); |
| | | log.info("中空生成一车任务:{}", list); |
| | | for (T e : list) { |
| | | //格子为第五个笼子时不添加出片任务 |
| | | HollowBigStorageCage hollowBigStorageCage = hollowBigStorageCageService.getOne( |
| | | new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getSlot, e.getSlot()) |
| | | ); |
| | | |
| | | if (hollowBigStorageCage != null && hollowBigStorageCage.getDeviceId() == 6) { |
| | | break; |
| | | } |
| | | if (templist.size() >= outCarMaxSize || Math.max((int) e.getWidth(), (int) e.getHeight()) > remainWidth) { |
| | | break; |
| | | } |
| | |
| | | for (T t : baseInfoList) { |
| | | bigStorageCageTaskList.add(new BigStorageCageTask(t.getGlassId(), t.getSlot(), targetSlot, 0)); |
| | | } |
| | | |
| | | List<BigStorageCageTask> tasks = bigStorageCageTaskList.stream().filter(e -> e.getStartSlot() >= 500 && e.getStartSlot() < 900).collect(Collectors.toList()); |
| | | if (CollectionUtil.isNotEmpty(tasks)) { |
| | | log.info("当前出片队列存在新笼子的玻璃小片,结束本次任务:{}", tasks); |
| | | return false; |
| | | } |
| | | //清空任务表数据 |
| | | resetOutTask(); |
| | | log.info("生成出片任务数据{}", bigStorageCageTaskList); |
| | |
| | | |
| | | <select id="queryNeedInCarGlass" resultType="java.lang.String"> |
| | | WITH queue_temp AS ( |
| | | SELECT slot, |
| | | SELECT |
| | | slot, |
| | | glass_id, |
| | | LEAST(width, height) AS height, |
| | | relation_id, |
| | | is_pair, |
| | | ROW_NUMBER() OVER ( PARTITION BY cell ORDER BY hollow_sequence ) AS rn |
| | | FROM hollow_glass_queue_info |
| | | WHERE state = - 1 |
| | | FROM |
| | | hollow_glass_queue_info |
| | | WHERE |
| | | state = - 1 |
| | | ), |
| | | glass_id_temp AS (SELECT * FROM queue_temp WHERE rn = 1), |
| | | task_temp AS (SELECT * |
| | | FROM glass_id_temp t |
| | | task_temp AS ( |
| | | SELECT |
| | | t.* |
| | | FROM |
| | | queue_temp t |
| | | INNER JOIN hollow_glass_out_relation_info t1 ON t.relation_id = t1.id |
| | | WHERE t1.state = 1) |
| | | SELECT glass_id |
| | | FROM task_temp |
| | | WHERE |
| | | t1.state = 1 |
| | | and t.slot BETWEEN 500 and 900 |
| | | AND ( |
| | | t.is_pair = 1 |
| | | OR ( t.is_pair = 0 AND t1.is_force = 1 )) )SELECT |
| | | glass_id |
| | | FROM |
| | | task_temp |
| | | ORDER BY |
| | | rn |
| | | </select> |
| | | </mapper> |