Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/Slicecage/slicecage.vue
| | |
| | | export default { |
| | | serverUrl: "10.153.19.150:88/api", |
| | | |
| | | // serverUrl: "192.168.1.199:88/api", |
| | | serverUrl2: "10.153.19.150:88" |
| | | // serverUrl2: "192.168.1.199:88" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | notstocked: '未入库', |
| | | inboundstatus: '部分入库状态', |
| | | allstatus: '全部入库状态', |
| | | |
| | | |
| | | completedquantity: '完成数量', |
| | | scrapquantity: '报废数量', |
| | | } |
| | | } |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;position: relative;"> |
| | | <div style="position: absolute; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | |
| | | backgroundColor: '#409EFF' |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | <!-- <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -124px;margin-left: 480px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: -30px;margin-left: 850px;"></div> |
| | | <div style="width: 100px;height: 10px;background-color: #409EFF;margin-top: 30px;margin-left: 695px;"></div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | .awatch{ |
| | | height: 460px; |
| | | width: 1500px; |
| | | /* margin-top: -60px; */ |
| | | max-width: 100%; |
| | | } |
| | | </style> |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <div style="height: 500px;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="240" ref="table" |
| | |
| | | <el-table-column prop="width" align="center" :label="$t('sorter.width')" min-width="120" /> |
| | | <el-table-column prop="height" align="center" :label="$t('sorter.height')" min-width="120" /> |
| | | <el-table-column |
| | | align="center" |
| | | align="center" |
| | | :label="$t('sorter.startstatus')" |
| | | min-width="80" |
| | | prop="enable_state" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div id="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;position: relative;"> |
| | | <div style="position: absolute; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div class="awatch"> |
| | | <img src="../../assets/woshihuancun.png" alt="" style="width: 70%;height: 90%;margin-left: 200px;margin-top: 20px;position: relative;"> |
| | | <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect" |
| | |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | |
| | | const toggleEnableState = async (row) => { |
| | | const newState = row.enable_state === 1 ? 0 : 1; |
| | | // 发送请求到后端更新状态(这里省略了实际的请求逻辑) |
| | | const response = await request.post('/unLoadGlass/downStorage/updateDownStorageCage', { id: row.id, enablestate: newState }); |
| | | const response = await request.post('/unLoadGlass/downStorage/updateDownStorageCage', { id: row.id, enableState: newState }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | |
| | | } |
| | | row.enable_state = newState; |
| | | }; |
| | | |
| | | |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | .awatch{ |
| | | height: 460px; |
| | | width: 1500px; |
| | | max-width: 100%; |
| | | /* margin-top: -60px; */ |
| | | } |
| | | </style> |
| | |
| | | const carPosition = ref([]) |
| | | const adjustedRects = ref([]); |
| | | const project = ref([]); |
| | | const adjust = ref([]); |
| | | const adjusta = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | | const adjustedRectsb = ref([]); |
| | | const adjustedRectsc = ref([]); |
| | |
| | | const adjustedRectse = ref([]); |
| | | const adjustedRectsf = ref([]); |
| | | const adjustedRectsg = ref([]); |
| | | const adjustedRectsh = ref([]); |
| | | const currentRow = reactive({}); // 当前行的数据 |
| | | const add = ref(false) |
| | | const flowCardId = ref(''); |
| | |
| | | const cell6=ref(true); |
| | | const cell7=ref(true); |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | |
| | | |
| | |
| | | } |
| | | return index; |
| | | } |
| | | |
| | | function jumpToPage(page: number) { |
| | | if (page >= 1 && page <= totalPages.value) { |
| | | currentPage.value = page; |
| | | } |
| | | } |
| | | // 上一页和下一页方法 |
| | | const prevPage = () => { |
| | | if (currentPage.value > 1) { |
| | |
| | | // 更新 tableData 的数据 |
| | | tableDatac.value = data.bigStorageCageDetailsOutTask[0] |
| | | tableDatad.value = data.bigStorageCageDetailsFeedTask[0] |
| | | // adjust.value = data.bigStorageCageDetailsFeedTask[0].map(rect => ({ |
| | | // ...rect, |
| | | // })); |
| | | adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | adjust.value = data.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // const adjust = computed(() => { |
| | | // return data.value.bigStorageCageDetailsFeedTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined); |
| | | // }); |
| | | tableData.value = data.bigStorageCageInfo[0] |
| | | tableDatab.value = data.temperingGlassInfoList[0] |
| | | tableDatae.value = data.bigStorageCageUsage[0] |
| | | carPosition.value = data.carPostion[0] |
| | | |
| | | // console.log(carPosition.value); |
| | | window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length) |
| | | let length = window.localStorage.getItem('length') |
| | | // alert(length); |
| | | |
| | | adjustedRects.value = data.bigStorageCageInfos[0][1].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsg.value = data.bigStorageCageInfos[0][8].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | | })); |
| | | adjustedRectsh.value = data.bigStorageCageInfos[0][9].map(rect => ({ |
| | | ...rect, |
| | | height: 20/length, |
| | | top: 29/length |
| | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | | <el-table height="100%" ref="table" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="100" /> |
| | | <el-table-column prop="bigStorageCageOutTask.glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.startSlot" align="center" :label="$t('searchOrder.startposition')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.endSlot" align="center" :label="$t('searchOrder.targetlocation')" min-width="120" /> |
| | | <el-table-column prop="bigStorageCageOutTask.trainNumber" align="center" :label="$t('searchOrder.trips')" min-width="120" /> |
| | |
| | | <el-table-column prop="id" align="center" :label="$t('searchOrder.tabid')" min-width="150"/> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('searchOrder.tid')" min-width="100"/> |
| | | <el-table-column prop="slot" align="center" :label="$t('searchOrder.gridnumber')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="120"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="150"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="100"/> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140"/> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="100"/> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="100"/> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="100"/> |
| | |
| | | <!-- // 父级框 --> |
| | | <div class="img-dlpl" > |
| | | <div class="img-car1" :style="'z-index:999;left:247px;top:' + 350*carPosition[0] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | <div |
| | | v-for="(rect, index) in adjusta" |
| | | :key="rect.id" |
| | | :style="{ |
| | | width: '30px', |
| | | height: '5px', |
| | | backgroundColor: '#409EFF', |
| | | marginLeft: index * 5+ `px`, |
| | | top: '10px', |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="img-car4" :style="'z-index:999;left:704px;top:' + 350*carPosition[1] + 'px;position:absolute;'"> |
| | | <div v-show="cellshow4" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div> |
| | | <div |
| | | v-for="(rect, index) in adjust" |
| | | :key="rect.id" |
| | | :style="{ |
| | | width: '30px', |
| | | height: '5px', |
| | | backgroundColor: '#409EFF', |
| | | marginLeft: index * 5+ `px`, |
| | | top: '10px', |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | <div style="position: relative;"> |
| | | <div v-show="cell1" style="width: 227px;height: 29px;position: relative;top:55px;left: 465px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="rect.id" |
| | | :key="rect" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-show="cell9" style="width: 227px;height: 29px;position: absolute;top:300px;left: 465px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRectsh" |
| | | :key="rect.id" |
| | | :style="{ |
| | | |
| | | // display:'flex', |
| | | position: 'absolute', |
| | | width: '227px', |
| | | // backgroundColor: 'red', |
| | | left: '0px', |
| | | top: index*rect.top+`px`, |
| | | height: `${rect.height}px`, |
| | | }" |
| | | > |
| | | <div |
| | | v-for="(rects, index) in rect.bigStorageCageDetails" |
| | | :key="rects" |
| | | :style="{ |
| | | float:'left', |
| | | width: '18px', |
| | | height: `${rect.height}px`, |
| | | backgroundColor: '#911005', |
| | | // border:'1px solid black', |
| | | top: '0px', |
| | | marginRight: rects.gap/5000*227+'px' |
| | | }" |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="5vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-dialog v-model="dialogFormVisiblea" top="2vh" width="97%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-table |
| | | :data="paginatedUsers" |
| | | @row-click="handleRowClick" |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | | <!-- <el-table-column prop="menuName" label="二级菜单栏" align="center" min-width="140" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"/> --> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="90"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="110" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" min-width="130"/> |
| | | <el-table-column prop="sequence" align="center" :label="$t('searchOrder.pieceingrid')" min-width="130" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="130" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('searchOrder.typeglass')" min-width="80" /> |
| | | <el-table-column prop="width" align="center" :label="$t('searchOrder.width')" min-width="80" /> |
| | | <el-table-column prop="height" align="center" :label="$t('searchOrder.height')" min-width="80" /> |
| | |
| | | <div style="margin-top: 20px; text-align: center;"> |
| | | <!-- 上一页按钮 --> |
| | | <el-button @click="prevPage" :disabled="currentPage === 1">{{ $t('searchOrder.up') }}</el-button> |
| | | |
| | | <div style="display: inline-block; margin: 0 20px;"> |
| | | <el-button |
| | | v-for="page in totalPages" |
| | | :key="page" |
| | | :class="{ 'is-active': currentPage === page }" |
| | | @click="jumpToPage(page)" |
| | | > |
| | | {{ page }} |
| | | </el-button> |
| | | </div> |
| | | <!-- 下一页按钮 --> |
| | | <el-button @click="nextPage" :disabled="currentPage >= totalPages">{{ $t('searchOrder.down') }}</el-button> |
| | | |
| | |
| | | position:relative |
| | | } |
| | | .img-car1{ |
| | | display: flex; |
| | | background-image:url('../../assets/lp.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | |
| | | position:relative |
| | | } |
| | | .img-car4{ |
| | | display: flex; |
| | | background-image:url('../../assets/lpa.png'); |
| | | position: absolute; |
| | | background-repeat: no-repeat; |
| | |
| | | import { initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost } from '@/utils/constants'; |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456',downGlassInfoList:"" } }, |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '',downGlassInfoList:"" } }, |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678',downGlassInfoList:"" } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '',downGlassInfoList:"" } }, |
| | | |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' ,downGlassInfoList:""} } |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: '' ,downGlassInfoList:""} } |
| | | |
| | | ]); |
| | | |
| | |
| | | |
| | | Swal.fire({ |
| | | // title: '玻璃信息', |
| | | title: this.$t('reportWork.glassinformation'), |
| | | // title: "$t('reportWork.glassinformation')", |
| | | title: t('reportWork.glassinformation'), |
| | | html: tableContent, |
| | | customClass: { |
| | | popup: 'format-pre' |
| | |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | /* margin-left: 10px; */ |
| | | width: 500px; |
| | | margin-top: 5px; |
| | | } |
| | |
| | | import { initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '' } }, |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '' } }, |
| | | |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: '' } } |
| | | |
| | | ]); |
| | | |
| | |
| | | tableContent += '</table>'; |
| | | |
| | | Swal.fire({ |
| | | title: "$t('reportWork.glassinformation')", |
| | | title: t('reportWork.glassinformation'), |
| | | // title: '玻璃信息', |
| | | html: tableContent, |
| | | customClass: { |
| | |
| | | |
| | | <style scoped> |
| | | .glass-rack { |
| | | margin-left: 20px; |
| | | /* margin-left: 20px; */ |
| | | width: 500px; |
| | | margin-top: 10px; |
| | | margin-top: 5px; |
| | | } |
| | | .rack-rect:hover { |
| | | cursor: pointer; |
| | |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | // beforeUnmount(() => { |
| | | // closeWebSocket(); |
| | | // }); |
| | | const getTagType =(status) => { |
| | | return status === 1 ? 'success' : 'danger'; |
| | | // 根据状态值决定标签类型,这里假设状态为1时为成功(绿色),否则为失败(红色) |
| | | } |
| | | |
| | | const toggleStatus = (row) => { |
| | | // 切换料架状态的逻辑 |
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1 |
| | | // 此处可以添加保存状态的逻辑,比如调用 API 更新数据 |
| | | updateRowStatus(row); |
| | | }; |
| | | |
| | | // setInterval(fetchTableData, 2000) |
| | | const updateRowStatus = async (row) => { |
| | | try { |
| | | // 假设你的后端 API 接收 PUT 请求,并且需要传递 row.id 和 row.enableState 参数 |
| | | |
| | | |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateDownWorkstation', { |
| | | enableState:row.enableState, |
| | | id:row.id |
| | | }); |
| | | console.log('Updated row status:', response.data); |
| | | // 可以根据后端返回的数据进行进一步处理,比如更新本地状态等 |
| | | } catch (error) { |
| | | console.error('Error updating row status:', error); |
| | | // 处理错误情况,比如提示用户更新失败 |
| | | } |
| | | }; |
| | | |
| | | |
| | | </script> |
| | |
| | | <el-table-column prop="totalquantity" align="center" :label="$t('reportWork.totalquantity')" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" /> |
| | | <el-table-column prop="layer" align="center" label="层数" min-width="120" /> |
| | | <el-table-column prop="artificialnumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="otherNumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" /> |
| | | <el-table-column |
| | |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enableState==1? $t('reportWork.enable') : $t('reportWork.unenable')}}</el-tag> |
| | | |
| | | <el-tag :type="getTagType(scope.row.enableState)" @click="toggleStatus(scope.row)"> |
| | | {{ scope.row.enableState === 1 ? $t('reportWork.enable') : $t('reportWork.unenable') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="200"> |
| | |
| | | <template> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="600px"> |
| | | <div id="top" style="height: 150px;display: flex;"> |
| | | <div v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | :style="{ width: '1000px', height: '100px',margin: '5px',}"> |
| | | <div ref="setChartDom(index, $el)" style="width: 100%; height: 100%;"></div> |
| | | <div style="text-align: center;"> |
| | | {{ rect.thisProcess }}</div> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="centerleft" style="margin-top: 10px;height: 240px;width: 340px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column fixed prop="orderId" align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="100" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="100" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="100" /> |
| | | <el-table-column fixed="right" :label="$t('large.operate')" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleBinda">{{ $t('large.mes') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <img src="../../assets/d1.png" alt="" style="margin-left: -30px; width: 110%;height: 100%;position: relative;"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="600px"> |
| | | <div id="top" style="height: 150px;display: flex;"> |
| | | <div class="echarts-container"> |
| | | <div v-for="(processData, index) in processesData" :key="index" class="echarts-item"> |
| | | <div :id="'pieChart_' + index" class="pie-chart"></div> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="50" /> |
| | | <el-table-column prop="projectName" align="center" :label="$t('large.projectname')" min-width="50" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="centerleft" style="margin-top: 10px;height: 240px;width: 340px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column fixed prop="orderId" align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="100" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="100" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="100" /> |
| | | <el-table-column fixed="right" :label="$t('large.operate')" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleBinda">{{ $t('large.mes') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <img src="../../assets/d1.png" alt="" style="margin-left: -30px; width: 110%;height: 100%;position: relative;"> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="projectNo" align="center" :label="$t('large.projectnumber')" min-width="50" /> |
| | | <el-table-column prop="projectName" align="center" :label="$t('large.projectname')" min-width="50" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div id="bottom" style="margin-top: 10px;height: 190px;background-color: #911005;"> |
| | | <el-table height="190" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="orderId" align="center" :label="$t('large.orderId')" min-width="50" /> |
| | | <el-table-column prop="customerName" align="center" :show-overflow-tooltip="true" :label="$t('large.customerName')" min-width="90" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.project')" min-width="50" /> |
| | | <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="50" /> |
| | | <el-table-column prop="quantity" align="center" :label="$t('large.quantity')" min-width="50" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('large.warehousing')" |
| | | min-width="50" |
| | | prop="warehousing" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.warehousing)"> |
| | | {{ getStatusText(scope.row.warehousing) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deliveryDate" align="center" :label="$t('large.deliveryDate')" min-width="50" /> |
| | | </el-table> |
| | | <el-table height="190" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="orderId" align="center" :label="$t('large.orderId')" min-width="50" /> |
| | | <el-table-column prop="customerName" align="center" :show-overflow-tooltip="true" :label="$t('large.customerName')" min-width="90" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.project')" min-width="50" /> |
| | | <el-table-column prop="area" align="center" :label="$t('large.are')" min-width="50" /> |
| | | <el-table-column prop="quantity" align="center" :label="$t('large.quantity')" min-width="50" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('large.warehousing')" |
| | | min-width="50" |
| | | prop="warehousing" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType(scope.row.warehousing)"> |
| | | {{ getStatusText(scope.row.warehousing) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deliveryDate" align="center" :label="$t('large.deliveryDate')" min-width="50" /> |
| | | </el-table> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | <el-dialog v-model="blinda" top="10vh" width="80%" :title="$t('large.brokeno')"> |
| | | <el-table height="500" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="reportingWorkTime" fixed align="center" :label="$t('large.time')" min-width="110" /> |
| | | <el-table-column prop="orderId" fixed align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="reportingWorkId" align="center" :label="$t('large.jobnumber')" min-width="120" /> |
| | | <el-table-column prop="productionId" align="center" :label="$t('large.productionnumber')" min-width="130" /> |
| | | <el-table-column prop="processId" align="center" :label="$t('large.cardnumber')" min-width="140" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="110" /> |
| | | <el-table-column prop="batch" align="center" :label="$t('large.batch')" min-width="110" /> |
| | | <el-table-column prop="reviewer" align="center" :label="$t('large.detailID')" min-width="110" /> |
| | | <el-table-column prop="orderSort" align="center" :label="$t('large.serialnumber')" min-width="110" /> |
| | | <el-table-column prop="productName" align="center" :label="$t('large.productname')" :show-overflow-tooltip="true" min-width="220" /> |
| | | <el-table-column prop="technologyNumber" align="center" :label="$t('large.serial')" min-width="110" /> |
| | | <el-table-column prop="glassAddress" align="center" :label="$t('large.slicemarker')" min-width="130" /> |
| | | <el-table-column prop="patchNum" align="center" :label="$t('large.numberpatches')" min-width="110" /> |
| | | <el-table-column prop="width" align="center" :label="$t('large.width')" min-width="110" /> |
| | | <el-table-column prop="height" align="center" :label="$t('large.height')" min-width="110" /> |
| | | <el-table-column prop="shape" align="center" :label="$t('large.shape')" min-width="110" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="110" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchReason" align="center" :label="$t('large.breakreason')" min-width="110" /> |
| | | <el-table-column prop="patchType" align="center" :label="$t('large.breaktype')" min-width="110" /> |
| | | <el-table-column prop="responsiblePersonnel" align="center" :label="$t('large.responsiblepersonnel')" min-width="110" /> |
| | | <el-table-column prop="responsibleEquipment" align="center" :label="$t('large.responsiblequipment')" min-width="110" /> |
| | | <el-table-column prop="responsibleTeam" align="center" :label="$t('large.responsibleteam')" min-width="110" /> |
| | | <el-table-column prop="patchArea" align="center" :label="$t('large.area')" min-width="110" /> |
| | | <el-table-column prop="qualityInspector" align="center" :label="$t('large.inspector')" min-width="110" /> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button @click="blinda = false">{{ $t('large.close') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | <el-dialog v-model="blinda" top="5vh" width="80%" :title="$t('large.brokeno')"> |
| | | <el-table height="400" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="reportingWorkTime" fixed align="center" :label="$t('large.time')" min-width="110" /> |
| | | <el-table-column prop="orderId" fixed align="center" :label="$t('large.number')" min-width="110" /> |
| | | <el-table-column prop="reportingWorkId" align="center" :label="$t('large.jobnumber')" min-width="120" /> |
| | | <el-table-column prop="productionId" align="center" :label="$t('large.productionnumber')" min-width="130" /> |
| | | <el-table-column prop="processId" align="center" :label="$t('large.cardnumber')" min-width="140" /> |
| | | <el-table-column prop="project" align="center" :label="$t('large.projectname')" min-width="110" /> |
| | | <el-table-column prop="batch" align="center" :label="$t('large.batch')" min-width="110" /> |
| | | <el-table-column prop="reviewer" align="center" :label="$t('large.detailID')" min-width="110" /> |
| | | <el-table-column prop="orderSort" align="center" :label="$t('large.serialnumber')" min-width="110" /> |
| | | <el-table-column prop="productName" align="center" :label="$t('large.productname')" :show-overflow-tooltip="true" min-width="220" /> |
| | | <el-table-column prop="technologyNumber" align="center" :label="$t('large.serial')" min-width="110" /> |
| | | <el-table-column prop="glassAddress" align="center" :label="$t('large.slicemarker')" min-width="130" /> |
| | | <el-table-column prop="patchNum" align="center" :label="$t('large.numberpatches')" min-width="110" /> |
| | | <el-table-column prop="width" align="center" :label="$t('large.width')" min-width="110" /> |
| | | <el-table-column prop="height" align="center" :label="$t('large.height')" min-width="110" /> |
| | | <el-table-column prop="shape" align="center" :label="$t('large.shape')" min-width="110" /> |
| | | <el-table-column prop="responsibleProcess" align="center" :label="$t('large.responsibleprocess')" min-width="110" /> |
| | | <el-table-column prop="patchProcesses" align="center" :label="$t('large.process')" min-width="110" /> |
| | | <el-table-column prop="breakageQuantity" align="center" :label="$t('large.numberfractions')" min-width="110" /> |
| | | <el-table-column prop="patchReason" align="center" :label="$t('large.breakreason')" min-width="110" /> |
| | | <el-table-column prop="patchType" align="center" :label="$t('large.breaktype')" min-width="110" /> |
| | | <el-table-column prop="responsiblePersonnel" align="center" :label="$t('large.responsiblepersonnel')" min-width="110" /> |
| | | <el-table-column prop="responsibleEquipment" align="center" :label="$t('large.responsiblequipment')" min-width="110" /> |
| | | <el-table-column prop="responsibleTeam" align="center" :label="$t('large.responsibleteam')" min-width="110" /> |
| | | <el-table-column prop="patchArea" align="center" :label="$t('large.area')" min-width="110" /> |
| | | <el-table-column prop="qualityInspector" align="center" :label="$t('large.inspector')" min-width="110" /> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer" style="text-align: center;"> |
| | | <el-button @click="blinda = false">{{ $t('large.close') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { Delete, Upload } from '@element-plus/icons-vue' |
| | |
| | | let chartInstance = null; |
| | | const blinda = ref(false) |
| | | const handleBinda = (row) => { |
| | | blinda.value = true; |
| | | blinda.value = true; |
| | | }; |
| | | const processesData = ref([ |
| | | |
| | | ]); |
| | | function getStatusType(warehousing) { |
| | | switch (warehousing) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'warning'; |
| | | case 2: |
| | | return 'success'; |
| | | } |
| | | switch (warehousing) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'warning'; |
| | | case 2: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusText(warehousing) { |
| | | switch (warehousing) { |
| | | case 0: |
| | | return t('large.notstocked'); |
| | | case 1: |
| | | return t('large.inboundstatus'); |
| | | case 2: |
| | | return t('large.allstatus'); |
| | | } |
| | | switch (warehousing) { |
| | | case 0: |
| | | return t('large.notstocked'); |
| | | case 1: |
| | | return t('large.inboundstatus'); |
| | | case 2: |
| | | return t('large.allstatus'); |
| | | } |
| | | } |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.awaitingRepairs[0] |
| | | tableDatab.value = data.DoingTask[0] |
| | | tableDatac.value = data.orders[0] |
| | | // adjustedRects.value = data.device[0].map(rect => ({ |
| | | // ...rect, |
| | | // completed: rect.completedQuantity, |
| | | // breakage: rect.breakageQuantity, |
| | | // thisProcess: rect.thisProcess, |
| | | // })); |
| | | tableData.value = data.awaitingRepairs[0] |
| | | tableDatab.value = data.DoingTask[0] |
| | | tableDatac.value = data.orders[0] |
| | | // adjustedRects.value = data.device[0].map(rect => ({ |
| | | // ...rect, |
| | | // completed: rect.completedQuantity, |
| | | // breakage: rect.breakageQuantity, |
| | | // thisProcess: rect.thisProcess, |
| | | // })); |
| | | }; |
| | | let socket; |
| | | // 设置图表 DOM 引用 |
| | | function setChartDom(index, el) { |
| | | if (!chartRefs.value[index]) { |
| | | chartRefs.value[index] = { dom: el, chart: null }; |
| | | } else { |
| | | chartRefs.value[index].dom = el; |
| | | } |
| | | if (!chartRefs.value[index]) { |
| | | chartRefs.value[index] = { dom: el, chart: null }; |
| | | } else { |
| | | chartRefs.value[index].dom = el; |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | socket = new WebSocket(socketUrl); |
| | | socket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | adjustedRects.value = data.device[0].map(rect => ({ |
| | | ...rect, |
| | | completedQuantity: rect.completedQuantity, |
| | | breakageQuantity: rect.breakageQuantity, |
| | | thisProcess: rect.thisProcess, |
| | | })); |
| | | console.log(adjustedRects.value); |
| | | // updateCharts(); |
| | | }; |
| | | adjustedRects.value.forEach((rect, index) => { |
| | | initChart(index, rect); |
| | | }); |
| | | // }; |
| | | socket = new WebSocket(socketUrl); |
| | | socket.onmessage = (event) => { |
| | | const data = JSON.parse(event.data); |
| | | processesData.value = data.device[0].map(rect => ({ |
| | | ...rect, |
| | | completedQuantity: rect.completedQuantity, |
| | | breakageQuantity: rect.breakageQuantity, |
| | | thisProcess: rect.thisProcess, |
| | | })); |
| | | renderPieCharts(); |
| | | console.log(processesData.value); |
| | | // updateCharts(); |
| | | }; |
| | | |
| | | // }; |
| | | }); |
| | | |
| | | |
| | | function initChart(index, rect) { |
| | | const { dom } = chartRefs.value[index] || { dom: null }; |
| | | if (dom) { |
| | | const chart = echarts.init(dom); |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '饼状图', |
| | | type: 'pie', |
| | | radius: ['50%','70%'], |
| | | data: [ |
| | | {value: rect.completedQuantity, name: '加工数量'}, |
| | | {value: rect.breakageQuantity, name: '次破数量'}, |
| | | console.log(rect.breakageQuantity) |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | chart.setOption(option); |
| | | chartRefs.value[index] = { ...chartRefs.value[index], chart }; |
| | | const renderPieCharts = () => { |
| | | processesData.value.forEach((data, index) => { |
| | | const chart = echarts.init(document.getElementById('pieChart_' + index)); |
| | | const options = { |
| | | title: { |
| | | text: `${data.thisProcess} `, |
| | | left: 'center', |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | }, |
| | | series: [ |
| | | { |
| | | name: `${data.thisProcess} `, |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | avoidLabelOverlap: false, |
| | | data: [ |
| | | { value: data.completedQuantity, name: t('large.completedquantity') }, |
| | | { value: data.breakageQuantity, name: t('large.scrapquantity') } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | }, |
| | | label: { |
| | | show: false, |
| | | position: 'center', |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | } |
| | | console.log(chartRefs.value[index]); |
| | | } |
| | | |
| | | // 更新图表 |
| | | // function updateCharts() { |
| | | // adjustedRects.value.forEach((rect, index) => { |
| | | // const { chart } = chartRefs.value[index] || { chart: null }; |
| | | // if (chart) { |
| | | // chart.setOption({ |
| | | // series: [{ |
| | | // data: [ |
| | | // { value: rect.completedQuantity, name: '加工数量' }, |
| | | // { value: rect.breakageQuantity, name: '次破数量' }, |
| | | // ], |
| | | // }], |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // 初始化图表 |
| | | // function initChart(index, rect) { |
| | | // const chartDom = ref(`chartDom${index}`).value; |
| | | // console.log(ref(`chartDom${index}`).value); |
| | | // const chart = echarts.init(chartDom); |
| | | // const option = { |
| | | // tooltip: { |
| | | // trigger: 'item' |
| | | // }, |
| | | // legend: { |
| | | // orient: 'vertical', |
| | | // left: 'left', |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: '饼状图', |
| | | // type: 'pie', |
| | | // radius: ['50%','70%'], |
| | | // data: [ |
| | | // {value: rect.completed, name: '加工数量'}, |
| | | // {value: rect.breakage, name: '次破数量'}, |
| | | // ], |
| | | // emphasis: { |
| | | // itemStyle: { |
| | | // shadowBlur: 10, |
| | | // shadowOffsetX: 0, |
| | | // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // } |
| | | // } |
| | | // } |
| | | // ] |
| | | // }; |
| | | // chart.setOption(option); |
| | | // } |
| | | // 清理 WebSocket 连接 |
| | | chart.setOption(options); |
| | | }); |
| | | }; |
| | | |
| | | |
| | | onUnmounted(() => { |
| | | socket.close(); |
| | | socket.close(); |
| | | }); |
| | | |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | // fetchFlowCardId(); |
| | | // fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | </script> |
| | | |
| | | |
| | | <style scoped> |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | /* background-color: lightblue; 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | #dialog-footer{ |
| | | text-align: center; |
| | | margin-top: -15px; |
| | | |
| | | |
| | | |
| | | .echarts-container { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 20px; |
| | | } |
| | | |
| | | .echarts-item { |
| | | width: 150px; |
| | | height: 150px; |
| | | margin: 20px; |
| | | } |
| | | |
| | | .pie-chart { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | public void saveGlassInfo(List<GlassInfo> glassinfo) { |
| | | this.saveBatch(glassinfo); |
| | | } |
| | | /* |
| | | |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | |
| | | .collect(Collectors.toList()); |
| | | log.info("result666: {}", result); |
| | | return result; |
| | | }*/ |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | |
| | | for (Map<String, Object> cutTerritory : cutTerritorys) { |
| | | EdgStorageCageDetails edgStorageCageDetails=baseMapper.selectOne(new MPJLambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .selectAll(EdgStorageCageDetails.class) |
| | | .eq(EdgStorageCageDetails::getGlassId, cutTerritory.get("glass_id"))); |
| | | .eq(EdgStorageCageDetails::getGlassId, cutTerritory.get("glass_id")) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | // log.info("内容:{}-------{}",cutTerritory,edgStorageCageDetails); |
| | | if(edgStorageCageDetails!=null){ |
| | | cutTerritory.put("glass_state",edgStorageCageDetails.getState()); |
| | |
| | |
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import com.mes.utils.Result;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | |
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<LoadPosition>> findList(@RequestBody LoadPosition params) {
|
| | | public Result findList(@RequestBody LoadPosition params) {
|
| | | List<LoadPosition> result = loadPositionService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<LoadPosition> findById(@PathVariable("id") Long id) {
|
| | | LoadPosition loadPosition = loadPositionService.findById(id);
|
| | | return ResponseEntity.ok(loadPosition);
|
| | | public Result findById(@PathVariable("id") Long id) {
|
| | | LoadPosition loadPosition = loadPositionService.getBaseMapper().selectById(id);
|
| | | return Result.success(loadPosition);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.insert(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result insert( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.save(loadPosition);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.update(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result update( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.updateById(loadPosition);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = loadPositionService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result delete(@PathVariable("id") Long id) {
|
| | | int result = loadPositionService.getBaseMapper().deleteById(id);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | |
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Data
|
| | | @Component
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | | @TableName("load_position")
|
| | | @ApiModel(value = "LoadPosition", description = " ")
|
| | | public class LoadPosition implements Serializable{
|
| | |
| | | private Integer routeGroup;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public Long getMachineId() {
|
| | | return machineId;
|
| | | }
|
| | |
|
| | | public void setMachineId(Long machineId) {
|
| | | this.machineId = machineId;
|
| | | }
|
| | |
|
| | | public String getFlag() {
|
| | | return flag;
|
| | | }
|
| | |
|
| | | public void setFlag(String flag) {
|
| | | this.flag = flag;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getStorageTaskId() {
|
| | | return storageTaskId;
|
| | | }
|
| | |
|
| | | public void setStorageTaskId(Long storageTaskId) {
|
| | | this.storageTaskId = storageTaskId;
|
| | | }
|
| | |
|
| | | public Integer getTypeFlag() {
|
| | | return typeFlag;
|
| | | }
|
| | |
|
| | | public void setTypeFlag(Integer typeFlag) {
|
| | | this.typeFlag = typeFlag;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | } |
| | |
| | |
|
| | | List<LoadPosition> findList(LoadPosition params);
|
| | |
|
| | | LoadPosition findById(Long id);
|
| | |
|
| | | boolean insert(LoadPosition loadPosition);
|
| | |
|
| | | boolean update(LoadPosition loadPosition);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
| | |
| | | return loadPositionMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public LoadPosition findById(Long id) {
|
| | | return loadPositionMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(LoadPosition loadPosition) {
|
| | | return save(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(LoadPosition loadPosition) {
|
| | | return updateById(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return loadPositionMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | package com.mes.rawusage.controller;
|
| | |
|
| | | import com.mes.utils.Result;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | |
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<RawUsage>> findList(@RequestBody RawUsage params) {
|
| | | public Result findList(@RequestBody RawUsage params) {
|
| | | List<RawUsage> result = rawUsageService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<RawUsage> findById(@PathVariable("id") Long id) {
|
| | | RawUsage rawUsage = rawUsageService.findById(id);
|
| | | return ResponseEntity.ok(rawUsage);
|
| | | public Result findById(@PathVariable("id") Long id) {
|
| | | RawUsage rawUsage = rawUsageService.getById(id);
|
| | | return Result.success(rawUsage);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.insert(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result insert( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.save(rawUsage);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.update(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result update( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.updateById(rawUsage);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = rawUsageService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result delete(@PathVariable("id") Long id) {
|
| | | int result = rawUsageService.getBaseMapper().deleteById(id);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Data
|
| | | @Component
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | | @TableName("raw_usage")
|
| | | @ApiModel(value = "RawUsage", description = " ")
|
| | | public class RawUsage implements Serializable{
|
| | |
| | | private String batchId;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getRawType() {
|
| | | return rawType;
|
| | | }
|
| | |
|
| | | public void setRawType(String rawType) {
|
| | | this.rawType = rawType;
|
| | | }
|
| | |
|
| | | public Float getRawWidth() {
|
| | | return rawWidth;
|
| | | }
|
| | |
|
| | | public void setRawWidth(Float rawWidth) {
|
| | | this.rawWidth = rawWidth;
|
| | | }
|
| | |
|
| | | public Float getRawHeight() {
|
| | | return rawHeight;
|
| | | }
|
| | |
|
| | | public void setRawHeight(Float rawHeight) {
|
| | | this.rawHeight = rawHeight;
|
| | | }
|
| | |
|
| | | public Float getRawThickness() {
|
| | | return rawThickness;
|
| | | }
|
| | |
|
| | | public void setRawThickness(Float rawThickness) {
|
| | | this.rawThickness = rawThickness;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getColor() {
|
| | | return color;
|
| | | }
|
| | |
|
| | | public void setColor(String color) {
|
| | | this.color = color;
|
| | | }
|
| | |
|
| | | public Integer getPieces() {
|
| | | return pieces;
|
| | | }
|
| | |
|
| | | public void setPieces(Integer pieces) {
|
| | | this.pieces = pieces;
|
| | | }
|
| | |
|
| | | public Integer getLeftPieces() {
|
| | | return leftPieces;
|
| | | }
|
| | |
|
| | | public void setLeftPieces(Integer leftPieces) {
|
| | | this.leftPieces = leftPieces;
|
| | | }
|
| | |
|
| | | public String getQrcode() {
|
| | | return qrcode;
|
| | | }
|
| | |
|
| | | public void setQrcode(String qrcode) {
|
| | | this.qrcode = qrcode;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getProductionTime() {
|
| | | return productionTime;
|
| | | }
|
| | |
|
| | | public void setProductionTime(Date productionTime) {
|
| | | this.productionTime = productionTime;
|
| | | }
|
| | |
|
| | | public String getBatchId() {
|
| | | return batchId;
|
| | | }
|
| | |
|
| | | public void setBatchId(String batchId) {
|
| | | this.batchId = batchId;
|
| | | }
|
| | |
|
| | | } |
| | |
| | |
|
| | | List<RawUsage> findList(RawUsage params);
|
| | |
|
| | | RawUsage findById(Long id);
|
| | |
|
| | | boolean insert(RawUsage rawUsage);
|
| | |
|
| | | boolean update(RawUsage rawUsage);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
| | |
| | | return rawUsageMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public RawUsage findById(Long id) {
|
| | | return rawUsageMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(RawUsage rawUsage) {
|
| | | return save(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(RawUsage rawUsage) {
|
| | | return updateById(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return rawUsageMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | package com.mes.shelfrack.controller;
|
| | |
|
| | | import com.mes.utils.Result;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | |
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<ShelfRack>> findList(@RequestBody ShelfRack params) {
|
| | | public Result findList(@RequestBody ShelfRack params) {
|
| | | List<ShelfRack> result = shelfRackService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<ShelfRack> findById(@PathVariable("id") Long id) {
|
| | | ShelfRack shelfRack = shelfRackService.findById(id);
|
| | | return ResponseEntity.ok(shelfRack);
|
| | | public Result findById(@PathVariable("id") Long id) {
|
| | | ShelfRack shelfRack = shelfRackService.getBaseMapper().selectById(id);
|
| | | return Result.success(shelfRack);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.insert(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result insert( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.save(shelfRack);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.update(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result update( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.updateById(shelfRack);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = shelfRackService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result delete(@PathVariable("id") Long id) {
|
| | | int result = shelfRackService.getBaseMapper().deleteById(id);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Data
|
| | | @Component
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | | @TableName("shelf_rack")
|
| | | @ApiModel(value = "ShelfRack", description = " ")
|
| | | public class ShelfRack implements Serializable{
|
| | |
| | | private String enableState;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getRawPackageId() {
|
| | | return rawPackageId;
|
| | | }
|
| | |
|
| | | public void setRawPackageId(Long rawPackageId) {
|
| | | this.rawPackageId = rawPackageId;
|
| | | }
|
| | |
|
| | | public Date getModTime() {
|
| | | return modTime;
|
| | | }
|
| | |
|
| | | public void setModTime(Date modTime) {
|
| | | this.modTime = modTime;
|
| | | }
|
| | |
|
| | | public String getEnableState() {
|
| | | return enableState;
|
| | | }
|
| | |
|
| | | public void setEnableState(String enableState) {
|
| | | this.enableState = enableState;
|
| | | }
|
| | |
|
| | | } |
| | |
| | |
|
| | | List<ShelfRack> findList(ShelfRack params);
|
| | |
|
| | | ShelfRack findById(Long id);
|
| | |
|
| | | boolean insert(ShelfRack shelfRack);
|
| | |
|
| | | boolean update(ShelfRack shelfRack);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
| | |
| | | return shelfRackMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public ShelfRack findById(Long id) {
|
| | | return shelfRackMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(ShelfRack shelfRack) {
|
| | | return save(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(ShelfRack shelfRack) {
|
| | | return updateById(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return shelfRackMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | package com.mes.storagetask.controller;
|
| | |
|
| | | import com.mes.utils.Result;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | |
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<StorageTask>> findList(@RequestBody StorageTask params) {
|
| | | public Result findList(@RequestBody StorageTask params) {
|
| | | List<StorageTask> result = storageTaskService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<StorageTask> findById(@PathVariable("id") Long id) {
|
| | | StorageTask storageTask = storageTaskService.findById(id);
|
| | | return ResponseEntity.ok(storageTask);
|
| | | public Result findById(@PathVariable("id") Long id) {
|
| | | StorageTask storageTask = storageTaskService.getBaseMapper().selectById(id);
|
| | | return Result.success(storageTask);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.insert(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result insert( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.save(storageTask);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.update(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result update( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.updateById(storageTask);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = storageTaskService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | public Result delete(@PathVariable("id") Long id) {
|
| | | int result = storageTaskService.getBaseMapper().deleteById(id);
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Data
|
| | | @Component
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | | @TableName("storage_task")
|
| | | @ApiModel(value = "StorageTask", description = " ")
|
| | | public class StorageTask implements Serializable{
|
| | |
| | | private Date finishTime;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTaskType() {
|
| | | return taskType;
|
| | | }
|
| | |
|
| | | public void setTaskType(String taskType) {
|
| | | this.taskType = taskType;
|
| | | }
|
| | |
|
| | | public String getTaskState() {
|
| | | return taskState;
|
| | | }
|
| | |
|
| | | public void setTaskState(String taskState) {
|
| | | this.taskState = taskState;
|
| | | }
|
| | |
|
| | | public String getShelfRack() {
|
| | | return shelfRack;
|
| | | }
|
| | |
|
| | | public void setShelfRack(String shelfRack) {
|
| | | this.shelfRack = shelfRack;
|
| | | }
|
| | |
|
| | | public String getLoadRack() {
|
| | | return loadRack;
|
| | | }
|
| | |
|
| | | public void setLoadRack(String loadRack) {
|
| | | this.loadRack = loadRack;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getFinishTime() {
|
| | | return finishTime;
|
| | | }
|
| | |
|
| | | public void setFinishTime(Date finishTime) {
|
| | | this.finishTime = finishTime;
|
| | | }
|
| | |
|
| | | } |
| | |
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | | StorageTask findById(Long id);
|
| | |
|
| | | boolean insert(StorageTask storageTask);
|
| | |
|
| | | boolean update(StorageTask storageTask);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
| | |
| | | return storageTaskMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public StorageTask findById(Long id) {
|
| | | return storageTaskMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(StorageTask storageTask) {
|
| | | return save(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(StorageTask storageTask) {
|
| | | return updateById(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return storageTaskMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | } |
| | | return emptyList.get(0); |
| | | } |
| | | /* |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> selectCacheMax() { |
| | |
| | | |
| | | ); |
| | | } |
| | | */ |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public boolean updateDownStorageCage(DownStorageCage downStorageCage) { |
| | | DownStorageCage downItem = baseMapper.selectById(downStorageCage.getId()); |
| | | downItem.setEnableState(downStorageCage.getEnableState()); |
| | | baseMapper.updateById(downItem); |
| | | return true; |
| | | if (downItem != null) { |
| | | downItem.setEnableState(downStorageCage.getEnableState()); |
| | | int rowsAffected = baseMapper.updateById(downItem); |
| | | if (rowsAffected > 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改理片笼信息 功能:对笼内栅格玻璃 【添加/删除/更换】 |
| | | * |
| | |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.entity.DownWorkstionAndDownGlassinfo; |
| | |
| | | |
| | | @Autowired |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | @Autowired(required=false) |
| | | @Autowired(required = false) |
| | | private DownWorkstationTaskMapper downWorkstationTaskMapper; |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; |
| | |
| | | |
| | | //工位显示 |
| | | @Override |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start,int end) { |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start, int end) { |
| | | MPJQueryWrapper<DownWorkstation> queryWrapper = new MPJQueryWrapper<>(); |
| | | queryWrapper.select("t.workstation_id", "t.flow_card_id", "COALESCE(SUM(b.width), 0) AS totalwidth", "COALESCE(SUM(b.height), 0) AS totalheight") |
| | | .leftJoin("down_glass_info b on t.flow_card_id = b.flow_card_id") |
| | |
| | | |
| | | ; |
| | | |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | // List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | // List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DownWorkstionAndDownGlassinfo downWorkstionAndDownGlassinfo : workstationList) { |
| | | Map<String, Object> rack = new HashMap<>(); |
| | |
| | | List<DownGlassInfo> downGlassInfoList = downGlassInfoMapper.selectList(glassInfoQueryWrapper); |
| | | |
| | | |
| | | if (!downGlassInfoList.isEmpty()) { |
| | | if (!downGlassInfoList.isEmpty()) { |
| | | |
| | | item.put("downGlassInfoList", downGlassInfoList); |
| | | |
| | |
| | | rack.put("item", item); |
| | | result.add(rack); |
| | | } |
| | | log.info("result"+(result)); |
| | | log.info("result" + (result)); |
| | | return result; // 返回最终结果 |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public void updateFlowCardIdAndCount(String flowCardId, int workstationId,int layer) { |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,layer); |
| | | public void updateFlowCardIdAndCount(String flowCardId, int workstationId, int layer) { |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId, layer); |
| | | QueryWrapper<Damage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process_id", flowCardId); |
| | | queryWrapper.eq("technology_number", layer); |
| | | |
| | | int otherNumber=damageservice.count(queryWrapper); |
| | | int otherNumber = damageservice.count(queryWrapper); |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | |
| | | |
| | | baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public boolean updateDownWorkstationstate(DownWorkstation downWorkstation) { |
| | | |
| | | DownWorkstation downWork = baseMapper.selectById(downWorkstation.getId()); |
| | | downWork.setEnableState(downWorkstation.getEnableState()); |
| | | baseMapper.updateById(downWork); |
| | | return true; |
| | | |
| | | if (downWork != null) { |
| | | |
| | | downWork.setEnableState(downWorkstation.getEnableState()); |
| | | |
| | | baseMapper.updateById(downWork); |
| | | |
| | | return true; |
| | | } else { |
| | | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | Integer endCell = null; |
| | | if (isBind) { |
| | | if (!isBind) { |
| | | //获取空架子信息,将空架子信息绑定流程卡 |
| | | DownWorkstation emptyDownWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>() |
| | | .isNull(DownWorkstation::getFlowCardId).orderByDesc(DownWorkstation::getWorkstationId).last("limit 1")); |
| | |
| | | mes: |
| | | maxWidth: 2500 #下片的最大宽度 |
| | | maxHeight: 2000 #下片的最大高度 |
| | | minWidth: 400 #下片的最大宽度 |
| | | minHeight: 400 #下片的最大高度 |
| | | minWidth: 400 #下片的最小宽度 |
| | | minHeight: 400 #下片的最小高度 |
| | | throughWidth: 3000 |
| | | throughHeight: 2500 |
| | | threshold: 5 #下片的最大阈值 |
| | |
| | | import com.mes.downstorage.service.impl.DownStorageCageDetailsServiceImpl; |
| | | import com.mes.downstorage.service.impl.DownStorageCageServiceImpl; |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl; |
| | | import com.mes.glassinfo.service.impl.GlassInfoServiceImpl; |
| | |
| | | //downGlassTaskService.getUnloadingTaskState(); |
| | | } |
| | | |
| | | @Test |
| | | public void updateDownWorkstationstate() { |
| | | |
| | | DownWorkstation downWorkstation= new DownWorkstation(); |
| | | |
| | | downWorkstation.setId(1); |
| | | downWorkstation.setEnableState(0); |
| | | downWorkstationServiceImpl.updateDownWorkstationstate(downWorkstation); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void updateDownstate() { |
| | | |
| | | DownStorageCage downStorageCage= new DownStorageCage(); |
| | | |
| | | downStorageCage.setId(1); |
| | | downStorageCage.setEnableState(0); |
| | | downStorageCageServiceImpl.updateDownStorageCage(downStorageCage); |
| | | } |
| | | |
| | | |
| | | /* @Test |
| | | public void updateDownStorageCage() { |
| | | |