Merge remote-tracking branch 'origin/master'
| | |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | const dialogFormVisiblec = ref(false) |
| | | const dialogFormVisibles = ref(false) |
| | | const tableData = ref([]) |
| | | const tableDatagh = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const tableDataf = ref([]) |
| | | const tableDatae = ref([]) |
| | | const tableDatax = ref([]) |
| | | const tableDatas = ref([]) |
| | | const carPosition = ref([]) |
| | | const ganghua = ref('') |
| | | const adjustedRects = ref([]); |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 指定流程卡 |
| | | const brokes = async(row) => { |
| | | try { |
| | | 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/appointFlowCard",{ |
| | | flowCardId: row.flow_card_id, |
| | | layer: row.layer, |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 出片队列拿走 |
| | | const brokeb = async(row) => { |
| | | try { |
| | |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | |
| | | |
| | | }); |
| | | const fetchFlows = async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache'); |
| | | if (response.code === 200) { |
| | | tableDatas.value = response.data |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | } |
| | | |
| | | |
| | | const fetchFlow = async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass') |
| | |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">非钢化流程卡查询</el-button> |
| | | <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" /> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/> |
| | | <el-table-column prop="layer" align="center" label="层" /> |
| | | <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" > |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokes(scope.row)">指定流程卡</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </template> |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | List<DamagePrint> selectDamagePrint(Damage damage); |
| | | |
| | | List<DamagePrint> selectDamagePrintDetails(Damage damage); |
| | | |
| | | void deleteByGlassId(String glassId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.entity.DamagePrint; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | |
| | | } |
| | | this.saveBatch(damageList); |
| | | } |
| | | |
| | | /** |
| | | * 拿走打印数据查询 |
| | | */ |
| | | @Override |
| | | public List<DamagePrint> selectDamagePrint(Damage damage) { |
| | | MPJQueryWrapper<Damage> listDamage=new MPJQueryWrapper<Damage>() |
| | | MPJQueryWrapper<Damage> listDamage = new MPJQueryWrapper<Damage>() |
| | | .select("t.engineer_id,t.glass_id,b.tempering_layout_id,b.tempering_feed_sequence,b.width,b.height,b.thickness") |
| | | .leftJoin("glass_info as b on t.glass_id=b.glass_id") |
| | | .eq("t.working_procedure",damage.getWorkingProcedure()) |
| | | .eq("t.type",damage.getType()); |
| | | .eq("t.working_procedure", damage.getWorkingProcedure()) |
| | | .eq("t.type", damage.getType()); |
| | | // 动态添加条件,当 id 有值时 |
| | | if (damage.getEngineerId() != null) { |
| | | listDamage.eq("t.engineer_id", damage.getEngineerId()); |
| | | } |
| | | return damageMapper.selectJoinList(DamagePrint.class,listDamage); |
| | | return damageMapper.selectJoinList(DamagePrint.class, listDamage); |
| | | } |
| | | |
| | | /** |
| | | * 拿走打印打印详情查询 |
| | | */ |
| | | @Override |
| | | public List<DamagePrint> selectDamagePrintDetails(Damage damage) { |
| | | List<DamagePrint> listDamage=damageMapper.selectJoinList(DamagePrint.class,new MPJQueryWrapper<Damage>() |
| | | List<DamagePrint> listDamage = damageMapper.selectJoinList(DamagePrint.class, new MPJQueryWrapper<Damage>() |
| | | .select("b.flow_card_id,b.layer,t.engineer_id,b.tempering_layout_id,b.tempering_feed_sequence,t.glass_id,b.width,b.height,b.thickness") |
| | | .leftJoin("glass_info as b on t.glass_id=b.glass_id") |
| | | .eq("t.working_procedure",damage.getWorkingProcedure()) |
| | | .eq("t.type",damage.getType()) |
| | | .eq("t.engineer_id",damage.getEngineerId()) |
| | | .eq("t.working_procedure", damage.getWorkingProcedure()) |
| | | .eq("t.type", damage.getType()) |
| | | .eq("t.engineer_id", damage.getEngineerId()) |
| | | ); |
| | | return listDamage; |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByGlassId(String glassId) { |
| | | baseMapper.delete( |
| | | new LambdaQueryWrapper<Damage>() |
| | | .eq(Damage::getGlassId, glassId) |
| | | .in(Damage::getType, Const.GLASS_STATE_DAMAGE, Const.GLASS_STATE_TAKE) |
| | | ); |
| | | } |
| | | } |
| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | 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; |
| | |
| | | return Result.build(200, "查询成功", flowCardIdCount); |
| | | } |
| | | |
| | | @ApiOperation("指定流程卡") |
| | | @PostMapping("/appointFlowCard") |
| | | public Result appointFlowCard(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList=bigStorageCageDetailsService.list( |
| | | new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL) |
| | | ); |
| | | if(bigStorageCageDetailsList.size()==0){ |
| | | bigStorageCageDetailsService.update( |
| | | new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL) |
| | | .eq(BigStorageCageDetails::getFlowCardId,bigStorageCageDetails.getFlowCardId()) |
| | | .eq(BigStorageCageDetails::getLayer,bigStorageCageDetails.getLayer()) |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN) |
| | | ); |
| | | return Result.build(200, "指定流程卡成功", 1); |
| | | }else{ |
| | | return Result.build(200, "指定流程卡成功", 1); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | * 工程号 |
| | | */ |
| | | @ApiModelProperty(value = "层", position = 17) |
| | | private String layer; |
| | | private int layer; |
| | | |
| | | /** |
| | | * 进片任务 |
| | |
| | | public void plcToHomeEdgFreeCarTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼空车进片任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getValue(); |
| | | String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getValue(); |
| | | log.info("MESToD03:{},MESToD05:{}",mesD03Address,mesD05Address); |
| | | if("2".equals(mesD03Address)||"2".equals(mesD05Address)){ |
| | | log.info("有启动信号,MESToD03:{},MESToD05:{}",mesD03Address,mesD05Address); |
| | | } |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String e01Status = plcParameterObject.getPlcParameter("E01State").getValue(); |
| | | String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); |
| | |
| | | bigStorageCageFeedTask.setWidth(width); |
| | | bigStorageCageFeedTask.setHeight(height); |
| | | bigStorageCageFeedTask.setCreateTime(new Date()); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassId); |
| | | return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask); |
| | | } |
| | | |
| | |
| | | // String remarks = (String) row1.get("remarks"); |
| | | // BigDecimal height = (BigDecimal) row1.get("height"); |
| | | if (order_number == glass_type && technology_number == layer) { |
| | | quantity1+=1; |
| | | quantity1 += 1; |
| | | // row.put("quantity", quantity); |
| | | // row.put("order_number", order_number); |
| | | // row.put("technology_number", technology_number); |
| | |
| | | @ApiOperation("新增虚拟工位") |
| | | @PostMapping("/insertDownWorkstation") |
| | | public Result insertDownWorkstation() { |
| | | DownWorkstation downWorkstation = new DownWorkstation(); |
| | | downWorkstation.setTotalQuantity(0); |
| | | downWorkstation.setRacksNumber(0); |
| | | downWorkstation.setOtherNumber(0); |
| | | downWorkstation.setDeviceId(3); |
| | | downWorkstation.setEnableState(1); |
| | | downWorkstation.setWorkState(1); |
| | | downWorkstationService.save(downWorkstation); |
| | | downWorkstationService.insertDownWorkstation(); |
| | | return Result.build(200, "新增成功", 1); |
| | | } |
| | | |
| | |
| | | String closeAlarmSignal(); |
| | | |
| | | void autoPrint(Boolean flag); |
| | | |
| | | void insertDownWorkstation(); |
| | | } |
| | |
| | | .set("layer", layer) |
| | | .set("other_number", otherNumber) |
| | | .eq("workstation_id", workstationId); |
| | | // .eq("id", workstationId); |
| | | |
| | | this.update(updateWrapper); |
| | | |
| | |
| | | redisUtil.setCacheObject("autoPrint", flag); |
| | | } |
| | | |
| | | @Override |
| | | public void insertDownWorkstation() { |
| | | DownWorkstation downWorkstation = new DownWorkstation(); |
| | | downWorkstation.setWorkstationId(7); |
| | | downWorkstation.setTotalQuantity(0); |
| | | downWorkstation.setRacksNumber(0); |
| | | downWorkstation.setOtherNumber(0); |
| | | downWorkstation.setDeviceId(3); |
| | | downWorkstation.setEnableState(1); |
| | | downWorkstation.setWorkState(1); |
| | | baseMapper.insert(downWorkstation); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | List<String> glassList = downGlassTaskList.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList()); |
| | | //将任务表中的数据删除 |
| | | downGlassTaskService.remove(new LambdaQueryWrapper<DownGlassTask>().in(DownGlassTask::getTaskType, Const.GLASS_CACHE_TYPE_OUT_ALL).in(DownGlassTask::getGlassId, glassList)); |
| | | //清除下片玻璃信息表数据 |
| | | downGlassInfoService.remove(new LambdaQueryWrapper<DownGlassInfo>().in(DownGlassInfo::getGlassId, glassList)); |
| | | //下片数量-1 |
| | | for (DownGlassTask downGlassTask : downGlassTaskList |
| | | ) { |
| | | if (Const.GLASS_CACHE_TYPE_OUT_ALL.equals(downGlassTask.getTaskType())) { |
| | | downWorkstationService.update( |
| | | new LambdaUpdateWrapper<DownWorkstation>() |
| | | .setSql("racks_number = racks_number-1") |
| | | .eq(DownWorkstation::getWorkstationId, downGlassTask.getEndCell()) |
| | | ); |
| | | |
| | | } |
| | | } |
| | | List<Damage> damageList = downGlassTaskList.stream().map(e -> { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(e.getGlassId()); |
| | |
| | | log.info("有空架子,将流程卡与架子好绑定,执行进片任务 结束"); |
| | | //绑定流程卡 |
| | | downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getWorkstationId(), glassInfo.getLayer()); |
| | | // downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getId(), glassInfo.getLayer()); |
| | | checkFlag = Boolean.TRUE; |
| | | } |
| | | } |
| | |
| | | downStorageCageDetailsService.save(downStorageCageDetails); |
| | | // 生成进片任务 |
| | | initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassInfo.getGlassId()); |
| | | } |
| | | |
| | | public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String |
| | |
| | | if (null != emptyDownWorkstation) { |
| | | log.info("获取到空架子信息,绑定流程卡"); |
| | | downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getWorkstationId(), downStorageCageDetails.getLayer()); |
| | | // downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer()); |
| | | endCell = emptyDownWorkstation.getWorkstationId(); |
| | | } else { |
| | | //todo:增加虚拟工位,绑定流程卡 |
| | | // downWorkstationService.insertDownWorkstation(); |
| | | // endCell = Const.G13_WORK_STATION; |
| | | // downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer()); |
| | | log.info("没有空架子信息,无法绑定流程卡"); |
| | | return Boolean.FALSE; |
| | | } |
| | |
| | | //生成任务信息 |
| | | GlassInfo glassInfo = new GlassInfo(); |
| | | BeanUtils.copyProperties(downStorageCageDetails, glassInfo); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassInfo.getGlassId()); |
| | | return initDownGlassTask(glassInfo, downStorageCageDetails.getSlot(), endCell, taskType); |
| | | } |
| | | |