Merge remote-tracking branch 'origin/master'
# Conflicts:
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/application.yml
New file |
| | |
| | | // tableData.js
|
| | |
|
| | | import { ref } from 'vue';
|
| | |
|
| | | export const tableData = ref([
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },{
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },{
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber: '444',
|
| | | shelf_status: 1
|
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | |
| | |
|
| | | <!-- 左侧按钮组 -->
|
| | | <div >
|
| | | <el-button type="success" size="mini" @click="storage()">原片仓储详情</el-button>
|
| | | <el-button type="success" size="mini" @click="handleInbound()">入库</el-button>
|
| | | <el-button type="success" size="mini" >吊装位入库</el-button>
|
| | |
|
| | |
| | | </el-form-item>
|
| | |
|
| | | </div>
|
| | |
|
| | | <el-dialog v-model="Hidden" top="10vh" width="80%" >
|
| | | <el-table
|
| | | :data="tableData"
|
| | | :data="tableData" v-model="dialogVisible3"
|
| | |
|
| | | style="width: 98%; height: 200px"
|
| | | @selection-change="handleSelectionChange"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | |
|
| | | <el-table
|
| | | :data="tasktableData"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | </el-dialog>
|
| | | </el-card>
|
| | |
|
| | | <div ref="chart" id="chart" style="width: 100%; height: 250px;"></div>
|
| | | <!-- <div ref="chart" id="chart" style="width: 100%; height: 250px;"></div> -->
|
| | |
|
| | |
|
| | | |
| | | <div class="img-ypcc" >
|
| | |
|
| | |
|
| | | <div class="img-car1" :style="'z-index:999;left:297px;top:158px;position:absolute;'">
|
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
|
| | | </div>
|
| | | |
| | | </div>
|
| | |
|
| | | <!-- 入库对话框 -->
|
| | | <el-dialog
|
| | |
| | | </el-dialog>
|
| | |
|
| | |
|
| | | <!-- <div ref="chart" id="chart" style="width: 100%; height: 400px;"></div> -->
|
| | | </div>
|
| | | </template>
|
| | |
|
| | |
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | | const getTagType2 =(status) => {
|
| | | switch (status) {
|
| | |
| | | // 打开入库对话框
|
| | | dialogVisible.value = true;
|
| | | };
|
| | |
|
| | | const storage = () => {
|
| | | // 打开入库对话框
|
| | | Hidden.value = true;
|
| | | };
|
| | | |
| | |
|
| | | const handleCloseDialog = () => {
|
| | | // 关闭对话框时重置表单数据
|
| | |
| | |
|
| | |
|
| | |
|
| | | let chartInstance = null;
|
| | |
|
| | | onMounted(() => {
|
| | | // Initialize the chart
|
| | | chartInstance = echarts.init(document.getElementById('chart'));
|
| | |
|
| | | // Simulated data for demonstration
|
| | | const chartData = {
|
| | | labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
|
| | | datasets: [
|
| | | { name: '使用情况统计', data: [{ remaining: 4, total: 5 }, { remaining: 9, total: 10 }, { remaining: 0, total: 30 }, { remaining: 0, total: 10 },{ remaining: 4, total: 5 }] }
|
| | | ]
|
| | | };
|
| | |
|
| | | const options = {
|
| | | tooltip: {
|
| | | trigger: 'axis',
|
| | | axisPointer: {
|
| | | type: 'shadow'
|
| | | }
|
| | | },
|
| | | legend: {
|
| | | data: ['使用情况统计']
|
| | | },
|
| | | xAxis: {
|
| | | type: 'category',
|
| | | data: chartData.labels
|
| | | },
|
| | | yAxis: {
|
| | | type: 'value'
|
| | | },
|
| | | series: chartData.datasets.map(item => ({
|
| | | name: item.name,
|
| | | type: 'bar',
|
| | | stack: '总量',
|
| | | label: {
|
| | | show: true,
|
| | | position: 'inside',
|
| | | formatter: '{c}%'
|
| | | },
|
| | | data: item.data.map(dataItem => ({
|
| | | value: (dataItem.remaining / dataItem.total * 100).toFixed(2), // 计算剩余量占比,保留两位小数
|
| | | remaining: dataItem.remaining,
|
| | | total: dataItem.total,
|
| | | itemStyle: {
|
| | | color: getColorByRemaining(dataItem.remaining, dataItem.total)
|
| | | }
|
| | | }))
|
| | | }))
|
| | | };
|
| | |
|
| | | function getColorByRemaining(remaining, total) {
|
| | | // 根据剩余量与总量的比例,设置不同的颜色逻辑
|
| | | const percentage = remaining / total;
|
| | | if (percentage >= 0.8) {
|
| | | return '#FF6666'; // Red
|
| | | } else if (percentage >= 0.5) {
|
| | | return '#FFCC66'; // Yellow
|
| | | } else {
|
| | | return '#66CC66'; // Green
|
| | | }
|
| | | }
|
| | |
|
| | | // Set options and render chart
|
| | | if (chartInstance) {
|
| | | chartInstance.setOption(options);
|
| | | }
|
| | | });
|
| | |
|
| | | onBeforeUnmount(() => {
|
| | | if (chartInstance) {
|
| | | chartInstance.dispose();
|
| | | chartInstance = null;
|
| | | }
|
| | | });
|
| | |
|
| | | const handleSelectionChange = (selection) => {
|
| | | console.log('Selection changed:', selection);
|
| | | };
|
| | |
|
| | | </script>
|
| | |
|
| | |
| | |
|
| | |
|
| | |
|
| | | .img-ypcc{
|
| | | margin-left: 80px;
|
| | | background-image:url('../../assets/ypcc.png');
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 800px;
|
| | | width: 1600px;
|
| | | max-width: 100%;
|
| | | background-size: 1400px 800px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | }
|
| | |
|
| | | .img-car1{
|
| | | background-image:url('../../assets/ypccche.png');
|
| | | position: absolute;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 200px;
|
| | | width: 200px;
|
| | | max-width: 100%;
|
| | | background-size: 200px 70px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | }
|
| | |
|
| | | .custom-dialog {
|
| | | max-height: 90vh; /* 最大高度为视口高度的90% */
|
| | |
| | | tableDatab.value = data.temperingGlassInfoList[0] |
| | | tableDatae.value = data.bigStorageCageUsage[0] |
| | | // adjustedRects.value = data.bigStorageCageInfo1[0] |
| | | window.localStorage.setItem('length', data.bigStorageCageInfo1[0].length) |
| | | window.localStorage.setItem('length', data.data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | | adjustedRects.value = data.bigStorageCageInfo1[0].map(rect => ({ |
| | | adjustedRects.value = data.data.bigStorageCageInfos[0][1].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | let small = data.bigStorageCageInfo1[0] |
| | | console.log(small[0].bigStorageCageDetails); |
| | | adjustedRectsa.value = data.bigStorageCageInfo2[0].map(rect => ({ |
| | | adjustedRectsa.value = data.bigStorageCageInfos[0][2].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsb.value = data.bigStorageCageInfo3[0].map(rect => ({ |
| | | adjustedRectsb.value = data.bigStorageCageInfos[0][3].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsc.value = data.bigStorageCageInfo4[0].map(rect => ({ |
| | | adjustedRectsc.value = data.bigStorageCageInfos[0][4].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsd.value = data.bigStorageCageInfo5[0].map(rect => ({ |
| | | adjustedRectsd.value = data.bigStorageCageInfos[0][5].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectse.value = data.bigStorageCageInfo6[0].map(rect => ({ |
| | | adjustedRectse.value = data.bigStorageCageInfos[0][6].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsf.value = data.bigStorageCageInfo7[0].map(rect => ({ |
| | | adjustedRectsf.value = data.bigStorageCageInfos[0][7].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsg.value = data.bigStorageCageInfo8[0].map(rect => ({ |
| | | adjustedRectsg.value = data.bigStorageCageInfos[0][8].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | |
| | | |
| | | Swal.fire({ |
| | | // title: '玻璃信息', |
| | | title: "$t('reportWork.glassinformation')", |
| | | title: this.$t('reportWork.glassinformation'), |
| | | // title: "$t('reportWork.glassinformation')", |
| | | html: tableContent, |
| | | customClass: { |
| | | popup: 'format-pre' |
| | |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | const dialogFormVisiblea = ref(false) |
| | | |
| | | const dialogFormVisiblea2 = ref(false) |
| | | |
| | | // 数据 |
| | | const loading = ref(false); |
| | | |
| | | // 弹框显示控制 |
| | | const dialogFormVisible = ref(false); |
| | | // 表单数据 |
| | | const workstationId = ref(''); |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | const flowCardId = ref(''); |
| | | const flowCardOptions = ref('[]'); |
| | | const tableData = reactive([]); |
| | |
| | | const handleSelectionChange = () => { |
| | | // 处理表格行选择事件 |
| | | }; |
| | | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | console.log(row.flowCardId); |
| | | flowCardId.value = row.flowCardId; |
| | | // 发起接口请求获取流程卡号 |
| | | fetchFlowCardId(); |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const name = ref(''); |
| | | const tableData = ref([]) |
| | |
| | | const getTableRow = async () => { |
| | | try { |
| | | let menuList = []; |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | const dataToSend = { |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 处理编辑按钮点击 |
| | | |
| | | // function buildCascaderOptions(menuList) { |
| | | // // 创建一个映射来快速查找父项 |
| | | // const parentIdMap = {}; |
| | | // // 初始化最终的级联选项数组 |
| | | // const options = []; |
| | | // // 遍历所有菜单项,将它们添加到映射中,并构建顶级菜单项 |
| | | // menuList.forEach(item => { |
| | | // // 如果parentId为0,则为顶级菜单项 |
| | | // if (item.parentId === 0) { |
| | | // // 初始化children数组 |
| | | // item.children = []; |
| | | // // 添加到最终的选项中 |
| | | // options.push({ |
| | | // value: item.id, |
| | | // label: item.menuName, |
| | | // children: item.children |
| | | // }); |
| | | // // 将顶级菜单项添加到映射中(虽然在这个特定场景中可能不是必需的,但可以用于其他目的) |
| | | // parentIdMap[item.id] = item; |
| | | // } else { |
| | | // // 如果parentId不是0,则查找父项并添加到其children数组中 |
| | | // // 注意:这里假设parentIdMap在之前已经填充了所有顶级菜单项 |
| | | // if (!parentIdMap[item.parentId]) { |
| | | // // 如果父项不存在,则可能是数据不完整或错误,需要处理这种情况 |
| | | // console.error(`Parent item with ID ${item.parentId} not found for child item with ID ${item.id}`); |
| | | // } else { |
| | | // parentIdMap[item.parentId].children.push({ |
| | | // value: item.id, |
| | | // label: item.menuName |
| | | // // 这里不需要嵌套的children,除非你的菜单有多于两级的结构 |
| | | // }); |
| | | // } |
| | | // } |
| | | // }); |
| | | // return options; |
| | | // } |
| | | function handleEdit(row) { |
| | | name.value = row.name; |
| | | selectedOptions.value = row.selectedOptions |
| | | // options.value = res.data.tree |
| | | adda.value = true; // 显示对话框 |
| | | window.localStorage.setItem('id', row.id) |
| | | const parentIdMap = {}; |
| | | const menuItems = row.menuList.map(item => { |
| | | let parentId = item.parentId || null; // 或者使用 0,如果你的系统是这样设计的 |
| | | if (!parentIdMap[parentId]) { |
| | | parentIdMap[parentId] = []; |
| | | } |
| | | parentIdMap[parentId].push({ |
| | | id: item.id, |
| | | menuName: item.menuName, |
| | | children: [] // 初始为空,稍后会填充子项 |
| | | }); |
| | | return { id: item.id, menuName: item.menuName, parentId: parentId }; |
| | | }); |
| | | |
| | | // 现在,我们遍历所有项,并将它们分配给它们的父项(如果有的话) |
| | | menuItems.forEach(item => { |
| | | if (item.parentId !== null && parentIdMap[item.parentId]) { |
| | | // 将当前项添加到其父项的 children 数组中 |
| | | parentIdMap[item.parentId].push({ |
| | | ...item, // 复制除了 parentId 之外的所有属性 |
| | | children: [] // 这里我们不需要再次添加 children,因为它已经在 parentIdMap 中被初始化了 |
| | | }); |
| | | // 注意:这里实际上是一个错误,因为我们不应该向 parentIdMap[item.parentId] 数组中添加整个项, |
| | | // 而应该只更新它的 children 数组。但上面的代码示例了如何访问父项。 |
| | | // 正确的做法是在构建 parentIdMap 时就设置好 children 数组,并在后面不再修改 parentIdMap[item.parentId] 数组。 |
| | | } |
| | | // 注意:上面的代码逻辑有误,因为我们在构建 parentIdMap 时已经为每个项设置了 children 数组。 |
| | | // 我们应该直接修改这些 children 数组,而不是向 parentIdMap[item.parentId] 数组添加新项。 |
| | | }); |
| | | |
| | | // 但是,由于我们在构建 parentIdMap 时已经为每个项(包括其父项)设置了 children 数组, |
| | | // 我们实际上不需要上面的循环来重新分配子项。 |
| | | // 我们只需要找到顶级项(parentId 为 null 或 0 的项),并将它们设置为 selectedOptions.value |
| | | |
| | | // 假设顶级项的 parentId 为 null(或 0,根据你的系统) |
| | | const topLevelItems = parentIdMap[null] || parentIdMap[0] || []; |
| | | |
| | | // selectedOptions.value 应该是顶级项的数组,但首先我们需要将它们从 parentIdMap 的值中提取出来 |
| | | // 由于我们在构建 parentIdMap 时已经为每个顶级项设置了 children,所以我们可以直接使用这些项 |
| | | selectedOptions.value = topLevelItems; |
| | | |
| | | // 注意:selectedOptions.value 的具体格式应该与你的级联选择器组件所期望的格式相匹配 |
| | | // 如果你的级联选择器组件期望的是一个包含 value 和 label 的数组数组,你可能还需要进一步转换 topLevelItems |
| | | adda.value = true; // 显示对话框 |
| | | |
| | | } |
| | | |
| | | // 注意:上面的代码可能仍然需要根据你的具体数据结构进行调整 |
| | | // 特别是关于 parentId 的处理,以及如何将菜单项正确地分配给它们的父项 |
| | | // 处理编辑按钮点击 |
| | | // function handleEdit(row) { |
| | | // name.value = row.name; |
| | | // let cascaderOptions = buildCascaderOptions(row.menuList); |
| | | // selectedOptions.value = cascaderOptions; // 假设selectedOptions是v-model绑定的级联选择器的值 |
| | | // console.log(cascaderOptions); // 查看构建后的级联选项 |
| | | // // let transformedMenuList = row.menuList.map(item => ({ |
| | | // // id: item.id, // 假设每个项都有一个id作为唯一标识 |
| | | // // menuName: item.menuName, // 显示给用户的文本 |
| | | // // // children: item.children ? item.children.map(child => ({ value: child.id, label: child.name })) : [] |
| | | // // })); |
| | | // // selectedOptions.value = transformedMenuList |
| | | // console.log(transformedMenuList); |
| | | // adda.value = true; // 显示对话框 |
| | | // window.localStorage.setItem('id', row.id) |
| | | // } |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | | let id = window.localStorage.getItem('id') |
| | | try { |
| | | let menuList = []; |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | const dataToSend = { |
| | |
| | | menuList: menuList |
| | | }; |
| | | const response = await request.post('/loadGlass/sys/role/updateRole', dataToSend); |
| | | // try { |
| | | // const response = await request.post('/loadGlass/sys/role/updateRole', { |
| | | // id: id, |
| | | // name: name.value, |
| | | // }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | name.value = ''; |
| | | selectedOptions.value = ''; |
| | | fetchOptionsa() |
| | | tableData.value = response.data; |
| | | fetchOptionsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const userName = ref(''); |
| | | const password = ref(''); |
| | |
| | | // 处理编辑按钮点击 |
| | | function handleEdit(row) { |
| | | userName.value = row.userName; |
| | | if (row.roleList && row.roleList.length > 0) { |
| | | const firstRole = row.roleList[0]; |
| | | selectedProjectNoa.value = firstRole.id; // 设置为ID,而不是name |
| | | } |
| | | adda.value = true; // 显示对话框 |
| | | window.localStorage.setItem('id', row.id) |
| | | |
| | |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @return 根据流程卡号查询玻璃信息 |
| | | */ |
| | | int getGlassInfoCountByFlowCardId(String flowCardId); |
| | | |
| | | /** |
| | |
| | | * 查询所有工程状态不为300不同流程卡号 |
| | | */ |
| | | List<Map<String, Object>> getFlowCardId(); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.print.attribute.standard.MediaSize; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public List<Map<String, Object>> selectCutTerritory() { |
| | | List<UpPattenUsage> upPattenUsage = upPattenUsageMapper.selectList(new MPJLambdaWrapper<UpPattenUsage>() |
| | | .selectAll(UpPattenUsage.class) |
| | | .eq(UpPattenUsage::getState, 1).or().eq(UpPattenUsage::getState, 0).orderByDesc(UpPattenUsage::getState)); |
| | | .orderByDesc(UpPattenUsage::getState) |
| | | .orderByDesc(UpPattenUsage::getId)); |
| | | if (!upPattenUsage.isEmpty()) { |
| | | UpPattenUsage upPattenUsage1 = upPattenUsage.get(0); |
| | | List<Map<String, Object>> cutTerritorys=optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class) |
| | |
| | | return edgGlassTaskInfoService.save(edgGlassTaskInfo); |
| | | } |
| | | |
| | | /** |
| | | * 当前切割版图信息 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void currentCutTerritory() { |
| | | public void CacheGlassTasks() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //识别摆片 |
| | | List<Map<String, Object>> currentCutTerritorys = edgStorageCageDetailsService.selectCutTerritory(); |
| | | jsonObject.append("currentCutTerritory", currentCutTerritorys); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 磨边任务 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void selectEdgTask() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //磨边信息 |
| | | List<Map<String, Object>> EdgTasks1 = taskCacheService.selectEdgInfo("2001"); |
| | | List<Map<String, Object>> EdgTasks2 = taskCacheService.selectEdgInfo("2002"); |
| | | jsonObject.append("EdgTasks1", EdgTasks1); |
| | | jsonObject.append("EdgTasks2", EdgTasks2); |
| | | |
| | | //卧室缓存笼内信息 |
| | | List<Map<String, Object>> EdgStorageCageinfos = edgStorageCageService.selectEdgStorageCages(); |
| | | jsonObject.append("EdgStorageCageinfos", EdgStorageCageinfos); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 磨边前 缓存内信息 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void selectEdgStorageCage() { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<Map<String, Object>> EdgStorageCageinfos = edgStorageCageService.selectEdgStorageCages(); |
| | | jsonObject.append("EdgStorageCageinfos", EdgStorageCageinfos); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("cacheGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: cz |
| | | active: prod |
| | | application: |
| | | name: cacheGlass |
| | | mybatis-plus: |
| | |
| | | @PostMapping("/insertBigStorageCageDetails") |
| | | public Result insertBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.insertBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteBigStorageCageDetails") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.deleteBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail(0)); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务破损0/拿走1") |
| | |
| | | |
| | | boolean outGlass(); |
| | | |
| | | List<BigStorageCage> querybigStorageCageDetail(int deviceId); |
| | | List<BigStorageCage> querybigStorageCageDetailAll(); |
| | | |
| | | Map<Integer, List<BigStorageCage>> querybigStorageCageDetail(); |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | */ |
| | | @Override |
| | | public List<BigStorageCageDetails> selectTask(int taskType) { |
| | | return null; |
| | | // if (taskType == 1) { |
| | | // //进片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | // feedWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_IN); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | // List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | // |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } else { |
| | | // //出片任务数据 |
| | | // LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | // outWrapper.eq(BigStorageCageDetails::getState, Const.BIG_STORAGE_OUT); |
| | | // List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | // |
| | | // LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | // outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | // List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | // |
| | | // Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | // .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | // for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | // BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | // bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | // } |
| | | // return bigStorageCageDetailsList; |
| | | // } |
| | | if (taskType == 1) { |
| | | //进片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> feedWrapper = new LambdaQueryWrapper<>(); |
| | | feedWrapper.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, task -> task)); |
| | | Iterator<BigStorageCageDetails> iterator = bigStorageCageDetailsList.iterator(); |
| | | while (iterator.hasNext()) { |
| | | BigStorageCageDetails bigStorageCageDetails = iterator.next(); |
| | | BigStorageCageFeedTask bigStorageCageFeedTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask() == null) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } else { |
| | | //出片任务数据 |
| | | LambdaQueryWrapper<BigStorageCageDetails> outWrapper = new LambdaQueryWrapper<>(); |
| | | outWrapper.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(outWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageOutTask> outTaskWrapper = new LambdaQueryWrapper<>(); |
| | | outTaskWrapper.lt(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_SUCCESS); |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList = bigStorageCageOutTaskMapper.selectList(outTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageOutTask> listMap = bigStorageCageOutTaskList.stream() |
| | | .collect(Collectors.toMap(BigStorageCageOutTask::getGlassId, task -> task)); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList) { |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | } |
| | | Iterator<BigStorageCageDetails> iterator = bigStorageCageDetailsList.iterator(); |
| | | while (iterator.hasNext()) { |
| | | BigStorageCageDetails bigStorageCageDetails = iterator.next(); |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | if (bigStorageCageDetails.getBigStorageCageOutTask() == null) { |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | //查询大理片信息,前端展示用 |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail(int deviceId) { |
| | | LambdaQueryWrapper<BigStorageCage> bigStorageCageWrapper = new LambdaQueryWrapper<>(); |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .or() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL); |
| | | if (deviceId != 0) { |
| | | bigStorageCageWrapper.eq(BigStorageCage::getDeviceId, deviceId); |
| | | bigStorageCageDetailsWrapper.eq(BigStorageCageDetails::getDeviceId, deviceId); |
| | | } |
| | | |
| | | List<BigStorageCage> bigStorageCages = bigStorageCageMapper.selectList(bigStorageCageWrapper); |
| | | log.info("1、获取大理片笼信息完成,获取到的数据{}", bigStorageCages.size()); |
| | | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(bigStorageCageDetailsWrapper); |
| | | |
| | | Map<Integer, List<BigStorageCageDetails>> listMap = bigStorageCageDetailsList.stream().collect(Collectors.groupingBy(BigStorageCageDetails::getSlot)); |
| | | for (BigStorageCage bigStorageCage : bigStorageCages) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails = listMap.get(bigStorageCage.getSlot()); |
| | | bigStorageCage.setBigStorageCageDetails(bigStorageCageDetails); |
| | | } |
| | | return bigStorageCages; |
| | | public List<BigStorageCage> querybigStorageCageDetailAll() { |
| | | MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(BigStorageCage.class).selectCollection(BigStorageCageDetails.class, BigStorageCage::getBigStorageCageDetails) |
| | | .leftJoin(BigStorageCageDetails.class, on -> on.eq(BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL)); |
| | | return bigStorageCageMapper.selectJoinList(BigStorageCage.class, wrapper); |
| | | } |
| | | |
| | | //查询大理片信息,前端展示用 |
| | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcStorageCageTask() throws InterruptedException { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | private JSONObject jsonObject = new JSONObject(); |
| | | public void hangzhoumes() throws InterruptedException { |
| | | List<Double> carPostion=new ArrayList<>(); |
| | | carPostion.add(0.25); |
| | | carPostion.add(0.5); |
| | | jsonObject.append("carPostion",carPostion); |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfo1", bigStorageCageService.querybigStorageCageDetail(1)); |
| | | jsonObject.append("bigStorageCageInfo2", bigStorageCageService.querybigStorageCageDetail(2)); |
| | | jsonObject.append("bigStorageCageInfo3", bigStorageCageService.querybigStorageCageDetail(3)); |
| | | jsonObject.append("bigStorageCageInfo4", bigStorageCageService.querybigStorageCageDetail(4)); |
| | | jsonObject.append("bigStorageCageInfo5", bigStorageCageService.querybigStorageCageDetail(5)); |
| | | jsonObject.append("bigStorageCageInfo6", bigStorageCageService.querybigStorageCageDetail(6)); |
| | | jsonObject.append("bigStorageCageInfo7", bigStorageCageService.querybigStorageCageDetail(7)); |
| | | jsonObject.append("bigStorageCageInfo8", bigStorageCageService.querybigStorageCageDetail(8)); |
| | | jsonObject.append("bigStorageCageInfos", bigStorageCageService.querybigStorageCageDetail()); |
| | | |
| | | //进片任务数据 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsFeedTask=bigStorageCageDetailsService.selectTask(1); |
| | |
| | | List<Map<String, Object>> bigStorageCageUsage=bigStorageCageService.selectBigStorageCageUsage(); |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | |
| | | //理片笼表格信息 |
| | | jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetailAll()); |
| | | |
| | | } |
| | | |
| | | public void salve_hangzhoumes_1() throws InterruptedException { |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList= temperingGlassInfoService.list(); |
| | | jsonObject.append("temperingGlassInfoList", temperingGlassInfoList); |
| | | |
| | | //理片笼表格信息 |
| | | jsonObject.append("bigStorageCageInfo", bigStorageCageService.querybigStorageCageDetail(0)); |
| | | |
| | | |
| | | } |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void plcStorageCageTask() throws InterruptedException { |
| | | jsonObject = new JSONObject(); |
| | | try { |
| | | hangzhoumes(); |
| | | salve_hangzhoumes_1(); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | */ |
| | | List<Map<String, Object>> selectDownStorageCages(); |
| | | |
| | | |
| | | /** |
| | | * @return 查询缓存中最多的流程卡 |
| | | */ |
| | | List<DownStorageCageDetails> selectCacheMax(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | @Value("${mes.maxHeight}") |
| | | private Integer maxHeight; |
| | | |
| | | @Value("${mes.minWidth}") |
| | | private Integer minWidth; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Value("${mes.minHeight}") |
| | | private Integer minHeight; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 3000) |
| | | public void plcHomeEdgTask() { |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue(); |
| | |
| | | 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); |
| | |
| | | inTo(glassIdeValue, requestWord, currentSlot); |
| | | } else if ("2".equals(requestWord)) { |
| | | //09空闲 :1 10空闲 :2 都空闲:3 其他0 |
| | | log.info("2、出片请求,且确认字为0,执行进片任务"); |
| | | log.info("2、出片请求,且确认字为0,执行出片任务"); |
| | | outTo(out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, glassIdeValue, currentSlot); |
| | | } else if ("3".equals(requestWord)) { |
| | | log.info("2、进片和出片都空闲,执行出片任务"); |
| | |
| | | } |
| | | Boolean checkFlag = Boolean.FALSE; |
| | | //玻璃尺寸是否走人工下片 |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight) { |
| | | log.info("该玻璃尺寸走人工下片,直接进片"); |
| | | } else { |
| | | if (glassInfo.getWidth() > maxWidth || glassInfo.getHeight() > maxHeight || glassInfo.getWidth() < minWidth || glassInfo.getHeight() < minHeight) { |
| | | log.info("该玻璃尺寸不符合要求,需要走人工下片直接进片"); |
| | | } |
| | | else { |
| | | log.info("该玻璃尺寸非人工下片"); |
| | | //获取该玻璃的流程卡是否已绑定架子 |
| | | DownWorkstation one = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>() |
| | |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl; |
| | | import com.mes.glassinfo.service.impl.GlassInfoServiceImpl; |
| | | import com.mes.job.DownLoadCacheGlassTask; |
| | | import com.mes.utils.Result; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | |
| | | |
| | | DownStorageCage downStorageCage= new DownStorageCage(); |
| | | downStorageCage.setEnableState("0"); |
| | | downStorageCage.setEnableState(0); |
| | | downStorageCage.setId(1); |
| | | downStorageCageService.updateDownStorageCage(downStorageCage); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |