| | |
| | | package com.vincent.rsf.server.api.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.common.Arith; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.TaskInParam; |
| | | import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; |
| | | import com.vincent.rsf.server.api.entity.dto.LocTypeDto; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.LocStsType; |
| | | import com.vincent.rsf.server.manager.enums.TaskStsType; |
| | | import com.vincent.rsf.server.manager.enums.TaskType; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.RegEx; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | |
| | | } |
| | | |
| | | //获取站点对应的库类型 |
| | | public static Long getAreaType(Integer sourceStaNo) { |
| | | public static Long getAreaType(String sourceStaNo) { |
| | | DeviceBindService rowLastnoService = SpringUtils.getBean(DeviceBindService.class); |
| | | List<DeviceBind> deviceBinds = rowLastnoService.list(new LambdaQueryWrapper<DeviceBind>()); |
| | | for (DeviceBind deviceBind : deviceBinds) { |
| | | String[] staNoList = deviceBind.getStaList().split(";"); |
| | | for (String staNo : staNoList) { |
| | | if (staNo.equals(sourceStaNo.toString())) { |
| | | if (staNo.equals(sourceStaNo)) { |
| | | return deviceBind.getId(); |
| | | } |
| | | } |
| | |
| | | * @param ioType 作业类型(*必传参数) |
| | | * @return |
| | | */ |
| | | public static InTaskMsgDto getLocNoCrn(DeviceBind deviceBind, Long area, Integer sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) { |
| | | public static InTaskMsgDto getLocNoCrn(DeviceBind deviceBind, Long area, String sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) { |
| | | DeviceBindService deviceBindService = SpringUtils.getBean(DeviceBindService.class); |
| | | DeviceSiteService deviceSiteService = SpringUtils.getBean(DeviceSiteService.class); |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | |
| | | int sRow = deviceBind.getStartRow(); |
| | | int eRow = deviceBind.getEndRow(); |
| | | int deviceQty = deviceBind.getDeviceQty(); |
| | | |
| | | |
| | | // ===============>>>> 开始执行 |
| | | curRow = deviceBind.getCurrentRow(); |
| | |
| | | if (Cools.isEmpty(deviceSite)) { |
| | | channel = 0; |
| | | } else { |
| | | inTaskMsgDto.setStaNo(Integer.parseInt(deviceSite.getDeviceSite())); |
| | | inTaskMsgDto.setStaNo(deviceSite.getDeviceSite()); |
| | | } |
| | | |
| | | //更新当前排 |