| | |
| | | quit:"Exit", |
| | | }, |
| | | basicData:{ |
| | | Automaticprintingswitch:'Automatic printing switch', |
| | | laserprinting:'Laser printing machine ready status:', |
| | | cuttingmachine:'Cutting machine ready status:', |
| | | machine:'Online status of the loading table:', |
| | |
| | | cardnumbera:'Process card number:', |
| | | incardnumber:'Please select the process card number', |
| | | clearglass:'Clear the glass on the shelf', |
| | | confirmclear:'Please confirm that the process card and label have been printed before clearing them', |
| | | sure:'Operate', |
| | | cancel:'Cancel', |
| | | glassinformation:'Glass information', |
| | |
| | | quit:"退出", |
| | | }, |
| | | basicData:{ |
| | | Automaticprintingswitch:'自动打印开关', |
| | | laserprinting:'打标机就绪状态:', |
| | | cuttingmachine:'切割机就绪状态:', |
| | | machine:'上片机联机状态:', |
| | |
| | | cardnumbera:'流程卡号:', |
| | | incardnumber:'请选择流程卡号', |
| | | clearglass:'清除架子玻璃', |
| | | confirmclear:'请确认已打印流程卡和标签再清除', |
| | | sure:'确认', |
| | | cancel:'取消', |
| | | glassinformation:'玻璃信息', |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 完成任务 |
| | | const finish = async (row) => { |
| | | // 修改任务 |
| | | const finish = async (type,row,state) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.fin'), |
| | |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | row.taskState=state; |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/finishBigStorageCageDetails", row) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | if(type==1){ |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageFeedTask/updateBigStorageCageFeedTask", row) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }else{ |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageOutTask/updatebigStorageCageOutTask", row) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 240px;"> |
| | | <el-table height="240px" ref="table" :data="tableDatac" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.operate')" |
| | | min-width="200" > |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="finish(0,scope.row.bigStorageCageOutTask,3)">{{ $t('searchOrder.completetask') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="finish(0,scope.row.bigStorageCageOutTask,8)">{{ $t('searchOrder.breakage') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="finish(0,scope.row.bigStorageCageOutTask,9)">{{ $t('searchOrder.takeout') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="bigStorageCageOutTask.glassId" align="center" |
| | | :label="$t('searchOrder.outputglassID')" min-width="140" /> |
| | | <el-table-column prop="bigStorageCageOutTask.startSlot" align="center" |
| | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 240px;"> |
| | | <el-table height="240px" ref="table" @selection-change="handleSelectionChange" :data="tableDatad" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.operate')" |
| | | min-width="200" > |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="finish(1,scope.row.bigStorageCageFeedTask,4)">{{ $t('searchOrder.completetask') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="finish(1,scope.row.bigStorageCageFeedTask,8)">{{ $t('searchOrder.breakage') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="finish(1,scope.row.bigStorageCageFeedTask,9)">{{ $t('searchOrder.takeout') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="bigStorageCageFeedTask.glassId" align="center" :label="$t('searchOrder.intoglassid')" |
| | | min-width="140" /> |
| | | <el-table-column prop="bigStorageCageFeedTask.targetSlot" align="center" |
| | |
| | | <el-table-column prop="gap" align="center" :label="$t('searchOrder.glassgaps')" min-width="80" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" min-width="220"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="broke(scope.row)">{{ $t('searchOrder.breakage') |
| | | <el-button size="mini" type="text" plain :disabled="(scope.row.state != 100 )?true:false" @click="broke(scope.row)">{{ $t('searchOrder.breakage') |
| | | }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="brokec(scope.row)">{{ $t('searchOrder.takeout') |
| | | <el-button size="mini" type="text" plain :disabled="(scope.row.state != 100 )?true:false" @click="brokec(scope.row)">{{ $t('searchOrder.takeout') |
| | | }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('searchOrder.delete') |
| | | <el-button size="mini" type="text" plain :disabled="(scope.row.state != 100 )?true:false" @click="opena(scope.row)">{{ $t('searchOrder.delete') |
| | | }}</el-button> |
| | | <el-button size="mini" type="text" |
| | | :disabled="!((props.row.bigStorageCageDetails[0].state !== 102 && scope.$index == 0) || (props.row.bigStorageCageDetails[(scope.$index - 1) < 0 ? 0 : scope.$index - 1].state == 102) && (scope.row.state != 102))" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('人工下片信息')"> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" title="人工下片信息"> |
| | | <div style="display:flex;justify-content: space-around;"> |
| | | <el-card |
| | | style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;position: relative;"> |
| | |
| | | <script setup> |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {useRouter} from "vue-router" |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { useRouter } from "vue-router" |
| | | const router = useRouter() |
| | | import request from "@/utils/request" |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue"; |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { ref, onMounted, onBeforeUnmount, reactive, computed, onUnmounted } from "vue"; |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import companyInfo from "@/lang/companyInfo"; |
| | |
| | | |
| | | |
| | | onMounted(async () => { |
| | | console.log(props.printFlowCardId,props.printLayer) |
| | | console.log(props.printFlowCardId, props.printLayer) |
| | | try { |
| | | |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassPrint',{ |
| | | flowCardId:props.printFlowCardId, |
| | | layer:props.printLayer |
| | | |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassPrint', { |
| | | flowCardId: props.printFlowCardId, |
| | | layer: props.printLayer |
| | | }); |
| | | if (response.code == 200) { |
| | | |
| | | |
| | | // 绑定成功,处理逻辑 |
| | | produceList.value = response.data; |
| | | ElMessage.success(response.message); |
| | | for (let j = 0; j < produceList.value.length; j++) { |
| | | let sumWeight = 0 |
| | | produceList.value[j].detailList.forEach((item, index) => { |
| | | // 解析 separation 字段的 JSON 字符串 |
| | | let separationObj = JSON.parse(item.separation); |
| | | let sumWeight = 0 |
| | | produceList.value[j].detailList.forEach((item, index) => { |
| | | // 解析 separation 字段的 JSON 字符串 |
| | | let separationObj = JSON.parse(item.separation); |
| | | |
| | | // 获取 thickness 的原始值 |
| | | let thicknessValue = separationObj.thickness; |
| | | // 获取 thickness 的原始值 |
| | | let thicknessValue = separationObj.thickness; |
| | | |
| | | // 去除 'mm' 单位 |
| | | let thicknessWithoutUnit = thicknessValue.replace('mm', ''); |
| | | // 去除 'mm' 单位 |
| | | let thicknessWithoutUnit = thicknessValue.replace('mm', ''); |
| | | |
| | | item.separation = thicknessWithoutUnit |
| | | item.separation = thicknessWithoutUnit |
| | | |
| | | sumWeight += item.width * item.height * item.quantity / 1000000 * item.separation * 2.5 * 1; |
| | | sumWeight += item.width * item.height * item.quantity / 1000000 * item.separation * 2.5 * 1; |
| | | |
| | | }); |
| | | produceList.value[j].detail[0].weight = sumWeight |
| | | } |
| | | handleGetQRCode() |
| | | handleSummary() |
| | | // printFlowCard(); |
| | | }); |
| | | produceList.value[j].detail[0].weight = sumWeight |
| | | } |
| | | handleGetQRCode() |
| | | handleSummary() |
| | | // printFlowCard(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | |
| | | }); |
| | | </script> |
| | | <template> |
| | | <div id="printFlowCard"> |
| | | <table v-for="(item,id) in produceList" id="contentTable" :key="id"> |
| | | <div id="printFlowCard"> |
| | | <table v-for="(item, id) in produceList" id="contentTable" :key="id"> |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="29"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div>{{ company.companyName }}</div> |
| | | <div>生产流程卡</div> |
| | | <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder"> |
| | | {{itemFlow.otherRemarks}} |
| | | 流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumberMerge }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | | <div v-else style="text-align: right;font-weight: bolder"> |
| | | {{itemFlow.otherRemarks}} |
| | | 流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(items,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">客户名称:</td> |
| | | <td colspan="2">{{ items.customer_name }}</td> |
| | | <td class="tdNowrap">项目名称:</td> |
| | | <td colspan="2">{{ items.project }}</td> |
| | | <td class="tdNowrap">工艺流程:</td> |
| | | <td colspan="22" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | | <tr v-for="(itemTr,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">磨边类型:</td> |
| | | <td colspan="2">{{ itemTr.edging_type }}</td> |
| | | <td class="tdNowrap">单片名称:</td> |
| | | <td colspan="2">{{ itemTr.glass_child }}</td> |
| | | <td class="tdNowrap">产品名称:</td> |
| | | <td colspan="22">{{ itemTr.product_name }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td rowspan='2'>序号</td> |
| | | <!-- <td rowspan='2'>编号</td> --> |
| | | <td rowspan="2">小片顺序</td> |
| | | <td rowspan='2' style="width: 90px">宽*高</td> |
| | | <td rowspan='2'>数量</td> |
| | | <td rowspan='2'>落架</td> |
| | | <td rowspan='2'>面积</td> |
| | | <td rowspan='2'>周长</td> |
| | | <td rowspan='2'>半径</td> |
| | | <td rowspan='2'>备注</td> |
| | | <td v-for="(itemPr,index) in item.processList" :key="index" colspan="2">{{ itemPr.process }}</td> |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.patch }}</td> |
| | | <td>{{ company.printLabel.printFlowCard.lackOf }}</td> |
| | | </tr> |
| | | <tr v-for="(itemFlow, index) in item.detail" :key="index"> |
| | | <td colspan="29"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px " /></div> |
| | | <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div>{{ company.companyName }}</div> |
| | | <div>生产流程卡</div> |
| | | <div v-if="itemFlow.technologyNumberMerge != ''" style="text-align: right;font-weight: bolder"> |
| | | {{ itemFlow.otherRemarks }} |
| | | 流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumberMerge }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | | <div v-else style="text-align: right;font-weight: bolder"> |
| | | {{ itemFlow.otherRemarks }} |
| | | 流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(items, index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">客户名称:</td> |
| | | <td colspan="2">{{ items.customer_name }}</td> |
| | | <td class="tdNowrap">项目名称:</td> |
| | | <td colspan="2">{{ items.project }}</td> |
| | | <td class="tdNowrap">工艺流程:</td> |
| | | <td colspan="22" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | | <tr v-for="(itemTr, index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">磨边类型:</td> |
| | | <td colspan="2">{{ itemTr.edging_type }}</td> |
| | | <td class="tdNowrap">单片名称:</td> |
| | | <td colspan="2">{{ itemTr.glass_child }}</td> |
| | | <td class="tdNowrap">产品名称:</td> |
| | | <td colspan="22">{{ itemTr.product_name }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td rowspan='2'>序号</td> |
| | | <!-- <td rowspan='2'>编号</td> --> |
| | | <td rowspan="2">小片顺序</td> |
| | | <td rowspan='2' style="width: 90px">宽*高</td> |
| | | <td rowspan='2'>数量</td> |
| | | <td rowspan='2'>落架</td> |
| | | <td rowspan='2'>面积</td> |
| | | <td rowspan='2'>周长</td> |
| | | <td rowspan='2'>半径</td> |
| | | <td rowspan='2'>备注</td> |
| | | <td v-for="(itemPr, index) in item.processList" :key="index" colspan="2">{{ itemPr.process }}</td> |
| | | </tr> |
| | | <tr> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td>正品</td> |
| | | <td>次品</td> |
| | | </template> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | |
| | | <tr v-for="(itemDatile,index) in item.detailList" :key="index"> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <!-- <td>{{ itemDatile.s01Value }}</td> --> |
| | | <td>{{ itemDatile.technology_number }}</td> |
| | | <td>{{ itemDatile.child_width }}</td> |
| | | <td class="item" style="width: 5%;height: 100%;"> |
| | | {{ itemDatile.quantity }} |
| | | <!-- <input v-model="itemDatile.quantity" style="width: 100%;height: 100%" @keyup="handleSummary()"/> --> |
| | | </td> |
| | | <td>{{ itemDatile.quantity1 }}</td> |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | | <td>{{ itemDatile.bend_radius }}</td> |
| | | <td>{{ itemDatile.remarks }}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | <tr v-for="(itemDatile, index) in item.detailList" :key="index"> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <!-- <td>{{ itemDatile.s01Value }}</td> --> |
| | | <td>{{ itemDatile.technology_number }}</td> |
| | | <td>{{ itemDatile.child_width }}</td> |
| | | <td class="item" style="width: 5%;height: 100%;"> |
| | | {{ itemDatile.quantity }} |
| | | <!-- <input v-model="itemDatile.quantity" style="width: 100%;height: 100%" @keyup="handleSummary()"/> --> |
| | | </td> |
| | | <td>{{ itemDatile.quantity1 }}</td> |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | | <td>{{ itemDatile.bend_radius }}</td> |
| | | <td>{{ itemDatile.remarks }}</td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td></td> |
| | | <td></td> |
| | | </template> |
| | | </tr> |
| | | |
| | | |
| | | <tr style="height: 14px"> |
| | | <td v-for="(itemsum, index) in item.detail" :key="index" colspan="29"> |
| | | 数量: |
| | | <label>{{ itemsum.quantity }}</label> |
| | | 落架数量: |
| | | <label>{{ itemsum.quantity1 }}</label> |
| | | 面积: |
| | | <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label> |
| | | 落架面积: |
| | | <label>{{ parseFloat(itemsum.gross_area1.toFixed(2)) }}</label> |
| | | 重量: |
| | | <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label> |
| | | 落架重量: |
| | | <label>{{ parseFloat(itemsum.weight1.toFixed(2)) }}</label> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | | </tr> |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | | </tr> |
| | | <tr> |
| | | <td>原片箱号</td> |
| | | <td colspan="28"></td> |
| | | </tr> |
| | | |
| | | <tr v-for="(qrCodeItem, index) in item.detail" :key="index"> |
| | | <td colspan="29"> |
| | | <span style="display: flex;"> |
| | | <span v-for="(qrCodeItems, index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src=qrCodeItems.qrcode> |
| | | </div> |
| | | <span style="float: left;font-weight: bolder">{{ |
| | | qrCodeItem.process_id + "/" + qrCodeItems.technologyNumber |
| | | }}</span> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | | |
| | | <!-- <tfoot> --> |
| | | <tr v-for="(itemtextareas, index) in item.detail" :key="index"> |
| | | <td colspan="29" rowspan="6" style="width: 480px;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea |
| | | style="height: 99%;width: 99%;border: none;;font-size: 12px;overflow: hidden;">{{ |
| | | itemtextareas.processing_note }}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr style="height: 14px"> |
| | | <td v-for="(itemsum,index) in item.detail" :key="index" colspan="29"> |
| | | 数量: |
| | | <label>{{ itemsum.quantity }}</label> |
| | | 落架数量: |
| | | <label>{{ itemsum.quantity1 }}</label> |
| | | 面积: |
| | | <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label> |
| | | 落架面积: |
| | | <label>{{ parseFloat(itemsum.gross_area1.toFixed(2)) }}</label> |
| | | 重量: |
| | | <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label> |
| | | 落架重量: |
| | | <label>{{ parseFloat(itemsum.weight1.toFixed(2)) }}</label> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>生产日期</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>原片箱号</td> |
| | | <td colspan="28"></td> |
| | | </tr> |
| | | <tr v-for="(qrCodeItem,index) in item.detail" :key="index"> |
| | | <td colspan="29"> |
| | | <span style="display: flex;"> |
| | | <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src=qrCodeItems.qrcode> |
| | | </div> |
| | | <span style="float: left;font-weight: bolder">{{ |
| | | qrCodeItem.process_id + "/" + qrCodeItems.technologyNumber |
| | | }}</span> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="29" rowspan="6" style="width: 480px;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;overflow: hidden;">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | <!-- </tfoot> --> |
| | | </table> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | #printFlowCard { |
| | | text-align: center; |
| | | //font-weight: bolder; height: 600px; |
| | | //font-weight: bolder; height: 600px; |
| | | } |
| | | |
| | | #contentTable { |
| | |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable tbody { |
| | | #contentTable tbody {} |
| | | |
| | | } |
| | | |
| | | .tdNowrap { |
| | | |
| | | } |
| | | .tdNowrap {} |
| | | |
| | | #contentTable tfoot { |
| | | font-size: 12px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | input{ |
| | | input { |
| | | border: none; |
| | | background: none; |
| | | } |
| | |
| | | |
| | | @media print { |
| | | @page { |
| | | size: auto; |
| | | margin: 4mm 5mm 5mm 5mm |
| | | |
| | | size: auto; |
| | | margin: 4mm 5mm 5mm 5mm |
| | | } |
| | | |
| | | table { |
| | |
| | | page-break-inside: auto; |
| | | } |
| | | |
| | | #contentTable thead { |
| | | display: table-header-group; |
| | | #contentTable thead { |
| | | display: table-header-group; |
| | | } |
| | | |
| | | tfoot { |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisiblea2 = ref(false) |
| | | const dialogFormVisiblea3 = ref(false) |
| | | const dialogFormVisibleaDownGlass = ref(false) |
| | | const dialogFormVisibleaDownGlasss = ref(false) |
| | | // 数据 |
| | |
| | | fetchFlowCardId(); |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | |
| | | const clearGlass = async () => { |
| | | try { |
| | | const response = await request.post("/unLoadGlass/downGlassTask/updateOutGlassTask") |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | dialogFormVisiblea3.value = false; |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | } |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | | workFlowCard.value = row.flowCardId; |
| | | }; |
| | | const handleBindRack3 = (row) => { |
| | | dialogFormVisiblea3.value = true; // 打开清空玻璃对话框 |
| | | }; |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | |
| | | <el-card style="flex: 1;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="350px" ref="table" @selection-change="handleSelectionChange" :data="tableData" |
| | | <el-table height="400px" ref="table" @selection-change="handleSelectionChange" :data="tableData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <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')" |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="400"> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="500"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用'" |
| | | <el-button size="mini" type="text" v-if="scope.row.workstationId!=7" plain v-show="scope.row.enableState !== '已启用'" |
| | | @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }} |
| | | </el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear') |
| | | <el-button size="mini" type="text" v-if="scope.row.workstationId!=7" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear') |
| | | }}</el-button> |
| | | <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.processcard') }}</el-button> |
| | | <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.printlabels') }}</el-button> |
| | | <el-button @click="open(scope.row)" v-if="scope.row.workstationId!=7" :disabled="scope.row.flowCardId == null">{{ $t('reportWork.processcard') }}</el-button> |
| | | <el-button @click="open1(scope.row)" v-if="scope.row.workstationId!=7" :disabled="(scope.row.flowCardId == null&&scope.row.workstationId!=7)">{{ $t('reportWork.printlabels') }}</el-button> |
| | | <el-button @click="handleBindRack3()" :disabled="(scope.row.totalQuantity ==0)" v-if="scope.row.workstationId==7">{{ $t('reportWork.clear') }}</el-button> |
| | | <el-button @click="open1(scope.row)" :disabled="(scope.row.totalQuantity ==0)">{{ $t('reportWork.printlabels') }}</el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close> |
| | | <el-dialog v-model="dialogFormVisiblea3" top="21vh" width="30%" :title="$t('reportWork.confirmclear')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="clearGlass()"> |
| | | {{ $t('reportWork.sure') }} |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblea3 = false">{{ $t('reportWork.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog style="width: 75%;height: 75%;" id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close> |
| | | <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | |
| | | 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); |
| | | damageSelectWrapper.ne(Damage::getStatus, 7); |
| | | if (type != 0) { |
| | | damageSelectWrapper.eq(Damage::getType, type); |
| | | } |
| | |
| | | damageSelectWrapper.eq(Damage::getWorkingProcedure, workingProcedure); |
| | | } |
| | | List<Damage> damageList = baseMapper.selectList(damageSelectWrapper); |
| | | |
| | | for (Damage damage : damageList) { |
| | | damage.setStatus(2); |
| | | damage.setStatus(3); |
| | | } |
| | | return baseMapper.selectList(damageSelectWrapper); |
| | | } |
| | |
| | | } |
| | | } |
| | | reportingWorkDetails.add(reportingWorkDetail); |
| | | reportingWorkDetail.setDamageDetailsList(damageDetailses); |
| | | reportingWorkDetail.setDamageDetails(damageDetailses); |
| | | sendToERP(reportingWork, reportingWorkDetails); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private LocalDateTime reworkUpdateTime; |
| | | |
| | | private List<DamageDetails> damageDetailsList; |
| | | private List<DamageDetails> damageDetails; |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | |
| | | @DS("pp") |
| | | public interface FlowCardMapper extends BaseMapper<FlowCard> { |
| | | |
| | | List<Map<String, Object>> selectProject(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | List<Map<String, Object>> selectProject(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectFlowCard(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | List<Map<String, Object>> selectFlowCard(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectLabel(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | List<Map<String, Object>> selectLabel(@Param(value = "list") List<String> processId, @Param("technologyNumber") Integer technologyNumber); |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber); |
| | | List<Map<String, Object>> selectLabel(List<String> processId, Integer technologyNumber); |
| | | } |
| | |
| | | import com.mes.pp.mapper.FlowCardMapper; |
| | | import com.mes.pp.service.FlowCardService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import liquibase.pro.packaged.S; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber){ |
| | | public List<Map<String, Object>> selectLabel(List<String> processId, Integer technologyNumber){ |
| | | return baseMapper.selectLabel(processId, technologyNumber); |
| | | } |
| | | } |
| | |
| | | left join sd.product_detail as pd |
| | | on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number |
| | | where fc.process_id = #{processId} |
| | | <if test="technologyNumber != 0"> |
| | | and a.layer = #{technologyNumber} |
| | | </if> |
| | | |
| | | <if test="technologyNumber != 0"> |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | </if> |
| | |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.order_id = left (#{processId} |
| | | , 10) |
| | | and position(ogd.technology_number in #{technologyNumber}) |
| | | and position (ogd.technology_number in #{technologyNumber}) |
| | | GROUP BY order_id, order_number) as ogdc |
| | | on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and |
| | | ogdc.technology_number = ogd.technology_number |
| | |
| | | |
| | | <select id="selectLabel" resultType="java.util.Map"> |
| | | select fc.process_id, |
| | | o.order_id, |
| | | o.project, |
| | | o.customer_id, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | od.quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | c.customer_abbreviation as customer_name, |
| | | ifnull(od.processing_note, '') as processing_note, |
| | | bgt.type_name, |
| | | od.other_columns, |
| | | od.building_number, |
| | | od.bend_radius |
| | | od.remarks as order_id, |
| | | o.project, |
| | | o.customer_id, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | od.quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | c.customer_abbreviation as customer_name, |
| | | ifnull(od.processing_note, '') as processing_note, |
| | | bgt.type_name, |
| | | od.other_columns, |
| | | od.building_number, |
| | | od.bend_radius |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = od.order_id and ogd.order_number = od.order_number |
| | | left join pp.flow_card as fc on o.order_id = fc.order_id and |
| | | od.order_number = fc.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.product pt on pt.id = od.product_id |
| | | left join sd.customer c on c.id = o.customer_id |
| | | left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = od.order_id and ogd.order_number = od.order_number |
| | | left join pp.flow_card as fc on o.order_id = fc.order_id and |
| | | od.order_number = fc.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.product pt on pt.id = od.product_id |
| | | left join sd.customer c on c.id = o.customer_id |
| | | left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id |
| | | where fc.process_id in ( |
| | | <foreach collection="processId" item="item" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | and fc.technology_number = #{technologyNumber} |
| | | group by od.order_number, od.width, od.height |
| | | </select> |
| | | |
| | |
| | | @MapperScan("com.mes.*.mapper") |
| | | @EnableDiscoveryClient |
| | | @EnableSwagger2WebMvc |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | public class CacheGlassModuleApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | // out10Glassstate = "1"; |
| | | // currentSlot = "1"; |
| | | // confirmationWrodValue = "0"; |
| | | // glassIdeValue = "P24110201|17|1"; |
| | | // glassIdeValue = "P25010108|44|1"; |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:A09:{}、A10:{},当前格子号为:{}", |
| | | taskRequestTypeValue, glassIdeValue, confirmationWrodValue, out08Glassstate, out10Glassstate, currentSlot); |
| | |
| | | return; |
| | | } |
| | | boolean result = edgStorageCageDetailsService.inToVerify(glassIdeValue); |
| | | if (!result) { |
| | | log.info("此玻璃id已经进过"); |
| | | return; |
| | | } |
| | | if ("1".equals(taskRequestTypeValue) && result) { |
| | | log.info("2、进片请求,且确认字为0,执行进片任务,扫码重复ID验证【有重复=false,无重复=true】:{}", result); |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | |
| | | BigStorageCageOutTask bigStorageCageOutTask = listMap.get(bigStorageCageDetails.getGlassId()); |
| | | bigStorageCageDetails.setBigStorageCageOutTask(bigStorageCageOutTask); |
| | | } |
| | | bigStorageCageDetailsList.sort(Comparator |
| | | .comparing((BigStorageCageDetails detail) -> detail.getBigStorageCageOutTask().getTrainNumber()) |
| | | .thenComparingInt((BigStorageCageDetails detail) -> detail.getBigStorageCageOutTask().getSerialNumber())); |
| | | |
| | | return bigStorageCageDetailsList; |
| | | } |
| | | |
| | |
| | | BigStorageCageDetails bigStorageCageDetails = baseMapper.selectOne(bigStorageCageDetailsWrapper); |
| | | |
| | | if (temperingGlassInfo != null) { |
| | | if (status == 0) { |
| | | if (status == 8) { |
| | | temperingGlassInfo.setState(Const.GLASS_STATE_DAMAGE); |
| | | } else { |
| | | temperingGlassInfo.setState(Const.GLASS_STATE_TAKE); |
| | | } |
| | | temperingGlassInfoMapper.updateById(temperingGlassInfo); |
| | | temperingGlassInfoMapper.deleteById(temperingGlassInfo); |
| | | } |
| | | Damage damage = new Damage(); |
| | | if (status == 0) { |
| | | if (status == 8) { |
| | | bigStorageCageDetails.setState(Const.GLASS_STATE_DAMAGE); |
| | | damage.setType(Const.GLASS_STATE_DAMAGE); |
| | | } else { |
| | |
| | | package com.mes.userinfo.controller; |
| | | package com.mes.bigstoragetask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import com.mes.utils.Result; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | @Api(description = "进片任务信息") |
| | | @RestController |
| | | @RequestMapping("/big-storage-cage-feed-task") |
| | | @RequestMapping("/bigStorageCageFeedTask") |
| | | public class BigStorageCageFeedTaskController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageFeedTaskService bigStorageCageFeedTaskService; |
| | | // @ApiOperation("进片任务信息") |
| | | // @GetMapping("/querybigStorageCageFeedTask") |
| | | // public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState) { |
| | | // return bigStorageCageFeedTaskService.querybigStorageCageFeedTask(taskState); |
| | | // } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/updateBigStorageCageFeedTask") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageFeedTask bigStorageCageFeedTask) { |
| | | bigStorageCageFeedTaskService.updateById(bigStorageCageFeedTask); |
| | | return Result.build(200, "修改成功", 1); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.userinfo.controller; |
| | | package com.mes.bigstoragetask.controller; |
| | | |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.mes.utils.Result; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @Api(description = "出片任务信息") |
| | | @RestController |
| | | @RequestMapping("/big-storage-cage-out-task") |
| | | @RequestMapping("/bigStorageCageOutTask") |
| | | public class BigStorageCageOutTaskController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | // @ApiOperation("出片任务信息") |
| | | // @GetMapping("/querybigStorageCageOutTask") |
| | | // public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | | // return bigStorageCageOutTaskService.querybigStorageCageOutTask(taskState); |
| | | // } |
| | | |
| | | @ApiOperation("出片任务修改") |
| | | @PostMapping("/updatebigStorageCageOutTask") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageOutTask bigStorageCageOutTask) { |
| | | bigStorageCageOutTaskService.updateById(bigStorageCageOutTask); |
| | | return Result.build(200, "修改成功", 1); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | String d04ToMES = plcParameterObject.getPlcParameter("D04ToMES").getValue(); |
| | | |
| | | |
| | | // d01Id="P24111102|1|13"; |
| | | // d01Id="P25010108|37|8"; |
| | | // d04ToMES="1"; |
| | | // d01ToMES="1"; |
| | | |
| | |
| | | } |
| | | Assert.isFalse(CollectionUtils.isEmpty(bigStorageCageOutTaskList), "未获取出片数据,结束出片任务"); |
| | | log.info("获取出片任务数据{}条,执行保存", bigStorageCageOutTaskList.size()); |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : bigStorageCageOutTaskList |
| | | ) { |
| | | bigStorageCageOutTaskService.save(bigStorageCageOutTask); |
| | | } |
| | | // bigStorageCageOutTaskService.saveBatch(bigStorageCageOutTaskList); |
| | | bigStorageCageOutTaskService.saveBatch(bigStorageCageOutTaskList); |
| | | List<String> glassIds = bigStorageCageOutTaskList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | log.info("将出片玻璃{}玻璃状态改为已出片", glassIds); |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/downGlassTask") |
| | | public class DownGlassTaskController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | DownGlassInfoService downGlassInfoService; |
| | | |
| | | @Resource |
| | | DownGlassTaskService downGlassTaskService; |
| | | |
| | | @PostMapping("/generateOutGlassTask") |
| | | @ApiOperation(value = "生成出片任务", notes = "生成出片任务") |
| | |
| | | return Result.success(downGlassInfoService.generateOutGlassTask(downStorageCageDetails.getGlassId())); |
| | | } |
| | | |
| | | @PostMapping("/updateOutGlassTask") |
| | | @ApiOperation(value = "清空玻璃", notes = "清空玻璃") |
| | | public Result<Boolean> updateOutGlassTask() { |
| | | downGlassTaskService.update( |
| | | new LambdaUpdateWrapper<DownGlassTask>() |
| | | .set(DownGlassTask::getTaskStatus, 3) |
| | | .eq(DownGlassTask::getEndCell, 7) |
| | | .eq(DownGlassTask::getTaskType, 3) |
| | | .lt(DownGlassTask::getTaskStatus, 3) |
| | | ); |
| | | return Result.build(200, "清空成功", true); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param processId,technologyNumber |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> downGlassLabelPrint(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber); |
| | | List<Map<String, Object>> downGlassLabelPrint(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber, @Param(value = "glassIds") List<String> glassIds); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.entity.request.DownGlassInfoRequest; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | @Resource |
| | | DownGlassTaskService downGlassTaskService; |
| | | |
| | | /** |
| | | * 根据流程卡号查询最大序号 |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo) { |
| | | |
| | | List<Map<String, Object>> resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | log.info("MES落架数据:{}", resultList); |
| | | //获取ERP标签所需的信息 |
| | | List<Map<String, Object>> labelInfo; |
| | | if (downGlassInfo.getLayer() != 0) { |
| | | labelInfo = flowCardService.selectLabel(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | if (downGlassInfo.getFlowCardId() == null) { |
| | | List<DownGlassTask> downGlassTasks = downGlassTaskService.list( |
| | | new LambdaQueryWrapper<DownGlassTask>() |
| | | .eq(DownGlassTask::getEndCell, 7) |
| | | .eq(DownGlassTask::getTaskType, 3) |
| | | .lt(DownGlassTask::getTaskStatus, 3) |
| | | ); |
| | | List<String> glassIds = downGlassTasks.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList()); |
| | | resultList = baseMapper.downGlassLabelPrint(null, null, glassIds); |
| | | } else { |
| | | labelInfo = flowCardService.selectLabel(downGlassInfo.getFlowCardId(), 1); |
| | | resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer(), null); |
| | | } |
| | | log.info("标签数据:{}", labelInfo); |
| | | if (CollectionUtils.isNotEmpty(resultList)) { |
| | | List<String> flowCardIds = resultList.stream() |
| | | .map(map -> (String) map.get("flow_card_id")) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | log.info("MES落架数据:{}", resultList); |
| | | //获取ERP标签所需的信息 |
| | | List<Map<String, Object>> labelInfo; |
| | | if (downGlassInfo.getFlowCardId() != null) { |
| | | flowCardIds.add(downGlassInfo.getFlowCardId()); |
| | | labelInfo = flowCardService.selectLabel(flowCardIds, 1); |
| | | } else { |
| | | labelInfo = flowCardService.selectLabel(flowCardIds, 1); |
| | | } |
| | | log.info("标签数据:{}", labelInfo); |
| | | |
| | | for (Map<String, Object> row : resultList) { |
| | | int glass_type = (int) row.get("glass_type"); |
| | | int layer = (int) row.get("layer"); |
| | | for (Map<String, Object> row1 : labelInfo) { |
| | | int orderNumber = (int) row1.get("orderNumber"); |
| | | int technologyNumber = (int) row1.get("technologyNumber"); |
| | | if (downGlassInfo.getLayer() != 0) { |
| | | if (orderNumber == glass_type && technologyNumber == layer) { |
| | | for (Map<String, Object> row : resultList) { |
| | | int glass_type = (int) row.get("glass_type"); |
| | | int layer = (int) row.get("layer"); |
| | | String flowCardId = (String) row.get("flow_card_id"); |
| | | for (Map<String, Object> row1 : labelInfo) { |
| | | int orderNumber = (int) row1.get("orderNumber"); |
| | | int technologyNumber = (int) row1.get("technologyNumber"); |
| | | String processId = (String) row1.get("process_id"); |
| | | // if (downGlassInfo.getLayer() != 0) { |
| | | if (orderNumber == glass_type && processId.equals(flowCardId)) { |
| | | |
| | | String order_id = (String) row1.get("order_id"); |
| | | String project = (String) row1.get("project"); |
| | | Long customer_id = (Long) row1.get("customer_id"); |
| | | BigDecimal width = (BigDecimal) row1.get("width"); |
| | | BigDecimal height = (BigDecimal) row1.get("height"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | String glass_child = (String) row1.get("glass_child"); |
| | | String process = (String) row1.get("process"); |
| | | String customer_name = (String) row1.get("customer_name"); |
| | | String processing_note = (String) row1.get("processing_note"); |
| | | String other_colunmns = (String) row1.get("other_colunmns"); |
| | | String building_number = (String) row1.get("building_number"); |
| | | String bend_radius = (String) row1.get("bend_radius"); |
| | | String order_id = (String) row1.get("order_id"); |
| | | String project = (String) row1.get("project"); |
| | | Long customer_id = (Long) row1.get("customer_id"); |
| | | BigDecimal width = (BigDecimal) row1.get("width"); |
| | | BigDecimal height = (BigDecimal) row1.get("height"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | String glass_child = (String) row1.get("glass_child"); |
| | | String process = (String) row1.get("process"); |
| | | String customer_name = (String) row1.get("customer_name"); |
| | | String processing_note = (String) row1.get("processing_note"); |
| | | String other_colunmns = (String) row1.get("other_colunmns"); |
| | | String building_number = (String) row1.get("building_number"); |
| | | String bend_radius = (String) row1.get("bend_radius"); |
| | | |
| | | row.put("orderNumber", orderNumber); |
| | | row.put("technology_number", technologyNumber); |
| | | row.put("order_id", order_id); |
| | | row.put("project", project); |
| | | row.put("customer_id", customer_id); |
| | | row.put("width", width); |
| | | row.put("height", height); |
| | | row.put("quantity", quantity); |
| | | row.put("glass_child", glass_child); |
| | | row.put("process", process); |
| | | row.put("customer_name", customer_name); |
| | | row.put("processing_note", processing_note); |
| | | row.put("other_colunmns", other_colunmns); |
| | | row.put("building_number", building_number); |
| | | row.put("bend_radius", bend_radius); |
| | | } |
| | | } else { |
| | | if (orderNumber == glass_type) { |
| | | |
| | | String order_id = (String) row1.get("order_id"); |
| | | String project = (String) row1.get("project"); |
| | | Long customer_id = (Long) row1.get("customer_id"); |
| | | BigDecimal width = (BigDecimal) row1.get("width"); |
| | | BigDecimal height = (BigDecimal) row1.get("height"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | String glass_child = (String) row1.get("glass_child"); |
| | | String process = (String) row1.get("process"); |
| | | String customer_name = (String) row1.get("customer_name"); |
| | | String processing_note = (String) row1.get("processing_note"); |
| | | String other_colunmns = (String) row1.get("other_colunmns"); |
| | | String building_number = (String) row1.get("building_number"); |
| | | String bend_radius = (String) row1.get("bend_radius"); |
| | | |
| | | row.put("orderNumber", orderNumber); |
| | | row.put("technology_number", technologyNumber); |
| | | row.put("order_id", order_id); |
| | | row.put("project", project); |
| | | row.put("customer_id", customer_id); |
| | | row.put("width", width); |
| | | row.put("height", height); |
| | | row.put("quantity", quantity); |
| | | row.put("glass_child", glass_child); |
| | | row.put("process", process); |
| | | row.put("customer_name", customer_name); |
| | | row.put("processing_note", processing_note); |
| | | row.put("other_colunmns", other_colunmns); |
| | | row.put("building_number", building_number); |
| | | row.put("bend_radius", bend_radius); |
| | | } |
| | | row.put("orderNumber", orderNumber); |
| | | row.put("technology_number", technologyNumber); |
| | | row.put("order_id", order_id); |
| | | row.put("project", project); |
| | | row.put("customer_id", customer_id); |
| | | row.put("width", width); |
| | | row.put("height", height); |
| | | row.put("quantity", quantity); |
| | | row.put("glass_child", glass_child); |
| | | row.put("process", process); |
| | | row.put("customer_name", customer_name); |
| | | row.put("processing_note", processing_note); |
| | | row.put("other_colunmns", other_colunmns); |
| | | row.put("building_number", building_number); |
| | | row.put("bend_radius", bend_radius); |
| | | } |
| | | // } else { |
| | | // if (orderNumber == glass_type) { |
| | | // |
| | | // String order_id = (String) row1.get("order_id"); |
| | | // String project = (String) row1.get("project"); |
| | | // Long customer_id = (Long) row1.get("customer_id"); |
| | | // BigDecimal width = (BigDecimal) row1.get("width"); |
| | | // BigDecimal height = (BigDecimal) row1.get("height"); |
| | | // Long quantity = (Long) row1.get("quantity"); |
| | | // String glass_child = (String) row1.get("glass_child"); |
| | | // String process = (String) row1.get("process"); |
| | | // String customer_name = (String) row1.get("customer_name"); |
| | | // String processing_note = (String) row1.get("processing_note"); |
| | | // String other_colunmns = (String) row1.get("other_colunmns"); |
| | | // String building_number = (String) row1.get("building_number"); |
| | | // String bend_radius = (String) row1.get("bend_radius"); |
| | | // |
| | | // row.put("orderNumber", orderNumber); |
| | | // row.put("technology_number", technologyNumber); |
| | | // row.put("order_id", order_id); |
| | | // row.put("project", project); |
| | | // row.put("customer_id", customer_id); |
| | | // row.put("width", width); |
| | | // row.put("height", height); |
| | | // row.put("quantity", quantity); |
| | | // row.put("glass_child", glass_child); |
| | | // row.put("process", process); |
| | | // row.put("customer_name", customer_name); |
| | | // row.put("processing_note", processing_note); |
| | | // row.put("other_colunmns", other_colunmns); |
| | | // row.put("building_number", building_number); |
| | | // row.put("bend_radius", bend_radius); |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | JSONObject jsonObject = new JSONObject();
|
| | |
|
| | | List<DownWorkstation> data = downWorkstationService.list();
|
| | | List<DownGlassTask> downGlassTasks = downGlassTaskService.list(
|
| | | new LambdaQueryWrapper<DownGlassTask>()
|
| | | .eq(DownGlassTask::getEndCell, 7)
|
| | | .eq(DownGlassTask::getTaskType, 3)
|
| | | .lt(DownGlassTask::getTaskStatus, 3)
|
| | | );
|
| | | DownWorkstation downWorkstation = new DownWorkstation();
|
| | | downWorkstation.setWorkstationId(7);
|
| | | downWorkstation.setEnableState(1);
|
| | | downWorkstation.setRacksNumber(downGlassTasks.size());
|
| | | downWorkstation.setTotalQuantity(downGlassTasks.size());
|
| | | data.add(downWorkstation);
|
| | | jsonObject.append("params", data);
|
| | | log.info(jsonObject.toString());
|
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
|
| | |
| | | b.tempering_feed_sequence |
| | | from down_glass_info a |
| | | inner join glass_info b on a.glass_id = b.glass_id |
| | | where a.flow_card_id = #{processId} |
| | | and a.layer = #{technologyNumber} |
| | | where |
| | | 1=1 |
| | | <if test="processId != null"> |
| | | and a.flow_card_id = #{processId} |
| | | </if> |
| | | <if test="technologyNumber != null"> |
| | | and a.layer = #{technologyNumber} |
| | | </if> |
| | | <if test="glassIds != null and !glassIds.isEmpty()"> |
| | | and a.glass_id in |
| | | <foreach collection="glassIds" item="item" open="(" close=")" separator=","> |
| | | #{item} <!-- 这里 MyBatis 会自动处理字符串 --> |
| | | </foreach> |
| | | |
| | | </if> |
| | | group by a.flow_card_id, a.layer, a.width, a.height, a.filmsid, a.thickness, a.glass_type, a.id |
| | | order by a.id |
| | | </select> |