| | |
| | | ></iframe> |
| | | </el-dialog> |
| | | <!-- 钢化查询 --> |
| | | <el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | | <el-dialog v-model="dialogFormVisiblec" top="5vh" width="90%" :title="$t('searchOrder.temperingqueries')"> |
| | | <div style="margin-bottom: 20px"> |
| | | <el-form> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | <el-table ref="table" style="margin-top: 20px;height: 600px;" |
| | | :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="engineerId" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/> |
| | | <el-table-column prop="engineerName" fixed align="center" :label="$t('large.productname')" min-width="150"/> |
| | | <el-table-column prop="thickness" align="center" :label="$t('basicData.thickness')" min-width="150" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="150" /> |
| | | <el-table-column prop="temperingLayoutId" align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" /> |
| | | <el-table-column prop="totalCount" align="center" :label="$t('searchOrder.allnumber')" min-width="150" /> |
| | | <el-table-column prop="realCount" align="center" :label="$t('searchOrder.numbercages')" min-width="150" /> |
| | | <el-table-column prop="lackCount" align="center" :label="$t('searchOrder.missingquantity')" min-width="150" /> |
| | | <el-table-column prop="damageCount" align="center" :label="$t('searchOrder.breakquantity')" min-width="150" /> |
| | | <el-table-column prop="engineerId" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="100"/> |
| | | <el-table-column prop="engineerName" fixed align="center" :label="$t('large.productname')" min-width="120"/> |
| | | <el-table-column prop="thickness" align="center" :label="$t('basicData.thickness')" min-width="100" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="100" /> |
| | | <el-table-column prop="temperingLayoutId" align="center" :label="$t('searchOrder.layoutnumber')" min-width="100" /> |
| | | <el-table-column prop="totalCount" align="center" :label="$t('searchOrder.allnumber')" min-width="100" /> |
| | | <el-table-column prop="realCount" align="center" :label="$t('searchOrder.numbercages')" min-width="100" /> |
| | | <el-table-column prop="lackCount" align="center" :label="$t('searchOrder.missingquantity')" min-width="100" /> |
| | | <el-table-column prop="damageCount" align="center" :label="$t('searchOrder.breakquantity')" min-width="120" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="500"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="brokee(scope.row,1)">{{ $t('searchOrder.specifytempering') }}</el-button> |
| | |
| | | <script setup> |
| | | import { onBeforeUnmount, onMounted, onUnmounted, ref, computed, nextTick, watch } from "vue"; |
| | | import { useRouter } from "vue-router" |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import dayjs from 'dayjs'; |
| | |
| | | </div> |
| | | <div style="width: 50%;"> |
| | | <div class="img-screen" alt="Screen"> |
| | | <div> |
| | | <!-- <div> |
| | | <el-button type="primary" style="top:40px;left:670px;position: absolute;" @click="exportToExcel()">{{ |
| | | $t('large.statistics') }}</el-button> |
| | | </div> |
| | | </div> --> |
| | | <!-- 钢化半透明色块 --> |
| | | <div |
| | | style="width: 80px;height: 40px;top: 315px;left: 130px;position: absolute;background-color: rgba(0, 0, 0, 0.5);color: white;font-size: 12px;z-index: 999;"> |
| | |
| | | state: 2 |
| | | }); |
| | | } |
| | | if(index == tableDatax.value.length - 1){ |
| | | tableData.push({ |
| | | firstTimestamp: item.secondTimestamp, |
| | | secondTimestamp: item.endTimestamp, |
| | | diffMinutes: item.diffMinutes, |
| | | startTimestamp: item.startTimestamp, |
| | | endTimestamp: item.endTimestamp, |
| | | state: 1 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | console.log(tableData); |
| | | |
| | | return tableData; |
| | | }; |
| | | |
| New file |
| | |
| | | package com.mes.order.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/11/25 8:35 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class InterlayerDTO { |
| | | |
| | | |
| | | /** |
| | | * 夹层第一层 |
| | | */ |
| | | private Integer prevSort; |
| | | |
| | | |
| | | /** |
| | | * 夹层第二层 |
| | | */ |
| | | private Integer nextSort; |
| | | } |
| | |
| | | package com.mes.order.mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.InterlayerDTO; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | |
| | | import java.util.List; |
| | |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId); |
| | | |
| | | List<ProcessCardReport> queryLackByERP(String flowCardId); |
| | | |
| | | /** |
| | | * 按照流程卡查询是否夹层及层号 |
| | | * @param flowCardId |
| | | * @return |
| | | */ |
| | | List<InterlayerDTO> queryInterlayerByERP(String flowCardId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.InterlayerDTO; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | |
| | | import java.util.List; |
| | |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId); |
| | | |
| | | List<ProcessCardReport> queryLackByERP(String flowCardId); |
| | | |
| | | List<InterlayerDTO> queryInterlayerByERP(String flowCardId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.InterlayerDTO; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | import com.mes.order.mapper.OrderdetailMapper; |
| | | import com.mes.order.mapper.OrdersMapper; |
| | |
| | | public List<ProcessCardReport> queryLackByERP(String flowCardId) { |
| | | return baseMapper.queryLackByERP(flowCardId); |
| | | } |
| | | @Override |
| | | public List<InterlayerDTO> queryInterlayerByERP(String flowCardId) { |
| | | return baseMapper.queryInterlayerByERP(flowCardId); |
| | | } |
| | | } |
| | |
| | | and a.process = "中空" |
| | | and (b.quantity - b.termination_quantity) > reporting_work_num |
| | | </select> |
| | | |
| | | |
| | | <select id="queryInterlayerByERP" resultType="com.mes.order.entity.dto.InterlayerDTO"> |
| | | WITH flow_order AS ( |
| | | SELECT ORDER_ID, ORDER_NUMBER |
| | | FROM pp.flow_card |
| | | WHERE process_id = #{flowCardId} |
| | | ORDER BY ORDER_NUMBER /* 添加适当的排序字段,确保结果确定性 */ |
| | | LIMIT 1 |
| | | ), |
| | | product_ids AS ( |
| | | SELECT od.PRODUCT_ID |
| | | FROM sd.order_detail od |
| | | inner JOIN flow_order fo ON od.ORDER_id = fo.ORDER_ID AND od.ORDER_NUMBER = fo.ORDER_NUMBER |
| | | ), |
| | | ranked AS ( |
| | | SELECT |
| | | detail_type, |
| | | LAG(glass_sort) OVER (PARTITION BY prod_id ORDER BY sort_num) AS prev_sort, |
| | | LEAD(glass_sort) OVER (PARTITION BY prod_id ORDER BY sort_num) AS next_sort |
| | | FROM sd.product_detail |
| | | WHERE prod_id IN (SELECT PRODUCT_ID FROM product_ids) |
| | | |
| | | ) |
| | | SELECT |
| | | prev_sort, |
| | | next_sort |
| | | FROM ranked |
| | | where detail_type = 'Interlayer' |
| | | </select> |
| | | </mapper> |
| | |
| | | return S7Serializer.newInstance(s7PLC); |
| | | } |
| | | |
| | | @Bean(name = "s7plcWZL") |
| | | public S7PLC s7plcWZL() { |
| | | return new S7PLC(EPlcType.S1200, "192.168.20.160"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.github.xingshuangs.iot.protocol.s7.serializer.S7Serializer; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.S7PLC; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | |
| | | @Autowired |
| | | @Qualifier("s7SerializerDLPTwo") |
| | | private S7Serializer s7SerializerDLPTwo; |
| | | @Autowired |
| | | @Qualifier("s7plcWZL") |
| | | private S7PLC s7plcWZL; |
| | | |
| | | @Resource |
| | | SysConfigService sysConfigService; |
| | |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); |
| | | if (count > 0) { |
| | | log.info("直通片台存在玻璃,结束本次进片"); |
| | | ProductAlarmInfo alarmInfo = new ProductAlarmInfo(); |
| | | alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW); |
| | | alarmInfo.setAlarmModule(ALARM_MODULE); |
| | | alarmInfo.setAlarmType(ALARM_TYPE); |
| | | alarmInfo.setAlarmCode(ALARM_CODE_OVER); |
| | | alarmInfo.setAlarmMessage(""); |
| | | productAlarmInfoService.save(alarmInfo); |
| | | // ProductAlarmInfo alarmInfo = new ProductAlarmInfo(); |
| | | // alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW); |
| | | // alarmInfo.setAlarmModule(ALARM_MODULE); |
| | | // alarmInfo.setAlarmType(ALARM_TYPE); |
| | | // alarmInfo.setAlarmCode(ALARM_CODE_OVER); |
| | | // alarmInfo.setAlarmMessage(""); |
| | | // productAlarmInfoService.save(alarmInfo); |
| | | //向plc发送报警:直通片台存在玻璃,无法继续直通 |
| | | // miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 64)); |
| | | s7DataDLPOne = new S7DataDLPOne(); |
| | |
| | | String requestEntity = s7DataWLTwo.getRequestMes().toString(); |
| | | if (!"1".equals(requestEntity)) { |
| | | log.info("当前未收到出片请求,结束出片任务"); |
| | | return; |
| | | } |
| | | int outRequest = s7plcWZL.readUInt16("DB51.8"); |
| | | if (outRequest == 0){ |
| | | log.info("当前未收到卧转立允许出片请求,结束出片任务"); |
| | | return; |
| | | } |
| | | //获取出片任务表 |
| | |
| | | // if (!THROUGH_SLOT.equals(list.get(0).getSlot())) { |
| | | // 临时解决方案:出片时考虑玻璃碰撞,改为一片一出 |
| | | // 界面关闭调度开关 !Const.BIG_STORAGE_BEFORE_DISPATCH.equals(taskType) |
| | | if (list.get(0).getSlot() >= 500 && list.get(0).getThickness() > 8) { |
| | | if (list.get(0).getSlot() >= 500 && list.get(0).getThickness() > 7) { |
| | | outGlassList = list.subList(0, 1); |
| | | } else { |
| | | List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId( |
| | |
| | | log.info("从PP表查询engineering的数据并保存到表里"); |
| | | List<Engineering> listEngineering = engineeringService.selectEngineering(engineering.getEngineerId()); |
| | | engineeringService.saveEngineering(listEngineering); |
| | | log.info("更改pp表状态为已领取"); |
| | | //将engineering表状态为正在上片 |
| | | boolean work = engineeringService.changeTasks(engineering); |
| | | optimizeProjectService.changeTask(engineering.getEngineerId(), 200); |
| | | log.info("更改pp表状态为已领取"); |
| | | if (work) { |
| | | return Result.build(200, "保存成功" + engineering.getEngineerId(), true); |
| | | } else { |
| | |
| | | |
| | | List<BigStorageSequenceDTO> queryNeedDispatchSlot(FlowCardVirtualSlotDTO flowCardVirtualSlotDTO); |
| | | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(@Param("flowCardId") String flowCardId, @Param("cell") int cell); |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(@Param("flowCardId") String flowCardId, @Param("cell") int cell, @Param("list") List<Integer> layerList); |
| | | |
| | | List<BigStorageVO> queryHollowbigStorageCageDetail(); |
| | | |
| | |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.*; |
| | | import com.mes.hollow.entity.request.HollowBigCageDetailsRequest; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigCageDetailsVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | |
| | |
| | | |
| | | List<BigStorageSequenceDTO> queryNeedDispatchSlot(FlowCardVirtualSlotDTO flowCardVirtualSlotDTO); |
| | | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell); |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell, List<Integer> layerList); |
| | | |
| | | Map<Integer, List<BigStorageVO>> queryHollowbigStorageCageDetail(); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell) { |
| | | return baseMapper.queryOutGlassList(flowCardId, cell); |
| | | public List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell, List<Integer> layerList) { |
| | | return baseMapper.queryOutGlassList(flowCardId, cell, layerList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import com.mes.order.entity.HollowOrderDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.entity.dto.InterlayerDTO; |
| | | import com.mes.order.service.OrdersService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import com.mes.tools.DateUtil; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | |
| | | } |
| | | |
| | | 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) { |
| | |
| | | info.setFormulaId(request.getFormulaId()); |
| | | this.save(info); |
| | | // 查询出需要出玻璃的队列 |
| | | List<Integer> layerList = new ArrayList<>(); |
| | | int isPairCount = 0; |
| | | if (932 == request.getCell()) { |
| | | List<InterlayerDTO> interlayerList = ordersService.queryInterlayerByERP(request.getFlowCardId()); |
| | | if (CollectionUtil.isNotEmpty(interlayerList)) { |
| | | List<Integer> tempList = new ArrayList<>(); |
| | | for (InterlayerDTO dto : interlayerList) { |
| | | tempList.add(dto.getPrevSort()); |
| | | tempList.add(dto.getNextSort()); |
| | | } |
| | | layerList = tempList.stream().distinct().collect(Collectors.toList()); |
| | | isPairCount = layerList.size() * request.getTotalPairQuantity(); |
| | | }else{ |
| | | isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | } |
| | | } else { |
| | | isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | } |
| | | List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService |
| | | .queryOutGlassList(request.getFlowCardId(), request.getCell()); |
| | | int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity(); |
| | | .queryOutGlassList(request.getFlowCardId(), request.getCell(), layerList); |
| | | List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>(); |
| | | Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH); |
| | | Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness()); |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://127.0.0.1:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | on t.flow_card_id = t1.flow_card_id and t.hollow_sequence = t1.hollow_sequence |
| | | where t.state = 100 |
| | | and t.flow_card_id = #{flowCardId} |
| | | <if test="list != null and list.size() > 0"> |
| | | and t.layer in ( |
| | | <foreach collection="list" item="item" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | ) |
| | | select * |
| | | from result_detail |
| | |
| | | <select id="queryHollowbigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO"> |
| | | select hbsc.device_id, hbsc.slot, count(hbscd.glass_id) as count |
| | | from hollow_big_storage_cage hbsc |
| | | left join hollow_big_storage_cage_details hbscd |
| | | on hbsc.slot = hbscd.slot and hbscd.state in (100, 102, 103, 104) |
| | | left join hollow_big_storage_cage_details hbscd |
| | | on hbsc.slot = hbscd.slot and hbscd.state in (100, 102, 103, 104) |
| | | group by hbsc.device_id, hbsc.slot |
| | | order by hbsc.device_id, hbsc.slot |
| | | </select> |