| | |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | backgroundColor: rect.state === 0 ? '#dedfe0' : '#d1edc4' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | backgroundColor: rect.state === 4 ? '#911005' : '#f8e3c5' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | backgroundColor: rect.state === 4 ? '#d1edc4' : '#f8e3c5' }"> |
| | | <div class="centered-text"> |
| | | <div >{{ rect.flowcardId }}</div> |
| | | <div style="margin-top: 50px;margin-left: -50px;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | <div style="text-align: center;">{{ rect.widtha }}*{{ rect.heighta }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | const cell8=ref(true); |
| | | const cell9=ref(true); |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | |
| | | |
| | | |
| | | |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | | const itemsPerPage = computed(() => { |
| | |
| | | return 25; // 默认值,可以根据实际需求修改 |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 计算分页后的数据 |
| | | const paginatedUsers = computed(() => { |
| | | const startIndex = calculateStartIndex(); |
| | | const endIndex = startIndex + itemsPerPage.value; |
| | | return tableData.value.slice(startIndex, endIndex); |
| | | }); |
| | | |
| | | |
| | | // 计算当前页的起始索引 |
| | | function calculateStartIndex() { |
| | | let index = 0; |
| | |
| | | currentPage.value++; |
| | | } |
| | | }; |
| | | |
| | | |
| | | // 总页数计算 |
| | | const totalPages = computed(() => { |
| | | // let total = 0; |
| | |
| | | // } |
| | | return 9; |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | ElMessage.success(response.message); |
| | | glassId.value = ''; |
| | | tableDataf.value = ''; |
| | | |
| | | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | top: 29/length |
| | | })); |
| | | } |
| | | |
| | | |
| | | |
| | | }; |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | onMounted(() => { |
| | | // fetchFlowCardId(); |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | |
| | | |
| | | }); |
| | | function getStatusType(enableState: number) { |
| | | switch (enableState) { |
| | |
| | | </el-input> |
| | | <el-button type="primary" plain style="margin-left: 10px;" @click="searchout">{{ $t('searchOrder.search') }}</el-button> |
| | | </div> |
| | | |
| | | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> |
| | | <el-table height="100%" ref="table" |
| | | :data="tableDataf" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | |
| | | <template> |
| | | <div class="glass-rack"> |
| | | <div > |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <svg width="500" height="370" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | | <g v-for="(rack, index) in racks" :key="index" :data="tableData"> |
| | |
| | | import { initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost } from '@/utils/constants'; |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '',downGlassInfoList:"" } }, |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456',downGlassInfoList:"" } }, |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '',downGlassInfoList:"" } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678',downGlassInfoList:"" } }, |
| | | |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: '' ,downGlassInfoList:""} } |
| | | { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' ,downGlassInfoList:""} } |
| | | |
| | | ]); |
| | | |
| | |
| | | <template> |
| | | <div class="glass-rack"> |
| | | <div > |
| | | <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg"> |
| | | <svg width="500" height="370" xmlns="http://www.w3.org/2000/svg"> |
| | | <g stroke="null" id="Layer_1"> |
| | | <!-- 使用 v-for 循环渲染数据 --> |
| | | <g v-for="(rack, index) in racks" :key="index"> |
| | |
| | | import { initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | const racks = ref([ |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '' } }, |
| | | { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } }, |
| | | |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: '' } }, |
| | | { x: 280, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG12345678' } }, |
| | | |
| | | { x: 140, y: 320, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: '' } } |
| | | { x: 140, y: 280, height: 60, width: 110, fillColor: '#6a6da9', item: { height: 20, width: 100, fillColor: 'yellow', content: 'NG1234561454' } } |
| | | |
| | | ]); |
| | | |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive, onMounted, onBeforeUnmount} from "vue"; |
| | | |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | const { t } = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | |
| | | fetchFlowCardId(); |
| | | dialogFormVisiblea.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | |
| | | } |
| | | }; |
| | | //确认 |
| | | |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const firstPart = flowCardId.value.split('|')[0].trim(); // |
| | |
| | | workstationId: workstationId.value, |
| | | flowCardId: firstPart, |
| | | layer:twoPart |
| | | |
| | | }); |
| | | |
| | | console.log(response) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | |
| | | |
| | | const updatePageData = () => { |
| | | // 假设你的页面上有一个名为 tableData 的 Vue 组件 |
| | | // 你可以直接更新 tableData 的数据 |
| | | fetchTableData() |
| | | // 使用 $forceUpdate() 强制更新组件 |
| | | |
| | | }; |
| | | |
| | | const handleBindRack2 = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | dialogFormVisiblea2.value = true; // 打开绑定架子对话框 |
| | |
| | | dialogFormVisiblea2.value = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | |
| | | // 更新 tableData 的数据 |
| | | |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | // console.log("更新后数据", data.params[0]); |
| | | |
| | | }; |
| | | |
| | | // 初始化 WebSocket,并传递消息处理函数 |
| | | |
| | | onMounted(() => { |
| | | fetchFlowCardId(); |
| | | fetchTableData(); // 获取数据 |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | | }); |
| | | |
| | | const getTagType =(status) => { |
| | | return status === 1 ? 'success' : 'danger'; |
| | | // 根据状态值决定标签类型,这里假设状态为1时为成功(绿色),否则为失败(红色) |
| | | } |
| | | |
| | | const toggleStatus = (row) => { |
| | | // 切换料架状态的逻辑 |
| | | row.enableState = 1 - row.enableState; // Toggle between 0 and 1 |
| | | // 此处可以添加保存状态的逻辑,比如调用 API 更新数据 |
| | | updateRowStatus(row); |
| | | }; |
| | | |
| | | const updateRowStatus = async (row) => { |
| | | try { |
| | | // 假设你的后端 API 接收 PUT 请求,并且需要传递 row.id 和 row.enableState 参数 |
| | | |
| | | |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateDownWorkstation', { |
| | | enableState:row.enableState, |
| | | id:row.id |
| | | }); |
| | | console.log('Updated row status:', response.data); |
| | | // 可以根据后端返回的数据进行进一步处理,比如更新本地状态等 |
| | | } catch (error) { |
| | | console.error('Error updating row status:', error); |
| | | // 处理错误情况,比如提示用户更新失败 |
| | | } |
| | | }; |
| | | |
| | | |
| | | // beforeUnmount(() => { |
| | | // closeWebSocket(); |
| | | // }); |
| | | // setInterval(fetchTableData, 2000) |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> |
| | | <el-table height="100%" ref="table" |
| | | <el-card style="flex: 1;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="200px" ref="table" |
| | | @selection-change="handleSelectionChange" |
| | | :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80" /> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="150" /> |
| | | <el-table-column prop="totalquantity" align="center" :label="$t('reportWork.totalquantity')" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" /> |
| | | <el-table-column prop="layer" align="center" label="层数" min-width="120" /> |
| | | <el-table-column prop="otherNumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="artificialnumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" /> |
| | | <el-table-column |
| | |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | |
| | | <el-tag :type="getTagType(scope.row.enableState)" @click="toggleStatus(scope.row)"> |
| | | {{ scope.row.enableState === 1 ? $t('reportWork.enable') : $t('reportWork.unenable') }} |
| | | </el-tag> |
| | | <el-tag type="success" >{{ scope.row.enableState==1? $t('reportWork.enable') : $t('reportWork.unenable')}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="200"> |
| | |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | | flowCardId: '183.6', |
| | | totalquantity: '1991', |
| | | racksnumber:"1", |
| | | work_state: '待识别', --> |
| | | <div style="display: flex;" class="awatch"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" :title="$t('reportWork.bindingshelves')"> |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisiblea2" top="21vh" width="30%" :title="$t('reportWork.clearglass')"> |
| | | |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleclear"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | | flowCardId: '183.6', |
| | | totalquantity: '1991', |
| | | racksnumber:"1", |
| | | work_state: '待识别', --> |
| | | </div> |
| | | <div style="display: flex;"> |
| | | <div id="main-body"> |
| | | <Landingindication></Landingindication> |
| | | </div> |
| | | <div id="main-bodya"> |
| | | <Landingindicationtwo></Landingindicationtwo> |
| | | </div></div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | background-color: #337ecc; |
| | | margin-left: 28%; |
| | | } |
| | | #awatch{ |
| | | height: 450px; |
| | | .awatch{ |
| | | max-width: 100%; |
| | | } |
| | | #main-body{ |
| | | margin-top: -20px; |
| | | margin-left: 200px; |
| | | margin-top: -40px; |
| | | margin-left: 150px; |
| | | } |
| | | #main-bodya{ |
| | | margin-top: -10px; |
| | | margin-top: -40px; |
| | | margin-left: 100px; |
| | | } |
| | | </style> |
| | |
| | | </el-table> |
| | | </div> |
| | | <div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;"> |
| | | <img src="../../assets/d1.png" alt="" style="margin-left: -30px; width: 110%;height: 100%;position: relative;"> |
| | | <img src="../../assets/d1a.png" alt="" style="margin-left: -10px; width: 100%;height: 100%;position: relative;"> |
| | | </div> |
| | | <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;"> |
| | | <el-table height="240" ref="table" width="340px" |
| | |
| | | package com.mes.glassinfo.service; |
| | | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId,int layer); |
| | | int getGlassInfoCountByFlowCardId(String flowCardId, int layer); |
| | | |
| | | /** |
| | | * @return |
| | | * 查询所有工程状态不为300不同流程卡号 |
| | | * @return 查询所有工程状态不为300不同流程卡号 |
| | | */ |
| | | List<Map<String, Object>> getFlowCardId(); |
| | | |
| | |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class GlassInfoServiceImpl extends MPJBaseServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService { |
| | | @Autowired |
| | | @Resource |
| | | OptimizeProjectMapper optimizeProjectMapper; |
| | | |
| | | @Override |
| | |
| | | optimizeGlassinfos = optimizeProjectMapper.selectJoinList(OptimizeGlassinfo.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("b.process_id,t.glass_type,b.o_width,b.o_height,t.glass_thickness,b.order_sort,b.p_width,b.p_height,b.layer, b.total_layer, b.stock_id,b.heat_layout_id,b.heat_layout_sort,c.x_axis,c.y_axis,b.project_no,b.glass_id,c.rotate_angle") |
| | | .leftJoin("optimize_detail b on t.project_no=b.project_no") |
| | | .leftJoin("optimize_heat_detail c on c.project_no=t.project_no and b.heat_layout_id=c.layout_id and b.heat_layout_sort=c.sort") |
| | | .leftJoin("optimize_heat_detail c on c.project_no=t.project_no and b.heat_layout_id=c.layout_id and b.heat_layout_sort=c.sort") |
| | | //.eq("t.state",100) |
| | | .eq("t.project_no", engineeringId)); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId, int layer) { |
| | | return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getFlowCardId, flowCardId) |
| | | .eq(GlassInfo::getLayer, layer)); |
| | |
| | | List<Map<String, Object>> result = glassInfos.stream() |
| | | .map(glassInfo -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()+" | "+glassInfo.getLayer()); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId() + " | " + glassInfo.getLayer()); |
| | | // 如果还有其他字段需要添加到 map 中,在这里继续添加 |
| | | return map; |
| | | }) |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("pp") |
| | | @Mapper |
| | | public interface OptimizeDetailMapper extends MPJBaseMapper<OptimizeDetail> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("pp") |
| | | @Mapper |
| | | public interface OptimizeLayoutMapper extends MPJBaseMapper<OptimizeLayout> { |
| | | |
| | | } |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | @DS("pp") |
| | | public interface OptimizeProjectMapper extends MPJBaseMapper<OptimizeProject> { |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | |
| | | public interface SysMenuMapper extends MPJBaseMapper<SysMenu> { |
| | | |
| | | List<String> selectPermsByUserId(long parseLong); |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.role.entity.SysRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | public interface SysRoleMapper extends MPJBaseMapper<SysRole> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | |
| | | public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | |
| | | public interface SysUserMapper extends MPJBaseMapper<SysUser> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | |
| | | public interface SysUserRoleMapper extends MPJBaseMapper<SysUserRole> { |
| | | |
| | | } |
| | |
| | | */ |
| | | EdgStorageCage selectNearestEmpty(int currentSlot, boolean flag); |
| | | |
| | | /** |
| | | * 查询笼内空格 |
| | | * @return |
| | | */ |
| | | List<EdgStorageCage> selectCacheEmpty(); |
| | | |
| | | /** |
| | | * 查询笼内出片顺序详情 |
| | |
| | | |
| | | /** |
| | | * 修改理片笼信息 |
| | | * |
| | | * @param edgStorageCage |
| | | * @return |
| | | */ |
| | | boolean updateEdgStorageCage(EdgStorageCage edgStorageCage); |
| | | |
| | | /** |
| | | * 更新理片笼详情信息 |
| | | * |
| | | * @param edgStorageCageId |
| | | * @param edgStorageCageDetails |
| | | * @return |
| | | */ |
| | | boolean updateEdgStorageCageDetails(int edgStorageCageId, EdgStorageCageDetails edgStorageCageDetails); |
| | | |
| | | } |
| | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service |
| | | public class EdgStorageCageServiceImpl extends MPJBaseServiceImpl<EdgStorageCageMapper, EdgStorageCage> implements EdgStorageCageService { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | @Autowired |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | |
| | | @Override |
| | |
| | | .eq(EdgStorageCageDetails::getSlot, EdgStorageCage::getSlot) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)) |
| | | .isNull(EdgStorageCageDetails::getSlot) |
| | | .eq(EdgStorageCage::getEnableState, Const.SLOT_ON) |
| | | .last("order by abs(t.slot - " + currentSlot + ") asc limit 2") |
| | | ); |
| | | if (flag && CollectionUtil.isNotEmpty(emptyList)) { |
| | |
| | | return null; |
| | | } |
| | | return emptyList.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 查询笼内空格 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<EdgStorageCage> selectCacheEmpty() { |
| | | return baseMapper.selectJoinList(EdgStorageCage.class, new MPJLambdaWrapper<EdgStorageCage>() |
| | | .selectAll(EdgStorageCage.class) |
| | | .leftJoin(EdgStorageCageDetails.class, on -> on |
| | | .eq(EdgStorageCageDetails::getSlot, EdgStorageCage::getSlot) |
| | | .eq(EdgStorageCageDetails::getState, "100")) |
| | | .isNull(EdgStorageCageDetails::getSlot) |
| | | .last("order by abs(t.slot - 4) asc") |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.device.PlcParameterObject; |
| | |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("本次任务结束时间:{},共耗时:{}ms", endDate, endDate.getTime() - startDate.getTime()); |
| | | } |
| | | |
| | | public void plcToHomeEdgTask() { |
| | | // log.info("推数据"); |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | | // ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home"); |
| | | // if (sendwServer != null) { |
| | | // for (WebSocketServer webserver : sendwServer) { |
| | | // webserver.sendMessage(jsonObject.toString()); |
| | | // if (webserver != null) { |
| | | // |
| | | // List<String> messages = webserver.getMessages(); |
| | | // |
| | | // if (!messages.isEmpty()) { |
| | | // // // 将最后一个消息转换为整数类型的列表 |
| | | // webserver.clearMessages(); |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | MPJQueryWrapper<EdgStorageCageDetails> wrapper = new MPJQueryWrapper<>(); |
| | | wrapper.select("count(t.glass_id), t.width, t.height") |
| | | .eq("t.state", Const.GLASS_STATE_IN) |
| | | .inSql("t.slot", "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON) |
| | | .groupBy("t.width, t.height"); |
| | | if (endcell == Const.A10_OUT_TARGET_POSITION) { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | |
| | | glassList.add(resultDetails); |
| | | } |
| | | //获取笼内玻璃 |
| | | List<EdgStorageCageDetails> details = edgStorageCageDetailsService.list(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | List<EdgStorageCageDetails> details = edgStorageCageDetailsService.selectJoinList(EdgStorageCageDetails.class, new MPJLambdaWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | .leftJoin(EdgStorageCage.class, on -> on.eq(EdgStorageCage::getSlot, EdgStorageCageDetails::getSlot).eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN)) |
| | | .eq(EdgStorageCage::getEnableState, Const.SLOT_ON)); |
| | | glassList.addAll(details); |
| | | return glassList; |
| | | |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | private boolean queryMaxMinDiff(int threshold) { |
| | | public boolean queryMaxMinDiff(int threshold) { |
| | | //获取笼子内最大版图id和最小版图id插值,判断是否大于阈值,大于阈值直接出最小版图玻璃 |
| | | QueryWrapper<EdgStorageCageDetails> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("max(tempering_layout_id)-min(tempering_layout_id) as diff") |
| | | .eq("state", Const.GLASS_STATE_IN); |
| | | .eq("state", Const.GLASS_STATE_IN) |
| | | .inSql("slot", "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON); |
| | | List<Object> list = edgStorageCageDetailsService.listObjs(queryWrapper); |
| | | //获取笼内玻璃版图差值是否大于阈值 |
| | | if (CollectionUtil.isNotEmpty(list)) { |
| | | Long diff = (Long) list.get(0); |
| | | int diff = (int) list.get(0); |
| | | return diff > threshold; |
| | | } else { |
| | | return Boolean.FALSE; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | .eq(EdgStorageCageDetails::getState, 100) |
| | | .eq(width != 0, EdgStorageCageDetails::getWidth, width) |
| | | .eq(height != 0, EdgStorageCageDetails::getHeight, height) |
| | | .inSql(EdgStorageCageDetails::getSlot, "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON) |
| | | .orderByAsc(EdgStorageCageDetails::getTemperingLayoutId) |
| | | .orderBy(Boolean.TRUE, sequenceOrder, EdgStorageCageDetails::getTemperingFeedSequence) |
| | | .last("limit 1")); |
| | |
| | | .eq("t.glass_id", taskCache.getGlassId()) |
| | | .ne("t1.glass_id", taskCache.getGlassId()) |
| | | .eq("t1.state", Const.GLASS_STATE_IN) |
| | | .inSql("t1.slot", "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON) |
| | | .orderByAsc("t1.tempering_layout_id") |
| | | .orderBy(Boolean.TRUE, sequenceOrder, "t1.tempering_feed_sequence"); |
| | | List<EdgStorageCageDetails> details = edgStorageCageDetailsService.selectJoinList(EdgStorageCageDetails.class, mpjLambdaWrapper); |
| | |
| | | return null; |
| | | } |
| | | return edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getGlassId, taskCache.getGlassId()) |
| | | // .inSql(EdgStorageCageDetails::getEngineerId, "select engineer_id from engineering where state = 1") |
| | | .inSql(EdgStorageCageDetails::getSlot, "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON) |
| | | .last(" limit 1 ")); |
| | | } |
| | | |
| | |
| | | MPJQueryWrapper<EdgStorageCageDetails> wrapper = new MPJQueryWrapper<>(); |
| | | wrapper.select("count(t.glass_id) as count, t.width, t.height") |
| | | .eq("t.state", Const.GLASS_STATE_IN) |
| | | .inSql("t.slot", "select slot from edg_storage_cage where enable_state = " + Const.SLOT_ON) |
| | | .groupBy("t.width, t.height"); |
| | | if (endcell == Const.A10_OUT_TARGET_POSITION) { |
| | | wrapper.innerJoin("(select glass_id, case when height <= width then width else height end as first_length, " + |
| | |
| | | private Integer slot; |
| | | |
| | | /** |
| | | * 启用状态 |
| | | * 栅格号 |
| | | */ |
| | | @ApiModelProperty(value = "最大厚度", position = 5) |
| | | private Integer maxThickness; |
| | | |
| | | /** |
| | | * 剩余宽度 |
| | | */ |
| | | @ApiModelProperty(value = "最小厚度", position = 6) |
| | | @ApiModelProperty(value = "最小厚度", position = 5) |
| | | private Integer minThickness; |
| | | /** |
| | | * 栅格号 |
| | | */ |
| | | @ApiModelProperty(value = "最大厚度", position = 6) |
| | | private Integer maxThickness; |
| | | |
| | | /** |
| | | * 启用状态 |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | TemperingLayoutDTO temperingIsAll(); |
| | | List<TemperingLayoutDTO> temperingIsAll(); |
| | | |
| | | /** |
| | | * 获取每个钢化版图占用的格子数量 |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | TemperingLayoutDTO temperingIsAll(); |
| | | List<TemperingLayoutDTO> temperingIsAll(); |
| | | |
| | | /** |
| | | * 获取每个钢化版图占用的格子数量 |
| | |
| | | .lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT) |
| | | .isNull(BigStorageCageFeedTask::getTargetSlot); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskNoTargetList = bigStorageCageFeedTaskMapper.selectList(feedTaskNoTargetWrapper); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask:bigStorageCageFeedTaskNoTargetList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask : bigStorageCageFeedTaskNoTargetList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>(); |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId,bigStorageCageFeedTask.getGlassId()); |
| | | GlassInfo glassInfo= glassInfoMapper.selectOne(glassInfoWrapper); |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId, bigStorageCageFeedTask.getGlassId()); |
| | | GlassInfo glassInfo = glassInfoMapper.selectOne(glassInfoWrapper); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setBigStorageCageFeedTask(bigStorageCageFeedTask); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | |
| | | bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | return bigStorageDTO; |
| | | } |
| | | //todo:获取玻璃的厚度:重新选笼子需要按照笼子可放玻璃厚度进行选择 |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .gt(BigStorageCage::getMaxThickness, glassInfo.getThickness()) |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | | .last("limit 1")); |
| | | Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃"); |
| | | bigStorageDTO = new BigStorageDTO(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public TemperingLayoutDTO temperingIsAll() { |
| | | public List<TemperingLayoutDTO> temperingIsAll() { |
| | | return baseMapper.temperingIsAll(); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | //钢化优先:获取理片笼 玻璃小片 破损表 数量 判断笼内版图是否到齐 |
| | | TemperingLayoutDTO temperingLayoutDTO = bigStorageCageDetailsService.temperingIsAll(); |
| | | if (null != temperingLayoutDTO) { |
| | | //玻璃到齐 |
| | | List<TemperingLayoutDTO> temperingLayoutDTOList = bigStorageCageDetailsService.temperingIsAll(); |
| | | if (CollectionUtils.isNotEmpty(temperingLayoutDTOList)) { |
| | | //玻璃到齐包括已出片的 |
| | | //到齐,将玻璃小片数据存入钢化小片表,逻辑生成出片任务 结束 |
| | | List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) |
| | | .selectAll(GlassInfo.class) |
| | | .select("-1 as state") |
| | | .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) |
| | | .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(GlassInfo::getTemperingLayoutId, temperingLayoutDTO.getTemperingLayoutId()) |
| | | .eq(GlassInfo::getEngineerId, temperingLayoutDTO.getEngineerId())); |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | for (TemperingLayoutDTO item : temperingLayoutDTOList) { |
| | | List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) |
| | | .selectAll(GlassInfo.class) |
| | | .select("-1 as state") |
| | | .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) |
| | | .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(GlassInfo::getTemperingLayoutId, item.getTemperingLayoutId()) |
| | | .eq(GlassInfo::getEngineerId, item.getEngineerId())); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼出片任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | //未到齐 执行内部调度任务 |
| | | TemperingLayoutDTO temperingOccupySlot = bigStorageCageDetailsService.queryTemperingOccupySlot(); |
| | |
| | | Boolean flag = Boolean.TRUE; |
| | | //2、获取卧转立 |
| | | Integer widthFirst = Math.max(edgGlassTaskInfoList.get(0).getWidth() / 10, edgGlassTaskInfoList.get(0).getHeight() / 10); |
| | | Integer heightFirst = Math.min(edgGlassTaskInfoList.get(0).getWidth() / 10, edgGlassTaskInfoList.get(0).getHeight() / 10); |
| | | if (edgGlassTaskInfoList.size() == 1) { |
| | | if (remainWidth >= widthFirst) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); |
| | | } |
| | | } else { |
| | | flag = Boolean.FALSE; |
| | | } |
| | | } else { |
| | | Integer widthSecond = Math.max(edgGlassTaskInfoList.get(1).getWidth() / 10, edgGlassTaskInfoList.get(1).getHeight() / 10); |
| | | Integer heightSecond = Math.min(edgGlassTaskInfoList.get(1).getWidth() / 10, edgGlassTaskInfoList.get(1).getHeight() / 10); |
| | | if (remainWidth >= widthFirst) { |
| | | if (remainWidth - widthFirst - glassGap >= widthSecond) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightSecond); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); |
| | | } |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); |
| | | } |
| | | } else { |
| | | flag = Boolean.FALSE; |
| | |
| | | /** |
| | | * 添加任务信息 |
| | | */ |
| | | private Boolean addFeedTask(String glassId, Integer line, Integer taskType, Integer width) { |
| | | private Boolean addFeedTask(String glassId, Integer line, Integer taskType, Integer width, Integer height) { |
| | | BigStorageCageFeedTask bigStorageCageFeedTask = new BigStorageCageFeedTask(); |
| | | bigStorageCageFeedTask.setGlassId(glassId); |
| | | bigStorageCageFeedTask.setTaskState(Const.BIG_STORAGE_IN_NEW); |
| | | bigStorageCageFeedTask.setLine(line); |
| | | bigStorageCageFeedTask.setTaskType(taskType); |
| | | bigStorageCageFeedTask.setWidth(width); |
| | | bigStorageCageFeedTask.setHeight(height); |
| | | bigStorageCageFeedTask.setCreateTime(new Date()); |
| | | return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask); |
| | | } |
| | |
| | | public Boolean computeIsRun(int line, String glassId) { |
| | | //获取卧转立剩余宽度 |
| | | BigStorageDTO sitToUpRemainWidth = bigStorageCageFeedTaskService.querySitToUpRemainWidth(line); |
| | | if (sitToUpRemainWidth.getGlassCount() == 0) { |
| | | return Boolean.FALSE; |
| | | } |
| | | //获取玻璃信息 |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId)); |
| | | return sitToUpRemainWidth.getWidth() < glassInfo.getWidth(); |
| | |
| | | |
| | | @Override |
| | | public boolean saveBatch(List<TemperingGlassInfo> list) { |
| | | log.info("需要钢化的玻璃为:{}", list); |
| | | return baseMapper.saveBatch(list); |
| | | } |
| | | |
| | |
| | | WHERE STATE in (100, 101, 102) |
| | | GROUP BY ENGINEER_ID, TEMPERING_LAYOUT_ID) T3 ON T2.ENGINEER_ID = T3.ENGINEER_ID |
| | | AND T2.TEMPERING_LAYOUT_ID = T3.TEMPERING_LAYOUT_ID |
| | | AND T2.COUNT = T3.COUNT LIMIT 1 |
| | | AND T2.COUNT = T3.COUNT |
| | | </select> |
| | | |
| | | <select id="queryTemperingOccupySlot" resultMap="temperingLayoutDTO"> |
| | |
| | | ELSE HEIGHT |
| | | END MAX_LENGTH |
| | | FROM BIG_STORAGE_CAGE_FEED_TASK |
| | | WHERE LINE = 2002 |
| | | WHERE LINE = #{line} |
| | | AND TASK_STATE IN (1, 2) |
| | | ) T |
| | | </select> |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Autowired |
| | | BigStorageCageFeedTaskMapper bigStorageCageFeedTaskMapper; |
| | | |
| | | @Test |
| | | public void testInsertSlot() { |
| | | List<BigStorageCage> list = new ArrayList(); |
| | | for (int j = 1; j <= 5; j++) { |
| | | for (int i = 1 + (55 * (j - 1)); i <= 55 * j; i++) { |
| | | BigStorageCage cage = new BigStorageCage(); |
| | | cage.setDeviceId(j); |
| | | cage.setSlot(i); |
| | | cage.setMinThickness(4); |
| | | cage.setMaxThickness(6); |
| | | cage.setEnableState(1); |
| | | cage.setRemainWidth(5000); |
| | | list.add(cage); |
| | | } |
| | | } |
| | | for (int i = 276; i <= 300; i++) { |
| | | BigStorageCage cage = new BigStorageCage(); |
| | | cage.setDeviceId(6); |
| | | cage.setSlot(i); |
| | | cage.setMinThickness(8); |
| | | cage.setMaxThickness(12); |
| | | cage.setEnableState(1); |
| | | cage.setRemainWidth(5000); |
| | | list.add(cage); |
| | | } |
| | | for (int i = 301; i <= 330; i++) { |
| | | BigStorageCage cage = new BigStorageCage(); |
| | | cage.setDeviceId(7); |
| | | cage.setSlot(i); |
| | | cage.setMinThickness(8); |
| | | cage.setMaxThickness(12); |
| | | cage.setEnableState(1); |
| | | cage.setRemainWidth(5000); |
| | | list.add(cage); |
| | | } |
| | | for (int i = 331; i <= 355; i++) { |
| | | BigStorageCage cage = new BigStorageCage(); |
| | | cage.setDeviceId(8); |
| | | cage.setSlot(i); |
| | | cage.setMinThickness(8); |
| | | cage.setMaxThickness(12); |
| | | cage.setEnableState(1); |
| | | cage.setRemainWidth(5000); |
| | | list.add(cage); |
| | | } |
| | | for (int i = 356; i <= 380; i++) { |
| | | BigStorageCage cage = new BigStorageCage(); |
| | | cage.setDeviceId(9); |
| | | cage.setSlot(i); |
| | | cage.setMinThickness(15); |
| | | cage.setMaxThickness(19); |
| | | cage.setEnableState(1); |
| | | cage.setRemainWidth(5000); |
| | | list.add(cage); |
| | | } |
| | | bigStorageCageService.saveBatch(list); |
| | | } |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | |
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | |
|
| | | public interface LoadPositionMapper extends BaseMapper<LoadPosition> {
|
| | |
|
| | | } |
| | |
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | |
|
| | | public interface RawUsageMapper extends BaseMapper<RawUsage> {
|
| | |
|
| | | } |
| | |
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | |
|
| | | public interface ShelfRackMapper extends BaseMapper<ShelfRack> {
|
| | |
|
| | | } |
| | |
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | |
|
| | | public interface StorageTaskMapper extends BaseMapper<StorageTask> {
|
| | |
|
| | | } |
| | |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | |
| | | public interface DownStorageCageDetailsMapper extends MPJBaseMapper<DownStorageCageDetails> { |
| | | |
| | | DownStorageCageDetails getGlassInfoMaxCount(); |
| | |
| | | .eq(DownStorageCageDetails::getSlot, DownStorageCage::getSlot) |
| | | .eq(DownStorageCageDetails::getState, Const.GLASS_STATE_IN)) |
| | | .isNull(DownStorageCageDetails::getSlot) |
| | | .eq(DownStorageCage::getEnableState, Const.SLOT_ON) |
| | | .last("order by abs(t.slot - " + currentSlot + ") asc limit 2") |
| | | ); |
| | | if (flag && CollectionUtil.isNotEmpty(emptyList)) { |
| | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | |
| | | |
| | | @Repository |
| | | @InterceptorIgnore(tenantLine = "true") |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | |
| | | @DS("salve_hangzhoumes") |
| | | @Mapper |
| | | |
| | | public interface DownWorkstationTaskMapper extends BaseMapper<DownWorkstationTask> { |
| | | |
| | | List<DownWorkstationTask> selectList(); |
| | |
| | | if (CollectionUtils.isNotEmpty(workList)) { |
| | | List<DownWorkstation> downWorkstationList = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getEnableState, Const.SLOT_ON).in(DownWorkstation::getWorkstationId, workList)); |
| | | log.info("架子被禁用,无法出片落架"); |
| | | // log.info("架子被禁用,无法出片落架"); |
| | | if (CollectionUtils.isEmpty(downWorkstationList)) { |
| | | log.info("笼子被禁用,无法走机械臂下片"); |
| | | //走人工下片 |
| | |
| | | //生成任务信息 |
| | | DownGlassInfo downGlassInfo = new DownGlassInfo(); |
| | | BeanUtils.copyProperties(downStorageCageDetails, downGlassInfo); |
| | | //todo:落架片序 |
| | | downGlassInfoService.save(downGlassInfo); |
| | | //生成任务信息 |
| | | GlassInfo glassInfo = new GlassInfo(); |