Merge remote-tracking branch 'origin/master'
# Conflicts:
# hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml
| | |
| | | projectnumber: 'Please enter the project number', |
| | | noGlassToDamage:'No broken glass!', |
| | | dilapidation: 'Breakage', |
| | | dilapidationDetails:'Damage details', |
| | | dilapidationAll:'One-click damage', |
| | | dilapidationWhether:'Whether it is broken with one click?', |
| | | takeaway: 'Manual removal', |
| | | takeawaya: 'Should the information be manually taken away?', |
| | | takeon: 'The arrangement is complete', |
| | | }, |
| | | searchOrder: { |
| | | loadingText: 'Loading data, please wait...', |
| | | firstLinePriority: 'First-line priority', |
| | | secondLinePriority: 'second-line priority', |
| | | hollowPriority:'Hollow priority', |
| | |
| | | createTime: 'Return date', |
| | | }, |
| | | large: { |
| | | patchCount:'Quantity Replenished', |
| | | Productionsituation:'Production situation', |
| | | Productionandoperationstatus:'Production and operation status', |
| | | cuttingState:'Operation status on the day of cutting', |
| | |
| | | projectnumber:'프로젝트 번호를 입력해 주세요', |
| | | noGlassToDamage:'깨진 유리 없음!', |
| | | dilapidation:'파손', |
| | | dilapidationDetails:'파손 상세', |
| | | dilapidationAll:'원터치 파손', |
| | | dilapidationWhether:'한 번의 클릭으로 깨졌는지 여부?', |
| | | takeaway:'수동 제거', |
| | | takeawaya:'정보가 수동으로 수집되었는지 여부?', |
| | | takeon:'준비가 완료되었습니다', |
| | | }, |
| | | searchOrder:{ |
| | | loadingText: '데이터를 불러오는 중입니다. 잠시만 기다려 주세요....', |
| | | firstLinePriority: '일선 우선 순위', |
| | | secondLinePriority: '2선 우선순위', |
| | | hollowPriority:'중공 우선 순위', |
| | |
| | | createTime :'반환 날짜', |
| | | }, |
| | | large:{ |
| | | patchCount:'보충 수량', |
| | | Productionsituation:'생산 상황', |
| | | Productionandoperationstatus:'운영 상태', |
| | | cuttingState:'가공 당일 상태', |
| | |
| | | takeon:'摆片完成', |
| | | noGlassToDamage:'Никакого битого стекла!', |
| | | dilapidation: 'Повреждение', |
| | | dilapidationDetails:'Детали повреждения', |
| | | dilapidationAll:'Одна кнопка для повреждения', |
| | | dilapidationWhether:'Сломается ли он одним кликом?', |
| | | takeawaya:'是否人工拿走该条信息?', |
| | | takeaway: 'Взять вручную', |
| | | }, |
| | | searchOrder: { |
| | | loadingText: '数据加载中,请稍候...', |
| | | firstLinePriority: 'Приоритет первой линии', |
| | | secondLinePriority: 'Приоритет второй линии', |
| | | hollowPriority:'中空优先级', |
| | |
| | | createTime :'返库日期', |
| | | }, |
| | | large:{ |
| | | patchCount:'已补数量', |
| | | slice:'片', |
| | | time: '次破时间', |
| | | tionnumber: '订单号', |
| | |
| | | projectnumber:'请输入工程号', |
| | | noGlassToDamage:'没有可破损的玻璃!', |
| | | dilapidation:'破损', |
| | | dilapidationDetails:'破损详情', |
| | | dilapidationAll:'一键破损', |
| | | dilapidationWhether:'是否一键破损?', |
| | | takeaway:'人工拿走', |
| | | takeawaya:'是否人工拿走该条信息?', |
| | | takeon:'摆片完成', |
| | | }, |
| | | searchOrder:{ |
| | | loadingText: '数据加载中,请稍候...', |
| | | firstLinePriority: '一线优先', |
| | | secondLinePriority: '二线优先', |
| | | hollowPriority:'中空优先级', |
| | |
| | | createTime :'返库日期', |
| | | }, |
| | | large:{ |
| | | patchCount:'已补数量', |
| | | Productionsituation:'生产情况', |
| | | Productionandoperationstatus:'生产运行情况', |
| | | cuttingState:'切割当天运行情况', |
| | |
| | | export const WebSocketHost = "192.168.2.100"; |
| | | // export const WebSocketHost = "192.168.2.100"; |
| | | export const WebSocketHost = "10.153.19.179"; |
| | | // export const WebSocketHost = "192.168.0.39"; |
| | | // export const WebSocketHost = "10.153.19.150"; |
| | | // export const WebSocketHost = "10.153.19.218"; |
| | | // export const WebSocketHost = "10.153.19.162"; |
| | | // export const WebSocketHost = "127.0.0.1"; |
| | | export const host = "88"; |
| | | export const ErpIp = "192.168.2.100"; |
| | | export const ErpIp = "10.153.19.179"; |
| | | export const ErpHost = "8086"; |
| | |
| | | request.interceptors.request.use(config => { |
| | | config.headers['Content-Type'] = 'application/json;charset=utf-8'; |
| | | if(userStore.user){ |
| | | // config.headers['Authorization'] = `Bearer ${userStore.user.token}`; |
| | | config.headers['token'] = userStore.user.token; |
| | | } |
| | | // 设置请求头 |
| | |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-select v-model="report.type" :placeholder="$t('reportmanage.ctype')" style="margin-left: 10px;"> |
| | | <el-option :label="$t('reportmanage.completed')" value="1"></el-option> |
| | | <el-option :label="$t('reportmanage.broke')" value="8"></el-option> |
| | | <el-option :label="$t('reportmanage.takeout')" value="9"></el-option> |
| | | </el-select> |
| | |
| | | const blindb = ref(false) |
| | | const blindbd = ref(false) |
| | | const ReportData = ref(true); |
| | | const isLoading = ref(true); |
| | | const canSelectProjecta = ref(true); |
| | | const canSelectProjectb = ref(true); |
| | | const canSelectProjectc = ref(false); |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassOne`; |
| | | const handleMessage = (data: any) => { |
| | | console.log(data.stationList); |
| | | |
| | | isLoading.value = true; |
| | | if (data.inkageState != null) { |
| | | cuttingMachineStatusColor.value = data.inkageState[0] === 1 ? 'green' : '#911005'; |
| | | } |
| | |
| | | tableDataa.value = [] |
| | | } |
| | | if (data.upPattenUsages.length != 0) { |
| | | isLoading.value = false; |
| | | tableData.value = data.upPattenUsages[0] |
| | | window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId) |
| | | canSelectProjecta.value = false; |
| | |
| | | canSelectProjectc.value = true; |
| | | } |
| | | else { |
| | | isLoading.value = false; |
| | | canSelectProjecta.value = true; |
| | | canSelectProjectb.value = true; |
| | | canSelectProjectc.value = false; |
| | | tableData.value = []; |
| | | window.localStorage.setItem('engineeringIda', '') |
| | | } |
| | | } |
| | | }; |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | |
| | | </el-select> |
| | | <el-button :disabled="!ReportData" type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ |
| | | $t('Mounting.setparameters') }}</el-button> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="400" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }" |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div style="display: flex;margin-left:5%"> |
| | | <div style="width: 55%;float: left;margin-left: 300px;"> |
| | | <div style="display: flex;"> |
| | |
| | | margin-top: 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | const dialogFormVisible = ref(false) |
| | | const blind = ref(false) |
| | | const blinda = ref(false) |
| | | const isLoading = ref(true); |
| | | const ReportData = ref(true); |
| | | const blindb = ref(false) |
| | | const blindbd = ref(false) |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlassTwo`; |
| | | const handleMessage = (data: any) => { |
| | | isLoading.value = true; |
| | | |
| | | if (data.stationList.length != 0) { |
| | | const processedData = [...data.stationList[0]]; |
| | | if (processedData.length > 0) { |
| | |
| | | cuttingMachineStatusColor.value = data.inkageState[0] === 1 ? 'green' : '#911005'; |
| | | } |
| | | if (data.upPattenUsages.length != 0) { |
| | | isLoading.value = false; |
| | | tableData.value = data.upPattenUsages[0] |
| | | window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId) |
| | | canSelectProjecta.value = false; |
| | |
| | | canSelectProjectc.value = true; |
| | | } |
| | | else { |
| | | isLoading.value = false; |
| | | tableData.value = []; |
| | | canSelectProjecta.value = true; |
| | | canSelectProjectb.value = true; |
| | |
| | | <el-option :label="$t('Mounting.pass')" value="100"></el-option> |
| | | </el-select> |
| | | <el-button :disabled="!ReportData" type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('Mounting.setparameters') }}</el-button> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div style="display: flex;margin-left:5%"> |
| | | <div style="width: 55%;float: left;margin-left: 300px;"> |
| | | <div style="display: flex;"> |
| | |
| | | margin-top: 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | const dialogFormVisiblee = ref(false) |
| | | const dialogFormVisiblef = ref(false) |
| | | const dialogFormVisibles = ref(false) |
| | | const isLoading = ref(true) |
| | | const blindb = ref(false) |
| | | const inkageEntity = ref('#911005'); |
| | | const requestEntity = ref('#911005'); |
| | |
| | | fetchFlow(); |
| | | }; |
| | | const handlexiang = () => { |
| | | isLoading.value = true; // 开启加载状态 |
| | | dialogFormVisiblea.value = true; |
| | | fetchxiang(); |
| | | currentPage2.value = 1; |
| | |
| | | }); |
| | | // 理片笼信息 |
| | | const fetchxiang = async () => { |
| | | try { |
| | | isLoading.value = true; |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCage/querybigStorageCageDetail',{ |
| | | // deviceId: page, |
| | | filmsId: filmsId.value, |
| | | flowCardId: flowCardId.value, |
| | | }) |
| | | if (response.code === 200) { |
| | | // 模拟最小加载时间 |
| | | await new Promise(resolve => setTimeout(resolve, 300)); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | tableDataa.value = response.data |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } finally { |
| | | isLoading.value = false; |
| | | } |
| | | |
| | | } |
| | | const fetchxianga = async () => { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | const svg = ` |
| | | <path class="path" d=" |
| | | M 30 15 |
| | | L 28 17 |
| | | M 25.61 25.61 |
| | | A 15 15, 0, 0, 1, 15 30 |
| | | A 15 15, 0, 1, 1, 27.99 7.5 |
| | | L 15 15 |
| | | " style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/> |
| | | ` |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblea" top="2vh" width="95%" :title="$t('searchOrder.cageinformation')"> |
| | | <el-dialog v-model="dialogFormVisiblea" top="2vh" width="95%" |
| | | :title="$t('searchOrder.cageinformation')"> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <div style="display: flex;"> |
| | | <el-input v-model="flowCardId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('searchOrder.incardnumber')" /> |
| | | <el-input v-model="filmsId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('film.infilms')"/> |
| | |
| | | @current-change="handlePageChange2" |
| | | /> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 历史任务 --> |
| | |
| | | #app-container { |
| | | padding-top: 60px; /* 根据alert高度调整 */ |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 99%;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="50" /> |
| | | <el-table-column prop="cell" align="center" :label="$t('searchOrder.line')" min-width="50" /> |
| | | <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="20" /> |
| | | <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="50" /> |
| | | <el-table-column |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" /> |
| | | <el-table-column prop="cell" align="center" :label="$t('searchOrder.line')" min-width="50" /> |
| | | <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" /> |
| | | <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" /> |
| | | <el-table-column |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" /> |
| | | <el-table-column prop="cell" align="center" :label="$t('searchOrder.line')" min-width="50" /> |
| | | <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" /> |
| | | <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" /> |
| | | <el-table-column |
| | |
| | | </el-button> |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | <el-table |
| | | height="630" |
| | | :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="slot" :label="$t('film.slot')" 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-dialog> |
| | | <!-- 缺片详情 --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentRow.flowCardId }} |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" :data="tableDatac" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('hellow.flowCardId')" min-width="100" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100" /> |
| | | <el-table-column prop="layer" align="center" :label="$t('hellow.layer')" min-width="80" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('reportmanage.number')" 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="totalCount" align="center" :label="$t('hellow.totalnumber')" 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('hellow.brokenpieces')" min-width="80"/> --> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80" /> |
| | | <el-table-column prop="workingProcedure" align="center" :label="$t('reportmanage.process')" min-width="80" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleBroke(scope.row)">{{ $t('order.dilapidation') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <div style="float: right;margin-bottom: 5px;"> |
| | | <el-pagination layout="prev, pager, next" :total="50" /> |
| | | </div> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination background size="large" layout="prev, pager, next" :total="30" :current-page.sync="currentPage2" |
| | | @current-change="handlePageChange2" /> |
| | | <div class="custom-page-buttons"> |
| | | <button |
| | | v-for="page in pageList" |
| | | :key="page" |
| | | @click="switchPage(page)" |
| | | :class="{ 'active-page': currentPage === page }" |
| | | class="page-btn" |
| | | > |
| | | {{ page }} |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 开始任务 --> |
| | |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const mulan = ref(false) |
| | | const isLoading = ref(true) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | |
| | | const thickness = ref('') |
| | | const productName = ref('') |
| | | const customerName = ref('') |
| | | const flowCardId = ref('') |
| | | const casFour = ref('') |
| | | const casOne = ref('') |
| | | const casThree = ref('') |
| | |
| | | const intervalFrameWidthThree = ref('') |
| | | const intervalFrameWidthFour = ref('') |
| | | const sealInsert = ref('') |
| | | const totalPages = ref(0) |
| | | |
| | | const pageList = ref([]); |
| | | const allData = ref({}); |
| | | const currentData = ref([]); |
| | | const flowCardId = ref('') |
| | | |
| | | const freeone = ref('#911005'); |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | |
| | | const dialogFormVisiblee = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | const currentPage2 = ref(1) |
| | | const currentRow = reactive({}); |
| | | const formattedProcessType = ref([]); |
| | | const selectedFormulaName = ref(''); |
| | |
| | | const currentPageKey = computed(() => `93${currentPage.value - 1}`); |
| | | const handlePageChange1 = (newPage) => { |
| | | currentPage.value = newPage; |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | |
| | | }; |
| | | // 缺片详情 |
| | | const handleBindRack = (row) => { |
| | | currentPage2.value = 1; |
| | | let currentPageLack = window.localStorage.getItem('currentPageLack') |
| | | const { flowCardId } = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | isLoading.value = true; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | |
| | | dialogFormVisibled.value = true; |
| | | fetchmulan() |
| | | }; |
| | | // 缺片详情-破损 |
| | | const handleBroke = async (row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.broke'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/hollowBigStorageGlassDamage', { |
| | | flowCardId: row.flowCardId, |
| | | glassType: row.glassType, |
| | | glassId: row.glassId, |
| | | layer: row.layer, |
| | | state: 8, |
| | | line: 1, |
| | | workingProcedure: '中空', |
| | | remark: '中空' |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const { flowCardId } = row; |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | fetchFlowCardId() |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 创建任务 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | |
| | | }; |
| | | }); |
| | | }; |
| | | const fetchFlowBind = async (flowCardId, page) => { |
| | | const fetchFlowBind = async (flowCardId) => { |
| | | try { |
| | | var url = "/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=" + flowCardId + "&layer=" + 1; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | tableDatac.value = response.data[page]; |
| | | ElMessage.success(response.message); |
| | | const url = `/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=${flowCardId}`; |
| | | const response = await request.post(url); |
| | | |
| | | if (response.code === 200) { |
| | | isLoading.value = false; |
| | | allData.value = response.data; |
| | | // 提取并排序页码 |
| | | pageList.value = Object.keys(response.data) |
| | | .map(Number) |
| | | .sort((a, b) => a - b); |
| | | // 初始化第一页数据 |
| | | currentPage.value = pageList.value[0]; |
| | | tableDatac.value = response.data[pageList.value[0]] || []; |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | }; |
| | | // 页面切换处理 |
| | | const switchPage = (page) => { |
| | | currentPage.value = page; |
| | | tableDatac.value = allData.value[page] || []; // 切换数据 |
| | | }; |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | |
| | | } catch (error) { |
| | | } |
| | | } |
| | | |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | import requestErp from "@/utils/requestErp"; |
| | | import { hiprint } from "vue-plugin-hiprint"; |
| | | import PrintCustomLabelXJ from './PrintCustomLabelTwo.vue' |
| | |
| | | ::v-deep(.row-red-background) { |
| | | background-color: rgb(224.6, 242.8, 215.6) !important; |
| | | } |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin: 20px 0; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .page-btn { |
| | | padding: 8px 16px; |
| | | min-width: 40px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background: #f5f7fa; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .page-btn:hover { |
| | | background: #e6f1ff; |
| | | } |
| | | |
| | | .page-btn.active-page { |
| | | background: #409eff; |
| | | color: white; |
| | | border-color: #409eff; |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | height="630" |
| | | :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="slot" :label="$t('film.slot')" 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-dialog> |
| | | <!-- 缺片详情 --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentRow.flowCardId }} |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" |
| | | :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <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="totalCount" align="center" :label="$t('hellow.totalnumber')" 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('hellow.brokenpieces')" min-width="80"/> --> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('hellow.flowCardId')" min-width="100" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100" /> |
| | | <el-table-column prop="layer" align="center" :label="$t('hellow.layer')" min-width="80" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('reportmanage.number')" 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="thickness" align="center" :label="$t('hellow.thickness')" min-width="80" /> |
| | | <el-table-column prop="workingProcedure" align="center" :label="$t('reportmanage.process')" min-width="80" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleBroke(scope.row)">{{ $t('order.dilapidation') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <div style="float: right;margin-bottom: 5px;"> |
| | | <el-pagination layout="prev, pager, next" :total="50"/> |
| | | </div> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination |
| | | background |
| | | size="large" |
| | | layout="prev, pager, next" |
| | | :total="30" |
| | | :current-page.sync="currentPage2" |
| | | @current-change="handlePageChange2" |
| | | /> |
| | | </div> |
| | | <div class="custom-page-buttons"> |
| | | <button |
| | | v-for="page in pageList" |
| | | :key="page" |
| | | @click="switchPage(page)" |
| | | :class="{ 'active-page': currentPage === page }" |
| | | class="page-btn" |
| | | > |
| | | {{ page }} |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 开始任务 --> |
| | | <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('hellow.pstarttask')"> |
| | |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const mulan = ref(false) |
| | | const isLoading = ref(true) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | |
| | | const rightRemove = ref('') |
| | | const topRemove = ref('') |
| | | const filmsId = ref('') |
| | | const flowCardId = ref('') |
| | | const pairTotal = ref() |
| | | const productName = ref('') |
| | | const customerName = ref('') |
| | |
| | | const dialogFormVisiblee = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | const currentPage2 = ref(1) |
| | | const pageList = ref([]); |
| | | const allData = ref({}); |
| | | const currentData = ref([]); |
| | | const flowCardId = ref('') |
| | | const currentRow = reactive({}); |
| | | const formattedProcessType = ref([]); |
| | | let selectedFormulaId = ref(null); |
| | |
| | | const currentPageKey = computed(() => `93${currentPage.value - 1}`); |
| | | const handlePageChange1 = (newPage) => { |
| | | currentPage.value = newPage; |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | |
| | | }; |
| | | // 缺片详情 |
| | | const handleBindRack = (row) => { |
| | | currentPage2.value = 1; |
| | | const { flowCardId} = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | let currentPageLack = window.localStorage.getItem('currentPageLack') |
| | | const { flowCardId } = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | isLoading.value = true; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | |
| | | }; |
| | | }); |
| | | }; |
| | | const fetchFlowBind = async (flowCardId, page) => { |
| | | |
| | | // 缺片详情-破损 |
| | | const handleBroke = async (row) => { |
| | | try { |
| | | var url="/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId="+flowCardId + "&layer=" + 1; |
| | | const response = await request.post(url) |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.broke'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/hollowBigStorageGlassDamage', { |
| | | flowCardId: row.flowCardId, |
| | | glassType: row.glassType, |
| | | glassId: row.glassId, |
| | | layer: row.layer, |
| | | state: 8, |
| | | line: 1, |
| | | workingProcedure: '中空', |
| | | remark: '中空' |
| | | }) |
| | | if (response.code == 200) { |
| | | tableDatac.value = response.data[page]; |
| | | ElMessage.success(response.message); |
| | | const { flowCardId } = row; |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | fetchFlowCardId() |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const fetchFlowBind = async (flowCardId) => { |
| | | try { |
| | | const url = `/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=${flowCardId}`; |
| | | const response = await request.post(url); |
| | | if (response.code === 200) { |
| | | isLoading.value = false; |
| | | allData.value = response.data; |
| | | // 提取并排序页码 |
| | | pageList.value = Object.keys(response.data) |
| | | .map(Number) |
| | | .sort((a, b) => a - b); |
| | | // 初始化第一页数据 |
| | | currentPage.value = pageList.value[0]; |
| | | tableDatac.value = response.data[pageList.value[0]] || []; |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | }; |
| | | // 页面切换处理 |
| | | const switchPage = (page) => { |
| | | currentPage.value = page; |
| | | tableDatac.value = allData.value[page] || []; // 切换数据 |
| | | }; |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | |
| | | ::v-deep(.row-red-background) { |
| | | background-color: rgb(224.6, 242.8, 215.6) !important; |
| | | } |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin: 20px 0; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .page-btn { |
| | | padding: 8px 16px; |
| | | min-width: 40px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background: #f5f7fa; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .page-btn:hover { |
| | | background: #e6f1ff; |
| | | } |
| | | |
| | | .page-btn.active-page { |
| | | background: #409eff; |
| | | color: white; |
| | | border-color: #409eff; |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <!-- 动态表格 --> |
| | | <el-table |
| | | height="630" |
| | | :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="slot" :label="$t('film.slot')" 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-dialog> |
| | | <!-- 缺片详情 --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div v-loading="isLoading" class="loading-container" :element-loading-text="$t('searchOrder.loadingText')" > |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentRow.flowCardId }} |
| | |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" :data="tableDatac" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('hellow.flowCardId')" min-width="100" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="100" /> |
| | | <el-table-column prop="layer" align="center" :label="$t('hellow.layer')" min-width="80" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('reportmanage.number')" 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="totalCount" align="center" :label="$t('hellow.totalnumber')" 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('hellow.brokenpieces')" min-width="80"/> --> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80" /> |
| | | <el-table-column prop="workingProcedure" align="center" :label="$t('reportmanage.process')" min-width="80" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleBroke(scope.row)">{{ $t('order.dilapidation') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <div style="float: right;margin-bottom: 5px;"> |
| | | <el-pagination layout="prev, pager, next" :total="50" /> |
| | | </div> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination background size="large" layout="prev, pager, next" :total="30" :current-page.sync="currentPage2" |
| | | @current-change="handlePageChange2" /> |
| | | <div class="custom-page-buttons"> |
| | | <button |
| | | v-for="page in pageList" |
| | | :key="page" |
| | | @click="switchPage(page)" |
| | | :class="{ 'active-page': currentPage === page }" |
| | | class="page-btn" |
| | | > |
| | | {{ page }} |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 开始任务 --> |
| | |
| | | const blindb = ref(false) |
| | | const blindc = ref(false) |
| | | const mulan = ref(false) |
| | | const isLoading = ref(true) |
| | | const activeTab = ref('') |
| | | const tabList = ref([]) |
| | | const internalInstance = getCurrentInstance() |
| | |
| | | const pairTotal = ref() |
| | | const productName = ref('') |
| | | const customerName = ref('') |
| | | const flowCardId = ref('') |
| | | const freetwo = ref('#911005'); |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | |
| | | const dialogFormVisiblee = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | const currentPage2 = ref(1) |
| | | const pageList = ref([]); |
| | | const allData = ref({}); |
| | | const currentData = ref([]); |
| | | const flowCardId = ref('') |
| | | const currentRow = reactive({}); |
| | | const formattedProcessType = ref([]); |
| | | const selectedFormulaName = ref(''); |
| | |
| | | const currentPageKey = computed(() => `93${currentPage.value - 1}`); |
| | | const handlePageChange1 = (newPage) => { |
| | | currentPage.value = newPage; |
| | | }; |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentRow.flowCardId, currentPage2.value); |
| | | }; |
| | | const handleMessage = (data) => { |
| | | const rawData = data.queueInfo[0] |
| | |
| | | }; |
| | | // 缺片详情 |
| | | const handleBindRack = (row) => { |
| | | currentPage2.value = 1; |
| | | let currentPageLack = window.localStorage.getItem('currentPageLack') |
| | | const { flowCardId } = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | isLoading.value = true; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | |
| | | }; |
| | | }); |
| | | }; |
| | | const fetchFlowBind = async (flowCardId, page) => { |
| | | const fetchFlowBind = async (flowCardId) => { |
| | | try { |
| | | var url = "/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=" + flowCardId + "&layer=" + 1; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | tableDatac.value = response.data[page]; |
| | | ElMessage.success(response.message); |
| | | const url = `/hollowGlass/hollowGlassRelationInfo/queryLackByFlowCard?flowCardId=${flowCardId}`; |
| | | const response = await request.post(url); |
| | | if (response.code === 200) { |
| | | isLoading.value = false; |
| | | allData.value = response.data; |
| | | // 提取并排序页码 |
| | | pageList.value = Object.keys(response.data) |
| | | .map(Number) |
| | | .sort((a, b) => a - b); |
| | | // 初始化第一页数据 |
| | | currentPage.value = pageList.value[0]; |
| | | tableDatac.value = response.data[pageList.value[0]] || []; |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | }; |
| | | // 页面切换处理 |
| | | const switchPage = (page) => { |
| | | currentPage.value = page; |
| | | tableDatac.value = allData.value[page] || []; // 切换数据 |
| | | }; |
| | | // 开始任务 |
| | | const handlea = async () => { |
| | | try { |
| | |
| | | } else { |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } |
| | | |
| | | // 缺片详情-破损 |
| | | const handleBroke = async (row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.broke'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/hollowBigStorageGlassDamage', { |
| | | flowCardId: row.flowCardId, |
| | | glassType: row.glassType, |
| | | glassId: row.glassId, |
| | | layer: row.layer, |
| | | state: 8, |
| | | line: 1, |
| | | workingProcedure: '中空', |
| | | remark: '中空' |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const { flowCardId } = row; |
| | | fetchFlowBind(currentRow.flowCardId); |
| | | fetchFlowCardId() |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 强制出片 |
| | |
| | | ::v-deep(.row-red-background) { |
| | | background-color: rgb(224.6, 242.8, 215.6) !important; |
| | | } |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .custom-page-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin: 20px 0; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .page-btn { |
| | | padding: 8px 16px; |
| | | min-width: 40px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background: #f5f7fa; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .page-btn:hover { |
| | | background: #e6f1ff; |
| | | } |
| | | |
| | | .page-btn.active-page { |
| | | background: #409eff; |
| | | color: white; |
| | | border-color: #409eff; |
| | | } |
| | | .loading-container { |
| | | position: relative; |
| | | height: 100%; |
| | | } |
| | | /* 确保遮罩层在最顶层 */ |
| | | .el-loading-mask { |
| | | z-index: 2000 !important; |
| | | } |
| | | </style> |
| | |
| | | const carPosition = ref([]) |
| | | const tableDatass = ref([]) |
| | | const tableDataLack = ref([]) |
| | | const tableDataMiss = ref([]) |
| | | // 响应式状态 |
| | | const showAlert = ref(false) |
| | | const alertMessage = ref('') |
| | |
| | | window.localStorage.setItem('slot', row.slot) |
| | | 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) => { |
| | | dialogFormVisibleb.value = true; |
| | | handleAllMissing(row) |
| | | }; |
| | | const handleAllMissing = async (row) => { |
| | | try { |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryLackGlassByFlowCard', { |
| | | flowCardId: row.flowCardId, |
| | | layer: row.layer, |
| | | orderSort: row.glassType, |
| | | // glassId: row.glassId |
| | | }); |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDataMiss.value = response.data |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | fetchFlowBind(currentLack.flowCardId, currentPage2.value); |
| | |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.broke'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | | cancelButtonText: t('workOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/hollowBigStorageGlassDamage', { |
| | | flowCardId: row.flowCardId, |
| | | glassType: row.glassType, |
| | | glassId: row.glassId, |
| | | layer: row.layer, |
| | | state: 8, |
| | | line: 1, |
| | | workingProcedure: '中空', |
| | | remark: '中空' |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const { flowCardId } = row; |
| | | fetchFlowBind(flowCardId, currentPage2.value); |
| | | } else { |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 缺片详情-一键破损 |
| | | const handleAllBroke = async (row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('order.dilapidationWhether'), |
| | | t('workOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('workOrder.yes'), |
| | |
| | | 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="layer" align="center" :label="$t('reportmanage.layer')" min-width="40" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="139" /> |
| | | <el-table-column prop="layer" align="center" :label="$t('reportmanage.layer')" min-width="38" /> |
| | | <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="70" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="70" /> |
| | | <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="thickness" align="center" :label="$t('hellow.thickness')" min-width="52" /> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="62"/> |
| | | <!-- <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="62" show-overflow-tooltip/> --> |
| | | <el-table-column prop="height" align="center" :label="$t('hellow.height')" min-width="55" /> |
| | | <el-table-column prop="width" align="center" :label="$t('hellow.width')" min-width="55" /> |
| | | <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-column fixed="right" :label="$t('searchOrder.operate')" align="center"> |
| | | <!-- <el-table-column prop="patchCount" align="center" :label="$t('large.patchCount')"/> --> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" min-width="82"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleBroke(scope.row)">{{ $t('order.dilapidation') }}</el-button> |
| | | <el-button type="text" plain @click="handleMissingFilms(scope.row)">{{ $t('hellow.missingfilms') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 缺片详情 --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentLack.flowCardId }} |
| | | </el-form-item> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" :data="tableDataLack" |
| | | <!-- 多条破损数据 --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="15vh" width="70%" height="500"> |
| | | <el-button plain @click="handleAllBroke">{{ $t('order.dilapidationAll') }}</el-button> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" :data="tableDataMiss" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="glassType" align="center" :label="$t('large.serialnumber')" min-width="80" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" 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="filmsid" align="center" :label="$t('searchOrder.process')" 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-column fixed="right" :label="$t('searchOrder.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button type="text" plain @click="handleBroke(scope.row)">{{ $t('order.dilapidation') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <div style="float: right;margin-bottom: 5px;"> |
| | | <el-pagination layout="prev, pager, next" :total="50" /> |
| | | </div> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="display: flex;margin-left: 40%;margin-top: 10px;"> |
| | | <el-pagination background size="large" layout="prev, pager, next" :total="30" :current-page.sync="currentPage2" |
| | | @current-change="handlePageChange2" /> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindb" top="5vh" width="95%" @close="iframeUrl=''"> |
| | |
| | | */ |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 930; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 931; |
| | | public static final List<Integer> OUT_TARGET_POSITION_ALL = Arrays.asList(930, 931); |
| | | public static final List<Integer> OUT_TARGET_POSITION_ALL = Arrays.asList(930, 931, 932); |
| | | |
| | | /** |
| | | * 卧式理片笼详情表玻璃状态 |
| File was renamed from hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/dto/HollowGlassDetailsDTO.java |
| | |
| | | package com.mes.hollow.entity.dto; |
| | | package com.mes.order.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| File was renamed from hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDTO.java |
| | |
| | | package com.mes.hollow.entity.dto; |
| | | package com.mes.order.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class OrderDTO { |
| | | public class HollowOrderDTO { |
| | | |
| | | /** |
| | | * <订单表> |
| File was renamed from hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDetailsDTO.java |
| | |
| | | package com.mes.hollow.entity.dto; |
| | | package com.mes.order.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | package com.mes.order.entity.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | package com.mes.order.mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.order.entity.HollowGlassDetailsDTO; |
| | | import com.mes.order.entity.HollowOrderDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.entity.Orders; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | |
| | |
| | | public interface OrdersMapper extends BaseMapper<Orders> { |
| | | |
| | | List<OrderDTO> selectOrderPercent(); |
| | | |
| | | HollowOrderDTO queryOrderByFlowCardId(String flowCardId); |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdMaxLayerGlassInfo(String flowCardId, int totalLayer); |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(String flowCardId, int totalLayer, int layer); |
| | | |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId); |
| | | } |
| | |
| | | package com.mes.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.order.entity.Order; |
| | | import com.mes.order.entity.Orderdetail; |
| | | import com.mes.order.entity.Orders; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | |
| | | import java.util.List; |
| | |
| | | List<Orderdetail> selectOrderdetail(Orders orders); |
| | | |
| | | List<OrderDTO> selectOrderPercent(); |
| | | |
| | | HollowOrderDTO queryOrderByFlowCardId(String flowCardId); |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdMaxLayerGlassInfo(String flowCardId, int totalLayer); |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(String flowCardId, int totalLayer, int layer); |
| | | |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId); |
| | | } |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.order.entity.Orderdetail; |
| | | import com.mes.order.entity.Orders; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | import com.mes.order.mapper.OrderdetailMapper; |
| | | import com.mes.order.mapper.OrdersMapper; |
| | | import com.mes.order.service.OrdersService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | |
| | | */ |
| | | @Service |
| | | @DS("sd") |
| | | @Slf4j |
| | | public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements OrdersService { |
| | | @Autowired |
| | | private OrderdetailMapper orderdetailMapper; |
| | | @Resource |
| | | private OrderdetailMapper orderdetailMapper; |
| | | |
| | | @Override |
| | | public List<Orders> selectOrders() { |
| | | //获取所有未完成的订单 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDTO> selectOrderPercent(){ |
| | | public List<OrderDTO> selectOrderPercent() { |
| | | return baseMapper.selectOrderPercent(); |
| | | } |
| | | |
| | | @Override |
| | | public HollowOrderDTO queryOrderByFlowCardId(String flowCardId) { |
| | | return baseMapper.queryOrderByFlowCardId(flowCardId); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassDetailsDTO> queryFlowCardIdMaxLayerGlassInfo(String flowCardId, int totalLayer) { |
| | | return baseMapper.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(String flowCardId, int totalLayer, int layer) { |
| | | return baseMapper.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(value = "orderDetails", key = "#flowCardId",unless = "#result == null") |
| | | public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId) { |
| | | log.info("查询数据库一次:{}", flowCardId); |
| | | return baseMapper.queryProductNameByFlowCardId(flowCardId); |
| | | } |
| | | } |
| | |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="percent" property="percent"/> |
| | | </resultMap> |
| | | <resultMap id="baseMapHollowDetail" type="com.mes.order.entity.HollowGlassDetailsDTO"> |
| | | <result column="process_id" property="flowCardId"/> |
| | | <result column="child_width" property="width"/> |
| | | <result column="child_height" property="height"/> |
| | | <result column="order_number" property="orderSort"/> |
| | | <result column="technology_number" property="layer"/> |
| | | <result column="quantity" property="quantity"/> |
| | | </resultMap> |
| | | <select id="selectOrderPercent" resultMap="baseMap"> |
| | | SELECT a.order_id, |
| | | a.customer_name, |
| | |
| | | where a.warehousing != 2 and a.warehousing >= 0 |
| | | ORDER BY a.order_id desc |
| | | </select> |
| | | <select id="queryOrderByFlowCardId" resultType="com.mes.order.entity.HollowOrderDTO"> |
| | | select t1.* |
| | | from pp.flow_card t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where t.process_id = #{flowCardId} |
| | | limit 1 |
| | | </select> |
| | | <select id="queryFlowCardIdMaxLayerGlassInfo" resultMap="baseMapHollowDetail"> |
| | | with temp_flow as (SELECT t.process_id, |
| | | t.order_id, |
| | | t.order_number, |
| | | t.technology_number, |
| | | t.quantity, |
| | | t1.child_width, |
| | | t1.child_height |
| | | |
| | | from pp.flow_card t |
| | | LEFT JOIN sd.order_glass_detail t1 |
| | | on t.order_id = t1.order_id |
| | | and t.order_number = t1.order_number |
| | | and t.technology_number = t1.technology_number |
| | | where t.process_id = #{flowCardId}), |
| | | glass_info_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{totalLayer} |
| | | ) |
| | | select row_number() over (order by second_length desc,first_length desc) as rn, t.* |
| | | from glass_info_temp t |
| | | </select> |
| | | <select id="queryFlowCardIdLayerGlassInfo" resultMap="baseMapHollowDetail"> |
| | | with temp_flow as (SELECT t.process_id, |
| | | t.order_id, |
| | | t.order_number, |
| | | t.technology_number, |
| | | t.quantity, |
| | | t1.child_width, |
| | | t1.child_height |
| | | from pp.flow_card t |
| | | LEFT JOIN sd.order_glass_detail t1 |
| | | on t.order_id = t1.order_id |
| | | and t.order_number = t1.order_number |
| | | and t.technology_number = t1.technology_number |
| | | where t.process_id = #{flowCardId}), |
| | | glass_info_max_layer_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{totalLayer} |
| | | ), |
| | | glass_info_layer_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{layer} |
| | | ), |
| | | max_layer_sequence as ( |
| | | select row_number() over (order by second_length desc,first_length desc) as rn, t.order_number |
| | | from glass_info_max_layer_temp t |
| | | ), |
| | | result as (select t.* |
| | | from glass_info_layer_temp t |
| | | INNER join max_layer_sequence t1 on t.order_number = t1.order_number |
| | | order by t1.rn) |
| | | select * |
| | | from result |
| | | </select> |
| | | <select id="queryProductNameByFlowCardId" resultType="com.mes.order.entity.OrderDetailsDTO"> |
| | | select t.product_name, t1.customer_name |
| | | from sd.order_detail t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where (t.order_id, t.order_number) = ( |
| | | select min(order_id) as order_id, min(order_number) as order_number |
| | | from pp.flow_card |
| | | where process_id = #{flowCardId} |
| | | ) |
| | | limit 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | import com.mes.rawglasstask.entity.RawGlassStorageTask; |
| | | import com.mes.rawglasstask.service.RawGlassStorageTaskService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.tools.WebSocketUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Resource |
| | | private OrdersService ordersService; |
| | | |
| | | @Resource |
| | | private WebSocketUtils webSocketUtils; |
| | | |
| | | @Scheduled(fixedDelay = 2000) |
| | | public void sendRawGlassMessage() { |
| | | log.info("发送任务信息和架子信息"); |
| | |
| | | List<RawGlassStorageTask> tasks = rawGlassStorageTaskService.listRawGlassTask(); |
| | | jsonObject.append("rawStationDetailsList", rawStationDetailsList); |
| | | jsonObject.append("tasks", tasks); |
| | | List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("rawGlass"); |
| | | if (CollectionUtil.isNotEmpty(sendwServer)) { |
| | | sendwServer.stream().forEach(e -> { |
| | | e.sendMessage(String.valueOf(jsonObject)); |
| | | }); |
| | | } |
| | | webSocketUtils.sendToWeb("rawGlass", jsonObject); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | |
| | | List<OrderDTO> orderDTOS = ordersService.selectOrderPercent(); |
| | | jsonObject.append("orderDTOS", orderDTOS); |
| | | |
| | | List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreen"); |
| | | if (CollectionUtil.isNotEmpty(sendwServer)) { |
| | | sendwServer.stream().forEach(e -> { |
| | | e.sendMessage(String.valueOf(jsonObject)); |
| | | }); |
| | | } |
| | | webSocketUtils.sendToWeb("largenScreen", jsonObject); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | } else { |
| | | upPattenUsageService.deleteTask(engineering.getEngineerId()); |
| | | engineeringService.deleteTask(engineering.getEngineerId()); |
| | | glassInfoService.deleteTask(engineering.getEngineerId()); |
| | | // glassInfoService.deleteTask(engineering.getEngineerId()); |
| | | return Result.build(200, "请重新点击上片" + engineering.getEngineerId(), true); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("异常信息:{}", e); |
| | | log.error("异常信息:{}", e); |
| | | upPattenUsageService.deleteTask(engineering.getEngineerId()); |
| | | engineeringService.deleteTask(engineering.getEngineerId()); |
| | | glassInfoService.deleteTask(engineering.getEngineerId()); |
| | | // upPattenUsageService.deleteTask(engineering.getEngineerId()); |
| | | // engineeringService.deleteTask(engineering.getEngineerId()); |
| | | // glassInfoService.deleteTask(engineering.getEngineerId()); |
| | | return Result.build(200, "保存失败" + engineering.getEngineerId(), false); |
| | | } |
| | | } |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.2.100:3306/sd?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | import com.mes.s7.entity.S7DataGHTwo; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.tools.WebSocketUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.ArrayList; |
| | |
| | | @Autowired |
| | | @Qualifier("s7SerializerGHTwo") |
| | | private S7Serializer s7SerializerGHTwo; |
| | | @Resource |
| | | private WebSocketUtils webSocketUtils; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | } catch (Exception e) { |
| | | log.info("钢化前获取异常:{}", e.getMessage()); |
| | | } |
| | | webSocketUtils.sendToWeb("temperingGlass", jsonObject); |
| | | |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | //正在进行的任务 |
| | | List<TemperingGlassInfo> temperingTaskType = temperingGlassInfoService.selectTaskType(); |
| | | jsonObject.append("temperingTaskType", temperingTaskType); |
| | | |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingIsRun"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | } else { |
| | | log.info("Home is closed"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | webSocketUtils.sendToWeb("temperingIsRun", jsonObject); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | |
| | | //钢化饼图数据 |
| | | List<PieChartVO> pieChartVOS = temperingGlassInfoService.queryPieChart(); |
| | | jsonObject.append("pieChartVOS", pieChartVOS); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreen"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | } else { |
| | | log.info("largenScreen is closed"); |
| | | } |
| | | } |
| | | } |
| | | webSocketUtils.sendToWeb("largenScreen", jsonObject); |
| | | } |
| | | |
| | | |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.2.100:3306/sd?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | |
| | | @ApiOperation("按照流程卡、订单序号、层号获取缺片玻璃信息详情") |
| | | @PostMapping("/queryLackGlassByFlowCard") |
| | | public Result<List<GlassInfo>> queryLackGlassByFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | List<GlassInfo> lackGlassList = hollowGlassRelationInfoService.queryLackGlassByFlowCard(query); |
| | | public Result<List<LackDetailsDTO>> queryLackGlassByFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | List<LackDetailsDTO> lackGlassList = hollowGlassRelationInfoService.queryLackGlassByFlowCard(query); |
| | | return Result.success(lackGlassList); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.OrderDTO; |
| | | import com.mes.hollow.entity.dto.OrderDetailsDTO; |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface HollowGlassOutRelationInfoMapper extends BaseMapper<HollowGlassOutRelationInfo> { |
| | | |
| | | OrderDTO queryOrderByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | | List<PieChartVO> queryPieChart(); |
| | | |
| | | /** |
| | | * 按照流程卡获取产品名称 |
| | | * |
| | | * @param flowCardId |
| | | * @return |
| | | */ |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.hollow.entity.HollowGlassRelationInfo; |
| | | import com.mes.hollow.entity.dto.HollowGlassDetailsDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.dto.OrderDetailsDTO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | |
| | |
| | | public interface HollowGlassRelationInfoMapper extends BaseMapper<HollowGlassRelationInfo> { |
| | | |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdMaxLayerGlassInfo(@Param("flowCardId") String flowCardId, @Param("totalLayer") int totalLayer); |
| | | |
| | | |
| | | List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(@Param("flowCardId") String flowCardId, @Param("totalLayer") int totalLayer, @Param("layer") int layer); |
| | | |
| | | List<LackDetailsDTO> queryAllLackByFlowCard(); |
| | | |
| | | List<LackDetailsDTO> queryLackByFlowCard(); |
| | | |
| | | int queryLayerByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | | void clearDirtyFlowCardData(@Param("flowCardId") String flowCardId, @Param("layer") int layer); |
| | | |
| | | /** |
| | | * 按照流程卡获取产品名称 |
| | | * |
| | | * @param flowCardId |
| | | * @return |
| | | */ |
| | | OrderDetailsDTO queryProductNameByFlowCardId(@Param("flowCardId") String flowCardId, @Param("productName") String productName, @Param("customerName") String customerName); |
| | | |
| | | List<LackDetailsDTO> queryLackByFlowCard(@Param("flowCardId") String flowCardId); |
| | | |
| | | List<GlassInfo> queryLackGlassByFlowCard(@Param("flowCardId") String flowCardId, @Param("orderSort") Integer orderSort, @Param("layer") Integer layer); |
| | | List<LackDetailsDTO> queryLackGlassByFlowCard(@Param("flowCardId") String flowCardId, @Param("orderSort") Integer orderSort, @Param("layer") Integer layer); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.OrderDetailsDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.hollow.entity.request.HollowHistoryTaskRequest; |
| | | import com.mes.hollow.entity.request.HollowTaskRequest; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.dto.OrderDetailsDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | |
| | |
| | | |
| | | OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId, String productName, String customerName); |
| | | |
| | | List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | List<LackDetailsDTO> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | } |
| | | |
| | |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.hollowqueue.service.HollowGlassQueueInfoService; |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import com.mes.order.entity.HollowOrderDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.service.OrdersService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import com.mes.tools.DateUtil; |
| | | import com.mes.utils.Blank; |
| | |
| | | HollowGlassRelationInfoService hollowGlassRelationInfoService; |
| | | @Resource |
| | | SysConfigService sysConfigService; |
| | | @Resource |
| | | OrdersService ordersService; |
| | | |
| | | @Resource |
| | | RedisUtil redisUtil; |
| | |
| | | return "任务总层数小于2,不生成李赛克文件"; |
| | | } |
| | | //获取订单相关信息 |
| | | OrderDTO order = baseMapper.queryOrderByFlowCardId(flowCardId); |
| | | HollowOrderDTO order = ordersService.queryOrderByFlowCardId(flowCardId); |
| | | if (null == order) { |
| | | return "生成失败,相关订单信息不存在"; |
| | | } |
| | |
| | | @Cacheable(value = "orderDetails", key = "#flowCardId") |
| | | public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId) { |
| | | log.info("查询数据库一次:{}", flowCardId); |
| | | return baseMapper.queryProductNameByFlowCardId(flowCardId); |
| | | return ordersService.queryProductNameByFlowCardId(flowCardId); |
| | | } |
| | | |
| | | private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) { |
| | |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.order.entity.HollowGlassDetailsDTO; |
| | | import com.mes.order.entity.OrderDetailsDTO; |
| | | import com.mes.order.service.OrdersService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | SysConfigService sysConfigService; |
| | | @Resource |
| | | DamageService damageService; |
| | | @Resource |
| | | OrdersService ordersService; |
| | | // @Value("${mes.slotWidth}") |
| | | // private Integer slotWidth; |
| | | // @Value("${mes.glassGap}") |
| | |
| | | return; |
| | | } |
| | | //按照流程卡获取本流程卡最后一层或第一次的玻璃数据 |
| | | List<HollowGlassDetailsDTO> glassDetailsDTOS = this.baseMapper.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | List<HollowGlassDetailsDTO> glassDetailsDTOS = ordersService.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | if (CollectionUtil.isEmpty(glassDetailsDTOS)) { |
| | | log.info("当前流程卡最外层数据未找到,请在erp确认数据无误,流程卡:{},总层数{}", flowCardId, totalLayer); |
| | | return; |
| | | } |
| | | if (totalLayer != layer) { |
| | | glassDetailsDTOS = this.baseMapper.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | glassDetailsDTOS = ordersService.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | } |
| | | if (CollectionUtil.isEmpty(glassDetailsDTOS)) { |
| | | log.info("当前流程卡最外层数据未找到,请在erp确认数据无误,流程卡:{},总层数{},层数{}", flowCardId, totalLayer, layer); |
| | |
| | | for (List<HollowGlassRelationInfo> item : tempHollowList) { |
| | | relationInfoList.addAll(item); |
| | | } |
| | | log.info("分配完毕"); |
| | | this.saveBatch(relationInfoList); |
| | | log.info("分配完毕:{}", relationInfoList); |
| | | try { |
| | | this.saveBatch(relationInfoList); |
| | | } catch (Exception e) { |
| | | log.error("保存失败:{}", e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer,List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) { |
| | | public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) { |
| | | List<LackDetailsDTO> detailsDTOS = baseMapper.queryLackByFlowCard(flowCardId); |
| | | return detailsDTOS.stream().collect(Collectors.groupingBy(item -> item.getLayer())); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | public List<LackDetailsDTO> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | return baseMapper.queryLackGlassByFlowCard(query.getFlowCardId(), query.getOrderSort(), query.getLayer()); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId, String productName, String customerName) { |
| | | OrderDetailsDTO dto = hollowGlassOutRelationInfoService.queryProductNameByFlowCardId(flowCardId); |
| | | OrderDetailsDTO dto = ordersService.queryProductNameByFlowCardId(flowCardId); |
| | | if ((StringUtils.isBlank(productName) || dto.getProductName().contains(productName)) && (StringUtils.isBlank(customerName) || dto.getCustomerName().contains(customerName))) { |
| | | return dto; |
| | | } |
| | |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void finishOutBigStorageTask() throws Exception { |
| | | S7DataZKDLPTwo s7DataZKDLPTwo = s7SerializerZKDLPTwo.read(S7DataZKDLPTwo.class); |
| | | Boolean inkageEntity = s7DataZKDLPTwo.getMesControl(); |
| | | if (true != inkageEntity) { |
| | | log.info("当前为非联机状态,结束完成出片任务"); |
| | | return; |
| | | } |
| | | //获取出片任务表 |
| | | List<BigStorageCageTask> outTaskList = getOutTaskList(s7DataZKDLPTwo); |
| | | if (CollectionUtil.isEmpty(outTaskList)) { |
| | | log.info("当前大车无出片玻璃,结束完成出片任务"); |
| | | return; |
| | | } |
| | | List<BigStorageCageTask> unFinishTaskList = outTaskList.stream().filter(e -> e.getTaskState() <= 1 || e.getStartSlot() == 0).collect(Collectors.toList()); |
| | | if (CollectionUtil.isNotEmpty(unFinishTaskList)) { |
| | | log.info("存在未完成的玻璃信息,玻璃:{}", unFinishTaskList); |
| | | return; |
| | | } |
| | | Map<Integer, List<BigStorageCageTask>> taskMap = outTaskList.stream().collect(Collectors.groupingBy(BigStorageCageTask::getTaskState)); |
| | | int taskType = 0; |
| | | if (Const.OUT_TARGET_POSITION_ALL.contains(outTaskList.get(0).getTargetSlot())) { |
| | | taskType = Const.BIG_STORAGE_AFTER_OUT; |
| | | } else { |
| | | taskType = Const.BIG_STORAGE_AFTER_DISPATCH; |
| | | } |
| | | //按照任务状态修改大理片笼内的玻璃数据 |
| | | // 重新计算大理片笼内的剩余尺寸 |
| | | Integer finalTaskType = taskType; |
| | | taskMap.forEach((e1, v) -> { |
| | | if (e1 == 2) { |
| | | //进片完成 |
| | | log.info("3、获取出片已完成的玻璃信息id:{}", v); |
| | | List<Integer> outSuccessGlassSlot = new ArrayList<>(); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | outSuccessGlassSlot = v.stream().map(BigStorageCageTask::getStartSlot).collect(Collectors.toList()); |
| | | } else { |
| | | List<Integer> targetSuccessGlassSlot = v.stream().map(BigStorageCageTask::getTargetSlot).collect(Collectors.toList()); |
| | | List<Integer> startoutSuccessGlassSlot = v.stream().map(BigStorageCageTask::getStartSlot).collect(Collectors.toList()); |
| | | outSuccessGlassSlot.addAll(targetSuccessGlassSlot); |
| | | outSuccessGlassSlot.addAll(startoutSuccessGlassSlot); |
| | | } |
| | | List<UpdateHollowBigStorageCageDTO> storageCageDTOList = v.stream().map(e -> { |
| | | UpdateHollowBigStorageCageDTO storageCageDTO = new UpdateHollowBigStorageCageDTO(); |
| | | storageCageDTO.setGlassId(e.getGlassId()); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | storageCageDTO.setTargetSlot(e.getStartSlot()); |
| | | } else { |
| | | storageCageDTO.setTargetSlot(e.getTargetSlot()); |
| | | } |
| | | return storageCageDTO; |
| | | }).collect(Collectors.toList()); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | hollowBigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_OUT); |
| | | } else { |
| | | hollowBigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_IN); |
| | | //按照格子信息更新对应的设备id |
| | | List<Integer> slotList = storageCageDTOList.stream().map(UpdateHollowBigStorageCageDTO::getTargetSlot).distinct().collect(Collectors.toList()); |
| | | hollowBigStorageCageDetailsService.updateDeviceIdBySlot(slotList); |
| | | } |
| | | log.info("4、大理片笼出片状态已完成已完成的玻璃信息id:{}", v); |
| | | updateSlotRemainBySlots(outSuccessGlassSlot); |
| | | } else if (e1 == 3) { |
| | | //破损处理 |
| | | dealDamageOutTask(v); |
| | | } else { |
| | | //清空理片笼空数据 |
| | | noDealOutTask(v); |
| | | } |
| | | }); |
| | | |
| | | for (BigStorageCageTask item : outTaskList) { |
| | | //更新历史任务表中的任务状态 |
| | | hollowBigStorageCageHistoryTaskService.update(new LambdaUpdateWrapper<HollowBigStorageCageHistoryTask>() |
| | | .set(HollowBigStorageCageHistoryTask::getTaskState, item.getTaskState()) |
| | | .eq(HollowBigStorageCageHistoryTask::getTaskType, taskType) |
| | | .eq(HollowBigStorageCageHistoryTask::getGlassId, item.getGlassId())); |
| | | //更新中空小片表 |
| | | Integer taskState = item.getTaskState(); |
| | | if (taskState == 2) { |
| | | hollowGlassQueueInfoService.update(new LambdaUpdateWrapper<HollowGlassQueueInfo>() |
| | | .set(HollowGlassQueueInfo::getState, Const.TEMPERING_OUT).eq(HollowGlassQueueInfo::getGlassId, item.getGlassId())); |
| | | } else if (taskState == 3) { |
| | | // temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().eq(TemperingGlassInfo::getGlassId, item.getGlassId())); |
| | | hollowGlassQueueInfoService.update(new LambdaUpdateWrapper<HollowGlassQueueInfo>() |
| | | .set(HollowGlassQueueInfo::getState, Const.TEMPERING_DAMAGE).eq(HollowGlassQueueInfo::getGlassId, item.getGlassId())); |
| | | |
| | | } else { |
| | | // 空执行 |
| | | } |
| | | } |
| | | try { |
| | | //更新数量 |
| | | //按照玻璃id获取需要出片对列表中的数据 |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | HollowGlassQueueInfo hollowGlassQueueInfo = hollowGlassQueueInfoService.getOne(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getGlassId, outTaskList.get(0).getGlassId()) |
| | | .orderByDesc(HollowGlassQueueInfo::getUpdateTime).last("limit 1")); |
| | | List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getFlowCardId, hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq(HollowGlassQueueInfo::getCell, hollowGlassQueueInfo.getCell()) |
| | | // .eq(HollowGlassQueueInfo::getIsPair, 1) |
| | | .eq(HollowGlassQueueInfo::getState, Const.TEMPERING_NEW) |
| | | ); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | // 任务更新为已完成 |
| | | hollowGlassOutRelationInfoService.update(new UpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq("flow_card_id", hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq("cell", hollowGlassQueueInfo.getCell()) |
| | | .setSql("pair_quantity = total_pair_quantity") |
| | | .set("state", Const.HOLLOW_FLOW_CARD_SUCCESS) |
| | | ); |
| | | S7DataZKDLPTwo s7DataZKDLPTwo = s7SerializerZKDLPTwo.read(S7DataZKDLPTwo.class); |
| | | Boolean inkageEntity = s7DataZKDLPTwo.getMesControl(); |
| | | if (true != inkageEntity) { |
| | | log.info("当前为非联机状态,结束完成出片任务"); |
| | | return; |
| | | } |
| | | //获取出片任务表 |
| | | List<BigStorageCageTask> outTaskList = getOutTaskList(s7DataZKDLPTwo); |
| | | if (CollectionUtil.isEmpty(outTaskList)) { |
| | | log.info("当前大车无出片玻璃,结束完成出片任务"); |
| | | return; |
| | | } |
| | | log.info("中空理片笼出片完成任务:{}", outTaskList); |
| | | log.info("中空理片笼出片汇报情况:{}", s7DataZKDLPTwo); |
| | | List<BigStorageCageTask> unFinishTaskList = outTaskList.stream().filter(e -> e.getTaskState() <= 1 || e.getStartSlot() == 0).collect(Collectors.toList()); |
| | | if (CollectionUtil.isNotEmpty(unFinishTaskList)) { |
| | | log.info("存在未完成的玻璃信息,玻璃:{}", unFinishTaskList); |
| | | return; |
| | | } |
| | | Map<Integer, List<BigStorageCageTask>> taskMap = outTaskList.stream().collect(Collectors.groupingBy(BigStorageCageTask::getTaskState)); |
| | | int taskType = 0; |
| | | if (Const.OUT_TARGET_POSITION_ALL.contains(outTaskList.get(0).getTargetSlot())) { |
| | | taskType = Const.BIG_STORAGE_AFTER_OUT; |
| | | } else { |
| | | taskType = Const.BIG_STORAGE_AFTER_DISPATCH; |
| | | } |
| | | //按照任务状态修改大理片笼内的玻璃数据 |
| | | // 重新计算大理片笼内的剩余尺寸 |
| | | Integer finalTaskType = taskType; |
| | | taskMap.forEach((e1, v) -> { |
| | | if (e1 == 2) { |
| | | //进片完成 |
| | | log.info("3、获取出片已完成的玻璃信息id:{}", v); |
| | | List<Integer> outSuccessGlassSlot = new ArrayList<>(); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | outSuccessGlassSlot = v.stream().map(BigStorageCageTask::getStartSlot).collect(Collectors.toList()); |
| | | } else { |
| | | List<Integer> targetSuccessGlassSlot = v.stream().map(BigStorageCageTask::getTargetSlot).collect(Collectors.toList()); |
| | | List<Integer> startoutSuccessGlassSlot = v.stream().map(BigStorageCageTask::getStartSlot).collect(Collectors.toList()); |
| | | outSuccessGlassSlot.addAll(targetSuccessGlassSlot); |
| | | outSuccessGlassSlot.addAll(startoutSuccessGlassSlot); |
| | | } |
| | | List<UpdateHollowBigStorageCageDTO> storageCageDTOList = v.stream().map(e -> { |
| | | UpdateHollowBigStorageCageDTO storageCageDTO = new UpdateHollowBigStorageCageDTO(); |
| | | storageCageDTO.setGlassId(e.getGlassId()); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | storageCageDTO.setTargetSlot(e.getStartSlot()); |
| | | } else { |
| | | storageCageDTO.setTargetSlot(e.getTargetSlot()); |
| | | } |
| | | return storageCageDTO; |
| | | }).collect(Collectors.toList()); |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | hollowBigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_OUT); |
| | | } else { |
| | | hollowBigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_IN); |
| | | //按照格子信息更新对应的设备id |
| | | List<Integer> slotList = storageCageDTOList.stream().map(UpdateHollowBigStorageCageDTO::getTargetSlot).distinct().collect(Collectors.toList()); |
| | | hollowBigStorageCageDetailsService.updateDeviceIdBySlot(slotList); |
| | | } |
| | | log.info("4、大理片笼出片状态已完成已完成的玻璃信息id:{}", v); |
| | | updateSlotRemainBySlots(outSuccessGlassSlot); |
| | | } else if (e1 == 3) { |
| | | //破损处理 |
| | | dealDamageOutTask(v); |
| | | } else { |
| | | // 计算剩余玻璃对数,用任务总队数减剩余对数 |
| | | int remainCount = list.size() / hollowGlassQueueInfo.getTotalLayer(); |
| | | hollowGlassOutRelationInfoService.update(new UpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq("flow_card_id", hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq("cell", hollowGlassQueueInfo.getCell()) |
| | | .setSql("pair_quantity = total_pair_quantity -" + remainCount) |
| | | ); |
| | | //清空理片笼空数据 |
| | | noDealOutTask(v); |
| | | } |
| | | }); |
| | | |
| | | for (BigStorageCageTask item : outTaskList) { |
| | | //更新历史任务表中的任务状态 |
| | | hollowBigStorageCageHistoryTaskService.update(new LambdaUpdateWrapper<HollowBigStorageCageHistoryTask>() |
| | | .set(HollowBigStorageCageHistoryTask::getTaskState, item.getTaskState()) |
| | | .eq(HollowBigStorageCageHistoryTask::getTaskType, taskType) |
| | | .eq(HollowBigStorageCageHistoryTask::getGlassId, item.getGlassId())); |
| | | //更新中空小片表 |
| | | Integer taskState = item.getTaskState(); |
| | | if (taskState == 2) { |
| | | hollowGlassQueueInfoService.update(new LambdaUpdateWrapper<HollowGlassQueueInfo>() |
| | | .set(HollowGlassQueueInfo::getState, Const.TEMPERING_OUT).eq(HollowGlassQueueInfo::getGlassId, item.getGlassId())); |
| | | } else if (taskState == 3) { |
| | | // temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().eq(TemperingGlassInfo::getGlassId, item.getGlassId())); |
| | | hollowGlassQueueInfoService.update(new LambdaUpdateWrapper<HollowGlassQueueInfo>() |
| | | .set(HollowGlassQueueInfo::getState, Const.TEMPERING_DAMAGE).eq(HollowGlassQueueInfo::getGlassId, item.getGlassId())); |
| | | |
| | | } else { |
| | | // 空执行 |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("计算玻璃数量过程中出现错误,错误信息{}", e.getMessage()); |
| | | } |
| | | try { |
| | | //更新数量 |
| | | //按照玻璃id获取需要出片对列表中的数据 |
| | | if (finalTaskType.equals(Const.BIG_STORAGE_AFTER_OUT)) { |
| | | HollowGlassQueueInfo hollowGlassQueueInfo = hollowGlassQueueInfoService.getOne(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getGlassId, outTaskList.get(0).getGlassId()) |
| | | .orderByDesc(HollowGlassQueueInfo::getUpdateTime).last("limit 1")); |
| | | List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getFlowCardId, hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq(HollowGlassQueueInfo::getCell, hollowGlassQueueInfo.getCell()) |
| | | // .eq(HollowGlassQueueInfo::getIsPair, 1) |
| | | .eq(HollowGlassQueueInfo::getState, Const.TEMPERING_NEW) |
| | | ); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | // 任务更新为已完成 |
| | | hollowGlassOutRelationInfoService.update(new UpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq("flow_card_id", hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq("cell", hollowGlassQueueInfo.getCell()) |
| | | .setSql("pair_quantity = total_pair_quantity") |
| | | .set("state", Const.HOLLOW_FLOW_CARD_SUCCESS) |
| | | ); |
| | | } else { |
| | | // 计算剩余玻璃对数,用任务总队数减剩余对数 |
| | | int remainCount = list.size() / hollowGlassQueueInfo.getTotalLayer(); |
| | | hollowGlassOutRelationInfoService.update(new UpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq("flow_card_id", hollowGlassQueueInfo.getFlowCardId()) |
| | | .eq("cell", hollowGlassQueueInfo.getCell()) |
| | | .setSql("pair_quantity = total_pair_quantity -" + remainCount) |
| | | ); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("计算玻璃数量过程中出现错误,错误信息{}", e.getMessage()); |
| | | } |
| | | |
| | | // 重置任务表数据 |
| | | resetOutTask(); |
| | | //清空启动状态 |
| | | //向opc发送启动信号 |
| | | s7DataZKDLPTwo = new S7DataZKDLPTwo(); |
| | | s7DataZKDLPTwo.setMesReply(0); |
| | | s7SerializerZKDLPTwo.write(s7DataZKDLPTwo); |
| | | resetOutTask(); |
| | | //清空启动状态 |
| | | //向opc发送启动信号 |
| | | s7DataZKDLPTwo = new S7DataZKDLPTwo(); |
| | | s7DataZKDLPTwo.setMesReply(0); |
| | | s7SerializerZKDLPTwo.write(s7DataZKDLPTwo); |
| | | } catch (Exception e) { |
| | | log.info("中空理片笼出片汇报任务异常:{}", e); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void dealDamageInTask(List<BigStorageCageTask> damageTaskList) { |
| | |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | northGlassMes: |
| | | url: jdbc:mysql://127.0.0.1:3306/yw_mes?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/north_glass_mes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 1 |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://192.168.2.100:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.2.100:3309/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | host: 192.168.2.100 |
| | | port: 6379 |
| | | password: 123456 |
| | | cache: |
| | | type: redis # 明确指定缓存类型 |
| | | redis: |
| | | time-to-live: -1 # 缓存过期时间 |
| | | cache-null-values: true # 是否缓存空值 |
| | | use-key-prefix: true # 使用key前缀 |
| | | kangaroohy: |
| | | milo: |
| | | enabled: false |
| | |
| | | WITH big_storage_cage_history_task_temp AS |
| | | (SELECT DISTINCT create_time |
| | | FROM hollow_big_storage_cage_history_task |
| | | WHERE task_type = 5 AND DATE ( create_time ) = '2025-06-23' ), |
| | | WHERE task_type = 5 AND DATE ( create_time ) = '${days}' ), |
| | | time_temp AS ( |
| | | SELECT |
| | | date (create_time) AS day_time, |
| | |
| | | FROM |
| | | hollow_big_storage_cage_history_task |
| | | WHERE |
| | | Date ( create_time ) = '2025-06-23' |
| | | Date ( create_time ) = '${days}' |
| | | GROUP BY |
| | | date ( create_time ) |
| | | ), |
| | |
| | | <mapper namespace="com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper"> |
| | | |
| | | |
| | | <select id="queryOrderByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDTO"> |
| | | select t1.* |
| | | from pp.flow_card t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where t.process_id = #{flowCardId} |
| | | limit 1 |
| | | </select> |
| | | <select id="queryPieChart" resultType="com.mes.largenscreen.entity.PieChartVO"> |
| | | SELECT |
| | | round( sum( CASE WHEN hgori.cell = 930 AND hgqi.state = 0 THEN 1 ELSE 0 END ), 2 ) AS oneCompletedQuantity, |
| | |
| | | WHERE |
| | | date( hgori.create_time ) = date( |
| | | now()) |
| | | </select> |
| | | <select id="queryProductNameByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDetailsDTO"> |
| | | select t.product_name, t1.customer_name |
| | | from sd.order_detail t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where (t.order_id, t.order_number) = ( |
| | | select min(order_id) as order_id, min(order_number) as order_number |
| | | from pp.flow_card |
| | | where process_id = #{flowCardId} |
| | | ) |
| | | limit 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.mes.hollow.mapper.HollowGlassRelationInfoMapper"> |
| | | |
| | | <resultMap id="baseMap" type="com.mes.hollow.entity.dto.HollowGlassDetailsDTO"> |
| | | <result column="process_id" property="flowCardId"/> |
| | | <result column="child_width" property="width"/> |
| | | <result column="child_height" property="height"/> |
| | | <result column="order_number" property="orderSort"/> |
| | | <result column="technology_number" property="layer"/> |
| | | <result column="quantity" property="quantity"/> |
| | | </resultMap> |
| | | <resultMap id="lackBaseMap" type="com.mes.hollow.entity.dto.LackDetailsDTO"> |
| | | <result column="flow_card_id" property="flowCardId"/> |
| | | <result column="layer" property="layer"/> |
| | |
| | | <result column="lack_count" property="lackCount"/> |
| | | <result column="damage_count" property="damageCount"/> |
| | | </resultMap> |
| | | |
| | | <select id="queryFlowCardIdMaxLayerGlassInfo" resultMap="baseMap"> |
| | | with temp_flow as (SELECT t.process_id, |
| | | t.order_id, |
| | | t.order_number, |
| | | t.technology_number, |
| | | t.quantity, |
| | | t1.child_width, |
| | | t1.child_height |
| | | |
| | | from pp.flow_card t |
| | | LEFT JOIN sd.order_glass_detail t1 |
| | | on t.order_id = t1.order_id |
| | | and t.order_number = t1.order_number |
| | | and t.technology_number = t1.technology_number |
| | | where t.process_id = #{flowCardId}), |
| | | glass_info_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{totalLayer} |
| | | ) |
| | | select row_number() over (order by second_length desc,first_length desc) as rn, t.* |
| | | from glass_info_temp t |
| | | </select> |
| | | |
| | | <select id="queryFlowCardIdLayerGlassInfo" resultMap="baseMap"> |
| | | with temp_flow as (SELECT t.process_id, |
| | | t.order_id, |
| | | t.order_number, |
| | | t.technology_number, |
| | | t.quantity, |
| | | t1.child_width, |
| | | t1.child_height |
| | | from pp.flow_card t |
| | | LEFT JOIN sd.order_glass_detail t1 |
| | | on t.order_id = t1.order_id |
| | | and t.order_number = t1.order_number |
| | | and t.technology_number = t1.technology_number |
| | | where t.process_id = #{flowCardId}), |
| | | glass_info_max_layer_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{totalLayer} |
| | | ), |
| | | glass_info_layer_temp as ( |
| | | select process_id, |
| | | order_id, |
| | | GREATEST(child_width, child_height) as first_length, |
| | | least(child_width, child_height) as second_length, |
| | | child_width, |
| | | child_height, |
| | | order_number, |
| | | technology_number, |
| | | quantity |
| | | from temp_flow |
| | | where technology_number = #{layer} |
| | | ), |
| | | max_layer_sequence as ( |
| | | select row_number() over (order by second_length desc,first_length desc) as rn, t.order_number |
| | | from glass_info_max_layer_temp t |
| | | ), |
| | | result as (select t.* |
| | | from glass_info_layer_temp t |
| | | INNER join max_layer_sequence t1 on t.order_number = t1.order_number |
| | | order by t1.rn) |
| | | <select id="queryLackByFlowCard" resultType="com.mes.hollow.entity.dto.LackDetailsDTO"> |
| | | with hollow_flow_temp AS ( |
| | | SELECT DISTINCT flow_card_id |
| | | FROM hollow_big_storage_cage_details |
| | | WHERE state = 100 |
| | | <if test="flowCardId != null and flowCardId != ''"> |
| | | and flow_card_id = #{flowCardId} |
| | | </if> |
| | | ) |
| | | , glass_temp as ( |
| | | select t1.* |
| | | from hollow_flow_temp t |
| | | INNER JOIN glass_info t1 on t.flow_card_id = t1.flow_card_id |
| | | ) |
| | | , detail_temp as ( |
| | | select t.* |
| | | from glass_temp t |
| | | left join hollow_big_storage_cage_details t1 on t.glass_id = t1.glass_id |
| | | where t1.glass_id is null |
| | | ) |
| | | , damage_ranked AS ( |
| | | SELECT t.flow_card_id, |
| | | t.layer, |
| | | t.glass_id, |
| | | t.glass_type, |
| | | t.width, |
| | | t.height, |
| | | t.filmsId, |
| | | t.thickness, |
| | | case |
| | | when type in (8, 9) and status = 1 then '' |
| | | else t1.working_procedure end as working_procedure, |
| | | ROW_NUMBER() OVER (PARTITION BY t1.glass_id ORDER BY t1.id DESC) as rn |
| | | FROM detail_temp t |
| | | inner join damage t1 on t.glass_id = t1.glass_id |
| | | ) |
| | | , damage_latest AS ( |
| | | SELECT * |
| | | FROM damage_ranked |
| | | WHERE rn = 1 |
| | | ) |
| | | select * |
| | | from result |
| | | from damage_latest |
| | | |
| | | </select> |
| | | <select id="queryAllLackByFlowCard" resultMap="lackBaseMap"> |
| | | WITH flow_card_id_info AS ( |
| | |
| | | t.width, |
| | | t.height, |
| | | COUNT(DISTINCT t.glass_id) as lack_count, |
| | | COUNT(DISTINCT CASE WHEN t1.type IN (7,8) AND t1.status = 1 THEN t.glass_id END) as damage_count |
| | | COUNT(DISTINCT CASE WHEN t1.type IN (8,9) AND t1.status = 1 THEN t.glass_id END) as damage_count |
| | | FROM detail_temp t |
| | | LEFT JOIN damage_latest t1 ON t.glass_id = t1.glass_id |
| | | GROUP BY |
| | |
| | | from hollow_glass_relation_info |
| | | where flow_card_id = #{flowCardId} |
| | | </select> |
| | | <select id="queryProductNameByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDetailsDTO"> |
| | | select t.product_name, t1.customer_name |
| | | from sd.order_detail t |
| | | inner join sd.order t1 on t.order_id = t1.order_id |
| | | where (t.order_id, t.order_number) = ( |
| | | select min(order_id) as order_id, min(order_number) as order_number |
| | | from pp.flow_card |
| | | where process_id = #{flowCardId} |
| | | <if test="productName != null and productName != ''"> |
| | | and t.product_name like concat('%', #{productName}, '%') |
| | | </if> |
| | | <if test="customerName != null and customerName != ''"> |
| | | and t1.customer_name like concat('%', #{customerName}, '%') |
| | | </if> |
| | | ) |
| | | limit 1 |
| | | </select> |
| | | <select id="queryLackGlassByFlowCard" resultType="com.mes.glassinfo.entity.GlassInfo"> |
| | | with glass_id_info as ( |
| | | select glass_id,order_sort from hollow_glass_relation_info where flow_card_id=#{flowCardId} and |
| | | order_sort=#{orderSort} and layer=#{layer} and glass_id is not null |
| | | ), |
| | | damage_glass_id as ( |
| | | select glass_id from damage where process_id=#{flowCardId} and order_number=#{orderSort} and |
| | | technology_number=#{layer} and type=8 and status < 3 and glass_id is not null |
| | | ) |
| | | select t.* from glass_info t left join glass_id_info t1 on t.glass_id=t1.glass_id |
| | | left join damage_glass_id t2 on t.glass_id=t2.glass_id |
| | | where t.flow_card_id=#{flowCardId} and t.glass_type=#{orderSort} and t.layer=#{layer} and t1.glass_id is null |
| | | and t2.glass_id is null |
| | | </select> |
| | | <select id="queryLackByFlowCard" resultType="com.mes.hollow.entity.dto.LackDetailsDTO"> |
| | | with hollow_flow_temp AS ( |
| | | SELECT DISTINCT flow_card_id |
| | | FROM hollow_big_storage_cage_details |
| | | WHERE state = 100 |
| | | <if test="flowCardId != null and flowCardId != ''"> |
| | | and flow_card_id = #{flowCardId} |
| | | </if> |
| | | ) |
| | | , glass_temp as ( |
| | | select t1.* |
| | | from hollow_flow_temp t |
| | | INNER JOIN glass_info t1 on t.flow_card_id = t1.flow_card_id |
| | | <select id="queryLackGlassByFlowCard" resultType="com.mes.hollow.entity.dto.LackDetailsDTO"> |
| | | with glass_temp as ( |
| | | select * |
| | | from glass_info |
| | | where flow_card_id = #{flowCardId} |
| | | and glass_type = #{orderSort} |
| | | and layer = #{layer} |
| | | ) |
| | | , detail_temp as ( |
| | | select t.* |
| | |
| | | t.filmsId, |
| | | t.thickness, |
| | | case |
| | | when type in (7, 8) and status = 1 then '' |
| | | else t1.working_procedure end as working_procedure, |
| | | ROW_NUMBER() OVER (PARTITION BY t1.glass_id ORDER BY t1.id DESC) as rn |
| | | when type in (8, 9) and status = 1 then '' |
| | | else t1.working_procedure end as working_procedure, |
| | | ROW_NUMBER() OVER (PARTITION BY t1.glass_id ORDER BY t1.id DESC) as rn |
| | | FROM detail_temp t |
| | | inner join damage t1 on t.glass_id = t1.glass_id |
| | | ) |
| | |
| | | ) |
| | | select * |
| | | from damage_latest |
| | | |
| | | </select> |
| | | |
| | | |
| | | <update id="clearDirtyFlowCardData"> |
| | | update tempering_glass_relation_info |
| | | set shelf_order = null |
| | | , state = 0 |
| | | update hollow_glass_relation_info |
| | | set glass_id = null, |
| | | tempering_layout_id = null, |
| | | tempering_feed_sequence = null, |
| | | engineer_id = null, |
| | | state = 0 |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and shelf_order not in ( |
| | | select shelf_order |
| | | from vertical_sheet_cage_details |
| | | and glass_id not in ( |
| | | select glass_id |
| | | from hollow_big_storage_cage_details |
| | | where flow_card_id = #{flowCardId} |
| | | and layer = #{layer} |
| | | and state in (100, 102, 103, 104) |