Fancy
2024-07-09 9000814f7ceba006c7d36c51d06666ba6dfddf6c
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -52,6 +52,7 @@
    private OthFileMapper othFileMapper;
    @Value("${dy.webFile.fmUrl}")
    private String fmUrl;
    @Autowired
    public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) {
        this.deviceLastDao = deviceLastDao;
@@ -189,16 +190,17 @@
        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;
@@ -254,7 +256,7 @@
        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;
@@ -389,4 +391,26 @@
        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);
    }
}