云
2026-10-27 ffca46b39d25439a06a27cafda2ec523a3fb67cf
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/mps/MesProMpsMapper.java
@@ -18,10 +18,15 @@
/**
 * MES 生产主计划(MPS)Mapper
 *
 * @author 芋道源码
 * @author 超级管理员
 */
@Mapper
public interface MesProMpsMapper extends BaseMapperX<MesProMpsDO> {
    default MesProMpsDO selectByIdForUpdate(Long id) {
        return selectOne(new LambdaQueryWrapperX<MesProMpsDO>()
                .eq(MesProMpsDO::getId, id).last("FOR UPDATE"));
    }
    default PageResult<MesProMpsDO> selectPage(MesProMpsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MesProMpsDO>()
@@ -52,9 +57,11 @@
                .orderByDesc(MesProMpsDO::getId);
        if (permittedClientIds != null) {
            if (CollUtil.isEmpty(permittedClientIds)) {
                return PageResult.empty();
                wrapper.isNull(MesProMpsDO::getClientId);
            } else {
                wrapper.and(w -> w.in(MesProMpsDO::getClientId, permittedClientIds)
                        .or().isNull(MesProMpsDO::getClientId));
            }
            wrapper.in(MesProMpsDO::getClientId, permittedClientIds);
        }
        return selectPage(reqVO, wrapper);
    }
@@ -93,4 +100,4 @@
                .setSql("quantity_produced = IFNULL(quantity_produced, 0) + " + incrQuantity));
    }
}
}