Merge remote-tracking branch 'origin/master'
31个文件已修改
6 文件已重命名
3个文件已添加
| | |
| | | down:'下一页', |
| | | now:'当前页显示', |
| | | tit:'条数据', |
| | | temperingqueries:'钢化查询', |
| | | specifytempering:'指定钢化', |
| | | projectnumber:'工程号', |
| | | layoutnumber:'钢化版图号', |
| | | numberglasses:'玻璃数量', |
| | | specifytemperinga:'是否指定钢化该条信息?', |
| | | }, |
| | | workOrder:{ |
| | | glassID:'玻璃ID', |
| | |
| | | <!-- <el-button type="success" size="mini" @click="addglass()">添加原片</el-button> -->
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | |
| | | </el-table>
|
| | | <el-pagination
|
| | | v-if="totalItems > 0"
|
| | | background
|
| | | layout="prev, pager, next"
|
| | | :total="totalItems"
|
| | | :page-size="pageSize"
|
| | | @current-change="handleCurrentChange"
|
| | | ></el-pagination>
|
| | |
|
| | |
|
| | | </el-dialog>
|
| | |
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | |
|
| | | const totalItems = ref(0);
|
| | | totalItems.value = 10;
|
| | | const pageSize = 10;
|
| | | let currentPage = ref(1);
|
| | | const handleCurrentChange = (val) => {
|
| | |
|
| | | currentPage.value = val;
|
| | | |
| | | };
|
| | |
|
| | | const getTagType2 =(status) => {
|
| | | switch (status) {
|
| | | case 'completed':
|
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisible = ref(false) |
| | | const dialogFormVisiblea = ref(true) |
| | | const dialogFormVisibleb = ref(false) |
| | | const width = ref(); |
| | | const height = ref(); |
| | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; |
| | | const handleMessage = (data) => { |
| | | // 进炉中 |
| | | adjustedRects.value = data.intoGlass[0].map(rect => ({ |
| | | if(data.intoGlass!=null){ |
| | | adjustedRects.value = data.intoGlass[0].map(rect => ({ |
| | | ...rect, |
| | | xcoordinate: rect.xCoordinate * 0.3, |
| | | ycoordinate: rect.ycoordinate * 0.3, |
| | | ycoordinate: rect.yCoordinate * 0.3, |
| | | width: rect.width * 0.2, |
| | | height: rect.height * 0.2, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | })); |
| | | adjustedRects2.value = data.intoGlass2[0].map(rect => ({ |
| | | } |
| | | if(data.intoGlass2!=null){ |
| | | adjustedRects2.value = data.intoGlass2[0].map(rect => ({ |
| | | ...rect, |
| | | xcoordinate: rect.xCoordinate * 0.3, |
| | | ycoordinate: rect.ycoordinate * 0.3, |
| | | ycoordinate: rect.yCoordinate * 0.3, |
| | | width: rect.width * 0.2, |
| | | height: rect.height * 0.2, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | })); |
| | | console.log(data.intoGlass[0]); |
| | | } |
| | | // 进炉前 |
| | | adjustedRectsa.value = data.waitingGlass[0].map(rect => ({ |
| | | if(data.waitingGlass!=null){ |
| | | adjustedRectsa.value = data.waitingGlass[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xCoordinate * 0.5, |
| | | ycoordinate: rect.ycoordinate * 0.5, |
| | | x: rect.xCoordinate * 0.4, |
| | | y: rect.yCoordinate * 0.4, |
| | | width: rect.width * 0.4, |
| | | height: rect.height * 0.4, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | state: rect.state, |
| | | })); |
| | | } |
| | | // 已出炉 |
| | | if(data.outGlass!=null){ |
| | | adjustedRectsb.value = data.outGlass[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | x: rect.xCoordinate * 0.4, |
| | | y: rect.yCoordinate * 0.4, |
| | | width: rect.width * 0.4, |
| | | height: rect.height * 0.4, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | state: rect.state |
| | | })); |
| | | // 已出炉 |
| | | adjustedRectsb.value = data.outGlass[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xCoordinate * 0.5, |
| | | ycoordinate: rect.ycoordinate * 0.5, |
| | | width: rect.width * 0.4, |
| | | height: rect.height * 0.4, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | state: rect.state |
| | | })); |
| | | console.log(data.outGlass[0]); |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | |
| | | </script> |
| | | <template> |
| | | <div style="margin-top: 10px;"> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">{{ $t('processCard.intofurnace') }}</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >{{ $t('processCard.beforefurnace') }}</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >{{ $t('processCard.beforefurnace') }}</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">{{ $t('processCard.intofurnace') }}</el-button> |
| | | <el-button id="searchButton" type="success" @click="dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.outfurnace') }}</el-button> |
| | | <div v-if="dialogFormVisible" > |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading"> |
| | | <div style="width: 49%;float: left;background-color: #f4f4f5;height: 550px;"> |
| | | <el-scrollbar height="630px"> |
| | | <div v-if="adjustedRects.length > 0"> |
| | | <div style="text-align: center;">流程卡: {{ adjustedRects[0].flowCardId }}</div> |
| | | <el-scrollbar height="630px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <div style="width: 49%;float: right;background-color: #f4f4f5;height: 550px;"> |
| | | <el-scrollbar height="550px"> |
| | | <div v-if="adjustedRects2.length > 0"> |
| | | <div style="text-align: center;">流程卡: {{ adjustedRects2[0].flowCardId }}</div> |
| | | <el-scrollbar height="550px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects2" |
| | |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisiblea"> |
| | | <!-- 进炉前 --> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div v-if="adjustedRectsa.length > 0"> |
| | | <div style="text-align: center;">流程卡: {{ adjustedRectsa[0].flowCardId }}</div> |
| | | <el-scrollbar height="550px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div style="position: relative;width: 100%;height: 100%;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRectsa" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, |
| | | :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div class="centered-text"> |
| | | <div>{{ rect.glassId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisibleb"> |
| | | <!-- 已出炉 --> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div v-if="adjustedRectsb.length > 0"> |
| | | <div style="text-align: center;">流程卡: {{ adjustedRectsb[0].flowCardId }}</div> |
| | | <el-scrollbar height="550px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRectsb" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, |
| | | :style="{ position: 'absolute', top: `${rect.y}px`, left: `${rect.x}px`, |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | </style> |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | adjustedRects.value = data.overGlass[0].map(rect => ({ |
| | | if(data.overGlass!=null){ |
| | | adjustedRects.value = data.overGlass[0].map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xCoordinate * 0.5, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate * 0.5, |
| | | xcoordinate: rect.xCoordinate * 0.4, // 将x值除以3 |
| | | ycoordinate: rect.yCoordinate * 0.4, |
| | | width: rect.width * 0.4, |
| | | height: rect.height * 0.4, |
| | | widtha: rect.width, |
| | | heighta: rect.height, |
| | | })); |
| | | console.log(adjustedRects.value); |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | |
| | | <div style="margin-top: 10px;"> |
| | | <div> |
| | | <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div v-if="adjustedRects.length > 0"> |
| | | <div style="text-align: center;">流程卡: {{ adjustedRects[0].flowCardId }}</div> |
| | | <el-scrollbar height="600px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | |
| | | width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div >{{ rect.glassId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | </style> |
| | |
| | | <el-option label="待报工" value="2"></el-option> |
| | | <el-option label="已报工" value="3"></el-option> |
| | | </el-select> |
| | | <el-select v-model="report.workProcedure" placeholder="清选择工序"> |
| | | <el-select v-model="report.workingProcedure" placeholder="清选择工序"> |
| | | <el-option label="全部" value="0"></el-option> |
| | | <el-option label="切割" value="1"></el-option> |
| | | <el-option label="磨边" value="2"></el-option> |
| | |
| | | <el-button type="success">报工</el-button> |
| | | <el-table height="100%" ref="table" :data="reportData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="reportData.line" align="center" label="线路" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="工序" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="玻璃id" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="钢化版图id" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="生产时间" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="备注" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="类型" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="流程卡" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="序号" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="层" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="破损类型" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="破损原因" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="责任工序" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="责任人员" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="责任班组" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="责任设备" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="报工班组" min-width="120" /> |
| | | <el-table-column prop="reportData.line" align="center" label="报工设备" min-width="120" /> |
| | | <el-table-column prop="teamsGroupsName" align="center" label="报工班组" min-width="120" /> |
| | | <el-table-column prop="deviceName" align="center" label="报工设备" min-width="120" /> |
| | | <el-table-column prop="line" align="center" label="线路" min-width="120" /> |
| | | <el-table-column prop="workingProcedure" align="center" label="工序" min-width="120" /> |
| | | <el-table-column prop="glassId" align="center" label="玻璃id" min-width="120" /> |
| | | <el-table-column prop="engineerId" align="center" label="工程号" min-width="120" /> |
| | | <el-table-column prop="temperingLayoutId" align="center" label="钢化版图id" min-width="120" /> |
| | | <el-table-column prop="damageTime" align="center" label="生产时间" min-width="120" /> |
| | | <el-table-column prop="type" align="center" label="类型" min-width="120" /> |
| | | <el-table-column prop="status" align="center" label="状态" min-width="120" /> |
| | | <el-table-column prop="processId" align="center" label="流程卡" min-width="120" /> |
| | | <el-table-column prop="orderNumber" align="center" label="序号" min-width="120" /> |
| | | <el-table-column prop="technologyNumber" align="center" label="层" min-width="120" /> |
| | | <el-table-column prop="breakageType" align="center" label="破损类型" min-width="120" /> |
| | | <el-table-column prop="breakageReason" align="center" label="破损原因" min-width="120" /> |
| | | <el-table-column prop="responsibleProcess" align="center" label="责任工序" min-width="120" /> |
| | | <el-table-column prop="responsiblePersonnel" align="center" label="责任人员" min-width="120" /> |
| | | <el-table-column prop="responsibleTeam" align="center" label="责任班组" min-width="120" /> |
| | | <el-table-column prop="responsibleEquipment" align="center" label="责任设备" min-width="120" /> |
| | | <el-table-column prop="remark" align="center" label="备注" min-width="120" /> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | const report = ref({ |
| | | type: '', |
| | | status: '', |
| | | workProcedure: '', |
| | | type: '0', |
| | | status: '0', |
| | | workingProcedure: '0', |
| | | }); |
| | | const reportData = ref([]) |
| | | const timeRange = ref([new Date(2000, 10, 10), new Date(2200, 10, 11)]) |
| | | const timeRange = ref(["2022-01-01", "2022-01-01"]) |
| | | |
| | | |
| | | // 查询数据 |
| | | const selectReportData = async () => { |
| | | console.log(timeRange.value[0]) |
| | | const response = await request.post("/loadGlass/damage/selectDamage", { |
| | | const response = await request.post("/cacheVerticalGlass/damage/selectDamage", { |
| | | startTime: timeRange.value[0], |
| | | endTime: timeRange.value[1], |
| | | type: report.value.type, |
| | | status: report.value.status, |
| | | workProcedure: report.value.workProcedure, |
| | | workingProcedure: report.value.workingProcedure |
| | | }) |
| | | if (response.code === 200) { |
| | | reportData.value = response.data; |
| | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | const responses = await request.post("/cacheVerticalGlass/damage/insertDamage", { |
| | | glassId:"P24060403|3|6", |
| | | line:"2001", |
| | | workingProcedure:"冷加工", |
| | | remark:"", |
| | | status:"2" |
| | | }) |
| | | }; |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | |
| | | const adda = ref(false) |
| | | const flake = ref(false) |
| | | const flakea = ref(false) |
| | | const flakeb = ref(false) |
| | | const flakec = ref(false) |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | const ida = ref(null); |
| | |
| | | // ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | request.get("/loadGlass/LoadGlass/list").then((res) => { |
| | | window.localStorage.setItem('patternWidth', res.data.patternWidth) |
| | | window.localStorage.setItem('workstationId', res.data.workstationId) |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | tableDataa.value = res.data |
| | | console.log(res.data.patternWidth); |
| | | |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | let patternWidth = window.localStorage.getItem('patternWidth') |
| | | if (patternWidth !== '' || workstationId == '1') { |
| | | flake.value = true |
| | | } else if (patternWidth !== '' || workstationId == '2') { |
| | | flakea.value = true |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | // router.push("/login") |
| | | onMounted(() => { |
| | | list(''); |
| | | fetchOptions(''); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onMounted(() => { |
| | | }); |
| | | const list = async () => { |
| | | try { |
| | | const response = await request.get('/loadGlass/LoadGlass/list'); |
| | | if (response.code == 200) { |
| | | tableDataa.value = response.data |
| | | if (tableDataa.value.length === 4) { |
| | | if (tableDataa.value[0].patternHeight > 0) { |
| | | flake.value = true; |
| | | } |
| | | }); |
| | | if (tableDataa.value[1].patternHeight > 0) { |
| | | flakea.value = true; |
| | | } |
| | | if (tableDataa.value[2].patternHeight > 0) { |
| | | flakeb.value = true; |
| | | } |
| | | if (tableDataa.value[3].patternHeight > 0) { |
| | | flakec.value = true; |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | | } catch (error) { |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | // 假设这是您的响应处理函数 |
| | | // request.get("/loadGlass/LoadGlass/list").then((res) => { |
| | | // if (res.code == 200) { |
| | | // tableDataa.value = res.data |
| | | // if (tableDataa.value.length === 4) { |
| | | // if (tableDataa.value[0].patternHeight > 0) { |
| | | // flake.value = true; |
| | | // } |
| | | // if (tableDataa.value[1].patternHeight > 0) { |
| | | // flakea.value = true; |
| | | // } |
| | | // if (tableDataa.value[2].patternHeight > 0) { |
| | | // flakeb.value = true; |
| | | // } |
| | | // if (tableDataa.value[3].patternHeight > 0) { |
| | | // flakec.value = true; |
| | | // } |
| | | // } |
| | | // } else { |
| | | // ElMessage.warning(res.message) |
| | | // // router.push("/login") |
| | | // } |
| | | // }); |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | | |
| | | if(data.prioritylist!=null){ |
| | | tableData.splice(0, tableData.length, ...data.prioritylist[0]); |
| | | } |
| | | if(data.list!=null){ |
| | | tableDataa.value = data.list[0] |
| | | // console.log("更新后数据", tableData); |
| | | } |
| | | }; |
| | | const requestData = { |
| | | state: 100 |
| | |
| | | options.value = []; // 清空选项列表 |
| | | } |
| | | }; |
| | | // 初始化加载数据(如果需要) |
| | | onMounted(() => { |
| | | fetchOptions(''); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | const user = ref(''); |
| | |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | ida.value = row.id; |
| | | console.log(ida.value); |
| | | add.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | // 添加 |
| | | const handleConfirm = async () => { |
| | | console.log(ida.value); |
| | | // console.log('id.value:', id.value); |
| | | if ((ida.value === 2 || ida.value === 4) && (parseInt(patternHeight.value, 10) >= 2700 )) { |
| | | if ((ida.value === 2 || ida.value === 4) && (parseInt(selectedValuea.value, 10) >= 2700 )) { |
| | | try { |
| | | const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { |
| | | id: workstationId.value, |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.value) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | add.value = false; |
| | | tableDataa.value = response.data; |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | let patternHeight = window.localStorage.getItem('patternHeight') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | flake.value = true |
| | | } else if (patternHeight !== '' && workstationId === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | flakec.value = true |
| | | } |
| | | selectedValuea.value = ''; |
| | | selectedValue.value = ''; |
| | | selectedValueb.value = ''; |
| | | selectedValuec.value = ''; |
| | | number.value = ''; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | flake.value = true |
| | | } else if (workstationId == '2'){ |
| | | flakea.value = true |
| | | } |
| | | list() |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.value) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | add.value = false; |
| | | tableDataa.value = response.data; |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | let patternHeight = window.localStorage.getItem('patternHeight') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | flake.value = true |
| | | } else if (patternHeight !== '' && workstationId === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | flakec.value = true |
| | | } |
| | | selectedValuea.value = ''; |
| | | selectedValue.value = ''; |
| | | selectedValueb.value = ''; |
| | | selectedValuec.value = ''; |
| | | number.value = ''; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | flake.value = true |
| | | } else if (workstationId == '2'){ |
| | | flakea.value = true |
| | | } |
| | | list() |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | tableDataa.value = response.data; |
| | | window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId == '1') { |
| | | // window.localStorage.setItem('workstationId', response.data.workstationId) |
| | | // let workstationId = window.localStorage.getItem('workstationId') |
| | | if (workstationId.value == '1') { |
| | | flake.value = false |
| | | } else if (workstationId == '2'){ |
| | | } else if (workstationId.value == '2'){ |
| | | flakea.value = false |
| | | }else if (workstationId.value == '3'){ |
| | | flakeb.value = false |
| | | }else if (workstationId.value == '4'){ |
| | | flakec.value = false |
| | | } |
| | | } else { |
| | | list() |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | const data = JSON.parse(event.data); // 解析消息为JSON |
| | | |
| | | if (data && Array.isArray(data.InkageStatus) && data.InkageStatus.length > 0) { |
| | | if(data.InkageStatus!=null){ |
| | | const status = data.InkageStatus[0]; |
| | | cuttingMachine.value = status; |
| | | upstatus.value = status === '1' ? t('basicData.machine') : t('basicData.machineaa'); |
| | | cuttingMachineStatusColor.value = status === '1' ? 'green' : '#911005'; |
| | | inKageWord.value = status === '1' ? 0 : 1; |
| | | } |
| | | } else { |
| | | // 处理错误情况或无效数据 |
| | | console.error('接收到的数据无效', data); |
| | |
| | | </template> |
| | | </el-dialog> --> |
| | | <div id="parent"> |
| | | <img src="../../assets/shangpianji.png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 500px;"> |
| | | <img src="../../assets/shangpian.png" alt="" style="max-width: 40%;max-height: 40%;margin-top: 20px;margin-left: 340px;"> |
| | | <div id="overlay" v-show="flake"></div> |
| | | <div id="overlaya" v-show="flakea"></div> |
| | | <div id="overlayb" v-show="flakeb"></div> |
| | | <div id="overlayc" v-show="flakec"></div> |
| | | </div> |
| | | <div style="margin-top: -350px;margin-left: 650px;"> |
| | | <div style="margin-top: -300px;margin-left: 680px;"> |
| | | <el-table :data="tableDataa" border style="width: 85%" |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | > |
| | |
| | | #overlay{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 212px; |
| | | height: 15px; |
| | | width: 228px; |
| | | height: 16px; |
| | | background-color: #529b2e; |
| | | margin-top: -404px; |
| | | margin-left: 542px; |
| | | margin-top: -303px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlaya{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 212px; |
| | | height: 15px; |
| | | width: 228px; |
| | | height: 16px; |
| | | background-color: #529b2e; |
| | | margin-top: -38px; |
| | | margin-left: 537px; |
| | | margin-top: -303px; |
| | | margin-left:703px; |
| | | } |
| | | #overlayb{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | | height: 16px; |
| | | background-color: #529b2e; |
| | | margin-top: -45px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlayc{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | | height: 16px; |
| | | background-color: #529b2e; |
| | | margin-top: -45px; |
| | | margin-left: 703px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | const dialogFormVisible = ref(false) |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | const dialogFormVisiblec = ref(false) |
| | | const tableData = ref([]) |
| | | const tableDatagh = ref([]) |
| | | const tableDatab = ref([]) |
| | | const tableDatac = ref([]) |
| | | const tableDatad = ref([]) |
| | |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | |
| | | |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass'); |
| | | if (response.code === 200) { |
| | | tableDatagh.value = response.data |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | | const itemsPerPage = computed(() => { |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 指定钢化 |
| | | const brokee = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.specifytemperinga'), |
| | | t('searchOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('searchOrder.yes'), |
| | | cancelButtonText: t('searchOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{ |
| | | engineerId: row.engineer_id, |
| | | temperingLayoutId: row.tempering_layout_id, |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 出片队列拿走 |
| | | const brokeb = async(row) => { |
| | | try { |
| | |
| | | <div style="height: 600px;"> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | | <el-table height="100px" ref="table" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/> |
| | | <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" /> |
| | | <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | <style scoped> |
| | |
| | | console.log("关闭了") |
| | | 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); |
| | | }; |
| | | |
| | | 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); |
| | | // 处理错误情况,比如提示用户更新失败 |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // beforeUnmount(() => { |
| | | // closeWebSocket(); |
| | | // }); |
| | |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80" /> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150" /> |
| | | <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="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="work_state" align="center" :label="$t('reportWork.state')" 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 |
| | | align="center" |
| | |
| | | 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"> |
| | |
| | | * A09出片目标位置 d02卧转立 2001 |
| | | * A10出片目标位置 d05卧转立 2002 |
| | | */ |
| | | public static final Integer OUT_TARGET_POSITION_ZERO = 0; |
| | | public static final Integer A09_OUT_TARGET_POSITION = 2001; |
| | | public static final Integer A10_OUT_TARGET_POSITION = 2002; |
| | | |
| | |
| | | * 识别后成功状态100 |
| | | * 出片任务101 |
| | | * 人工下片102 |
| | | * 出片中103 |
| | | * 拿走200 |
| | | * 破损201 |
| | | */ |
| | | public static final Integer GLASS_STATE_IN = 100; |
| | | public static final Integer GLASS_STATE_OUT = 101; |
| | | public static final Integer GLASS_STATE_ARTIFICIAL = 102; |
| | | public static final Integer GLASS_STATE_OUT_ING = 103; |
| | | public static final Integer GLASS_STATE_TAKE = 200; |
| | | public static final Integer GLASS_STATE_DAMAGE = 201; |
| | | |
| | |
| | | public static final Integer BIG_STORAGE_OUT_SUCCESS = 3; |
| | | public static final Integer BIG_STORAGE_OUT_ERROR = 4; |
| | | public static final Integer BIG_STORAGE_OUT_DAMAGE = 5; |
| | | public static final List<Integer> BIG_STORAGE_OUT_ALL = Arrays.asList(2, 3); |
| | | |
| | | /** |
| | | * 卧转立出片请求 |
| | |
| | | @Api(description = "报工信息") |
| | | @RestController |
| | | @RequestMapping("/damage") |
| | | @ResponseBody |
| | | public class DamageController { |
| | | |
| | | @Autowired |
| | | private DamageService damageService; |
| | | @ApiOperation("报工数据查询") |
| | | @ResponseBody |
| | | @PostMapping("/selectDamage") |
| | | public Result selectDamage(@RequestBody Map map) { |
| | | String startTime=map.get("startTime").toString(); |
| | | String endTime=map.get("endTime").toString(); |
| | | int type =Integer.parseInt(map.get("type").toString()); |
| | | int status =Integer.parseInt(map.get("status").toString()); |
| | | int workingProcedure =Integer.parseInt(map.get("workingProcedure").toString()); |
| | | // String startTime , String endTime, int type, int status, int workingProcedure |
| | | String workingProcedure =map.get("workingProcedure").toString(); |
| | | return Result.build(200,"查询成功",damageService.selectDamage(startTime,endTime,type,status,workingProcedure)); |
| | | } |
| | | |
| | | @ApiOperation("报工") |
| | | @PostMapping("/submitDamage") |
| | | public Result submitDamage(DateTime startTime , DateTime endTime,int type,int status,int workingProcedureId) { |
| | | damageService.submitDamage(startTime,endTime,type,status,workingProcedureId); |
| | | public Result submitDamage(@RequestBody Map map) { |
| | | String startTime=map.get("startTime").toString(); |
| | | String endTime=map.get("endTime").toString(); |
| | | int type =Integer.parseInt(map.get("type").toString()); |
| | | int status =Integer.parseInt(map.get("status").toString()); |
| | | String workingProcedure =map.get("workingProcedure").toString(); |
| | | damageService.submitDamage(startTime,endTime,type,status,workingProcedure); |
| | | return Result.build(200,"报工成功",1); |
| | | } |
| | | |
| | | @ApiOperation("报工数据修改") |
| | | @PostMapping("/updateDamage") |
| | | public Result updateDamage(List<Damage> damageList) { |
| | | public Result updateDamage(@RequestBody List<Damage> damageList) { |
| | | damageService.updateBatchById(damageList); |
| | | return Result.build(200,"修改成功",1); |
| | | } |
| | | |
| | | @ApiOperation("报工数据新增") |
| | | @PostMapping("/insertDamage") |
| | | public Result insertDamage(@RequestBody Damage damage) { |
| | | damageService.insertDamage(damage); |
| | | return Result.build(200,"新增成功",1); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | public interface DamageService extends IService<Damage> { |
| | | |
| | | List<Damage> selectDamage(String startTime, String endTime, int type, int status, int workingProcedureId); |
| | | List<Damage> selectDamage(String startTime, String endTime, int type, int status, String workingProcedure); |
| | | |
| | | void submitDamage(DateTime startTime, DateTime endTime, int type, int status, int workingProcedureId); |
| | | void submitDamage(String startTime, String endTime, int type, int status, String workingProcedure); |
| | | |
| | | void insertDamage(Damage damage); |
| | | } |
| | |
| | | * 查询报工信息 |
| | | */ |
| | | @Override |
| | | public List<Damage> selectDamage(String startTime, String endTime, int type, int status, int workingProcedure){ |
| | | public List<Damage> selectDamage(String startTime, String endTime, int type, int status, String workingProcedure){ |
| | | LambdaQueryWrapper<Damage> damageSelectWrapper =new LambdaQueryWrapper<>(); |
| | | damageSelectWrapper.between(Damage::getDamageTime,startTime,endTime); |
| | | if (type!=0){ |
| | |
| | | if (status!=0){ |
| | | damageSelectWrapper.eq(Damage::getStatus,status); |
| | | } |
| | | if(workingProcedure!=0){ |
| | | if(!"0".equals(workingProcedure)){ |
| | | damageSelectWrapper.eq(Damage::getWorkingProcedure,workingProcedure); |
| | | } |
| | | return baseMapper.selectList(damageSelectWrapper); |
| | |
| | | * 提交报工 |
| | | */ |
| | | @Override |
| | | public void submitDamage(DateTime startTime, DateTime endTime, int type, int status, int workingProcedureId){ |
| | | public void submitDamage(String startTime, String endTime, int type, int status, String workingProcedure){ |
| | | LambdaUpdateWrapper<Damage> damageUpdateWrapper=new LambdaUpdateWrapper<>(); |
| | | damageUpdateWrapper.between(Damage::getDamageTime,startTime,endTime); |
| | | if (type!=0){ |
| | |
| | | if (status!=0){ |
| | | damageUpdateWrapper.eq(Damage::getStatus,status); |
| | | } |
| | | if(workingProcedureId!=0){ |
| | | damageUpdateWrapper.eq(Damage::getWorkingProcedure,workingProcedureId); |
| | | if(!"0".equals(workingProcedure)){ |
| | | damageUpdateWrapper.eq(Damage::getWorkingProcedure,workingProcedure); |
| | | } |
| | | Damage damage=new Damage(); |
| | | damage.setStatus(2); |
| | |
| | | @ApiModelProperty(value = "状态", position = 16) |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 工程id |
| | | */ |
| | | @ApiModelProperty(value = "工程id", position = 17) |
| | | private String engineerId; |
| | | } |
| | |
| | | package com.mes.work_assignment.controller; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.utils.Result; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.service.WorkAssignmentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return Result.build(200,"查询成功",workAssignmentService.selectWorkAssignment(line,workingProcedure)); |
| | | } |
| | | |
| | | @ApiOperation("值班数据修改") |
| | | @PostMapping("/updateWorkAssignment") |
| | | public Result updateWorkAssignment(@RequestBody List<WorkAssignment> workAssignmentList) { |
| | | workAssignmentService.saveOrUpdateBatch(workAssignmentList); |
| | | return Result.build(200,"修改成功",1); |
| | | } |
| | | } |
| | | |
| | |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | |
| | | - id: glassStorage |
| | | uri: lb://glassStorage |
| | | predicates: |
| | | - Path=/api/glassStorage/** |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | # - id: unLoadGlass |
| | | # uri: lb://unLoadGlass |
| | | # predicates: |
| | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.S7object; |
| | |
| | | log.info("6、添加出片任务是否完成:{}", taskCacheStatus); |
| | | } else { |
| | | log.info("5、非直通任务,将玻璃信息插入卧式理片笼,当前玻璃信息:{}", glassInfo); |
| | | LambdaQueryWrapper<EdgStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(EdgStorageCageDetails::getGlassId, glassInfo.getGlassId()); |
| | | EdgStorageCageDetails updateDetail = new EdgStorageCageDetails(); |
| | | updateDetail.setState(Const.GLASS_STATE_OUT); |
| | | edgStorageCageDetailsService.update(updateDetail, wrapper); |
| | | LambdaUpdateWrapper<EdgStorageCageDetails> wrapper = new LambdaUpdateWrapper<>(); |
| | | wrapper.eq(EdgStorageCageDetails::getGlassId, glassInfo.getGlassId()).set(EdgStorageCageDetails::getState, Const.GLASS_STATE_OUT); |
| | | edgStorageCageDetailsService.update(wrapper); |
| | | log.info("5、更新出片玻璃的状态为{}", Const.GLASS_STATE_OUT); |
| | | |
| | | boolean taskCacheStatus = saveTaskCache(glassInfo.getGlassId(), glassInfo.getSlot(), endcell, Const.GLASS_CACHE_TYPE_OUT); |
| | |
| | | @PostMapping("/selectBigStorageCageDetails") |
| | | public Result selectBigStorageCageDetails(@RequestBody Map map) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails=bigStorageCageDetailsService.selectBigStorageCageDetails(map.get("glassId").toString()); |
| | | return Result.build(200,"查询成功",bigStorageCageDetails); |
| | | if (bigStorageCageDetails.size()>0){ |
| | | return Result.build(200,"查询成功",bigStorageCageDetails); |
| | | }else{ |
| | | return Result.build(200,"查询失败,无此玻璃id",bigStorageCageDetails); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情添加") |
| | |
| | | @ApiOperation("理片笼任务出片") |
| | | @PostMapping("/outBigStorageCageDetails") |
| | | public Result outBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | |
| | | bigStorageCageDetailsService.outBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"出片添加成功",1); |
| | | } |
| | | |
| | | @ApiOperation("指定钢化") |
| | | @PostMapping("/TemperingGlass") |
| | | public Result TemperingGlass(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | boolean result=bigStorageCageDetailsService.TemperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(),bigStorageCageDetails.getEngineerId()); |
| | | if(result==true){ |
| | | return Result.build(200,"指定钢化成功",1); |
| | | }else { |
| | | return Result.build(200, "已存在钢化任务", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("钢化查询") |
| | | @PostMapping("/selectTemperingGlass") |
| | | public Result selectTemperingGlass() { |
| | | return Result.build(200,"查询成功",bigStorageCageDetailsService.selectTemperingGlass()); |
| | | } |
| | | } |
| | | |
| | |
| | | * 玻璃数量 |
| | | */ |
| | | private Integer glassCount; |
| | | |
| | | /** |
| | | * 笼子号 |
| | | */ |
| | | private Integer deviceId; |
| | | } |
| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | List<SlotSequenceDTO> queryGlassMaxAndMin(String engineerId, Integer temperingLayoutId); |
| | | |
| | | boolean TemperingGlass(String temperingLayoutId, String engineerId); |
| | | |
| | | List<Map<String, Object>> selectTemperingGlass(); |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.lang.Assert; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | |
| | | private BigStorageCageService bigStorageCageService; |
| | | @Resource |
| | | private GlassInfoMapper glassInfoMapper; |
| | | |
| | | @Resource |
| | | private DamageService damageService; |
| | | |
| | | @Value("${mes.minCount}") |
| | | private int minCount; |
| | |
| | | temperingGlassInfoMapper.updateById(temperingGlassInfo); |
| | | } |
| | | if (status == 0) { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_TAKE); |
| | | } else { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_DAMAGE); |
| | | } else { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_TAKE); |
| | | } |
| | | baseMapper.updateById(bigStorageCageDetails); |
| | | bigStorageCageService.updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | //todo:插入破损数据 |
| | | |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageDetails.getGlassId()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark("大理片笼破损"); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | |
| | | //查询玻璃信息 |
| | |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetails.setGap(glassGap); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | | return bigStorageCageDetailsList; |
| | | }else{ |
| | | return null; |
| | | } |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | | return bigStorageCageDetailsList; |
| | | |
| | | } |
| | | |
| | | //理片笼详情添加 |
| | |
| | | .leftJoin(BigStorageCageDetails.class, BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .gt(BigStorageCage::getRemainWidth, glassInfo.getWidth()) |
| | | .gt(BigStorageCage::getRemainWidth, Math.max(glassInfo.getWidth(), glassInfo.getHeight())) |
| | | .last("limit 1"); |
| | | if (glassInfo.getTemperingLayoutId() == 0) { |
| | | wrapper.eq(BigStorageCageDetails::getWidth, glassInfo.getWidth()).eq(BigStorageCageDetails::getHeight, glassInfo.getHeight()); |
| | |
| | | bigStorageDTO = new BigStorageDTO(); |
| | | bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | |
| | | bigStorageDTO = new BigStorageDTO(); |
| | | bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | return bigStorageDTO; |
| | | } |
| | | //todo:获取玻璃的厚度:重新选笼子需要按照笼子可放玻璃厚度进行选择 |
| | | |
| | | //获取玻璃的厚度:重新选笼子需要按照笼子可放玻璃厚度进行选择 |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .notInSql(BigStorageCage::getDeviceId, |
| | | "select distinct device_id from big_storage_cage_details where tempering_layout_id = " + glassInfo.getTemperingLayoutId()) |
| | | .gt(BigStorageCage::getMaxThickness, glassInfo.getThickness()) |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | | .last("limit 1")); |
| | | if (null != bigStorageCage) { |
| | | bigStorageDTO = new BigStorageDTO(); |
| | | bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | |
| | | bigStorageDTO = new BigStorageDTO(); |
| | | bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | return bigStorageDTO; |
| | | } |
| | | |
| | |
| | | public List<SlotSequenceDTO> queryGlassMaxAndMin(String engineerId, Integer temperingLayoutId) { |
| | | return baseMapper.queryGlassMaxAndMin(engineerId, temperingLayoutId); |
| | | } |
| | | |
| | | @Override |
| | | public boolean TemperingGlass(String temperingLayoutId, String engineerId){ |
| | | LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoLambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | temperingGlassInfoLambdaQueryWrapper |
| | | .eq(TemperingGlassInfo::getTemperingLayoutId,temperingLayoutId) |
| | | .eq(TemperingGlassInfo::getEngineerId,engineerId); |
| | | List<TemperingGlassInfo> temperingGlassInfoList=temperingGlassInfoMapper.selectList(temperingGlassInfoLambdaQueryWrapper); |
| | | if(temperingGlassInfoList.size()==0){ |
| | | LambdaQueryWrapper<BigStorageCageDetails> wrapper =new LambdaQueryWrapper<>(); |
| | | wrapper.eq(BigStorageCageDetails::getTemperingLayoutId,temperingLayoutId) |
| | | .eq(BigStorageCageDetails::getEngineerId,engineerId) |
| | | .in(BigStorageCageDetails::getState,Const.GLASS_STATE_IN,Const.GLASS_STATE_ARTIFICIAL); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList=baseMapper.selectList(wrapper); |
| | | |
| | | for (BigStorageCageDetails bigStorageCageDetails:bigStorageCageDetailsList |
| | | ) { |
| | | TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo(); |
| | | LambdaQueryWrapper<GlassInfo> glassInfoLambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | glassInfoLambdaQueryWrapper.eq(GlassInfo::getGlassId,bigStorageCageDetails.getGlassId()); |
| | | GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoLambdaQueryWrapper); |
| | | |
| | | BeanUtils.copyProperties(glassInfo, temperingGlassInfo); |
| | | temperingGlassInfo.setState(Const.TEMPERING_NEW); |
| | | temperingGlassInfo.setSlot(bigStorageCageDetails.getSlot()); |
| | | temperingGlassInfoMapper.insert(temperingGlassInfo); |
| | | } |
| | | return true; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectTemperingGlass(){ |
| | | QueryWrapper<BigStorageCageDetails> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("engineer_id,tempering_layout_id,count(*) as count") |
| | | .groupBy("engineer_id,tempering_layout_id"); |
| | | List<Map<String, Object>> TemperingGlass = baseMapper.selectMaps(wrapper); |
| | | return TemperingGlass; |
| | | } |
| | | } |
| | |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | //进片逻辑 |
| | | @Override |
| | |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getSlot, slot) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL); |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL); |
| | | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(bigStorageCageDetailsWrapper); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | double widths = bigStorageCageDetails.getWidth(); |
| | | double gap = bigStorageCageDetails.getGap(); |
| | | width -= widths + gap; |
| | | width = width - widths - glassGap; |
| | | } |
| | | //修改格子剩余宽度 |
| | | BigStorageCage bigStorageCage = new BigStorageCage(); |
| | |
| | | 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)) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL,Const.GLASS_STATE_OUT_ING)) |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | | .orderByAsc(BigStorageCage::getSlot); |
| | | return bigStorageCageMapper.selectJoinList(BigStorageCage.class, wrapper); |
| | |
| | | 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)); |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL,Const.GLASS_STATE_OUT_ING)); |
| | | List<BigStorageCage> bigStorageCages = bigStorageCageMapper.selectJoinList(BigStorageCage.class, wrapper); |
| | | Map<Integer, List<BigStorageCage>> listMap = bigStorageCages.stream().collect(Collectors.groupingBy(item -> item.getDeviceId())); |
| | | return listMap; |
| | |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | private String d01GlassId = ""; |
| | | private String d04GlassId = ""; |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgScan() { |
| | | Date startDate = new Date(); |
| | |
| | | } |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃: 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, (02玻璃id为空或者卧转立未启动) |
| | | if (!REQUEST_WORD.equals(mesD01Value) && REQUEST_WORD.equals(d01ToMES) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | if (!d01GlassId.equals(d01Id)) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | d01GlassId = d01Id; |
| | | } |
| | | } |
| | | // 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, 卧转立未启动 |
| | | if (!REQUEST_WORD.equals(mesD04Value) && REQUEST_WORD.equals(d04ToMES) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | if (!d04GlassId.equals(d04Id)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | d04GlassId = d04Id; |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼扫码任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> wrapper = new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskType, Const.BIG_STORAGE_IN_RUN) |
| | | .and(e -> e.isNull(BigStorageCageFeedTask::getTargetSlot).or().eq(BigStorageCageFeedTask::getTargetSlot, Const.OUT_TARGET_POSITION_ZERO)) |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_UP); |
| | | //获取可以启动卧转立的任务线路 |
| | | List<BigStorageCageFeedTask> feedTaskList = bigStorageCageFeedTaskService.list(wrapper); |
| | |
| | | // log.info("两条线都存在进片任务,结束任务"); |
| | | // return; |
| | | // } |
| | | //获取两条线卧转立是否有玻璃,且任务状态都为2 |
| | | //获取两条线卧转立是否有玻璃,且任务状态为1/2 |
| | | List<Integer> lineList = bigStorageCageFeedTaskService.querySitToUpGlass(); |
| | | if (CollectionUtils.isEmpty(lineList)) { |
| | | Date endDate = new Date(); |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void updateOutGlassStateTask() { |
| | | Date startDate = new Date(); |
| | | log.info("1、大理片笼出片完成后更新大理片笼数据任务开始执行时间:{}", startDate); |
| | | //因为大理片笼和出片任务是两个库的数据,所以要分开查找 |
| | | List<Object> list = bigStorageCageDetailsService.listObjs(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .select(BigStorageCageDetails::getGlassId).eq(BigStorageCageDetails::getState, Const.GLASS_STATE_OUT_ING)); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | log.info("2、获取所有正在出片的玻璃信息id:{}", list); |
| | | List<String> glassIds = list.stream().map(String::valueOf).collect(Collectors.toList()); |
| | | List<Object> outSuccessGlassIdsObj = bigStorageCageOutTaskService.listObjs(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .select(BigStorageCageOutTask::getGlassId).in(BigStorageCageOutTask::getGlassId, glassIds).in(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_ALL)); |
| | | List<String> outSuccessGlassIds = outSuccessGlassIdsObj.stream().map(String::valueOf).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(outSuccessGlassIds)) { |
| | | log.info("3、获取出片已完成的玻璃信息id:{}", outSuccessGlassIdsObj); |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState, Const.GLASS_STATE_OUT).in(BigStorageCageDetails::getGlassId, outSuccessGlassIds)); |
| | | log.info("4、大理片笼出片状态已完成已完成的玻璃信息id:{}", outSuccessGlassIdsObj); |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("end:大理片笼出片完成后更新大理片笼数据任务结束时间:{},共耗时:{}ms,结束任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 处理破损表任务 |
| | | */ |
| | |
| | | List<BigStorageCageFeedTask> inDamageTaskInfoList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(inDamageTaskInfoList)) { |
| | | log.info("获取进片任务表中破损的玻璃信息{}", inDamageTaskInfoList); |
| | | bigStorageCageFeedTaskService.remove(new LambdaQueryWrapper<BigStorageCageFeedTask>().eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | //理片笼详情表数据状态更新 |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState, Const.GLASS_STATE_DAMAGE).in(BigStorageCageDetails::getGlassId, inDamageTaskInfoList.stream().map(BigStorageCageFeedTask::getGlassId).collect(Collectors.toList()))); |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask : inDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | log.info("进片任务执行完成"); |
| | | } |
| | | //获取出片任务表中状态为破损的数据 |
| | | List<BigStorageCageOutTask> outDamageTaskInfoList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(outDamageTaskInfoList)) { |
| | | log.info("获取出片任务表中破损的玻璃信息{}", outDamageTaskInfoList); |
| | | bigStorageCageOutTaskService.remove(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | List<String> glassIdList = outDamageTaskInfoList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | //移除钢化下片表数据 |
| | | temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().in(TemperingGlassInfo::getGlassId, glassIdList)); |
| | | //理片笼详情表数据状态更新 |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState, Const.GLASS_STATE_DAMAGE).in(BigStorageCageDetails::getGlassId, glassIdList)); |
| | | |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : outDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | log.info("出片任务执行完成"); |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼破损玻璃清除任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | |
| | | //向plc发送进片确认 |
| | | if (flag) { |
| | | S7object.getinstance().plccontrol.writeWord(mesAddress, 1); |
| | | log.info("进卧转立发送确认字完成,地址为{}", mesAddress); |
| | | } |
| | | //记录无法放下玻璃,后续判断启动 |
| | | return flag; |
| | |
| | | */ |
| | | public Integer getStartLine() { |
| | | List<BigStorageCageFeedTask> taskList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .inSql(BigStorageCageFeedTask::getId, "select min(id) from big_storage_cage_feed_task where task_state = 2 group by line")); |
| | | .inSql(BigStorageCageFeedTask::getId, "select min(id) from big_storage_cage_feed_task where task_state = 2" + |
| | | "and (target_slot = 0 or target_slot is null) group by line")); |
| | | Assert.isFalse(CollectionUtils.isEmpty(taskList), "卧转立两条线都没有玻璃进片任务"); |
| | | Map<String, Integer> taskMap = taskList.stream().collect(Collectors.toMap(BigStorageCageFeedTask::getGlassId, |
| | | BigStorageCageFeedTask::getLine)); |
| | |
| | | //1、获取任务表中的所有玻璃(指定线路且已经进卧转立完成) |
| | | List<BigStorageCageFeedTask> taskList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getLine, line) |
| | | .and(e -> e.isNull(BigStorageCageFeedTask::getTargetSlot).or().eq(BigStorageCageFeedTask::getTargetSlot, Const.OUT_TARGET_POSITION_ZERO)) |
| | | .in(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_UP_ALL) |
| | | .orderByAsc(BigStorageCageFeedTask::getId)); |
| | | //2、去笼子内查找是否可以继续存放的笼子 |
| | |
| | | //2、获取目标格子信息 |
| | | BigStorageDTO bigStorageDTO = bigStorageCageDetailsService.queryTargetSlotByTempering(info); |
| | | //3、更新大理片笼表剩余宽度 |
| | | bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>().set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - info.getWidth()) |
| | | bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>().set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - info.getWidth() - glassGap) |
| | | .eq(BigStorageCage::getSlot, bigStorageDTO.getSlot())); |
| | | //4、更新进片任务表,目标格子及状态(状态改为2 电气扫到自行处理) 遇到问题:无法批量更新,批量更新无法走指定从库 |
| | | e.setTargetSlot(bigStorageDTO.getSlot()); |
| | |
| | | //5、将进片信息存入大理片笼详情表 |
| | | cageDetails.setSlot(bigStorageDTO.getSlot()); |
| | | cageDetails.setState(Const.GLASS_STATE_IN); |
| | | cageDetails.setDeviceId(bigStorageDTO.getDeviceId()); |
| | | cageDetails.setGap(glassGap); |
| | | bigStorageCageDetailsService.save(cageDetails); |
| | | } |
| | | sendTaskListToPLC(taskList, line); |
| | |
| | | //打车剩余尺寸 |
| | | Integer remainWidth = carWidth; |
| | | for (T e : list) { |
| | | if (bigStorageCageOutTaskList.size() > outCarMaxSize || e.getWidth() > remainWidth) { |
| | | if (bigStorageCageOutTaskList.size() >= outCarMaxSize || e.getWidth() > remainWidth) { |
| | | break; |
| | | } |
| | | remainWidth = remainWidth - (int) e.getWidth() - glassGap; |
| | |
| | | List<String> glassIds = bigStorageCageOutTaskList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | log.info("将出片玻璃{}玻璃状态改为已出片", glassIds); |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState, Const.GLASS_STATE_OUT) |
| | | .set(BigStorageCageDetails::getState, Const.GLASS_STATE_OUT_ING) |
| | | .in(BigStorageCageDetails::getGlassId, glassIds)); |
| | | //更新笼子内格子的剩余尺寸 |
| | | updateSlotRemain(list, glassIds); |
| | |
| | | /** |
| | | * 更新笼子内格子的剩余尺寸 |
| | | * |
| | | * @param list |
| | | * @param taskGlassIds |
| | | * @param list 笼内可以出笼的玻璃信息 |
| | | * @param taskGlassIds 本次任务出去的玻璃ids |
| | | * @param <T> |
| | | */ |
| | | public <T extends BigStorageCageBaseInfo> void updateSlotRemain(List<T> list, List<String> taskGlassIds) { |
| | | //获取需要出去(包括待出去的)的所有玻璃格子号 |
| | | List<Integer> slotList = list.stream().map(T::getSlot).distinct().collect(Collectors.toList()); |
| | | //获取待出去的玻璃信息(等下车出去的玻璃) |
| | | //获取待出去的玻璃信息(等待本次任务结束后下车出去的玻璃) |
| | | Map<Integer, Double> slotRemainMap = list.stream().filter(e -> !taskGlassIds.contains(e.getGlassId())) |
| | | .collect(Collectors.groupingBy(T::getSlot, Collectors.summingDouble(item -> item.getWidth() + glassGap))); |
| | | if (CollectionUtils.isNotEmpty(slotRemainMap)) { |
| | |
| | | } |
| | | //获取玻璃信息 |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId)); |
| | | return sitToUpRemainWidth.getWidth() < glassInfo.getWidth(); |
| | | return sitToUpRemainWidth.getWidth() < Math.max(glassInfo.getWidth(), glassInfo.getHeight()); |
| | | } |
| | | |
| | | } |
| | |
| | | ) T2 |
| | | INNER JOIN (SELECT ENGINEER_ID, TEMPERING_LAYOUT_ID, COUNT(TEMPERING_FEED_SEQUENCE) AS COUNT |
| | | FROM BIG_STORAGE_CAGE_DETAILS |
| | | WHERE STATE in (100, 101, 102) |
| | | WHERE STATE in (100, 101, 102, 103) |
| | | GROUP BY ENGINEER_ID, TEMPERING_LAYOUT_ID) T3 ON T2.ENGINEER_ID = T3.ENGINEER_ID |
| | | AND T2.TEMPERING_LAYOUT_ID = T3.TEMPERING_LAYOUT_ID |
| | | AND T2.COUNT = T3.COUNT |
| | |
| | | END MAX_LENGTH |
| | | FROM BIG_STORAGE_CAGE_FEED_TASK |
| | | WHERE LINE = #{line} |
| | | AND (target_slot = 0 or target_slot is null) |
| | | AND TASK_STATE IN (1, 2) |
| | | ) T |
| | | </select> |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Autowired |
| | | BigStorageCageFeedTaskMapper bigStorageCageFeedTaskMapper; |
| | | // @Autowired |
| | | // BigStorageCageFeedTaskMapper bigStorageCageFeedTaskMapper; |
| | | |
| | | @Test |
| | | public void testInsertSlot() { |
| | |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | |
| | | @Test |
| | | public void updateOutGlassStateTask() { |
| | | plcStorageCageTask.updateOutGlassStateTask(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Optional;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | |
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | |
|
| | | Map<String, Optional<StorageTask>> findLatestTasks();
|
| | | } |
| | |
| | | import com.mes.storagetask.mapper.StorageTaskMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Optional;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | @Slf4j
|
| | | public class StorageTaskServiceImpl extends ServiceImpl<StorageTaskMapper, StorageTask> implements StorageTaskService {
|
| | |
|
| | | @Autowired
|
| | |
| | | }
|
| | |
|
| | |
|
| | | public Map<String, Optional<StorageTask>> findLatestTasks() {
|
| | | Map<String, Optional<StorageTask>> latestTasks = new HashMap<>();
|
| | |
|
| | | // 查询最新的已完成任务
|
| | | LambdaQueryWrapper<StorageTask> completedWrapper = new LambdaQueryWrapper<>();
|
| | | completedWrapper.eq(StorageTask::getTaskType, "已完成")
|
| | | .orderByDesc(StorageTask::getId)
|
| | | .last("LIMIT 1");
|
| | | Optional<StorageTask> latestCompletedTask = Optional.ofNullable(storageTaskMapper.selectOne(completedWrapper));
|
| | | latestTasks.put("已完成", latestCompletedTask);
|
| | |
|
| | | // 查询最新的等待中任务
|
| | | LambdaQueryWrapper<StorageTask> pendingWrapper = new LambdaQueryWrapper<>();
|
| | | pendingWrapper.eq(StorageTask::getTaskType, "等待中")
|
| | | .orderByDesc(StorageTask::getId);
|
| | | Optional<StorageTask> latestPendingTask = Optional.ofNullable(storageTaskMapper.selectOne(pendingWrapper));
|
| | | latestTasks.put("等待中", latestPendingTask);
|
| | | log.info(latestTasks+"");
|
| | | return latestTasks;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |
| | |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
New file |
| | |
| | | package mes; |
| | | |
| | | import com.mes.GlassStorageApplication; |
| | | import com.mes.storagetask.entity.StorageTask; |
| | | import com.mes.storagetask.service.StorageTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = GlassStorageApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) |
| | | |
| | | public class GlassStorageModuleApplicationTest { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private StorageTaskService storageTaskService; |
| | | |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | | } |
| | | |
| | | @Test |
| | | public void testCacheGlass() { |
| | | // storageTaskService.getBaseMapper().selectById(1); |
| | | //StorageTask storageTask=new StorageTask(); |
| | | // storageTask.setId(Long.valueOf("1")); |
| | | // storageTask.setTaskState("1"); |
| | | // storageTaskService.updateById(storageTask); |
| | | // storageTaskService.getBaseMapper().deleteById(1); |
| | | // storageTaskService.findList(storageTask); |
| | | storageTaskService.findLatestTasks(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | List<OptimizeUpPattenUsage> upPattenUsageList = null; |
| | | if (engineeringId != null) { |
| | | upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("t.project_no,t.glass_type,b.o_width as width,b.o_height as height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.stock_number") |
| | | .leftJoin("optimize_detail b on t.project_no=b.project_no") |
| | | .select("t.project_no,t.glass_type,b.width,b.height ,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.count") |
| | | .leftJoin("optimize_layout b on t.project_no=b.project_no") |
| | | .eq("b.project_no", engineeringId)); |
| | | } |
| | | // 创建一个 List 用于保存映射后的实体对象 |
| | |
| | | package com.mes.job; |
| | | |
| | | import com.mes.tempering_record.service.TemperingRecordService; |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.temperingrecord.entity.TemperingRecord; |
| | | import com.mes.temperingrecord.service.TemperingRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/7/17 12:47 |
| | | * @Description: |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class TemperingTask { |
| | | |
| | | @Autowired |
| | | private TemperingRecordService temporalRecordService; |
| | | |
| | | @Autowired |
| | | private TemperingGlassInfoService temporaryGlassInfoService; |
| | | private static final String ALONE_STATE = "0"; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void temperingGlassBefore() { |
| | | Date startDate = new Date(); |
| | | log.info("本次任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String state = plcParameterObject.getPlcParameter("state").getValue(); |
| | | // 当前连线状态为 |
| | | if (ALONE_STATE.equals(state)) { |
| | | log.info("当前钢化炉连线模式为:{},不执行该任务", state); |
| | | return; |
| | | } |
| | | //将确认字置为0 |
| | | S7object.getinstance().plccontrol.writeWord(plcParameterObject.getPlcParameter("confirmationWord").getAddress(), 0); |
| | | |
| | | //todo:获取钢化版图中状态为2的(进炉完成的玻璃信息) 且不存在钢化记录表内的 |
| | | List<Object> temperRecordIdListObj = temporalRecordService.listObjs(new QueryWrapper<TemperingRecord>().select("distinct tempering_layout_id")); |
| | | |
| | | List<String> temperRecordIdList = temperRecordIdListObj.stream().map(String::valueOf).collect(Collectors.toList()); |
| | | List<TemperingGlassInfo> list = temporaryGlassInfoService.list(new LambdaQueryWrapper<TemperingGlassInfo>() |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_START).notIn(TemperingGlassInfo::getTemperingLayoutId, temperRecordIdList)); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | log.info("当前系统没有需要钢化的玻璃信息"); |
| | | return; |
| | | } |
| | | List<Integer> temperingLayoutIdList = list.stream().map(TemperingGlassInfo::getTemperingLayoutId).distinct().collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(temperRecordIdList)) { |
| | | temperingLayoutIdList.removeAll(temperRecordIdList); |
| | | } |
| | | if (CollectionUtils.isEmpty(temperingLayoutIdList)) { |
| | | log.info("当前玻璃有正在钢化的任务"); |
| | | } |
| | | // 获取钢化下片表状态为2的玻璃信息 |
| | | |
| | | //完成任务将确认字置为1 |
| | | S7object.getinstance().plccontrol.writeWord(plcParameterObject.getPlcParameter("confirmationWord").getAddress(), 1); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
File was renamed from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/tempering_record/controller/TemperingRecordController.java |
| | |
| | | package com.mes.tempering_record.controller; |
| | | package com.mes.temperingrecord.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
File was renamed from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/tempering_record/entity/TemperingRecord.java |
| | |
| | | package com.mes.tempering_record.entity; |
| | | package com.mes.temperingrecord.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 工程id |
| | | */ |
| | | private String engineerId; |
| | | /** |
| | | * 钢化版图 |
| | | */ |
| | | private Integer temperingLayoutId; |
File was renamed from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/tempering_record/mapper/TemperingRecordMapper.java |
| | |
| | | package com.mes.tempering_record.mapper; |
| | | package com.mes.temperingrecord.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.tempering_record.entity.TemperingRecord; |
| | | import com.mes.temperingrecord.entity.TemperingRecord; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/tempering_record/service/TemperingRecordService.java |
| | |
| | | package com.mes.tempering_record.service; |
| | | package com.mes.temperingrecord.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.tempering_record.entity.TemperingRecord; |
| | | import com.mes.temperingrecord.entity.TemperingRecord; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/tempering_record/service/impl/TemperingRecordServiceImpl.java |
| | |
| | | package com.mes.tempering_record.service.impl; |
| | | package com.mes.temperingrecord.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.tempering_record.entity.TemperingRecord; |
| | | import com.mes.tempering_record.mapper.TemperingRecordMapper; |
| | | import com.mes.tempering_record.service.TemperingRecordService; |
| | | import com.mes.temperingrecord.entity.TemperingRecord; |
| | | import com.mes.temperingrecord.mapper.TemperingRecordMapper; |
| | | import com.mes.temperingrecord.service.TemperingRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
New file |
| | |
| | | { |
| | | "plcAddressBegin": "DB88.0", |
| | | "plcAddressLenght": "58", |
| | | "dataType": "word", |
| | | "parameteInfor": [ |
| | | { |
| | | "codeId": "confirmationWord", |
| | | "addressIndex": "0", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperingLayoutId", |
| | | "addressIndex": "2", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "filmsid", |
| | | "addressIndex": "4", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperingType", |
| | | "addressIndex": "6", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "thickness", |
| | | "addressIndex": "8", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "loadingRate", |
| | | "addressIndex": "10", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "areaDifference", |
| | | "addressIndex": "12", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "state", |
| | | "addressIndex": "22", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "deviceState", |
| | | "addressIndex": "24", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "resultState", |
| | | "addressIndex": "26", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "loadSpeed", |
| | | "addressIndex": "28", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "downSpeed", |
| | | "addressIndex": "30", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "load1", |
| | | "addressIndex": "32", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "heat1", |
| | | "addressIndex": "34", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "heat2", |
| | | "addressIndex": "36", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "cool1", |
| | | "addressIndex": "38", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "cool2", |
| | | "addressIndex": "40", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "downId", |
| | | "addressIndex": "42", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "productionTime", |
| | | "addressIndex": "44", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "heatEnergy", |
| | | "addressIndex": "46", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "coolEnergy", |
| | | "addressIndex": "48", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperatureUp1", |
| | | "addressIndex": "50", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperatureDown1", |
| | | "addressIndex": "52", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperatureUp2", |
| | | "addressIndex": "54", |
| | | "addressLenght": "2" |
| | | }, |
| | | { |
| | | "codeId": "temperatureDown2", |
| | | "addressIndex": "56", |
| | | "addressLenght": "2" |
| | | } |
| | | ] |
| | | } |
| | |
| | | String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue(); |
| | | |
| | | |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}", |
| | | requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot); |
| | | |