| | |
| | | tid:'设备id', |
| | | tida:'设备id:', |
| | | fin:'是否完成任务?', |
| | | sureadd:'确认添加', |
| | | sureadda:'是否确认添加?', |
| | | zailong:'在笼中', |
| | | rengongxp:'人工下片', |
| | | up:'上一页', |
| | | down:'下一页', |
| | | now:'当前页显示', |
| | | tit:'条数据', |
| | | temperingqueries:'钢化查询', |
| | | specifytempering:'指定一炉', |
| | | specifyengineerid:'指定工程', |
| | | projectnumber:'工程号', |
| | | layoutnumber:'钢化版图号', |
| | | numberglasses:'玻璃数量', |
| | | specifytemperinga:'是否指定钢化该条信息?', |
| | | temperedswitch:'钢化开关', |
| | | dutyinformation:'值班信息', |
| | | process:'工序', |
| | | team:'班组', |
| | | basic:'设备', |
| | | sureadd: '确认添加', |
| | | sureadda: '是否确认添加?', |
| | | zailong: '在笼中', |
| | | rengongxp: '人工下片', |
| | | up: '上一页', |
| | | down: '下一页', |
| | | now: '当前页显示', |
| | | tit: '条数据', |
| | | temperingqueries: '钢化查询', |
| | | specifytempering: '指定一炉', |
| | | specifyout: '指定人工出片', |
| | | specifyengineerid: '指定工程', |
| | | projectnumber: '工程号', |
| | | layoutnumber: '钢化版图号', |
| | | numberglasses: '玻璃数量', |
| | | specifytemperinga: '是否指定钢化该条信息?', |
| | | temperedswitch: '钢化开关', |
| | | dutyinformation: '值班信息', |
| | | process: '工序', |
| | | team: '班组', |
| | | basic: '设备', |
| | | makesure:'确认保存', |
| | | // cancel:'取消', |
| | | temperingtotal:'钢化炉数:', |
| | |
| | | <script lang="ts" setup> |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { tr } from "element-plus/es/locale"; |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {computed, onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const router = useRouter() |
| | | const dialogFormVisible = ref(false) |
| | | const dialoglea = ref(false) |
| | | const dialogFormVisiblea = ref(false) |
| | |
| | | } |
| | | }; |
| | | // 指定钢化 |
| | | const brokee = async(row) => { |
| | | const brokee = async (row, temperingFeedSequence) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.specifytemperinga'), |
| | | t('searchOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('searchOrder.yes'), |
| | | cancelButtonText: t('searchOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.specifytemperinga'), |
| | | t('searchOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('searchOrder.yes'), |
| | | cancelButtonText: t('searchOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{ |
| | | engineerId: row.engineer_id, |
| | | temperingLayoutId: row.tempering_layout_id, |
| | | temperingFeedSequence: temperingFeedSequence |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | } |
| | | handleganghua(); |
| | | }; |
| | | // 指定工程 |
| | | const brokek = async(row) => { |
| | |
| | | <el-table-column prop="count4" align="center" :label="$t('破损/拿走数量')" min-width="150" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokek(scope.row)">{{ $t('searchOrder.specifyengineerid') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row,1)"> |
| | | {{ $t('searchOrder.specifytempering') }} |
| | | </el-button> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row,0)">{{ |
| | | $t('searchOrder.specifyout') |
| | | }} |
| | | </el-button> |
| | | <el-button size="mini" type="text" plain @click="brokek(scope.row)">{{ |
| | | $t('searchOrder.specifyengineerid') |
| | | }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {ElMessage} from "element-plus" |
| | | import {onMounted, ref} from "vue" |
| | | // import {useRouter} from 'vue-router' |
| | | // import {changeFilterEvent, filterChanged} from "@/hook" |
| | | // import {useI18n} from 'vue-i18n' |
| | |
| | | let props = defineProps({ |
| | | printFlowCardId: null, |
| | | printLayer: null, |
| | | printGlassId: null, |
| | | }) |
| | | |
| | | onMounted(async () => { |
| | | console.log(props.printFlowCardId,props.printLayer) |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint',{ |
| | | flowCardId:props.printFlowCardId, |
| | | layer:props.printLayer |
| | | }); |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint', { |
| | | flowCardId: props.printFlowCardId, |
| | | layer: props.printLayer, |
| | | glassId: props.printGlassId |
| | | }); |
| | | if (response.code == 200) { |
| | | console.log("lastList.value",response.data) |
| | | lastList.value=response.data; |
| | |
| | | <script setup> |
| | | import { onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from "vue"; |
| | | import { useRouter } from "vue-router" |
| | | import { useI18n } from 'vue-i18n' |
| | | import { ElMessage } from 'element-plus' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import {useI18n} from 'vue-i18n' |
| | | import {ElMessage} from 'element-plus' |
| | | import request from "@/utils/request"; |
| | | import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | | import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue"; |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | |
| | | const router = useRouter() |
| | | const { t } = useI18n() |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const printLoading = ref(true) |
| | | const fullFlowCard = ref('') |
| | |
| | | const dialogTableVisible1 = ref(false) |
| | | const printFlowCardId = ref('') |
| | | const printLayer = ref('') |
| | | const printGlassId = ref('') |
| | | const now = new Date(); |
| | | const timeRange = ref([]) |
| | | const browser = ref(false) |
| | |
| | | scanGlass.value.width = height; |
| | | scanGlass.value.height = width; |
| | | } |
| | | if (autoPrint.value == true && browser.value == true) { |
| | | open1(scanGlass); |
| | | } |
| | | } |
| | | |
| | | //自动打印 |
| | |
| | | |
| | | printFlowCardId.value = row.flowCardId; |
| | | printLayer.value = row.layer |
| | | printGlassId.value = row.glassId |
| | | dialogTableVisible1.value = true; |
| | | setTimeout(() => { |
| | | printFlowCard1(); |
| | |
| | | </div> |
| | | <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:170px;"> |
| | | <div>人工下片当前玻璃信息</div> |
| | | <div> |
| | | <el-button type="primary" @click="open1(takeGlass)">打印标签</el-button> |
| | | </div> |
| | | <div>{{ takeGlass.flowCardId }}</div> |
| | | <div>{{ takeGlass.layer }}</div> |
| | | <div>{{ takeGlass.glassId }}</div> |
| | |
| | | </div> |
| | | <div style="font-size: 50px; text-align: center;position: absolute;top:0px;left:200px;"> |
| | | <div>扫码枪当前玻璃信息</div> |
| | | <div> |
| | | <el-button type="primary" @click="open1(scanGlass)">打印标签</el-button> |
| | | </div> |
| | | <div>{{ scanGlass.flowCardId }}</div> |
| | | <div>{{ scanGlass.layer }}</div> |
| | | <div>{{ scanGlass.glassId }}</div> |
| | |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close> |
| | | <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" style="" /> |
| | | <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" |
| | | :printGlassId="printGlassId" style=""/> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | |
| | | on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number |
| | | where fc.process_id = #{processId} |
| | | <if test="technologyNumber != 0"> |
| | | and a.layer = #{technologyNumber} |
| | | and fc.technology_number = #{technologyNumber} |
| | | </if> |
| | | <if test="technologyNumber != 0"> |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | |
| | | @Value("${mes.max.secondLength}") |
| | | private String secondLength; |
| | | |
| | | @Value("${mes.cache.cacheWidth}") |
| | | private double cacheWidth; |
| | | |
| | | @Value("${mes.cache.cacheHeight}") |
| | | private double cacheHeight; |
| | | |
| | | @Value("${mes.min.one.firstLength}") |
| | | private String minOneFirstLength; |
| | | |
| | |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(e.getGlassId()); |
| | | damage.setLine(e.getEndCell()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setWorkingProcedure("磨边"); |
| | | damage.setRemark("磨边前卧式理片"); |
| | | damage.setStatus(0); |
| | | damage.setStatus(1); |
| | | damage.setType(e.getTaskStatus()); |
| | | return damage; |
| | | }).collect(Collectors.toList()); |
| | |
| | | */ |
| | | public void inTo(String glassId, String confirmationWrodAddress, String currentSlot) { |
| | | log.info("1、按照玻璃id:{}获取玻璃小片信息,当前格子为:{}", glassId, currentSlot); |
| | | |
| | | GlassInfo feedGlassInfo = glassInfoService.getOne( |
| | | new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId) |
| | | ); |
| | | if (Math.max(feedGlassInfo.getWidth(), feedGlassInfo.getHeight()) > cacheWidth || Math.min(feedGlassInfo.getWidth(), feedGlassInfo.getHeight()) > cacheHeight) { |
| | | log.info("1.1、玻璃超过卧式理片最大尺寸:{}", feedGlassInfo); |
| | | return; |
| | | } |
| | | |
| | | //添加进片任务 查找空格 |
| | | EdgStorageCage nearestEmpty = edgStorageCageService.selectNearestEmpty(Integer.parseInt(currentSlot), Boolean.FALSE); |
| | | Assert.isTrue(null != nearestEmpty, "格子已满"); |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: cz |
| | | application: |
| | | name: cacheGlass |
| | | liquibase: |
| | |
| | | mes: |
| | | threshold: 3 |
| | | ratio: 10 |
| | | cache: # 卧式理片最大尺寸 |
| | | cacheWidth: 4000 |
| | | cacheHeight:3000 |
| | | max: # 第二条线的最大尺寸信息 |
| | | firstLength: 3500 |
| | | secondLength: 2500 |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | |
| | | @ApiOperation("指定钢化") |
| | | @PostMapping("/TemperingGlass") |
| | | public Result temperingGlass(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | boolean result = bigStorageCageDetailsService.temperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(), bigStorageCageDetails.getEngineerId()); |
| | | boolean result = bigStorageCageDetailsService |
| | | .temperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(), bigStorageCageDetails.getEngineerId(), bigStorageCageDetails.getTemperingFeedSequence().toString()); |
| | | if (result == true) { |
| | | return Result.build(200, "指定钢化成功", 1); |
| | | } else { |
| | |
| | | */ |
| | | List<SlotSequenceDTO> queryGlassMaxAndMin(String engineerId, Integer temperingLayoutId); |
| | | |
| | | boolean temperingGlass(String temperingLayoutId, String engineerId); |
| | | boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence); |
| | | |
| | | List<Map<String, Object>> selectTemperingGlass(); |
| | | |
| | |
| | | |
| | | import cn.hutool.core.lang.Assert; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | |
| | | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | @Resource |
| | | private PlcStorageCageTask plcStorageCageTask; |
| | | |
| | | @Resource |
| | | private DamageService damageService; |
| | |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getGlassId, glassId) |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN); |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN); |
| | | BigStorageCageDetails bigStorageCageDetails = baseMapper.selectOne(bigStorageCageDetailsWrapper); |
| | | |
| | | if (temperingGlassInfo != null) { |
| | |
| | | @Override |
| | | public List<BigStorageCageDetails> selectBigStorageCageDetails(String glassId) { |
| | | LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>(); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList=new ArrayList<>(); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId, glassId); |
| | | GlassInfo glassInfo = glassInfoMapper.selectOne(glassInfoWrapper); |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | |
| | | .gt(BigStorageCage::getRemainWidth, Math.max(glassInfo.getWidth(), glassInfo.getHeight())) |
| | | .last("limit 1"); |
| | | if (glassInfo.getTemperingLayoutId() == 0) { |
| | | wrapper.eq(BigStorageCageDetails::getFlowCardId,glassInfo.getFlowCardId()) |
| | | .eq(BigStorageCageDetails::getLayer,glassInfo.getLayer()); |
| | | wrapper.eq(BigStorageCageDetails::getFlowCardId, glassInfo.getFlowCardId()) |
| | | .eq(BigStorageCageDetails::getLayer, glassInfo.getLayer()); |
| | | // wrapper.eq(BigStorageCageDetails::getWidth, glassInfo.getWidth()).eq(BigStorageCageDetails::getHeight, glassInfo.getHeight()); |
| | | } else { |
| | | wrapper.eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean temperingGlass(String temperingLayoutId, String engineerId) { |
| | | public boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence) { |
| | | LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | temperingGlassInfoLambdaQueryWrapper |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW); |
| | |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence)); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | if ("0".equals(temperingFeedSequence)) { |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | plcStorageCageTask.computeOutMoreGlassInfo(temperingGlassInfos, Boolean.FALSE, ""); |
| | | } |
| | | } else { |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void appointEngineerId(String engineerId){ |
| | | public void appointEngineerId(String engineerId) { |
| | | redisUtil.setCacheObject("temperingengineerId", engineerId); |
| | | } |
| | | } |
| | |
| | | List<BigStorageCageOutTask> outSuccessGlass = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .in(BigStorageCageOutTask::getGlassId, glassIds).in(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_ALL)); |
| | | if (CollectionUtils.isNotEmpty(outSuccessGlass)) { |
| | | for (BigStorageCageOutTask bigStorageCageOutTask:outSuccessGlass |
| | | ) { |
| | | if(bigStorageCageOutTask.getEndSlot().equals(Const.ARTIFICIAL_OUT_TARGET_POSITION)){ |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : outSuccessGlass |
| | | ) { |
| | | if (bigStorageCageOutTask.getEndSlot().equals(Const.ARTIFICIAL_OUT_TARGET_POSITION)) { |
| | | temperingGlassInfoService.update( |
| | | new LambdaUpdateWrapper<TemperingGlassInfo>() |
| | | .set(TemperingGlassInfo::getState,Const.TEMPERING_END) |
| | | .eq(TemperingGlassInfo::getGlassId,bigStorageCageOutTask.getGlassId()) |
| | | .set(TemperingGlassInfo::getState, Const.TEMPERING_END) |
| | | .eq(TemperingGlassInfo::getGlassId, bigStorageCageOutTask.getGlassId()) |
| | | ); |
| | | } |
| | | } |
| | |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageFeedTask.getGlassId()); |
| | | damage.setLine(bigStorageCageFeedTask.getLine()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setWorkingProcedure("磨边"); |
| | | damage.setRemark("进笼前卧转立"); |
| | | damage.setStatus(0); |
| | | damage.setStatus(1); |
| | | damage.setType(bigStorageCageFeedTask.getTaskState()); |
| | | damageService.insertDamage(damage); |
| | | slotList.add(bigStorageCageFeedTask.getTargetSlot()); |
| | |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageOutTask.getGlassId()); |
| | | damage.setLine(bigStorageCageOutTask.getEndSlot()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setWorkingProcedure("钢化"); |
| | | damage.setRemark("出片后卧转立"); |
| | | damage.setStatus(0); |
| | | damage.setStatus(1); |
| | | damage.setType(bigStorageCageOutTask.getTaskState()); |
| | | damageService.insertDamage(damage); |
| | | slotList.add(bigStorageCageOutTask.getStartSlot()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 确认字清空 |
| | | */ |
| | | // @Scheduled(fixedDelay = 300) |
| | | // public void confirmClear() { |
| | | // PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | // String d01ToMES = plcParameterObject.getPlcParameter("D01ToMES").getValue(); |
| | | // String d04ToMES = plcParameterObject.getPlcParameter("D04ToMES").getValue(); |
| | | // String mesD01Address = plcParameterObject.getPlcParameter("MESToD01").getAddress(); |
| | | // String mesD04Address = plcParameterObject.getPlcParameter("MESToD04").getAddress(); |
| | | // String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); |
| | | // String d05ToMES = plcParameterObject.getPlcParameter("D05ToMES").getValue(); |
| | | // String mesD03Address = plcParameterObject.getPlcParameter("MESToD03").getAddress(); |
| | | // String mesD05Address = plcParameterObject.getPlcParameter("MESToD05").getAddress(); |
| | | // if(!REQUEST_WORD.equals(d01ToMES)){ |
| | | // S7object.getinstance().plccontrol.writeWord(mesD01Address, 0); |
| | | // } |
| | | // if(!REQUEST_WORD.equals(d04ToMES)){ |
| | | // S7object.getinstance().plccontrol.writeWord(mesD04Address, 0); |
| | | // } |
| | | // if (!REQUEST_WORD.equals(d03ToMES)) { |
| | | // S7object.getinstance().plccontrol.writeWord(mesD03Address, 0); |
| | | // } |
| | | // if (!REQUEST_WORD.equals(d05ToMES)) { |
| | | // S7object.getinstance().plccontrol.writeWord(mesD05Address, 0); |
| | | // } |
| | | // } |
| | | /** |
| | | * 进片状态修改 |
| | | */ |
| | | // @Scheduled(fixedDelay = 300) |
| | | // public void feedStatusUpdate() { |
| | | // List<String> glassIds1=null; |
| | | // List<String> glassIds2=null; |
| | | // List<BigStorageCageFeedTask> bigStorageCageFeedTasks1=bigStorageCageFeedTaskService.list( |
| | | // new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | // .eq(BigStorageCageFeedTask::getTaskState,1) |
| | | // .eq(BigStorageCageFeedTask::getLine,Const.ARTIFICIAL_OUT_TARGET_POSITION) |
| | | // ); |
| | | // List<BigStorageCageFeedTask> bigStorageCageFeedTasks2=bigStorageCageFeedTaskService.list( |
| | | // new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | // .eq(BigStorageCageFeedTask::getTaskState,1) |
| | | // .eq(BigStorageCageFeedTask::getLine,Const.TEMPERING_OUT_TARGET_POSITION) |
| | | // ); |
| | | //// if(CollectionUtils.isNotEmpty(bigStorageCageFeedTasks1)){ |
| | | //// |
| | | //// } |
| | | //// if(CollectionUtils.isNotEmpty(bigStorageCageFeedTasks1)){ |
| | | //// |
| | | //// } |
| | | // } |
| | | |
| | | /** |
| | | * 按照玻璃id判断玻璃状态及卧转立是否可直接启动 |
| | | */ |
| | | public Boolean judgeGlassTypeStatus(String glassId, Integer line, String mesAddress) { |
| | |
| | | .eq(EdgGlassTaskInfo::getLine, line) |
| | | .apply("time >= (select time from edg_glass_task_info where line='" + line + "' and glass_id = '" + glassId + "' and deleted = 0)") |
| | | .orderByAsc(EdgGlassTaskInfo::getTime)); |
| | | if (edgGlassTaskInfoList == null) { |
| | | log.info("线路:{}识别玻璃信息未出现在尺寸表中,获取相邻两块玻璃失败", line); |
| | | } else { |
| | | if (edgGlassTaskInfoList.size() == 0) { |
| | | edgGlassTaskInfoList = edgGlassTaskInfoService.list(new QueryWrapper<EdgGlassTaskInfo>() |
| | | .select("Top 1 *") |
| | | .eq("glass_id", glassId) |
| | | ); |
| | | log.info("在尺寸表中获取玻璃信息{}", edgGlassTaskInfoList); |
| | | if (edgGlassTaskInfoList.size() == 0) { |
| | | GlassInfo glassInfo = glassInfoService.getOne( |
| | | new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, glassId) |
| | | ); |
| | | EdgGlassTaskInfo edgGlassTaskInfo = new EdgGlassTaskInfo(); |
| | | BeanUtils.copyProperties(glassInfo, edgGlassTaskInfo); |
| | | edgGlassTaskInfo.setWidth((int) glassInfo.getWidth()); |
| | | edgGlassTaskInfo.setHeight((int) glassInfo.getHeight()); |
| | | edgGlassTaskInfoList.add(edgGlassTaskInfo); |
| | | log.info("在玻璃信息表中获取玻璃信息{}", edgGlassTaskInfoList); |
| | | } |
| | | } |
| | | Assert.isFalse(CollectionUtils.isEmpty(edgGlassTaskInfoList), "识别玻璃信息未出现在尺寸表中,获取相邻两块玻璃失败"); |
| | | //2、获取卧转立剩余宽度 |
| | |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | private <T extends BigStorageCageBaseInfo> Boolean computeOutMoreGlassInfo(List<T> list, Boolean isTempering, String mesToPLCAddress) { |
| | | public <T extends BigStorageCageBaseInfo> Boolean computeOutMoreGlassInfo(List<T> list, Boolean isTempering, String mesToPLCAddress) { |
| | | //任务数据 获取车子存放玻璃最大数量 玻璃间隔 |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList = new ArrayList<>(); |
| | | //打车剩余尺寸 |
| | |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import com.mes.pp.entity.ReportingWork; |
| | | import com.mes.pp.entity.ReportingWorkDetail; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | |
| | | import java.net.URL; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | Damage damage=new Damage(); |
| | | damage.setGlassId("P24060403|3|6"); |
| | | damage.setLine(2001); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setWorkingProcedure("磨边"); |
| | | damage.setRemark(""); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | |
| | | damage.setLine(Const.TEMPERING_OUT_TARGET_POSITION); |
| | | damage.setWorkingProcedure("钢化"); |
| | | damage.setRemark("钢化"); |
| | | damage.setStatus(0); |
| | | damage.setStatus(1); |
| | | damage.setType(e.getState()); |
| | | return damage; |
| | | }).collect(Collectors.toList()); |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.mes.downworkstation.entity.dto.DownGlassInfoDTO; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.job.DownLoadCacheGlassTask; |
| | | import com.mes.pp.service.FlowCardService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | @Autowired |
| | | GlassInfoService glassInfoService; |
| | | |
| | | /** |
| | | * 根据流程卡号查询最大序号 |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo) { |
| | | |
| | | List<Map<String, Object>> resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | List<Map<String, Object>> resultList = null; |
| | | if (downGlassInfo.getGlassId() != null) { |
| | | resultList = glassInfoService.listMaps( |
| | | new LambdaQueryWrapper<GlassInfo>() |
| | | .eq(GlassInfo::getGlassId, downGlassInfo.getGlassId()) |
| | | ); |
| | | } else { |
| | | resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | } |
| | | log.info("MES落架数据:{}", resultList); |
| | | //获取ERP标签所需的信息 |
| | | List<Map<String, Object>> labelInfo; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | String confirmationWrodValue = plcParameterObject.getPlcParameter("confirmationWord").getValue(); |
| | | String confirmationWrodAddress = plcParameterObject.getPlcParameter("confirmationWord").getAddress(); |
| | | String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue(); |
| | | |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}", |
| | | requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot); |
| | |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(e.getGlassId()); |
| | | damage.setLine(Const.TEMPERING_OUT_TARGET_POSITION); |
| | | damage.setWorkingProcedure("下片"); |
| | | damage.setWorkingProcedure("钢化"); |
| | | damage.setRemark("下片"); |
| | | damage.setStatus(0); |
| | | damage.setStatus(1); |
| | | damage.setType(e.getTaskStatus()); |
| | | return damage; |
| | | }).collect(Collectors.toList()); |