| | |
| | | private OthFileMapper othFileMapper; |
| | | @Value("${dy.webFile.fmUrl}") |
| | | private String fmUrl; |
| | | |
| | | @Autowired |
| | | public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) { |
| | | this.deviceLastDao = deviceLastDao; |
| | |
| | | record.planId = workLast.planId; |
| | | record.workId = Long.parseLong(params.workId); |
| | | record.stationId = workLast.stationId; |
| | | record.equipNo = deviceNo; |
| | | record.deviceNo = deviceNo; |
| | | record.currNode = workLast.nodeId; |
| | | |
| | | record.updatedBy = workLast.userId; |
| | | record.assistants = params.assistants; |
| | | record.errorMsg = params.errorMsg; |
| | | |
| | | PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId); |
| | | record.nodeContent = node.content; |
| | | if (node.isRecord) { |
| | | record.equipCycleContent = node.equipCycleContent; |
| | | record.deviceCycleContent = node.equipCycleContent; |
| | | } |
| | | record.status = getStatus(params.status, node.isEnd,params.workType); |
| | | return record; |
| | |
| | | StaDeviceLast preDeviceRecord = deviceLastDao.selectByDeviceNo(vo.deviceNo); |
| | | StaRepairInfo repairInfo = new StaRepairInfo(); |
| | | repairInfo.workId = workId; |
| | | repairInfo.equipNo = vo.deviceNo; |
| | | repairInfo.deviceNo = vo.deviceNo; |
| | | repairInfo.repairTime = new Date(); |
| | | repairInfo.repairBy = workLast.userId; |
| | | repairInfo.repairReason = vo.errorMsg; |
| | |
| | | FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash); |
| | | return fileRestVo.fileWebUrl + file.filePath; |
| | | } |
| | | |
| | | public Map<String,String> queryByDeviceNo(String deviceNo) { |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("deviceNo", deviceNo); |
| | | map.put("proName", "-"); |
| | | map.put("proType", "-"); |
| | | |
| | | PltProduct product = productDao.selectByCode(deviceNo.substring(3,6)); |
| | | if(product != null){ |
| | | map.put("proName", product.getName()); |
| | | map.put("proType", product.getType()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | public List<StaDeviceLife> queryLifeByDeviceNo(String deviceNo) { |
| | | return deviceLifeDao.selectByDeviceNo(deviceNo); |
| | | } |
| | | |
| | | public List<StaDeviceProductionLog> queryLogByDeviceNo(String devoiceNo) { |
| | | return deviceProductionLogDao.selectByDeviceNo(devoiceNo); |
| | | } |
| | | } |