Merge remote-tracking branch 'origin/master'
19个文件已修改
2 文件已重命名
1个文件已添加
1个文件已删除
| | |
| | | <!-- <el-button type="success" size="mini" @click="addglass()">添加原片</el-button> -->
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | | |
| | | </el-table>
|
| | | <el-pagination
|
| | | v-if="totalItems > 0"
|
| | | background
|
| | | layout="prev, pager, next"
|
| | | :total="totalItems"
|
| | | :page-size="pageSize"
|
| | | @current-change="handleCurrentChange"
|
| | | ></el-pagination>
|
| | |
|
| | |
|
| | | </el-dialog>
|
| | |
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | |
|
| | | const totalItems = ref(0);
|
| | | totalItems.value = 10;
|
| | | const pageSize = 10;
|
| | | let currentPage = ref(1);
|
| | | const handleCurrentChange = (val) => {
|
| | |
|
| | | currentPage.value = val;
|
| | | |
| | | };
|
| | |
|
| | | const getTagType2 =(status) => {
|
| | | switch (status) {
|
| | | case 'completed':
|
| | |
| | | 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(); |
| | | // }); |
| | |
| | | <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="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="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="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="otherNumber" 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 |
| | | align="center" |
| | |
| | | prop="enableState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.enableState==1? $t('reportWork.enable') : $t('reportWork.unenable')}}</el-tag> |
| | | |
| | | <el-tag :type="getTagType(scope.row.enableState)" @click="toggleStatus(scope.row)"> |
| | | {{ 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"> |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | |
| | | @DS("pp") |
| | | @Slf4j |
| | | public class ReportingWorkServiceImpl extends ServiceImpl<ReportingWorkMapper, ReportingWork> implements ReportingWorkService { |
| | | @Autowired |
| | | private ReportingDamageMapper reportingDamageMapper; |
| | | @Autowired |
| | | private AwaitingRepairMapper awaitingRepairMapper; |
| | | @Autowired |
| | | private ReportingDamageMapper reportingDamageMapper; |
| | | @Autowired |
| | | private AwaitingRepairMapper awaitingRepairMapper; |
| | | |
| | | @Override |
| | | public List<Reportingdamage> selectDamage(Reportingdamage reportingdamage) { |
| | | QueryWrapper<Reportingdamage>queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.select("this_process,sum(completed_quantity)as completedQuantity,sum(breakage_quantity)as breakageQuantity,device_name ") |
| | | .eq("this_process",reportingdamage.getThisProcess()) |
| | | QueryWrapper<Reportingdamage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("this_process,sum(completed_quantity) as completedQuantity,sum(breakage_quantity) as breakageQuantity ") |
| | | //.eq("this_process", reportingdamage.getThisProcess()) |
| | | //.eq("device_name",reportingdamage.getDeviceName()) |
| | | .ge("reporting_work_time",reportingdamage.getReportingWorkTime()) |
| | | .ge("reporting_work_time", reportingdamage.getReportingWorkTime()) |
| | | .groupBy("this_process"); |
| | | return reportingDamageMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<AwaitingRepair> selectAwaitingRepair() { |
| | | QueryWrapper<AwaitingRepair>queryWrapper=new QueryWrapper<>(); |
| | | QueryWrapper<AwaitingRepair> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("*"); |
| | | return awaitingRepairMapper.selectList(queryWrapper); |
| | | } |
| | |
| | | package com.mes.temperingglass.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.mes.base.entity.BigStorageCageBaseInfo; |
File was renamed from hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/TemperingAgoService.java |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingAgoService extends MPJBaseService<TemperingGlassInfo> { |
| | | public interface TemperingGlassInfoService extends MPJBaseService<TemperingGlassInfo> { |
| | | |
| | | List<TemperingGlassInfo> selectWaitingGlass(); |
| | | |
| | |
| | | List<TemperingGlassInfo> selectOverGlass(); |
| | | |
| | | List<TemperingGlassInfo> selectLayoutId(); |
| | | |
| | | List<TemperingGlassInfo> selectTaskType(); |
| | | } |
File was renamed from hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/service/impl/TemperingAgoServiceImpl.java |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService { |
| | | @DS("salve_hangzhoumes") |
| | | public class TemperingGlassInfoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingGlassInfoService { |
| | | @Autowired |
| | | TemperingGlassInfoMapper temperingMapper; |
| | | |
| | |
| | | public List<TemperingGlassInfo> selectOverGlass() { |
| | | //获取过旋转台最大的钢化版图id |
| | | QueryWrapper<TemperingGlassInfo> wapper = new QueryWrapper<>(); |
| | | wapper.select("top 1 *").eq("state", 4) |
| | | wapper.select("Top 1 *").eq("state", 4) |
| | | .orderByDesc("tempering_layout_id"); |
| | | //根据最大的版图id显示钢化后的版图信息 |
| | | TemperingGlassInfo glassinfo= temperingMapper.selectOne(wapper); |
| | | if (glassinfo == null) { |
| | | return null; // 直接返回null,表示没有找到符合条件的记录 |
| | | } |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("tempering_layout_id",glassinfo.getTemperingLayoutId()); |
| | | |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | .orderByAsc("tempering_layout_id"); |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> selectTaskType() { |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("state") |
| | | .groupBy("state"); |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | } |
| | |
| | | @ApiOperation("新增角色及角色下的权限信息") |
| | | @PostMapping("/saveRole") |
| | | // @PreAuthorize("hasAuthority('sys:role:save')") |
| | | public Result<SysRole> saveRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | return Result.success(sysRoleService.saveRole(sysRoleVO)); |
| | | public Result<SysRoleVO> saveRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | //return Result.success(sysRoleService.saveRole(sysRoleVO)); |
| | | sysRoleService.saveRole(sysRoleVO); |
| | | return Result.build(200,"新增成功",sysRoleVO); |
| | | } |
| | | |
| | | @ApiOperation("编辑角色及角色下的权限信息") |
| | | @PostMapping("/updateRole") |
| | | // @PreAuthorize("hasAuthority('sys:role:save')") |
| | | public Result<String> updateRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | return Result.success(sysRoleService.updateRole(sysRoleVO)); |
| | | public Result<SysRoleVO> updateRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | // return Result.success(sysRoleService.updateRole(sysRoleVO)); |
| | | sysRoleService.updateRole(sysRoleVO); |
| | | return Result.build(200,"新增成功",sysRoleVO); |
| | | } |
| | | |
| | | @ApiOperation("查询角色及角色下的权限信息") |
| | |
| | | roleMenu.setMenuId(menu.getId()); |
| | | return roleMenu; |
| | | }).collect(Collectors.toList()); |
| | | // 使用流处理菜单列表,提取 children 的 id,并设置到 SysRoleMenu 中 |
| | | List<SysRoleMenu> childrenList = menuList.stream() |
| | | .flatMap(menu -> menu.getChildren().stream()) // 扁平化处理 children 列表 |
| | | .map(child -> { |
| | | SysRoleMenu roleMenu = new SysRoleMenu(); |
| | | roleMenu.setRoleId(roleId); |
| | | roleMenu.setMenuId(child.getId()); // 设置 child 的 id 到 menuId |
| | | return roleMenu; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | log.info("清空角色权限表中该角色信息"); |
| | | // 先删除原来的记录,再保存新的 |
| | | sysRoleMenuService.remove(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, roleId)); |
| | | sysRoleMenuService.saveBatch(roleMenuList); |
| | | sysRoleMenuService.saveBatch(childrenList); |
| | | // 删除缓存 |
| | | sysUserService.clearUserAuthorityInfoByRoleId(roleId); |
| | | return "success"; |
| | |
| | | |
| | | @ApiOperation("退出登录") |
| | | @PostMapping("/logout") |
| | | // @PreAuthorize("hasRole('ROLE_admin')") |
| | | @PreAuthorize("hasAuthority('xt:yh')") |
| | | public Result<String> logout() { |
| | | return Result.success(sysUserService.logout()); |
| | |
| | | @PostMapping("/updateUser") |
| | | // @PreAuthorize("hasAuthority('sys:user:update')") |
| | | public Result<List<SysUserVO>> updateUser(@Validated @RequestBody SysUserVO sysUser) { |
| | | //return Result.success(sysUserService.updateUser(sysUser)); |
| | | sysUserService.updateUser(sysUser); |
| | | GeneralRequest request=new GeneralRequest(); |
| | | request.setKey(""); |
| | | //request.setKey(""); |
| | | return Result.success(sysUserService.listByUserName(request)); |
| | | //更改了修改之后返回所有用户列表 |
| | | } |
| | |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | |
| | | - id: glassStorage |
| | | uri: lb://glassStorage |
| | | predicates: |
| | | - Path=/api/glassStorage/** |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | # - id: unLoadGlass |
| | | # uri: lb://unLoadGlass |
| | | # predicates: |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Optional;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | |
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | |
|
| | | Map<String, Optional<StorageTask>> findLatestTasks();
|
| | | } |
| | |
| | | import com.mes.storagetask.mapper.StorageTaskMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Optional;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | @Slf4j
|
| | | public class StorageTaskServiceImpl extends ServiceImpl<StorageTaskMapper, StorageTask> implements StorageTaskService {
|
| | |
|
| | | @Autowired
|
| | |
| | | }
|
| | |
|
| | |
|
| | | public Map<String, Optional<StorageTask>> findLatestTasks() {
|
| | | Map<String, Optional<StorageTask>> latestTasks = new HashMap<>();
|
| | |
|
| | | // 查询最新的已完成任务
|
| | | LambdaQueryWrapper<StorageTask> completedWrapper = new LambdaQueryWrapper<>();
|
| | | completedWrapper.eq(StorageTask::getTaskType, "已完成")
|
| | | .orderByDesc(StorageTask::getId)
|
| | | .last("LIMIT 1");
|
| | | Optional<StorageTask> latestCompletedTask = Optional.ofNullable(storageTaskMapper.selectOne(completedWrapper));
|
| | | latestTasks.put("已完成", latestCompletedTask);
|
| | |
|
| | | // 查询最新的等待中任务
|
| | | LambdaQueryWrapper<StorageTask> pendingWrapper = new LambdaQueryWrapper<>();
|
| | | pendingWrapper.eq(StorageTask::getTaskType, "等待中")
|
| | | .orderByDesc(StorageTask::getId);
|
| | | Optional<StorageTask> latestPendingTask = Optional.ofNullable(storageTaskMapper.selectOne(pendingWrapper));
|
| | | latestTasks.put("等待中", latestPendingTask);
|
| | | log.info(latestTasks+"");
|
| | | return latestTasks;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |
| | |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
New file |
| | |
| | | package mes; |
| | | |
| | | import com.mes.GlassStorageApplication; |
| | | import com.mes.storagetask.entity.StorageTask; |
| | | import com.mes.storagetask.service.StorageTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/27 16:37 |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = GlassStorageApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) |
| | | |
| | | public class GlassStorageModuleApplicationTest { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private StorageTaskService storageTaskService; |
| | | |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | log.info("完整路径:{}", Arrays.asList("123")); |
| | | } |
| | | |
| | | @Test |
| | | public void testCacheGlass() { |
| | | // storageTaskService.getBaseMapper().selectById(1); |
| | | //StorageTask storageTask=new StorageTask(); |
| | | // storageTask.setId(Long.valueOf("1")); |
| | | // storageTask.setTaskState("1"); |
| | | // storageTaskService.updateById(storageTask); |
| | | // storageTaskService.getBaseMapper().deleteById(1); |
| | | // storageTaskService.findList(storageTask); |
| | | storageTaskService.findLatestTasks(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | @Scheduled(fixedDelay = 30000000) |
| | | public void plcLoadGlassTask() throws InterruptedException { |
| | | try { |
| | | //获取联机状态 |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | @Scheduled(fixedDelay = 30000000) |
| | | public void plcLoadGlassReport(){ |
| | | //获取是否有汇报 |
| | | String loadStatus = plcParameterObject.getPlcParameter("PlcStatus").getValue(); |
| | |
| | | public void loadGlassStatus(){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在进行的任务 |
| | | String inkageStatus =plcParameterObject.getPlcParameter("MesToPlc").getValue(); |
| | | //String inkageStatus ="1"; |
| | | //String inkageStatus =plcParameterObject.getPlcParameter("MesToPlc").getValue(); |
| | | String inkageStatus ="1"; |
| | | jsonObject.append("InkageStatus", inkageStatus); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("loadGlass"); |
| | | if (sendwServer != null) { |
| | |
| | | */ |
| | | UpPattenUsage selectSequence(UpPattenUsage upPattenUsage); |
| | | |
| | | |
| | | /** |
| | | * 更改上片玻璃状态 |
| | | * @return UpPattenUsage |
| | | */ |
| | | Boolean updateGlassState(UpPattenUsage upPattenUsage); |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.job; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class PlcTemperingGlassTask { |
| | | |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | private TemperingGlassInfoService temperingAgoService; |
| | | /** |
| | | * fixedRate : 上一个调用开始后再次调用的延时(不用等待上一次调用完成) |
| | | * fixedDelay : 上一个调用结束后再次调用的延时 |
| | | */ |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | @Scheduled(fixedDelay = 2000) |
| | | public void temperingGlassHome(){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //正在等待进片的玻璃 |
| | |
| | | jsonObject.append("outGlass", outGlass); |
| | | //过旋转台钢化后的玻璃 |
| | | List<TemperingGlassInfo> overGlass = temperingAgoService.selectOverGlass(); |
| | | |
| | | jsonObject.append("overGlass", overGlass); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass"); |
| | |
| | | package com.mes.temperingglass.controller; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class TemperingGlassInfoController { |
| | | |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | private TemperingGlassInfoService temperingAgoService; |
| | | |
| | | @ApiOperation("查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中") |
| | | @GetMapping("/selectWaitingGlass") // 查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中 |
| | |
| | | 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 |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | 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 |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: salve_hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | application: |
| | | name: temperingGlass |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | |
| | | public class TemperingApplicationTest { |
| | | |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | private TemperingGlassInfoService temperingAgoService; |
| | | |
| | | |
| | | @Test |
| | |
| | | @Test |
| | | public void testFindPa4() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectOverGlass(); |
| | | log.info("等待中的玻璃:{}", Arrays.asList(glass)); |
| | | log.info("钢化后的玻璃:{}", Arrays.asList(glass)); |
| | | } |
| | | @Test |
| | | public void testFindPa5() { |
| | |
| | | String currentSlot = plcParameterObject.getPlcParameter("currentCell").getValue(); |
| | | |
| | | |
| | | |
| | | log.info("1、获取到的请求字为:{},获取到的扫描ID为:{},获取到的确认字为:{},获取到的出片状态分别为:g06:{}、g08:{}、g11:{}、g13:{},当前格子号为:{}", |
| | | requestWord, glassIdeValue, confirmationWrodValue, out06Glassstate, out08Glassstate, out11Glassstate, out13Glassstate, currentSlot); |
| | | |