| | |
| | | if (preRecord != null) { |
| | | record.id = preRecord.id; |
| | | record.inTime = preRecord.outTime; |
| | | record.outLineTime = preRecord.outLineTime;//下边判断是否结束会用到 得留着 |
| | | } else { |
| | | record.inTime = new Date(); |
| | | record.inLineTime = new Date(); |
| | |
| | | * @return 状态 |
| | | */ |
| | | private Integer getStatus(String status, boolean isEnd, String workType) { |
| | | //组装 2024/07/17 目前组装workType 1 只有MarkOk //测试 //品检 //维修 |
| | | //组装 2024/07/17 目前组装workType 1 只有MarkOk //测试 //品检 |
| | | if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_TEST.equals(workType) || WORK_TYPE_INSPECTION.equals(workType) || WORK_TYPE_REPAIR.equals(workType)) { |
| | | return switch (status) { |
| | | case QrCodeConstant.MarkOk -> isEnd ? DeviceStatus.COMPLETED.getCode() : DeviceStatus.ASSEMBLING.getCode(); |
| | |
| | | default -> throw new RuntimeException("状态错误"); |
| | | }; |
| | | } |
| | | //维修 |
| | | throw new RuntimeException("状态错误,无效的节点类型: " + workType); |
| | | } |
| | | /** |
| | |
| | | } |
| | | throw new RuntimeException("状态错误,无效的节点类型: " + workType); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public int repair(QueryVo vo) { |
| | | long workId = Long.parseLong(vo.workId); |
| | | StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId); |
| | |
| | | map.put("proName", ""); |
| | | map.put("proType", ""); |
| | | map.put("proId", ""); |
| | | map.put("proCode", ""); |
| | | //判断是不是是本厂物料 |
| | | if(CollectionUtils.isEmpty(productList)){ |
| | | productList = productDao.selectAll(null); |
| | |
| | | map.put("proType", product.getType()); |
| | | BigInteger proId = BigInteger.valueOf(product.getId()); |
| | | map.put("proId", proId.toString()); |
| | | map.put("proCode",product.getCode()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /* public PrAssemblyPlan queryPlanByDeviceNo(String deviceNo) { |
| | | String proCode = ""; |
| | | String lotCode = ""; |
| | | if (StringUtils.isNotEmpty(deviceNo) && deviceNo.length() == 22) { |
| | | proCode = deviceNo.substring(3,6); |
| | | lotCode = deviceNo.substring(6,15); |
| | | } |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("deviceNo", deviceNo); |
| | | map.put("proName", ""); |
| | | map.put("proType", ""); |
| | | map.put("proId", ""); |
| | | map.put("proCode", ""); |
| | | //判断是不是是本厂物料 |
| | | if(CollectionUtils.isEmpty(productList)){ |
| | | productList = productDao.selectAll(null); |
| | | } |
| | | PltProduct product = null; |
| | | |
| | | if (product != null) { |
| | | map.put("deviceNo", deviceNo); |
| | | map.put("proName", product.getName()); |
| | | map.put("proType", product.getType()); |
| | | BigInteger proId = BigInteger.valueOf(product.getId()); |
| | | map.put("proId", proId.toString()); |
| | | map.put("proCode",product.getCode()); |
| | | } |
| | | return map; |
| | | } |
| | | */ |
| | | public List<StaDeviceLife> queryLifeByDeviceNo(String deviceNo) { |
| | | return deviceLifeDao.selectByDeviceNo(deviceNo); |
| | | } |