| | |
| | | </el-table-column>
|
| | |
|
| | | <!-- 操作列 -->
|
| | | <el-table-column label="操作" width="350">
|
| | | <el-table-column label="操作" width="250">
|
| | | <template #default="{ row }">
|
| | | <el-button type="primary" size="mini" @click="edithandleRowClick(row)">修改</el-button>
|
| | | <el-button type="danger" size="mini" @click="handleDelete(row)">删除</el-button>
|
| | | <el-button type="warning" size="mini" @click="handleCheckout(row)">出库</el-button>
|
| | | <el-button type="success" size="mini" @click="addglass()">添加原片</el-button>
|
| | | <!-- <el-button type="success" size="mini" @click="addglass()">添加原片</el-button> -->
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | |
|
| | | <el-table
|
| | | |
| | | </el-dialog>
|
| | |
|
| | |
|
| | | <el-table
|
| | | :data="tasktableData"
|
| | | style="width: 98%; height: 150px"
|
| | | @selection-change="handleSelectionChange"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </el-dialog>
|
| | | </el-card>
|
| | |
|
| | | <!-- <div ref="chart" id="chart" style="width: 100%; height: 250px;"></div> -->
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | <div class="img-ypcc" >
|
| | |
|
| | |
|
| | | <div class="img-car1" :style="'z-index:999;left:297px;top:158px;position:absolute;'">
|
| | | <div class="img-car1" :style="'z-index:999;left:397px;top:205px;position:absolute;'">
|
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
|
| | | </div>
|
| | |
|
| | |
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="formData.wid" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | <el-input v-model="formData.width" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="formData.heig" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | <el-input v-model="formData.height" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="formData.thinkness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | <el-input v-model="formData.thickness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="数量">
|
| | | <el-input-number v-model="formData.num" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | <el-input-number v-model="formData.quantity" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | |
| | | </el-form-item>
|
| | | <el-form-item label="批次号">
|
| | | <el-input v-model="editForm.batchnumber"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="editForm.length"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="editForm.height"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="editForm.thickness"></el-input>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; // 导入 Vue 3 的模块
|
| | | import * as echarts from 'echarts';
|
| | | import { ElMessage, ElMessageBox } from 'element-plus'
|
| | | import {tableData} from '@/stores/tableData.js';
|
| | |
|
| | |
|
| | |
|
| | | const loading = ref(false);
|
| | | const tableData = ref([
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | | |
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | |
| | | const editdialogVisible = ref(false);
|
| | | const editForm = ref({
|
| | | quantity: '',
|
| | | batchnumber: ''
|
| | | batchnumber: '',
|
| | | length:'',
|
| | | height:'',
|
| | | thickness:''
|
| | | });
|
| | | const editFormRef = ref(null);
|
| | | let currentRow = ref(null);
|
| | |
| | | // 处理行点击事件
|
| | | const edithandleRowClick = (row) => {
|
| | | currentRow.value = row;
|
| | | console.log(row)
|
| | | editForm.value.quantity = row.quantity.toString();
|
| | | editForm.value.batchnumber = row.batchnumber;
|
| | | editForm.value.length = row.length;
|
| | | editForm.value.height = row.height;
|
| | | editForm.value.thickness = row.thickness;
|
| | | editdialogVisible.value = true;
|
| | | console.log(editForm.value)
|
| | | };
|
| | |
| | | const edithandleDialogClose = () => {
|
| | | editForm.value.quantity = '';
|
| | | editForm.value.batchnumber = '';
|
| | | editForm.value.width = '';
|
| | | editForm.value.height = '';
|
| | | editForm.value.thickness = '';
|
| | | |
| | |
|
| | | currentRow.value = null;
|
| | | };
|
| | |
|
| | |
| | | background-image:url('../../assets/ypcc.png');
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 800px;
|
| | | width: 1600px;
|
| | | min-height: 600px;
|
| | | width: 1400px;
|
| | | max-width: 100%;
|
| | | background-size: 1400px 800px;
|
| | | background-size: 1400px 600px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | position:relative;
|
| | | margin-top:0px
|
| | | }
|
| | |
|
| | | .img-car1{
|
| | |
| | | position: absolute;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 200px;
|
| | | min-height: 400px;
|
| | | width: 200px;
|
| | | max-width: 100%;
|
| | | background-size: 200px 70px;
|
| | | background-size: 200px 170px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | }
|
| | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | // import LanguageMixin from './lang/LanguageMixin' |
| | | const selectedProjectNoa = ref(''); // 当前选中的角色 |
| | | const selectedProjectNoa = ref(null); // 当前选中的角色 |
| | | // const options = ref<any[]>([]); // 下拉选项列表 |
| | | const name = ref(''); |
| | | const tableData = ref([]) |
| | |
| | | console.error('Error fetching options:', error); |
| | | } |
| | | }; |
| | | // 添加 |
| | | // 添加 |
| | | const getTableRow = async () => { |
| | | try { |
| | | let menuList = []; |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | }); |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | const dataToSend = { |
| | | name: name.value, |
| | | menuList: menuList |
| | |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 处理编辑按钮点击 |
| | | function handleEdit(row) { |
| | | name.value = row.name; |
| | | selectedOptions.value = row.selectedOptions |
| | | // options.value = res.data.tree |
| | | adda.value = true; // 显示对话框 |
| | | window.localStorage.setItem('id', row.id) |
| | | name.value = row.name; |
| | | adda.value = true; |
| | | window.localStorage.setItem('ids', row.id); |
| | | const parentIdMap = {}; |
| | | const menuItemsById = {}; // 快速查找菜单项 |
| | | let topLevelItems = []; // 存储顶级菜单项 |
| | | row.menuList.forEach(item => { |
| | | const parentId = item.parentId === 0 ? null : item.parentId; |
| | | const menuItem = { |
| | | id: item.id, |
| | | parentId: parentId, |
| | | menuName: item.menuName, |
| | | children: [] |
| | | }; |
| | | menuItemsById[item.id] = menuItem; |
| | | // 初始化或更新parentIdMap中的数组 |
| | | if (!parentIdMap[parentId]) { |
| | | parentIdMap[parentId] = []; |
| | | } |
| | | if (parentId === null) { |
| | | // 顶级菜单项直接添加到topLevelItems |
| | | topLevelItems.push(menuItem); |
| | | } else { |
| | | // 非顶级菜单项添加到parentIdMap中 |
| | | parentIdMap[parentId].push(menuItem); |
| | | } |
| | | }); |
| | | for (const parentId in parentIdMap) { |
| | | if (parentId !== 'null') { // 跳过顶级菜单项 |
| | | parentIdMap[parentId].forEach(child => { |
| | | // 查找父项并添加子项 |
| | | if (menuItemsById[parentId]) { |
| | | menuItemsById[parentId].children.push(child); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | if (selectedOptions.value !== topLevelItems) { |
| | | selectedOptions.value = topLevelItems; |
| | | } |
| | | |
| | | const topLevelItemsWithChildren = topLevelItems; // 包含顶级菜单项及其子菜单项的数组 |
| | | let selectedPath = []; |
| | | |
| | | // 循环遍历 topLevelItemsWithChildren 数组 |
| | | for (let i = 0; i < topLevelItemsWithChildren.length; i++) { |
| | | // 添加顶级菜单项的 id |
| | | selectedPath.push(topLevelItemsWithChildren[i].id); |
| | | |
| | | // 遍历该顶级菜单项的子菜单项 |
| | | if (topLevelItemsWithChildren[i].children && topLevelItemsWithChildren[i].children.length > 0) { |
| | | for (let j = 0; j < topLevelItemsWithChildren[i].children.length; j++) { |
| | | // 添加每个子菜单项的 id |
| | | selectedPath.push(topLevelItemsWithChildren[i].children[j].id); |
| | | } |
| | | } |
| | | } |
| | | |
| | | console.log(selectedPath); |
| | | selectedOptions.value = selectedPath; |
| | | } |
| | | // function handleEdit(row) { |
| | | // name.value = row.name; |
| | | // adda.value = true; |
| | | // window.localStorage.setItem('ids', row.id); |
| | | // // 构建菜单树 |
| | | // const buildMenuTree = (menuList) => { |
| | | // const parentIdMap = {}; |
| | | // const menuItemsById = {}; |
| | | // menuList.forEach(item => { |
| | | // const parentId = item.parentId === 0 ? null : item.parentId; |
| | | // const menuItem = { |
| | | // id: item.id, |
| | | // parentId: parentId, |
| | | // menuName: item.menuName, |
| | | // children: [] |
| | | // }; |
| | | // menuItemsById[item.id] = menuItem; |
| | | |
| | | // if (!parentIdMap[parentId]) { |
| | | // parentIdMap[parentId] = []; |
| | | // } |
| | | // parentIdMap[parentId].push(menuItem); |
| | | // }); |
| | | // // 构建父子关系 |
| | | // for (const parentId in parentIdMap) { |
| | | // if (parentId !== 'null') { |
| | | // parentIdMap[parentId].forEach(child => { |
| | | // if (menuItemsById[parentId]) { |
| | | // menuItemsById[parentId].children.push(child); |
| | | // } |
| | | // }); |
| | | // } |
| | | // } |
| | | // return parentIdMap[null] || []; |
| | | // }; |
| | | // const options = buildMenuTree(row.menuList); |
| | | // const selectedIds = row.menuList.filter(item => item.parentId === 0).map(item => item.id); |
| | | // selectedOptions.value = selectedIds; |
| | | // console.log(options); // 输出整个菜单树 |
| | | // console.log(selectedIds); // 输出应默认选中的节点ID数组 |
| | | // } |
| | | // function handleEdit(row) { |
| | | // name.value = row.name; |
| | | // adda.value = true; |
| | | // window.localStorage.setItem('ids', row.id); |
| | | // // 初始化 parentIdMap 和 menuItemsById |
| | | // const parentIdMap = {}; |
| | | // const menuItemsById = {}; |
| | | // let topLevelItems = []; |
| | | |
| | | // // 构建树形结构 |
| | | // row.menuList.forEach(item => { |
| | | // const parentId = item.parentId === 0 ? null : item.parentId; |
| | | // const menuItem = { |
| | | // id: item.id, |
| | | // parentId: parentId, |
| | | // label: item.menuName, // 注意:el-cascader 使用 label 而不是 menuName |
| | | // value: item.id, // 通常 value 是唯一标识符 |
| | | // children: [] |
| | | // }; |
| | | // menuItemsById[item.id] = menuItem; |
| | | |
| | | // if (!parentIdMap[parentId]) { |
| | | // parentIdMap[parentId] = []; |
| | | // } |
| | | |
| | | // if (parentId === null) { |
| | | // topLevelItems.push(menuItem); |
| | | // } else { |
| | | // parentIdMap[parentId].push(menuItem); |
| | | // } |
| | | // }); |
| | | |
| | | // // 构建父子关系 |
| | | // for (const parentId in parentIdMap) { |
| | | // if (parentId !== 'null') { |
| | | // parentIdMap[parentId].forEach(child => { |
| | | // if (menuItemsById[parentId]) { |
| | | // menuItemsById[parentId].children.push(child); |
| | | // } |
| | | // }); |
| | | // } |
| | | // } |
| | | |
| | | // // 设置 options |
| | | // options.value = topLevelItems; |
| | | |
| | | // // 构建 selectedOptions |
| | | // let selected = []; |
| | | // // 假设你想选中所有节点,你可以遍历 row.menuList 并构建路径 |
| | | // row.menuList.forEach(item => { |
| | | // let path = []; |
| | | // let currentParentId = item.parentId; |
| | | // while (currentParentId !== null) { |
| | | // const parentItem = menuItemsById[currentParentId]; |
| | | // if (parentItem) { |
| | | // path.unshift(parentItem.value); // 从父节点到子节点 |
| | | // currentParentId = parentItem.parentId; |
| | | // } else { |
| | | // break; // 如果找不到父节点,则停止 |
| | | // } |
| | | // } |
| | | // // 添加当前节点的 ID 到路径末尾 |
| | | // path.push(item.id); |
| | | // // 如果路径不为空,则添加到 selectedOptions |
| | | // if (path.length > 0) { |
| | | // selected.push(path); |
| | | // } |
| | | // }); |
| | | |
| | | // // 更新 selectedOptions |
| | | // selectedOptions.value = selected; |
| | | // console.log(selected); |
| | | // console.log(topLevelItems); |
| | | // // 注意:确保 selectedOptions 和 options 是响应式的 |
| | | // } |
| | | // 编辑 |
| | | const getTableRowa = async () => { |
| | | let id = window.localStorage.getItem('id') |
| | | let ids = window.localStorage.getItem('ids') |
| | | try { |
| | | let menuList = []; |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, |
| | | children: [ |
| | | { |
| | | id: parentId, |
| | | parentId: id, |
| | | } |
| | | ], |
| | | }); |
| | | let parentIdMap = {}; // 用于存储已经添加的父项 |
| | | selectedOptions.value.forEach(array => { |
| | | if (array.length >= 2) { |
| | | let id = array[0]; |
| | | let parentId = array[1]; |
| | | // 如果id还未作为父项添加,则添加它 |
| | | if (!parentIdMap[id]) { |
| | | menuList.push({ |
| | | id: id, |
| | | parentId: 0, // 通常,顶级项的parentId可能是null或特定的根ID,这里设为0可能是个特殊用途 |
| | | children: [] |
| | | }); |
| | | parentIdMap[id] = menuList[menuList.length - 1]; // 更新映射 |
| | | } |
| | | // 向对应的父项添加子项 |
| | | if (!parentIdMap[id].children.some(child => child.id === parentId)) { |
| | | // 检查是否已存在相同的子项(基于id),避免重复添加 |
| | | parentIdMap[id].children.push({ |
| | | id: parentId, |
| | | parentId: id |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | const dataToSend = { |
| | | id:id, |
| | | id:ids, |
| | | name: name.value, |
| | | menuList: menuList |
| | | }; |
| | | const response = await request.post('/loadGlass/sys/role/updateRole', dataToSend); |
| | | // try { |
| | | // const response = await request.post('/loadGlass/sys/role/updateRole', { |
| | | // id: id, |
| | | // name: name.value, |
| | | // }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | adda.value = false; |
| | | name.value = ''; |
| | | selectedOptions.value = ''; |
| | | fetchOptionsa() |
| | | tableData.value = response.data; |
| | | selectedOptions.value = ''; |
| | | fetchOptionsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId); |
| | | int getGlassInfoCountByFlowCardId(String flowCardId,int layer); |
| | | |
| | | /** |
| | | * @return |
| | |
| | | |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | | return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getFlowCardId, flowCardId)); |
| | | .eq(GlassInfo::getFlowCardId, flowCardId) |
| | | .eq(GlassInfo::getLayer, layer)); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | new QueryWrapper<GlassInfo>() |
| | | .in("engineer_id", engineerIds) |
| | | .groupBy("flow_card_id") |
| | | .groupBy("layer") |
| | | ); |
| | | |
| | | // 转换为 List<Map<String, Object>> |
| | | List<Map<String, Object>> result = glassInfos.stream() |
| | | .map(glassInfo -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()+" | "+glassInfo.getLayer()); |
| | | // 如果还有其他字段需要添加到 map 中,在这里继续添加 |
| | | return map; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | log.info("result: {}", result); |
| | | log.info("result666: {}", result); |
| | | return result; |
| | | } |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>glassStorage</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/7 14:36RRRR |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | | public class GlassStorageApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(GlassStorageApplication.class, args); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.loadposition.controller;
|
| | |
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/loadPosition")
|
| | | @Api(tags = " 控制器")
|
| | | public class LoadPositionController {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionService loadPositionService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<LoadPosition>> findList(@RequestBody LoadPosition params) {
|
| | | List<LoadPosition> result = loadPositionService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<LoadPosition> findById(@PathVariable("id") Long id) {
|
| | | LoadPosition loadPosition = loadPositionService.findById(id);
|
| | | return ResponseEntity.ok(loadPosition);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.insert(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.update(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = loadPositionService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("load_position")
|
| | | @ApiModel(value = "LoadPosition", description = " ")
|
| | | public class LoadPosition implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 机器编号
|
| | | */
|
| | | @ApiModelProperty("机器编号")
|
| | | private Long machineId;
|
| | |
|
| | | /**
|
| | | * 启用标记
|
| | | */
|
| | | @ApiModelProperty("启用标记")
|
| | | private String flag;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 仓储任务编号
|
| | | */
|
| | | @ApiModelProperty("仓储任务编号")
|
| | | private Long storageTaskId;
|
| | |
|
| | | /**
|
| | | * 上片位类型
|
| | | */
|
| | | @ApiModelProperty("上片位类型")
|
| | | private Integer typeFlag;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public Long getMachineId() {
|
| | | return machineId;
|
| | | }
|
| | |
|
| | | public void setMachineId(Long machineId) {
|
| | | this.machineId = machineId;
|
| | | }
|
| | |
|
| | | public String getFlag() {
|
| | | return flag;
|
| | | }
|
| | |
|
| | | public void setFlag(String flag) {
|
| | | this.flag = flag;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getStorageTaskId() {
|
| | | return storageTaskId;
|
| | | }
|
| | |
|
| | | public void setStorageTaskId(Long storageTaskId) {
|
| | | this.storageTaskId = storageTaskId;
|
| | | }
|
| | |
|
| | | public Integer getTypeFlag() {
|
| | | return typeFlag;
|
| | | }
|
| | |
|
| | | public void setTypeFlag(Integer typeFlag) {
|
| | | this.typeFlag = typeFlag;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface LoadPositionMapper extends BaseMapper<LoadPosition> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.mapper.LoadPositionMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.loadposition.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface LoadPositionService extends IService<LoadPosition> {
|
| | |
|
| | | List<LoadPosition> findList(LoadPosition params);
|
| | |
|
| | | LoadPosition findById(Long id);
|
| | |
|
| | | boolean insert(LoadPosition loadPosition);
|
| | |
|
| | | boolean update(LoadPosition loadPosition);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import com.mes.loadposition.mapper.LoadPositionMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class LoadPositionServiceImpl extends ServiceImpl<LoadPositionMapper, LoadPosition> implements LoadPositionService {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionMapper loadPositionMapper;
|
| | |
|
| | | @Override
|
| | | public List<LoadPosition> findList(LoadPosition params){
|
| | | LambdaQueryWrapper<LoadPosition> query = Wrappers.lambdaQuery(LoadPosition.class);
|
| | | return loadPositionMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public LoadPosition findById(Long id) {
|
| | | return loadPositionMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(LoadPosition loadPosition) {
|
| | | return save(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(LoadPosition loadPosition) {
|
| | | return updateById(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return loadPositionMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/rawUsage")
|
| | | @Api(tags = " 控制器")
|
| | | public class RawUsageController {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageService rawUsageService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<RawUsage>> findList(@RequestBody RawUsage params) {
|
| | | List<RawUsage> result = rawUsageService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<RawUsage> findById(@PathVariable("id") Long id) {
|
| | | RawUsage rawUsage = rawUsageService.findById(id);
|
| | | return ResponseEntity.ok(rawUsage);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.insert(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.update(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = rawUsageService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("raw_usage")
|
| | | @ApiModel(value = "RawUsage", description = " ")
|
| | | public class RawUsage implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 玻璃类型
|
| | | */
|
| | | @ApiModelProperty("玻璃类型")
|
| | | private String rawType;
|
| | |
|
| | | /**
|
| | | * 宽度
|
| | | */
|
| | | @ApiModelProperty("宽度")
|
| | | private Float rawWidth;
|
| | |
|
| | | /**
|
| | | * 高度
|
| | | */
|
| | | @ApiModelProperty("高度")
|
| | | private Float rawHeight;
|
| | |
|
| | | /**
|
| | | * 厚度
|
| | | */
|
| | | @ApiModelProperty("厚度")
|
| | | private Float rawThickness;
|
| | |
|
| | | /**
|
| | | * 状态
|
| | | */
|
| | | @ApiModelProperty("状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 颜色
|
| | | */
|
| | | @ApiModelProperty("颜色")
|
| | | private String color;
|
| | |
|
| | | /**
|
| | | * 总数量
|
| | | */
|
| | | @ApiModelProperty("总数量")
|
| | | private Integer pieces;
|
| | |
|
| | | /**
|
| | | * 剩余数量
|
| | | */
|
| | | @ApiModelProperty("剩余数量")
|
| | | private Integer leftPieces;
|
| | |
|
| | | /**
|
| | | * 物料编码
|
| | | */
|
| | | @ApiModelProperty("物料编码")
|
| | | private String qrcode;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date createTime;
|
| | |
|
| | | /**
|
| | | * 生产日期
|
| | | */
|
| | | @ApiModelProperty("生产日期")
|
| | | private Date productionTime;
|
| | |
|
| | | /**
|
| | | * 批次号
|
| | | */
|
| | | @ApiModelProperty("批次号")
|
| | | private String batchId;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getRawType() {
|
| | | return rawType;
|
| | | }
|
| | |
|
| | | public void setRawType(String rawType) {
|
| | | this.rawType = rawType;
|
| | | }
|
| | |
|
| | | public Float getRawWidth() {
|
| | | return rawWidth;
|
| | | }
|
| | |
|
| | | public void setRawWidth(Float rawWidth) {
|
| | | this.rawWidth = rawWidth;
|
| | | }
|
| | |
|
| | | public Float getRawHeight() {
|
| | | return rawHeight;
|
| | | }
|
| | |
|
| | | public void setRawHeight(Float rawHeight) {
|
| | | this.rawHeight = rawHeight;
|
| | | }
|
| | |
|
| | | public Float getRawThickness() {
|
| | | return rawThickness;
|
| | | }
|
| | |
|
| | | public void setRawThickness(Float rawThickness) {
|
| | | this.rawThickness = rawThickness;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getColor() {
|
| | | return color;
|
| | | }
|
| | |
|
| | | public void setColor(String color) {
|
| | | this.color = color;
|
| | | }
|
| | |
|
| | | public Integer getPieces() {
|
| | | return pieces;
|
| | | }
|
| | |
|
| | | public void setPieces(Integer pieces) {
|
| | | this.pieces = pieces;
|
| | | }
|
| | |
|
| | | public Integer getLeftPieces() {
|
| | | return leftPieces;
|
| | | }
|
| | |
|
| | | public void setLeftPieces(Integer leftPieces) {
|
| | | this.leftPieces = leftPieces;
|
| | | }
|
| | |
|
| | | public String getQrcode() {
|
| | | return qrcode;
|
| | | }
|
| | |
|
| | | public void setQrcode(String qrcode) {
|
| | | this.qrcode = qrcode;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getProductionTime() {
|
| | | return productionTime;
|
| | | }
|
| | |
|
| | | public void setProductionTime(Date productionTime) {
|
| | | this.productionTime = productionTime;
|
| | | }
|
| | |
|
| | | public String getBatchId() {
|
| | | return batchId;
|
| | | }
|
| | |
|
| | | public void setBatchId(String batchId) {
|
| | | this.batchId = batchId;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface RawUsageMapper extends BaseMapper<RawUsage> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.rawusage.mapper.RawUsageMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.rawusage.service;
|
| | |
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface RawUsageService extends IService<RawUsage> {
|
| | |
|
| | | List<RawUsage> findList(RawUsage params);
|
| | |
|
| | | RawUsage findById(Long id);
|
| | |
|
| | | boolean insert(RawUsage rawUsage);
|
| | |
|
| | | boolean update(RawUsage rawUsage);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.rawusage.mapper.RawUsageMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class RawUsageServiceImpl extends ServiceImpl<RawUsageMapper, RawUsage> implements RawUsageService {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageMapper rawUsageMapper;
|
| | |
|
| | | @Override
|
| | | public List<RawUsage> findList(RawUsage params){
|
| | | LambdaQueryWrapper<RawUsage> query = Wrappers.lambdaQuery(RawUsage.class);
|
| | | return rawUsageMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public RawUsage findById(Long id) {
|
| | | return rawUsageMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(RawUsage rawUsage) {
|
| | | return save(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(RawUsage rawUsage) {
|
| | | return updateById(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return rawUsageMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/shelfRack")
|
| | | @Api(tags = " 控制器")
|
| | | public class ShelfRackController {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackService shelfRackService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<ShelfRack>> findList(@RequestBody ShelfRack params) {
|
| | | List<ShelfRack> result = shelfRackService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<ShelfRack> findById(@PathVariable("id") Long id) {
|
| | | ShelfRack shelfRack = shelfRackService.findById(id);
|
| | | return ResponseEntity.ok(shelfRack);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.insert(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.update(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = shelfRackService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("shelf_rack")
|
| | | @ApiModel(value = "ShelfRack", description = " ")
|
| | | public class ShelfRack implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 包号编号
|
| | | */
|
| | | @ApiModelProperty("包号编号")
|
| | | private Long rawPackageId;
|
| | |
|
| | | /**
|
| | | * 修改时间
|
| | | */
|
| | | @ApiModelProperty("修改时间")
|
| | | private Date modTime;
|
| | |
|
| | | /**
|
| | | * 启用状态
|
| | | */
|
| | | @ApiModelProperty("启用状态")
|
| | | private String enableState;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getRawPackageId() {
|
| | | return rawPackageId;
|
| | | }
|
| | |
|
| | | public void setRawPackageId(Long rawPackageId) {
|
| | | this.rawPackageId = rawPackageId;
|
| | | }
|
| | |
|
| | | public Date getModTime() {
|
| | | return modTime;
|
| | | }
|
| | |
|
| | | public void setModTime(Date modTime) {
|
| | | this.modTime = modTime;
|
| | | }
|
| | |
|
| | | public String getEnableState() {
|
| | | return enableState;
|
| | | }
|
| | |
|
| | | public void setEnableState(String enableState) {
|
| | | this.enableState = enableState;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface ShelfRackMapper extends BaseMapper<ShelfRack> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.shelfrack.mapper.ShelfRackMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.shelfrack.service;
|
| | |
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface ShelfRackService extends IService<ShelfRack> {
|
| | |
|
| | | List<ShelfRack> findList(ShelfRack params);
|
| | |
|
| | | ShelfRack findById(Long id);
|
| | |
|
| | | boolean insert(ShelfRack shelfRack);
|
| | |
|
| | | boolean update(ShelfRack shelfRack);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.shelfrack.mapper.ShelfRackMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class ShelfRackServiceImpl extends ServiceImpl<ShelfRackMapper, ShelfRack> implements ShelfRackService {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackMapper shelfRackMapper;
|
| | |
|
| | | @Override
|
| | | public List<ShelfRack> findList(ShelfRack params){
|
| | | LambdaQueryWrapper<ShelfRack> query = Wrappers.lambdaQuery(ShelfRack.class);
|
| | | return shelfRackMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public ShelfRack findById(Long id) {
|
| | | return shelfRackMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(ShelfRack shelfRack) {
|
| | | return save(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(ShelfRack shelfRack) {
|
| | | return updateById(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return shelfRackMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/storageTask")
|
| | | @Api(tags = " 控制器")
|
| | | public class StorageTaskController {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskService storageTaskService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<StorageTask>> findList(@RequestBody StorageTask params) {
|
| | | List<StorageTask> result = storageTaskService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<StorageTask> findById(@PathVariable("id") Long id) {
|
| | | StorageTask storageTask = storageTaskService.findById(id);
|
| | | return ResponseEntity.ok(storageTask);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.insert(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.update(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = storageTaskService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("storage_task")
|
| | | @ApiModel(value = "StorageTask", description = " ")
|
| | | public class StorageTask implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 任务类型
|
| | | */
|
| | | @ApiModelProperty("任务类型")
|
| | | private String taskType;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String taskState;
|
| | |
|
| | | /**
|
| | | * 仓储架号
|
| | | */
|
| | | @ApiModelProperty("仓储架号")
|
| | | private String shelfRack;
|
| | |
|
| | | /**
|
| | | * 上片位编号
|
| | | */
|
| | | @ApiModelProperty("上片位编号")
|
| | | private String loadRack;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date startTime;
|
| | |
|
| | | /**
|
| | | * 完成时间
|
| | | */
|
| | | @ApiModelProperty("完成时间")
|
| | | private Date finishTime;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTaskType() {
|
| | | return taskType;
|
| | | }
|
| | |
|
| | | public void setTaskType(String taskType) {
|
| | | this.taskType = taskType;
|
| | | }
|
| | |
|
| | | public String getTaskState() {
|
| | | return taskState;
|
| | | }
|
| | |
|
| | | public void setTaskState(String taskState) {
|
| | | this.taskState = taskState;
|
| | | }
|
| | |
|
| | | public String getShelfRack() {
|
| | | return shelfRack;
|
| | | }
|
| | |
|
| | | public void setShelfRack(String shelfRack) {
|
| | | this.shelfRack = shelfRack;
|
| | | }
|
| | |
|
| | | public String getLoadRack() {
|
| | | return loadRack;
|
| | | }
|
| | |
|
| | | public void setLoadRack(String loadRack) {
|
| | | this.loadRack = loadRack;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getFinishTime() {
|
| | | return finishTime;
|
| | | }
|
| | |
|
| | | public void setFinishTime(Date finishTime) {
|
| | | this.finishTime = finishTime;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface StorageTaskMapper extends BaseMapper<StorageTask> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.mes.storagetask.mapper.StorageTaskMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.storagetask.service;
|
| | |
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface StorageTaskService extends IService<StorageTask> {
|
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | | StorageTask findById(Long id);
|
| | |
|
| | | boolean insert(StorageTask storageTask);
|
| | |
|
| | | boolean update(StorageTask storageTask);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.storagetask.mapper.StorageTaskMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class StorageTaskServiceImpl extends ServiceImpl<StorageTaskMapper, StorageTask> implements StorageTaskService {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskMapper storageTaskMapper;
|
| | |
|
| | | @Override
|
| | | public List<StorageTask> findList(StorageTask params){
|
| | | LambdaQueryWrapper<StorageTask> query = Wrappers.lambdaQuery(StorageTask.class);
|
| | | return storageTaskMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public StorageTask findById(Long id) {
|
| | | return storageTaskMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(StorageTask storageTask) {
|
| | | return save(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(StorageTask storageTask) {
|
| | | return updateById(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return storageTaskMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | server: |
| | | port: 8086 |
| | | |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: glassStorage |
| | | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | |
| | |
| | | // 从 requestData 中获取传入的 flowCardId |
| | | String flowCardId = (String) requestData.get("flowCardId"); |
| | | int workstationId = (int) requestData.get("workstationId"); |
| | | int layer = (int) requestData.get("layer"); |
| | | |
| | | // 查询对应 flowCardId 的玻璃信息总数量 |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | |
| | | // 更新 down_workstation 表中的总数量 |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,layer); |
| | | int artificialnumber=0; |
| | | // 更新 down_workstation 表中的总数量 |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId,artificialnumber); |
| | | |
| | | // 构建响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | |
| | | * @param workstationId |
| | | * @return 更新架子和数量 |
| | | */ |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId,int artificialnumber); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId,int artificialnumber) { |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | | .set("artificial_number", artificialnumber) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(new DownWorkstation(), updateWrapper); |
| | |
| | | if (Details.size() > 0) { |
| | | DownStorageCageDetails downStorageCageDetails = Details.get(0); |
| | | String flowCardId = downStorageCageDetails.getFlowCardId(); |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,1); |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, null)); |
| | | List<DownWorkstation> downWorkstations = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getEnableState, 1)); |
| | | |
| | | if (!downWorkstations.stream().anyMatch(workstation -> workstation.getFlowCardId().equals(flowCardId))) { |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, downWorkstation.getWorkstationId()); |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, downWorkstation.getWorkstationId(),0); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: prod |
| | | application: |
| | | name: unLoadGlass |
| | | |
| | |
| | | @Test |
| | | public void testupdateFlowCardIdAndCount() { |
| | | log.info("绑定流程卡号和数量"); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("1", 1, 1); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("1", 1, 1,0); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testplc() { |
| | | log.info("测试"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01",1); |
| | | |
| | | } |
| | | |
| | |
| | | <module>LoadGlassModule</module> |
| | | <module>TemperingGlassModule</module> |
| | | <module>UnLoadGlassModule</module> |
| | | <module>GlassStorageModule</module> |
| | | </modules> |
| | | |
| | | <properties> |