liu
2026-09-04 569df4daf76eb586f1add62707d0ffa2b7ff20f2
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteProcessServiceImpl.java
@@ -27,7 +27,7 @@
/**
 * MES 工艺路线工序 Service 实现类
 *
 * @author 芋道源码
 * @author 超级管理员
 */
@Service
@Validated
@@ -81,8 +81,14 @@
    public void updateRouteProcess(MesProRouteProcessSaveReqVO updateReqVO) {
        // 1.0 已启用的工艺路线,不允许操作
        routeService.validateRouteNotEnable(updateReqVO.getRouteId());
        // 1.1 校验存在
        validateRouteProcessExists(updateReqVO.getId());
        // 1.1 校验存在;部分更新(如仅调整产出产品)时未传的必填字段用现有值回填
        MesProRouteProcessDO existing = validateRouteProcessExists(updateReqVO.getId());
        if (updateReqVO.getProcessId() == null) {
            updateReqVO.setProcessId(existing.getProcessId());
        }
        if (updateReqVO.getSort() == null) {
            updateReqVO.setSort(existing.getSort());
        }
        // 1.2 校验工艺路线、工序存在
        validateRouteAndProcessExists(updateReqVO.getRouteId(), updateReqVO.getProcessId());
        // 1.3 校验唯一性