刘小明
2024-07-24 cdfb66472c06c611c5370f442208b0388d6347ef
添加品检接口
2个文件已修改
42 ■■■■■ 已修改文件
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -45,7 +45,7 @@
    }
    /**
     * 测试或品检都调用这个接口
     * 测试
     * @param vo
     * @return
     */
@@ -60,6 +60,24 @@
        }
    }
    /**
     * 品检
     * @param vo
     * @return
     */
    @PostMapping(path = "inspectQuality")
    public BaseResponse<Boolean> inspectQuality(QueryVo vo) {
        log.info("AssemblyStepCtrl.inspectQuality():" + vo);
        int count = sv.inspectQuality(vo);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    @PostMapping(path = "repair")
    public BaseResponse repair(@RequestBody @Valid QueryVo vo) {
        log.info("AssemblyStepCtrl.repair():" + vo);
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -325,6 +325,7 @@
        }
        throw new RuntimeException("状态错误,无效的节点类型: " + workType);
    }
    @Transactional
    public int repair(QueryVo vo) {
        long workId = Long.parseLong(vo.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
@@ -353,7 +354,26 @@
        return count;
    }
    @Transactional
    public int testing(QueryVo vo) {
        long workId = Long.parseLong(vo.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
        if (workLast == null) {
            throw new RuntimeException("系统中没有该条登录信息");
        }
        StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
        int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
                deviceLastDao.updateByPrimaryKeySelective(deviceLast);
        saveDeviceProductionLog(deviceLast);
        PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId);
        if (node.isRecord) {
            saveDeviceLife(deviceLast);
        }
        return count;
    }
    @Transactional
    public int inspectQuality(QueryVo vo) {
        long workId = Long.parseLong(vo.workId);
        StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
        if (workLast == null) {
@@ -525,4 +545,6 @@
    public List<StaDeviceProductionLog> queryLogByDeviceNo(String devoiceNo) {
        return deviceProductionLogDao.selectByDeviceNo(devoiceNo);
    }
}