| | |
| | | } |
| | | } |
| | | return ( |
| | | (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 104) ? |
| | | (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 103 || record.taskType == 11 ) ? |
| | | <Button |
| | | onClick={clickCancel} |
| | | label="toolbar.cancel"> |
| | |
| | | task.setTaskCode(ruleCode) |
| | | .setTaskStatus(TaskStsType.GENERATE_IN.id) |
| | | .setTaskType(TaskType.TASK_TYPE_IN.type) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_CRN.id) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_CRN.val) |
| | | .setTargLoc(targetLoc) |
| | | .setBarcode(barcode) |
| | | .setTargSite(targetSite) |
| | |
| | | .eq(Loc::getCode, locCode) |
| | | .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_S.type) |
| | | .set(Loc::getBarcode, barcode)); |
| | | |
| | | if (!updated) { |
| | | throw new CoolException("库位预约失败!!"); |
| | | } |
| | |
| | | * 获取并验证组拖明细 |
| | | */ |
| | | private List<WaitPakinItem> getWaitPakinItems(Long pakinId) { |
| | | List<WaitPakinItem> waitPakinItems = waitPakinItemService.list( |
| | | new LambdaQueryWrapper<WaitPakinItem>().eq(WaitPakinItem::getPakinId, pakinId)); |
| | | |
| | | List<WaitPakinItem> waitPakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>().eq(WaitPakinItem::getPakinId, pakinId)); |
| | | if (waitPakinItems.isEmpty()) { |
| | | throw new CoolException("数据错误:组拖明细不存在"); |
| | | } |
| | |
| | | } |
| | | LocTypeDto locTypeDto = new LocTypeDto(param); |
| | | InTaskMsgDto dto = null; |
| | | switch (warehouseArea.getType()) { |
| | | case "CRN": //堆垛机 |
| | | dto = getLocNoCrn(deviceBind, warehouseArea.getId(), param.getSourceStaNo(), matnr, batch, locTypeDto, 0, param.getIoType()); |
| | | break; |
| | | case "SXC": //四向库 |
| | | break; |
| | | case "CTU": //ctu |
| | | dto = getLocNoCtu(deviceBind, warehouseArea.getId(), param.getSourceStaNo(), matnr, batch, locTypeDto, 0, param.getIoType()); |
| | | break; |
| | | default: |
| | | dto = getLocNoCtu(deviceBind, warehouseArea.getId(), param.getSourceStaNo(), matnr, batch, locTypeDto, 0, param.getIoType()); |
| | | break; |
| | | //根据立库类型获取获取库位 |
| | | if (warehouseArea.getType().equals(WarehType.WAREHOUSE_TYPE_CRN.val)) { |
| | | //堆垛机 |
| | | dto = getLocNoCrn(deviceBind, warehouseArea.getId(), param.getSourceStaNo(), matnr, batch, locTypeDto, 0, param.getIoType()); |
| | | |
| | | } else if (warehouseArea.getType().equals(WarehType.WAREHOUSE_TYPE_FOUR_DIRECTIONS.val)) { |
| | | //四向库 |
| | | } else { |
| | | //CTU 库以及其它 |
| | | dto = getLocNoCtu(deviceBind, warehouseArea.getId(), param.getSourceStaNo(), matnr, batch, locTypeDto, 0, param.getIoType()); |
| | | } |
| | | return dto; |
| | | } |
| | |
| | | loc = shallowLoc; |
| | | channel = shallowLoc.getChannel(); |
| | | break; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.vincent.rsf.server.manager.enums.LocStsType; |
| | | import com.vincent.rsf.server.manager.enums.TaskType; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.RegEx; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class LocUtils { |
| | | |
| | | public static final Logger logger = LoggerFactory.getLogger(LocUtils.class); |
| | | |
| | | private static List<Integer> doubleLocs; |
| | | |
| | | private static Boolean isDoubleDeep; |
| | | |
| | | @Autowired |
| | | private SlaveProperties slavePropertie; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | doubleLocs = slavePropertie.getDoubleLocs(); |
| | | isDoubleDeep = slavePropertie.isDoubleDeep(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 浅库位对应的深库位号 |
| | |
| | | return LocNecessaryParametersDoubleExtension(curRow, crnNumber); //已完善 |
| | | } |
| | | |
| | | //经典双伸库位 |
| | | //经典双伸库位, 获取双深排 |
| | | public static int[] LocNecessaryParametersDoubleExtension( Integer curRow, Integer crnNumber) { |
| | | int[] necessaryParameters = new int[]{0, 0, 0, 0}; |
| | | |
| | |
| | | return dto.getLocType1().equals(Integer.parseInt(loc.getType())); |
| | | } |
| | | |
| | | public static String getCrnLoc() { |
| | | SlaveProperties bean = SpringUtils.getBean(SlaveProperties.class); |
| | | System.out.println(bean.getDoubleLocs()); |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static String zerofill(String msg, Integer count) { |
| | | if (msg.length() == count) { |
| | | return msg; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.api.utils.LocUtils; |
| | | import com.vincent.rsf.server.common.constant.Constants; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | map.setType(Constants.TASK_TYPE_OUT_CHECK); |
| | | |
| | | return R.ok("任务生成成功").add(locItemService.generateTask(map)); |
| | | } |
| | | |
| | |
| | | for (Task task : tasks) { |
| | | if (StringUtils.isNotBlank(task.getParentId() + "")) { |
| | | Task task1 = taskService.getById(task.getParentId()); |
| | | if (!Objects.isNull(task1)) { |
| | | if (!Objects.isNull(task1) && task1.getTaskType().equals(TaskStsType.UPDATED_IN.id)) { |
| | | throw new CoolException("父任务:" + task1.getTaskCode() + "未执行完成!"); |
| | | } |
| | | } |
| | |
| | | private Long parentId; |
| | | |
| | | @ApiModelProperty("仓库类型") |
| | | private Integer warehType; |
| | | private String warehType; |
| | | |
| | | /** |
| | | * 任务类型 |
| | |
| | | public enum WarehType { |
| | | |
| | | //仓库类型 |
| | | WAREHOUSE_TYPE_FOUR_DIRECTIONS("1", "四向库"), |
| | | WAREHOUSE_TYPE_AGV("2", "AGV库"), |
| | | WAREHOUSE_TYPE_CTU("3", "CTU库"), |
| | | WAREHOUSE_TYPE_PLAT("4", "平库"), |
| | | WAREHOUSE_TYPE_CRN("5", "堆垛机库"), |
| | | WAREHOUSE_TYPE_FOUR_DIRECTIONS("SXC", "四向库"), |
| | | WAREHOUSE_TYPE_AGV("AGV", "AGV库"), |
| | | WAREHOUSE_TYPE_CTU("CTU", "CTU库"), |
| | | WAREHOUSE_TYPE_PLAT("PLAT", "平库"), |
| | | WAREHOUSE_TYPE_CRN("CRN", "堆垛机库"), |
| | | ; |
| | | |
| | | public Integer id; |
| | | public String val; |
| | | public String desc; |
| | | |
| | | WarehType(String id, String desc) { |
| | | this.id = Integer.parseInt(id); |
| | | WarehType(String val, String desc) { |
| | | this.val = val; |
| | | this.desc = desc; |
| | | } |
| | | |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | /**获取组拖*/ |
| | | // List<Long> ids = pakins.stream().map(WaitPakin::getId).collect(Collectors.toList()); |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>() |
| | | .in(WaitPakin::getId, pakins.getId()) |
| | | .eq(WaitPakin::getIoStatus, Short.parseShort(PakinIOStatus.PAKIN_IO_STATUS_DONE.val))); |
| | |
| | | task.setTaskCode(ruleCode) |
| | | .setTaskStatus(TaskStsType.GENERATE_IN.id) |
| | | .setTaskType(TaskType.TASK_TYPE_IN.type) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_AGV.id) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_AGV.val) |
| | | .setTargLoc(targetLoc) |
| | | .setOrgSite(orgSta) |
| | | .setBarcode(pakin.getBarcode()) |
| | |
| | | task.setTaskCode(ruleCode) |
| | | .setTaskStatus(TaskStsType.COMPLETE_IN.id) |
| | | .setTaskType(TaskType.TASK_TYPE_IN.type) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_PLAT.id) |
| | | .setWarehType(WarehType.WAREHOUSE_TYPE_PLAT.val) |
| | | .setTargLoc(targetLoc) |
| | | .setBarcode(pakin.getBarcode()) |
| | | .setCreateBy(loginUserId) |
| | |
| | | throw new CoolException("更新库位状态失败!!"); |
| | | } |
| | | } |
| | | if (!Objects.isNull(task.getWarehType()) && task.getWarehType().equals(WarehType.WAREHOUSE_TYPE_AGV.id)) { |
| | | if (!Objects.isNull(task.getWarehType()) && task.getWarehType().equals(WarehType.WAREHOUSE_TYPE_AGV.val)) { |
| | | BasStation basStation = null; |
| | | if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) { |
| | | basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |