原片仓储增加查询任务 ,查询架子信息,下片缓存推送路径修改
New file |
| | |
| | | // src/services/api.js
|
| | | import request from 'request';
|
| | |
|
| | |
|
| | | export const findTasks = (id, newState) => {
|
| | | const url = `glassStorage/api/storageTask/findTasks`;
|
| | | const options = {
|
| | | method: 'POST',
|
| | | url,
|
| | | json: true,
|
| | | body: { id, enableState: newState }
|
| | | };
|
| | |
|
| | | return new Promise((resolve, reject) => {
|
| | | request(options, (error, response, body) => {
|
| | | if (error) {
|
| | | reject(new Error(error.message));
|
| | | } else {
|
| | | resolve(body);
|
| | | }
|
| | | });
|
| | | });
|
| | | };
|
| | |
| | | |
| | | |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass`; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |
| | |
| | | </script>
|
| | |
|
| | | <style scoped>
|
| | | html, body {
|
| | | height: 100%;
|
| | | margin: 0;
|
| | | padding: 0;
|
| | | overflow: hidden; /* 禁止出现滚动条 */
|
| | | }
|
| | |
|
| | | .app-container {
|
| | |
|
| | | flex-direction: column;
|
| | | height: 100vh; /* 使用视口高度 */
|
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
|
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
|
| | | #dialog-footer{
|
| | | text-align: center;
|
| | | margin-top: -15px;
|
| | | }
|
| | |
|
| | |
|
| | |
| | | console.log('清除成功'); |
| | | ElMessage.success(response.message); |
| | | dialogFormVisiblea2.value = false; |
| | | } else if (response.code === 400) { |
| | | } else if (response.code === 500) { |
| | | // 清除失败的逻辑 |
| | | console.log('清除失败'); |
| | | console.log(response.message); // 打印服务器返回的错误信息 |
| | |
| | | |
| | | @Test |
| | | public void testSelectCacheEmpty() { |
| | | List<EdgStorageCage> map = edgStorageCageService.selectCacheEmpty(); |
| | | log.info("笼内空格:{}", Arrays.asList(map)); |
| | | // List<EdgStorageCage> map = edgStorageCageService.selectCacheEmpty(); |
| | | // log.info("笼内空格:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | @Test |
| | |
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | |
|
| | | @ApiOperation(value = "架子表格查询",notes = "架子表格查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/findshelfrack")
|
| | | public Result findshelfrack() {
|
| | | List<Map<String, Object>> result = shelfRackService.selectshelf_rack();
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | package com.mes.shelfrack.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.github.yulichang.base.MPJBaseMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | *
|
| | | */
|
| | |
|
| | | public interface ShelfRackMapper extends BaseMapper<ShelfRack> {
|
| | | public interface ShelfRackMapper extends MPJBaseMapper<ShelfRack> {
|
| | |
|
| | |
|
| | | List<Map<String, Object>> selectshelf_rack();
|
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | |
| | |
|
| | | List<ShelfRack> findList(ShelfRack params);
|
| | |
|
| | |
|
| | | List<Map<String, Object>> selectshelf_rack();
|
| | |
|
| | | } |
| | |
| | | package com.mes.shelfrack.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.github.yulichang.toolkit.JoinWrappers;
|
| | | import com.mes.common.config.Const;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | 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;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | |
| | | return shelfRackMapper.selectList(query);
|
| | | }
|
| | |
|
| | | //
|
| | | // public void yourMethodName() {
|
| | | // List<Map<String, Object>> resultList = shelfRackMapper.selectMaps(
|
| | | // new LambdaQueryWrapper<ShelfRack>()
|
| | | // .select(ShelfRack::getNumber, RawUsage::getRawType, RawUsage::getRawWidth,
|
| | | // RawUsage::getRawHeight, RawUsage::getRawThickness, ShelfRack::getModTime,
|
| | | // ShelfRack::getEnableState, RawUsage::getPieces, RawUsage::getLeftPieces,
|
| | | // "(datediff(now(), raw_usage.create_time)) as rukuTime",
|
| | | // "(concat(if(ROUND(raw_usage.left_pieces / #{param1} * 100, 0) < 20, 20, ROUND(raw_usage.left_pieces / #{param1} * 100, 0)), '%')) as bfb")
|
| | | // .leftJoin(RawUsage.class, RawUsage::getId, ShelfRack::getRawPackageId)
|
| | | // .orderByAsc(ShelfRack::getNumber)
|
| | | // );
|
| | | //
|
| | | // // Process resultList as needed
|
| | | // }
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<Map<String, Object>> selectshelf_rack() {
|
| | | return baseMapper.selectshelf_rack();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Optional;
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | |
|
| | | @ApiOperation(value = "任务查询",notes = "任务查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/findTasks")
|
| | | public Result findLatestTasks() {
|
| | | List<Map<String, Object>> result = storageTaskService.Tasks();
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | |
|
| | | } |
| | |
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | *
|
| | | *
|
| | |
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | |
|
| | | @Repository
|
| | | public interface StorageTaskMapper extends BaseMapper<StorageTask> {
|
| | |
|
| | |
|
| | | List<Map<String, Object>> selectTasks();
|
| | |
|
| | | } |
| | |
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | | Map<String, Optional<StorageTask>> findLatestTasks();
|
| | |
|
| | | List<Map<String, Object>> Tasks();
|
| | | } |
| | |
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<Map<String, Object>> Tasks() {
|
| | | return baseMapper.selectTasks();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |
| | |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/yiwumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/yiwumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
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">
|
| | |
|
| | |
|
| | | <select id="selectshelf_rack" resultType="java.util.Map">
|
| | | <![CDATA[
|
| | | SELECT a.number, b.raw_type, b.raw_width, b.raw_height, b.raw_thickness, b.left_pieces, a.mod_time, a.enable_state, b.pieces,
|
| | | datediff(now(), b.create_time) as rukutime,
|
| | | concat(if(ROUND(b.left_pieces / b.pieces * 100, 0) < 20, 20, ROUND(b.left_pieces / b.pieces * 100, 0)), '%') as bfb
|
| | | FROM shelf_rack AS a
|
| | | LEFT JOIN raw_usage AS b ON a.raw_package_id = b.id
|
| | | ]]>
|
| | | </select>
|
| | |
|
| | | </mapper>
|
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">
|
| | |
|
| | |
|
| | |
|
| | | <select id="selectTasks" resultType="java.util.Map">
|
| | | <![CDATA[
|
| | | SELECT d.*, g.raw_thickness, g.color
|
| | | FROM (
|
| | | (SELECT * FROM storage_task AS a WHERE a.task_state = '已完成' ORDER BY a.id DESC LIMIT 1)
|
| | | UNION ALL
|
| | | (SELECT * FROM storage_task AS c WHERE c.task_state = '正在工作')
|
| | | UNION ALL
|
| | | (SELECT * FROM storage_task AS b WHERE b.task_state = '等待中')
|
| | | ) AS d
|
| | | LEFT JOIN shelf_rack AS f ON f.id = d.shelf_rack
|
| | | LEFT JOIN raw_usage AS g ON g.id = f.raw_package_id
|
| | | ]]>
|
| | | </select>
|
| | |
|
| | | </mapper>
|
| | |
| | | package mes; |
| | | |
| | | import com.mes.GlassStorageApplication; |
| | | import com.mes.shelfrack.service.ShelfRackService; |
| | | import com.mes.storagetask.entity.StorageTask; |
| | | import com.mes.storagetask.service.StorageTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private StorageTaskService storageTaskService; |
| | | @Autowired |
| | | private ShelfRackService shelfRackService; |
| | | |
| | | |
| | | @Test |
| | |
| | | // storageTaskService.updateById(storageTask); |
| | | // storageTaskService.getBaseMapper().deleteById(1); |
| | | // storageTaskService.findList(storageTask); |
| | | storageTaskService.findLatestTasks(); |
| | | ///storageTaskService.findLatestTasks(); |
| | | storageTaskService.Tasks(); |
| | | } |
| | | @Test |
| | | public void selectshelf_rack() { |
| | | |
| | | shelfRackService.selectshelf_rack(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |