Fancy
2024-08-01 1f06ab808f1dde3cc21651c56e70e6b76786e4c5
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -173,7 +173,7 @@
        StaDeviceLast deviceLast = buildDeviceLast(params, workLast, deviceList.get(0));
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
                deviceLastDao.updateByPrimaryKey(deviceLast);
        saveDeviceProductionLog(deviceLast);
@@ -349,17 +349,21 @@
        repairInfo.repairTime = new Date();
        repairInfo.repairBy = workLast.userId;
        repairInfo.repairReason = vo.errorMsg;
        repairInfo.fromNode = preDeviceRecord.currNode;
        if(preDeviceRecord!=null) {
            repairInfo.fromNode = preDeviceRecord.currNode;
        }
        repairInfoDao.insertSelective(repairInfo);
        StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
        deviceLast.setRepairId(repairInfo.getId());
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
                deviceLastDao.updateByPrimaryKey(deviceLast);
        saveDeviceProductionLog(deviceLast);
        boolean isEndNode = nodeDao.isEndNode(preDeviceRecord.currNode);
        if (isEndNode) {
            saveDeviceLife(deviceLast);
        if(preDeviceRecord.currNode != null){
            boolean isEndNode = nodeDao.isEndNode(preDeviceRecord.currNode);
            if (isEndNode) {
                saveDeviceLife(deviceLast);
            }
        }
        return count;
    }
@@ -391,10 +395,10 @@
        }
        StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
                deviceLastDao.updateByPrimaryKey(deviceLast);
        saveDeviceProductionLog(deviceLast);
        PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId);
        if (node.isRecord) {
        if (node != null && node.isRecord) {
            saveDeviceLife(deviceLast);
        }
        return count;
@@ -473,6 +477,7 @@
    public List<PltProductQualityInspectionItems> getQualityItems(String proId) {
        Map<String, Object> params = new HashMap<>();
        params.put("proId", proId);//item  start  count
        params.put("disabled", "0");
        //查询符合条件的记录
        return qualityItemsDao.selectSome(params);
    }
@@ -480,6 +485,7 @@
    public List<PltProductTestInspectionItems> getTestItems(String proId) {
        Map<String, Object> params = new HashMap<>();
        params.put("proId", proId);
        params.put("disabled", "0");
        return testItemsDao.selectSome(params);
    }