zhoushihao
2025-09-22 d41ce9c4703807bf2607a74b8305c1d78aed4ec1
Merge remote-tracking branch 'origin/master'
15个文件已修改
680 ■■■■ 已修改文件
UI-Project/src/views/hollow/hollowequipment.vue 162 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipmenthree.vue 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipmenttwo.vue 162 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowslicecage.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassRelationInfoController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipment.vue
@@ -16,18 +16,13 @@
        <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
          {{ $t('hellow.starttask') }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{
        <!-- <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{
          $t('hellow.taskdet')
        }}
        </el-button>
        </el-button> -->
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{
          $t('hellow.stopproject')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning"
          @click="handleBinde">{{
            $t('searchOrder.printlabels')
          }}
        </el-button>
      </div>
      <div id="dotClass">
@@ -64,9 +59,31 @@
        <!-- </div> -->
      </div>
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="650" ref="table" :data="tableDataa"
          :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }">
          <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" />
    <el-tabs v-model="activeTab" type="card">
    <el-tab-pane
      v-for="tab in tabList"
      :key="tab.title"
      :label="tab.title"
      :name="tab.title"
    >
    <div style="margin-bottom: 10px;">
     <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{
          $t('hellow.taskdet')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning"
          @click="handleBinde(tab.tableDataa)">{{
            $t('searchOrder.printlabels')
          }}
        </el-button>
  </div>
      <!-- 动态表格 -->
      <el-table
        :data="tab.tableDataa"
        :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
      >
         <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" />
          <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" />
          <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" />
          <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" />
@@ -79,7 +96,9 @@
              {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }}
            </template>
          </el-table-column>
        </el-table>
      </el-table>
    </el-tab-pane>
  </el-tabs>
        <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;">
      <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div>
    <el-pagination
@@ -808,17 +827,6 @@
    <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow"
      :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" />
  </el-dialog>
  <!-- 删除任务 -->
  <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')">
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handled">
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>
  <!-- 预览 -->
  <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')">
    <div style="margin-left: 50px;margin-bottom: 10px;">
@@ -965,7 +973,7 @@
</template>
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus'
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed } from "vue";
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance  } from "vue";
import request from "@/utils/request"
import { host, WebSocketHost } from '@/utils/constants'
import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService';
@@ -974,8 +982,10 @@
const blinda = ref(false)
const blindb = ref(false)
const blindc = ref(false)
const blindd = ref(false)
const mulan = ref(false)
const activeTab = ref('')
const tabList = ref([])
const internalInstance = getCurrentInstance()
const tableDataa = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
@@ -1050,7 +1060,7 @@
  }
]
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassone`;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassOne`;
const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
watch(() => currentPage.value, (newVal) => {
  window.localStorage.setItem('currentPage', newVal);
@@ -1064,19 +1074,24 @@
  fetchFlowBind(currentRow.flowCardId, currentPage2.value);
};
const handleMessage = (data) => {
  const rawData = data.queueInfo[0]
  const formattedData = Object.entries(rawData).map(([key, data]) => ({
    title: key,
    tableDataa: Array.isArray(data) ? data : [data]
  }));
  tabList.value = formattedData;
  if (tabList.value.length > 0) {
    activeTab.value = tabList.value[0].title;
  }
  internalInstance.ctx.$forceUpdate();
  try {
    tableDataa.value = data.queueInfo[0];
    const allPageData = data;
    const currentPageKeyValue = currentPageKey.value;
    const currentPageData = allPageData[currentPageKeyValue];
    if (data.freeRequest != null) {
      freeone.value = data.freeRequest[0] == true ? 'green' : '#911005';
    }
    // if (currentPageData && Array.isArray(currentPageData) && currentPageData.length > 0) {
    //   tableDataa.value = currentPageData[0];
    // } else {
    //   console.warn('No data for the current page key:', currentPageKeyValue);
    // }
  } catch (error) {
  }
};
@@ -1096,10 +1111,6 @@
// 暂停任务 
const handleBindc = (row) => {
  blindc.value = true;
};
// 删除任务
const handleBindd = (row) => {
  blindd.value = true;
};
const removalMethodMap = {
  1: t('Mounting.removal'),
@@ -1643,19 +1654,6 @@
      dialogFormVisiblee.value = false
      selectedProjectNo.value = ''
      closeWebSocket(socket);
      const summary = response.data.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
    } else {
    }
  } catch (error) {
@@ -1688,66 +1686,53 @@
// 开始任务
const handlea = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId=" + flowCardId + "&cell=" + 930;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 930 ;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 暂停任务
const handlec = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId=" + flowCardId + "&cell=" + 930;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 930;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindc.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 删除任务
const handled = async () => {
const handleDelete = async (flowCardId) => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    const confirmResult = await ElMessageBox.confirm(
      t('hellow.hollowtaskdet'),
      t('workOrder.prompt'),
      {
        confirmButtonText: t('workOrder.yes'),
        cancelButtonText: t('workOrder.cancel'),
        type: 'warning',
      }
    );
 if (confirmResult === 'confirm') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 930;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindd.value = false;
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
      ElMessage.error(response.msg);
      }
    }
  } catch (error) {
  }
}
  }
};
// 领取任务
const finisha = async () => {
  if (!totalPairQuantity.value) {
@@ -1822,7 +1807,20 @@
]
const blinde = ref(false)
const labelPrint = ref(false);
const handleBinde = (row) => {
const handleBinde = (flowCard) => {
  const summary = flowCard.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
  blinde.value = true;
  getTags();
  hiprint.init();
UI-Project/src/views/hollow/hollowequipmenthree.vue
@@ -15,17 +15,9 @@
    <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
          {{ $t('hellow.starttask') }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{
            $t('hellow.taskdet')
          }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{
            $t('hellow.stopproject')
          }}
        </el-button>
        <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
  </div>
     
@@ -34,22 +26,44 @@
        <i :style="{ marginTop: '2px', backgroundColor: freethree, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
       </div>
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="650" ref="table" :data="tableDataa"
                  :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }">
          <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center"/>
          <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center"/>
          <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center"/>
          <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center"/>
          <el-table-column prop="layer" :label="$t('hellow.layer')" align="center"/>
          <el-table-column prop="filmsId" :label="$t('hellow.coatingtypes')" align="center"/>
          <el-table-column prop="height" :label="$t('hellow.height')" align="center"/>
          <el-table-column prop="width" :label="$t('hellow.width')" align="center"/>
        <el-tabs v-model="activeTab" type="card">
    <el-tab-pane
      v-for="tab in tabList"
      :key="tab.title"
      :label="tab.title"
      :name="tab.title"
    >
    <div style="margin-bottom: 10px;">
     <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{
          $t('hellow.taskdet')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBinde(tab.tableDataa)">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
  </div>
      <!-- 动态表格 -->
      <el-table
        :data="tab.tableDataa"
        :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
      >
         <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" />
          <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" />
          <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" />
          <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" />
          <el-table-column prop="layer" :label="$t('hellow.layer')" align="center" />
          <el-table-column prop="filmsId" :label="$t('hellow.coatingtypes')" align="center" />
          <el-table-column prop="height" :label="$t('hellow.height')" align="center" />
          <el-table-column prop="width" :label="$t('hellow.width')" align="center" />
          <el-table-column prop="state" :label="$t('hellow.state')" align="center">
            <template #default="scope">
              {{ scope.row.state == -1 ? "等待出片" : "出片完成" }}
              {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }}
            </template>
          </el-table-column>
        </el-table>
      </el-table>
    </el-tab-pane>
  </el-tabs>
      <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;">
      <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div>
    <el-pagination
@@ -441,17 +455,6 @@
      <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow"
        :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" />
    </el-dialog>
  <!-- 删除任务 -->
  <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')">
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handled">
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>
  <!-- 预览 -->
  <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')" >
    <div style="margin-left: 50px;margin-bottom: 10px;">
@@ -527,7 +530,7 @@
</template>
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus'
import {onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed} from "vue";
import {onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance} from "vue";
import request from "@/utils/request"
import {host, WebSocketHost} from '@/utils/constants'
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
@@ -536,8 +539,10 @@
const blinda = ref(false)
const blindb = ref(false)
const blindc = ref(false)
const blindd = ref(false)
const mulan = ref(false)
const activeTab = ref('')
const tabList = ref([])
const internalInstance = getCurrentInstance()
const tableDataa = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
@@ -608,8 +613,17 @@
  fetchFlowBind(currentRow.flowCardId, currentPage2.value);
};
const handleMessage = (data) => {
  const rawData = data.queueInfo[0]
  const formattedData = Object.entries(rawData).map(([key, data]) => ({
    title: key,
    tableDataa: Array.isArray(data) ? data : [data]
  }));
  tabList.value = formattedData;
  if (tabList.value.length > 0) {
    activeTab.value = tabList.value[0].title;
  }
  internalInstance.ctx.$forceUpdate();
  try {
    tableDataa.value = data.queueInfo[0];
    const allPageData = data;
    const currentPageKeyValue = currentPageKey.value;
    const currentPageData = allPageData[currentPageKeyValue];
@@ -656,10 +670,30 @@
const handleBindc = (row) => {
  blindc.value = true;
};
// 删除任务
const handleBindd = (row) => {
  blindd.value = true;
};
// 删除任务
const handleDelete = async (flowCardId) => {
  try {
    const confirmResult = await ElMessageBox.confirm(
      t('hellow.hollowtaskdet'),
      t('workOrder.prompt'),
      {
        confirmButtonText: t('workOrder.yes'),
        cancelButtonText: t('workOrder.cancel'),
        type: 'warning',
      }
    );
 if (confirmResult === 'confirm') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 932;
      const response = await request.post(url)
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      ElMessage.error(response.msg);
      }
    }
  } catch (error) {
  }
};
const removalMethodMap = {
  1: t('Mounting.removal'),
  0: t('Mounting.noremoval')
@@ -892,19 +926,6 @@
      dialogFormVisiblee.value = false
      selectedProjectNo.value = ''
      closeWebSocket(socket);
      const summary = response.data.reduce((map, item) => {
              const key = `${item.hollowSequence}`;
              if (!map[key]) {
                map[key] = {
                  printQuantity: 1,
                  order_number: item.glassType,
                  processId: item.flowCardId,
                  orderId:item.flowCardId.slice(0, 10)
                };
              }
              return map;
            }, {});
            listFlow.value = Object.values(summary);
  } else {
    }
  } catch (error) {
@@ -937,42 +958,26 @@
// 开始任务
const handlea = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    var url="/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId="+flowCardId + "&cell=" + 932;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 932 ;
    const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 暂停任务
const handlec = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    var url="/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId="+flowCardId + "&cell=" + 932;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 932;
    const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindc.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
@@ -1062,7 +1067,20 @@
]
const blinde = ref(false)
const labelPrint = ref(false);
const handleBinde = (row) => {
const handleBinde = (flowCard) => {
  const summary = flowCard.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
  blinde.value = true;
  getTags();
  hiprint.init();
UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -16,16 +16,8 @@
        <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
          {{ $t('hellow.starttask') }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="info" @click="handleBindd">{{
          $t('hellow.taskdet')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{
          $t('hellow.stopproject')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
      </div>
@@ -36,9 +28,29 @@
          :style="{ marginTop: '2px', backgroundColor: freetwo, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
      </div>
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="650" ref="table" :data="tableDataa"
          :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }">
          <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" />
         <el-tabs v-model="activeTab" type="card">
    <el-tab-pane
      v-for="tab in tabList"
      :key="tab.title"
      :label="tab.title"
      :name="tab.title"
    >
    <div style="margin-bottom: 10px;">
     <el-button style="margin-left: 10px;" type="info" @click="handleDelete(tab.title)">{{
          $t('hellow.taskdet')
        }}
        </el-button>
        <el-button style="margin-left: 10px;"  id="searchButton" type="warning" @click="handleBinde(tab.tableDataa)">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
  </div>
      <!-- 动态表格 -->
      <el-table
        :data="tab.tableDataa"
        :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
      >
         <el-table-column prop="flowCardId" :label="$t('hellow.flowCardId')" align="center" />
          <el-table-column prop="glassId" :label="$t('searchOrder.glassID')" align="center" />
          <el-table-column prop="hollowSequence" :label="$t('hellow.order')" align="center" />
          <el-table-column prop="thickness" :label="$t('hellow.thickness')" align="center" />
@@ -48,10 +60,12 @@
          <el-table-column prop="width" :label="$t('hellow.width')" align="center" />
          <el-table-column prop="state" :label="$t('hellow.state')" align="center">
            <template #default="scope">
              {{ scope.row.state == -1 ? "等待出片" : "出片完成" }}
              {{ scope.row.state == -1 ? $t('hellow.waitingout') : $t('hellow.finishout') }}
            </template>
          </el-table-column>
        </el-table>
      </el-table>
    </el-tab-pane>
  </el-tabs>
        <!-- <div style="display: flex;margin-left: 40%;margin-top: 10px;">
      <div style="margin-top: 5px;margin-right: 5px;">{{ $t('hellow.line') }}</div>
    <el-pagination
@@ -387,7 +401,7 @@
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handlec">
          {{ $t('basicData.confirm') }}e
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindc = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
@@ -416,17 +430,6 @@
    <el-button :icon="Printer" circle @click="printOrder(1)">{{ $t('processCard.printing') }}</el-button>
    <print-custom-label-x-j id="childLabel" :faceOrientation="stateValue" :lableType="1" :list="listFlow"
      :lastList='lastList' :type="tag.name" style="width: 100%;height: 100%" />
  </el-dialog>
  <!-- 删除任务 -->
  <el-dialog v-model="blindd" top="30vh" width="25%" :title="$t('hellow.hollowtaskdet')">
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handled">
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindd = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>
  <!-- 预览 -->
  <el-dialog v-model="dialogFormVisiblee" top="24vh" width="25%" :title="$t('hellow.reviewproject')">
@@ -489,7 +492,7 @@
<script setup>
import { CircleCheck, Download, Printer } from "@element-plus/icons-vue/global";
import { ElMessage, ElMessageBox } from 'element-plus'
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed } from "vue";
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance } from "vue";
import request from "@/utils/request"
import requestErp from "@/utils/requestErp"
import { host, WebSocketHost } from '@/utils/constants'
@@ -500,9 +503,10 @@
const blinda = ref(false)
const blindb = ref(false)
const blindc = ref(false)
const blindd = ref(false)
const mulan = ref(false)
const activeTab = ref('')
const tabList = ref([])
const internalInstance = getCurrentInstance()
const tableDataa = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
@@ -594,19 +598,23 @@
  fetchFlowBind(currentRow.flowCardId, currentPage2.value);
};
const handleMessage = (data) => {
  const rawData = data.queueInfo[0]
  const formattedData = Object.entries(rawData).map(([key, data]) => ({
    title: key,
    tableDataa: Array.isArray(data) ? data : [data]
  }));
  tabList.value = formattedData;
  if (tabList.value.length > 0) {
    activeTab.value = tabList.value[0].title;
  }
  internalInstance.ctx.$forceUpdate();
  try {
    tableDataa.value = data.queueInfo[0];
    const allPageData = data;
    const currentPageKeyValue = currentPageKey.value;
    const currentPageData = allPageData[currentPageKeyValue];
    if (data.freeRequest != null) {
      freetwo.value = data.freeRequest[0] == true ? 'green' : '#911005';
    }
    // if (currentPageData && Array.isArray(currentPageData) && currentPageData.length > 0) {
    //   tableDataa.value = currentPageData[0];
    // } else {
    //   console.warn('No data for the current page key:', currentPageKeyValue);
    // }
  } catch (error) {
  }
};
@@ -647,11 +655,20 @@
const handleBindc = (row) => {
  blindc.value = true;
};
// 删除任务
const handleBindd = (row) => {
  blindd.value = true;
};
const handleBinde = (row) => {
const handleBinde = (flowCard) => {
  const summary = flowCard.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
  blinde.value = true;
  getTags();
  hiprint.init();
@@ -937,20 +954,6 @@
      selectedProjectNo.value = ''
      closeWebSocket(socket);
      const summary = response.data.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
    } else {
    }
  } catch (error) {
@@ -983,66 +986,53 @@
// 开始任务
const handlea = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?flowCardId=" + flowCardId + "&cell=" + 931;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 931 ;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blinda.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 暂停任务
const handlec = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?flowCardId=" + flowCardId + "&cell=" + 931;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 931;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindc.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 删除任务
const handled = async () => {
const handleDelete = async (flowCardId) => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
    const confirmResult = await ElMessageBox.confirm(
      t('hellow.hollowtaskdet'),
      t('workOrder.prompt'),
      {
        confirmButtonText: t('workOrder.yes'),
        cancelButtonText: t('workOrder.cancel'),
        type: 'warning',
      }
    );
 if (confirmResult === 'confirm') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 931;
      const response = await request.post(url)
      if (response.code == 200) {
        ElMessage.success(response.message);
        blindd.value = false;
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
      ElMessage.error(response.msg);
      }
    }
  } catch (error) {
  }
}
  }
};
// 领取任务
const finisha = async () => {
  let flowCardId = window.localStorage.getItem('flowCardId')
UI-Project/src/views/hollow/hollowslicecage.vue
@@ -75,13 +75,13 @@
  add.value = true;
};
// 缺片详情
const handleMissingFilms = (row) => {
  currentPage2.value = 1;
  const { flowCardId } = row;
  currentLack.flowCardId = row.flowCardId;
  dialogFormVisibleb.value = true;
  fetchFlowBind(flowCardId, currentPage2.value);
};
// const handleMissingFilms = (row) => {
//   currentPage2.value = 1;
//   const { flowCardId } = row;
//   currentLack.flowCardId = row.flowCardId;
//   dialogFormVisibleb.value = true;
//   fetchFlowBind(flowCardId, currentPage2.value);
// };
const handlePageChange2 = (newPage) => {
  currentPage2.value = newPage;
  fetchFlowBind(currentLack.flowCardId, currentPage2.value);
@@ -425,8 +425,8 @@
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/hollowGlassMessage`;
const handleMessage = (data) => {
  if(data.bigStorageCageUsageSummary!=null){
    const summaries = data.bigStorageCageUsageSummary[0];
  if(data.lackDetailsList!=null){
    const summaries = data.lackDetailsList[0];
      const updatedData = summaries.map(summary => ({
        ...summary,
        totalNumber: summary.layer * summary.sumCount,
@@ -886,26 +886,20 @@
  <div style="width: 100%; height: 100%; overflow: hidden;">
    <el-table 
      ref="table" 
      border
      :data="tableDatass" 
      :header-cell-style="{background:'#F2F3F5', color:'#1D2129'}"
      show-summary
      :summary-method="getSummaries"
      max-height="calc(500px - 35px)"
      style="width: 100%;"
    >
      <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="140" />
      <el-table-column prop="sumCount" align="center" :label="$t('searchOrder.totallogarithms')" min-width="120" />
      <el-table-column prop="pairCount" align="center" :label="$t('searchOrder.numberpairs')" min-width="120" />
      <el-table-column prop="totalNumber" align="center" :label="$t('hellow.totalnumber')" min-width="100" />
      <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="120" />
      <el-table-column fixed="right" :label="$t('hellow.operate')" align="center">
        <template #default="scope">
          <el-button type="text" plain @click="handleMissingFilms(scope.row)">
            {{ $t('hellow.missingfilms') }}
          </el-button>
        </template>
      </el-table-column>
      <el-table-column prop="layer" align="center" :label="$t('reportmanage.layer')" min-width="40" />
      <el-table-column prop="glassType" align="center" :label="$t('large.serialnumber')" min-width="80" />
      <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80" />
      <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80" />
      <el-table-column prop="height" align="center" :label="$t('hellow.height')" min-width="80" />
      <el-table-column prop="width" align="center" :label="$t('hellow.width')" min-width="80" />
      <el-table-column prop="lackCount" align="center" :label="$t('hellow.missingnumber')" min-width="80" />
      <el-table-column prop="damageCount" align="center" :label="$t('large.brokenNum')"/>
    </el-table>
  </div>
</el-card>
hangzhoumesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
@@ -85,7 +85,7 @@
     * 向当前用户的所有会话发送消息
     */
    public void sendToWeb(String webSocketName, String message) {
        List<WebSocketServer> sessions = sessionMap.get(webSocketName);
         List<WebSocketServer> sessions = sessionMap.get(webSocketName);
        if (sessions == null) return;
        sessions.forEach(ws -> {
            try {
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
@@ -19,6 +19,7 @@
import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
 * (HollowGlassOutRelationInfo)表控制层
@@ -33,6 +34,7 @@
    @Resource
    HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService;
    @ApiOperation("领取任务")
    @PostMapping("/receiveTask")
    public Result<HollowGlassOutRelationInfo> receiveTask(HollowTaskRequest request) {
@@ -63,26 +65,26 @@
    @ApiOperation("预览指定任务信息")
    @PostMapping("/appointHollowTaskDetails")
    public Result<List<HollowGlassQueueInfo>> appointHollowTaskDetails(String flowCardId, int cell) {
        return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.appointHollowTaskDetails(flowCardId, cell));
    public Result<Map<String, List<HollowGlassQueueInfo>>> appointHollowTaskDetails(int cell) {
        return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.appointHollowTaskDetails(cell));
    }
    @ApiOperation("删除指定任务信息")
    @PostMapping("/deleteHollowTaskDetails")
    public Result<Boolean> deleteHollowTaskDetails(String flowCardId, int cell) {
        return Result.build(200, "预览指定任务信息成功", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell));
        return Result.build(200, "删除指定任务信息成功", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell));
    }
    @ApiOperation("开始任务")
    @PostMapping("/startTask")
    public Result<Boolean> startTask(String flowCardId, int cell) {
        return Result.build(200, "开始任务成功", hollowGlassOutRelationInfoService.startTask(flowCardId, cell));
    public Result<Boolean> startTask(int cell) {
        return Result.build(200, "开始任务成功", hollowGlassOutRelationInfoService.startTask(cell));
    }
    @ApiOperation("暂停任务")
    @PostMapping("/pauseTask")
    public Result<Boolean> pauseTask(String flowCardId, int cell) {
        return Result.build(200, "暂停任务成功", hollowGlassOutRelationInfoService.pauseTask(flowCardId, cell));
    public Result<Boolean> pauseTask(int cell) {
        return Result.build(200, "暂停任务成功", hollowGlassOutRelationInfoService.pauseTask(cell));
    }
    @ApiOperation("结束任务")
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassRelationInfoController.java
@@ -41,8 +41,8 @@
    @ApiOperation("查询指定流程卡及层数的缺片详情")
    @PostMapping("/queryLackByFlowCard")
    public Result<Map<Integer, List<LackDetailsDTO>> > queryLackByFlowCard(String flowCardId) {
        Map<Integer, List<LackDetailsDTO>>  lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard(flowCardId);
    public Result<List<LackDetailsDTO>> queryLackByFlowCard() {
        List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard();
        return Result.success(lackDetailsList);
    }
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
@@ -23,7 +23,7 @@
    List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(@Param("flowCardId") String flowCardId, @Param("totalLayer") int totalLayer, @Param("layer") int layer);
    List<LackDetailsDTO> queryLackByFlowCard(String flowCardId);
    List<LackDetailsDTO> queryLackByFlowCard();
    int queryLayerByFlowCardId(@Param("flowCardId") String flowCardId);
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
@@ -10,6 +10,7 @@
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
 * (HollowGlassOutRelationInfo)表服务接口
@@ -29,11 +30,11 @@
    List<String> hollowTaskList(int cell);
    List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell);
    Map<String, List<HollowGlassQueueInfo>> appointHollowTaskDetails( int cell);
    Boolean startTask(String flowCardId, int cell);
    Boolean startTask(int cell);
    Boolean pauseTask(String flowCardId, int cell);
    Boolean pauseTask(int cell);
    Boolean finishTask(String flowCardId, int cell);
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java
@@ -35,7 +35,7 @@
    List<FlowCardGlassInfoDTO> queryHollowAllFlowCardSummary(HollowBigStorageDetailsQueryVO query);
    Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId);
    List<LackDetailsDTO> queryLackByFlowCard();
    int queryLayerByFlowCardId(String flowCardId);
//    List<LackDetailsDTO> queryLackByFlowCard(String flowCardId);
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -115,44 +115,44 @@
    }
    @Override
    public List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell) {
    public Map<String, List<HollowGlassQueueInfo>> appointHollowTaskDetails(int cell) {
        //按照流程卡及路线,查找对应的任务信息
        HollowGlassOutRelationInfo hollowGlassOutRelationInfo = this.getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
        List<HollowGlassOutRelationInfo> hollowGlassOutRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
                .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
                .eq(HollowGlassOutRelationInfo::getCell, cell).last("limit 1"));
        if (null == hollowGlassOutRelationInfo) {
            return new ArrayList<HollowGlassQueueInfo>();
                .eq(HollowGlassOutRelationInfo::getCell, cell));
        if (CollectionUtil.isEmpty(hollowGlassOutRelationInfos)) {
            return null;
        }
        List<Long> ids = hollowGlassOutRelationInfos.stream()
                .map(HollowGlassOutRelationInfo::getId) // 提取每个元素的id
                .collect(Collectors.toList());
        //按照任务id查询对列表中的队列信息
        return hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>()
                .eq(HollowGlassQueueInfo::getRelationId, hollowGlassOutRelationInfo.getId()));
        List<HollowGlassQueueInfo> hollowGlassQueueInfos = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>()
                .in(HollowGlassQueueInfo::getRelationId, ids)
                .orderByAsc(HollowGlassQueueInfo::getId));
        Map<String, List<HollowGlassQueueInfo>> groupedByFlowCardId = hollowGlassQueueInfos.stream()
                .collect(Collectors.groupingBy(
                        HollowGlassQueueInfo::getFlowCardId,
                        LinkedHashMap::new,
                        Collectors.toList()
                ));
        return groupedByFlowCardId;
    }
    @Override
    public Boolean startTask(String flowCardId, int cell) {
        log.info("查看该流程卡是否由正在执行的任务,流程卡:{}", flowCardId);
        int taskCount = this.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
                .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId));
        if (taskCount == 0 || taskCount > 1) {
            log.info("该流程卡不存在任务或者有正在执行中,无法再次执行");
            return Boolean.FALSE;
        }
    public Boolean startTask(int cell) {
        //更新任务状态为开始
        return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
                .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
                .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)
                .eq(HollowGlassOutRelationInfo::getCell, cell));
    }
    @Override
    public Boolean pauseTask(String flowCardId, int cell) {
    public Boolean pauseTask(int cell) {
//        更新任务状态为暂停
        return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
                .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_PAUSE)
                .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
                .ne(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)
                .eq(HollowGlassOutRelationInfo::getCell, cell));
    }
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -400,10 +400,9 @@
    }
    @Override
    public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) {
        List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId);
        Map<Integer, List<LackDetailsDTO>> listMap = lackDetailsList.stream().collect(Collectors.groupingBy(LackDetailsDTO::getLayer));
        return listMap;
    public List<LackDetailsDTO> queryLackByFlowCard() {
        List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard();
        return lackDetailsList;
    }
    @Override
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -418,6 +418,8 @@
                            .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                                    .eq(HollowGlassOutRelationInfo::getCell, cell)
                                    .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                                    .orderByAsc(HollowGlassOutRelationInfo::getId)
                                    .last("limit 1")
                            );
                }
            } else {
@@ -431,6 +433,8 @@
                        .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                                .eq(HollowGlassOutRelationInfo::getCell, cell)
                                .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                                .orderByAsc(HollowGlassOutRelationInfo::getId)
                                .last("limit 1")
                        );
            } else {
                break;
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -1,6 +1,5 @@
package com.mes.job;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.xingshuangs.iot.protocol.modbus.service.ModbusTcp;
@@ -11,8 +10,8 @@
import com.mes.bigstoragecagetask.service.BigStorageCageTaskService;
import com.mes.common.config.Const;
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO;
import com.mes.hollow.entity.dto.LackDetailsDTO;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
import com.mes.hollow.service.HollowBigStorageCageService;
@@ -26,7 +25,6 @@
import com.mes.s7.entity.S7DataZKDLPOne;
import com.mes.s7.entity.S7DataZKDLPTwo;
import com.mes.s7.entity.S7DataZKExtra;
import com.mes.tools.WebSocketServer;
import com.mes.tools.WebSocketUtils;
import com.mes.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
@@ -42,7 +40,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * @Author : zhoush
@@ -117,21 +114,22 @@
    }
    public void hollowGlassTaskChild(int cell, String isFreeTag, String websocketName) {
        List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START).eq(HollowGlassOutRelationInfo::getCell, cell));
        JSONObject jsonObject = new JSONObject();
        if (CollectionUtil.isNotEmpty(taskList)) {
            List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList());
            List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList));
            jsonObject.append("queueInfo", list);
        }
//        List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
//                .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START).eq(HollowGlassOutRelationInfo::getCell, cell));
        JSONObject jsonObject = new JSONObject(true);
//        if (CollectionUtil.isNotEmpty(taskList)) {
//            List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList());
//            List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList));
//            jsonObject.append("queueInfo", list);
//        }
        Map<String, List<HollowGlassQueueInfo>> queueInfo = hollowGlassOutRelationInfoService.appointHollowTaskDetails(cell);
        jsonObject.append("queueInfo", queueInfo);
        try {
            jsonObject.append("freeRequest", isFreeTag);
        } catch (Exception e) {
            log.error("opc存在异常", e);
        }
        webSocketUtils.sendToWeb(websocketName,jsonObject);
        webSocketUtils.sendToWeb(websocketName, jsonObject);
    }
    @Scheduled(fixedDelay = 1000)
@@ -140,7 +138,7 @@
        try {
            //查询使用数据源1查询数据
            queryDataSource1(jsonObject);
            webSocketUtils.sendToWeb("hollowGlassMessage",jsonObject);
            webSocketUtils.sendToWeb("hollowGlassMessage", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
@@ -328,6 +326,10 @@
        HollowBigStorageDetailsQueryVO hollowBigStorageDetailsQueryVO = new HollowBigStorageDetailsQueryVO();
        List<FlowCardGlassInfoDTO> bigStorageCageUsageSummary = hollowGlassRelationInfoService.queryHollowAllFlowCardSummary(hollowBigStorageDetailsQueryVO);
        jsonObject.append("bigStorageCageUsageSummary", bigStorageCageUsageSummary);
        //缺片详情
        List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard();
        jsonObject.append("lackDetailsList", lackDetailsList);
    }
    @Scheduled(fixedDelay = 1000)
@@ -341,6 +343,6 @@
        jsonObject.append("pieChartVOS", pieChartVOS);
        List<RunTime> hollowRunTimes = hollowBigStorageCageHistoryTaskService.queryRunTimes(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
        jsonObject.append("hollowRunTimes", hollowRunTimes);
        webSocketUtils.sendToWeb("largenScreen",jsonObject);
        webSocketUtils.sendToWeb("largenScreen", jsonObject);
    }
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -106,23 +106,26 @@
        from result
    </select>
    <select id="queryLackByFlowCard" resultMap="lackBaseMap">
        with relation_length as (
            select flow_card_id,
                   layer,
                   order_sort,
                   tempering_layout_id,
                   tempering_feed_sequence,
                   GREATEST(width, height) as first_length,
                   LEAST(width, height)    as second_Length,
                   width,
                   height,
                   thickness,
                   films_id
            from hollow_glass_relation_info
            where flow_card_id = #{flowCardId}
              and tempering_layout_id is null
              and tempering_feed_sequence is null
        with flow_card_id_info as (
            select distinct flow_card_id from hollow_big_storage_cage_details where state = 100
        ),
             relation_length as (
                 select flow_card_id,
                        layer,
                        order_sort,
                        tempering_layout_id,
                        tempering_feed_sequence,
                        GREATEST(width, height) as first_length,
                        LEAST(width, height)    as second_Length,
                        width,
                        height,
                        thickness,
                        films_id
                 from hollow_glass_relation_info
                 where flow_card_id in (select flow_card_id from flow_card_id_info)
                   and tempering_layout_id is null
                   and tempering_feed_sequence is null
             ),
             lack_count_temp as (
                 select flow_card_id,
                        layer,
@@ -141,7 +144,9 @@
                        order_number      as order_sort,
                        count(1)          as damage_count
                 from damage
                 where process_id = #{flowCardId} and type in (8,9) and status &lt; 3
                 where process_id in (select flow_card_id from flow_card_id_info)
                   and type in (8, 9)
                   and status &lt; 3
                 group by process_id, technology_number, order_number
             ),
             result_count as (
@@ -149,6 +154,7 @@
                 from lack_count_temp t
                          left join damage_count_temp t1 on t.flow_card_id = t1.flow_card_id and t.layer = t1.layer and
                                                            t.order_sort = t1.order_sort
                 order by t.flow_card_id, t.layer
             )
        select *
        from result_count